/* The whole site's look: the redesign John approved on 2026-11-23 (docs#541), from the mockup in
   chatsrecall-docs design-explorations/website-redesign-2026-11/site.css at d006a33.
   Every page loads this file. Help and Privacy also load landing.css before it, for their content
   (as the approved mockup does); Home and Download need only this file. */
  :root {
    --bg: #0f0f11;
    --surface: #17171a;
    --surface-2: #1e1e22;
    --line: #26262b;
    --text: #ededf0;
    --text-2: #a1a1aa;
    --text-3: #6e6e78;
    --accent: #6366f1;
    --accent-hover: #7274ff;
    --accent-soft: rgba(99, 102, 241, 0.14);
    --mark: rgba(99, 102, 241, 0.30);
    --logo: #8b8b95;
    --logo-img: brightness(0) invert(1) opacity(0.52);
    --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -20px rgba(0,0,0,0.7);
    color-scheme: dark;
  }
  :root[data-theme="light"] {
    --bg: #fbfbfc;
    --surface: #ffffff;
    --surface-2: #f3f3f6;
    --line: #e6e6eb;
    --text: #18181b;
    --text-2: #5b5b66;
    --text-3: #8e8e98;
    --accent-soft: rgba(99, 102, 241, 0.10);
    --mark: rgba(99, 102, 241, 0.18);
    --logo: #74747e;
    --logo-img: brightness(0) opacity(0.55);
    --shadow: 0 20px 40px -24px rgba(24,24,27,0.25);
    color-scheme: light;
  }
  /* Release-note colours, as chatsrecall.com shows them (landing.css). */
  :root { --rn-accent: #5b5cd6; --rn-accent-hover: #6b6ce0; --rn-success: #4cc38a; --rn-warning: #e0b054; --rn-danger: #e56363; }
  :root[data-theme="light"] { --rn-accent: #5558d0; --rn-accent-hover: #484bc2; --rn-success: #1d7f4f; --rn-warning: #8a5c07; --rn-danger: #c43d3d; }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  :where(header.top, body > footer, main.wrap) a { color: inherit; text-decoration: none; }
  .wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
  .icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  /* Top bar */
  header.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  header.top .wrap { display: flex; align-items: center; height: 52px; gap: 24px; }
  .brand { font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
  .beta { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--accent-hover); background: var(--accent-soft); padding: 1px 6px; border-radius: 999px; }
  nav.links { display: flex; gap: 18px; margin-left: auto; color: var(--text-2); font-size: 13px; }
  nav.links a:hover, nav.links a[aria-current] { color: var(--text); }
  .theme { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; }
  .theme:hover { color: var(--text); }
  .theme .moon { display: none; }
  :root[data-theme="light"] .theme .sun { display: none; }
  :root[data-theme="light"] .theme .moon { display: block; }

  /* Hero */
  .hero { padding: 48px 0 28px; }
  :where(.hero) h1 { font-size: 38px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 12px; max-width: 600px; }
  .lede { color: var(--text-2); font-size: 15px; margin: 0 0 20px; max-width: 540px; }
  .cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 9px; box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -6px rgba(99,102,241,0.6); }
  .btn:hover { background: var(--accent-hover); }
  .alt { font-size: 13px; color: var(--text-2); }
  .alt a { color: var(--text); border-bottom: 1px solid var(--line); }
  .alt a:hover { border-color: var(--text-3); }
  .meta { font-size: 12px; color: var(--text-3); margin-top: 10px; }

  /* Product window */
  .window { margin-top: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: 168px 1fr; font-size: 12.5px; }
  .win-side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 12px 10px; }
  .dots { display: flex; gap: 6px; margin: 0 0 16px 2px; }
  .dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
  .side-label { font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 6px 6px; }
  .side-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; color: var(--text-2); }
  .side-row.on { background: var(--accent-soft); color: var(--text); }
  .side-row .n { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 11.5px; }
  .side-row .logo { width: 13px; height: 13px; }
  .win-main { padding: 14px 16px 6px; min-width: 0; }
  .search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 8px; padding: 6px 10px; color: var(--text); }
  .search .icon { color: var(--text-3); width: 14px; height: 14px; }
  .caret { width: 1px; height: 14px; background: var(--text); margin-left: -6px; animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .search .filter { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
  .count { color: var(--text-3); font-size: 11.5px; margin: 10px 0 2px; }
  .result { display: grid; grid-template-columns: 16px 1fr auto; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
  .result:first-of-type { border-top: 0; }
  .result .logo { width: 14px; height: 14px; margin-top: 2px; }
  .result .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .result .when { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
  .result .snip { grid-column: 2 / 4; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

  /* Sections */
  section.block { padding: 22px 0; }
  .label { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 12px; }

  /* Works with */
  .works { display: grid; grid-template-columns: 76px 1fr; gap: 10px 12px; align-items: baseline; }
  .works dt { font-size: 12px; color: var(--text-3); }
  .works dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .works .how { color: var(--text-2); font-size: 13px; }
  .src { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
  .logo { width: 15px; height: 15px; fill: var(--logo); flex: none; }
  img.logo { filter: var(--logo-img); }
  .logo.zoom { width: 40px; height: 9px; }
  .fine { font-size: 11.5px; color: var(--text-3); margin: 14px 0 0; }

  /* Steps */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
  .step { counter-increment: step; }
  .step::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover); font-size: 11px; font-weight: 700; margin-bottom: 8px; }
  :root[data-theme="light"] .step::before { color: var(--accent); }
  .step b { display: block; font-weight: 600; margin-bottom: 2px; }
  .step span { color: var(--text-2); font-size: 13px; }

  /* Closing */
  .closing { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 34px 0 40px; }
  .privacy-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--text-3); font-size: 12.5px; }
  .privacy-note .icon { width: 13px; height: 13px; }
  .closing h2 { font-size: 20px; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
  body > footer { padding: 8px 0 32px; color: var(--text-3); font-size: 11.5px; }
  body > footer .row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
  body > footer .row span { white-space: nowrap; }
  body > footer .row a:hover { color: var(--text-2); }
  body > footer p { margin: 0; line-height: 1.5; }
  body > footer p a { text-decoration: underline; }


  /* Inner pages: Download, Help, Privacy */
  .page { padding-top: 44px; padding-bottom: 12px; }
  .page h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 12px; max-width: 600px; }
  .page > .lede { margin-bottom: 22px; }
  a.inline { color: var(--text); border-bottom: 1px solid var(--line); }
  a.inline:hover { border-color: var(--text-3); }
  .btn.secondary { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
  .btn.secondary:hover { background: var(--line); }
  section[id], details[id] { scroll-margin-top: 64px; }

  /* Download: one row per computer. The release pipeline rewrites the two download hrefs
     (scripts/update-website-downloads.mjs in the workspace); the page script puts the visitor's computer first. */
  .dl-list { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .dl-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; scroll-margin-top: 64px; }
  .dl-row + .dl-row { border-top: 1px solid var(--line); }
  .dl-os { width: 20px; height: 20px; fill: var(--text-2); }
  .dl-what .dl-row-title { font-size: 14px; line-height: 1.55; font-weight: 600; letter-spacing: 0; margin: 0; }
  .dl-what span { color: var(--text-3); font-size: 12.5px; }
  .dl-what .dl-version { margin-left: 4px; font-variant-numeric: tabular-nums; }
  .dl-row .btn { padding: 7px 14px; font-size: 13px; }

  /* Fold-open rows: the Download notes */
  details.q summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; font-weight: 550; }
  details.q summary::-webkit-details-marker { display: none; }
  details.q summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg); margin: -4px 4px 0 auto; transition: transform .15s, margin .15s; flex: none; }
  details.q[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  details.q summary:hover { background: var(--surface-2); }
  .a { color: var(--text-2); font-size: 13.5px; }
  .a p, .a ul, .a ol { margin: 0 0 8px; }
  .a ul, .a ol { padding-left: 20px; }
  .a li { margin-bottom: 4px; }
  .a b, .a strong { color: var(--text); font-weight: 600; }
  .a a { color: var(--text); border-bottom: 1px solid var(--line); }
  .a blockquote { margin: 6px 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--line); font-style: italic; }
  section.folds { padding-top: 26px; }

  /* Release history, at the bottom of Download. The cards are written by the release tooling
     (scripts/update-website-updates.mjs: article.update-card inside div.updates-list); the page script adds a
     one-line summary to each and folds all but the latest two. */
  section.releases { padding-top: 4px; }
  section.folds + section.releases { padding-top: 34px; }
  .updates-list { display: flex; flex-direction: column; }
  .update-card p, .update-card ul { margin: 0; }
  .update-meta { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: baseline; padding: 7px 12px; border-radius: 8px; }
  .update-meta[role="button"] { cursor: pointer; }
  .update-meta[role="button"]:hover { background: var(--surface-2); }
  .update-meta[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .update-version { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
  .update-meta:hover .update-version { color: var(--rn-accent); }
  .update-summary { min-width: 0; color: var(--text); }
  .update-card.is-folded .update-summary { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .update-date { grid-column: 3; color: var(--text-3); font-size: 12px; white-space: nowrap; }
  .update-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 18px 88px; color: var(--text-2); font-size: 13.5px; }
  /* Folded: the notes take no room. They keep hidden="until-found" (set by the page script) so find-in-page still reaches them. */
  .update-card.is-folded .update-body { height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
  /* The summary line repeats the intro, so an open card doesn't show it twice. */
  .update-card.has-summary .update-body > .update-intro:first-child { display: none; }
  .update-highlights { list-style: none; display: grid; gap: 12px; padding: 14px 16px; margin: 2px 0 0; border-radius: 10px; background: color-mix(in srgb, var(--rn-accent) 5%, transparent); border: 1px solid color-mix(in srgb, var(--rn-accent) 18%, transparent); }
  .update-highlight { display: flex; gap: 10px; }
  .update-highlight-plain { padding-left: 27px; }
  .update-highlight-icon { width: 17px; height: 17px; flex: none; margin-top: 2px; fill: none; stroke: var(--rn-accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
  .update-highlight-text { min-width: 0; }
  .update-highlight-title { color: var(--text); font-weight: 600; }
  .update-section { display: flex; flex-direction: column; gap: 4px; }
  .update-section-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin: 4px 0 0; color: var(--kind); }
  .update-section-title i { font-size: 13px; }
  .update-section-title.added { --kind: var(--rn-success); }
  .update-section-title.improved { --kind: var(--rn-accent-hover); }
  .update-section-title.fixed { --kind: var(--rn-accent); }
  .update-section-title.changed { --kind: var(--rn-warning); }
  .update-section-title.removed { --kind: var(--rn-danger); }
  .update-list { padding-left: 18px; }
  .update-list li { margin-bottom: 4px; }
  .update-note { font-size: 12.5px; color: var(--text-3); }
  .update-card strong { color: var(--text-2); }
  .update-card code { font-size: 12.5px; }
  .update-card a { color: var(--text); border-bottom: 1px solid var(--line); }

  /* Help and Privacy: the live site's content and styles (landing.css) under the new top bar and footer.
     Their content is sized for the live site's 16px text. Its width and side space follow .wrap, so it lines up
     with the top bar at every window size, and its top space no longer has to clear a fixed menu. */
  body:is([data-page="help"], [data-page="privacy"]) { font-size: 16px; line-height: 1.6; }
  body:is([data-page="help"], [data-page="privacy"]) main { max-width: 760px; padding: 48px 24px 64px; }


  header.top { font-size: 14px; line-height: 1.55; }

  /* Containers: the sources, each step, the closing row and the fold-open lists each sit in a card. */
  .works,
  .step,
  .qlist,
  .updates-list,
  .closing { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  :root[data-theme="light"] :is(.works, .step, .qlist, .updates-list, .closing) { box-shadow: 0 1px 2px rgba(24,24,27,0.04); }
  .works { padding: 16px 18px; }
  .steps { gap: 10px; }
  .step { padding: 14px 16px; }
  .qlist, .updates-list { padding: 4px; }
  details.q summary { margin: 0; padding-left: 12px; padding-right: 12px; }
  .a { padding: 4px 12px 12px; }
  .closing { padding: 20px 22px; margin: 22px 0 36px; }

  @media (max-width: 640px) {
    .update-meta { grid-template-columns: 56px 1fr; }
    .update-date { display: none; }
    .update-body { padding-left: 12px; }
    .page h1 { font-size: 26px; }
    nav.links { display: none; }
    .theme { margin-left: auto; }
    .hero { padding-top: 36px; }
    :where(.hero) h1 { font-size: 30px; }
    .window { grid-template-columns: 1fr; }
    .win-side { display: none; }
    .works { grid-template-columns: 1fr; gap: 4px; }
    .works dd { margin-bottom: 10px; }
    .steps { grid-template-columns: 1fr; }
  }
