/* Web Accountability: charcoal, cool bone, copper. See design/README.md for the direction.
   Fonts are self-hosted on purpose: this product sees browsing history, so nothing loads from Google. */

@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/static/fonts/ibm-plex-sans-latin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/static/fonts/ibm-plex-serif-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("/static/fonts/ibm-plex-serif-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/ibm-plex-mono-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/ibm-plex-mono-latin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #f3f4f6;          /* cool bone, not cream */
  --card: #ffffff;
  --ink: #121417;
  --muted: #5c6570;
  --line: #e2e4e8;
  --accent: #c45c26;      /* copper, the only warm note */
  --accent-hover: #a84e20;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6dc;
  --warn: #b7791f;
  --danger: #b23a3a;
  --ok: #3d6ea8;          /* steel blue; never green */
  --info: #3d6ea8;
  --soft: #eceef1;
  --charcoal: #16191d;
  --charcoal-ink: #e8eaed;
  --charcoal-muted: #aab1b9;
  --charcoal-line: rgba(255, 255, 255, 0.09);
  --radius: 10px;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --display: "Instrument Serif", "IBM Plex Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg) url("/static/img/grain-light.jpg") repeat; background-size: 768px 768px; color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.012em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
img { max-width: 100%; }
summary { cursor: pointer; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
pre { background: var(--charcoal); color: var(--charcoal-ink); padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
code.inline { background: var(--soft); padding: .1rem .35rem; border-radius: 4px; }
.code-big { font-family: var(--mono); font-size: 1.8rem; font-weight: 500; letter-spacing: .12em; }

/* Preview deployments wear a copper strip above everything. */
.devbar { background: var(--accent); color: #fff; text-align: center; font-size: .82rem; padding: .4rem 1rem; }
.devbar span { text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; font-weight: 700; margin-right: .5rem; }

/* Topbar: white in the app, charcoal on marketing pages. Mark + wordmark left, nav right. */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(18, 20, 23, .05); }
.topbar .inner { max-width: 1100px; margin: 0 auto; padding: .55rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; color: var(--ink); font-size: 1.05rem; letter-spacing: -.01em; }
.brand .mark { width: 32px; height: 32px; border-radius: 8px; display: block; flex: none; }
.nav { display: flex; gap: .1rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav > a, .nav > form > button, .nav-menu > summary { position: relative; color: var(--muted); text-decoration: none; padding: .45rem .6rem; border-radius: 6px; background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .nav > form > button:hover, .nav-menu > summary:hover, .nav-menu[open] > summary { color: var(--ink); background: var(--soft); }
.nav > a.active, .nav-menu > summary.active { color: var(--ink); }
.nav > a.active::after, .nav-menu > summary.active::before { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; background: var(--accent); }
.nav a.btn { color: var(--accent-ink); background: var(--accent); margin-left: .4rem; }
.nav a.btn:hover { color: var(--accent-ink); background: var(--accent-hover); }
.nav-menu { position: relative; }
.nav-menu > summary { display: flex; align-items: center; gap: .35rem; list-style: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu-caret { font-size: .9rem; line-height: 1; transition: transform .15s ease; }
.nav-menu[open] .nav-menu-caret { transform: rotate(180deg); }
.nav-menu-panel { position: absolute; z-index: 30; top: calc(100% + .4rem); left: 0; width: 18rem; padding: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(18, 20, 23, .16); }
.nav-menu-account .nav-menu-panel { left: auto; right: 0; }
.nav-menu-panel .nav-menu-item { display: block; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 7px; background: none; color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; white-space: normal; }
.nav-menu-panel .nav-menu-item:hover { color: var(--ink); background: var(--soft); }
.nav-menu-panel .nav-menu-item.active { background: var(--accent-soft); }
.nav-menu-panel .nav-menu-item.active::after { display: none; }
.nav-menu-item > span { display: block; font-weight: 600; }
.nav-menu-item > small { display: block; margin-top: .08rem; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.nav-menu-signout { margin: .35rem 0 0; padding-top: .35rem; border-top: 1px solid var(--line); }

body.marketing .topbar { background: var(--charcoal); border-bottom-color: var(--charcoal-line); box-shadow: none; }
body.marketing .brand { color: #fff; }
body.marketing .nav > a, body.marketing .nav > form > button { color: var(--charcoal-muted); }
body.marketing .nav > a:hover, body.marketing .nav > form > button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
body.marketing .nav a.btn { color: #fff; background: var(--accent); }
body.marketing .nav a.btn:hover { background: var(--accent-hover); }
body.marketing footer { background: var(--charcoal) url("/static/img/grain-dark.jpg") repeat; background-size: 768px 768px; color: var(--charcoal-muted); padding: 2rem 1rem; }
body.marketing footer a { color: #d5d9de; }
body.marketing footer a:hover { color: #fff; }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
main.narrow { max-width: 640px; }
main.wide { max-width: 1360px; }
main.full { max-width: none; padding: 0; }
main.full .flash-wrap { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card h2 { margin-bottom: .6rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.tight { margin-bottom: .25rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: .6rem; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; }
.flash.ok, .flash.info { background: #e6edf6; border-color: #c4d4e8; color: #223f63; }
.flash.error { background: #f6e2e2; border-color: #e5bdbd; color: #6c1f1f; }
.banner { background: #fbefd8; border-bottom: 1px solid #ecd39a; color: #5c4200; padding: .6rem 1rem; }
.banner .inner { max-width: 1100px; margin: 0 auto; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; padding: .55rem 1.1rem; border-radius: 8px; font: inherit; font-weight: 600; line-height: 1.3; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--soft); color: var(--ink); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #962f2f; }
.btn.small { padding: .32rem .7rem; font-size: .85rem; }
.btn.link { background: none; color: var(--accent); padding: 0; border: 0; font-weight: 500; }
.btn.link:hover { background: none; color: var(--accent-hover); text-decoration: underline; }
form.inline { display: inline; }

label { display: block; font-weight: 600; margin-bottom: .25rem; }
label.check { font-weight: 500; display: flex; gap: .5rem; align-items: flex-start; }
label.check input { margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=number]:focus, input[type=tel]:focus, input[type=date]:focus, input[type=time]:focus, select:focus, textarea:focus {
  border-color: var(--accent); outline: 2px solid rgba(196, 92, 38, .25); outline-offset: 0;
}
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid rgba(196, 92, 38, .5); outline-offset: 2px; }
input[type=checkbox] { accent-color: var(--accent); }
textarea { min-height: 5rem; }
.field { margin-bottom: .9rem; }
.filter-bar { display: grid; grid-template-columns: repeat(3, minmax(135px, .7fr)) minmax(240px, 1.5fr); gap: .75rem; align-items: end; }
.filter-bar .field { margin-bottom: 0; }
.filter-search .row { flex-wrap: nowrap; }
.filter-search input { min-width: 9rem; }
.help { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 600; padding: 0 .3rem; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.table-sort { display: block; color: inherit; white-space: nowrap; }
th[aria-sort] .table-sort { color: var(--accent); }
tbody tr:hover { background: var(--soft); }
.table-wrap { overflow-x: auto; }
.history-table table { table-layout: fixed; }
.history-table col.history-time { width: 7%; }
.history-table col.history-site { width: 38%; }
.history-table col.history-latency { width: 9%; }
.history-table col.history-category { width: 17%; }
.history-table col.history-device { width: 14%; }
.history-table col.history-lookups { width: 7%; }
.history-table col.history-status { width: 8%; }
.history-site-cell, .history-device-cell, .history-host { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.history-site-cell .row { gap: .65rem; }
.history-mobile-meta { display: none; }
.history-time-filter { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.history-time-filter input { width: auto; min-width: 7.25rem; }
.history-pagination { margin: .65rem 0; min-height: 2.1rem; }
.history-pagination .disabled { opacity: .45; cursor: default; pointer-events: none; }
.incident-row { position: relative; }
.incident-link::after { content: ""; position: absolute; inset: 0; }
.incident-link:focus-visible { outline: none; }
.incident-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }

.monitored-app-card { padding: 0; overflow: hidden; }
.monitored-app-card > p { padding: 1rem 1.1rem; margin: 0; border-bottom: 1px solid var(--line); }
.monitored-app-list { display: grid; }
.monitored-app-item { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); min-width: 0; }
.monitored-app-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .9rem; }
.monitored-app-heading h2 { margin: 0; }
.app-identifier { overflow-wrap: anywhere; }
.monitored-app-heading .badge { text-transform: capitalize; }
.monitored-app-controls { display: grid; grid-template-columns: minmax(250px, 1.5fr) minmax(110px, .65fr) minmax(110px, .65fr); gap: .8rem; align-items: end; }
.monitored-app-controls label { margin: 0; }
.monitored-app-controls fieldset { min-width: 0; margin: 0; padding: .45rem .65rem .65rem; }
.quiet-hours-inputs { display: grid; grid-template-columns: minmax(105px, 1fr) auto minmax(105px, 1fr); gap: .45rem; align-items: end; }
.quiet-hours-inputs label { font-size: .78rem; color: var(--muted); }
.quiet-hours-inputs span { padding-bottom: .5rem; color: var(--muted); }
.label-hint { color: var(--muted); font-size: .78rem; font-weight: 400; }
.danger-link { color: var(--danger); margin-top: .65rem; font-size: .85rem; }
.danger-link:hover { color: #962f2f; }
.monitored-app-save { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: 1rem 1.1rem; background: var(--soft); }

/* Badges: incidents and gaps red, warnings amber, connected and acknowledged steel blue. No green. */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--soft); color: #4a525b; white-space: nowrap; }
.badge.adult, .badge.gambling, .badge.proxy, .badge.trigger, .badge.danger { background: #f6e2e2; color: #6c1f1f; }
.badge.dating, .badge.drugs, .badge.mixed, .badge.warn { background: #fbefd8; color: #5c4200; }
.badge.ai, .badge.social, .badge.video, .badge.gaming, .badge.search, .badge.ok, .badge.info { background: #e6edf6; color: #274a75; }
.badge.infra, .badge.ads, .badge.neutral { background: var(--soft); color: #5c6570; }

.stat { display: flex; flex-direction: column; }
.stat .n { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.stat .l { color: var(--muted); font-size: .82rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; }

.steps { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.steps li { padding: .25rem .7rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .85rem; font-weight: 500; }
.steps li.current { background: var(--accent); color: #fff; }
.steps li.done { color: var(--ok); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: .5rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .75rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .82rem; min-width: 9rem; font-variant-numeric: tabular-nums; }

/* Empty states: one sentence, the single ring, one button. */
.empty { text-align: center; padding: 2rem 1rem 1.5rem; color: var(--muted); }
.empty .ring { width: 64px; height: 64px; display: block; margin: 0 auto .9rem; }
.empty p { margin: 0 auto 1rem; max-width: 30rem; }

/* The agreement is a document, not a scroll. */
.covenant { white-space: pre-wrap; font-family: var(--serif); font-size: 1.02rem; line-height: 1.65; background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: 1.5rem 1.75rem; border-radius: var(--radius); max-height: 32rem; overflow-y: auto; }
.qr { width: 200px; height: 200px; image-rendering: pixelated; }
footer { color: var(--muted); font-size: .85rem; text-align: center; padding: 1.5rem 1rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .topbar .inner { align-items: flex-start; gap: .55rem; }
  .app-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin-left: 0; padding-top: .45rem; border-top: 1px solid var(--line); }
  .app-nav .nav-menu > summary { justify-content: center; }
  .app-nav .nav-menu-panel { width: min(18rem, calc(100vw - 2rem)); }
  .app-nav .nav-menu:nth-of-type(even) .nav-menu-panel { left: auto; right: 0; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .history-table { overflow-x: hidden; }
  .history-table col.history-time { width: 24%; }
  .history-table col.history-site { width: 76%; }
  .history-table th:nth-child(n + 3), .history-table td:nth-child(n + 3) { display: none; }
  .history-mobile-meta { display: flex; align-items: center; gap: .35rem .6rem; flex-wrap: wrap; margin-top: .45rem; color: var(--muted); }
  .monitored-app-controls { grid-template-columns: 1fr 1fr; }
  .quiet-hours-control { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .filter-bar { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .filter-search .row { flex-wrap: wrap; }
  .monitored-app-controls { grid-template-columns: 1fr; }
  .quiet-hours-control { grid-column: auto; }
  .quiet-hours-inputs { grid-template-columns: 1fr; align-items: stretch; }
  .quiet-hours-inputs span { display: none; }
  .monitored-app-save { align-items: stretch; }
  .monitored-app-save .btn { width: 100%; text-align: center; }
}

.price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.price .amount { font-family: var(--display); font-size: 3rem; line-height: 1; letter-spacing: -.01em; }
.price .per { color: var(--muted); }

/* Landing: a dark page. Rain on a window behind the one sentence that has to land. */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--charcoal) url("/static/img/bg-hero-window.jpg") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 25, 29, .62) 0%, rgba(22, 25, 29, .38) 45%, rgba(22, 25, 29, .96) 100%); }
.hero .inner { max-width: 1100px; margin: 0 auto; padding: 6.5rem 1rem 5.5rem; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 5.2vw, 3.25rem); line-height: 1.06; letter-spacing: -.01em; max-width: 15ch; margin-bottom: 1rem; color: #fff; }
.hero .lede { font-size: 1.15rem; line-height: 1.55; max-width: 36rem; color: #d5d9de; margin-bottom: 1.6rem; }
.hero .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.dark .btn.secondary, .hero .btn.secondary { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .28); }
.dark .btn.secondary:hover, .hero .btn.secondary:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.dark { background: var(--charcoal) url("/static/img/grain-dark.jpg") repeat; background-size: 768px 768px; color: var(--charcoal-ink); }
.dark .inner { max-width: 1100px; margin: 0 auto; padding: 3.5rem 1rem; }
.dark .inner + .inner { border-top: 1px solid var(--charcoal-line); }
.dark .muted { color: var(--charcoal-muted); }
.levels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.level-card { background: rgba(255, 255, 255, .035); border: 1px solid var(--charcoal-line); border-radius: var(--radius); padding: 1.4rem 1.3rem 1.25rem; }
.level-card .ring { width: 56px; height: 56px; display: block; margin-bottom: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; font-weight: 600; color: var(--accent); margin-bottom: .3rem; }
.level-card h2 { color: #fff; font-size: 1.15rem; margin-bottom: .45rem; }
.level-card p { color: var(--charcoal-muted); margin: 0; }
.how { display: grid; gap: 2.5rem; grid-template-columns: 1.1fr 1fr; align-items: center; }
.how h2 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; line-height: 1.1; color: #fff; letter-spacing: -.01em; margin-bottom: .8rem; }
.how p { color: var(--charcoal-muted); }
.how img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--charcoal-line); }
/* The steps drawing is inked for a bone ground, so it sits on a light panel inside the dark band. */
.how-diagram { background: var(--bg); border: 1px solid var(--charcoal-line); border-radius: var(--radius); padding: 1.4rem 1.25rem; }
.how-diagram img { border: 0; border-radius: 0; }

/* How it works: an illustrated explainer. Text is capped for readability; the figure sits alongside and the
   sides alternate down the page. Charcoal-ground art (circle, leave, level emblems) carries its own background;
   the steps SVG gets a bone panel. */
.explainer { max-width: 980px; margin: 0 auto; }
.explainer > h1 { margin-bottom: 1.25rem; }
.explain-hero { width: 100%; height: 420px; object-fit: cover; object-position: center 60%; display: block; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 2.75rem; }
.explain-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; align-items: center; margin-bottom: 2.75rem; }
.explain-row.flip .explain-fig { order: -1; }
.explain-text h2, .explain-levels h2 { font-size: 1.4rem; margin-bottom: .6rem; }
.explain-text p { color: var(--muted); max-width: 44ch; margin: 0; }
.explain-fig { margin: 0; }
.explain-fig img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); }
.explain-fig.light { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.explain-fig.light img { border: 0; border-radius: 0; }

.explain-levels { margin-bottom: 2.75rem; }
.explain-levels p { color: var(--muted); }
.level-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.1rem 0 1.5rem; }
.level-figs .explain-fig.dark { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1rem 1.2rem; text-align: center; }
.level-figs .explain-fig.dark img { width: 116px; height: 116px; margin: 0 auto .6rem; border: 0; border-radius: 0; }
.level-figs figcaption { color: var(--charcoal-ink); font-weight: 600; font-size: .95rem; }
.level-figs .eyebrow { display: block; margin-bottom: .15rem; }

/* Sign in and sign up: artwork on the left, the form on cool bone on the right. Phones get only the form. */
main.auth { max-width: none; padding: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.auth-panel { background: var(--charcoal) url("/static/img/bg-auth-panel.jpg") center / cover no-repeat; }
.auth-form { padding: 3rem 1.5rem 4rem; display: flex; justify-content: center; align-items: flex-start; }
.auth-form > div { width: 100%; max-width: 440px; }

@media (max-width: 760px) {
  .how { grid-template-columns: 1fr; gap: 1.5rem; }
  .explain-row { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem; }
  .explain-row.flip .explain-fig { order: 0; }
  .explain-text p { max-width: none; }
  .level-figs { grid-template-columns: 1fr; }
  .level-figs .explain-fig.dark { display: flex; align-items: center; gap: 1rem; text-align: left; padding: .9rem 1rem; }
  .level-figs .explain-fig.dark img { width: 60px; height: 60px; margin: 0; }
  .level-figs figcaption { flex: 1; }
  .explain-hero { height: 240px; }
  .hero .inner { padding: 4rem 1rem 3.5rem; }
  .dark .inner { padding: 2.5rem 1rem; }
  main.auth { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-form { padding: 1.5rem 1rem 3rem; }
}
@media (max-width: 640px) {
  .timeline .when { min-width: 6rem; }
  h1 { font-size: 1.45rem; }
  .topbar .inner { padding: .5rem .75rem; }
}

/* Isolated sample-account tour; reuse the real app's typography, cards, and badges. */
.demo-shell { width: min(100%, 1000px); overflow-wrap: anywhere; }
.demo-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .75rem; }
.demo-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.demo-nav a { padding: .65rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.demo-nav a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.demo-nav a:focus-visible, .demo-choice summary:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.demo-visits { list-style: none; padding: 0; }
.demo-visits li { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.demo-visits li > div { flex: 1 1 240px; }
.demo-visits p { margin-bottom: 0; }
.demo-timeline li { padding: .5rem 0; }
.demo-choice { margin: .75rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.demo-choice summary { font-weight: 600; min-height: 28px; }
.demo-choice p { margin: .75rem 0 0; }
@media (max-width: 480px) { .demo-nav a { flex: 1 1 45%; } .demo-shell .card { padding: 1rem; } }
