:root {
  --bg: #f7f6f2; --surface: #ffffff; --surface-2: #efede6; --text: #1d1f24; --muted: #5d6270; --line: #dedbd2;
  --brand: #c8361f; --brand-ink: #ffffff; --brand-soft: #fbe5df; --ok: #1f7a4a; --ok-soft: #dff2e7; --warn: #8a5a00; --warn-soft: #fbefd2;
  --bad: #a3271a; --bad-soft: #fae0dc; --info: #24538f; --info-soft: #e1ebf8; --radius: 12px; --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161b; --surface: #1c1f26; --surface-2: #242832; --text: #eceef3; --muted: #a2a8b6; --line: #313642;
    --brand: #ff6a4d; --brand-ink: #1a0905; --brand-soft: #3a1e18; --ok: #5fd197; --ok-soft: #173326; --warn: #f1c25a; --warn-soft: #3a2f14;
    --bad: #ff8a7a; --bad-soft: #3d1c18; --info: #8db8f5; --info-soft: #1a2a40; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #14161b; --surface: #1c1f26; --surface-2: #242832; --text: #eceef3; --muted: #a2a8b6; --line: #313642;
  --brand: #ff6a4d; --brand-ink: #1a0905; --brand-soft: #3a1e18; --ok: #5fd197; --ok-soft: #173326; --warn: #f1c25a; --warn-soft: #3a2f14;
  --bad: #ff8a7a; --bad-soft: #3d1c18; --info: #8db8f5; --info-soft: #1a2a40; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: .8em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.notice { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 16px; font-size: .95rem; }

/* header and footer */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .row { min-height: 60px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav-account { display: flex; gap: 14px; align-items: center; margin-left: 8px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-account { margin: 12px 0 0; justify-content: space-between; }
  .nav-account a { border: 0; }
}
.foot { margin-top: 64px; padding: 32px 0 24px; background: var(--surface); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 16px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 6px; }
.foot-grid a:not(.brand) { color: var(--muted); text-decoration: none; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* buttons and forms */
.btn, button.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.quiet { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .muted { font-weight: 400; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 8px; margin: 12px 0; }
.success { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: 8px; margin: 12px 0; }
.auth { max-width: 460px; }
.auth .card { margin-top: 32px; }

/* home */
.hero { padding: 24px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand); margin: 24px 0 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 10px; }
.hero-art { position: relative; aspect-ratio: 300 / 220; max-width: 440px; width: 100%; justify-self: center; }
.hero-art .lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 6 5; }
.node { position: absolute; transform: translate(-50%, -50%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: .9rem; text-align: center; box-shadow: var(--shadow); z-index: 1; white-space: nowrap; }
.node small { font-weight: 400; color: var(--muted); }
.node.src { left: 13%; top: 50%; }
.node.relay { left: 50%; top: 50%; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.node.out { left: 87%; }
.node.yt { top: 18%; } .node.fb { top: 50%; } .node.more { top: 82%; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.cards { display: grid; gap: 16px; margin: 24px 0; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards.three { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-top: 0; }
.card > p:last-child { margin-bottom: 0; }
.band { background: var(--surface-2); padding: 8px 0 32px; margin: 32px 0; }
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; margin-bottom: 6px; }
.steps span { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; text-align: left; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan.popular { border: 2px solid var(--brand); }
.plan h3 { margin: 0; }
.plan .price { margin: 8px 0; color: var(--muted); }
.plan .price span { font-size: 2rem; font-weight: 700; color: var(--text); }
.plan .btn { margin-top: auto; text-align: center; }
.tag { position: absolute; top: -12px; right: 16px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding-left: 26px; position: relative; margin: 8px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.switch { display: inline-flex; flex-wrap: wrap; justify-content: center; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; }
.switch a { padding: 6px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; }
.switch a[aria-current] { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }

.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; padding: 4px 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.legal h2 { font-size: 1.15rem; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.live, .pill.active, .pill.approved, .pill.answered, .pill.sponsored { background: var(--ok-soft); color: var(--ok); }
.pill.soon, .pill.trial, .pill.pending, .pill.open { background: var(--warn-soft); color: var(--warn); }
.pill.planned, .pill.closed { background: var(--surface-2); color: var(--muted); }
.pill.expired, .pill.rejected, .pill.suspended { background: var(--bad-soft); color: var(--bad); }
.pill.staff { background: var(--info-soft); color: var(--info); }
.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }

/* dashboard */
.dash { padding-top: 16px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.dash-head h1 { margin: 0; font-size: 1.6rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; scrollbar-width: thin; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--brand); }
.tabs .count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.item .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
a.item.link, a.stat.link { text-decoration: none; color: inherit; }
a.item.link:hover { border-color: var(--brand); }
.mt { margin-top: 16px; }
button.item { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.item:hover { border-color: var(--brand); }
.key { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; display: block; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.staff { background: var(--info-soft); border-color: transparent; align-self: flex-end; }
.msg .meta { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; white-space: normal; }
.shot { max-height: 420px; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.checklist li { margin: 8px 0; }
.checklist .done { color: var(--muted); text-decoration: line-through; }
.payto { white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: calc(100vw - 32px); }
