/* StudyNest website. Garden notebook: warm paper, forest ink, one serif voice. */

/* Fonts, served from this site (not Google) so visitors' addresses aren't sent anywhere.
   Latin and Latin Extended only (covers Maltese). Licences: assets/fonts/OFL-*.txt */
/* Atkinson Hyperlegible Next, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-italic-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible Next, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-italic-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;
}
/* Atkinson Hyperlegible Next, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible Next, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-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;
}
/* Atkinson Hyperlegible Next, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible Next, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-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;
}
/* Atkinson Hyperlegible Next, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible Next, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/atkinson-hyperlegible-next-normal-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;
}
/* Newsreader, latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader, latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-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;
}
/* Newsreader, latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader, latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic-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;
}
/* Newsreader, latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader, latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-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;
}
/* Newsreader, latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Newsreader, latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-normal-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 {
  color-scheme: light;
  --paper: #f3eee2;
  --paper-deep: #ebe3d1;
  --paper-light: #f9f6ee;
  --ink: #1d3327;
  --ink-soft: #4a5a4f;
  --ink-faint: #5d685f;
  --rule: #d8ceb8;
  --leaf: #2f6b45;
  --leaf-deep: #23543a;
  --marker: #efd98a;
  --late: #b3442d;
  --shade: 29, 51, 39;
  --ribbon: #e8743b;
  --ribbon-light: #f6a26b;
  --ribbon-edge: #b9501c;
  --ribbon-fold: #873610;
  /* Course colours from the app */
  --psy: #2a78d6;
  --eco: #eb6834;
  --chm: #1baf7a;
  --his: #6250d6;

  --serif: "Newsreader", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Avenir Next", "Segoe UI Historic", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Dark: the Mac's setting unless the visitor picked one with the button (theme.js sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141b16;
    --paper-deep: #222c25;
    --paper-light: #1b241e;
    --ink: #ece6d6;
    --ink-soft: #c2c7bb;
    --ink-faint: #a0a99d;
    --rule: #34403a;
    --leaf: #7cc296;
    --leaf-deep: #a3d8b5;
    --marker: #6b5a1f;
    --late: #f08a6c;
    --shade: 0, 0, 0;
    --ribbon: #d9672f;
    --ribbon-light: #ec8f55;
    --ribbon-edge: #a3461a;
    --ribbon-fold: #6e2c0d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141b16;
  --paper-deep: #222c25;
  --paper-light: #1b241e;
  --ink: #ece6d6;
  --ink-soft: #c2c7bb;
  --ink-faint: #a0a99d;
  --rule: #34403a;
  --leaf: #7cc296;
  --leaf-deep: #a3d8b5;
  --marker: #6b5a1f;
  --late: #f08a6c;
  --shade: 0, 0, 0;
  --ribbon: #d9672f;
  --ribbon-light: #ec8f55;
  --ribbon-edge: #a3461a;
  --ribbon-fold: #6e2c0d;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(18px, 1.1vw + 13px, 20px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--leaf-deep); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 20;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.9rem); line-height: 1.02; letter-spacing: -.02em; font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.015em; font-variation-settings: "opsz" 60; }
