/* ==========================================================================
   noteflow.study/wallpapers

   Design v2, "paper with weight" (DESIGN.md). Its own tokens, light and
   dark, as css/flashcards.css has, so it does not lean on css/styles.css
   while that is redesigned. Values are DESIGN.md section 2's, Paper only.

   The pictures are the colour on this page. Everything round them is desk,
   sheet and ink: one swipe (the headline), one ink key (Reserve), and
   nothing that moves.
   ========================================================================== */

@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans"); font-weight: 400 500; size-adjust: 101.9%; ascent-override: 95.2%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"); font-weight: 600 700; size-adjust: 97.1%; ascent-override: 99.9%; descent-override: 25.7%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Serif Fallback"; src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT"), local("Times Italic"), local("Liberation Serif Italic"); font-style: italic; size-adjust: 87.8%; ascent-override: 112.8%; descent-override: 35.3%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --paper: #F3F1EC; --sheet: #FFFEFB; --wash: #F4F2EC; --wash-2: #EDEAE3; --rail-on: #EAE7E0;
  --ink: #161615; --ink-2: #55534D; --ink-3: #67645D; --ink-4: #A9A59C; --on-ink: #FBFAF7;
  --rule: #ECE9E2; --rule-2: #DEDAD1; --rule-ink: #161615;
  --shade: 22 22 21; --shade-k: 1; --key-edge: #000000;
  --violet: #4F2A7F; --hl: #D6C2FF; --hl-ink: #161615; --hl-blend: multiply;
  --danger: #B23A30;
  --hover: color-mix(in srgb, var(--ink) 5%, transparent);

  --sans: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Instrument Serif Fallback", "Iowan Old Style", Georgia, serif;

  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px;
  --t-fast: 110ms; --ease: cubic-bezier(.2, .7, .2, 1);

  --hl-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M6 7.5C40 4.6 82 6.8 121 5.2C151 4 176 5.8 196 4.4L199 11.5L196.8 19L199.6 27.5L195 35.6C160 37.2 121 34.6 81 36.6C51 38 25 35.8 3.2 37.6L0.6 27.4L3 17.6L1 9.2Z' fill-opacity='.84'/%3E%3Cpath d='M6 7.5C40 4.6 82 6.8 121 5.2C151 4 176 5.8 196 4.4L198 15.6C150 16.8 100 14.8 50 16.6C30 17.2 15 16.4 2 16.9L1 9.2Z' fill-opacity='.3'/%3E%3Cpath d='M1.5 26.2C40 25 90 27.4 140 25.6C165 24.8 185 26 198.6 25.4L195 35.6C160 37.2 121 34.6 81 36.6C51 38 25 35.8 3.2 37.6Z' fill-opacity='.32'/%3E%3Cpath d='M6 7.5L13 7.1L11.6 37.3L3.2 37.6L0.6 27.4L3 17.6L1 9.2Z' fill-opacity='.4'/%3E%3Cpath d='M189 4.7L196 4.4L199 11.5L196.8 19L199.6 27.5L195 35.6L188 35.8Z' fill-opacity='.3'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151514; --sheet: #1F1E1C; --wash: #252422; --wash-2: #2C2B29; --rail-on: #2A2927;
    --ink: #EDEBE5; --ink-2: #B5B1A8; --ink-3: #8E8A82; --ink-4: #5F5C56; --on-ink: #191918;
    --rule: #2A2927; --rule-2: #3A3936; --rule-ink: #EDEBE5;
    --shade: 0 0 0; --shade-k: 2.8; --key-edge: #8E8A82;
    --violet: #C2A8F5; --hl: #4A3778; --hl-ink: #F4F0FF; --hl-blend: normal;
    --danger: #E0695F;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151514; --sheet: #1F1E1C; --wash: #252422; --wash-2: #2C2B29; --rail-on: #2A2927;
  --ink: #EDEBE5; --ink-2: #B5B1A8; --ink-3: #8E8A82; --ink-4: #5F5C56; --on-ink: #191918;
  --rule: #2A2927; --rule-2: #3A3936; --rule-ink: #EDEBE5;
  --shade: 0 0 0; --shade-k: 2.8; --key-edge: #8E8A82;
  --violet: #C2A8F5; --hl: #4A3778; --hl-ink: #F4F0FF; --hl-blend: normal;
  --danger: #E0695F;
}

/* ---- base ---------------------------------------------------------------- */
*, *::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: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.wrap {
  width: 100%; max-width: 1180px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---- buttons: one ink key on the page (Reserve); a download is a sheet ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; letter-spacing: -.012em; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-2 { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2), 0 1px 1px rgb(var(--shade) / calc(.04 * var(--shade-k))); }
