/* Ail Files site styles: the same "ledger" design language as Ail's homepage
 * (app/design-system.css + app/home-ledger.css): one blue accent over a
 * neutral gray scale, square corners, no shadows, hairline borders, IBM Plex
 * Serif headings over Work Sans body text, numbered "No. 01" rows. The token
 * names and values below are copied from Ail's design system so the two stay
 * visibly one family. Light/dark follows the system, and a toggle stores an
 * explicit choice in data-theme, exactly like Ail's ThemeToggle. */

@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/IBMPlexSerif-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/IBMPlexSerif-600.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/WorkSans-400-600.woff2) format("woff2"); }

:root {
  --ds-accent: #3b82f6;
  --ds-accent-hover: #60a5fa;
  --ds-on-accent: #ffffff;
  --ds-bg-base: #030712;
  --ds-bg-surface: #111827;
  --ds-bg-elevated: #1f2937;
  --ds-border-subtle: #1f2937;
  --ds-border-muted: #374151;
  --ds-text-primary: #f9fafb;
  --ds-text-secondary: #d1d5db;
  --ds-text-muted: #6b7280;
  --ds-success: #34d399;
  --ds-error: #f87171;
  --transition-fast: 150ms ease;
  --hl-serif: "IBM Plex Serif", Georgia, serif;
  --hl-sans: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --hl-border: var(--ds-border-muted);
  --hl-border-strong: color-mix(in srgb, var(--ds-border-muted) 45%, var(--ds-text-primary) 55%);
  --wash: 1; /* how strong the blue glow at the top of the page is */
  color-scheme: dark;
}
:root[data-theme="light"] {
  --wash: 0.62;
  --ds-accent: #2563eb;
  --ds-accent-hover: #1d4ed8;
  --ds-bg-base: #f9fafb;
  --ds-bg-surface: #f3f4f6;
  --ds-bg-elevated: #e5e7eb;
  --ds-border-subtle: #e5e7eb;
  --ds-border-muted: #d1d5db;
  --ds-text-primary: #111827;
  --ds-text-secondary: #374151;
  --ds-text-muted: #6b7280;
  --ds-success: #059669;
  --ds-error: #dc2626;
  color-scheme: light;
}
/* Same values as the block above, for visitors who haven't chosen: follow the
   system. Kept in sync by hand, like Ail's design-system.css. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --wash: 0.62;
    --ds-accent: #2563eb;
    --ds-accent-hover: #1d4ed8;
    --ds-bg-base: #f9fafb;
    --ds-bg-surface: #f3f4f6;
    --ds-bg-elevated: #e5e7eb;
    --ds-border-subtle: #e5e7eb;
    --ds-border-muted: #d1d5db;
    --ds-text-primary: #111827;
    --ds-text-secondary: #374151;
    --ds-text-muted: #6b7280;
    --ds-success: #059669;
    --ds-error: #dc2626;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html { scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ds-bg-base);
  /* A stronger, taller blue glow at the top than the other homepages' soft wash: the accent blue itself, brightest behind the headline
     and fading well down the first screen, with a second glow on the right behind the picture. The first line is the fallback for
     browsers without color-mix. */
  background-image: radial-gradient(ellipse 95vw 34rem at 25% -2rem, rgba(59, 130, 246, 0.42), rgba(59, 130, 246, 0.2) 45%, transparent 85%);
  background-image:
    radial-gradient(ellipse 100vw 46rem at 28% -5rem, color-mix(in srgb, var(--ds-accent) calc(46% * var(--wash)), transparent), color-mix(in srgb, var(--ds-accent) calc(24% * var(--wash)), transparent) 42%, color-mix(in srgb, var(--ds-accent) calc(8% * var(--wash)), transparent) 70%, transparent 90%),
    radial-gradient(ellipse 55vw 30rem at 92% 4rem, color-mix(in srgb, var(--ds-accent) calc(24% * var(--wash)), transparent), transparent 75%);
  background-repeat: no-repeat;
  color: var(--ds-text-primary);
  font-family: var(--hl-sans);
  font-size: 16px;
  line-height: 1.6;
}
/* The drifting blue glows behind the whole page (script.js), as on Ail's homepage and Jobapply. Behind everything (z-index -1, above only the body background), and never takes a click. */
.ambient { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
h1, h2 { font-family: var(--hl-serif); font-weight: 600; margin: 0; }
h3, h4 { margin: 0; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 14px; background: var(--ds-accent); color: var(--ds-on-accent); }
.skip:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: 74rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 1024px) { .wrap { padding-left: 2.5rem; padding-right: 2.5rem; } }
.narrow { max-width: 46rem; }

