/* Folio labels: the 4×6 label document, its printer figure, the "built for" list, the printer add-on.
   Loaded on the homepage and on inner pages that show any of them. Tokens: docs/DESIGN-SYSTEM.md. */

:root {
  --f-label-w: 232px;          /* drawn width of a 4×6 in label; height is always 1.5 × width */
  --f-label-radius: 8px;       /* die-cut corner of a thermal label */
}

/* 1. The label (a document: neutral ink, mono for order data) ---------------------------------- */
.f-shiplabel {
  --w: var(--f-label-w);
  position: relative; display: flex; flex-direction: column; flex: none;
  width: var(--w); aspect-ratio: 2 / 3; padding: 1.25em 1.3em 1.1em;
  font: 400 calc(var(--w) * .0475) / 1.4 var(--f-font-mono); color: var(--f-doc-ink); text-align: left;
  background: var(--f-surface); border-radius: var(--f-label-radius);
  box-shadow: 0 0 0 1px rgba(22, 22, 26, .1), 0 1px 2px rgba(13, 21, 38, .06), 0 14px 28px -14px rgba(13, 21, 38, .28);
  font-variant-numeric: tabular-nums;
}
.f-shiplabel span, .f-shiplabel b { display: block; }
.f-shiplabel__k { font-size: .72em; letter-spacing: .08em; text-transform: uppercase; color: rgba(22, 22, 26, .62); }
.f-shiplabel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; padding-bottom: .8em; border-bottom: 1.5px solid var(--f-doc-ink); }
.f-shiplabel__brand { font: 750 1.3em/1 var(--f-font-sans); letter-spacing: -.03em; }
.f-shiplabel__from { font-size: .72em; line-height: 1.35; text-align: right; color: rgba(22, 22, 26, .72); }
.f-shiplabel__to { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-start; gap: .1em; padding-block: .9em; font: 500 1.12em/1.35 var(--f-font-sans); }
.f-shiplabel__to b { font: 750 1.55em/1.1 var(--f-font-sans); letter-spacing: -.025em; margin: .15em 0 .2em; }
.f-shiplabel__slip { display: none; padding-block: .8em; font-size: .86em; }
.f-shiplabel__slip .f-shiplabel__k { margin-bottom: .3em; }
.f-shiplabel__items { padding-block: .7em .6em; border-top: 1px solid rgba(22, 22, 26, .22); font-size: .86em; }
.f-shiplabel__row { display: grid; grid-template-columns: 1fr auto auto; gap: 1em; padding-block: .35em; }
.f-shiplabel__row span:first-child { font-family: var(--f-font-sans); font-weight: 600; }
.f-shiplabel__note { display: none; grid-template-columns: auto 1fr; gap: .8em; align-items: baseline; padding-top: .5em; margin-top: .3em; border-top: 1px dashed rgba(22, 22, 26, .3); }
.f-shiplabel__foot { margin-top: auto; padding-top: .7em; border-top: 1.5px solid var(--f-doc-ink); display: grid; gap: .3em; justify-items: center; }
.f-shiplabel__bars { width: 100%; height: 3em; }
.f-shiplabel__no { font-weight: 600; letter-spacing: .12em; }

.f-shiplabel[data-preset="address"] .f-shiplabel__items { display: none; }
.f-shiplabel[data-preset="address"] .f-shiplabel__to { font-size: 1.3em; }
.f-shiplabel[data-preset="slip"] .f-shiplabel__to { display: none; }
.f-shiplabel[data-preset="slip"] .f-shiplabel__slip { display: block; }
.f-shiplabel[data-preset="slip"] .f-shiplabel__items { flex: 1 1 auto; font-size: .95em; }
.f-shiplabel[data-preset="slip"] .f-shiplabel__note { display: grid; }

