/* ScanWow homepage, "Desk Light" preview direction (SP-4), round 4.
   Homepage only: inner pages keep their own styles.
   The layout is v8a's and is the same in every round 4 preview. What changes
   between previews is the hero copy (in index.html) and the palette, chosen
   with data-palette on the html element:
     p1  Warm paper, carbon ink, and the app icon's navy on header controls.
     p2  Crisp white, navy ink, and cyan as the one accent.
     p3  A charcoal header, hero, and footer, with light paper sections between.
     p4  A light page, near-black ink, and one ink red accent.
   Each palette is a set of custom properties. The :root block below holds p1,
   which is also the fallback; the other three override it.
   In every palette the manila folder, the brass clip, and the pencil are desk
   objects, and the receipt is a photograph of a real US restaurant receipt,
   anonymized (receipt-photo.jpg in this folder), cropped in CSS. The file is
   not edited and no receipt is drawn. It is a photograph, not a scan.
   The search word is "tiramisu". Below 900px (phones and upright tablets) the
   App Store badge and the offer lines come before the still life so they sit
   above the fold. */

:root {
  /* Page */
  --paper: #F6F1E8;
  --paper-deep: #ECE5D5;
  --sheet: #FFFDF8;
  --ink: #100E0B;
  --ink-2: #332D25;
  --ink-3: #4A4338;
  --hair: #C2B79F;
  --rule: #100E0B;
  /* The thick bar that opens each section. */
  --bar: #100E0B;
  --folio: #332D25;
  /* The found mark: the word a search has found. */
  --found: #27B7DA;
  --found-ink: #100E0B;
  --found-line: transparent;
  /* Desk objects. They keep their own colors on any ground. */
  --manila: #E9C783;
  --manila-deep: #D8AA50;
  --manila-edge: #8C6718;
  --object-ink: #100E0B;
  --pencil-1: #C8701F;
  --pencil-2: #E88B2E;
  --pencil-3: #D67A22;
  --step-tab: #E9C783;
  --step-ink: #100E0B;
  /* Get the app, and the open state of the menu control. */
  --btn-bg: #0B1A39;
  --btn-ink: #F6F1E8;
  --btn-hover-bg: #F6F1E8;
  --btn-hover-ink: #0B1A39;
  --menu-on-bg: #0B1A39;
  --menu-on-ink: #F6F1E8;
  --menu-bg: #FFFDF8;
  /* Focus ring. The halo is a second ring for palettes that need one. */
  --focus: #100E0B;
  --focus-w: 2px;
  --focus-off: 3px;
  --focus-halo: 0 0 0 0 transparent;
  /* Hero ground and the pool of light on it. */
  --hero-ground: #F1EADB;
  --hero-glow: #FEFBF3;
  /* A light plate behind the App Store badge and a light chip behind the app
     mark, for dark grounds only. Off by default. */
  --plate: transparent;
  --plate-pad: 0px;
  --chip: transparent;
  --chip-pad: 0px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Bitstream Charter", Charter, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --sheet-shadow: 0 1px 2px rgba(27, 25, 21, .10), 6px 10px 24px -12px rgba(27, 25, 21, .30);
}

/* p2: crisp white, navy ink, cyan accent. No manila wash on the page. Cyan is
   used by the found mark, the focus ring, the button hover, and the thick bar
   that opens each section, nowhere else.
   The folder stays manila because it is a drawn object. */
html[data-palette="p2"] {
  --paper: #FFFFFF;
  --paper-deep: #EFF3F9;
  --sheet: #FFFFFF;
  --ink: #0B1A39;
  --ink-2: #27365A;
  --ink-3: #42517A;
  --hair: #C5D0E0;
  --rule: #0B1A39;
  --bar: #19C6E6;
  --folio: #27365A;
  --found: #19C6E6;
  --found-ink: #0B1A39;
  --object-ink: #0B1A39;
  --step-tab: #0B1A39;
  --step-ink: #FFFFFF;
  --btn-bg: #0B1A39;
  --btn-ink: #FFFFFF;
  --btn-hover-bg: #19C6E6;
  --btn-hover-ink: #0B1A39;
  --menu-on-bg: #0B1A39;
  --menu-on-ink: #FFFFFF;
  --menu-bg: #FFFFFF;
  --focus: #19C6E6;
  --focus-w: 3px;
  --focus-off: 2px;
  --focus-halo: 0 0 0 2px #0B1A39;
  --hero-ground: #EDF2F8;
  --hero-glow: #FFFFFF;
  --sheet-shadow: 0 0 0 1px rgba(11, 26, 57, .10), 6px 10px 24px -12px rgba(11, 26, 57, .30);
}

/* p3: charcoal. The page tokens here are the light sections between the
   hero and the footer. The masthead, hero, and footer are dark zones: they
   redefine the same tokens, so every rule inside them follows. The receipt,
   the folder, and the search field are objects and stay light. */