h3 { font-size: clamp(1.45rem, 2vw, 1.85rem); line-height: 1.15; letter-spacing: -.01em; font-variation-settings: "opsz" 36; }
p { margin: 0; }
q { quotes: "“" "”"; font-style: italic; }
kbd {
  font-family: var(--sans); font-size: .82em; font-weight: 500;
  padding: .05em .45em; margin: 0 .08em;
  border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 5px;
  background: var(--paper-light);
}

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.masthead nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); }
.masthead nav a { color: var(--ink-soft); text-decoration: none; font-size: 1rem; }
.masthead nav a:hover { color: var(--ink); }
.masthead nav .masthead-download { color: var(--leaf); font-weight: 700; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: -6px;
  border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.theme-toggle .icon-sun { display: none; }
.is-dark .theme-toggle .icon-sun { display: block; }
.is-dark .theme-toggle .icon-moon { display: none; }

/* The logo has a light and a dark drawing. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (max-width: 560px) { .masthead nav a:not(.masthead-download) { display: none; } }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: baseline; gap: 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem;
  padding: 15px 26px 14px; border-radius: 999px;
  text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.button:hover { background: var(--leaf-deep); color: var(--paper); }
.button:active { transform: translateY(1px); }
.button-large { font-size: 1.15rem; padding: 19px 32px 18px; }
.button-meta { font-weight: 400; font-size: .92rem; opacity: .72; white-space: nowrap; }
.fine { color: var(--ink-faint); font-size: .94rem; }
.link-button {
  border: 0; background: none; padding: 0; font: inherit; color: var(--leaf);
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}

/* ---------- Beta sign-up ---------- */
.signup { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.signup[hidden] { display: none; }
.signup { position: relative; }
.signup input[type="email"] {
  flex: 1 1 15em; min-width: 0; max-width: 22em;
  font: inherit; font-size: 1.02rem; color: var(--ink);
  padding: 13px 18px; border-radius: 999px;
  background: var(--paper-light); border: 1px solid var(--ink-faint);
}
.signup input[type="email"]::placeholder { color: var(--ink-faint); }
.signup input[type="email"]:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.signup .button { border: 0; cursor: pointer; }
.signup .button:disabled { opacity: .6; cursor: default; }
/* The field only bots fill in. Off-screen rather than hidden, which many of them skip. */
.signup-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-status { color: var(--ink-soft); font-size: 1rem; }
.signup-status:empty { display: none; }
.signup-status a { color: var(--leaf); }
.places { margin: -14px 0 18px; font-weight: 700; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(56px, 8vw, 120px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(36px, 6vw, 88px); align-items: start;
}
.lede { margin-top: 26px; max-width: 34em; color: var(--ink-soft); font-size: 1.08em; }
.hero-actions { margin-top: 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-actions .signup { width: 100%; }
.promise {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--rule);
  font-size: 1rem; color: var(--ink-soft);
  max-width: 26em;
}

/* Capture demo */
.hero-copy { position: relative; z-index: 1; }
/* The demo is a page of the notebook: a spine on the left, a few sheets underneath. */
.hero-demo {
  position: relative; z-index: 1;
  padding: 26px 20px 18px 42px;
  background: var(--paper-light);
  border: 1px solid var(--rule); border-radius: 4px 14px 14px 4px;
  box-shadow:
    3px 3px 0 -1px var(--paper-light), 3px 3px 0 0 var(--rule),
    6px 6px 0 -1px var(--paper-light), 6px 6px 0 0 var(--rule),
    0 28px 50px -32px rgba(var(--shade), .55);
}
.hero-demo::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 22px; border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, rgba(var(--shade), .16), rgba(var(--shade), .03) 55%, rgba(var(--shade), .1));
  border-right: 1px solid var(--rule);
}
.hero-demo .demo-label, .hero-demo .capture, .hero-demo .demo-list { margin-right: 54px; }

/* The bookmark ribbon: stitched in at the top of the page and lying on it, in the empty right margin.
   It's also the light switch: pull it to change mode (app.js). The shading is light on a curved
   satin ribbon; it never covers text. */
.ribbon {
  position: absolute; z-index: 2; top: -9px; right: 20px; padding: 0; border: 0; background: none; cursor: pointer;
  width: 36px; height: min(calc(100% - clamp(190px, 20vw, 240px)), 340px);
  filter: drop-shadow(3px 6px 5px rgba(var(--shade), .3)) drop-shadow(0 1px 1px rgba(var(--shade), .25));
}
.ribbon:hover::before { transform: scaleY(1.025); }
.ribbon:focus-visible { outline-offset: 5px; }
.ribbon-hit { position: absolute; top: 0; bottom: -4px; left: -8px; right: -8px; }
.ribbon::before {
  content: ""; position: absolute; inset: 0; transform-origin: 50% 0; transition: transform .2s ease;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 34px),
    linear-gradient(90deg, var(--ribbon-edge) 0%, var(--ribbon) 16%, var(--ribbon-light) 42%, var(--ribbon) 68%, var(--ribbon-edge) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 18px), 0 100%);
}
.ribbon::after {
  /* where it's stitched over the top edge of the page */
  content: ""; position: absolute; top: 0; left: -3px; right: -3px; height: 11px;
  background: linear-gradient(180deg, var(--ribbon-fold), var(--ribbon-edge));
  border-radius: 3px 3px 1px 1px;
}
.demo-label { font-size: .94rem; color: var(--ink-faint); margin: 0 0 10px 4px; }
.capture {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px 14px 14px 52px;
  box-shadow: 0 1px 0 rgba(var(--shade), .04), 0 18px 40px -26px rgba(var(--shade), .45);
  transform-origin: 50% 0;
}
.capture.pulse { animation: settle .45s var(--ease); }
@keyframes settle { 0% { transform: scale(.985); } 100% { transform: scale(1); } }
.capture-leaf { position: absolute; left: 18px; top: 20px; }
.capture input {
  width: 100%; border: 0; background: transparent; outline: none;
  font-family: var(--sans); font-size: 1.12rem; color: var(--ink); padding: 2px 0 10px;
}
.capture input::placeholder { color: var(--ink-faint); }
.capture-kinds { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--paper-deep); }
.capture-kinds button {
  border: 0; background: transparent; color: var(--ink-soft);
  font: 500 .9rem/1 var(--sans); padding: 7px 9px; border-radius: 7px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.capture-kinds button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.capture-preview { min-height: 1.5em; margin-top: 10px; font-size: .94rem; color: var(--ink-soft); }
.capture-preview .chip-course { display: inline-flex; align-items: center; gap: 5px; }
.capture-preview .chip-course::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.capture-preview .urgent { color: var(--late); font-weight: 700; }
.capture-preview .sep { color: var(--rule); margin: 0 6px; }

.demo-list { margin: 18px 4px 0; }
.demo-list-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.demo-list ul { list-style: none; margin: 0; padding: 0; }
.demo-list li {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--rule); font-size: 1rem;
}
.demo-list li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-faint)); transform: translateY(-1px); }
.demo-list li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-list li .d { color: var(--ink-faint); font-size: .94rem; }
.demo-list li .d.late { color: var(--late); }
.demo-list li .kind { font-size: .72rem; font-weight: 700; color: var(--ink-soft); background: var(--paper-deep); border-radius: 5px; padding: 1px 6px; margin-left: 6px; }
.demo-list li.new { animation: arrive .55s var(--ease); background: linear-gradient(var(--marker), var(--marker)) no-repeat; background-size: 100% 100%; animation-fill-mode: both; }
@keyframes arrive {
  0% { opacity: 0; transform: translateY(-10px); background-size: 100% 100%; }
  60% { opacity: 1; transform: none; }
  100% { background-size: 0% 100%; }
}

