/* Remixly: warm paper canvas, one teal accent, tonal cards. The product output is the hero. */
:root {
  --bg: #faf8f4; --surface: #ffffff; --surface-2: #f1ede6;
  --fg: #1a1916; --muted: #5f5b53; --line: #e3ddd3; --line-strong: #c9c2b6;
  --accent: #0f6b66; --accent-hover: #0b5652; --accent-fg: #ffffff; --accent-soft: #e2f0ee;
  --radius: 10px; --radius-lg: 16px;
  --dur: 160ms; --ease: cubic-bezier(.2,.7,.3,1);
  --shadow: 0 1px 2px rgba(26,25,22,.05), 0 8px 24px -12px rgba(26,25,22,.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131311; --surface: #1c1b18; --surface-2: #24221e;
    --fg: #f3efe8; --muted: #a8a294; --line: #2e2c27; --line-strong: #46433c;
    --accent: #5fc4bb; --accent-hover: #7dd3cb; --accent-fg: #0f1a19; --accent-soft: #1b2f2d;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}
@media (prefers-reduced-motion: reduce) { :root { --dur: 0ms; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 Inter, "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--fg); background: var(--bg); }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 20px; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: center; padding-block: 22px; }
.nav nav { display: flex; gap: 20px; align-items: center; font-size: 15px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: inherit; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.inline { display: inline; }

/* type */
h1 { font-size: clamp(36px, 6.5vw, 58px); line-height: 1.04; margin: 0 0 18px; letter-spacing: -0.03em; font-weight: 750; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.015em; font-weight: 650; }
h3 { font-size: 17px; margin: 0 0 4px; font-weight: 650; }
p { margin: 0 0 12px; }
.lead { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 34ch; margin: 0 0 28px; text-wrap: pretty; }
.small { color: var(--muted); font-size: 14.5px; }

/* controls */
input { font: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: inherit; width: 100%; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 12px 20px; min-height: 46px; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.btn:hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--fg); }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--accent-hover); }
.row { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; margin-top: 10px; }
.row input { flex: 1 1 240px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; max-width: 520px; margin: 16px 0 2px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* landing */
.hero { padding: 40px 0 36px; }
.demo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 8px 0 44px; }
.demo .arrow { align-self: center; color: var(--muted); font-size: 22px; }
.pane { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.pane-label { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.reel { flex: 1; min-height: 220px; background: var(--surface-2); border-radius: 12px; display: grid; grid-template-rows: 1fr auto; padding: 14px; }
.reel .play { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; align-self: center; justify-self: center; color: var(--muted); }
.reel .play::after { content: ""; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }
.reel .cap { background: var(--surface); padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--fg); line-height: 1.4; }
.post { font-size: 14.5px; line-height: 1.5; }
.post p { margin: 0 0 10px; }
.post .signoff { color: var(--muted); }
.post .btn { margin-top: 6px; font-size: 14px; min-height: 38px; padding: 8px 14px; pointer-events: none; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 36px 0; border-top: 1px solid var(--line); }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }
.n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.faq { padding: 8px 0 48px; }
.faq h2 { margin-bottom: 8px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; flex-shrink: 0; transition: transform var(--dur) var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p, details ol { color: var(--muted); margin-top: 10px; }

/* dashboard */
.page-title { padding: 8px 0 20px; }
.page-title h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin: 14px 0; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 12px; }
.card .n { margin: 0; }
.card form { display: grid; gap: 10px; margin-top: 10px; }
.card label { font-size: 14.5px; color: var(--muted); }
.card .btn { justify-self: start; }
details.card { padding: 16px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.usage { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.usage strong { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.meter { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 8px 0 14px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.key { font-size: 22px; letter-spacing: .12em; padding: 8px 14px; }
.flash { background: var(--accent-soft); color: var(--fg); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; margin: 4px 0 18px; }
.flash p { margin: 0; }
.draft { white-space: pre-wrap; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-top: 20px; }

/* prose pages */
.prose { max-width: 66ch; padding: 8px 0 40px; }
.prose h1 { font-size: clamp(30px, 5vw, 40px); }
.prose h2 { margin-top: 28px; font-size: 19px; }
.prose li { margin: 6px 0; }

.foot { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 28px 20px 44px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 640px) {
  .demo { grid-template-columns: 1fr; }
  .pane .reel { height: auto; }
.demo .arrow { transform: rotate(90deg); justify-self: center; }
  .reel { min-height: 160px; }
  .steps { grid-template-columns: 1fr; gap: 22px; padding: 28px 0; }
  .card { padding: 18px; }
  details.card { padding: 14px 18px; }
}

/* admin */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.stat-n { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat-l { font-weight: 600; font-size: 15px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 6px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13.5px; padding: 6px 8px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-all; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