/* 2. Label leaving a printer, on a field, with its real dimensions drawn in ---------------------- */
.f-labelfig { position: relative; display: grid; justify-items: center; padding: var(--f-s-7) var(--f-s-5) var(--f-s-6); isolation: isolate; }
.f-labelfig__field { position: absolute; inset: 0; z-index: -1; border-radius: var(--f-radius-3); }
.f-labelfig__stage { position: relative; display: grid; justify-items: center; }
.f-labelfig__feed { position: relative; padding: 18px 28px 0; margin-bottom: -15px; clip-path: inset(-40px -40px 0 -40px); }
.f-labelfig__printer { position: relative; z-index: 1; width: calc(var(--f-label-w) * 1.34); }
.f-printer-svg { width: 100%; height: auto; filter: drop-shadow(0 12px 14px rgba(13, 21, 38, .14)); }
.f-labelfig__stamp { justify-self: start; margin-top: var(--f-s-5); }
.f-dim { position: absolute; display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--f-font-mono); letter-spacing: .06em; color: var(--f-text-3); white-space: nowrap; }
.f-dim i { flex: 1 1 auto; height: 1px; background: var(--f-cross); position: relative; }
.f-dim i:first-child::before, .f-dim i:last-child::before { content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--f-cross); }
.f-dim i:first-child::before { left: 0; } .f-dim i:last-child::before { right: 0; }
.f-dim b { font-weight: 500; }
.f-dim--w { top: -4px; left: 50%; width: var(--f-label-w); transform: translateX(-50%); }
.f-dim--h { top: 18px; left: calc(50% + var(--f-label-w) / 2 + 22px); width: calc(var(--f-label-w) * 1.5 - 4px); transform-origin: 0 0; transform: rotate(90deg) translateY(-100%); }
@media (max-width: 420px) { .f-dim--h { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  .f-labelfig[data-label-feed] .f-labelfig__sheet { animation: f-label-feed 1500ms steps(24, end) 350ms both; }
  .f-labelfig[data-label-feed] .f-dim { animation: f-fade-in 300ms linear 1900ms both; }
}
@keyframes f-label-feed { from { transform: translateY(104%); } to { transform: none; } }
@keyframes f-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 3. Built for: a ruled list of working scenes beside a sticky heading ---------------------------- */
.f-for__list { display: grid; }
.f-for__row { position: relative; display: grid; gap: var(--f-s-2) var(--f-s-5); padding-block: var(--f-s-5); border-top: 1px solid var(--f-line); }
.f-for__row:first-child { border-top-color: var(--f-line-strong); }
.f-for__row:has(> .h-rule) { border-top: 0; }
.f-for__who { font: 700 var(--f-step-2) / 1.15 var(--f-font-display); letter-spacing: -.02em; text-wrap: balance; }
.f-for__scene { font-size: 16px; line-height: 1.6; color: var(--f-text-2); max-width: 56ch; text-wrap: pretty; }
.f-for__uses { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: var(--f-s-2); }
.f-for__uses a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; font-size: 14px; text-decoration: none; }
.f-for__uses a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (min-width: 720px) {
  .f-for__row { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); align-items: start; padding-block: var(--f-s-5) var(--f-s-6); }
}

/* Homepage wrapper for the same list */
.h-for__lead { max-width: 40ch; }