/* Growing grove */
.grove { position: relative; height: clamp(170px, 18vw, 230px); margin-top: 22px; }
.tree { position: absolute; bottom: 0; left: var(--x, 0); width: calc(min(170px, 34vw) * var(--s, 1)); aspect-ratio: 200 / 220; }
.tree img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .6s var(--ease);
}
.tree img.on { opacity: 1; }

/* ---------- Home showcase ---------- */
.week { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 9vw, 140px); }
.week-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 72px); align-items: end; margin-bottom: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--rule); padding-top: clamp(28px, 4vw, 48px);
}
.week-head p { color: var(--ink-soft); max-width: 32em; }

.window {
  margin: 0;
  border-radius: 14px; overflow: hidden;
  background: var(--paper-light);
  box-shadow: 0 0 0 1px rgba(var(--shade), .1), 0 30px 60px -38px rgba(var(--shade), .55);
}
.window picture { display: block; }
.window img { display: block; width: 100%; height: auto; clip-path: inset(2px round 18px); }
.zoom { display: block; cursor: zoom-in; border-radius: inherit; }
.zoom:focus-visible { outline: 3px solid var(--leaf); outline-offset: 4px; }

/* ---------- Enlarged screenshot ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 4vw, 48px);
  border: 0; background: transparent; color: var(--paper);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.lightbox[open] { display: flex; animation: lightbox-in .25s var(--ease); }
.lightbox::backdrop { background: rgba(20, 30, 24, .82); }
.lightbox img {
  max-width: min(100%, 1600px); max-height: calc(100dvh - 120px); width: auto; height: auto;
  border-radius: 14px; clip-path: inset(3px round 16px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  cursor: zoom-out;
}
.lightbox-caption { margin: 0; max-width: 60ch; text-align: center; font-size: 1rem; color: #e9e3d4; }
.lightbox-close {
  position: absolute; top: clamp(10px, 2vw, 20px); right: clamp(10px, 2vw, 20px);
  font: 600 .9rem/1 var(--sans); color: var(--ink); background: var(--paper);
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Tour ---------- */
.tour { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.entry {
  display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 6vw, 84px) 0; border-top: 1px solid var(--rule);
}
.entry-flip { grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); }
.entry-flip .entry-text { order: 2; }
.entry-text p:not(.num) { color: var(--ink-soft); margin-top: 16px; max-width: 30em; }
.num { font-size: 1rem; font-weight: 700; color: var(--leaf); margin-bottom: 10px; }

