/* KidsWatch for Plex project site. Same tokens as the app (app/static/style.css), system fonts only. */
:root {
  color-scheme: light dark;
  --bg: #f7f4f0;
  --surface: #ffffff;
  --surface-2: #f2ede7;
  --ink: #15171c;
  --ink-2: #433d37;
  --muted: #6a635b;
  --line: #e8e1d8;
  --line-strong: #d6ccc0;
  --brand: #c2410c;  /* deep orange: passes WCAG AA for text and for white text on buttons */
  --brand-hover: #a8370a;
  --brand-ink: #ffffff;
  --brand-soft: #fff0e6;
  --ok: #137a48;
  --ok-soft: #e6f5ec;
  --stop: #c3262e;
  --stop-soft: #fdeceb;
  --info: #1f5fbf;
  --info-soft: #e8f0fc;
  --bar: #cbbcad;
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --focus: 0 0 0 3px rgba(194, 65, 12, .3);
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .875rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --gap: clamp(64px, 9vw, 112px);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12100e;
    --surface: #1a1714;
    --surface-2: #23201c;
    --ink: #efeae4;
    --ink-2: #d2cac0;
    --muted: #a69d93;
    --line: #2e2924;
    --line-strong: #3c352e;
    --brand: #ff7a33;
    --brand-hover: #ff8e52;
    --brand-ink: #14100c;
    --brand-soft: #33200f;
    --ok: #5fd39a;
    --ok-soft: #12291d;
    --stop: #ff8a85;
    --stop-soft: #351719;
    --info: #8fb8ff;
    --info-soft: #172338;
    --bar: #5b5047;
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --focus: 0 0 0 3px rgba(255, 122, 51, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); border-top: 5px solid var(--brand); }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.page { width: min(100% - 40px, 1040px); margin-inline: auto; }

/* ---------- header and footer ---------- */
.site-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: var(--fs-lg); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { display: block; }
.brand span { color: var(--muted); font-weight: 600; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: var(--fs-md); font-weight: 600; text-decoration: none; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.site-footer { display: grid; gap: 6px; margin-top: var(--gap); padding-block: 28px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px; }
.site-footer a { color: var(--ink-2); font-weight: 600; }
@media (max-width: 720px) {
  .site-header { padding-block: 14px 8px; }
  .site-nav { flex-basis: 100%; margin: 0 -12px; }
}
@media (max-width: 480px) {
  .site-nav .wide { display: none; }  /* GitHub stays in the footer and page body */
}

/* ---------- buttons, badges, avatars (as in the app) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; text-decoration: none; }
a.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary, a.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
a.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: var(--fs-lg); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; font-style: normal;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.info, .badge.live { background: var(--info-soft); color: var(--info); }
.badge.new { background: var(--brand); color: var(--brand-ink); }
.badge.new::before { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 700; color: #fff; background: #1f7a5a; font-size: var(--fs-lg); }
.today-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.big { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.of-limit { color: var(--muted); font-weight: 600; font-size: var(--fs-lg); }
.meter { width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); appearance: none; -webkit-appearance: none; display: block; margin: 10px 0 8px; }
.meter::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; margin: 4px 0 8px; }
.chart .bar { fill: var(--bar); }
.chart .bar.today { fill: var(--brand); }
.chart .bar.over { fill: var(--stop-soft); stroke: var(--stop); stroke-width: 1.5; }
.chart .limit { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis.today { fill: var(--ink); font-weight: 700; }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }

/* ---------- hero ---------- */
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.3rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding: 32px 0 8px; }
.hero.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; padding-bottom: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.eyebrow .icon { width: 16px; height: 16px; color: var(--brand); }
.lead { color: var(--muted); font-size: var(--fs-xl); line-height: 1.5; margin: 20px 0 30px; max-width: 36ch; text-wrap: pretty; }
.hero.solo .lead { max-width: 52ch; margin-bottom: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; }
.fine { color: var(--muted); font-size: var(--fs-sm); margin: 18px 0 0; max-width: 48ch; }