/* masthead */
.nav { position: sticky; top: 0; z-index: 10; background: var(--ds-bg-base); border-bottom: 1px solid var(--hl-border-strong); }
.nav .bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.logo-on-light { display: none; }
:root[data-theme="light"] .logo-on-dark { display: none; }
:root[data-theme="light"] .logo-on-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-on-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-on-light { display: block; }
}
.brand-name { font-family: var(--hl-serif); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.nav-links { display: none; align-items: center; gap: 1.75rem; font-size: 0.875rem; color: var(--ds-text-secondary); }
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  /* Brand left, links centred, actions right: the same grid as the Ail homepage header. */
  .nav .bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-actions { justify-self: end; }
}
.nav-link { text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 0.2rem; transition: border-color var(--transition-fast), color var(--transition-fast); }
.nav-link:hover { color: var(--ds-text-primary); border-color: var(--hl-border-strong); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-actions .btn { padding: 0.625rem 1rem; }

/* theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; background: transparent; color: var(--ds-text-secondary); border: 0; cursor: pointer; }
.theme-toggle:hover { color: var(--ds-text-primary); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}

/* buttons: square, no border radius (Ail's .hl-btn family) */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.25rem; border: none; border-radius: 0; font: inherit; font-size: 0.875rem; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast); }
.btn-fill { background: #f8fafc; color: #111827; box-shadow: 0 4px 6px -1px rgb(37 99 235 / 0.2), 0 2px 4px -2px rgb(37 99 235 / 0.2); }
.btn-fill:hover { background: #ffffff; box-shadow: 0 6px 10px -1px rgb(37 99 235 / 0.25), 0 3px 6px -2px rgb(37 99 235 / 0.25); }
.btn-line { color: var(--ds-text-primary); border: 1px solid var(--hl-border-strong); }
.btn-line:hover { border-color: var(--ds-text-primary); background: var(--ds-bg-surface); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* shared type primitives */
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ds-text-muted); }
.eyebrow::before { content: ""; width: 0.9rem; height: 1px; background: var(--ds-accent); display: inline-block; }
.index { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ds-text-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.secondary { color: var(--ds-text-secondary); }

/* sections */
.section { border-bottom: 1px solid var(--hl-border); padding-top: 4rem; padding-bottom: 4rem; }
.section h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.2; margin-top: 0.5rem; margin-bottom: 0.75rem; }
.section-lead { max-width: 40rem; margin-bottom: 2rem; font-size: 0.95rem; color: var(--ds-text-secondary); }

/* hero */
.hero { display: grid; gap: 2.5rem; align-items: end; padding-top: 3.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--hl-border); }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.1fr 0.7fr; padding-top: 5rem; padding-bottom: 5rem; } }
.hero h1 { margin: 1.25rem 0 1.5rem; font-size: clamp(2.25rem, 5.4vw, 3.75rem); line-height: 1.1; }
.hero h1 em { font-style: normal; color: var(--ds-accent); }
.hero .lead { max-width: 36rem; margin-bottom: 2rem; font-size: 1rem; color: var(--ds-text-secondary); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-side { padding-left: 0; }
@media (min-width: 1024px) { .hero-side { padding-left: 2rem; } }
.entry-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--hl-border); font-size: 0.85rem; color: var(--ds-text-secondary); }
.entry-row:last-child { border-bottom: none; }
.entry-row b { font-weight: 600; color: var(--ds-success); }