/* ---------- Download ---------- */
.download { padding: clamp(72px, 10vw, 150px) var(--gutter) clamp(40px, 6vw, 80px); }
.download-card {
  max-width: 760px; margin: 0 auto; text-align: left;
  border-top: 2px solid var(--ink); padding-top: clamp(28px, 4vw, 44px);
}
.price { margin: 18px 0 30px; font-size: 1.12rem; color: var(--ink-soft); max-width: 30em; }
.price::first-line { color: var(--ink); }
.download-card .fine { margin-top: 16px; }
.not-mac { margin-top: 18px; padding: 14px 16px; background: var(--paper-deep); border-radius: 10px; font-size: .95rem; }

/* ---------- Install ---------- */
.install { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(72px, 9vw, 130px); }
.install-intro { color: var(--ink-soft); margin-top: 14px; max-width: 34em; }
.steps {
  list-style: none; margin: clamp(30px, 4vw, 48px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px);
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--leaf);
}
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--ink-soft); font-size: 1rem; margin-top: 8px; }
.mock-dialog {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: var(--paper-light); border: 1px solid var(--rule);
  font-size: .9rem; line-height: 1.4;
}
.mock-dialog p { margin-bottom: 10px; }
.mock-small { color: var(--ink-soft); }
.mock-btn {
  display: inline-block; margin-right: 6px; padding: 4px 11px; border-radius: 6px;
  background: var(--paper-deep); color: var(--ink-soft); font-weight: 500;
}
.mock-btn-on { background: var(--leaf); color: var(--paper-light); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker) 80%, transparent); }

/* ---------- Note ---------- */
.note {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(72px, 9vw, 130px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: clamp(20px, 5vw, 64px);
}
.note-paper {
  max-width: 640px; padding: clamp(28px, 4vw, 48px);
  background: var(--paper-light);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.7em - 1px), rgba(42, 120, 214, .13) calc(1.7em - 1px), rgba(42, 120, 214, .13) 1.7em);
  background-position: 0 2.6em;
  border-left: 2px solid rgba(179, 68, 45, .35);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(var(--shade), .05), 0 22px 40px -32px rgba(var(--shade), .5);
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.7em;
  transform: rotate(-.6deg);
}
.note-paper p + p { margin-top: 1.7em; }
.signature { font-style: italic; font-size: 1.5rem; color: var(--leaf); }
.note-tree { position: relative; width: clamp(140px, 16vw, 220px); aspect-ratio: 1; }
.note-tree .tree { position: absolute; inset: 0; width: 100%; left: 0; bottom: 0; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 44px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: .95rem; color: var(--ink-faint);
}
.wordmark-small { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }

/* ---------- Switching light and dark: colours ease over while the ribbon is pulled ---------- */
.theme-fading body, .theme-fading body *, .theme-fading body *::before, .theme-fading body *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease !important;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tree img, .capture-kinds button { transition: none; }
  .lightbox[open] { animation: none; }
  .demo-list li.new, .capture.pulse { animation: none; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-demo { max-width: 560px; }
  .week-head { grid-template-columns: 1fr; }
  .entry, .entry-flip { grid-template-columns: 1fr; }
  .entry-flip .entry-text { order: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note { grid-template-columns: 1fr; }
  .note-tree { justify-self: end; margin-top: -40px; }
}
@media (max-width: 560px) {
  .hero-demo { padding: 22px 12px 14px 30px; }
  .hero-demo::before { width: 16px; }
  .hero-demo .demo-label, .hero-demo .capture, .hero-demo .demo-list { margin-right: 38px; }
  .ribbon { width: 28px; right: 10px; }
  .steps { grid-template-columns: 1fr; }
  .capture { padding-left: 48px; }
  .capture-kinds { margin-left: -36px; }
  .capture-leaf { left: 14px; }
  .window { border-radius: 10px; }
  .window img { clip-path: inset(1px round 9px); }
  .note-paper { transform: none; }
  .button-large { flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 28px; }
}

/* Privacy page */
.legal { max-width: 40rem; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 96px; }
.legal h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); margin-top: 2em; }
.legal p, .legal ul { margin: .7em 0 0; color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: .35em; }
.legal .updated { color: var(--ink-faint); font-size: .94rem; }

/* Page not found (404.html) */
.lost { max-width: 34rem; margin: 0 auto; padding: 18vh 24px 96px; display: grid; gap: 18px; }
.lost h1 { margin: 0; }
.lost p { margin: 0; }
