/* Orderette · The Pattern Envelope. Manila envelope board and pattern tissue as the whole ground; black drafting
   marks are the only line language; three gouache tablets are the one painted material; one dressmaker red for the
   committed view and the live order. Positions of the first viewport live in envelope-layout.css (generated from the
   measured comp); this file is the material, type, colour and component language. */

@font-face { font-family: 'Patua One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/PatuaOne.woff2) format('woff2'); }
@font-face { font-family: 'Fjalla One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/FjallaOne.woff2) format('woff2'); }
@font-face { font-family: 'Oswald'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(fonts/Oswald-variable.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/Archivo-variable.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/Archivo-italic-variable.woff2) format('woff2'); }
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/NotoSansArabic-variable.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+1EE00-1EEF1; }
@font-face { font-family: 'Noto Sans Arabic'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/NotoSansArabic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f2e5cb;        /* envelope front, manila */
  --kraft: #ebd7b8;        /* envelope back */
  --tissue: #ddc095;       /* pattern tissue */
  --ink: #2a2925;          /* drafting ink */
  --ink-soft: #514f45;
  --red: #c44737;          /* dressmaker red: the committed view, the live order */
  --red-chip: #c44737;     /* white lettering on it reads at 4.9:1 */
  --red-press: #a93a2c;
  --red-ink: #9a3024;      /* red lettering under 24px on paper: 5 to 6:1 where the dressmaker red reads 3.5 to 3.9 */
  --green: #465f42;        /* an order moving: outlined */
  --green-chip: #5e7656;   /* an order moving: on the screen; white lettering at 5:1 */
  --slate: #3e4b4c;        /* the tablet's header band */
  --display: 'Fjalla One', 'Oswald', 'Arial Narrow', sans-serif;
  --label: 'Archivo', 'Arial Narrow', sans-serif;   /* set condensed (font-stretch 80%) and medium for labels */
  --slab: 'Patua One', 'Rockwell', serif;
  --sans: 'Archivo', 'Arial Narrow', sans-serif;
  --arabic: 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  color-scheme: light;
}

html { background: var(--kraft); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-stretch: 75%; font-weight: 300; line-height: 1.4; }
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: var(--dash, 2px) dashed var(--red); outline-offset: 3px; }
[lang="ar"] { font-family: var(--arabic); }

/* ---- The sheet: the comp's frame, one comp pixel = --u ---- */
.sheet { position: relative; width: 100%; aspect-ratio: 2688 / 1520; container-type: inline-size; overflow: hidden; background: var(--kraft); }
.sheet > * { --u: calc(100cqw / 2688); --dash: calc(2.5 * var(--u)); }
.sheet :is(h1, h2, p, ul, ol, li, figure, figcaption, hr) { margin: 0; padding: 0; }
.sheet :is(ul, ol) { list-style: none; }
.sheet section, .sheet figure, .sheet li, .sheet nav { position: static; }
.sheet [class^="r-"], .sheet [class*=" r-"] { position: absolute; box-sizing: border-box; }
.sheet a { color: inherit; text-decoration: none; }

/* grounds */
.ground { position: absolute; left: 0; width: 100%; pointer-events: none; }
.ground-front { top: 0; height: calc(822 * var(--u)); background: image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / calc(910 * var(--u)) auto repeat; }
.ground-back { top: calc(822 * var(--u)); bottom: 0; background: linear-gradient(rgba(214, 184, 140, 0.14), rgba(214, 184, 140, 0.14)), image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / calc(910 * var(--u)) auto repeat; background-blend-mode: multiply; }
.ground-tissue { left: calc(1510 * var(--u)); width: calc(1178 * var(--u)); top: calc(822 * var(--u)); bottom: 0; background: linear-gradient(rgba(241, 224, 194, 0.12), rgba(241, 224, 194, 0.12)), image-set(url(plates/tissue-paper.webp) type("image/webp"), url(plates/tissue-paper.png) type("image/png")) calc(-1510 * var(--u)) calc(-822 * var(--u)) / calc(2688 * var(--u)) auto no-repeat var(--tissue); -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6) calc(80 * var(--u)), #000 calc(104 * var(--u))); mask-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6) calc(80 * var(--u)), #000 calc(104 * var(--u))); }

/* plates. <picture> adds no box, and its <source> children must not either: Chrome draws <source> as an empty
   inline, which a grid or flex parent would turn into a cell of its own. */
img.plate { display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
picture { display: contents; }
picture > source { display: none; }
.tablet img.plate, .piece img.plate, .tag img.plate { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-fold-crease { object-fit: cover; }

/* drafting marks */
.rule { border: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--ink) 0, var(--ink) calc(14 * var(--u)), transparent calc(14 * var(--u)), transparent calc(23 * var(--u))) center / 100% var(--dash) no-repeat; }
.rule.solid { background: linear-gradient(var(--ink), var(--ink)) center / 100% calc(2 * var(--u)) no-repeat; }
.rule.red { background: repeating-linear-gradient(90deg, var(--red) 0, var(--red) calc(14 * var(--u)), transparent calc(14 * var(--u)), transparent calc(23 * var(--u))) center / 100% var(--dash) no-repeat; }
/* the red cut line runs the whole foot of the envelope back in one drafting dash: from the panel frame's left edge,
   along the frame's own bottom edge (which is left unpainted for it) and on under the tissue */