/* hairline grid: one shared rule between cells */
.group { margin: 2.25rem 0 0.9rem; }
.group:first-of-type { margin-top: 0; }
.grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--hl-border); border-left: 1px solid var(--hl-border); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.cell { padding: 1.75rem; border-right: 1px solid var(--hl-border); border-bottom: 1px solid var(--hl-border); transition: background var(--transition-fast); }
.cell:hover { background: var(--ds-bg-surface); }
.cell .no { display: block; margin-bottom: 0.9rem; font-family: var(--hl-serif); font-size: 0.85rem; color: var(--ds-text-muted); }
.cell h4 { margin-bottom: 0.5rem; font-size: 1rem; font-weight: 600; }
.cell p { font-size: 0.875rem; line-height: 1.6; color: var(--ds-text-secondary); }

/* numbered ledger rows */
.ledger { border-top: 1px solid var(--hl-border); margin: 0; padding: 0; list-style: none; }
.row { display: grid; grid-template-columns: 1fr; gap: 0.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--hl-border); align-items: baseline; }
@media (min-width: 640px) { .row { grid-template-columns: 6rem 1fr 2fr; gap: 2rem; } }
.row .no { font-family: var(--hl-serif); font-size: 0.875rem; color: var(--ds-text-muted); }
.row h3, .row dt { font-size: 1rem; font-weight: 600; }
.row p, .row dd { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--ds-text-secondary); }
dl.ledger { margin: 0; }

.built-by { margin-top: 2.5rem; padding: 1.5rem; border: 1px solid var(--hl-border); background: var(--ds-bg-surface); }
.built-by h3 { margin-bottom: 0.4rem; font-size: 1rem; font-weight: 600; }
.built-by p { font-size: 0.875rem; color: var(--ds-text-secondary); }
.built-by a { color: var(--ds-accent); }

/* the "connect your AI" example message */
.snippet { margin: 1.75rem 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--hl-border-strong); background: var(--ds-bg-surface); color: var(--ds-text-secondary); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--hl-border-strong); padding-top: 3.5rem; padding-bottom: 5rem; font-size: 0.875rem; color: var(--ds-text-secondary); }
.site-footer a { text-decoration: none; transition: color var(--transition-fast); }
.site-footer a:hover { color: var(--ds-text-primary); }
/* Same four columns as Ail's footer: a short blurb, then Product, Legal and Contact, with a bar underneath. */
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } .foot-brand { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } .foot-brand { grid-column: auto; } }
.foot-name { margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ds-text-primary); }
.foot-brand p:not(.foot-name) { max-width: 20rem; line-height: 1.6; color: var(--ds-text-muted); }
.foot-brand a { color: var(--ds-text-secondary); }
.foot-h { margin-bottom: 1rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ds-text-muted); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.65rem; }
.foot-bar { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hl-border); font-size: 0.75rem; color: var(--ds-text-muted); }
.foot-bar div { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
@media (min-width: 640px) { .foot-bar { flex-direction: row; } }

/* FAQ rows have no number: question on the left, answer on the right. */
.faq .row { grid-template-columns: 1fr; }
@media (min-width: 640px) { .faq .row { grid-template-columns: 1fr 2fr; } }

/* ---------- graphics ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.6rem; height: 1.6rem; flex: none; fill: none; stroke: var(--ds-accent); stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.section.last { border-bottom: 0; }

/* faint ledger grid behind the hero, fading out downwards */
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 -1.5rem; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--hl-border) 1px, transparent 1px), linear-gradient(90deg, var(--hl-border) 1px, transparent 1px);
  background-size: 3rem 3rem;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero { align-items: center; }
.ticks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--ds-text-secondary); }
.ticks li::before { content: "\2713"; margin-right: 0.45rem; font-weight: 600; color: var(--ds-success); }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.1fr 0.8fr; } }

