/* AI Visibility. DiamondBack brand: red #ee223c, near-black #09090f, Plus Jakarta Sans display, Inter body.
   Light by default (the Scales lesson: Darrin reads light), dark per user. Masthead is always the site's black. */
:root {
  --red: #ee223c; --red-deep: #c1282d; --black: #09090f;
  --bg: #f4f4f7; --surface: #ffffff; --raised: #f6f6f8; --rule: #e2e2e8; --ink: #101118; --soft: #55575f; --faint: #8b8d96;
  --good: #1f9d55; --warn: #c9840f; --weak: #c95d1a; --risk: #8b1e2b; --none: #8b8d96;
  --good-bg: #e6f5ec; --warn-bg: #fbf1dc; --weak-bg: #fbe9dc; --risk-bg: #f7e1e4; --none-bg: #eeeef2;
  --display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px; --pill: 30px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #09090f; --surface: #101118; --raised: #191a27; --rule: #2b2c42; --ink: #ffffff; --soft: #a9acb4; --faint: #7c7f88;
  --good: #3ccf7a; --warn: #f0b14a; --weak: #f08a4a; --risk: #f06a7a; --none: #8b8d96;
  --good-bg: #12301f; --warn-bg: #33270e; --weak-bg: #33200e; --risk-bg: #3a151b; --none-bg: #191a27;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--red-deep); text-decoration: none; } a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: #ff8a9a; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3, .num, .tile b, .amt, .dial-num { font-family: var(--display); letter-spacing: -0.3px; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 0 0 8px; text-wrap: balance; letter-spacing: -0.8px; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 10px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }
.soft { color: var(--soft); } .small { font-size: 13px; } .muted { color: var(--faint); } .right { margin-left: auto; }
.lead { font-size: 17px; line-height: 1.5; color: var(--soft); max-width: 62ch; }
.narrow-text { max-width: 70ch; }
.crumbs { color: var(--soft); font-size: 13px; margin: 0 0 6px; }

/* masthead */
.mast { background: var(--black); border-bottom: 3px solid var(--red); color: #fff; }
.mast-in { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.wordmark img { display: block; height: 30px; width: auto; }
.product { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); padding-left: 18px; border-left: 1px solid #2b2c42; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: #c9cbd2; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 6px; }
.nav a:hover { color: #fff; text-decoration: none; background: #191a27; }
.nav a.on { color: #fff; background: #24242a; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c9cbd2; }
.who-name { font-weight: 600; color: #fff; }
.chip { font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; background: var(--red); color: #fff; padding: 3px 8px; border-radius: var(--pill); }
.icon-btn { background: #191a27; border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.who .link-btn { color: #c9cbd2; } .who .link-btn:hover { color: #fff; }
.viewas { background: var(--red); color: #fff; }
.viewas .wrap-in { max-width: 1120px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.viewas .btn-ghost { border-color: #fff; color: #fff; }

/* frame */
.wrap { max-width: 1120px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.foot { border-top: 1px solid var(--rule); color: var(--soft); font-size: 13px; }
.foot .wrap-in { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.flash { padding: 12px 16px; border-radius: 8px; background: var(--good-bg); color: var(--ink); border-left: 4px solid var(--good); margin-bottom: 18px; }
.flash.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.secret { padding: 14px 16px; border-radius: 8px; background: var(--raised); border: 2px dashed var(--red); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.secret code { font-size: 15px; background: var(--surface); padding: 6px 10px; }
.secret .hint { flex-basis: 100%; color: var(--soft); font-size: 13px; }
.copy { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: var(--pill); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }

/* cards + grids */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.card.narrow { max-width: 520px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.side .card:last-child { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack .card, .stack.wide .grid-2 { margin-bottom: 0; }
.stack > .card { margin-bottom: 0; }
.top-rule { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 16px; }
@media (max-width: 860px) { .grid-main, .grid-2, .grid-3 { grid-template-columns: 1fr; } .nav { order: 5; flex-basis: 100%; margin-left: 0; } }

/* hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 12px 36px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 30px; margin-bottom: 20px; }
.hero.small { padding: 20px 26px; gap: 10px 28px; }
.hero-dial { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-dial .num { font-size: 56px; font-weight: 800; line-height: 1; }
.hero-text h1 { font-size: 34px; }
.hero.admin .hero-text { min-width: 0; }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .stats { justify-content: center; } }
.stats { display: flex; gap: 8px 28px; flex-wrap: wrap; margin: 12px 0 0; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats dt { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.stats .arrow { color: var(--red); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: baseline; }
.kv dt { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* dial + trend */
.dial { display: block; }
.dial-track { fill: none; stroke: var(--rule); stroke-width: 7; stroke-linecap: round; }
.dial-value { fill: none; stroke: var(--none); stroke-width: 7; stroke-linecap: round; }
.dial.tone-good .dial-value { stroke: var(--good); } .dial.tone-warn .dial-value { stroke: var(--warn); }
.dial.tone-weak .dial-value { stroke: var(--weak); } .dial.tone-risk .dial-value { stroke: var(--risk); }
.dial-num { font-family: var(--display); font-weight: 800; font-size: 34px; fill: var(--ink); letter-spacing: -1px; }
.dial-sub { font-family: var(--display); font-weight: 700; font-size: 6px; letter-spacing: 1px; text-transform: uppercase; fill: var(--faint); }
.trend { display: block; max-width: 100%; height: auto; }
.trend-grid { stroke: var(--rule); stroke-width: 1; }
.trend-tick, .trend-empty { font-family: var(--display); font-size: 11px; fill: var(--faint); font-weight: 600; }
.trend-empty { font-size: 14px; }
.trend-area { fill: var(--red); opacity: 0.08; }
.trend-line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; }
.trend-dot { fill: var(--red); } .trend-dot.end { fill: var(--red); stroke: var(--surface); stroke-width: 2.5; }
.trend-val { font-family: var(--display); font-size: 12px; font-weight: 700; fill: var(--ink); }

/* pills, numbers, deltas */
.pill { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 10px; border-radius: var(--pill); background: var(--none-bg); color: var(--none); white-space: nowrap; }
.pill.tone-good { background: var(--good-bg); color: var(--good); } .pill.tone-warn { background: var(--warn-bg); color: var(--warn); }
.pill.tone-weak { background: var(--weak-bg); color: var(--weak); } .pill.tone-risk { background: var(--risk-bg); color: var(--risk); }
.num { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.num.tone-good { color: var(--good); } .num.tone-warn { color: var(--warn); } .num.tone-weak { color: var(--weak); } .num.tone-risk { color: var(--risk); }
.delta { font-family: var(--display); font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: var(--pill); font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); background: var(--good-bg); } .delta.down { color: var(--risk); background: var(--risk-bg); } .delta.flat { color: var(--faint); background: var(--none-bg); }
.risk-text { color: var(--risk); font-weight: 600; }
.pulse { animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; }
.tile b { font-size: 30px; font-weight: 800; line-height: 1.1; }
.tile span { font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: 1.2px; font-family: var(--display); font-weight: 600; }
.tile.warn b { color: var(--warn); } .tile.risk b { color: var(--risk); }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* findings */
.findings { list-style: none; margin: 0; padding: 0; }
.finding { padding: 14px 0; border-top: 1px solid var(--rule); }
.finding:first-child { border-top: 0; padding-top: 4px; }
.findings.compact .finding { padding: 9px 0; } .findings.compact .finding p { margin: 2px 0 0 22px; font-size: 13.5px; color: var(--soft); }
.f-head { display: flex; align-items: center; gap: 10px; }
.f-head b { font-family: var(--display); font-size: 15px; }
.f-mark { width: 12px; height: 12px; border-radius: 3px; background: var(--none); flex: 0 0 auto; }
.st-fail .f-mark { background: var(--risk); } .st-warn .f-mark { background: var(--warn); } .st-pass .f-mark { background: var(--good); }
.f-status { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.st-fail .f-status { color: var(--risk); } .st-warn .f-status { color: var(--warn); } .st-pass .f-status { color: var(--good); }
.finding p { margin: 6px 0 0 22px; color: var(--soft); }
.f-todo { color: var(--ink) !important; }
.who { font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); margin-right: 6px; }
.f-evidence { margin: 6px 0 0 22px; font-size: 13px; color: var(--soft); } .f-evidence summary { cursor: pointer; } .f-evidence ul { margin: 6px 0 0; padding-left: 18px; }

/* hint + updates + price */
.hint { border-left: 4px solid var(--red); }
.hint p { color: var(--soft); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 14px; align-items: start; }
.updates li:first-child { border-top: 0; }
.updates time { color: var(--faint); font-family: var(--display); font-weight: 600; font-size: 12px; padding-top: 2px; }
.updates .milestone span { font-weight: 600; }
.price { list-style: none; margin: 0 0 12px; padding: 0; }
.price li { display: flex; align-items: baseline; gap: 20px; padding: 12px 0; border-top: 1px solid var(--rule); }
.price li:first-child { border-top: 0; }
.price li > div:first-child { flex: 1; } .price b { display: block; font-family: var(--display); font-size: 16px; } .price span { color: var(--soft); font-size: 14px; }
.amt { font-weight: 800; font-size: 26px; white-space: nowrap; } .amt small { font-size: 12px; font-weight: 600; color: var(--faint); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); padding: 6px 10px 8px; border-bottom: 2px solid var(--rule); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl.compact td { padding: 7px 10px; font-size: 13.5px; }
.tbl tr.attention td:first-child { box-shadow: inset 4px 0 0 var(--risk); }
.tbl tr.archived { opacity: 0.55; }
.tbl tr.note-row td { padding-top: 0; border-bottom: 2px solid var(--rule); color: var(--soft); }
.tbl td:last-child { white-space: nowrap; }
.tbl-wrap, .card { overflow-x: auto; }
.plain { list-style: none; margin: 0; padding: 0; } .plain li { padding: 5px 0; }

/* forms + buttons */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--soft); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: 14px; }
label.inline-field { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
label.inline-field .soft { flex-basis: 100%; }
label.check.small { font-size: 13px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 11px; width: 100%; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--raised); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--red); }
input.short { width: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(238, 34, 60, 0.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.row-inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.row-inline label { flex-direction: row; align-items: center; gap: 8px; } .row-inline select, .row-inline input { width: auto; }
.inline { display: inline; }
.btn, .btn-ghost, .btn-danger { display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; padding: 12px 24px; border-radius: var(--pill); border: 2px solid var(--red); background: var(--red); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--red-deep); }
[data-theme="dark"] .btn-ghost { color: #ff8a9a; border-color: #ff8a9a; }
.btn-ghost:hover { background: var(--red); color: #fff; border-color: var(--red); text-decoration: none; }
.btn-danger { background: transparent; color: var(--risk); border-color: var(--risk); } .btn-danger:hover { background: var(--risk); color: #fff; }
.small.btn, .btn.small, .btn-ghost.small, .btn-danger.small { padding: 8px 16px; font-size: 11.5px; letter-spacing: 1.4px; }
button:disabled { opacity: 0.5; cursor: default; }
.link-btn.small { font-size: 12px; }
.aux { color: var(--soft); font-size: 14px; margin-top: 16px; }
details.user { border-top: 1px solid var(--rule); padding: 10px 0; } details.user summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } details.user[open] summary { margin-bottom: 12px; }
details.user.inactive summary { opacity: 0.6; }
.danger { border-color: var(--risk-bg); }

/* auth pages: the site's black ground with one white card */
body.auth { background: var(--black); }
body.auth .wrap { display: flex; align-items: flex-start; justify-content: center; padding-top: 48px; }
body.auth .foot { border-top-color: #191a27; color: #7c7f88; } body.auth .foot a { color: #a9acb4; }
.auth-card { background: #fff; color: #101118; border-radius: 14px; padding: 34px 36px; width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 26px; margin-bottom: 14px; }
.auth-card label { color: #55575f; } .auth-card input { background: #fff; color: #101118; border-color: #e2e2e8; }
.auth-card .soft { color: #55575f; } .auth-card a { color: var(--red-deep); }
.auth-card .flash { background: #fbf1dc; color: #101118; }
