/* snida.app — design 0037. One stylesheet for every page.
   Every colour is a Theme.swift role (Packages/SnidaApple/Sources/SnidaUI/Theme/Theme.swift):
   surface / chromeSurface, onSurface, hint, accent + onAccent (+ accentPressed), accentText, chromeFieldFill,
   warning, error. Light and dark follow prefers-color-scheme (no toggle: that would be script and state).
   Served at /assets/<version>/site.css with `Cache-Control: immutable`; the CSP's style-src is 'self'. */

:root {
  color-scheme: light dark;
  --bg: #F4F1EB;            /* surface (Porcelain) */
  --fg: #242724;            /* onSurface (Graphite) */
  --hint: #5F6368;          /* hint, 4.5:1+ on bg and card */
  --card: #FFFFFF;          /* chromeFieldFill: the raised fill */
  --line: #DBD8D2;          /* onSurface at 12 % over bg */
  --line-strong: #8A8A86;   /* onSurface at 51 % over bg: a control's border, 3.07:1 on the page */
  --accent: #E66A35;        /* Persimmon: a fill, never text on light */
  --on-accent: #242724;     /* Graphite on Persimmon, 4.66:1 */
  --accent-pressed: #E97C4D;
  --accent-text: #AA4418;   /* Persimmon Deep: text-sized accents on Porcelain */
  --hover: #F2F2F2;         /* hoverFill */
  --warning: #815B03;
  --error: #B3261E;
  --ok: #17702B;
  --pool: rgba(36, 39, 36, 0.07);   /* the floor under a render */
  --shadow: 0 10px 30px rgba(36, 39, 36, 0.10);
  --radius: 16px;
  --radius-s: 10px;
  --mark-t: #3B403B; --mark-l: #242724; --mark-r: #1A1D1A;   /* the icon's block faces, light appearance */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1F1C;          /* chromeSurface (Studio night) */
    --fg: #F4F1EB;
    --hint: #B0B4B0;
    --card: #242724;        /* chromeFieldFill dark = the window surface, one step up from the chrome */
    --line: #363936;
    --line-strong: #686964;  /* onSurface at 35 %: 3.01:1 on the page */
    --accent-text: #E66A35; /* Persimmon is text-safe on Graphite (5.1:1) */
    --hover: #202320;
    --warning: #F9B006;
    --error: #FF6B6B;
    --ok: #30D158;
    --pool: rgba(244, 241, 235, 0.06);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --mark-t: #FBF9F5; --mark-l: #EDE8E0; --mark-r: #D9D3C8;  /* the icon's dark appearance: Porcelain block */
  }
}
/* ---- base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 37.5rem) { body { font-size: 1rem; } }
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; }
p a, li a, dd a, td a { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4rem); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0.5rem 0; }
.lede { font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); color: var(--hint); max-width: 36em; text-wrap: pretty; }
.hint, .muted { color: var(--hint); }
.small { font-size: 0.9rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 37.5rem) { .wrap { padding: 0 1.5rem; } }
@media (min-width: 64rem) { .wrap { padding: 0 2rem; } }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem .75rem; z-index: 3; border-radius: 8px; }

/* ---- header ---- */
header.site { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.035em; line-height: 1; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.mark .t { fill: var(--mark-t); } .mark .l { fill: var(--mark-l); } .mark .r { fill: var(--mark-r); } .mark .c { fill: var(--accent); }
.brand:hover { text-decoration: none; }
nav.site { display: flex; align-items: center; gap: 1.25rem; }
nav.site a { color: var(--fg); font-weight: 500; padding: .5rem 0; }
nav.site a[aria-current="page"] { color: var(--accent-text); }
nav.site .button { padding: .45rem 1rem; min-height: 2.5rem; }
@media (max-width: 37.5rem) { nav.site { gap: 1rem; } nav.site .button { display: none; } }

/* ---- buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .6rem 1.25rem; border-radius: 980px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--fg);
  font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
}
.button:hover { text-decoration: none; background: var(--hover); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-pressed); border-color: var(--accent-pressed); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1.5rem 0 0; }
.appstore { display: inline-block; height: 48px; }
.appstore svg, .appstore img { height: 48px; width: auto; }
.store-note { color: var(--hint); font-size: .95rem; margin-top: .75rem; }
.actions .store-note { margin: 0; }
.button.note { cursor: default; }
.button.note:hover { background: var(--card); }

/* ---- sections ---- */
main { display: block; }
section.band { padding: clamp(3rem, 6vw, 5.5rem) 0; }
section.band + section.band { border-top: 1px solid var(--line); }
.band-head { max-width: 42em; margin-bottom: 2rem; }
.band-head .lede { margin-top: .75rem; }
.kicker { color: var(--accent-text); font-weight: 600; font-size: .95rem; letter-spacing: .01em; text-transform: none; margin-bottom: .5rem; }

/* ---- hero ---- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 8fr); gap: 3rem; } }
.hero h1 { max-width: 11em; }
.hero .lede { margin-top: 1rem; }
.hero-visual { position: relative; min-width: 0; }
/* A: the object on a studio floor */
.studio { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; }
.studio::before { content: ""; position: absolute; inset: auto 8% 10%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, var(--pool), transparent 72%); }
.studio img { position: relative; width: 92%; }
/* B: real devices */
.devices { position: relative; aspect-ratio: 16 / 11; }
.device { position: absolute; background: #1A1D1A; border-radius: 22px; padding: 10px; box-shadow: var(--shadow); }
.device img { border-radius: 13px; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.device.ipad { right: 0; top: 0; width: 86%; height: 92%; }
.device.iphone { left: 0; bottom: 0; width: 24%; height: 68%; border-radius: 26px; padding: 7px; }
.device.iphone img { border-radius: 20px; }
@media (max-width: 37.5rem) {
  .devices { aspect-ratio: 4 / 5; max-width: 22rem; margin: 0 auto; }
  .device.ipad { display: none; }
  .device.iphone { left: 50%; transform: translateX(-50%); bottom: 0; top: 0; width: 72%; height: auto; }
}

/* ---- example cards ---- */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); }
.grid.three { grid-template-columns: 1fr; }
@media (min-width: 37.5rem) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.card > a { color: inherit; display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card > a:hover { text-decoration: none; }
.card > .card-body { display: flex; flex-direction: column; height: 100%; }
.card > a:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.card > a:hover .thumb img { transform: scale(1.03); }
.thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg); position: relative; overflow: hidden; }
.thumb::before { content: ""; position: absolute; inset: auto 12% 14%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, var(--pool), transparent 72%); }
.thumb img { position: relative; width: 84%; height: auto; transition: transform .25s ease; }
.thumb.fill { height: 100%; aspect-ratio: auto; }
@media (prefers-reduced-motion: reduce) { .thumb img { transition: none; } }
.card .meta { padding: .9rem 1.1rem 1.1rem; }
.card .meta h3 { font-size: 1.05rem; }
.card .meta p { margin: .3rem 0 0; color: var(--hint); font-size: .95rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; }
.badge { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 980px; border: 1px solid var(--line-strong); color: var(--hint); }
.badge.editable { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---- how it works ---- */
.steps3 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 52rem) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.step figure img { width: 100%; height: 100%; object-fit: cover; }
.step .body { padding: 1.1rem 1.25rem 1.4rem; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--accent-text); }
.step p { color: var(--hint); margin: .4rem 0 0; }
.step ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--fg); }
.step li { margin: .15rem 0; }