/* hero phone */
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.art-label { align-self: center; }
.phone { width: 100%; max-width: 20rem; border: 1px solid var(--hl-border-strong); background: var(--ds-bg-surface); }
.phone-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--hl-border); }
.phone-head > span:last-child { display: flex; flex-direction: column; line-height: 1.25; font-size: 0.85rem; }
.phone-head small { font-size: 0.7rem; color: var(--ds-success); }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--ds-accent); font-family: var(--hl-serif); font-weight: 600; color: var(--ds-accent); }
.chat { display: flex; flex-direction: column; gap: 0.6rem; min-height: 17rem; padding: 1rem; }
.msg { max-width: 82%; padding: 0.55rem 0.75rem; border: 1px solid var(--hl-border); font-size: 0.8rem; line-height: 1.45; }
.msg.in { align-self: flex-start; background: var(--ds-bg-base); color: var(--ds-text-secondary); }
.msg.out { align-self: flex-end; background: var(--ds-accent); border-color: var(--ds-accent); color: var(--ds-on-accent); }
.typing { align-self: flex-end; display: none; gap: 4px; padding: 0.6rem 0.75rem; border: 1px solid var(--hl-border); background: var(--ds-bg-base); }
.typing.on { display: flex; }
/* In the hero chat the typing row keeps its place (just hidden) so the card never changes height as it plays. */
.chat.anim .typing { display: flex; visibility: hidden; }
.chat.anim .typing.on { visibility: visible; }
.typing i { width: 5px; height: 5px; background: var(--ds-text-muted); animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.phone-foot { display: flex; justify-content: space-between; padding: 0.7rem 1rem; border-top: 1px solid var(--hl-border); font-size: 0.75rem; color: var(--ds-text-muted); }
.phone-foot b { color: var(--ds-accent); }
/* JS adds .anim only when motion is allowed; without it every message just shows */
.chat.anim .msg { opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
.chat.anim .msg.show { opacity: 1; transform: none; }

/* service cards: icon beside the number */
.cell-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.9rem; }
.cell-top .no { margin-bottom: 0; }
.cell:hover .ico { stroke: var(--ds-accent-hover); }

/* how it works: four nodes on a hairline */
.flow { position: relative; display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding-left: 4rem; }
.step .node {
  position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--ds-accent); background: var(--ds-bg-base); font-family: var(--hl-serif); font-size: 0.9rem; color: var(--ds-accent);
}
.step::before { content: ""; position: absolute; left: 1.375rem; top: 2.75rem; bottom: -2rem; width: 1px; background: var(--hl-border-strong); }
.step:last-child::before { display: none; }
.step h3 { margin: 0.1rem 0 0.35rem; font-size: 1rem; font-weight: 600; }
.step p { font-size: 0.875rem; line-height: 1.6; color: var(--ds-text-secondary); }
@media (min-width: 1024px) {
  .flow { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .step { padding-left: 0; padding-top: 4rem; }
  .step::before { left: 2.75rem; right: -1.5rem; top: 1.375rem; bottom: auto; width: auto; height: 1px; }
  .step:last-child::before { display: none; }
}

/* scroll reveal (JS adds .reveal, so nothing is hidden without JS) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .chat.anim .msg { opacity: 1; transform: none; transition: none; }
  .typing i { animation: none; }
}

/* link cards: blog posts and "From Ail" */
.link-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.link-card .kind { margin-bottom: 0.9rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-text-muted); }
.link-card p { flex: 1; }
.link-card .go { margin-top: 1.1rem; font-size: 0.8rem; font-weight: 600; color: var(--ds-accent); }
.link-card:hover .go, .link-card:focus-visible .go { color: var(--ds-accent-hover); }
.link-card:focus-visible { outline-offset: -2px; }
@media (min-width: 1024px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }

/* the highlighted tagline under the hero heading */
.tagline { display: inline-block; margin: 0 0 1.5rem; padding: 0.55rem 1rem; border: 1px solid var(--ds-accent); background: color-mix(in srgb, var(--ds-accent) 12%, transparent); font-family: var(--hl-serif); font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 600; line-height: 1.35; color: var(--ds-text-primary); }
.tagline em { font-style: normal; color: var(--ds-accent); }

/* iOS Safari zooms the page when a field under 16px is focused, so fields stay at 16px on small screens */
@media (max-width: 768px) {
  input[type="text"], input:not([type]), input[type="tel"], input[type="email"], select, textarea, .chat-form input { font-size: 16px; }
}

/* header: log in to the self-serve area */
.login-link { padding: 0.5rem 0.25rem; font-size: 0.875rem; font-weight: 500; color: var(--ds-text-secondary); text-decoration: none; white-space: nowrap; }
.login-link:hover { color: var(--ds-text-primary); text-decoration: underline; }
@media (max-width: 480px) {
  .nav .bar { gap: 0.75rem; }
  .nav-actions { gap: 0.4rem; }
  .nav-actions .btn { padding: 0.6rem 0.85rem; }
}
#ways > .index { margin-bottom: 1.25rem; }

/* "See how it works" inside a card */
.link-card details { margin-top: 0.9rem; font-size: 0.8rem; color: var(--ds-text-secondary); }
.link-card summary { cursor: pointer; font-weight: 600; color: var(--ds-accent); }
.link-card summary:hover { color: var(--ds-accent-hover); }
.link-card details h5 { margin: 0.9rem 0 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--ds-text-primary); }
.link-card details p { flex: none; font-size: 0.8rem; line-height: 1.55; }
.link-card details code { font-size: 0.75rem; overflow-wrap: anywhere; color: var(--ds-text-primary); }

[hidden] { display: none !important; }

/* ---------- demo: screenshots of the real app ---------- */
.demo-copy { max-width: 42rem; margin-bottom: 1.5rem; }
.demo-copy h3 { margin-bottom: 0.4rem; font-family: var(--hl-serif); font-size: 1.25rem; font-weight: 600; }
.demo-copy p { font-size: 0.95rem; color: var(--ds-text-secondary); }
.demo-shots { display: grid; gap: 1.5rem; }
.window { border: 1px solid var(--hl-border-strong); background: var(--ds-bg-surface); overflow: hidden; }
.window-bar { position: sticky; left: 0; display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--hl-border); }
.window-bar span { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--hl-border-strong); }
.window-bar b { margin-left: 0.6rem; font-size: 0.72rem; font-weight: 400; color: var(--ds-text-muted); white-space: nowrap; }
.shot { display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot-light { display: none; }
:root[data-theme="light"] .shot-dark { display: none; }
:root[data-theme="light"] .shot-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot-dark { display: none; }
  :root:not([data-theme="dark"]) .shot-light { display: block; }
}
.demo-link { display: inline-block; margin-top: 0.9rem; font-size: 0.8rem; font-weight: 600; color: var(--ds-accent); text-decoration: none; }
.demo-link:hover { color: var(--ds-accent-hover); text-decoration: underline; }