.r-red-foot { left: calc(14 * var(--u)); top: calc(1454.25 * var(--u)); width: calc(2660 * var(--u)); height: calc(9 * var(--u)); }
.divider { border: 0; background: repeating-linear-gradient(180deg, var(--ink) 0, var(--ink) calc(14 * var(--u)), transparent calc(14 * var(--u)), transparent calc(22 * var(--u))) center / 100% 100% no-repeat; }
.border { border: var(--dash) dashed var(--ink); pointer-events: none; }
.border.red-foot { border-bottom-color: transparent; }

/* ---- front: the envelope ---- */
.wordmark { font: 400 1em/1 var(--slab); color: var(--ink); white-space: nowrap; }
.tagline, .label { font-family: var(--label); font-stretch: 80%; text-transform: uppercase; white-space: nowrap; }
.nav, .view-label, .piece .who, .piece .num, .tag-live, .cut-note, .unit, .pilots { font-stretch: 80%; }
.screen .chip, .piece .status { font-family: 'Oswald', var(--label); font-stretch: 100%; }
.tagline-2 { white-space: nowrap; }
.headline { font-family: var(--display); font-weight: 400; color: var(--ink); white-space: nowrap; -webkit-text-stroke: calc(1.4 * var(--u)) currentColor; paint-order: stroke fill; }
.nav { display: flex; justify-content: space-between; align-items: center; font: 500 calc(26 * var(--u)) / 1 var(--label); font-stretch: 80%; letter-spacing: calc(1.2 * var(--u)); text-transform: uppercase; white-space: nowrap; }
.nav a { display: inline-flex; align-items: center; gap: calc(20 * var(--u)); }
.nav a + a { border-left: calc(2 * var(--u)) solid var(--ink); padding-left: calc(24 * var(--u)); margin-left: calc(24 * var(--u)); line-height: calc(46 * var(--u)); }
.arrow { width: calc(44 * var(--u)); height: calc(22 * var(--u)); flex: none; }