/* hero picture: a phone showing a child's Today card */
.hero-art, .stage { user-select: none; -webkit-user-select: none; }
.hero-art { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 8px 0 40px; }
.hero-art::before { content: ""; position: absolute; inset: -8% 0 0; border-radius: 50%; background: radial-gradient(closest-side, var(--brand-soft), transparent); }
.phone { position: relative; width: min(310px, 100%); display: grid; gap: 10px; padding: 10px 12px 18px; border-radius: 40px; background: var(--bg);
  border: 9px solid #1c1a18; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong); }
.phone-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 2px 12px 4px; font-size: 12px; font-weight: 700; }
.phone-bar i { width: 72px; height: 20px; border-radius: 999px; background: #1c1a18; }
.kid { display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.kid strong { display: block; font-size: var(--fs-lg); line-height: 1.2; }
.kid div span { color: var(--muted); font-size: var(--fs-sm); }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.card { padding: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.card-title .icon { color: var(--muted); }
.card-title .muted { margin-left: auto; font-weight: 400; font-size: var(--fs-sm); }
.status { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; color: var(--ink-2); font-size: var(--fs-md); white-space: nowrap; overflow: hidden; }
.status span:last-child { overflow: hidden; text-overflow: ellipsis; }
.btns { display: flex; gap: 8px; }
.card.row { display: flex; align-items: baseline; gap: 8px; }
.card.row .badge { margin-left: auto; align-self: center; }
.num { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.toast { position: absolute; left: 0; bottom: 6px; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: var(--fs-md); font-weight: 500; white-space: nowrap; }
.toast b { margin-left: 6px; padding: 3px 10px; border: 1px solid currentColor; border-radius: 8px; font-weight: 600; }

/* ---------- sections ---------- */
.section { padding-top: var(--gap); scroll-margin-top: 20px; }
.head { max-width: 660px; margin: 0 auto 44px; text-align: center; }
.kicker { margin: 0 0 10px; color: var(--brand); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.head h2, .final h2 { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.4rem); line-height: 1.12; letter-spacing: -.028em; font-weight: 750; text-wrap: balance; }
.head p:not(.kicker) { margin: 14px auto 0; max-width: 52ch; color: var(--muted); font-size: var(--fs-lg); text-wrap: pretty; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }

/* feature rows: words on one side, a picture of the app on the other */
.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.feature.flip .copy { order: 2; }
.copy h3 { margin: 18px 0 12px; font-size: clamp(1.3rem, 1.05rem + .9vw, 1.7rem); line-height: 1.2; letter-spacing: -.022em; font-weight: 700; }
.copy > p { color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.6; text-wrap: pretty; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink-2); }
.checks .icon { width: 20px; height: 20px; padding: 3px; margin-top: 2px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 3; }
.stage { position: relative; padding: clamp(20px, 4vw, 40px); border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(155deg, var(--brand-soft), var(--surface-2) 72%); }
.panel { padding: 18px; }
.titles { max-width: 430px; margin: 0 auto; }

/* picture: titles */
.seg { display: flex; gap: 2px; padding: 3px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.seg span, .seg button { flex: 1; padding: 6px 8px; border-radius: 8px; text-align: center; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.seg button { border: 0; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg span.on, .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin-bottom: 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); font-size: var(--fs-md); }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .mark { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #17804c; color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 1px 4px rgba(0, 0, 0, .35); }
.poster .mark .icon { width: 13px; height: 13px; stroke-width: 3.2; }
.tile-art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 30px 10px 10px; color: #fff; text-align: center; transition: filter .2s, opacity .2s; }
.tile-title { font-size: 15px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }
.tile-rating { align-self: center; padding: 1px 6px; border: 1px solid rgba(255, 255, 255, .85); border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.tone-1 { background: #2f5fa8; }
.tone-2 { background: #0f6e74; }
.tone-3 { background: #7a3fa0; }
.tone-4 { background: #a1500f; }
.tone-5 { background: #b4232c; }
.tone-6 { background: #3b4a5c; }
.tiles .off .poster img, .tiles .off .tile-art { filter: grayscale(1); opacity: .45; }
.tiles .off .poster .mark { background: rgba(0, 0, 0, .65); }
.poster .badge.new { position: absolute; top: 7px; left: 7px; height: 20px; padding: 0 8px; }
.tile-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-note { max-width: 430px; margin: 12px auto 0; color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* picture: the week, and what the TV shows when time is up */
.week { padding-bottom: 40px; }
.days { list-style: none; padding: 0; margin: 0; }
.days li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.days li:last-child { border-bottom: 0; }
.days li.today { margin: 0 -10px 2px; padding: 10px; border-radius: 10px; border-bottom-color: transparent; background: var(--brand-soft); }
.days li.today strong { color: var(--brand); }
.days div > span, .days small { color: var(--muted); font-size: var(--fs-sm); }
.days small { display: block; }
.days b { font-weight: 600; white-space: nowrap; }
.days .badge { height: 20px; margin-left: 4px; padding: 0 8px; vertical-align: 1px; }
.tv { position: relative; width: min(300px, 80%); margin: -30px 6% 0 auto; }
.tv-screen { display: grid; justify-items: center; align-content: center; gap: 10px; aspect-ratio: 16 / 9; padding: 12px 20px; border: 7px solid #26282d; border-radius: 14px;
  background: radial-gradient(90% 90% at 50% 20%, #23262e, #0d0f13); color: #f3efe9; text-align: center; box-shadow: var(--shadow-lg); }
.tv-screen p { font-size: var(--fs-md); font-weight: 600; line-height: 1.35; text-wrap: balance; }
.tv-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 122, 51, .18); color: #ff8a4c; }
.tv > i { display: block; width: 28%; height: 8px; margin: 0 auto; border-radius: 0 0 8px 8px; background: #26282d; }

/* picture: the Add time menu */
.menu-demo { max-width: 340px; padding: 16px; }
.pressed { border-color: var(--line-strong); background: var(--surface-2); }
.menu { display: grid; margin-top: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.menu span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: var(--fs-md); }
.menu span .icon { color: var(--muted); }
.menu span.hl { background: var(--surface-2); }
.menu i { height: 1px; margin: 5px 6px; background: var(--line); }
.toast.on-stage { position: relative; left: auto; bottom: auto; width: max-content; max-width: 100%; margin: -22px 4% 0 auto; }

/* picture: activity */
.history { list-style: none; padding: 0; margin: 6px 0 0; }
.history li { display: flex; align-items: center; gap: 12px; padding: 10px 0 0; margin-top: 10px; border-top: 1px solid var(--line); }
.history div { flex: 1; min-width: 0; }
.history strong, .history small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history strong { font-size: var(--fs-md); }
.history small { color: var(--muted); font-size: var(--fs-xs); }
.thumb { width: 30px; height: 45px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }

/* ---------- grids, steps, audience cards ---------- */
.grid, .steps, .audiences { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two, .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid li, .steps li, .audiences li { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.grid h3, .steps h3 { margin: 16px 0 6px; font-size: var(--fs-lg); }
.grid p, .steps p { color: var(--muted); font-size: var(--fs-md); line-height: 1.55; text-wrap: pretty; }
.grid p + p, .steps p + p { margin-top: 8px; }
.grid .feature-icon { width: 40px; height: 40px; border-radius: 11px; }
.step { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.audiences li { display: grid; align-content: start; gap: 12px; }
.audiences h3 { font-size: var(--fs-xl); letter-spacing: -.015em; }
.audiences p { color: var(--muted); font-size: var(--fs-md); }
.audiences .btn { justify-self: start; margin-top: 4px; }
.final { margin-top: var(--gap); padding: clamp(36px, 6vw, 64px) 24px; border: 1px solid var(--line); border-radius: 24px; text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, var(--brand-soft), var(--surface) 70%); }
.final p { max-width: 50ch; margin: 12px auto 26px; color: var(--muted); font-size: var(--fs-lg); text-wrap: pretty; }
.final .kicker { margin: 0 0 10px; color: var(--brand); font-size: var(--fs-sm); }
.final .license { margin: 22px auto 0; font-size: var(--fs-sm); }

/* ---------- reading pages (server owners, parents) ---------- */
.prose { max-width: 720px; }
.section.prose { padding-top: clamp(48px, 6vw, 72px); }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 0; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 750; }
.prose h3 { margin-top: 24px; font-size: var(--fs-lg); }
.prose p, .prose li { color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.6; text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); }
.prose .kicker { margin: 0 0 -4px; }
.note { padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; background: var(--surface); }
.note p { font-size: var(--fs-md); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 650; font-size: var(--fs-lg); line-height: 1.4; }
.faq summary:focus-visible { border-radius: 12px; }
.faq details > p { padding: 0 18px 16px; }
.faq details > p + p { margin-top: -6px; }
.message { margin: 0; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: 1.0625rem/1.6 var(--font); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.share-url { display: block; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); font: 600 1.0625rem/1.5 var(--font); overflow-wrap: anywhere; }

/* ---------- install page ---------- */
[hidden] { display: none !important; }
.prose code, .prose .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.prose code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); color: var(--ink); font-size: .875em; overflow-wrap: anywhere; }
.prose .code { margin: 12px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: var(--fs-md); line-height: 1.6; overflow-x: auto; white-space: pre; }
.prose .code code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.prompt { margin-top: 24px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .06); overflow: hidden; }
.prompt-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.prompt-title { font-weight: 650; }
.prompt-bar .btn { margin-left: auto; }
.btn.copied, .btn.copied:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.prose .prompt-text { margin: 0; padding: 18px; color: var(--ink); font: .9375rem/1.6 var(--font); white-space: pre-wrap; overflow-wrap: anywhere;
  user-select: all; -webkit-user-select: all; }
.prose .prompt-status { margin: 0; padding: 0 18px; }
.prose .prompt-status:not(:empty) { padding-block: 10px 12px; border-top: 1px solid var(--line); }
.prose .install-steps { list-style: none; counter-reset: install; margin: 28px 0 0; padding: 0; }
.install-steps > li { position: relative; counter-increment: install; padding: 0 0 0 52px; scroll-margin-top: 20px; }
.install-steps > li + li { margin-top: 36px; }
.install-steps > li::before { content: counter(install); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 1rem; }
.install-steps > li > h3 { margin: 4px 0 8px; font-size: var(--fs-xl); letter-spacing: -.01em; }
.install-steps > li > * + * { margin-top: 10px; }
.install-steps ul { margin: 0; }
.table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.settings { width: 100%; border-collapse: collapse; font-size: var(--fs-md); line-height: 1.5; }
.settings th, .settings td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); color: var(--ink-2); }
.settings thead th { border-top: 0; background: var(--surface-2); color: var(--ink); font-weight: 650; }
.settings tbody th { width: 38%; font-weight: 600; }
.settings code { font-size: .8125rem; }
@media (max-width: 560px) {
  .install-steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; padding-left: 0; }
  .install-steps > li::before { position: static; }
  .install-steps > li > * { grid-column: 1 / -1; }
  .install-steps > li > h3 { grid-column: 2; align-self: center; margin: 0; }
  .prose .code { padding: 12px 14px; font-size: var(--fs-sm); }
  .prose .prompt-text { padding: 14px 16px; }
  .prompt-bar { padding: 12px 14px; }
  .prompt-bar .btn { flex: 1 1 100%; margin-left: 0; }
  .settings thead { display: none; }  /* phones: each setting stacks above its explanation */
  .settings tr, .settings tbody th, .settings td { display: block; width: auto; }
  .settings tbody th { padding: 12px 14px 2px; }
  .settings tbody tr:first-child th { border-top: 0; }
  .settings td { padding: 2px 14px 12px; border-top: 0; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 16px; }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature + .feature { margin-top: 64px; }
  .feature.flip .copy { order: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .steps, .audiences, .grid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .page { width: min(100% - 32px, 1040px); }
  .lead { font-size: var(--fs-lg); }
  .cta .btn { flex: 1 1 auto; }
  .head { margin-bottom: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .grid li, .steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; padding: 18px; }
  .grid li > .feature-icon, .steps li > .step { grid-row: span 3; }
  .grid h3, .steps h3 { margin: 2px 0 4px; }
  .audiences li { padding: 20px; }
  .tiles { gap: 8px; }
  .toast { white-space: normal; max-width: 92%; }
  .tv { width: 86%; margin-right: 0; }
  .tv-screen p { font-size: var(--fs-sm); }
  .prose p, .prose li { font-size: 1rem; }
  .message { padding: 14px 16px; font-size: 1rem; }
}
@media (max-width: 400px) {  /* small phones: room for the tile labels */
  .stage { padding: 14px; }
  .panel { padding: 12px; }
  .tiles { gap: 6px; }
  .poster .mark { top: 5px; right: 5px; width: 18px; height: 18px; }
  .poster .mark .icon { width: 11px; height: 11px; }
  .poster .badge.new { top: 5px; left: 5px; height: 18px; padding: 0 6px; font-size: 10px; }
  .tile-meta { white-space: normal; line-height: 1.3; }
  .tile-art { gap: 6px; padding: 24px 6px 8px; }
  .tile-title { font-size: 12.5px; }
  .tile-rating { font-size: 10px; padding: 0 4px; }
  .seg span, .seg button { padding: 6px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-art { transition: none; }
}

/* Interactive title choices, added only when the demo script runs. */
.demo-controls { margin-bottom: 14px; }
.demo-controls[hidden], .demo-choice[hidden], .demo-limit[hidden] { display: none; }
.demo-picked { display: flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.demo-picked input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.demo-help { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.demo-title { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.demo-title:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.demo-title:hover .poster { box-shadow: 0 0 0 2px var(--brand); }
.demo-choice { display: block; width: fit-content; max-width: 100%; margin-top: 5px; padding: 2px 5px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); font-size: 10px; font-weight: 700; line-height: 1.4; }
.demo-choice.is-blocked { background: var(--stop-soft); color: var(--stop); }
.demo-limit { display: block; margin-top: 4px; color: var(--stop); font-size: 10px; line-height: 1.4; }

/* Keep the mark easy to see and tap, even on a narrow screen. */
[data-level-demo] .poster .mark { top: 4px; right: 4px; width: 44px; height: 44px; font-size: 28px; font-weight: 700; }
[data-level-demo] .poster .mark .icon { width: 24px; height: 24px; }
[data-level-demo] .tile-art { padding-top: 52px; }
[data-level-demo] .demo-help { margin-top: 14px; }
[data-level-demo] .seg button { min-height: 44px; }
[data-level-demo] .seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