/* 4. Homepage capability: labels, the seventh specimen, set wide ------------------------------------ */
.h-spec__row--label { grid-column: 1 / -1; padding-top: var(--f-s-7); margin-top: var(--f-s-2); gap: var(--f-s-6); }
.h-spec__row--label::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--f-line); }
.h-spec__row--label .f-labelfig { --f-label-w: 200px; padding: var(--f-s-6) var(--f-s-4) var(--f-s-5); justify-self: stretch; }
.h-spec__row--label .f-labelfig__field { background-color: var(--f-surface); box-shadow: var(--f-shadow-card); }
.h-spec__row--label .h-spec__name { font-size: var(--f-step-3); }
.h-spec__row--label .h-spec__line { font-size: 16px; max-width: 48ch; }
.h-spec__facts { display: grid; gap: 0; margin-top: var(--f-s-5); max-width: 520px; }
.h-spec__facts li { display: grid; grid-template-columns: 10px 1fr; column-gap: 14px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--f-line); font-size: 15px; line-height: 1.45; color: var(--f-text-2); }
.h-spec__facts li::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--f-accent); transform: translateY(1px); }
.h-spec__facts b { color: var(--f-text); font-weight: 650; }
@media (min-width: 834px) {
  .h-spec__row--label { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; column-gap: var(--f-s-8); }
}
@media (hover: hover) and (pointer: fine) {
  .h-spec__row--label .f-shiplabel { transition: transform var(--f-dur-ui) var(--f-ease-out); }
  .h-spec__row--label:hover .f-shiplabel { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .h-spec__row--label:hover .f-shiplabel { transform: none; } }

/* 5. Printer page ------------------------------------------------------------------------------------ */
.f-sheet-head--labels .f-sheet-head__aside { max-width: 460px; }
.f-presets { display: grid; gap: var(--f-s-6); align-items: center; }
.f-presets > *, .f-presets__pick > * { min-width: 0; }
.f-presets .f-fieldset { min-inline-size: 0; }
.f-presets__pick { display: grid; gap: var(--f-s-5); }
.f-presets__list { display: grid; gap: 0; border-top: 1px solid var(--f-line-strong); }
.f-presets__opt { position: relative; display: block; border-bottom: 1px solid var(--f-line); cursor: pointer; }
.f-presets__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.f-presets__face { display: grid; grid-template-columns: 18px 1fr; column-gap: 14px; align-items: start; padding: 16px 12px 16px 10px; border-radius: var(--f-radius-1); transition: background-color var(--f-dur-micro) linear; }
.f-presets__face::before { content: ""; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--f-line-strong); background: var(--f-surface); transition: border-color var(--f-dur-micro) linear, border-width var(--f-dur-micro) linear; }
.f-presets__face b { display: block; font-weight: 650; font-size: 17px; letter-spacing: -.01em; color: var(--f-text); }
.f-presets__face span { grid-column: 2; display: block; margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--f-text-2); max-width: 46ch; }
.f-presets__opt:hover .f-presets__face { background: var(--f-band); }
.f-presets__opt input:checked + .f-presets__face { background: var(--f-accent-wash); }
.f-presets__opt input:checked + .f-presets__face::before { border: 5px solid var(--f-accent); }
.f-presets__opt input:focus-visible + .f-presets__face { outline: 2px solid var(--f-accent); outline-offset: 2px; }
.f-presets__fig { justify-self: center; width: 100%; max-width: 440px; }
.f-presets__fig .f-labelfig { --f-label-w: 264px; padding-block: var(--f-s-7); }
.f-presets__fig .f-shiplabel { transition: opacity 150ms linear; }
.f-presets__fig .f-shiplabel.is-swapping { opacity: 0; }
.f-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.f-toggles li { padding: 6px 12px; border-radius: 999px; background: var(--f-band); font-weight: 500; font-size: 14px; color: var(--f-text-2); }
@media (min-width: 900px) { .f-presets { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--f-s-8); } }

.f-honest { display: grid; gap: var(--f-s-5); }
.f-honest__item h3 { margin-bottom: var(--f-s-2); }
.f-honest__item { padding-top: var(--f-s-4); border-top: 1px solid var(--f-line-strong); }
.f-honest__item p { font-size: 16px; line-height: 1.6; color: var(--f-text-2); max-width: 44ch; }
@media (min-width: 834px) { .f-honest { grid-template-columns: 1fr 1fr; column-gap: var(--f-s-6); } }