html[data-palette="p3"] {
  --paper: #F4F2ED;
  --paper-deep: #E8E5DE;
  --sheet: #FFFEFA;
  --ink: #17181C;
  --ink-2: #33343A;
  --ink-3: #4A4B52;
  --hair: #C4C1B8;
  --rule: #17181C;
  --bar: #17181C;
  --folio: #33343A;
  --found-ink: #17181C;
  --object-ink: #17181C;
  --step-ink: #17181C;
  --btn-bg: #F4F1EA;
  --btn-ink: #17181C;
  --btn-hover-bg: #17181C;
  --btn-hover-ink: #F4F1EA;
  --menu-on-bg: #F4F1EA;
  --menu-on-ink: #17181C;
  --focus: #17181C;
}
html[data-palette="p3"] .masthead,
html[data-palette="p3"] .hero,
html[data-palette="p3"] .foot {
  --paper: #17181C;
  --paper-deep: #17181C;
  --ink: #FBF8F1;
  --ink-2: #DAD6CC;
  --ink-3: #C2BDB1;
  --hair: #4C4D55;
  --rule: #3B3C43;
  --folio: #DAD6CC;
  --menu-bg: #212227;
  --focus: #FBF8F1;
  --hero-ground: #17181C;
  --hero-glow: #30323A;
  --plate: #F4F1EA;
  --plate-pad: 7px;
  --chip: #F4F1EA;
  --chip-pad: 3px;
}

/* p4: one bold accent, ink red. It is on Get the app, the small labels, the
   found mark, and the pencil that made the mark. No navy and no cyan. The
   open menu control is ink, so the accent stays on one button. */
html[data-palette="p4"] {
  --paper: #FAF8F4;
  --paper-deep: #EFECE5;
  --sheet: #FFFFFF;
  --ink: #131211;
  --ink-2: #33312E;
  --ink-3: #4C4944;
  --hair: #CCC7BD;
  --rule: #131211;
  --bar: #131211;
  --folio: #B4261B;
  --found: #F6B7AB;
  --found-ink: #131211;
  --found-line: #B4261B;
  --object-ink: #131211;
  --pencil-1: #8F1D14;
  --pencil-2: #B4261B;
  --pencil-3: #A12117;
  --step-ink: #131211;
  --btn-bg: #B4261B;
  --btn-ink: #FFFFFF;
  --btn-hover-bg: #131211;
  --btn-hover-ink: #FFFFFF;
  --menu-on-bg: #131211;
  --menu-on-ink: #FFFFFF;
  --menu-bg: #FFFFFF;
  --focus: #131211;
  --hero-ground: #F3F0E9;
  --hero-glow: #FFFDFA;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-off); box-shadow: var(--focus-halo); border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.nb { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Skip link: moved up, not sideways, so it never sits past the left edge. */
.skip {
  position: absolute; left: 12px; top: 8px; z-index: 10;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 600; border-radius: 3px;
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

/* The found mark. The same color marks the word on the receipt photograph:
   see .shot. The line under it is drawn only where a palette sets --found-line. */
mark.found {
  background: var(--found);
  box-shadow: inset 0 -2px 0 var(--found-line);
  color: var(--found-ink);
  padding: .04em .14em;
  margin: 0 -.06em;
  border-radius: 1px;
}

/* ---------- Type ---------- */

.serif, h1, h2, h3 { font-family: var(--serif); font-weight: 400; }

h2 {
  font-size: clamp(31px, 4.1vw, 54px);
  line-height: 1.08;
  letter-spacing: -.005em;
  text-wrap: balance;
}

h3 { font-size: clamp(22px, 2vw, 26px); line-height: 1.2; }

.folio {
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--folio);
}

.standfirst {
  font-family: var(--serif); font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45;
  color: var(--ink-2); max-width: 34em;
}

.caption { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.caption b { color: var(--ink); font-weight: 600; letter-spacing: .04em; }

/* Section opener: a thick rule, a thin rule, then the label. */
.sec-head { border-top: 3px solid var(--bar); }
.sec-head .folio { border-top: 1px solid var(--ink); margin-top: 3px; padding-top: 12px; }
.sec-head h2 { margin-top: clamp(20px, 3vw, 36px); max-width: 18em; }
.sec-head .standfirst { margin-top: 16px; }

section { padding-block: clamp(56px, 8vw, 108px); }

/* ---------- Buttons ---------- */

.btn-ink {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  background: var(--btn-bg); color: var(--btn-ink);
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none;
  border: 1px solid var(--btn-bg); border-radius: 3px;
  white-space: nowrap;
}
.btn-ink:hover { background: var(--btn-hover-bg); color: var(--btn-hover-ink); }

/* The official badge, unchanged. On a dark ground it sits on a light plate. */
.badge { display: inline-block; padding: var(--plate-pad); background: var(--plate); border-radius: calc(8px + var(--plate-pad)); }
.badge img { height: 52px; width: auto; }

/* ---------- Masthead: one compact row at every width ---------- */

.masthead { position: relative; z-index: 6; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--rule); }
.masthead-in { display: flex; align-items: center; gap: 8px; padding-block: 6px; }
.brand {
  margin-right: auto;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; text-decoration: none;
  font-family: var(--serif); font-size: 23px; letter-spacing: .005em; line-height: 1;
}
/* The real app mark, kept small. Its own rounded square is part of the file.
   On a dark ground a light chip is drawn behind it; the file is not changed. */
.brand img {
  flex: none; width: 30px; height: 30px;
  margin: var(--chip-pad); border-radius: 22%;
  background: var(--chip); box-shadow: 0 0 0 var(--chip-pad) var(--chip);
}
.masthead .btn-ink { padding-inline: 14px; }

/* Section links: inline from 800px up, inside a details menu below that. */
.sections { display: none; }
.sections a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; text-decoration: none;
}
.sections a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