/* ---------- features: each one with its own demo ---------- */
.features { border-top: 1px solid var(--hl-border); }
.feature { display: grid; gap: 1.5rem; padding: 2.25rem 0; border-bottom: 1px solid var(--hl-border); align-items: center; }
.feature-text .no { display: block; margin-bottom: 0.6rem; font-family: var(--hl-serif); font-size: 0.85rem; color: var(--ds-text-muted); }
.feature-text h3 { margin-bottom: 0.5rem; font-family: var(--hl-serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.feature-text p { font-size: 0.95rem; line-height: 1.65; color: var(--ds-text-secondary); }
.feature-text a { color: var(--ds-accent); }
.feature-shot { min-width: 0; }
@media (min-width: 1024px) {
  .feature { grid-template-columns: 0.8fr 1.2fr; gap: 3rem; padding: 3rem 0; }
  .feature:nth-child(even) { grid-template-columns: 1.2fr 0.8fr; }
  .feature:nth-child(even) .feature-text { order: 2; }
}

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .wrap { padding-left: 1rem; padding-right: 1rem; }
  .nav .bar { gap: 0.5rem; }
  .brand { gap: 0.45rem; }
  .brand-name { font-size: 1rem; }
  .nav-actions { gap: 0.15rem; }
  .login-link { padding: 0.5rem 0.4rem; font-size: 0.8rem; }
  .nav-actions .btn { padding: 0.55rem 0.75rem; font-size: 0.8rem; }
  .btn-fill .long { display: none; }
}
.btn-fill .short { display: none; }
@media (max-width: 480px) { .btn-fill .short { display: inline; } }
@media (max-width: 360px) { .login-link { display: none; } }
/* the faint grid behind the hero stops at the page padding, so it never makes the page scroll sideways */
@media (max-width: 480px) { .hero::before { inset: 0 -1rem; } }

/* ---------- Ail Files ---------- */
/* hero: a real slide, with the four file types beside it */
.hero-art { display: grid; gap: 0.9rem; width: 100%; max-width: 30rem; }
.hero-art .window { box-shadow: none; }
.hero-art .window picture img, .hero-art .window > img { display: block; width: 100%; height: auto; }
.file-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.file-chips li { padding: 0.35rem 0.7rem; border: 1px solid var(--hl-border-strong); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-text-secondary); }
.file-chips li b { color: var(--ds-accent); font-weight: 600; }

/* the engines: one card each, a real file on top */
.engines { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--hl-border); border-left: 1px solid var(--hl-border); }
@media (min-width: 768px) { .engines { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .engines { grid-template-columns: repeat(3, 1fr); } .engine.wide { grid-column: span 1; } }
.engine { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; border-right: 1px solid var(--hl-border); border-bottom: 1px solid var(--hl-border); min-width: 0; }
.engine .no { font-family: var(--hl-serif); font-size: 0.85rem; color: var(--ds-text-muted); }
.engine h3 { font-family: var(--hl-serif); font-size: 1.2rem; font-weight: 600; }
.engine .ext { font-family: var(--hl-sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--ds-accent); margin-left: 0.4rem; }
.engine p { font-size: 0.9rem; line-height: 1.6; color: var(--ds-text-secondary); }
.engine ul { margin: 0; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.65; color: var(--ds-text-secondary); }
.engine .proof { display: block; border: 1px solid var(--hl-border); background: var(--ds-bg-surface); overflow: hidden; }
.engine .proof img { display: block; width: 100%; height: 13rem; object-fit: cover; object-position: top; }
.engine .proof.landscape img { object-position: center; }

/* PowerPoint blocks */
.pp { display: grid; gap: 1.5rem; padding: 2.25rem 0; border-bottom: 1px solid var(--hl-border); align-items: start; }
.pp:first-of-type { border-top: 1px solid var(--hl-border); }
.pp .no { display: block; margin-bottom: 0.6rem; font-family: var(--hl-serif); font-size: 0.85rem; color: var(--ds-text-muted); }
.pp h3 { margin-bottom: 0.5rem; font-family: var(--hl-serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.pp p { font-size: 0.95rem; line-height: 1.65; color: var(--ds-text-secondary); }
.pp ul { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; line-height: 1.7; color: var(--ds-text-secondary); }
@media (min-width: 1024px) { .pp { grid-template-columns: 0.75fr 1.25fr; gap: 3rem; padding: 3rem 0; } }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; border: 1px solid var(--hl-border); background: var(--ds-bg-surface); }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: 0.4rem 0.6rem; border-top: 1px solid var(--hl-border); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--ds-text-muted); }
.gallery.themes { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery.themes { grid-template-columns: repeat(2, 1fr); } }
.duo { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 0; list-style: none; }
.duo figure { margin: 0; border: 1px solid var(--hl-border); background: var(--ds-bg-surface); }
.duo img { display: block; width: 100%; height: auto; }
.duo figcaption { padding: 0.4rem 0.6rem; border-top: 1px solid var(--hl-border); font-size: 0.7rem; color: var(--ds-text-muted); }