.btn-2:hover { background: color-mix(in srgb, var(--ink) 5%, var(--sheet)); }
.btn-2:active { background: var(--wash-2); transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn .num { font-weight: 400; color: var(--ink-3); }

/* The ink key: 2px proud on its edge; a press takes it down and closes the
   edge, on the `key` spring's tempo. */
.key {
  --p: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-lg);
  background: var(--ink); color: var(--on-ink); text-decoration: none;
  font-size: 16.5px; font-weight: 600; letter-spacing: -.012em; -webkit-tap-highlight-color: transparent;
  transform: translateY(calc(var(--p) * 2px)) scale(calc(1 - var(--p) * .012));
  box-shadow: 0 calc(2px - var(--p) * 2px) 0 var(--key-edge), 0 calc(8px - var(--p) * 7px) calc(16px - var(--p) * 12px) -8px rgb(var(--shade) / calc(.5 * var(--shade-k)));
  transition: background-color var(--t-fast) var(--ease), transform .18s cubic-bezier(.3, 1.3, .5, 1), box-shadow .18s cubic-bezier(.3, 1.3, .5, 1);
}
.key:hover { background: color-mix(in srgb, var(--ink) 90%, var(--paper)); }
.key:active { --p: 1; }

/* ---- the highlighter swipe (DESIGN.md section 4): drawn once, at pen speed */
@property --rv { syntax: "<number>"; inherits: true; initial-value: 1; }
.hl { position: relative; isolation: isolate; color: var(--hl-ink); white-space: nowrap; --rv: 1; animation: hl-draw .38s cubic-bezier(.5, 0, .2, 1) .12s backwards; }
.hl::before {
  content: ""; position: absolute; z-index: -1;
  left: -.16em; right: -.2em; top: .4em; bottom: .02em;
  background: var(--hl);
  -webkit-mask: var(--hl-mask) 0 0 / 100% 100% no-repeat; mask: var(--hl-mask) 0 0 / 100% 100% no-repeat;
  mix-blend-mode: var(--hl-blend);
  transform: rotate(-1.6deg) skewX(-12deg);
  clip-path: polygon(0 -10%, calc(var(--rv) * 114%) -10%, calc(var(--rv) * 114% - 14%) 110%, 0 110%);
}
@keyframes hl-draw { from { --rv: 0; } to { --rv: 1; } }

/* ---- the top line ---------------------------------------------------------- */
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.lockup { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: -.025em; color: var(--ink); min-height: 44px; }
.lockup svg { width: 26px; height: 26px; color: var(--violet); flex: none; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.top-nav a:hover { background: var(--hover); color: var(--ink); }

/* ---- the hero: the headline, then which screen ----------------------------- */
.hero { display: grid; gap: 22px; padding-top: 16px; padding-bottom: 8px; }
.hero h1 { font-weight: 400; font-size: clamp(40px, 3.6vw + 26px, 70px); line-height: 1.02; letter-spacing: -.02em; }
.hero h1 .l1 { display: block; font-family: var(--sans); font-weight: 600; font-size: .8em; line-height: 1.05; letter-spacing: -.03em; }
.hero h1 .l2 { display: block; font-family: var(--serif); font-style: italic; margin-top: .06em; }
.lede { margin-top: 14px; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }

/* Desktop or phone: a wash track with a sheet thumb under the one chosen. */
.device { display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--wash-2); justify-self: start; }
.device button {
  position: relative; min-height: 38px; padding: 0 16px; border: 0; border-radius: 11px; background: transparent;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.device button::after { content: ""; position: absolute; inset: -4px 0; } /* a 44px target */
.device button:hover { color: var(--ink); }
.device button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); font-weight: 600; cursor: default; box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgb(var(--shade) / calc(.07 * var(--shade-k))); }

/* ---- a collection ------------------------------------------------------------ */
.section { padding-block: 32px; }
.shead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--rule-ink); margin-bottom: 22px; }
.shead h2 { font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -.026em; }
.shead p { font-size: 14.5px; color: var(--ink-3); max-width: 62ch; }

.walls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }

/* A wallpaper: the picture on a sheet, lying on the desk, with its sizes
   under it. The picture's box has the picture's shape before it arrives, so
   nothing moves when it does. */