.menu summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--ink); border-radius: 3px;
  font-size: 15px; font-weight: 600; line-height: 1.2;
  list-style: none; cursor: pointer; user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-bars { flex: none; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
/* Open or closed, the control keeps the same outline, so Get the app is the
   one filled button in the header. Below 375px the row has no room for the
   word, so the control is the three bars alone and the word stays for screen
   readers. */
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px;
  padding: 4px var(--gutter) 16px;
  background: var(--menu-bg);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  box-shadow: 0 18px 28px -18px rgba(27, 25, 21, .45);
}
.menu-panel a {
  display: flex; align-items: center; min-height: 50px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--serif); font-size: 21px; text-decoration: none;
}
.menu-panel a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

@media (max-width: 349px) {
  .masthead-in { gap: 6px; }
  .brand { font-size: 21px; gap: 7px; }
  .masthead .btn-ink { padding-inline: 10px; font-size: 14px; }
}
/* From 375px up the word Menu shows beside the bars. Up to 429px the row is
   tight, so both buttons give up some side padding and one pixel of type to
   stay on one line. */
@media (min-width: 375px) {
  .menu-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (min-width: 375px) and (max-width: 429px) {
  .masthead-in { gap: 6px; }
  .masthead .btn-ink { padding-inline: 10px; font-size: 14px; }
  .menu summary { gap: 7px; padding-inline: 9px; font-size: 14px; }
}
@media (min-width: 430px) {
  .masthead-in { gap: 10px; }
}
@media (min-width: 800px) {
  .masthead-in { gap: 28px; padding-block: 10px; }
  .brand { font-size: 25px; gap: 10px; }
  .brand img { width: 32px; height: 32px; }
  .masthead .btn-ink { padding-inline: 18px; }
  .sections { display: flex; column-gap: clamp(16px, 2.2vw, 30px); }
  .menu { display: none; }
}

/* ---------- Hero: a paper-desk still life, then the copy ---------- */

/* The desk: a soft pool of lamp light on the hero ground. Both colors come
   from the palette. */
.hero {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 85% 70% at 50% 24%, var(--hero-glow) 0%, transparent 100%),
    var(--hero-ground);
}

.hero-desk { display: grid; justify-content: center; padding: 10px 0 22px; }

/* The still life is one em-sized box: every object in it is placed in em, so
   the whole arrangement scales with this font-size and nothing is cropped.
   The receipt is in normal flow and sets the height. */
.still {
  position: relative;
  font-size: min(3.8vw, 19px);
  width: 24.6em;
  padding: 1.95em 0 1.75em 1.3em;
}

/* Manila folder: a back leaf with the tab, and a front leaf a little shorter. */
.folder {
  position: absolute; left: 0; right: 0; top: 1.5em; bottom: 0;
  background: var(--manila-deep);
  border-radius: .12em .12em .3em .3em;
  box-shadow: 0 1px 1px rgba(27, 25, 21, .18), .5em .8em 1.5em -.7em rgba(27, 25, 21, .40);
  transform: rotate(.8deg);
}
.folder::before {
  content: ""; position: absolute; inset: .38em 0 0 0;
  background: var(--manila);
  border-top: 1px solid var(--manila-edge);
  border-radius: 0 0 .3em .3em;
}
.folder-tab {
  position: absolute; bottom: calc(100% - 1px);
  width: 10em; height: 2.27em; right: 1.7em;
  font-family: var(--mono); font-size: .64em; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #4A3A14;
  display: flex; align-items: center; justify-content: center;
  background: var(--manila-deep);
  border-radius: .4em .4em 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}


/* The receipt photograph is shown as a print: a thin white border around it. */
.receipt {
  position: relative;
  width: 18.9em;
  padding: .45em;
  background: var(--sheet);
  transform: rotate(-1.1deg);
  box-shadow: 0 1px 1px rgba(27, 25, 21, .16), .3em .5em .8em -.1em rgba(27, 25, 21, .30);
}