/* ledger tables: what works where */
.table-wrap { overflow-x: auto; border: 1px solid var(--hl-border); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.compare th, .compare td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hl-border); border-right: 1px solid var(--hl-border); }
.compare th:last-child, .compare td:last-child { border-right: none; }
.compare tbody tr:last-child td, .compare tbody tr:last-child th { border-bottom: none; }
.compare thead th { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ds-text-muted); background: var(--ds-bg-surface); }
.compare tbody th { font-weight: 600; color: var(--ds-text-primary); white-space: nowrap; }
.compare td { color: var(--ds-text-secondary); }
.compare .yes { color: var(--ds-success); font-weight: 600; }
.compare .no-yet { color: var(--ds-text-muted); }

/* code */
.code { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; border: 1px solid var(--hl-border-strong); background: var(--ds-bg-surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.65; color: var(--ds-text-primary); tab-size: 2; }
.code .c { color: var(--ds-text-muted); }
.dev-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .dev-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.dev-grid h3 { margin-bottom: 0.5rem; font-family: var(--hl-serif); font-size: 1.15rem; font-weight: 600; }
.dev-grid p { margin-bottom: 0.9rem; font-size: 0.9rem; line-height: 1.65; color: var(--ds-text-secondary); }
.mini-list { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.875rem; line-height: 1.7; color: var(--ds-text-secondary); }
.note { margin-top: 1rem; font-size: 0.8rem; color: var(--ds-text-muted); }
.sub-head { margin: 3rem 0 1rem; font-family: var(--hl-serif); font-size: 1.15rem; font-weight: 600; }
.code-inline, .dev-grid code, .section-lead code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; padding: 0.05em 0.35em; border: 1px solid var(--hl-border); background: var(--ds-bg-surface); }
.code code { padding: 0; border: none; background: none; font-size: inherit; }
.cta-row.mt { margin-top: 1.25rem; }
.dev-grid > *, .pp > *, .hero > * { min-width: 0; }
.gallery.one { grid-template-columns: 1fr; max-width: 36rem; }

/* A prompt as the visitor would type it, under the chat demo's text. */
.prompt-eg { margin-top: 1rem; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; padding: 0.7rem 1rem; border: 1px solid var(--ds-border-muted); border-radius: 12px; background: var(--ds-bg-elevated); font-size: 1rem; color: var(--ds-text-primary); }
.prompt-eg span { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-text-muted); }

/* The link at the foot of each engine card to its module in Ail, and the small line above the sample buttons. */
.engine-go { display: inline-block; margin-top: 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--ds-accent); text-decoration: none; }
.engine-go:hover { color: var(--ds-accent-hover); text-decoration: underline; }
.mini-head { margin: 1.6rem 0 0.7rem; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ds-text-muted); }

/* The chat demo and the editor demo, one after the other. */
.demo-block { margin-top: 3rem; }
.demo-block:first-of-type { margin-top: 2rem; }
.demo-step { margin-bottom: 0.35rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-accent); }

/* Four engines read best as two by two, not three and one. */
@media (min-width: 1100px) { .engines.engines-four { grid-template-columns: repeat(2, 1fr); } }

/* Edit together: the one feature highlighted, a full row of the features grid, and a small "New" tag on its demo. */
.engines .engine.highlight { grid-column: 1 / -1; background: var(--ds-bg-surface); }
.engines .engine.highlight .no { color: var(--ds-accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }
.badge-new { margin-left: 0.5rem; padding: 0.1rem 0.45rem; border: 1px solid var(--ds-accent); color: var(--ds-accent); font-size: 0.65rem; letter-spacing: 0.08em; vertical-align: 1px; }