/* Printer add-on (only ever visible when the product API says it is purchasable) */
.f-printer__grid { display: grid; gap: var(--f-s-6); align-items: start; }
.f-printer__name { margin-top: var(--f-s-4); font-weight: 650; font-size: var(--f-step-1); letter-spacing: -.01em; color: var(--f-text); max-width: 34ch; text-wrap: balance; }
.f-printer__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: var(--f-s-5); }
.f-printer__price b { font: 740 var(--f-step-5) / 1 var(--f-font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.f-printer__price span { font-size: 15px; color: var(--f-text-2); }
.f-printer__facts { margin-top: var(--f-s-5); border-top: 1px solid var(--f-line); }
.f-printer__facts > div { display: grid; grid-template-columns: minmax(110px, 2fr) 5fr; gap: var(--f-s-4); padding: 11px 0; border-bottom: 1px solid var(--f-line); font-size: 15px; }
.f-printer__facts dt { color: var(--f-text-3); font-weight: 500; }
.f-printer__facts dd { color: var(--f-text); font-weight: 500; }
.f-printer__specs { margin-top: var(--f-s-6); }
.f-printer__specs .f-printer__facts { margin-top: var(--f-s-3); }
.f-printer__fine { margin-top: var(--f-s-4); max-width: 56ch; }
@media (min-width: 900px) { .f-printer__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--f-s-8); } .f-printer__grid:has(.f-gallery[hidden]) { grid-template-columns: minmax(0, 720px); } }

/* Calm add-on row on /pricing/ */
.f-addon { display: grid; grid-template-columns: 1fr; gap: var(--f-s-3) var(--f-s-5); align-items: center; margin-top: var(--f-s-6); padding: var(--f-s-5); border-radius: var(--f-radius-2); background: var(--f-band); }
.f-addon__fig { width: 104px; }
.f-addon__fig .f-printer-svg { filter: none; }
.f-addon__name { margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--f-text); }
.f-addon__note { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--f-text-2); max-width: 52ch; }
.f-addon__price b { display: block; font: 700 var(--f-step-3) / 1 var(--f-font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.f-addon__price > span { display: block; margin-top: 4px; font-size: 13px; color: var(--f-text-3); }
.f-addon__link { min-height: 44px; }
@media (min-width: 834px) { .f-addon { grid-template-columns: 104px minmax(0, 1fr) auto auto; column-gap: var(--f-s-6); padding: var(--f-s-5) var(--f-s-6); } }

/* Features chapter figure */
.fig-label { --f-label-w: 208px; display: grid; place-items: center; }

/* Grounds on the labels page are set by hand: the add-on block may be absent, so they cannot depend on section order. */
body.tpl-printer .f-main > .f-section { background: var(--f-bg); }
body.tpl-printer .f-main > #print, body.tpl-printer .f-main > #who { background: var(--f-band); }
body.tpl-printer .f-main > .f-printer { padding-top: 0; }

/* The figure never outgrows its column: at two-column tablet widths the label (and the printer drawn from it) scales down. */
.f-labelfig { min-width: 0; max-width: 100%; }
.f-labelfig__stage, .f-labelfig__printer { max-width: 100%; }
@media (min-width: 834px) and (max-width: 1023px) {
  .f-labelfig { --f-label-w: 200px; }
  .f-presets__fig .f-labelfig { --f-label-w: 200px; }
}
/* "Not postage." reads as a run-in lead in ink, not a blue block label. */
.callout.callout--runin p > strong:first-child { display: inline; margin: 0; font: inherit; font-weight: 650; color: var(--f-text); }

/* Phones: the figure narrows with the screen; the label keeps its 4×6 proportion. */
@media (max-width: 480px) {
  .f-labelfig { --f-label-w: 208px; padding-inline: var(--f-s-4); }
  .f-presets__fig .f-labelfig { --f-label-w: 216px; }
}
.f-labelfig__stage, .f-labelfig__printer, .f-printer-svg { max-width: 100%; }

/* 6. Printer add-on, live: photo gallery, price plus shipping, bundle line, shipping calculator ------------- */
.f-gallery { display: grid; gap: var(--f-s-3); min-width: 0; width: 100%; max-width: 460px; }
@media (min-width: 720px) and (max-width: 899px) { .f-printer__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: var(--f-s-6); } .f-gallery { position: sticky; top: calc(var(--f-header-h-compact) + 24px); } .f-gallery__thumb { width: 52px; height: 52px; } }
@media (min-width: 900px) { .f-gallery { max-width: none; } }
.f-gallery__main { background: var(--f-surface); border-radius: var(--f-radius-3); box-shadow: var(--f-shadow-card); overflow: hidden; }
.f-gallery__main img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; transition: opacity 150ms linear; }
.f-gallery__main img.is-swapping { opacity: 0; }
.f-gallery__thumbs { display: flex; flex-wrap: wrap; gap: var(--f-s-2); }
.f-gallery__thumb { display: block; width: 68px; height: 68px; padding: 0; border: 0; border-radius: var(--f-radius-btn); background: var(--f-surface); box-shadow: 0 0 0 1px var(--f-line-strong); overflow: hidden; transition: box-shadow var(--f-dur-micro) linear, transform var(--f-dur-micro) var(--f-ease-out); }
.f-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.f-gallery__thumb:hover { box-shadow: 0 0 0 1px var(--f-text-3); }
.f-gallery__thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--f-accent); }
.f-gallery__thumb:active { transform: scale(.97); }
.f-gallery__thumb:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 3px; }
@media (min-width: 900px) { .f-gallery { position: sticky; top: calc(var(--f-header-h-compact) + 32px); } }
@media (max-width: 420px) { .f-gallery__thumb { width: 56px; height: 56px; } }
@media (max-width: 359px) { .f-gallery__thumb { width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .f-gallery__main img, .f-gallery__thumb { transition: none; } .f-gallery__thumb:active { transform: none; } }

.f-printer__price .f-printer__plus { font-weight: 650; font-size: var(--f-step-2); letter-spacing: -.02em; color: var(--f-text); }
.f-printer__price span:last-child { flex-basis: 100%; }
.f-printer__bundle { display: grid; grid-template-columns: 10px 1fr; column-gap: 12px; align-items: baseline; margin-top: var(--f-s-5); padding: 14px 16px; border-radius: var(--f-radius-2); background: var(--f-accent-wash); font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--f-text); max-width: 56ch; }
.f-printer__bundle .sq { transform: translateY(1px); }

