/* =====================================================================
   KI Mention – Styles nach BRØRD CI
   Farben: Dark #181e25 · BG #f8f7f5 · BG2 #efede6 · BG3 #222229 · Accent #e2122e (sparsam) · Red #fa4149 (Fehler)
   Schrift: Montserrat · Headlines 500 mit negativem Tracking · Buttons 600, Pille · keine Schatten, keine Verläufe
   ===================================================================== */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

:root {
  --dark: #181e25;
  --bg: #f8f7f5;
  --bg2: #efede6;
  --bg3: #222229;
  --light: #ffffff;
  --accent: #e2122e;
  --red: #fa4149;
  --d64: rgba(24, 30, 37, .64);
  --d48: rgba(24, 30, 37, .48);
  --d32: rgba(24, 30, 37, .32);
  --d16: rgba(24, 30, 37, .16);
  --d08: rgba(24, 30, 37, .08);
  --l64: rgba(255, 255, 255, .64);
  --l16: rgba(255, 255, 255, .16);
  --ok: #1f7a4d;
  --ok-bg: #e4f1e9;
  --warn: #b26a00;
  --warn-bg: #fbf0dc;
  --bad-bg: #fde8ea;
  --line: #e4e1d9;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--dark);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px; line-height: 24px; font-weight: 400;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
p { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.ico { flex: none; vertical-align: middle; }

/* ---------- Typo ---------- */
.h1 { font-size: 56px; line-height: 60px; letter-spacing: -3px; }
.h2 { font-size: 40px; line-height: 46px; letter-spacing: -2px; }
.h4 { font-size: 28px; line-height: 34px; letter-spacing: -1px; }
.h5 { font-size: 22px; line-height: 28px; letter-spacing: -.5px; }
.h6 { font-size: 18px; line-height: 24px; letter-spacing: -.3px; font-weight: 600; }
.h-auth { font-size: 32px; line-height: 38px; letter-spacing: -1.5px; margin-bottom: 8px; }
.lead { font-size: 18px; line-height: 28px; color: var(--d64); max-width: 860px; margin-top: 12px; }
.muted { color: var(--d64); }
.small { font-size: 13px; line-height: 20px; }
.strong { font-weight: 600; }
.strong-line { font-weight: 500; margin-bottom: 16px; }
.center { text-align: center; }
.left { text-align: left; }
.nowrap { white-space: nowrap; }
.eyebrow { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--d64); }
.eyebrow-accent { color: var(--accent); margin-bottom: 12px; }
.meta-line { font-size: 14px; color: var(--d64); margin-top: 16px; }
.err { color: var(--red); }
em { font-style: normal; }

.link, .link-muted { text-underline-offset: 4px; }
.link { color: var(--dark); font-weight: 500; }
.link-muted { color: var(--d64); }
.accent { color: var(--accent) !important; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.link-btn:disabled { color: var(--d48); text-decoration: none; cursor: default; }
.inline-block { display: inline-block; }

/* ---------- Spacing ---------- */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.stack > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.gap-24 { gap: 24px; }
.inline { display: inline; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 48px 32px 96px; }
.narrow { max-width: 900px; margin: 0 auto; }
.container.narrow { max-width: 900px; }
.page-head { margin-bottom: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--line); background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 28px; width: auto; }
.brand-name { font-weight: 600; font-size: 15px; padding-left: 12px; border-left: 1px solid var(--d16); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.trial-pill { display: flex; align-items: center; gap: 12px; background: var(--bg2); border-radius: var(--r-xl); padding: 4px 16px 4px 4px; font-size: 14px; }
.trial-chip { background: var(--light); border-radius: var(--r-xl); padding: 4px 12px; color: var(--d64); font-weight: 500; }
.trial-pill a { font-weight: 600; text-decoration: none; }
.lang-switch { display: flex; border: 1px solid var(--d16); border-radius: var(--r-xl); overflow: hidden; font-size: 12px; font-weight: 600; }
.lang-switch a { padding: 4px 10px; text-decoration: none; color: var(--d64); }
.lang-switch a.active { background: var(--dark); color: var(--light); }
.auth-lang { position: absolute; top: 24px; right: 32px; }

.avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--d16); background: var(--bg2); font-weight: 600; font-size: 14px; cursor: pointer; }
.avatar:focus-visible { outline: 3px solid var(--d16); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px; background: var(--light);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 0; display: none; z-index: 30;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu > a, .dropdown-menu > button, .dropdown-menu form button {
  display: block; width: 100%; text-align: left; padding: 12px 24px; background: none; border: 0; text-decoration: none; cursor: pointer; font-size: 15px;
}
.dropdown-menu > a:hover, .dropdown-menu button:hover { background: var(--bg); }
.dd-head { padding: 12px 24px; color: var(--d64); font-size: 14px; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; }
.dd-plan { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-xl); font-weight: 600; font-size: 15px; line-height: 20px;
  padding: 12px 24px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s; white-space: nowrap;
}
.btn { background: var(--dark); color: var(--light); }
.btn:hover { background: var(--bg3); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--d32); cursor: not-allowed; }
.btn-secondary { background: var(--bg2); color: var(--dark); }
.btn-secondary:hover { background: #e6e3da; }
.btn-ghost { background: transparent; color: var(--dark); }
.btn-ghost:hover { background: var(--bg2); }
.btn-danger { background: var(--light); color: var(--red); border-color: rgba(250, 65, 73, .4); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row form { display: inline; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--d64); }
.icon-btn:hover { background: var(--bg2); color: var(--dark); }
.is-loading { opacity: .7; pointer-events: none; }
.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--d64); text-decoration: none; font-size: 14px; margin-bottom: 16px; }
.back:hover { color: var(--dark); }

