/**
 * @license
 * MyFonts Webfont Build ID 3867246
 *
 * The fonts listed in this notice are subject to the End User License
 * Agreement(s) entered into by the website owner. All other parties are
 * explicitly restricted from using the Licensed Webfonts(s).
 *
 * You may obtain a valid license at the URLs below.
 *
 * Webfont: Catiler .Soft Regular by Gatype
 * URL: https://www.myfonts.com/collections/gatype-foundry
 *
 * © 2026 MyFonts Inc. */
@font-face {
  font-family: "Catiler Soft";
  src: url("assets/fonts/catiler-soft-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Layout: one 1200px column. Each concept is a diagram first and a few words second.
   Colors, corners, shadows and type follow the Local Code app (Libraries/Style/Sources/Color.swift): its cool grey ramp,
   inverted charcoal primary buttons, red as the brand color, and SF Pro everywhere except the display title. */
:root {
  /* App neutrals: secondary / tertiary / primary backgrounds, text and border tokens. */
  --page: #f4f5f6;
  --surface: #ffffff;
  --stage: #e8eaec;
  --ink: #252933;
  --label: #424755;
  --muted: #555e68;
  --faint: #8c97a4;
  --line: #dadde0;
  --line-strong: #b7bfc7;
  --hover: #e8eaec;
  --bubble: #f4f5f6;
  --focus: #38b4fc;

  /* Buttons: primaryFill / nonaryText, and the white secondary button. */
  --cta: #252933;
  --cta-ink: #ffffff;
  --button: #ffffff;
  --chip: #fafbfc;

  /* Banner cycle, from EmptyBannerController. Red is the brand color. */
  --red: #ff5e4d;
  --orange: #ec9711;
  --lime: #80bc1b;
  --mint: #00b782;
  --cyan: #00b4b4;
  --violet: #8f66ff;
  --pink: #f47dc1;
  --ok: #22bd21;

  /* Always-dark panels use the app's dark mode surfaces. */
  --dark: #131417;
  --dark-2: #1a1c1f;
  --on-dark: #dadde0;
  --on-dark-muted: #8c97a4;
  --on-dark-label: #b7bfc7;
  --on-dark-ok: #40be39;
  /* A card raised inside a dark panel: white here, the app's raised dark grey in dark mode. */
  --raised: #ffffff;
  --raised-ink: #252933;

  /* Panels that depict the app: chat canvas, sidebar panel, borders, text, code blocks. */
  --app-bg: #ffffff;
  --app-panel: #f4f5f6;
  --app-line: #dadde0;
  --app-text: #252933;
  --app-muted: #555e68;
  --code-bg: #f2f2f2;

  --font-display: "Catiler Soft", "Iowan Old Style", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* App corner radii: small buttons 8, fields 12, cards and bubbles 16, large cards 32. Buttons and pills are capsules. */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 32px;
  /* The composer's double shadow. */
  --shadow: 0 4px 6px -2px rgb(0 0 0 / .08), 0 8px 10px -4px rgb(0 0 0 / .05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #090a0b; --surface: #1a1c1f; --stage: #131417; --ink: #dadde0; --label: #b7bfc7; --muted: #b7bfc7; --faint: #8c97a4;
    --line: #252933; --line-strong: #424755; --hover: #252933; --bubble: #252933;
    --cta: #f4f5f6; --cta-ink: #252933; --button: #424755; --chip: #202329;
    --red: #e34a39; --orange: #e69105; --lime: #7bb612; --mint: #009f71; --cyan: #009c9d; --violet: #8f66ff; --pink: #eb74b8; --ok: #40be39;
    --raised: #252933; --raised-ink: #dadde0;
    --app-bg: #1a1c1f; --app-panel: #131417; --app-line: #252933; --app-text: #dadde0; --app-muted: #8c97a4; --code-bg: #212121;
    --shadow: 0 4px 6px -2px rgb(0 0 0 / .4), 0 8px 10px -4px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #090a0b; --surface: #1a1c1f; --stage: #131417; --ink: #dadde0; --label: #b7bfc7; --muted: #b7bfc7; --faint: #8c97a4;
  --line: #252933; --line-strong: #424755; --hover: #252933; --bubble: #252933;
  --cta: #f4f5f6; --cta-ink: #252933; --button: #424755; --chip: #202329;
  --red: #e34a39; --orange: #e69105; --lime: #7bb612; --mint: #009f71; --cyan: #009c9d; --violet: #8f66ff; --pink: #eb74b8; --ok: #40be39;
  --raised: #252933; --raised-ink: #dadde0;
  --app-bg: #1a1c1f; --app-panel: #131417; --app-line: #252933; --app-text: #dadde0; --app-muted: #8c97a4; --code-bg: #212121;
  --shadow: 0 4px 6px -2px rgb(0 0 0 / .4), 0 8px 10px -4px rgb(0 0 0 / .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
code { font: .88em var(--font-mono); background: var(--code-bg); padding: .08em .35em; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; text-wrap: balance; }
h3 { font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
.lede { font-size: 20px; line-height: 1.45; color: var(--muted); max-width: 30em; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 999px;
  font: 500 15px/1.2 var(--font-body); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--cta); color: var(--cta-ink); }
.button-primary:hover { background: color-mix(in srgb, var(--cta) 92%, black); }
.button-quiet { background: var(--button); color: var(--ink); border-color: var(--line); }
.button-quiet:hover { background: var(--hover); }
.button-large { min-height: 48px; padding: 12px 22px; font-size: 16px; }
.button[disabled] { opacity: .6; cursor: progress; }
.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-button:hover { background: var(--hover); }

/* Nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-inner { max-width: 1200px; margin-inline: auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; }
.nav-brand img { border-radius: 8px; }
.nav-brand span { font: 400 26px/1 var(--font-display); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--ink); background: var(--hover); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 920px) { .nav-links { display: none; } }
@media (max-width: 560px) { .nav-engineer { display: none; } .nav-brand span { display: none; } }

/* Hero */
.hero { padding-block: 72px 80px; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* App window */
.app-window {
  margin: 0; min-width: 0; background: var(--app-bg); color: var(--app-text);
  border: 1px solid var(--app-line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--app-line); background: var(--app-panel); }
.window-bar img { border-radius: 6px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--app-line); }
.window-title { font-weight: 600; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-ok { margin-left: auto; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.window-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--app-line); font-size: 12px; color: var(--app-muted); background: var(--app-panel); }

.thread { display: grid; align-content: start; gap: 10px; padding: 18px; font-size: 14.5px; line-height: 1.45; }
.msg { min-width: 0; }
.msg-user { justify-self: end; max-width: 85%; background: var(--bubble); color: var(--app-text); padding: 10px 14px; border-radius: 16px 16px 8px 16px; }
.msg-user code { background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; }
.msg-agent { justify-self: start; max-width: 88%; padding: 10px 14px; background: var(--app-panel); border-radius: 16px 16px 16px 4px; }
.tool {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 8px 12px; border: 1px solid var(--app-line); border-radius: var(--r-md); font-size: 13px;
  transition: border-color .35s ease, box-shadow .35s ease;
}
.tool-name { font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); padding: 6px 8px; border-radius: 6px; }
.tool-office .tool-name { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.tool-call { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.tool.is-active { border-color: color-mix(in srgb, var(--violet) 55%, var(--app-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 14%, transparent); }
.mini-chart { display: flex; align-items: end; gap: 5px; height: 26px; margin-left: auto; }
.mini-chart i { width: 14px; height: var(--h); border-radius: 3px 3px 0 0; background: var(--mint); }
.mini-chart i:nth-child(2) { background: var(--orange); }
.mini-chart i:nth-child(3) { background: var(--cyan); }
.mini-chart i:nth-child(4) { background: var(--violet); }

/* Sections */
.section { padding-block: 104px; }
.section-tint { background: var(--stage); }
.section-head { display: grid; gap: 14px; margin-bottom: 48px; }
.section h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
@media (max-width: 640px) { .section { padding-block: 72px; } }

/* Local execution */
.section-ink { background: var(--dark); color: var(--on-dark); }
/* On always-dark panels, buttons switch to the app's dark-mode primary (near-white on charcoal). */
.section-ink, .layer-1, .plan, .price-feature, .chat-head { --cta: #f4f5f6; --cta-ink: #252933; --hover: #252933; }
.section-ink .eyebrow { color: var(--on-dark-label); }
/* The scene: your Mac as a boundary (styled like the Security layers), the internet link, and the cloud outside it. */
.device { display: grid; grid-template-columns: minmax(0, 1fr) clamp(72px, 10vw, 128px) 200px; align-items: start; }
/* The link and the cloud line up with the row of nodes, a fixed distance below the panel's top edge:
   border 2 + padding 18 + head 24 + flow margin 44 + half an icon 32. Label wrapping only changes the panel's height. */
.device { --row-y: 120px; }

.zone {
  margin: 0; min-width: 0; padding: 18px 22px 8px; border-radius: var(--r-xl);
  background: var(--dark-2); border: 2px solid rgb(218 221 224 / .3); transition: border-color .2s ease;
}
.zone:hover { border-color: var(--on-dark-label); }
.zone-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 24px; }
.zone-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-label); }
.zone-status { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wifi { width: 18px; height: 18px; flex: none; fill: var(--on-dark); stroke: var(--on-dark); stroke-width: 2; stroke-linecap: round; }
.wifi-arcs { fill: none; transition: opacity .3s ease; }
.wifi-slash { display: none; stroke: var(--red); }
.device[data-wifi="off"] .wifi-arcs { opacity: .3; }
.device[data-wifi="off"] .wifi-slash { display: inline; }
.device-status { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--on-dark-ok); background: color-mix(in srgb, var(--on-dark-ok) 16%, transparent); transition: color .3s ease, background-color .3s ease; }

.flow-wrap { position: relative; margin: 44px 24px 48px; }
.flow-wrap { --flow-gap: 12px; }
.flow { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--flow-gap); }
.flow li { display: grid; justify-items: center; gap: 12px; text-align: center; font-weight: 600; font-size: 15px; }
.flow-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-lg);
  background: var(--dark); border: 1.5px solid rgb(218 221 224 / .3); color: var(--on-dark);
  box-shadow: 0 4px 6px -2px rgb(0 0 0 / .3);
  transition: border-color .3s ease, color .3s ease, background-color .3s ease;
}
.flow-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The packet runs between the first and last icon centers. With four columns and three gaps, a column's center
   sits (100% - 3 gaps) / 8 in from each end. */
.flow-track { position: absolute; left: calc((100% - 3 * var(--flow-gap)) / 8); right: calc((100% - 3 * var(--flow-gap)) / 8); top: 31px; height: 2px; background: rgb(218 221 224 / .2); }
.flow-packet { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--on-dark-label); box-shadow: 0 0 0 6px rgb(183 191 199 / .2); animation: packet-x 3.6s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes packet-x { 0% { left: 0; } 50% { left: 100%; } 100% { left: 0; } }

/* The internet link leaves the Mac's edge at the node row and runs into the cloud's left edge; Wi-Fi off cuts it. */
.uplink { position: relative; height: 2px; margin: calc(var(--row-y) - 1px) -19px 0 0; }
.uplink-line { position: absolute; inset: 0; background: repeating-linear-gradient(to right, rgb(140 151 164 / .45) 0 6px, transparent 6px 12px); }
.uplink-label { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.uplink-break { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--dark); border: 1.5px solid var(--red); color: var(--red); font-size: 11px; line-height: 1; }

/* The outline's widest point and the text sit 80px down the box; the outline leans 3px right, hence the left padding. */
.cloud { position: relative; display: grid; place-content: center; justify-items: center; gap: 2px; width: 200px; aspect-ratio: 120 / 80; margin-top: calc(var(--row-y) - 80px); padding: 14% 0 0 6px; text-align: center; opacity: .5; transition: opacity .3s ease; }
.cloud-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cloud-shape path { fill: rgb(218 221 224 / .04); stroke: var(--on-dark-muted); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; transition: stroke .3s ease, fill .3s ease; }
.cloud-title { position: relative; font-weight: 600; font-size: 15px; }
.cloud-note { position: relative; font-size: 12px; color: var(--on-dark-muted); }

.device[data-cloud="on"] .cloud { opacity: 1; }
.device[data-cloud="on"] .cloud-shape path { stroke: var(--orange); stroke-dasharray: none; fill: color-mix(in srgb, var(--orange) 10%, transparent); }
.device[data-cloud="on"] .uplink-line { background: repeating-linear-gradient(to right, var(--orange) 0 6px, transparent 6px 12px); background-size: 24px 2px; animation: dash .8s linear infinite; }
.device[data-cloud="on"] .flow-model .flow-icon { border: 1.5px dashed var(--orange); color: var(--orange); background: transparent; box-shadow: none; }
.device[data-cloud="on"] .device-status { color: var(--orange); background: color-mix(in srgb, var(--orange) 16%, transparent); }
.device[data-wifi="off"] .uplink-break { display: grid; }
.device[data-wifi="off"] .uplink-line { animation: none; background: repeating-linear-gradient(to right, rgb(140 151 164 / .3) 0 6px, transparent 6px 12px); }
.device[data-wifi="off"] .device-status { color: var(--on-dark-label); background: rgb(183 191 199 / .14); }
.device[data-cloud="on"][data-wifi="off"] .cloud-shape path { stroke: var(--red); fill: transparent; }
.device[data-cloud="on"][data-wifi="off"] .device-status { color: var(--red); background: color-mix(in srgb, var(--red) 16%, transparent); }
@keyframes dash { to { background-position: 24px 0; } }

.switches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: var(--r-lg); background: rgb(218 221 224 / .06); border: 1px solid rgb(218 221 224 / .14); cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-ui { flex: none; width: 44px; height: 26px; border-radius: 999px; background: rgb(218 221 224 / .2); position: relative; transition: background-color .2s ease; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--on-dark); transition: transform .2s ease; }
.switch input:checked + .switch-ui { background: var(--red); }
#cloud-toggle:checked + .switch-ui { background: var(--orange); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--on-dark-label); outline-offset: 2px; }
.switch-text { display: grid; font-size: 14px; color: var(--on-dark-muted); }
.switch-text strong { color: var(--on-dark); font-size: 15px; }

@media (max-width: 900px) {
  .device { grid-template-columns: 1fr; justify-items: center; }
  .zone { width: 100%; }
  /* Stacked: the link drops from the panel's bottom edge into the cloud's top. The outline leans 3px right, so the
     cloud shifts left to center its body under the link. */
  .uplink { width: 2px; height: 64px; margin: 0 0 -8px; }
  .cloud { margin: 0 0 0 -6px; }
  .uplink-line { background: repeating-linear-gradient(to bottom, rgb(140 151 164 / .45) 0 6px, transparent 6px 12px); }
  .device[data-cloud="on"] .uplink-line { background: repeating-linear-gradient(to bottom, var(--orange) 0 6px, transparent 6px 12px); background-size: 2px 24px; animation-name: dash-y; }
  .device[data-wifi="off"] .uplink-line { background: repeating-linear-gradient(to bottom, rgb(140 151 164 / .3) 0 6px, transparent 6px 12px); }
  .uplink-label { bottom: auto; top: 50%; left: 16px; right: auto; transform: translateY(-50%); }
  .device[data-wifi="off"] .uplink-label { left: 22px; }
}
@keyframes dash-y { to { background-position: 0 24px; } }
@media (max-width: 720px) {
  .zone { padding: 14px 12px 4px; border-radius: 24px; }
  .flow-wrap { margin: 32px 6px 32px; }
  .flow-wrap { --flow-gap: 4px; }
  .flow li { gap: 8px; font-size: 12px; line-height: 1.3; }
  .flow-icon { width: 42px; height: 42px; border-radius: 12px; }
  .flow-icon svg { width: 20px; height: 20px; }
  .flow-track { top: 20px; }
}

/* Security: nested layers */
.security { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.layer { position: relative; border-radius: var(--r-xl); padding: 44px 22px 22px; transition: border-color .2s ease; }
.layer-label { position: absolute; top: 14px; left: 22px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.layer-1 { background: var(--dark); color: var(--on-dark); border: 2px solid var(--dark); }
.layer-1 > .layer-label { color: var(--on-dark-label); }
.layer-2 { background: var(--dark-2); border: 2px solid rgb(218 221 224 / .3); border-radius: 24px; }
.layer-2 > .layer-label { color: var(--on-dark-muted); }
.layer-3 { background: var(--raised); color: var(--raised-ink); border-radius: 16px; padding-block: 44px 28px; }
.layer-3 > .layer-label { color: var(--raised-ink); }
.layer:hover { border-color: var(--on-dark-label); }
.agent { display: grid; justify-items: center; gap: 6px; font-weight: 650; }
.agent img { border-radius: 50%; background: #faf3e2; } /* the monkey art's own cream */
.rules { display: grid; gap: 28px; }
.rules-head { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.rules ul { display: grid; gap: 10px; }
.rules li { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; }
.rules li::before { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; font-weight: 700; }
.rule-yes::before { content: "✓"; color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.rule-no::before { content: "✕"; color: var(--red); background: color-mix(in srgb, var(--red) 13%, transparent); }
.rule-no { color: var(--muted); }
@media (max-width: 860px) { .security { grid-template-columns: 1fr; } }

/* Models: memory fit grid. One row per model, one column per Mac memory size. */
.fit { display: grid; gap: 6px; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.fit-head, .fit-row { display: grid; grid-template-columns: minmax(210px, 1.6fr) repeat(9, minmax(0, 1fr)); gap: 6px; align-items: center; }
.fit-corner { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fit-col {
  font: 600 14px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--muted);
  padding: 10px 0; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.fit-col span { font-weight: 400; font-size: 11px; }
.fit-col:hover { color: var(--ink); background: var(--hover); }
.fit-col[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.fit-row { padding-block: 6px; border-top: 1px solid var(--line); }
.fit-label { display: grid; min-width: 0; padding-right: 8px; }
.fit-label strong { font: 600 18px/1.2 var(--font-body); letter-spacing: -.015em; white-space: nowrap; }
.fit-label .fit-req { color: var(--ink); font-size: 13.5px; margin-top: 2px; }
.fit-req b { font-weight: 600; color: var(--muted); }
.fit-label span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fit-cell { height: 44px; border-radius: 8px; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.fit-cell.is-none { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--line) 70%, transparent) 5px 6px); border: 1px dashed var(--line); }
.fit-cell.is-min { background-color: color-mix(in srgb, var(--tone) 30%, var(--surface)); }
.fit-cell.is-rec { background-color: color-mix(in srgb, var(--tone) 62%, var(--surface)); }
.fit-cell.is-full { background-color: var(--tone); }
/* Hatching marks the sizes where part of the model streams from the SSD. */
.fit-cell.is-stream, .swatch.is-stream { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .55) 0 3px, transparent 3px 9px); }
.fit-cell.is-selected { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.fit-status { grid-column: 2 / -1; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.fit-status strong { color: var(--ink); font-weight: 600; }
.fit-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.fit-legend li { display: flex; align-items: center; gap: 8px; }
.swatch { --tone: var(--violet); width: 22px; height: 14px; border-radius: 4px; }
.swatch.is-min { background-color: color-mix(in srgb, var(--tone) 30%, var(--surface)); }
.swatch.is-rec { background-color: color-mix(in srgb, var(--tone) 62%, var(--surface)); }
.swatch.is-full { background-color: var(--tone); }
.fit-note { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 46em; }
@media (max-width: 720px) {
  .fit { padding: 14px; }
  .fit-head, .fit-row { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
  .fit-corner { grid-column: 1 / -1; }
  .fit-label { grid-column: 1 / -1; padding-top: 6px; }
  .fit-status { grid-column: 1 / -1; }
  .fit-col { font-size: 12px; padding: 8px 0; }
  .fit-col span { display: none; }
  .fit-cell { height: 34px; border-radius: 6px; }
}
.providers { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 36px; }
.providers p { font-weight: 600; color: var(--muted); }
.providers ul { display: flex; flex-wrap: wrap; gap: 8px; }
.providers li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }

/* Built-in skills: a replayed thread on the left, its result building on the right. */
.work { display: grid; gap: 16px; }
.work-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.work-tabs::-webkit-scrollbar { display: none; }
.work-tab {
  display: grid; gap: 4px; flex: none; text-align: left; padding: 10px 14px; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: 600 15px/1.2 var(--font-body);
  transition: border-color .15s ease, background-color .15s ease;
}
.work-tab code { padding: 0; background: none; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.work-tab:hover { border-color: var(--muted); }
.work-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }
.work-tab[aria-selected="true"] code { color: color-mix(in srgb, var(--page) 70%, transparent); }

.work-window .pill { transition: color .3s ease, background-color .3s ease; }
.work-window .pill.is-online { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.work-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); height: 480px; }
.work-thread { overflow: hidden; border-right: 1px solid var(--app-line); }
.work-thread > li { animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.act { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--app-muted); }
.act strong { color: var(--app-text); }
.act code { overflow-wrap: anywhere; font-size: 12px; }
.act-state { flex: none; position: relative; top: 2px; width: 12px; height: 12px; border-radius: 50%; }
.act.is-running .act-state { border: 2px solid color-mix(in srgb, var(--violet) 30%, transparent); border-top-color: var(--violet); animation: spin .7s linear infinite; }
.act.is-done .act-state { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 6.2 5.2 8l3.6-4' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

.work-output { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 12px; padding: 24px; background: var(--app-panel); overflow: hidden; }
.out-file { justify-self: center; font: 12px var(--font-mono); color: var(--app-muted); opacity: 0; transition: opacity .4s ease; }
.work-output.is-done .out-file { opacity: 1; }

/* Charts: bars grow when the script runs; the flag lands when the image is viewed. */
.out-chart { margin: 0; display: grid; gap: 14px; padding: 18px; border-radius: var(--r-md); background: var(--app-bg); border: 1px solid var(--app-line); }
.out-chart figcaption { display: flex; justify-content: space-between; font-size: 13px; color: var(--app-muted); }
.out-chart figcaption strong { color: var(--app-text); }
.bars { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 6px; height: 240px; padding: 36px 0 20px; border-bottom: 1px solid var(--app-line); }
.bar { position: relative; height: 0; border-radius: 4px 4px 0 0; background: var(--cyan); transition: height .7s cubic-bezier(.2, .8, .2, 1) var(--d); }
.bar i { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--app-muted); }
.s3 .bar { height: var(--h); }
.bar.is-flag { background: var(--cyan); transition: height .7s cubic-bezier(.2, .8, .2, 1) var(--d), background-color .3s ease; }
.s4 .bar.is-flag { background: var(--red); }
.flag { position: absolute; left: 37%; top: 0; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--app-bg)); opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease; }
.s4 .flag { opacity: 1; transform: none; }

/* Slide decks: slides appear once the build runs; the PDF check outlines them. */
.out-deck { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slide { position: relative; aspect-ratio: 16 / 9; padding: 8% 9%; border-radius: 6px; background: var(--app-bg); border: 1px solid var(--app-line); box-shadow: 0 1px 3px rgb(0 0 0 / .08); display: grid; align-content: start; gap: 6%; opacity: 0; transform: scale(.94); transition: opacity .35s ease var(--d), transform .35s ease var(--d), border-color .3s ease; }
.slide b { position: absolute; right: 6%; bottom: 5%; font-size: 9px; font-weight: 600; color: var(--app-muted); }
.slide i { display: block; height: 7px; border-radius: 3px; background: var(--app-line); }
.slide i:first-of-type { width: 60%; height: 9px; background: var(--app-text); opacity: .75; }
.slide i:nth-of-type(2) { width: 80%; }
.slide i:nth-of-type(3) { width: 45%; }
.slide-title { background: var(--dark); align-content: center; }
.slide-title i:first-of-type { background: var(--on-dark); width: 70%; height: 12px; }
.slide-title i:nth-of-type(n+2) { background: rgb(218 221 224 / .3); }
.slide-kpi i:nth-of-type(3) { width: 30%; height: 22px; background: var(--mint); }
.slide-chart::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: 14%; height: 38%; background: linear-gradient(to right, var(--cyan) 0 14%, transparent 14% 22%, var(--cyan) 22% 36%, transparent 36% 44%, var(--orange) 44% 58%, transparent 58% 66%, var(--cyan) 66% 80%, transparent 80% 88%, var(--cyan) 88%); clip-path: polygon(0 50%, 14% 50%, 14% 100%, 22% 100%, 22% 30%, 36% 30%, 36% 100%, 44% 100%, 44% 0, 58% 0, 58% 100%, 66% 100%, 66% 40%, 80% 40%, 80% 100%, 88% 100%, 88% 20%, 100% 20%, 100% 100%, 0 100%); }
.slide-split::after { content: ""; position: absolute; right: 9%; top: 18%; width: 34%; bottom: 18%; border-radius: 4px; background: linear-gradient(135deg, var(--violet), var(--pink)); opacity: .8; }
.slide-split i { width: 45% !important; }
.slide-end { background: var(--red); align-content: center; justify-items: center; }
.slide-end i { background: rgb(255 255 255 / .55) !important; opacity: 1 !important; }
.s3 .slide { opacity: 1; transform: none; }
.s5 .slide { border-color: color-mix(in srgb, var(--ok) 60%, var(--app-line)); }

/* Websites: the page draws, gets styled, then the URL goes live. */
.out-site { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--app-line); background: var(--app-bg); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.site-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--app-line); }
.site-url { position: relative; flex: 1; min-width: 0; height: 24px; border-radius: 6px; background: var(--app-panel); font: 12px/24px var(--font-mono); color: var(--app-muted); text-align: center; overflow: hidden; }
.site-url span { position: absolute; inset: 0; transition: opacity .3s ease, transform .3s ease; }
.url-live { opacity: 0; transform: translateY(100%); color: var(--app-text); }
.s4 .url-local { opacity: 0; transform: translateY(-100%); }
.s4 .url-live { opacity: 1; transform: none; }
.s4 .url-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--ok); }
.site-page { display: grid; gap: 10px; padding: 26px 26px 30px; opacity: 0; transition: opacity .4s ease, background-color .5s ease, color .5s ease; font-family: var(--font-body); color: var(--app-text); }
.r1 .site-page { opacity: .5; }
.s1 .site-page { opacity: 1; }
.s2 .site-page { background: #fbf3e6; color: #3b2417; font-family: Georgia, "Times New Roman", serif; }
.site-kicker { font: 600 11px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.site-title { font-size: 30px; line-height: 1.05; }
.site-menu { display: grid; gap: 6px; margin-top: 4px; font: 14px/1.4 var(--font-body); }
.site-menu li { display: flex; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid currentColor; border-bottom-color: color-mix(in srgb, currentColor 18%, transparent); }
.site-button { justify-self: start; margin-top: 8px; padding: 8px 14px; border-radius: 8px; font: 600 13px/1 var(--font-body); border: 1px solid currentColor; transition: background-color .5s ease, color .5s ease, border-color .5s ease; }
.s2 .site-button { background: #c2562d; border-color: #c2562d; color: #fff; }

/* Video: clips land on the timeline, the render bar fills, then it plays. */
.out-video { display: grid; gap: 10px; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: radial-gradient(120% 120% at 20% 10%, #2d2160 0%, #120d2a 60%, #07050f 100%); }
.scene { position: absolute; inset: 0; display: grid; place-items: center; font: 600 clamp(1.3rem, 2.4vw, 2rem)/1 var(--font-body); letter-spacing: -.02em; color: #fff; opacity: 0; }
.render-bar { position: absolute; left: 12%; right: 12%; bottom: 14%; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .15); opacity: 0; transition: opacity .3s ease; }
.render-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; }
.r4 .render-bar { opacity: 1; }
.r4 .render-bar i { animation: fill 1.4s linear forwards; }
.s4 .render-bar { opacity: 0; }
@keyframes fill { to { width: 100%; } }
.s4 .scene { animation: scene 6s linear infinite; }
.s4 .scene-2 { animation-delay: 2s; }
.s4 .scene-3 { animation-delay: 4s; }
@keyframes scene { 0% { opacity: 0; transform: scale(.96); } 5%, 30% { opacity: 1; transform: none; } 35%, 100% { opacity: 0; } }
.timeline { position: relative; display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: var(--app-bg); border: 1px solid var(--app-line); }
.track { position: relative; height: 22px; }
.track span { position: absolute; top: 0; bottom: 0; left: var(--x); width: calc(var(--w) - 3px); padding: 0 8px; border-radius: 5px; font: 600 11px/22px var(--font-body); color: #fff; background: var(--violet); white-space: nowrap; overflow: hidden; transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.track span:nth-child(2) { background: var(--pink); transition-delay: .12s; }
.track span:nth-child(3) { background: var(--orange); transition-delay: .24s; }
.track-audio span { background: color-mix(in srgb, var(--mint) 70%, var(--app-bg)); }
.s2 .track span { transform: none; }
.playhead { position: absolute; top: 4px; bottom: 4px; left: 10px; width: 2px; background: var(--red); opacity: 0; }
.s4 .playhead { opacity: 1; animation: playhead 6s linear infinite; }
@keyframes playhead { to { left: calc(100% - 12px); } }

/* Images: four renders resolve out of noise while draw-things-cli runs. */
.out-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: min(100%, 480px); justify-self: center; }
.shot {
  --mug: #efe7d8; --mug-shade: #c9bfae;
  position: relative; aspect-ratio: 5 / 4; border-radius: 8px; overflow: hidden;
  background:
    radial-gradient(60% 40% at 78% 8%, rgb(255 240 210 / .55), transparent 70%),
    linear-gradient(to bottom, #d9d2c7 0 52%, transparent 52%),
    linear-gradient(168deg, transparent 0 58%, rgb(120 120 130 / .18) 59%, transparent 61%),
    linear-gradient(176deg, transparent 0 70%, rgb(120 120 130 / .14) 71%, transparent 72.5%),
    linear-gradient(to bottom, #f4f2ee, #e3e0da);
  filter: blur(14px) saturate(.4); transition: filter 1.2s ease var(--d);
}
.shot-terracotta { --mug: #c86a45; --mug-shade: #8f4026; }
.shot-sage { --mug: #a9bf9a; --mug-shade: #6f8a62; }
.shot-navy { --mug: #2c3e5c; --mug-shade: #16233a; }
.mug {
  position: absolute; left: 30%; bottom: 22%; width: 34%; height: 38%; border-radius: 6% 6% 18% 18% / 4% 4% 14% 14%;
  background: linear-gradient(to right, var(--mug-shade), var(--mug) 30%, color-mix(in srgb, var(--mug) 70%, white) 48%, var(--mug) 62%, var(--mug-shade));
  box-shadow: 14px 10px 18px -6px rgb(40 30 20 / .35);
}
.mug::before { content: ""; position: absolute; top: -4%; left: 0; right: 0; height: 12%; border-radius: 50%; background: radial-gradient(ellipse at center, #3b2414 0 55%, var(--mug-shade) 58% 100%); }
.mug::after { content: ""; position: absolute; right: -30%; top: 20%; width: 36%; height: 44%; border: 6px solid var(--mug); border-left: 0; border-radius: 0 50% 50% 0; box-shadow: 3px 3px 6px -3px rgb(40 30 20 / .4); }
.noise { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); mix-blend-mode: overlay; opacity: 1; transition: opacity 1.2s ease var(--d); }
.r2 .shot { filter: blur(5px) saturate(.8); }
.s2 .shot { filter: none; }
.s2 .noise { opacity: .06; }

/* Scheduling: the solver fills the grid; the rules check off. */
.out-rota { display: grid; gap: 14px; }
.rota-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--app-muted); opacity: 0; transition: opacity .3s ease; }
.rota-head .sat { padding: 3px 8px; border-radius: 6px; font: 600 12px var(--font-mono); color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.s1 .rota-head { opacity: 1; }
.rota-grid { display: grid; grid-template-columns: auto repeat(7, 1fr); gap: 4px; font-size: 12px; }
.rota-grid b { font-weight: 600; color: var(--app-muted); text-align: center; align-self: center; padding: 2px 6px 2px 0; }
.who { display: grid; place-items: center; height: 38px; border-radius: 6px; font-weight: 600; color: transparent; background: var(--app-bg); border: 1px dashed var(--app-line); transition: background-color .25s ease var(--d), color .25s ease var(--d), border-color .25s ease var(--d); }
.r1 .who { animation: shuffle .5s steps(3) infinite; }
@keyframes shuffle { 50% { background: color-mix(in srgb, var(--violet) 10%, var(--app-bg)); } }
.s1 .who { animation: none; color: var(--app-text); border: 1px solid transparent; }
.s1 .who-ana { background: color-mix(in srgb, var(--red) 20%, var(--app-bg)); }
.s1 .who-ben { background: color-mix(in srgb, var(--orange) 22%, var(--app-bg)); }
.s1 .who-chen { background: color-mix(in srgb, var(--mint) 20%, var(--app-bg)); }
.s1 .who-dev { background: color-mix(in srgb, var(--cyan) 20%, var(--app-bg)); }
.s1 .who-eli { background: color-mix(in srgb, var(--violet) 20%, var(--app-bg)); }
.rota-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.rota-rules li { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--app-muted); border: 1px solid var(--app-line); transition: color .3s ease, border-color .3s ease; }
.s1 .rota-rules li { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--app-line)); }
.s1 .rota-rules li::before { content: "✓ "; }

@media (max-width: 860px) {
  .work-body { grid-template-columns: 1fr; height: auto; }
  .work-thread { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--app-line); }
  .work-output { padding: 16px; }
  .bars { height: 190px; }
  .flag { left: 30%; }
  .who { height: 30px; font-size: 11px; }
}
@media (max-width: 480px) { .rota-grid { font-size: 10px; } .rota-grid b { padding-right: 2px; } }

/* Portal */
.portal { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.portal-form { display: grid; gap: 14px; }
.step { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: 12px; min-width: 0; }
.step legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; padding: 0; }
.step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--page); font-size: 13px; font-weight: 700; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--page); font-size: 14px; font-weight: 500; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.chip input:checked + span { background: var(--ink); color: var(--page); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip:hover span { border-color: var(--muted); }
select, input, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--page);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.field em { font-style: normal; font-weight: 400; }
.field input[aria-invalid="true"] { border-color: var(--red); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { font-size: 15px; color: var(--muted); }
.form-status.is-error { color: var(--red); }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

.plan { position: sticky; top: 84px; display: grid; gap: 14px; padding: 26px; border-radius: var(--r-xl); background: var(--dark); color: var(--on-dark); border: 1px solid rgb(218 221 224 / .12); box-shadow: var(--shadow); }
.plan-label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-label); }
.plan-model { font: 600 clamp(1.6rem, 2.6vw, 2rem)/1.15 var(--font-body); letter-spacing: -.02em; }
.plan-path { color: var(--on-dark-muted); font-size: 15px; }
.plan-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding-block: 16px; border-block: 1px solid rgb(218 221 224 / .16); }
.plan-specs dt { font-size: 12px; color: var(--on-dark-muted); }
.plan-specs dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.plan-celebrate { width: 140px; height: 105px; justify-self: center; }
/* One column: the plan moves above the form and sticks under the nav, so it stays in view while editing. */
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; gap: 16px; }
  .plan { order: -1; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 68px); gap: 8px; padding: 14px 18px; border-radius: var(--r-lg); }
  .plan-label { font-size: 11px; }
  .plan-model { font-size: 1.45rem; }
  .plan-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-block: 10px; }
  .plan-specs dd { font-size: 13px; line-height: 1.3; }
  .plan-path { font-size: 13px; }
  .plan-celebrate { display: none; }
}
@media (max-width: 560px) { .plan-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.price { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); }
.price p { color: var(--muted); }
.price .price-figure { font: 600 44px/1 var(--font-body); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--ink); margin-block: 4px; }
/* A hairline keeps dark cards visible on the dark page and tinted sections in dark mode. */
.price-feature { background: var(--dark); color: var(--on-dark); border-color: rgb(218 221 224 / .12); }
.price-feature p { color: var(--on-dark-muted); }
.price-feature .price-figure { color: var(--on-dark); }
.price-feature .button { margin-top: auto; align-self: flex-start; }
@media (max-width: 860px) { .prices { grid-template-columns: 1fr; } }