/* One photograph, cropped in CSS so no second file is needed.
   --z   zoom: photograph width over window width (keep it above 1)
   --fx  fraction of the photograph hidden off the left edge
   --fy  fraction of the photograph hidden off the top edge
   --ar  window width over height
   The photograph is 1288 by 1578, so its height is 789/644 of its width;
   --k is the photograph height over the window height.
   The default window is about 1101 pixels of the file across (40 to 1141)
   and 595 down (649 to 1244). It runs from above the first item line,
   1 Polpette della Nonna, down through the line Total $52.45. Its top edge
   falls between the order time and the first item, and its bottom edge
   between Total and the closing "Grazie!". The left and right edges are on
   paper, inside the wooden table that shows at the corners of the file.
   The paper is already white, so nothing is tinted. The background color is
   only what shows while the file loads. The file itself is not changed. */
.shot {
  --z: 1.17; --fx: .031; --fy: .411; --ar: 1.85;
  --k: calc(var(--z) * var(--ar) * 789 / 644);
  position: relative; overflow: hidden;
  aspect-ratio: var(--ar);
  background-color: #DEDDE0;
  background-image: url("/assets/redesign-desk-light/receipt-photo.jpg");
  background-repeat: no-repeat;
  background-size: calc(var(--z) * 100%) auto;
  background-position:
    calc(var(--fx) * var(--z) / (var(--z) - 1) * 100%)
    calc(var(--fy) * var(--k) / (var(--k) - 1) * 100%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
/* The found mark, laid over the printed word Tiramisu in the line
   1 Tiramisu $12.00. Its box is measured on the photograph in pixels (the
   letters of the word run from 124 to 314 across and 855 to 903 down, and
   the leading 1 ends at 88; the mark adds a small margin: left 112, top 848,
   214 wide, 62 tall), so it stays on the word at every crop and size. The
   slip was photographed close to straight on (the line rises about 3 pixels
   over the length of the word), so the mark is not rotated. Multiply keeps
   the print readable through it, like a highlighter. */
.shot::after {
  content: ""; position: absolute;
  left: calc((112 / 1288 - var(--fx)) * var(--z) * 100%);
  top: calc((848 / 1578 - var(--fy)) * var(--k) * 100%);
  width: calc(214 / 1288 * var(--z) * 100%);
  height: calc(62 / 1578 * var(--k) * 100%);
  background: var(--found);
  box-shadow: inset 0 -2px 0 var(--found-line);
  mix-blend-mode: multiply;
  border-radius: 1px;
}
/* The features figure: a wide strip of the same photograph, the three item
   lines (665 to 934 down), with the Tiramisu line last. */
.shot-strip { --fy: .4215; --ar: 4.1; }

.clip {
  position: absolute; left: 13.6em; top: .5em; width: 1.2em; height: 2.67em;
  transform: rotate(4deg);
  filter: drop-shadow(.06em .1em .06em rgba(27, 25, 21, .35));
}
/* The pencil is sized to the print, which is wider than it is tall: it ends
   above the typed search field and inside the folder. */
.pencil {
  position: absolute; right: 1.75em; top: 2.4em; width: .6em; height: 9em;
  transform: rotate(5deg);
  filter: drop-shadow(.22em .3em .22em rgba(27, 25, 21, .32));
}
/* The three facets of the pencil barrel take the palette's pencil color. */
.pencil .pb1 { fill: var(--pencil-1); }
.pencil .pb2 { fill: var(--pencil-2); }
.pencil .pb3 { fill: var(--pencil-3); }

/* The typed search: the same word the mark on the receipt photograph answers. */
.query {
  position: absolute; right: .9em; bottom: -.55em;
  width: 10.6em; height: 2.5em; padding: 0 .8em;
  display: flex; align-items: center; gap: .55em;
  background: #FFFFFF; color: var(--object-ink);
  border: 1px solid var(--object-ink); border-radius: .4em;
  box-shadow: .2em .3em .7em -.2em rgba(27, 25, 21, .35);
  font-family: var(--sans); font-size: 1em; font-weight: 500; line-height: 1;
}
.query svg { flex: none; width: 1.05em; height: 1.05em; }
.query span { display: inline-flex; align-items: center; gap: .14em; }
.query span::after { content: ""; width: 1.5px; height: 1.2em; background: var(--object-ink); }

.hero-copy {
  padding: 14px var(--gutter) clamp(40px, 6vw, 72px);
}
.hero-copy .folio { margin-bottom: 10px; font-size: min(12.5px, 3.05vw); letter-spacing: .12em; }
/* One sentence, balanced over two lines where the width allows. */
h1 {
  font-size: clamp(31px, 9.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hero-dek {
  margin-top: 20px;
  font-family: var(--serif); font-size: clamp(19px, 2.6vw, 23px); line-height: 1.5;
  color: var(--ink-2); max-width: 30em;
}
.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
/* The short subhead, for phones only. It lives in the badge group so that it
   lands on its own line above the App Store badge. Off by default. When it
   needs two lines, the no-break span in the markup puts the break after the
   comma. */
.hero-dek-short {
  display: none; flex: 0 0 100%;
  font-family: var(--serif); font-size: 19px; line-height: 1.32;
  color: var(--ink-2);
}
.hero-cta .badge img { height: 58px; }
.hero-terms { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); max-width: 26em; }
.hero-terms strong { color: var(--ink); font-weight: 600; }
.hero-terms p + p { margin-top: 2px; }

/* Below 600px the hero is the phone version:
   - The short subhead replaces the full one. Only one of the two is ever on
     screen. The other is display: none, so a screen reader does not hear it
     either. One query flips both, so there is no width, 599px and 600px
     included, where both show or neither does.
   - The typed search field is not shown. On a phone it sat on the bottom
     edge of the first screen and looked cut off. The mark on the word
     Tiramisu carries the idea there. From 600px up the field keeps its place. */
@media (max-width: 599.98px) {
  .hero-dek { display: none; }
  .hero-dek-short { display: block; }
  .query { display: none; }
}

@media (min-width: 600px) {
  .hero-desk { padding: 30px 0 44px; }
  .hero-copy { padding-top: 8px; }
  .hero-copy .folio { margin-bottom: 18px; font-size: 12.5px; letter-spacing: .14em; }
  .hero-cta .badge img { height: 64px; }
}

/* Below 900px (phones and upright tablets) the offer comes before the desk.
   The copy block is dissolved into the hero grid so its parts can be ordered
   around the still life: label, headline, App Store badge and offer lines,
   the still life, then the introduction. (Below 600px the introduction is
   the short subhead above the badge instead, so the still life closes the
   hero there.) Whichever part comes last carries the space above the rule
   that ends the hero. This order puts the badge, the free trial line, the
   search line, and the Pro price on the first screen, at 768 by 1024 as well
   as on a phone. From 900px up the two-column hero below takes over, so
   899px is copy-first and 900px is desktop. Phone-only sizes for these parts
   are in the max-width 599px block near the end of this file. */
@media (max-width: 899.98px) {
  .hero {
    background:
      radial-gradient(ellipse 85% 46% at 50% 58%, var(--hero-glow) 0%, transparent 100%),
      var(--hero-ground);
  }
  .hero-copy { display: contents; }
  .hero-copy > * { margin-inline: var(--gutter); }
  .hero-copy .folio { order: 1; margin-top: 26px; }
  .hero h1 { order: 2; }
  .hero-cta { order: 3; margin-top: 24px; }
  .hero-desk { order: 4; padding: 34px 0 40px; }
  .hero-dek { order: 5; margin-top: 0; margin-bottom: 44px; }
}

@media (min-width: 900px) {
  /* The copy gets the wider column, so the headline can stand up to the desk. */
  .hero {
    grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
    background:
      radial-gradient(ellipse 46% 78% at 22% 40%, var(--hero-glow) 0%, transparent 100%),
      var(--hero-ground);
  }
  .hero-desk { align-content: center; padding: clamp(28px, 3.4vw, 52px) 0 clamp(36px, 4vw, 60px) clamp(8px, 1.6vw, 28px); }
  .still { font-size: clamp(13px, 1.5vw, 24px); }
  .hero-copy {
    align-self: center;
    padding: clamp(32px, 4vw, 64px) var(--gutter) clamp(36px, 4vw, 64px) clamp(20px, 2.6vw, 44px);
  }
  h1 { font-size: clamp(42px, 5.2vw, 92px); line-height: 1.02; }
  .hero-dek { margin-top: clamp(20px, 2vw, 30px); font-size: clamp(19px, 1.7vw, 26px); }
  .hero-cta { margin-top: clamp(26px, 2.6vw, 38px); }
  .hero-cta .badge img { height: clamp(60px, 5vw, 76px); }
  .hero-terms { font-size: clamp(15.5px, 1.2vw, 17.5px); }
  /* The drawn label stays at 12px or more when the still life is small. */
  .folder-tab { font-size: max(12px, .64em); }
}

/* ---------- Made-for strip ---------- */

.strip { padding-block: 0; border-bottom: 1px solid var(--hair); }
.strip-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; padding-block: 18px; }
.strip ul { display: flex; flex-wrap: wrap; gap: 2px 0; }
.strip li { font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--ink); }
.strip li:not(:last-child)::after { content: "/"; font-style: normal; color: var(--ink-3); opacity: .5; margin: 0 12px; }

/* ---------- How it works ---------- */

/* Four steps, each filed under a numbered manila tab. No device is drawn:
   app captures from the iOS simulator will be added when they exist. */
.steps {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px;
  margin-top: clamp(32px, 4vw, 52px);
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 58px; height: 40px;
  background: var(--step-tab);
  border-radius: 9px 9px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  font-family: var(--serif); font-size: 29px; line-height: 1; color: var(--step-ink);
}
.steps li > div { border-top: 2px solid var(--ink); padding-top: 16px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); }