.f-ship { margin-top: var(--f-s-6); padding: var(--f-s-5); border-radius: var(--f-radius-2); background: var(--f-band); }
.f-ship__fields { display: grid; gap: var(--f-s-3); margin-top: var(--f-s-4); align-items: end; }
.f-ship__fields .f-field-row { min-width: 0; }
.f-ship .f-label { margin-bottom: 6px; }
.f-ship .f-input, .f-ship .f-select { width: 100%; background-color: var(--f-surface); }
.f-ship__go { min-height: var(--f-control-h); }
.f-ship__list { margin-top: var(--f-s-4); border-top: 1px solid var(--f-line-strong); }
.f-ship__list li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--f-s-4); align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--f-line); }
.f-ship__list b { font-weight: 650; font-size: 16px; color: var(--f-text); }
.f-ship__list .f-ship__eta { grid-column: 1; font-size: 14px; color: var(--f-text-2); }
.f-ship__list .f-ship__price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 650; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--f-text); }
.f-ship__note { margin-top: var(--f-s-3); font-size: 14px; line-height: 1.5; color: var(--f-text-2); }
.f-ship__note.is-error { color: var(--f-err-ink); }
.f-ship[aria-busy="true"] .f-ship__list { opacity: .5; transition: opacity 150ms linear; }
@media (min-width: 560px) { .f-ship__fields { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; } }

/* Homepage labels row: one sentence about the optional printer (only while purchasable) */
.h-spec__printer { position: relative; z-index: 1; margin-top: var(--f-s-4); max-width: 520px; font-size: 15px; line-height: 1.5; color: var(--f-text-2); }
.h-spec__printer a { font-weight: 600; }
.h-spec__printer b { color: var(--f-text); font-weight: 650; font-variant-numeric: tabular-nums; }

.f-printer__from { white-space: nowrap; }

/* Tablet column: smaller thumbnails on one row; the country select gets its own row so names are not cut. */
@media (min-width: 720px) and (max-width: 899px) { .f-gallery__thumb { width: 52px; height: 52px; } .f-gallery__thumbs { gap: 6px; } }
@media (min-width: 560px) and (max-width: 1099px) {
  .f-ship__fields { grid-template-columns: minmax(0, 1fr) auto; }
  .f-ship__fields .f-field-row:first-child { grid-column: 1 / -1; }
}