.wall {
  display: grid; gap: 14px; align-content: start; padding: 10px 10px 16px;
  background: var(--sheet); border-radius: var(--r-xl);
  box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgb(var(--shade) / calc(.07 * var(--shade-k))), 0 1px 2px rgb(var(--shade) / calc(.04 * var(--shade-k)));
}
.wall-pic { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--rail-on); aspect-ratio: var(--ar, 16 / 9); }
.wall-pic img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s var(--ease); }
.wall-pic img.is-in { opacity: 1; }
@supports (corner-shape: squircle) {
  .wall { corner-shape: squircle; border-radius: calc(var(--r-xl) * 1.6); }
  .wall-pic { corner-shape: squircle; border-radius: calc(var(--r-md) * 1.6); }
}
.wall-body { display: grid; gap: 12px; padding-inline: 8px; }
.wall-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.wall-head h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.wall-fits { font-size: 13.5px; color: var(--ink-3); }

.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  position: relative; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px var(--rule-2);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.size::after { content: ""; position: absolute; inset: -4px -3px; } /* a 44px target */
.size:hover { background: var(--hover); color: var(--ink); }
.size[aria-pressed="true"] { background: var(--wash-2); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--ink); cursor: default; }

.wall-get { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.plain { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.plain input {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border-radius: 5px;
  background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--rule-2); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.plain input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.6 9.4 7.8 12.4 13.4 5.8' fill='none' stroke='%23FBFAF7' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: none;
}
:root[data-theme="dark"] .plain input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.6 9.4 7.8 12.4 13.4 5.8' fill='none' stroke='%23191918' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plain input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.6 9.4 7.8 12.4 13.4 5.8' fill='none' stroke='%23191918' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
.plain:hover { color: var(--ink); }

/* Phone pictures stand in a row of narrower sheets. */
[data-device="phone"] .walls { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
[data-device="phone"] .wall { padding: 8px 8px 12px; }
[data-device="phone"] .wall-body { padding-inline: 4px; }
[data-device="phone"] .plain { align-items: flex-start; padding-block: 6px; line-height: 1.35; }
[data-device="phone"] .plain input { margin-top: 1px; }
[data-device="phone"] .wall-get { flex-direction: column; align-items: stretch; }
[data-device="phone"] .wall-get .btn { width: 100%; }

/* Before the list arrives, and when it cannot. */
.wait .wall-pic { aspect-ratio: 16 / 9; }
.wait .bar { height: 14px; border-radius: 7px; background: var(--rail-on); }
.wait .bar.short { width: 38%; }
.wait .bar.long { width: 64%; }
.say { display: grid; gap: 12px; justify-items: start; padding-block: 28px; border-top: 1px solid var(--rule-ink); }
.say p { font-size: 17px; color: var(--ink-2); max-width: 52ch; }

/* ---- what NoteFlow is, and the page's one ink key -------------------------- */
.about { display: grid; gap: 18px; padding: 24px; background: var(--sheet); border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgb(var(--shade) / calc(.05 * var(--shade-k))); }
@supports (corner-shape: squircle) { .about { corner-shape: squircle; border-radius: calc(var(--r-xl) * 1.6); } }
.about h2 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.024em; }
.about p { margin-top: 8px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.about .key { justify-self: start; }

/* ---- questions ----------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding-block: 12px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 500; letter-spacing: -.012em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.faq summary svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.faq details[open] summary .v { display: none; }
.faq details p { padding-bottom: 18px; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 66ch; }
.faq details p + p { margin-top: -8px; }
.faq details b { color: var(--ink); font-weight: 600; }

/* ---- footer ---------------------------------------------------------------------- */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 22px; padding-bottom: max(40px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); margin-top: 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: -10px; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { background: var(--hover); color: var(--ink); }
.site-foot p { font-size: 13.5px; color: var(--ink-3); }

/* ---- wider ------------------------------------------------------------------------ */
@media (min-width: 560px) {
  .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .device { justify-self: end; margin-bottom: 4px; }
  .about { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 28px 32px; gap: 24px 40px; }
  .about .key { justify-self: end; }
  [data-device="phone"] .walls { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
  [data-device="phone"] .wall { padding: 10px 10px 16px; }
  [data-device="phone"] .wall-body { padding-inline: 8px; }
}
@media (min-width: 860px) {
  [data-device="desktop"] .walls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  [data-device="desktop"] .walls[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
  [data-device="phone"] .walls { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
}
@media (min-width: 960px) {
  .wrap { padding-left: 40px; padding-right: 40px; }
  .hero { padding-top: 56px; padding-bottom: 20px; }
  .lede { font-size: 18.5px; margin-top: 20px; }
  .section { padding-block: 40px; }
  .shead h2 { font-size: 26px; }
  .wall { padding: 12px 12px 18px; }
}

/* ---- reduced motion: everything shown at rest -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hl { animation: none; }
  .wall-pic img { transition: none; }
  .key { transition: background-color var(--t-fast) var(--ease); }
}