@media (min-width: 640px) {
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 36px; }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
}

/* ---------- Features: set like a magazine feature ---------- */

.features { background: var(--paper); padding-top: 0; }

.lead {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px;
  margin-top: clamp(32px, 4vw, 56px);
}
.lead h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; max-width: 16em; }
.lead-text p { margin-top: 16px; max-width: 36em; }
.lead-text p.dropcap::first-letter {
  font-family: var(--serif); float: left; font-size: 4.05em; line-height: .8;
  padding: .07em .09em 0 0;
}

.fig-found { align-self: start; }
.slips { background: var(--sheet); box-shadow: var(--sheet-shadow); }
.slip { padding: 20px 22px 22px; }
.slip + .slip { border-top: 1px dashed var(--hair); }
.slip-src { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.slip-hand { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.35; }
.fig-found .caption, .col .caption { margin-top: 12px; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(40px, 5vw, 68px); border-top: 1px solid var(--ink); }
.col { padding: 28px 0; border-top: 1px solid var(--hair); }
.col:first-child { border-top: 0; }
.col h3 { margin-bottom: 8px; }
.col p { color: var(--ink-2); }
.col p + p { margin-top: 12px; }
.col .plate { height: 132px; display: flex; align-items: flex-end; margin-bottom: 18px; }

/* Plate: the number 17 */
.plate-num { font-family: var(--serif); font-size: 136px; line-height: .76; letter-spacing: -.03em; color: var(--ink); margin-left: -.03em; }
.plate-num-label { font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink-2); margin: 0 0 1px 10px; max-width: 8.5em; }