/* ---- two-column feature rows ---- */
.row2 { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .row2 { grid-template-columns: 1fr 1fr; gap: 3rem; } .row2.flip > :first-child { order: 2; } }
.row2 .text h2 { margin-bottom: .5rem; }
.row2 .text p { max-width: 34em; }
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.frame img { width: 100%; }

/* the assistant transcript (illustrative) */
.chat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .75rem; max-width: 30rem; }
.chat .you, .chat .bot { padding: .65rem .9rem; border-radius: 14px; max-width: 90%; }
.chat .you { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat .bot { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat .bot .did { font-size: .9rem; color: var(--hint); margin-top: .35rem; }
.chat .label { font-size: .8rem; color: var(--hint); }

/* ---- pricing ---- */
.plans { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 52rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; }
.plan.pro { border-color: var(--accent); border-width: 2px; }
.plan .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin: .25rem 0 0; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--hint); letter-spacing: 0; }
.plan ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.plan li { padding: .4rem 0 .4rem 1.6rem; position: relative; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.plan li::before { content: ""; position: absolute; left: .1rem; top: .85rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }
.plan .foot { margin-top: auto; padding-top: 1rem; color: var(--hint); font-size: .92rem; }

/* ---- platforms strip ---- */
.strip { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 37.5rem) { .strip { grid-template-columns: repeat(3, 1fr); } }
.strip .item { padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.strip .item h3 { font-size: 1.05rem; }
.strip .item p { margin: .3rem 0 0; color: var(--hint); font-size: .95rem; }

/* ---- prose pages (support, privacy, terms, press) ---- */
.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: .5rem; }
.prose h2 { font-size: 1.45rem; margin: 2.25rem 0 .5rem; }
.prose h3 { margin: 1.5rem 0 .25rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .25rem 0; }
.page { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.page-head { margin-bottom: 1.5rem; }
.crumbs { font-size: .9rem; color: var(--hint); margin-bottom: .75rem; }
.toc { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.toc a { display: inline-block; padding: .35rem .8rem; border-radius: 980px; border: 1px solid var(--line-strong); color: var(--fg); font-size: .92rem; }
.toc a:hover { background: var(--hover); text-decoration: none; }
details.faq { border-top: 1px solid var(--line); padding: .25rem 0; }
details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; font-weight: 600; padding: .8rem 2rem .8rem 0; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .65rem; color: var(--accent-text); font-size: 1.4rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq .answer { padding: 0 0 1rem; color: var(--fg); max-width: 40em; }
.contact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; display: grid; gap: .25rem; }
.contact strong { font-size: 1.1rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 1rem 0; }
dl.facts dt { color: var(--hint); }
dl.facts dd { margin: 0; }
.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.downloads li:last-child { border-bottom: 1px solid var(--line); }
.downloads .what { flex: 1 1 14rem; }
.downloads .size { color: var(--hint); font-size: .92rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.swatch { border-radius: var(--radius-s); border: 1px solid var(--line); overflow: hidden; }
.swatch i { display: block; height: 3.5rem; }
.swatch span { display: block; padding: .5rem .7rem; font-size: .85rem; }
.swatch span b { display: block; font-weight: 600; }
.shots { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); margin: 1rem 0; }
.shots figure { margin: 0; }
.shots figcaption { font-size: .85rem; color: var(--hint); margin-top: .35rem; }
.notice { border-left: 3px solid var(--accent-text); background: var(--card); padding: .75rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 1rem 0; }
.updated { color: var(--hint); font-size: .9rem; margin-top: 2rem; }

/* ---- model page (restyled 0027 page) ---- */
.columns { display: grid; gap: 1.5rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .columns { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.viewer { aspect-ratio: 16 / 10; max-height: 36rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; position: relative; overflow: hidden; }
.viewer::before { content: ""; position: absolute; inset: auto 15% 12%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, var(--pool), transparent 72%); }
.viewer img { position: relative; width: 70%; }
.viewer .ar { position: absolute; right: 1rem; bottom: 1rem; }
table.stats { width: 100%; border-collapse: collapse; }
table.stats th, table.stats td { text-align: left; padding: .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.stats th { font-weight: 500; color: var(--hint); width: 42%; }
table.params th { font-weight: 600; color: var(--fg); }
table.params td.hint { color: var(--hint); }
table.params td strong { white-space: nowrap; }
ol.chips { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .4rem .25rem; align-items: center; }
ol.chips li { padding: .25rem .75rem; border-radius: 980px; border: 1px solid var(--line-strong); background: var(--card); font-size: .92rem; }
ol.chips li.sep { padding: 0; border: 0; background: none; color: var(--hint); }
.yes { color: var(--ok); } .no { color: var(--error); }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--hint); font-size: .92rem; }
footer.site .cols { display: grid; gap: 1.5rem 2rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 52rem) { footer.site .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
footer.site h4 { font-size: .9rem; color: var(--fg); margin-bottom: .5rem; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: .3rem 0; }
footer.site a { color: var(--fg); }
footer.site .legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 60em; }
footer.site .legal p { margin: .4rem 0; }
footer.site .brand { font-size: 1.15rem; }

/* ---- pages not yet rebuilt in the shell (Explore, the model page, Privacy, messages: design 0037 slices W2 and W4) ---- */
main > .wrap { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
main > .wrap h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: .5rem; }
main > .wrap h2 { font-size: 1.45rem; margin: 2.25rem 0 .5rem; }
main > .wrap h3 { font-size: 1.05rem; }
main > .wrap ul, main > .wrap ol { padding-left: 1.25rem; }
main > .wrap .grid { padding-left: 0; margin-top: 1rem; }
main > .wrap .downloads, main > .wrap ol.chips { padding-left: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1.5rem 0; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--hint); gap: .25rem; }
.filters input, .filters select, .filters button { font: inherit; font-size: 1rem; padding: .45rem .7rem; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); }
.filters input { min-width: min(18rem, 80vw); }
.filters button { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.thumb svg { width: 30%; height: 30%; color: var(--hint); }
.card .meta .badges, .card .meta .badge { margin-top: .4rem; }
.viewer:has(model-viewer) { display: block; aspect-ratio: auto; max-height: none; }
.viewer:has(model-viewer)::before { display: none; }
.viewer model-viewer { display: block; width: 100%; height: min(70vh, 36rem); --poster-color: transparent; }
/* Editable examples on grid paper: the ground of each GLB fades into the page colour, so the viewer takes it too, and
   the viewer matching prefers-color-scheme is the one shown (the other is never loaded). No script. */
.viewer:has(model-viewer.ground) { background: var(--bg); }
.viewer model-viewer.ground { background: var(--bg); --poster-color: var(--bg); }
.viewer model-viewer.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .viewer model-viewer.on-light { display: none; }
  .viewer model-viewer.on-dark { display: block; }
}
.downloads .note { color: var(--hint); font-size: .92rem; }
ol.steps { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .4rem .25rem; align-items: center; }
ol.steps li { padding: .25rem .75rem; border-radius: 980px; border: 1px solid var(--line-strong); background: var(--card); font-size: .92rem; }
ol.steps li.sep { padding: 0; border: 0; background: none; color: var(--hint); }
.attribution { margin: .5rem 0 1rem; padding: .75rem 1rem; border-left: 3px solid var(--accent-text); background: var(--card); border-radius: 0 var(--radius-s) var(--radius-s) 0; white-space: pre-line; overflow-wrap: anywhere; }
dl.credit { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.credit dt { color: var(--hint); }
dl.credit dd { margin: 0; overflow-wrap: anywhere; }
.cautions { margin: 1rem 0; padding: .75rem 1rem; border-radius: var(--radius-s); border: 1px solid var(--line); }
.cautions ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.pages { margin-top: 1.5rem; }
.page .more { margin-top: 3rem; }
.prose .toc { padding-left: 0; }