.view-label { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: calc(14 * var(--u)); padding-top: calc(10 * var(--u)); text-align: center; font-family: var(--label); font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.view-label b { font-weight: 600; font-size: calc(50 * var(--u)); line-height: 1; letter-spacing: 0; }
.view-label span { font-weight: 500; font-size: calc(30.5 * var(--u)); line-height: 1; letter-spacing: calc(5.5 * var(--u)); margin-right: calc(-5.5 * var(--u)); }
.view-label span[lang="ar"] { font-family: var(--arabic); font-weight: 500; font-size: calc(38 * var(--u)); line-height: 1; letter-spacing: 0; margin: calc(-6 * var(--u)) 0 0; text-transform: none; }

/* the tablets: each screen is the plate's own painted glass. The screen has no panel of its own; it is clipped to the
   glass quad measured off the plate, every line is inset from the slanted glass edges at its own height
   (envelope-layout.css), and the header band is a slate wash laid on the glass rather than a slab on the frame. */
.tablet { display: block; }
.screen { display: block; color: var(--ink); overflow: hidden; font-family: var(--sans); font-stretch: 100%; font-weight: 400; }
.screen[lang="ar"] { font-family: var(--arabic); }
.screen > * { position: absolute; }
.screen .bar { top: 0; left: 0; right: 0; display: flex; align-items: center; gap: calc(10 * var(--u)); box-sizing: border-box; color: #f7f0e3; font-size: calc(21 * var(--u)); font-weight: 500;
  background:
    radial-gradient(75% 170% at 20% 12%, rgba(255, 255, 255, 0.1), transparent 62%),
    radial-gradient(60% 150% at 84% 96%, rgba(14, 20, 22, 0.32), transparent 70%),
    linear-gradient(rgba(62, 75, 76, 0.94), rgba(52, 64, 66, 0.97)),
    image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / calc(560 * var(--u)) auto;
  background-blend-mode: normal, normal, multiply, normal;
  box-shadow: inset 0 calc(-1.5 * var(--u)) 0 rgba(20, 26, 27, 0.45); }
.screen .bar svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); flex: none; opacity: 0.92; }
.screen .caller { font-size: calc(26 * var(--u)); font-weight: 600; line-height: 1; }
.screen .thread { height: calc(1.5 * var(--u)); background: rgba(42, 41, 37, 0.35); }
.screen .items { font-size: calc(20 * var(--u)); line-height: calc(27 * var(--u)); }
.screen .total { font-size: calc(20 * var(--u)); font-weight: 600; line-height: calc(27 * var(--u)); }
.screen .chip { display: inline-flex; align-items: center; height: calc(32 * var(--u)); padding-inline: calc(22 * var(--u)); border-radius: calc(16 * var(--u)); background: var(--green-chip); color: #fff; font: 500 calc(17 * var(--u)) / 1 var(--label); letter-spacing: calc(2.5 * var(--u)); text-transform: uppercase; }
.screen[lang="ar"] .chip { font-family: var(--arabic); font-size: calc(19 * var(--u)); letter-spacing: 0; }
.screen .chip.new { background: var(--red-chip); }

.tag { display: block; }
.tag .tilt { position: absolute; inset: 0; transform: rotate(-9deg); transform-origin: 50% 50%; }
.tag-call { font-family: var(--display); color: var(--red); white-space: nowrap; }
.tag-number { font-family: var(--display); white-space: nowrap; }
.tag-live { font-family: var(--label); font-weight: 600; letter-spacing: calc(3 * var(--u)); text-transform: uppercase; white-space: nowrap; }
/* the red rule under the number, where the comp draws it (measured in the tag's tilted frame) */
.tag-rule { position: absolute; left: calc(55 * var(--u)); top: calc(390 * var(--u)); width: calc(216 * var(--u)); height: calc(2.4 * var(--u)); border-radius: calc(1.2 * var(--u)); background: var(--red); }

/* ---- back: the plan, the yardage table, the tissue ---- */
.plan-list p { white-space: nowrap; }
.plan-list p [lang="ar"] { font-weight: 500; }
.cell { border: var(--dash) solid var(--ink); border-radius: calc(10 * var(--u)); }
.num { font-family: var(--display); font-weight: 400; display: block; white-space: nowrap; }
.unit { display: block; font-family: var(--label); text-transform: uppercase; white-space: nowrap; }
.pilots { display: block; font-family: var(--label); text-transform: uppercase; }
.free { display: block; font-family: var(--display); font-weight: 400; }
.fine { white-space: nowrap; }
.real { white-space: nowrap; }

/* The two plans and the pilot round. The monthly plan is one cell, its price over a stitch line and the minutes it
   includes under it, so the two numbers read as one plan; the drafting circle on the seam between the first two
   cells says the plans are a choice. The pilot cell keeps PILOTS FREE over the line and the round under it: spots
   taken, and the round's clock in red while it runs (pilot.js). Both cells share one grid: icon, figure, words. */
.sheet .yardage > .plan-month { position: absolute; left: calc(814 * var(--u)); top: calc(962 * var(--u)); width: calc(332 * var(--u)); height: calc(268 * var(--u)); }
.sheet .yardage > .plan-pilot { position: absolute; left: calc(1163 * var(--u)); top: calc(962 * var(--u)); width: calc(300 * var(--u)); height: calc(268 * var(--u)); }
.sheet .yardage > :is(.plan-month, .plan-pilot) { display: grid; grid-template-columns: calc(64 * var(--u)) auto minmax(0, 1fr); grid-template-rows: calc(80 * var(--u)) auto auto; column-gap: calc(16 * var(--u)); align-content: center; align-items: center; padding: 0 calc(20 * var(--u)); box-sizing: border-box; }
.sheet .yardage :is(.plan-month, .plan-pilot) img.plate { width: calc(64 * var(--u)); height: calc(66 * var(--u)); object-fit: contain; }
/* both figures of the monthly plan are yardage numerals at the comp's size, and both words at the comp's unit size:
   INCLUDED is the word that makes the two numbers one plan */
.sheet .yardage .plan-month .num { justify-self: end; font-size: calc(52.4 * var(--u)); line-height: 1; letter-spacing: calc(2.5 * var(--u)); }
.sheet .yardage .plan-month .unit { font-weight: 500; font-size: calc(26.2 * var(--u)); line-height: 1.15; }
.sheet .yardage .stitch { grid-column: 1 / -1; align-self: center; height: calc(2 * var(--u)); margin: calc(13 * var(--u)) 0; border: 0; background: repeating-linear-gradient(90deg, var(--ink) 0, var(--ink) calc(10 * var(--u)), transparent calc(10 * var(--u)), transparent calc(17 * var(--u))); opacity: 0.8; }
.sheet .yardage > .plan-pilot { grid-template-rows: calc(80 * var(--u)) auto auto auto; }
.sheet .yardage .plan-pilot .pilot-limit { grid-column: 1 / -1; margin-top: calc(4 * var(--u)); }
.sheet .yardage .plan-pilot .stitch { margin: calc(9 * var(--u)) 0; }
.sheet .yardage .plan-pilot .pilot-word { grid-column: 2 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: calc(6 * var(--u)); }
.sheet .yardage .plan-pilot .pilots { font-weight: 500; font-size: calc(30 * var(--u)); line-height: 1; letter-spacing: calc(3 * var(--u)); }
.sheet .yardage .plan-pilot .free { font: 700 calc(42 * var(--u)) / 1 'Oswald', var(--label); letter-spacing: calc(8 * var(--u)); }
.sheet .yardage .plan-pilot .pilot-round { grid-column: 1 / -1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: calc(9 * var(--u)); }
.sheet .yardage .plan-pilot .spots { display: flex; align-items: baseline; gap: calc(12 * var(--u)); }
/* the clock's words get their own line so both stay at full size in the narrower cell */
.sheet .yardage .plan-pilot .clock { display: flex; flex-direction: column; align-items: flex-start; gap: calc(6 * var(--u)); }
.sheet .yardage .plan-pilot .clock[hidden] { display: none; }
.sheet .yardage .plan-pilot .spots .num { font-size: calc(40 * var(--u)); line-height: 1; letter-spacing: calc(2 * var(--u)); }
.sheet .yardage .plan-pilot .unit { font-weight: 500; font-size: calc(26.2 * var(--u)); line-height: 1.1; letter-spacing: calc(0.4 * var(--u)); }
.sheet .yardage .plan-pilot .clock b { font: 400 calc(34 * var(--u)) / 1 var(--display); letter-spacing: calc(1.5 * var(--u)); color: var(--red-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet .yardage .or { position: absolute; left: calc(-39 * var(--u)); top: 50%; z-index: 1; display: flex; align-items: center; justify-content: center; width: calc(56 * var(--u)); height: calc(56 * var(--u)); margin-top: calc(-28 * var(--u)); border: calc(2.2 * var(--u)) solid var(--ink); border-radius: 50%; box-sizing: border-box; background: #eddcbf; color: var(--ink); font: 600 calc(22 * var(--u)) / 1 var(--label); font-stretch: 80%; letter-spacing: calc(1.5 * var(--u)); text-transform: uppercase; }

/* One price (2026-10-23): the per-order cell takes the whole row, its icon beside the figure and the words under it. */
.sheet .yardage > .r-price-box-1 { width: calc(894 * var(--u)); display: grid; grid-template-columns: auto auto; grid-template-areas: "icon num" "icon unit"; justify-content: center; align-content: center; align-items: center; column-gap: calc(32 * var(--u)); row-gap: calc(8 * var(--u)); }
.sheet .yardage > .r-price-box-1 [class*="r-"] { position: static; width: auto; height: auto; }
.sheet .yardage > .r-price-box-1 .num { grid-area: num; font-size: calc(116 * var(--u)); line-height: 1; letter-spacing: calc(6 * var(--u)); text-align: left; }
.sheet .yardage > .r-price-box-1 .unit { grid-area: unit; font-size: calc(32 * var(--u)); letter-spacing: calc(1 * var(--u)); text-align: left; }
.sheet .yardage > .r-price-box-1 picture { grid-area: icon; display: block; }
.sheet .yardage > .r-price-box-1 img.plate { width: calc(136 * var(--u)); height: calc(140 * var(--u)); object-fit: contain; }

/* text kept for screen readers only */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.view-live { display: inline-flex; justify-content: flex-end; align-items: center; gap: calc(17 * var(--u)); word-spacing: calc(7 * var(--u)); white-space: nowrap; }
.view-live .arrow { width: calc(30 * var(--u)); height: calc(15 * var(--u)); }

.piece { display: block; }
.piece .num { display: flex; align-items: center; justify-content: center; border: calc(1.6 * var(--u)) solid var(--ink); border-radius: 50%; font: 600 calc(36 * var(--u)) / 1 var(--label); padding-bottom: calc(2 * var(--u)); }
.plan-list p, .unit, .pilots, .fine, .piece .items, .piece .price { color: var(--ink-soft); }
.tag-live, .cut-note { color: var(--ink); }
.piece .who { font-family: var(--label); text-transform: uppercase; white-space: nowrap; }
.piece .items { white-space: nowrap; }
.piece .items[lang="ar"] { direction: rtl; }
.piece .status { display: flex; align-items: center; justify-content: center; border: calc(2.2 * var(--u)) solid #52704e; border-radius: calc(8 * var(--u)); color: var(--green); font: 400 calc(20 * var(--u)) / 1 var(--label); letter-spacing: 0; text-transform: uppercase; white-space: nowrap; }
.piece .status.r-piece-1-status { width: calc(172 * var(--u)); height: calc(48 * var(--u)); margin: 0 0 0 calc(1 * var(--u)); transform: rotate(-1.5deg); }
.piece .status.r-piece-2-status { width: calc(151 * var(--u)); height: calc(44 * var(--u)); margin-left: calc(8 * var(--u)); font-size: calc(22 * var(--u)); letter-spacing: calc(2 * var(--u)); transform: rotate(-1deg); }
.piece .status.new { background: var(--red-chip); border-color: var(--red-chip); color: #fff; }
/* grainlines: the pattern piece's own straight-of-grain arrow, in the clear space right of the status */
.grain { position: absolute; width: calc(14 * var(--u)); height: calc(130 * var(--u)); color: var(--ink); opacity: 0.7; pointer-events: none; }
.r-piece-1 .grain { left: calc(341 * var(--u)); top: calc(236 * var(--u)); }
.r-piece-2 .grain { left: calc(292 * var(--u)); top: calc(258 * var(--u)); }
.cut-note { font-family: var(--label); text-transform: uppercase; white-space: nowrap; }

/* sample marks: the tablets show invented example orders, the tissue shows sample pieces until a real call lands */
.sample { display: inline-flex; align-items: center; height: calc(18 * var(--u)); padding-inline: calc(4 * var(--u)); font: 500 calc(11 * var(--u)) / 1 var(--label); font-stretch: 80%; letter-spacing: calc(1.8 * var(--u)); text-transform: uppercase; opacity: 0.62; }
.screen .bar .sample { margin-inline-start: auto; color: #fff; }
.piece .sample { border: calc(1.2 * var(--u)) solid currentColor; border-radius: calc(3 * var(--u)); padding-inline: calc(6 * var(--u)); opacity: 0.75; }
.piece .sample { position: absolute; left: calc(188 * var(--u)); top: calc(118 * var(--u)); color: var(--ink-soft); }
.piece.live .sample { color: var(--red-ink); opacity: 1; }

/* ---- the instruction sheet: everything below the envelope back ---- */
.sheet2 { container-type: inline-size; background: var(--kraft); }
.sheet2 > * { --u: calc(100cqw / 2688); --dash: calc(2.5 * var(--u)); }
.instruction { margin: 0 calc(24 * var(--u)) calc(64 * var(--u)); padding: calc(56 * var(--u)) calc(80 * var(--u)) calc(72 * var(--u)); border: var(--dash) dashed var(--ink); background: image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / calc(910 * var(--u)) auto repeat; color: var(--ink); font-size: max(calc(27 * var(--u)), 15px); line-height: 1.45; }
.instruction :is(h2, h3, p, dl, dd, dt, ul, ol) { margin: 0; }
.instruction :is(ul, ol) { padding: 0; list-style: none; }
.instruction p, .instruction dd { max-width: 62ch; }
.instruction .sheet-head { display: flex; justify-content: space-between; gap: calc(32 * var(--u)); max-width: none; font-size: max(calc(24 * var(--u)), 13px); letter-spacing: 0.22em; }
.sheet-head .pattern-no { color: var(--ink-soft); }
/* the sheet's number rides on the line of the first title, set right; on phones it moves to the foot */
.instruction :is(.title-row, .leaf-row) { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: calc(16 * var(--u)) calc(48 * var(--u)); }
.foot .foot-sheet { display: none; }
.instruction section { padding-top: calc(72 * var(--u)); }
.section-title { font-size: max(calc(34 * var(--u)), 19px); font-weight: 600; letter-spacing: 0.24em; line-height: 1; }
.instruction .rule { height: calc(9 * var(--u)); margin: calc(14 * var(--u)) 0 calc(36 * var(--u)); }
.instruction .rule.red { margin-top: calc(56 * var(--u)); }
.lead { font-size: max(calc(31 * var(--u)), 17px); font-weight: 300; line-height: 1.4; max-width: 52ch; }
.step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.step-list li { position: relative; padding: calc(8 * var(--u)) calc(40 * var(--u)) 0 calc(96 * var(--u)); }
.step-list li + li { border-left: var(--dash) dashed var(--ink); }
.step-list .num { position: absolute; left: calc(16 * var(--u)); top: 0; display: flex; align-items: center; justify-content: center; width: calc(60 * var(--u)); height: calc(60 * var(--u)); border: calc(2 * var(--u)) solid var(--ink); border-radius: 50%; font: 600 max(calc(30 * var(--u)), 16px) / 1 var(--label); font-stretch: 80%; }
.step-list h3 { font-size: max(calc(24 * var(--u)), 14px); font-weight: 600; letter-spacing: 0.14em; line-height: 1.2; padding-top: calc(14 * var(--u)); white-space: normal; }
.step-list p { margin-top: calc(14 * var(--u)); font-weight: 300; }
/* the homepage's list of the other sheets: each title is the way in */
.contents h3 a { color: inherit; text-decoration: none; border-bottom: max(calc(2 * var(--u)), 1.5px) dashed currentColor; transition: color 160ms ease-out; }
.contents h3 a:hover { color: var(--red); }
/* the margins below carry .instruction so they outrank the sheet's own margin reset */
.instruction .greetings { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: calc(56 * var(--u)); }
.greetings li { padding: 0 calc(40 * var(--u)); }
.greetings li + li { border-left: var(--dash) dashed var(--ink); }
.greetings li:first-child { padding-left: 0; }
.view-mark { display: flex; align-items: baseline; gap: calc(18 * var(--u)); font-family: var(--label); font-stretch: 80%; text-transform: uppercase; }
.view-mark b { font-weight: 600; font-size: max(calc(44 * var(--u)), 22px); line-height: 1; }
.view-mark span { font-weight: 500; font-size: max(calc(24 * var(--u)), 13px); letter-spacing: 0.22em; }
.view-mark span[lang="ar"] { font-family: var(--arabic); font-stretch: 100%; letter-spacing: 0; font-size: max(calc(30 * var(--u)), 16px); text-transform: none; }
.instruction .say { margin-top: calc(16 * var(--u)); font-size: max(calc(29 * var(--u)), 16px); font-weight: 300; }
.instruction .lanes { display: flex; flex-wrap: wrap; align-items: center; row-gap: calc(16 * var(--u)); margin: calc(48 * var(--u)) 0 calc(44 * var(--u)); font-family: var(--label); font-stretch: 80%; font-weight: 600; font-size: max(calc(24 * var(--u)), 13px); letter-spacing: 0.2em; }
.lanes li { display: flex; align-items: center; }
.lanes .arrow { width: calc(64 * var(--u)); height: calc(22 * var(--u)); margin: 0 calc(24 * var(--u)); color: var(--ink-soft); }
.facts, .faq { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: calc(80 * var(--u)); }
.facts > div, .faq > div { padding: calc(22 * var(--u)) 0; border-top: calc(1.5 * var(--u)) dashed var(--ink-soft); }
.facts dt, .faq dt { font-size: max(calc(23 * var(--u)), 13px); font-weight: 600; letter-spacing: 0.16em; }
.facts dd, .faq dd { margin-top: calc(8 * var(--u)); font-weight: 300; }
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(40 * var(--u)); }
.terms > div { padding: calc(28 * var(--u)) calc(32 * var(--u)); border: var(--dash) solid var(--ink); border-radius: calc(10 * var(--u)); }
.terms dt { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.num-display { font: 400 max(calc(60 * var(--u)), 32px) / 1 var(--display); }
.terms dt .label { font-size: max(calc(22 * var(--u)), 12px); font-weight: 500; letter-spacing: 0.2em; }
.terms dd { margin-top: calc(18 * var(--u)); font-weight: 300; }
.instruction .actions { display: flex; flex-wrap: wrap; gap: calc(24 * var(--u)); max-width: none; margin-top: calc(40 * var(--u)); }
/* the world's buttons: the primary is a red cut piece with its stitch line sewn inside; the secondary is the dashed
   cutting line itself */
.btn { position: relative; display: inline-flex; align-items: center; min-height: max(calc(72 * var(--u)), 46px); padding: calc(12 * var(--u)) max(calc(44 * var(--u)), 22px); border: max(var(--dash), 1.5px) dashed var(--ink); border-radius: max(calc(10 * var(--u)), 6px); box-sizing: border-box; color: var(--ink); font: 500 max(calc(25 * var(--u)), 14px) / 1 var(--label); font-stretch: 80%; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; transition: background-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--red-chip); border-style: solid; border-color: var(--red-chip); color: #fff; }
.btn.primary::before { content: ""; position: absolute; inset: max(calc(6 * var(--u)), 4px); border: max(calc(2 * var(--u)), 1.25px) dashed rgba(255, 255, 255, 0.82); border-radius: max(calc(5 * var(--u)), 3px); pointer-events: none; }
.btn.primary:hover { background: var(--red-press); border-color: var(--red-press); }
.btn:active { transform: translateY(calc(2 * var(--u))); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: calc(16 * var(--u)) calc(40 * var(--u)); padding-top: calc(28 * var(--u)); font-family: var(--label); font-stretch: 80%; font-weight: 500; font-size: max(calc(22 * var(--u)), 12px); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.foot a { color: inherit; text-decoration: none; border-bottom: calc(1.5 * var(--u)) dashed currentColor; }
.foot a:hover { color: var(--red); }
html { scrollbar-color: var(--ink-soft) var(--kraft); }

/* ---- motion: the pin drop, and the sheet unfolding on scroll; nothing else moves ---- */
.piece { transform-origin: 50% 40%; }
.piece.landing { animation: settle 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes settle {
  0% { transform: translateY(calc(-16 * var(--u))) rotate(-2.2deg) scale(1.03); filter: drop-shadow(0 calc(16 * var(--u)) calc(14 * var(--u)) rgba(42, 41, 37, 0.38)); }
  100% { transform: none; filter: drop-shadow(0 0 0 rgba(42, 41, 37, 0)); }
}
.pin { position: absolute; left: calc(64 * var(--u)); top: calc(36 * var(--u)); width: calc(15 * var(--u)); height: calc(15 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0705c, var(--red) 60%, #8f2f24); box-shadow: 0 calc(2 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.35); pointer-events: none; }
.pin::after { content: ""; position: absolute; left: 48%; top: 85%; width: calc(1.8 * var(--u)); height: calc(24 * var(--u)); background: linear-gradient(#9a9a94, #4a4a46); transform: rotate(16deg); transform-origin: 50% 0; }
.piece.landing .pin { animation: pindrop 620ms 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes pindrop { 0% { transform: translateY(calc(-70 * var(--u))) scale(1.5); opacity: 0; } 45% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.instruction { transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1), opacity 700ms ease-out; transform-origin: 50% 0; }
.instruction.will-unfold { transform: perspective(2200px) rotateX(-7deg); opacity: 0.55; }
.tag { transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.tag:hover { transform: translateY(calc(-5 * var(--u))) rotate(-1deg); }
.nav a, .view-live { transition: color 160ms ease-out; }
.nav a:hover, .view-live:hover, .wordmark:hover { color: var(--red); }
.view-live .arrow { transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
.view-live:hover .arrow { transform: translateX(calc(5 * var(--u))); }
@media (prefers-reduced-motion: reduce) {
  .piece.landing, .piece.landing .pin { animation: none; }
  .instruction, .instruction.will-unfold { transition: none; transform: none; opacity: 1; }
  .tag, .tag:hover { transition: none; transform: none; }
  .btn, .btn:active { transition: none; transform: none; }
}

/* ---- phones and small tablets: the envelope unfolds into one column. Each plate keeps its own measured layout by
   re-basing --u on the plate's own width. Rules here carry .sheet so they outrank the generated comp layout. ---- */
@media (max-width: 900px) {
  .sheet { aspect-ratio: auto; display: flex; flex-direction: column; overflow: clip; }
  .sheet > * { --u: 0.4px; }
  .sheet .ground, .sheet .r-front-border, .sheet .r-back-border, .sheet .r-divider-1, .sheet .r-divider-2, .sheet .r-red-foot, .sheet .r-header-rule, .sheet .r-view-rule-a, .sheet .r-view-rule-b, .sheet .r-view-rule-c, .sheet .r-pricing-rule-2, .sheet img.r-sparkle-left, .sheet img.r-sparkle-right, .sheet img.r-scissors, .sheet img.r-live-note, .sheet img.r-laurel-left, .sheet img.r-laurel-right, .sheet .r-cut-note { display: none; }
  .sheet .front, .sheet .back, .sheet .plan, .sheet .pricing, .sheet .recent, .sheet .views, .sheet .view, .sheet .plan-list, .sheet .plan-list li, .sheet .yardage, .sheet .pieces { position: relative; }
  .sheet .front > [class*="r-"], .sheet .plan > [class*="r-"], .sheet .pricing > [class*="r-"], .sheet .recent > [class*="r-"], .sheet .view > [class*="r-"], .sheet .plan-list [class*="r-"], .sheet .r-fold-crease { position: static; width: auto; height: auto; left: auto; top: auto; }
  .sheet .front > a.tag, .sheet .view > figure.tablet, .sheet .yardage > li.cell, .sheet .pieces > li.piece { position: relative; left: auto; top: auto; height: auto; }

  /* front: the masthead, then the headline with the tag hung beside it, then the three views one under another */
  .sheet .front { display: grid; grid-template-columns: minmax(0, 1fr) 96px; grid-template-areas: "mark mark" "tl1 tl1" "tl2 tl2" "head tag" "views views"; column-gap: 14px; padding: 18px 16px 32px; background: image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / 420px auto repeat; }
  .sheet .front > .nav { grid-area: nav; justify-content: space-between; margin-bottom: 18px; font-size: 0.72rem; letter-spacing: 0.1em; }
  .nav a { gap: 8px; }
  .nav a + a { border-left-width: 1.5px; padding-left: 12px; margin-left: 12px; line-height: 1.6; }
  .arrow { width: 24px; height: 12px; }
  .sheet .front > .wordmark { grid-area: mark; font-size: clamp(2.5rem, 13vw, 3.6rem); line-height: 1; letter-spacing: 0; }
  .sheet .front > .tagline-1 { grid-area: tl1; margin-top: 8px; font-size: 0.74rem; line-height: 1.3; letter-spacing: 0.26em; white-space: normal; }
  .sheet .front > .tagline-2 { grid-area: tl2; margin-top: 2px; padding-bottom: 14px; border-bottom: 2px dashed var(--ink); font: italic 300 1rem / 1.3 var(--sans); font-stretch: 88%; letter-spacing: 0; text-align: left; }
  .sheet .front > .headline { grid-area: head; align-self: start; margin-top: 18px; font-size: clamp(1.5rem, 7.2vw, 2.3rem); line-height: 1.05; letter-spacing: 0.01em; white-space: normal; text-wrap: balance; -webkit-text-stroke-width: 0.5px; }
  .sheet .front > .headline br { display: none; }
  .sheet .front > a.tag { grid-area: tag; align-self: start; width: 96px; aspect-ratio: 364 / 630; margin-top: 12px; container-type: inline-size; }
  .tag > .tilt > * { --u: calc(100cqw / 364); }
  .sheet .front > a.tag .tag-call { color: var(--red-ink); }
  .sheet .front > .views { grid-area: views; display: grid; gap: 28px; margin-top: 30px; }
  .sheet .view-label { display: flex; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 12px; height: auto; margin: 0 0 14px; padding: 0 0 10px; border-bottom: 2px dashed var(--ink); font-size: 1rem; }
  .sheet .view-label b { font-size: 1.6rem; }
  .sheet .view-label span { margin: 0; font-size: 0.78rem; letter-spacing: 0.22em; }
  .sheet .view-label span[lang="ar"] { margin: 0; font-size: 1.05rem; letter-spacing: 0; }
  .sheet .view > figure.tablet { width: min(100%, 330px); margin: 0 auto; aspect-ratio: 460 / 432; container-type: inline-size; }
  .sheet .view > figure.r-tablet-b { aspect-ratio: 452 / 432; }
  .tablet > * { --u: calc(100cqw / 460); }
  .tablet.r-tablet-b > * { --u: calc(100cqw / 452); }

  /* back */
  .sheet .r-fold-crease { display: block; width: 100%; height: 22px; object-fit: cover; }
  .sheet .back { display: flex; flex-direction: column; gap: 32px; padding: 30px 16px 36px; background: linear-gradient(rgba(214, 184, 140, 0.14), rgba(214, 184, 140, 0.14)), image-set(url(plates/envelope-paper.webp) type("image/webp"), url(plates/envelope-paper.png) type("image/png")) 0 0 / 420px auto repeat; background-blend-mode: multiply; }
  .sheet .label { font-size: 0.82rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.24em; white-space: normal; }
  .sheet .rule { height: 8px; margin: 8px 0 16px; }
  .sheet .plan-list { display: grid; gap: 18px; }
  .sheet .plan-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; }
  .sheet .plan-list img.plate { width: 44px; height: 46px; object-fit: contain; }
  .sheet .plan-list p { font: 300 1rem / 1.35 var(--sans); font-stretch: 93%; letter-spacing: 0; white-space: normal; }
  .sheet .plan-list p br { display: none; }
  .sheet .yardage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .sheet .yardage > li.cell { width: auto; aspect-ratio: 228 / 285; container-type: inline-size; }
  .cell > * { --u: calc(100cqw / 228); }
  /* the two plans side by side with the circle on their seam; the pilot round takes the whole line under them */
  .sheet .yardage > li.plan-month { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 10px; padding: 0 12px; }
  .sheet .yardage .plan-month img.plate { display: none; }
  .sheet .yardage .plan-month .stitch { margin: calc(22 * var(--u)) 0; }
  .sheet .yardage > li.plan-pilot { grid-column: 1 / -1; aspect-ratio: auto; grid-template-columns: auto auto; grid-template-rows: auto auto auto; column-gap: 14px; justify-content: center; align-content: start; padding: 18px 16px 20px; }
  /* the cell is the whole line wide; this --u equals the half-width cells' own, so all three print at one scale */
  .sheet .yardage > li.plan-pilot > * { --u: calc((100cqw - 12px) / 456); }
  .sheet .yardage > li.r-price-box-1 { grid-column: 1 / -1; aspect-ratio: auto; padding: 22px 16px; }
  .sheet .yardage > li.r-price-box-1 > * { --u: calc((100cqw - 12px) / 456); }
  .sheet .yardage > li.r-price-box-1 .num { font-size: calc(84 * var(--u)); letter-spacing: calc(4 * var(--u)); }
  .sheet .yardage > li.r-price-box-1 .unit { font-size: calc(26.2 * var(--u)); letter-spacing: 0; }
  .sheet .yardage > li.r-price-box-1 img.plate { width: calc(104 * var(--u)); height: calc(108 * var(--u)); }
  .sheet .yardage .or { left: -25px; width: 38px; height: 38px; margin-top: -19px; border-width: 1.5px; font-size: 14px; letter-spacing: 1px; }
  .sheet .fine { margin-top: 16px; font: italic 250 0.95rem / 1.4 var(--sans); font-stretch: 90%; letter-spacing: 0; white-space: normal; }
  .sheet .real { margin: 30px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); font-size: 0.82rem; letter-spacing: 0.22em; text-align: center; }
  .sheet .recent { margin: 0 -16px; padding: 22px 16px 28px; background: image-set(url(plates/tissue-paper.webp) type("image/webp"), url(plates/tissue-paper.png) type("image/png")) center / cover; }
  .sheet .recent h2 { display: inline; }
  .sheet .view-live { float: right; gap: 8px; font: 300 0.95rem / 1 var(--sans); font-stretch: 88%; letter-spacing: 0; word-spacing: 0; }
  .view-live .arrow { width: 22px; height: 11px; }
  .sheet .pieces { display: grid; gap: 18px; margin-top: 12px; }
  .sheet .pieces > li.piece { width: min(100%, 360px); aspect-ratio: 420 / 452; margin: 0 auto; container-type: inline-size; }
  .sheet .pieces > li.piece.live { aspect-ratio: 388 / 452; }
  .piece > * { --u: calc(100cqw / 420); }
  .piece.live > * { --u: calc(100cqw / 388); }
  .piece .sample { left: calc(190 * var(--u)); }

  /* the instruction sheet */
  .sheet2 > * { --u: 0.45px; }
  .instruction { margin: 16px 10px 32px; padding: 26px 18px 34px; font-size: 1rem; }
  .instruction .sheet-head { flex-direction: column; gap: 4px; font-size: 0.72rem; }
  .instruction :is(.title-row, .leaf-row) .sheet-head { display: none; }
  .foot .foot-sheet { display: block; }
  .instruction section { padding-top: 40px; }
  .section-title { font-size: 1.3rem; letter-spacing: 0.2em; line-height: 1.15; white-space: normal; }
  .instruction .rule { margin: 10px 0 20px; }
  .lead { font-size: 1.1rem; }
  .step-list, .instruction .greetings, .facts, .faq, .terms { grid-template-columns: 1fr; }
  .step-list li { padding: 0 0 0 58px; min-height: 48px; }
  .step-list li + li { border-left: 0; margin-top: 22px; }
  .step-list .num { left: 0; width: 44px; height: 44px; font-size: 1.2rem; }
  .step-list h3 { padding-top: 10px; font-size: 0.9rem; white-space: normal; }
  .step-list p { margin-top: 8px; }
  .instruction .greetings { margin-top: 24px; gap: 18px; }
  .greetings li, .greetings li + li { padding: 0; border-left: 0; }
  .view-mark b { font-size: 1.5rem; }
  .instruction .say { margin-top: 6px; font-size: 1.05rem; }
  .instruction .lanes { margin: 24px 0; font-size: 0.78rem; }
  .lanes .arrow { width: 30px; height: 12px; margin: 0 10px; }
  .facts > div, .faq > div { padding: 14px 0; }
  .facts dt, .faq dt { white-space: normal; }
  .terms { gap: 14px; }
  .terms > div { padding: 18px 16px; }
  .num-display { font-size: 2.2rem; }
  .instruction .actions { margin-top: 22px; gap: 12px; }
  .btn { min-height: 48px; padding: 10px 20px; font-size: 0.9rem; }
  .foot { flex-direction: column; gap: 10px; padding-top: 20px; font-size: 0.72rem; }
}