/* Plate: three color modes, shown as three paper swatches */
.swatches { display: flex; gap: 12px; width: 100%; }
.swatch { flex: 1 1 0; min-width: 0; }
.swatch-paper { height: 98px; padding: 16px 12px; display: grid; align-content: start; gap: 9px; box-shadow: 0 1px 2px rgba(27, 25, 21, .16); }
.swatch-paper i { display: block; height: 5px; background: currentColor; }
.swatch-paper i:nth-child(1) { width: 62%; height: 8px; }
.swatch-paper i:nth-child(3) { width: 84%; }
.swatch-paper i:nth-child(4) { width: 46%; }
.swatch-color { background: #F1E3C6; color: #4B3524; }
.swatch-gray { background: #DEDEDC; color: #555553; }
.swatch-bw { background: #FFFFFF; color: #000000; }
.swatch-name { display: block; margin-top: 7px; font-size: 14px; line-height: 1.3; color: var(--ink-2); }

/* Plate: several pages, one PDF */
.pages { position: relative; width: 190px; height: 128px; }
.pages span {
  position: absolute; bottom: 0; width: 92px; height: 120px;
  background: var(--sheet); box-shadow: 0 1px 2px rgba(27, 25, 21, .18), 3px 5px 10px -6px rgba(27, 25, 21, .35);
  font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink-3);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px 12px;
}
.pages span:nth-child(1) { left: 0; transform: rotate(-4deg); }
.pages span:nth-child(2) { left: 44px; transform: rotate(1deg); }
.pages span:nth-child(3) { left: 90px; transform: rotate(5deg); color: var(--ink); }
.sizes { margin-top: 14px; display: flex; flex-wrap: wrap; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.sizes li { font-size: 14.5px; padding: 7px 14px 7px 0; margin-right: 14px; border-right: 1px solid var(--hair); color: var(--ink); }
.sizes li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.sizes + p { margin-top: 14px; }

@media (min-width: 860px) {
  .lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
  .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .col { border-top: 0; padding: 32px 30px 8px; border-left: 1px solid var(--hair); }
  .col:first-child { padding-left: 0; border-left: 0; }
  .col:last-child { padding-right: 0; }
}

/* Pull quote: the Siri and Shortcuts phrase */
.pull {
  margin-top: clamp(40px, 5vw, 68px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
}
.pull blockquote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(30px, 5.2vw, 68px); line-height: 1.08; letter-spacing: -.005em;
  text-wrap: balance;
}
.pull .caption { font-size: 15px; color: var(--ink-2); max-width: 32em; }

.lower { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: clamp(40px, 5vw, 68px); }
.sidebar { background: var(--paper-deep); border-top: 3px solid var(--bar); padding: 24px clamp(20px, 3vw, 32px) 28px; }
.sidebar .folio { margin-bottom: 10px; }
.sidebar > p { margin-top: 12px; color: var(--ink-2); max-width: 34em; }
.sent { margin-top: 20px; border-top: 1px solid var(--ink); }
.sent div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.sent dt { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.sent dd { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; align-content: start; }
.note { border-top: 1px solid var(--ink); padding-top: 18px; }
.note h3 { margin-bottom: 8px; }
.note p { color: var(--ink-2); }
.note p + p { margin-top: 10px; }
.note:last-child { grid-column: 1 / -1; }
.colophon { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); }

.more { margin-top: clamp(32px, 4vw, 48px); font-size: 16px; color: var(--ink-2); max-width: 44em; }

@media (min-width: 620px) {
  .notes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
}
@media (min-width: 1000px) {
  .lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}

/* ---------- Pricing: a price list on a sheet of paper ---------- */

.pricing { padding-top: 0; }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 52px; margin-top: clamp(32px, 4vw, 52px); isolation: isolate; }
.price-notes p { color: var(--ink-2); max-width: 34em; }
.price-notes p + p { margin-top: 16px; }
.price-notes strong { color: var(--ink); font-weight: 600; }

.ledger { position: relative; background: var(--sheet); box-shadow: var(--sheet-shadow); padding: clamp(22px, 3.4vw, 40px); align-self: start; }
/* The same manila folder as the hero, lying under the price list. Both pieces
   stay inside the page gutter at every width. */
.ledger::before {
  content: ""; position: absolute; z-index: -1; inset: -8px -8px -12px -8px;
  background: var(--manila); border-radius: 2px 2px 5px 5px;
  box-shadow: 0 1px 1px rgba(27, 25, 21, .18), 8px 12px 24px -14px rgba(27, 25, 21, .40);
  transform: rotate(.4deg);
}
.ledger::after {
  content: ""; position: absolute; z-index: -1; right: 9%; top: -30px; width: 132px; height: 26px;
  background: var(--manila-deep); border-radius: 8px 8px 0 0;
  transform: rotate(.4deg);
}
.ledger-title { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.ledger-row { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.ledger-row dt { flex: 0 1 auto; min-width: 0; max-width: 72%; }
.ledger-row dt b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.25; color: var(--ink); }
.ledger-row dt small { display: block; margin-top: 3px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
/* The dotted leader is drawn by the price cell, so the list stays plain dt and dd. */
.ledger-row dd {
  flex: 1 1 auto; display: flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.ledger-row dd::before { content: ""; flex: 1 1 16px; min-width: 16px; border-bottom: 2px dotted var(--ink-3); transform: translateY(-4px); opacity: .6; }
.ledger-foot { margin-top: 14px; }

@media (min-width: 1000px) {
  .price-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .ledger::before { inset: -12px -12px -16px -12px; transform: rotate(.7deg); }
  .ledger::after { top: -36px; height: 28px; transform: rotate(.7deg); }
}

/* ---------- FAQ ---------- */

.faq { padding-top: 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: clamp(32px, 4vw, 52px); }
.faq-aside p { color: var(--ink-2); max-width: 24em; }
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--hair); }
.faq-list summary {
  display: block; position: relative; cursor: pointer;
  padding: 18px 44px 18px 0; min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { font-size: clamp(20px, 1.9vw, 24px); }
.faq-list summary:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* Plus sign that becomes a minus when open. Drawn with two ink bars. */
.faq-list .sign { position: absolute; right: 0; top: 50%; margin-top: -8px; width: 16px; height: 16px; }
.faq-list .sign::before, .faq-list .sign::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: var(--ink); }
.faq-list .sign::after { transform: rotate(90deg); }
.faq-list details[open] .sign::after { transform: none; }
.faq-list .answer { padding: 0 36px 22px 0; color: var(--ink-2); max-width: 44em; }
.faq-list .answer p + p { margin-top: 12px; }

@media (min-width: 1000px) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
}

/* ---------- Closing ---------- */

.closing { padding-top: 0; }
.closing-in {
  border-top: 3px solid var(--bar);
  padding-top: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: end;
}
.closing h2 { font-size: clamp(44px, 8vw, 104px); line-height: .98; letter-spacing: -.012em; }
.closing .standfirst { margin-top: 18px; }
.closing-get { display: grid; gap: 14px; justify-items: start; }
.closing-get p { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 26em; }

@media (min-width: 860px) {
  .closing-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
}

/* ---------- Footer ---------- */

.foot { background: var(--paper-deep); color: var(--ink); border-top: 1px solid var(--rule); padding-block: clamp(40px, 6vw, 64px) 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 24px; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand .brand { font-size: 24px; }
.foot-brand p { margin-top: 6px; font-size: 15px; color: var(--ink-2); max-width: 22em; }
.foot h3 { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.foot li a { display: inline-block; padding: 6px 0; font-size: 15px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
.foot li a:hover { color: var(--ink); text-decoration: underline; }
.foot-uses { grid-column: 1 / -1; }
.foot-uses ul { columns: 2; column-gap: 24px; }
.foot-uses li { break-inside: avoid; }
/* Resources and Legal: two cells on a phone, one stacked column from 700px up. */
.foot-stack { display: contents; }
.foot-base {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  font-size: 14px; color: var(--ink-2);
}

@media (min-width: 700px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-stack { display: grid; gap: 30px; align-content: start; }
}
@media (min-width: 1000px) {
  .foot-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 4fr); gap: 32px; }
  .foot-brand, .foot-uses { grid-column: auto; }
}

/* ---------- Round 3: a shorter phone page ---------- */

/* Below 600px only. The cuts are spacing, illustration height, and type that
   was oversized for a phone. No section, sentence, or link is removed. */
@media (max-width: 599px) {
  body { font-size: 16px; line-height: 1.56; }
  section { padding-block: 40px; }
  .sec-head h2 { margin-top: 16px; }
  .sec-head .standfirst { margin-top: 12px; }
  .standfirst { font-size: 18px; line-height: 1.42; }

  /* Hero, v8a: the offer comes before the desk. The order itself is set in
     the max-width 899.98px block beside the hero rules; these are the phone
     sizes for the same parts. */
  .hero-copy .folio { margin-top: 14px; margin-bottom: 8px; font-size: clamp(12px, 3.05vw, 12.5px); letter-spacing: .1em; }
  .hero-cta { margin-top: 14px; gap: 10px; }
  .hero-cta .badge img { height: 54px; }
  .hero-terms { font-size: 15px; line-height: 1.45; max-width: none; }
  /* The still life closes the hero on a phone. The extra room underneath is
     for the folder's shadow, so the gap to the rule reads the same as the gap
     above the folder tab. */
  .hero-desk { padding: 22px 0 30px; }
  /* Drawn labels kept at 12px or more on a 375px screen. */
  .folder-tab { font-size: max(12px, .85em); width: 7.5em; height: 1.7em; right: 1.28em; }

  .strip-in { padding-block: 14px; }

  /* Steps: the heading sits beside its numbered tab, on the same rule. */
  .steps { gap: 22px; margin-top: 26px; }
  .steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; align-items: end; }
  .steps li::before { width: 52px; height: 36px; font-size: 26px; }
  .steps li > div { display: contents; }
  .steps h3 { margin-bottom: 0; padding-bottom: 5px; }
  .steps p { grid-column: 1 / -1; border-top: 2px solid var(--ink); padding-top: 10px; }

  /* Features: shorter plates and closer blocks. */
  .lead { gap: 24px; margin-top: 26px; }
  .lead-text p { margin-top: 12px; }
  .slip { padding: 14px 18px 16px; }
  .slip-src { margin-bottom: 6px; }
  .columns { margin-top: 30px; }
  .col { padding: 20px 0; }
  .col .plate { height: auto; margin-bottom: 12px; }
  .col p + p { margin-top: 10px; }
  .plate-num { font-size: 88px; }
  .plate-num-label { font-size: 14.5px; }
  .swatches { gap: 10px; }
  .swatch-paper { height: 58px; padding: 10px; gap: 6px; }
  .swatch-paper i { height: 4px; }
  .swatch-paper i:nth-child(1) { height: 6px; }
  .swatch-name { margin-top: 5px; }
  .pages { width: 150px; height: 82px; }
  .pages span { width: 60px; height: 78px; padding: 7px 9px; font-size: 22px; }
  .pages span:nth-child(2) { left: 30px; }
  .pages span:nth-child(3) { left: 62px; }
  .sizes { margin-top: 10px; }
  .sizes + p { margin-top: 10px; }
  .pull { margin-top: 30px; padding: 22px 0; gap: 10px; }
  .lower { margin-top: 30px; gap: 28px; }
  .sidebar { padding: 18px 18px 20px; }
  .sidebar .folio { margin-bottom: 8px; }
  .sidebar > p { margin-top: 10px; }
  .sent { margin-top: 14px; }
  .sent div { padding: 9px 0; column-gap: 14px; }
  .notes { gap: 20px; }
  .note { padding-top: 14px; }
  .note h3 { margin-bottom: 6px; }
  .note p + p { margin-top: 8px; }
  .more { margin-top: 24px; }

  /* Pricing. The gap still leaves room for the folder tab above the list. */
  .price-grid { gap: 44px; margin-top: 24px; }
  .price-notes p + p { margin-top: 12px; }
  .ledger { padding: 18px; }
  .ledger-title { padding-bottom: 10px; }
  .ledger-row { padding: 10px 0; }
  .ledger-row dt small { margin-top: 2px; font-size: 14.5px; line-height: 1.4; }
  .ledger-foot { margin-top: 12px; }

  .faq-grid { gap: 20px; margin-top: 24px; }
  .faq-list summary { padding-block: 14px; }
  .faq-list .answer { padding-bottom: 18px; }
  .faq-list .answer p + p { margin-top: 10px; }

  .closing-in { padding-top: 30px; gap: 22px; }
  .closing .standfirst { margin-top: 14px; }

  .foot { padding-block: 32px 24px; }
  .foot-grid { gap: 28px 24px; }
  .foot-base { margin-top: 28px; padding-top: 16px; }
}

/* Short phone screens (iPhone SE, 375 by 667): the offer already sits above
   the fold. The print keeps its default window, the item lines through the
   total, which is short enough that the found word, Tiramisu, is also on the
   first screen. The photograph in it is not made smaller. */
@media (max-width: 599px) and (max-height: 700px) {
  .hero-copy .folio { margin-top: 10px; margin-bottom: 6px; }
  .hero-cta { margin-top: 10px; gap: 8px; }
  .hero-dek-short { font-size: 18px; }
  .hero-cta .badge img { height: 50px; }
  .hero-desk { padding: 16px 0 22px; }
  .still { padding-bottom: 1.4em; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn-ink { transition: background-color .15s, color .15s; }
  .faq-list .sign::after { transition: transform .15s; }
}

@media print {
  .masthead .btn-ink, .menu, .skip { display: none; }
}