/* ---------- Cards ---------- */
.card { background: var(--light); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.card-note { padding: 16px 24px; font-size: 14px; }
.card-inner { border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field > label { font-weight: 500; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--dark); background: var(--light);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23181e25' stroke-width='1.5'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
input::placeholder, textarea::placeholder { color: var(--d48); }
input:focus, select:focus, textarea:focus { border-color: var(--dark); box-shadow: 0 0 0 3px var(--d08); }
.help { color: var(--d64); font-size: 13px; line-height: 20px; }
.has-error input, .has-error select { border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 22px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--dark); width: 16px; height: 16px; flex: none; }
.form-card { display: flex; flex-direction: column; gap: 28px; max-width: 1080px; }
details.more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--d64); }

.callout { display: flex; gap: 14px; align-items: center; background: var(--bg); border-radius: var(--r-md); padding: 18px 24px; font-size: 16px; }
.callout .ico { color: var(--d64); }
.callout-info { align-items: center; }
.callout-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--light); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Flash & Badges ---------- */
.flash { padding: 14px 18px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 16px; }
.flash-error { background: var(--bad-bg); color: #9b1621; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-info { background: var(--bg2); color: var(--dark); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-xl); font-size: 12px; font-weight: 600; line-height: 16px; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-none { background: var(--bad-bg); color: #c1121f; }
.badge-low { background: var(--warn-bg); color: var(--warn); }
.badge-mid { background: var(--bg2); color: var(--dark); }
.badge-high { background: var(--ok-bg); color: var(--ok); }
.badge-muted { background: var(--bg2); color: var(--d64); }
.badge-run { background: var(--dark); color: var(--light); }
.badge-run i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: var(--r-xl); background: var(--bg2); color: var(--d64); font-weight: 500; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Auth ---------- */
.auth-main { display: flex; justify-content: center; padding: 80px 16px; }
.auth-wrap { width: 100%; max-width: 560px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 40px; }
.auth-brand img { height: 36px; width: auto; }
.auth-brand span { font-size: 24px; font-weight: 600; letter-spacing: -.5px; padding-left: 14px; border-left: 1px solid var(--d16); }
.auth-card { padding: 48px 56px; }
.auth-card .muted { margin-bottom: 8px; }
.auth-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--bg2); margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.auth-icon .ico { width: 28px; height: 28px; }
.auth-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 14px; flex-wrap: wrap; }
.otp { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.otp input { text-align: center; padding: 16px 0; font-size: 22px; font-weight: 600; border-radius: 12px; }
.install .auth-brand { justify-content: flex-start; }

/* ---------- Dashboard ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 24px; }
.item-card { text-decoration: none; transition: border-color .15s; display: block; }
.item-card:hover { border-color: var(--dark); }
.big-num { font-size: 48px; line-height: 48px; font-weight: 500; letter-spacing: -2px; }
.big-num small { font-size: 20px; letter-spacing: 0; margin-left: 2px; }
.spark { color: var(--dark); }
.item-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- Questions ---------- */
.q-list { display: flex; flex-direction: column; gap: 12px; max-width: 1080px; }
.q-row { display: flex; gap: 12px; align-items: flex-start; padding: 20px 20px 20px 24px; }
.q-num { color: var(--d64); min-width: 24px; }
.q-text { flex: 1; padding-top: 0; }
.q-text textarea { padding: 10px 14px; }
.q-actions { display: flex; gap: 4px; margin-top: -8px; }
.q-add { display: flex; gap: 8px; margin: 24px 0 12px; flex-wrap: wrap; }

/* ---------- Analyze ---------- */
.analyze { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; max-width: 1200px; }
.doc-mock { position: relative; overflow: hidden; padding: 48px; min-height: 420px; }
.doc-mock div { border-radius: 4px; }
.dm-title { height: 24px; width: 55%; background: var(--dark); opacity: .8; }
.dm-sub { height: 12px; width: 28%; background: var(--d32); margin: 14px 0 40px; }
.dm-line { height: 12px; background: var(--d32); margin-bottom: 16px; }
.dm-line.faint { background: var(--d08); }
.w95 { width: 95%; } .w88 { width: 88%; } .w97 { width: 97%; } .w60 { width: 60%; } .w92 { width: 92%; } .w84 { width: 84%; } .w50 { width: 50%; }
.dm-bullets { margin: 28px 0; }
.dm-bullets div { height: 10px; background: var(--d08); margin: 14px 0 14px 24px; width: 70%; position: relative; }
.dm-bullets div::before { content: ""; position: absolute; left: -20px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--d16); }
.dm-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); animation: scan 2.4s ease-in-out infinite; }
.analyze.is-done .dm-scan { display: none; }
@keyframes scan { 0% { top: 10%; } 50% { top: 85%; } 100% { top: 10%; } }
.an-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.an-steps li { display: flex; gap: 16px; align-items: flex-start; opacity: .55; transition: opacity .3s; }
.an-steps li.active, .an-steps li.done { opacity: 1; }
.an-steps strong { display: block; font-weight: 500; font-size: 18px; }
.an-steps small { color: var(--d64); font-size: 14px; }
.an-ico { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--d16); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.an-steps li.active .an-ico { border-color: var(--dark); }
.an-steps li.active .an-ico .ico { animation: spin 1s linear infinite; }
.an-steps li.done .an-ico { background: var(--dark); color: var(--light); border-color: var(--dark); }