/* Closing + footer */
.closing { padding-block: 104px; text-align: center; }
.closing-inner { display: grid; justify-items: center; gap: 16px; }
.closing-icon { border-radius: 22px; box-shadow: var(--shadow); }
.closing h2 { font-size: clamp(2.6rem, 5vw, 4rem); }
.closing p { color: var(--muted); font-size: 18px; }
.footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer ul { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

/* Chat */
.chat-launcher {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: var(--dark); color: var(--on-dark); border: 0; cursor: pointer; box-shadow: var(--shadow);
  font: 600 15px var(--font-body); transition: transform .2s ease;
}
.chat-launcher:hover { transform: translateY(-2px); }
.chat-launcher img { border-radius: 50%; background: var(--on-dark); }
.chat-launcher[aria-expanded="true"] { display: none; }
.chat-launcher.has-reply::after { content: ""; position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--cta); border: 2px solid var(--dark); }
@media (max-width: 560px) {
  .chat-launcher { right: 16px; padding: 6px; }
  .chat-launcher span { display: none; }
}
.chat {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 41;
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 110px));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden;
  transform-origin: bottom right; animation: chat-in .22s ease-out;
}
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (max-width: 560px) { .chat { right: 16px; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--dark); color: var(--on-dark); }
.chat-head img { border-radius: 50%; background: var(--on-dark); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-title { font-weight: 650; }
.chat-sub { font-size: 13px; color: var(--on-dark-muted); }
.chat-head .icon-button { color: var(--on-dark); border-color: rgb(218 221 224 / .25); }
.chat-head .icon-button:hover { background: rgb(218 221 224 / .1); }
.chat-log { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; animation: bubble-in .2s ease-out; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } }
.bubble-bot { background: var(--hover); border-bottom-left-radius: 8px; }
.bubble-engineer { background: color-mix(in srgb, var(--violet) 16%, var(--surface)); border-bottom-left-radius: 4px; }
.bubble-me { align-self: flex-end; background: var(--bubble); color: var(--ink); border: 1px solid var(--line); border-bottom-right-radius: 8px; }
.bubble-name { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.chat-note { align-self: center; font-size: 12.5px; color: var(--muted); text-align: center; padding: 2px 8px; }
.chat-note.is-error { color: var(--red); }
.chat-note a { color: inherit; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-quick:empty { display: none; }
.chat-quick button { font: 500 13.5px var(--font-body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--page); color: var(--ink); cursor: pointer; }
.chat-quick button:hover { border-color: var(--muted); }
.chat-quick .is-human { background: var(--ink); color: var(--page); border-color: var(--ink); }
.chat-handoff { display: grid; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-handoff > p { font-size: 14px; color: var(--muted); }
.handoff-actions { display: flex; justify-content: flex-end; gap: 8px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { border-radius: 999px; padding-inline: 16px; }
.chat-input .send { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--cta); color: var(--cta-ink); border: 0; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { transform: translateY(-3px); opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flow-packet { display: none; }
}