/* ---------- Progress ---------- */
.progress { height: 4px; background: var(--d08); border-radius: 4px; overflow: hidden; }
.progress-thin { height: 4px; }
.progress-bar { height: 100%; background: var(--dark); border-radius: 4px; transition: width .4s ease; }
.progress-bar.lvl-none { background: var(--red); }
.progress-bar.lvl-low { background: var(--warn); }
.progress-bar.lvl-mid { background: var(--dark); }
.progress-bar.lvl-high { background: var(--ok); }

/* ---------- Terminal ---------- */
.terminal { background: var(--dark); color: var(--light); border-radius: var(--r-lg); overflow: hidden; font-family: var(--mono); }
.term-head { display: flex; align-items: center; gap: 20px; padding: 14px 24px; border-bottom: 1px solid var(--l16); font-size: 13px; color: var(--l64); }
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--l16); }
.dots i:first-child { background: var(--accent); }
.term-file { flex: 1; }
.term-body { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; line-height: 22px; }
.term-line { display: flex; gap: 14px; align-items: baseline; color: var(--l64); flex-wrap: wrap; opacity: .6; transition: opacity .2s; }
.term-line.active { opacity: 1; color: var(--light); }
.term-line.active .term-num { color: var(--accent); }
.term-line.done { opacity: 1; color: var(--light); }
.term-num { color: var(--l64); flex: none; }
.term-q { flex: 1 1 360px; }
.term-status { display: inline-flex; gap: 8px; flex: none; }
.term-eng { font-size: 12px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--l16); color: var(--l64); }
.term-eng.busy { border-color: var(--light); color: var(--light); animation: pulse 1s ease-in-out infinite; }
.term-eng.ok::before { content: "✓ "; }
.term-eng.ok { border-color: transparent; background: rgba(255, 255, 255, .08); color: #9fd8b6; }
.term-eng.fail { color: var(--red); border-color: rgba(250, 65, 73, .5); }

/* ---------- Result ---------- */
.meta-icons { display: flex; gap: 20px; flex-wrap: wrap; color: var(--d64); font-size: 14px; margin-top: 8px; }
.meta-icons span { display: inline-flex; align-items: center; gap: 6px; }
.meta-icons .ico { width: 16px; height: 16px; }
.meta-icons a { text-decoration: none; }
.score-row { display: flex; align-items: baseline; gap: 16px; margin: 12px 0 16px; flex-wrap: wrap; }
.score-num { font-size: 72px; line-height: 72px; font-weight: 500; letter-spacing: -4px; }
.score-num small { font-size: 28px; letter-spacing: 0; margin-left: 4px; }
.engine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.engine-box { background: var(--bg); border-radius: var(--r-md); padding: 16px 20px; }
.engine-pct { font-weight: 600; }
.rank { list-style: none; margin: 16px 0 8px; padding: 0; }
.rank li { display: grid; grid-template-columns: 28px minmax(140px, 1.2fr) minmax(80px, 1fr) auto; gap: 16px; align-items: center; padding: 6px 0; font-size: 15px; }
.rank-n { color: var(--d64); font-size: 13px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 6px; background: var(--d08); border-radius: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--d48); border-radius: 6px; }
.rank-count { color: var(--d64); font-size: 13px; white-space: nowrap; }
[data-expandable]:not(.expanded) > li:nth-child(n+11) { display: none; }
.qa > summary, .checks > summary, .brand-answer > summary, .src-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.qa > summary::-webkit-details-marker, .checks > summary::-webkit-details-marker, .brand-answer > summary::-webkit-details-marker, .src-item summary::-webkit-details-marker { display: none; }
.qa > summary .ico, .checks > summary .ico, .brand-answer > summary .ico, .src-item summary .ico { margin-left: auto; transition: transform .2s; }
details[open] > summary > .ico { transform: rotate(180deg); }
.qa-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.qa-row:last-child { border-bottom: 0; }
.qa-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 13px; }
.stat-line { background: var(--bg); border-radius: var(--r-md); padding: 14px 20px; font-size: 14px; }
.stat-line strong { font-size: 22px; margin-right: 8px; }
.src-list { list-style: none; margin: 0; padding: 0; }
.src-list > li { padding: 6px 0; }
.src-list > li:not(.src-item) { display: flex; align-items: center; gap: 12px; }
.src-item summary { padding: 2px 0; }
.src-av { width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: var(--light); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.src-av.alt { background: var(--bg2); color: var(--dark); }
.src-av.own { background: var(--ok); color: var(--light); }
.src-dom { flex: 1; font-size: 15px; }
.src-pages { list-style: none; margin: 8px 0 8px 42px; padding: 0; font-size: 14px; }
.src-pages li { padding: 4px 0; overflow: hidden; text-overflow: ellipsis; }
.src-pages a { color: var(--dark); text-underline-offset: 3px; }

/* ---------- Item ---------- */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.hist-chart { width: 100%; height: auto; }
.hist-chart .grid line { stroke: var(--line); }
.hist-chart text { font-size: 11px; fill: var(--d48); font-family: inherit; }
.hist-chart .line { fill: none; stroke: var(--dark); stroke-width: 2.5; stroke-linejoin: round; }
.hist-chart .dots circle { fill: var(--light); stroke: var(--dark); stroke-width: 2; }
.weekly-toggle { display: flex; gap: 16px; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--d16); border-radius: 28px; cursor: pointer; transition: background .2s; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: var(--light); border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--dark); }
.switch input:checked + span::before { transform: translateX(20px); }
.recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rec { display: flex; gap: 16px; padding: 16px 20px; border-radius: var(--r-md); background: var(--bg); align-items: flex-start; }
.rec p { margin-top: 4px; }
.rec-prio { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; flex: none; margin-top: 2px; min-width: 64px; text-align: center; }
.rec-high .rec-prio { background: var(--bad-bg); color: #c1121f; }
.rec-mid .rec-prio { background: var(--warn-bg); color: var(--warn); }
.rec-low .rec-prio { background: var(--bg2); color: var(--d64); }
.check-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.ck { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 12px; }
.ck .ico { width: 14px; height: 14px; }
.check-list .ok .ck { background: var(--ok-bg); color: var(--ok); }
.check-list .bad .ck { background: var(--bad-bg); color: #c1121f; }
.check-list .na .ck { background: var(--bg2); color: var(--d48); }
.brand-answers { display: flex; flex-direction: column; gap: 12px; }
.brand-answer { background: var(--bg); border-radius: var(--r-md); padding: 16px 20px; }
.answer-text { margin-top: 12px; white-space: pre-wrap; font-size: 15px; line-height: 24px; }
.mini-rank { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.mini-rank li span:first-child { margin-right: 8px; }
.mini-rank li { padding-left: 4px; }
.mini-rank li > span:last-child { float: right; }
.history { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.history a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; gap: 8px; }
.history li:last-child a { border-bottom: 0; }
.history a:hover { color: var(--accent); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--d64); }
.dl dd { margin: 0; text-align: right; }
.danger-zone { background: var(--bg); margin: 32px -32px -32px; padding: 24px 32px 32px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.danger-zone .eyebrow { margin-bottom: 12px; }

/* ---------- Plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; }
.plan-card.is-current { border-color: var(--dark); }
.plan-price { font-size: 20px; font-weight: 600; }
.plan-feat { list-style: none; padding: 0; margin: 16px 0 24px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; flex: 1; }
.plan-feat li { display: flex; gap: 10px; align-items: center; }
.plan-feat li.off { color: var(--d48); }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 8px 18px; border-radius: var(--r-xl); text-decoration: none; font-weight: 500; font-size: 14px; color: var(--d64); }
.tabs a.active { background: var(--dark); color: var(--light); }
.tabs a:not(.active):hover { background: var(--bg2); }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-weight: 600; color: var(--d64); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.table select, .table input[type=date] { padding: 8px 12px; font-size: 14px; min-width: 120px; }
.code { background: var(--bg); border-radius: var(--r-sm); padding: 12px 16px; overflow-x: auto; font-family: var(--mono); white-space: pre-wrap; word-break: break-all; margin: 8px 0 0; }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(24, 30, 37, .32); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal.open { display: flex; }
.modal-box { background: var(--light); border-radius: var(--r-lg); width: 100%; max-width: 480px; padding: 32px; max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--line); }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.modal-head h3 { font-size: 22px; line-height: 28px; letter-spacing: -.5px; }
.answer-body { display: flex; flex-direction: column; gap: 16px; }
.answer-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; }
.answer-item .answer-text { max-height: 360px; overflow-y: auto; }
.answer-item mark { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.answer-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { padding: 24px 32px; font-size: 13px; color: var(--d48); text-align: center; }
.footer a { color: var(--d64); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .item-layout { grid-template-columns: 1fr; }
  .analyze { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .container { padding: 32px 16px 64px; }
  .topbar { padding: 12px 16px; }
  .brand-name, .hide-sm, .trial-chip { display: none; }
  .trial-pill { padding: 6px 14px; }
  .h1 { font-size: 36px; line-height: 40px; letter-spacing: -1.5px; }
  .h2 { font-size: 30px; line-height: 36px; letter-spacing: -1px; }
  .score-num { font-size: 56px; line-height: 56px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .auth-card { padding: 32px 24px; }
  .otp { gap: 4px; }
  .otp input { font-size: 18px; padding: 12px 0; }
  .rank li { grid-template-columns: 24px 1fr auto; }
  .rank-bar { display: none; }
  .danger-zone { margin: 24px -24px -24px; padding: 24px; }
  .auth-lang { top: 12px; right: 16px; }
}
