/* ==========================================================================
   oen.de – design system
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --grad: linear-gradient(120deg, #a78bfa 0%, #6366f1 35%, #22d3ee 100%);
  --grad-hot: linear-gradient(120deg, #f472b6 0%, #8b5cf6 50%, #22d3ee 100%);

  --pass: #22c55e;
  --warn: #f59e0b;
  --fail: #f43f5e;
  --info: #38bdf8;
  --na: #94a3b8;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --topbar: 64px;
  --sidebar: 268px;
  --maxw: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
  --bg: #07070e;
  --bg-2: #0c0c17;
  --surface: rgba(20, 20, 36, .62);
  --surface-solid: #12121f;
  --surface-2: rgba(255, 255, 255, .04);
  --surface-3: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #ececf6;
  --text-2: #b4b4cc;
  --muted: #7f7f9c;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  --glow: 0 0 0 1px rgba(139, 92, 246, .35), 0 10px 40px -10px rgba(99, 102, 241, .55);
  --grid-line: rgba(255, 255, 255, .035);
  --blob-a: rgba(139, 92, 246, .30);
  --blob-b: rgba(34, 211, 238, .18);
  --blob-c: rgba(244, 114, 182, .14);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f6fb;
    --bg-2: #eeeef7;
    --surface: rgba(255, 255, 255, .78);
    --surface-solid: #ffffff;
    --surface-2: rgba(15, 15, 40, .035);
    --surface-3: rgba(15, 15, 40, .06);
    --border: rgba(15, 15, 40, .09);
    --border-strong: rgba(15, 15, 40, .18);
    --text: #12121f;
    --text-2: #3d3d57;
    --muted: #6b6b86;
    --shadow: 0 20px 50px -24px rgba(30, 30, 80, .25), 0 0 0 1px rgba(255, 255, 255, .6) inset;
    --glow: 0 0 0 1px rgba(99, 102, 241, .35), 0 10px 30px -12px rgba(99, 102, 241, .45);
    --grid-line: rgba(15, 15, 40, .045);
    --blob-a: rgba(139, 92, 246, .18);
    --blob-b: rgba(34, 211, 238, .14);
    --blob-c: rgba(244, 114, 182, .10);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6fb;
  --bg-2: #eeeef7;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-2: rgba(15, 15, 40, .035);
  --surface-3: rgba(15, 15, 40, .06);
  --border: rgba(15, 15, 40, .09);
  --border-strong: rgba(15, 15, 40, .18);
  --text: #12121f;
  --text-2: #3d3d57;
  --muted: #6b6b86;
  --shadow: 0 20px 50px -24px rgba(30, 30, 80, .25), 0 0 0 1px rgba(255, 255, 255, .6) inset;
  --glow: 0 0 0 1px rgba(99, 102, 241, .35), 0 10px 30px -12px rgba(99, 102, 241, .45);
  --grid-line: rgba(15, 15, 40, .045);
  --blob-a: rgba(139, 92, 246, .18);
  --blob-b: rgba(34, 211, 238, .14);
  --blob-c: rgba(244, 114, 182, .10);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .legal li a, .check-list a, td a.link, dd a.link { color: #a5b4fc; text-decoration: underline; text-decoration-color: rgba(165, 180, 252, .35); text-underline-offset: 3px; }
:root[data-theme="light"] p a, :root[data-theme="light"] .prose a, :root[data-theme="light"] .legal li a, :root[data-theme="light"] dd a.link { color: #4f46e5; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) p a, :root:not([data-theme="dark"]) .prose a, :root:not([data-theme="dark"]) .legal li a { color: #4f46e5; } }
p a:hover, .legal li a:hover, .prose a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-3); border: 1px solid var(--border); padding: .1em .4em; border-radius: 6px; }
kbd { background: var(--surface-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; padding: .05em .4em; border-radius: 6px; font-size: .75rem; color: var(--text-2); }
::selection { background: rgba(139, 92, 246, .35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--surface-solid); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border-strong); transition: top .2s; }
.skip:focus { top: 12px; }
.icon { flex: none; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .86em; }
.break { word-break: break-all; overflow-wrap: anywhere; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text-hot { background: var(--grad-hot); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% 0; } }

/* ---------- background fx ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-fx::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.blob-a { width: 620px; height: 620px; background: var(--blob-a); top: -220px; left: 18%; animation: drift-a 22s ease-in-out infinite alternate; }
.blob-b { width: 520px; height: 520px; background: var(--blob-b); top: -120px; right: -120px; animation: drift-b 26s ease-in-out infinite alternate; }
.blob-c { width: 460px; height: 460px; background: var(--blob-c); top: 420px; left: -160px; animation: drift-c 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-140px, 120px) scale(.9); } }
@keyframes drift-c { to { transform: translate(160px, -60px) scale(1.1); } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--topbar);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.03em; }
.logo-mark { width: 32px; height: 32px; }
.logo .tld { color: var(--muted); font-weight: 500; }
.topbar .spacer { flex: 1; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px; min-width: 260px; height: 40px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); cursor: pointer; font: inherit; font-size: .92rem;
  transition: border-color .2s, background .2s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface-3); }
.search-trigger kbd { margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-3); }
.menu-btn { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .theme-btn .sun { display: none; } :root:not([data-theme]) .theme-btn .moon { display: block; } }

.lang { position: relative; }
.lang-btn { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font: inherit; font-size: .85rem; font-weight: 600; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px; list-style: none; margin: 0;
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: all .18s var(--ease);
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; font-size: .92rem; color: var(--text-2); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--surface-3); color: var(--text); }
.lang-menu small { color: var(--muted); font-weight: 600; }

/* ---------- shell / sidebar ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 14px 24px; border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.nav-section { margin-bottom: 18px; }
.nav-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 10px 8px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 11px;
  color: var(--text-2); font-size: .93rem; font-weight: 500; transition: background .15s, color .15s;
}
.nav-link .icon { color: var(--muted); transition: color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:hover .icon { color: var(--text); }
.nav-link[aria-current="page"] { background: linear-gradient(90deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .05)); color: var(--text); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-link[aria-current="page"] .icon { color: #a78bfa; }
.nav-badge { margin-left: auto; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--grad); color: #fff; }
.sidebar-card {
  margin: 22px 4px 0; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: radial-gradient(120% 100% at 0% 0%, rgba(139, 92, 246, .16), transparent 60%), var(--surface-2);
  font-size: .86rem; color: var(--text-2);
}
.sidebar-card strong { display: block; color: var(--text); margin-bottom: 4px; font-family: var(--font-display); }
.scrim { display: none; }

.content { min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 36px 32px 64px; flex: 1; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-grid; }
  .sidebar {
    position: fixed; z-index: 80; top: 0; left: 0; bottom: 0; height: 100vh; width: min(86vw, 300px);
    background: var(--surface-solid); transform: translateX(-102%); transition: transform .28s var(--ease); padding-top: 18px;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .search-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .topbar .cta { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 24px 16px 48px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .logo { font-size: 1.12rem; }
}

/* ---------- buttons / inputs ---------- */
.btn {
  --b: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  font: inherit; font-weight: 600; font-size: .95rem; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--b); color: var(--text); cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--grad); background-size: 140% 100%; border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 0 0 1px rgba(139, 92, 246, .5), 0 14px 44px -10px rgba(99, 102, 241, .75); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgba(139, 92, 246, .7); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); background: var(--surface-3); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.textarea.mono { font-family: var(--mono); font-size: .85rem; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237f7f9c' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
.select option { background: var(--surface-solid); color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.field-error { color: var(--fail); font-size: .82rem; }
.input.is-invalid, .textarea.is-invalid { border-color: var(--fail); }

/* Big URL form */
.url-form { position: relative; display: flex; gap: 8px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.url-form::before { content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1px; background: var(--grad); opacity: .0; transition: opacity .3s; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.url-form:focus-within::before { opacity: 1; }
.url-form .url-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.url-form input { flex: 1; min-width: 0; height: 54px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; padding: 0 12px 0 44px; outline: none; }
.url-form input::placeholder { color: var(--muted); }
.url-form .btn { height: 54px; }
@media (max-width: 560px) {
  .url-form { flex-direction: column; }
  .url-form input { flex: none; width: 100%; }
  .url-form .url-icon { top: 35px; }
  .url-form .btn { width: 100%; }
}
.form-extras { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; margin-top: 14px; }
.form-extras .field { flex: 1 1 220px; }

.seg { display: inline-flex; align-self: flex-start; width: fit-content; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button, .seg label { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 0 var(--border-strong), 0 4px 14px -6px rgba(0, 0, 0, .4); }

/* ---------- cards / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card-sm { padding: 18px; border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 650; font-size: 1.1rem; }
.card-title .icon { color: #a78bfa; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.section { margin-top: 64px; }
.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #a78bfa; margin-bottom: 12px; }
.divider { height: 1px; background: var(--border); margin: 28px 0; border: 0; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.pill .icon { width: 15px; height: 15px; }
.pill-glow { border-color: rgba(139, 92, 246, .45); background: rgba(139, 92, 246, .12); color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; }
.b-pass { color: var(--pass); background: color-mix(in srgb, var(--pass) 14%, transparent); }
.b-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.b-fail { color: var(--fail); background: color-mix(in srgb, var(--fail) 15%, transparent); }
.b-na { color: var(--na); background: color-mix(in srgb, var(--na) 14%, transparent); }
.b-info { color: var(--info); background: color-mix(in srgb, var(--info) 14%, transparent); }
.c-pass { color: var(--pass); } .c-warn { color: var(--warn); } .c-fail { color: var(--fail); } .c-na { color: var(--na); } .c-info { color: var(--info); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 40px 0 10px; text-align: center; }
.hero .pill-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; max-width: 980px; margin: 0 auto 20px; }
.hero .lead { max-width: 690px; margin: 0 auto 32px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-2); }
.hero .url-form { max-width: 720px; margin: 0 auto; text-align: left; }
.hero-meta { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: .88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .icon { width: 16px; height: 16px; color: var(--pass); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 56px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; letter-spacing: -.03em; }
.stat span { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* preview card in hero */
.showcase { position: relative; margin: 54px auto 0; max-width: 980px; }
.showcase::before { content: ""; position: absolute; inset: 10% 8% -6%; background: var(--grad); filter: blur(70px); opacity: .28; z-index: -1; border-radius: 40px; }
.showcase .card { padding: 26px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; text-align: left; }
@media (max-width: 760px) { .showcase .card { grid-template-columns: minmax(0, 1fr); justify-items: center; } }

/* ---------- tool cards ---------- */
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.tool-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(400px 160px at var(--mx, 50%) -20%, rgba(139, 92, 246, .22), transparent 70%); opacity: 0; transition: opacity .3s; }
.tool-card:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .45); box-shadow: var(--glow); }
.tool-card:hover::after { opacity: 1; }
.tool-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 24px -10px rgba(99, 102, 241, .8); }
.tool-icon.lg { width: 60px; height: 60px; border-radius: 17px; }
.tool-card h3 { margin: 6px 0 0; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; }
.tool-card p { margin: 0; color: var(--text-2); font-size: .92rem; }
.tool-card .go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: #a78bfa; }
.tool-card .go .icon { transition: transform .2s var(--ease); }
.tool-card:hover .go .icon { transform: translateX(4px); }
.cat-analysis .tool-icon { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.cat-technical .tool-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.cat-content .tool-icon { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.cat-generators .tool-icon { background: linear-gradient(135deg, #f59e0b, #ec4899); }

/* ---------- tool page header ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .84rem; color: var(--muted); margin-bottom: 18px; list-style: none; padding: 0; }
.crumbs a:hover { color: var(--text); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.tool-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.tool-head h1 { margin: 0 0 8px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.tool-head .lead { color: var(--text-2); font-size: 1.05rem; max-width: 760px; margin: 0; }
.tool-head .pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 640px) { .tool-head { flex-direction: column; gap: 12px; } }

/* ---------- results ---------- */
.results { margin-top: 28px; }
.results:empty { display: none; }
.result-top { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 820px) { .result-top { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }
.result-url { font-family: var(--mono); font-size: .86rem; color: var(--text-2); word-break: break-all; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 820px) { .result-meta { justify-content: center; } }

.gauge { position: relative; width: 210px; height: 210px; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge .track { stroke: var(--surface-3); }
.gauge .arc { stroke-linecap: round; stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.4s var(--ease); filter: drop-shadow(0 0 10px var(--gc)); }
.gauge.is-in .arc { stroke-dashoffset: calc(var(--len) * (1 - var(--p))); }
.gauge .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .num { font-family: var(--font-display); font-size: 3.6rem; font-weight: 700; line-height: 1; letter-spacing: -.05em; }
.gauge .num small { font-size: 1.1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.gauge .lbl { display: block; margin-top: 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.gauge.sm { width: 112px; height: 112px; }
.gauge.sm .num { font-size: 2rem; }
.gauge.sm .lbl { font-size: .66rem; margin-top: 3px; }
.band-excellent { --gc: #22c55e; } .band-good { --gc: #84cc16; } .band-fair { --gc: #f59e0b; } .band-poor { --gc: #f43f5e; }
.band-excellent .lbl, .t-excellent { color: #22c55e; } .band-good .lbl, .t-good { color: #84cc16; } .band-fair .lbl, .t-fair { color: #f59e0b; } .band-poor .lbl, .t-poor { color: #f43f5e; }

.cats { display: grid; gap: 12px; }
.cat-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; }
.cat-row .icon { color: var(--muted); width: 18px; height: 18px; }
.cat-row .name { font-weight: 600; font-size: .93rem; display: flex; justify-content: space-between; gap: 8px; }
.cat-row .w { font-size: .75rem; color: var(--muted); font-weight: 500; }
.cat-row .pct { font-family: var(--font-display); font-weight: 700; min-width: 44px; text-align: right; }
.bar { grid-column: 2 / 4; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gc, var(--grad)); transition: width 1.2s var(--ease); }
.is-in .bar i { width: calc(var(--p) * 100%); }

.counts { display: flex; gap: 10px; flex-wrap: wrap; }
.count-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.count-chip b { font-family: var(--font-display); font-size: 1.1rem; }

.issues { display: flex; flex-direction: column; gap: 10px; }
.issue { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; transition: border-color .2s; }
.issue[open] { border-color: var(--border-strong); }
.issue summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; }
.issue summary::-webkit-details-marker { display: none; }
.issue summary:hover { background: var(--surface-2); }
.issue .s-icon { margin-top: 1px; }
.issue .t { display: block; font-weight: 600; }
.issue .m { display: block; color: var(--text-2); font-size: .91rem; margin-top: 2px; overflow-wrap: anywhere; }
.issue .r { display: flex; align-items: center; gap: 8px; }
.issue .r .chev { color: var(--muted); transition: transform .2s; }
.issue[open] .r .chev { transform: rotate(180deg); }
.issue .fix { padding: 0 16px 16px 54px; color: var(--text-2); font-size: .91rem; }
.issue .fix b { color: var(--text); }
.impact { font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: var(--fail); white-space: nowrap; }
.issue.warn .impact { color: var(--warn); }

.checks-cat { margin-top: 8px; }
.check-row { display: grid; grid-template-columns: 22px minmax(150px, 230px) minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: .91rem; }
.check-row:last-child { border-bottom: 0; }
.check-row .n { font-weight: 600; }
.check-row .m { color: var(--text-2); overflow-wrap: anywhere; }
.check-row .w { color: var(--muted); font-size: .78rem; white-space: nowrap; }
@media (max-width: 720px) { .check-row { grid-template-columns: 22px minmax(0, 1fr); } .check-row .m, .check-row .w { grid-column: 2; } }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 14px; border-radius: 10px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.tabs button .icon { width: 16px; height: 16px; }
.tabs button[aria-selected="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 0 var(--border-strong), 0 4px 14px -6px rgba(0, 0, 0, .35); }
.tab-panel[hidden] { display: none; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* SERP preview */
.serp { background: #fff; color: #202124; border-radius: var(--radius); padding: 18px 20px; font-family: Arial, sans-serif; border: 1px solid var(--border); }
.serp .site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.serp .fav { width: 26px; height: 26px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #5f6368; border: 1px solid #dadce0; }
.serp .sname { font-size: 14px; color: #202124; line-height: 1.2; }
.serp .surl { font-size: 12px; color: #4d5156; line-height: 1.3; }
.serp .stitle { font-size: 20px; line-height: 1.3; color: #1a0dab; margin: 2px 0 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.serp .sdesc { font-size: 14px; line-height: 1.58; color: #4d5156; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.serp .sdesc .date { color: #70757a; }
.serp.mobile { max-width: 400px; }
.serp.mobile .stitle { font-size: 18px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.serp.mobile .sdesc { -webkit-line-clamp: 3; }
.serp.desktop { max-width: 652px; }
.meter { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.meter .track { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter .track i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--pass); transition: width .2s, background .2s; }
.meter.over .track i { background: var(--fail); }
.meter.short .track i { background: var(--warn); }
.meter b { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* loader */
.loader { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.spinner { width: 74px; height: 74px; border-radius: 50%; position: relative; }
.spinner::before, .spinner::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; }
.spinner::before { border-top-color: var(--violet); border-right-color: var(--cyan); animation: spin 1s linear infinite; }
.spinner::after { inset: 10px; border-bottom-color: var(--pink); border-left-color: var(--indigo); animation: spin 1.6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); transition: color .3s; }
.steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-strong); transition: all .3s; flex: none; }
.steps li.active { color: var(--text); }
.steps li.active::before { background: var(--violet); box-shadow: 0 0 12px var(--violet); border-color: transparent; }
.steps li.done { color: var(--text-2); }
.steps li.done::before { background: var(--pass); border-color: transparent; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .93rem; }
.alert .icon { margin-top: 1px; }
.alert-fail { border-color: color-mix(in srgb, var(--fail) 40%, transparent); background: color-mix(in srgb, var(--fail) 9%, transparent); }
.alert-fail .icon { color: var(--fail); }
.alert-warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.alert-warn .icon { color: var(--warn); }
.alert-pass { border-color: color-mix(in srgb, var(--pass) 40%, transparent); background: color-mix(in srgb, var(--pass) 9%, transparent); }
.alert-pass .icon { color: var(--pass); }
.alert-info { border-color: color-mix(in srgb, var(--info) 35%, transparent); background: color-mix(in srgb, var(--info) 8%, transparent); }
.alert-info .icon { color: var(--info); }

/* chain (redirects) */
.chain { display: flex; flex-direction: column; gap: 0; }
.hop { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.hop-arrow { display: flex; justify-content: flex-start; padding-left: 38px; height: 26px; color: var(--muted); }
.code { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-align: center; padding: 6px 0; border-radius: 10px; }
.code.c2 { background: color-mix(in srgb, var(--pass) 16%, transparent); color: var(--pass); }
.code.c3 { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.code.c4, .code.c5, .code.c0 { background: color-mix(in srgb, var(--fail) 16%, transparent); color: var(--fail); }

/* robots lines */
.code-view { font-family: var(--mono); font-size: .82rem; line-height: 1.65; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); max-height: 460px; overflow: auto; padding: 10px 0; }
.code-view .ln { display: grid; grid-template-columns: 48px minmax(0, 1fr); white-space: pre-wrap; word-break: break-all; padding: 0 12px 0 0; }
.code-view .ln span:first-child { color: var(--muted); text-align: right; padding-right: 14px; user-select: none; }
.code-view .ln.hit { background: color-mix(in srgb, var(--violet) 20%, transparent); box-shadow: inset 3px 0 0 var(--violet); }
.code-view .ln.group { background: color-mix(in srgb, var(--cyan) 8%, transparent); }

/* big verdict */
.verdict { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius-lg); border: 1px solid; }
.verdict .v-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.verdict h2 { margin: 0 0 4px; font-size: 1.5rem; }
.verdict p { margin: 0; color: var(--text-2); }
.verdict.ok { border-color: color-mix(in srgb, var(--pass) 40%, transparent); background: color-mix(in srgb, var(--pass) 8%, var(--surface)); }
.verdict.ok .v-icon { background: color-mix(in srgb, var(--pass) 20%, transparent); color: var(--pass); }
.verdict.bad { border-color: color-mix(in srgb, var(--fail) 40%, transparent); background: color-mix(in srgb, var(--fail) 8%, var(--surface)); }
.verdict.bad .v-icon { background: color-mix(in srgb, var(--fail) 20%, transparent); color: var(--fail); }
.verdict.mid { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.verdict.mid .v-icon { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }

.grade { font-family: var(--font-display); font-size: 3.2rem; font-weight: 700; line-height: 1; width: 92px; height: 92px; border-radius: 22px; display: grid; place-items: center; }
.grade-A, .grade-A\+ { background: color-mix(in srgb, var(--pass) 18%, transparent); color: var(--pass); }
.grade-B { background: color-mix(in srgb, #84cc16 18%, transparent); color: #84cc16; }
.grade-C, .grade-D { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.grade-E, .grade-F { background: color-mix(in srgb, var(--fail) 18%, transparent); color: var(--fail); }

.metric { padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.metric .k { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.metric .v { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.metric .d { font-size: .8rem; color: var(--muted); }
.dist { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-top: 10px; background: var(--surface-3); }
.dist i { display: block; height: 100%; }
.dist i:nth-child(1) { background: var(--pass); } .dist i:nth-child(2) { background: var(--warn); } .dist i:nth-child(3) { background: var(--fail); }

.term-bar { display: grid; grid-template-columns: minmax(0, 1fr) 56px 64px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.term-bar:last-child { border-bottom: 0; }
.term-bar .t { position: relative; padding: 3px 8px; border-radius: 6px; overflow: hidden; z-index: 0; overflow-wrap: anywhere; }
.term-bar .t::before { content: ""; position: absolute; inset: 0; width: calc(var(--p) * 100%); background: linear-gradient(90deg, rgba(139, 92, 246, .28), rgba(34, 211, 238, .12)); z-index: -1; border-radius: 6px; }
.term-bar .c, .term-bar .d { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.term-bar.is-kw .t { font-weight: 700; color: var(--text); }

.heading-tree { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.heading-tree li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.heading-tree .lv { flex: none; font-family: var(--mono); font-size: .72rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); height: fit-content; }
.heading-tree li[data-l="1"] .lv { background: var(--grad); color: #fff; }

.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.bot .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.bot.ok .dot { background: var(--pass); box-shadow: 0 0 10px var(--pass); }
.bot.no .dot { background: var(--fail); box-shadow: 0 0 10px var(--fail); }
.bot b { display: block; font-size: .92rem; }
.bot small { color: var(--muted); font-size: .78rem; }
.bot .st { margin-left: auto; }

/* ---------- prose / faq ---------- */
.prose { color: var(--text-2); max-width: 800px; }
.prose h2 { color: var(--text); margin-top: 1.6em; }
.prose h3 { color: var(--text); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose strong { color: var(--text); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; color: var(--text-2); }
.check-list li .icon { color: var(--pass); margin-top: 2px; }
.check-list strong { color: var(--text); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .2s; flex: none; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .a { padding: 0 18px 16px; color: var(--text-2); }

/* weight chart (score page / home) */
.weights { display: grid; gap: 14px; }
.weight-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 54px; gap: 14px; align-items: center; }
.weight-row .bar { grid-column: auto; height: 12px; }
.weight-row .bar i { width: calc(var(--p) * 100%); background: var(--grad); }
.weight-row b { font-family: var(--font-display); text-align: right; }
@media (max-width: 640px) { .weight-row { grid-template-columns: minmax(0, 1fr) 48px; } .weight-row .bar { grid-column: 1 / -1; order: 3; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 42px 32px 28px; margin-top: auto; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer p { color: var(--muted); font-size: .9rem; max-width: 360px; margin-top: 12px; }
.footer .footer-h { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-family: var(--font); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .9rem; }
.footer ul a { color: var(--text-2); }
.footer ul a:hover { color: var(--text); }
.footer-bottom { max-width: var(--maxw); margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-inner > :first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer { padding: 32px 16px 24px; } }

/* ---------- command palette ---------- */
.palette { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 24px)); margin: 12vh auto auto; color: var(--text); }
.palette::backdrop { background: rgba(5, 5, 12, .6); backdrop-filter: blur(4px); }
.palette-box { background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow), 0 30px 80px -20px rgba(0, 0, 0, .6); overflow: hidden; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.palette-search input { flex: 1; height: 58px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); }
.palette-list a .tool-icon { width: 34px; height: 34px; border-radius: 10px; }
.palette-list a .tool-icon .icon { width: 18px; height: 18px; }
.palette-list a b { color: var(--text); display: block; font-size: .95rem; }
.palette-list a small { color: var(--muted); font-size: .82rem; display: block; line-height: 1.35; }
.palette-list a.active, .palette-list a:hover { background: var(--surface-3); }
.palette-empty { padding: 26px; text-align: center; color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 300; padding: 11px 18px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-weight: 600; font-size: .9rem; transition: all .25s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* legal */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; color: var(--text); }
.legal h3 { font-size: 1.05rem; margin-top: 1.5em; color: var(--text); }
.legal p, .legal li { color: var(--text-2); }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; }

/* error page */
.error-page { text-align: center; padding: 60px 0; }
.error-page .big { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 10rem); font-weight: 700; line-height: 1; letter-spacing: -.06em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .topbar, .sidebar, .footer, .bg-fx, form, .url-form, .tool-form { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ddd; background: #fff; }
}

/* links inside form labels */
.check a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="light"] .check a { color: #4f46e5; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .check a { color: #4f46e5; } }
.field > label.check { font-weight: 400; }

/* ---------- cookie consent ---------- */
.consent { position: fixed; z-index: 250; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: center; pointer-events: none; }
.consent[hidden] { display: none; }
.consent-box { pointer-events: auto; width: min(760px, 100%); background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow), 0 30px 80px -20px rgba(0, 0, 0, .55); padding: 22px; }
.consent-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.consent-head h2 { margin: 0; font-size: 1.2rem; }
.consent-head .tool-icon { width: 38px; height: 38px; border-radius: 11px; }
.consent-box p { color: var(--text-2); font-size: .92rem; margin-bottom: 14px; }
.consent-box p a { color: #a5b4fc; text-decoration: underline; }
.consent-cats { display: grid; gap: 8px; margin-bottom: 16px; }
.consent-cat { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.consent-cat input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--violet); }
.consent-cat strong { display: block; font-size: .92rem; }
.consent-cat small { color: var(--muted); font-size: .82rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.consent-actions .btn { flex: 1 1 180px; }
@media (max-width: 560px) { .consent { left: 8px; right: 8px; bottom: 8px; } .consent-box { padding: 16px; } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--text); }

/* ---------- admin + template class hooks (auth, members, acp) ---------- */
.page--narrow { max-width: 560px; }
.page__header { margin-bottom: 20px; }
.page__title { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.page__lead { color: var(--text-2); }
.page--auth .form, .page--dashboard .datalist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.field__label { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field__input { width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; }
.field__input:focus { outline: none; border-color: rgba(139, 92, 246, .7); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
.field__hint { font-size: .8rem; color: var(--muted); }
.btn--primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn--link { background: none; border: 0; color: var(--text-2); }
.links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: .9rem; }
.links__item { color: #a5b4fc; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions__form { display: inline; }
.datalist__row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.datalist__key { color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; }
.spark span { flex: 1; min-width: 3px; border-radius: 3px 3px 0 0; background: var(--grad); opacity: .85; }

/* ---------- social previews (og-check) ---------- */
.sp-card { margin-top: 12px; border-radius: 12px; overflow: hidden; background: #fff; color: #1c1e21; border: 1px solid #dadde1; font-family: Helvetica, Arial, sans-serif; }
.sp-img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: #f0f2f5; }
.sp-noimg { display: grid; place-items: center; align-content: center; gap: 6px; color: #8a8d91; font-size: .8rem; text-align: center; padding: 8px; }
.sp-noimg .icon { color: #bcc0c4; }
.sp-body { padding: 10px 12px 12px; background: #f0f2f5; display: grid; gap: 3px; }
.sp-host { font-size: .72rem; color: #65676b; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-title { font-size: .95rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sp-desc { font-size: .82rem; color: #65676b; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sp-x { border-radius: 16px; border-color: #cfd9de; color: #0f1419; }
.sp-x .sp-body { background: #fff; }
.sp-x .sp-title { font-weight: 400; font-size: .9rem; -webkit-line-clamp: 1; }
.sp-x .sp-host { font-size: .78rem; color: #536471; letter-spacing: 0; }
.sp-x-small { display: grid; grid-template-columns: 110px minmax(0, 1fr); }
.sp-x-small .sp-img { aspect-ratio: 1; height: 100%; }
.sp-x-small .sp-body { align-content: center; border-left: 1px solid #cfd9de; }
.sp-wa { display: grid; grid-template-columns: minmax(0, 1fr) 76px; background: #e7fce3; border-color: #c9eec2; border-left: 4px solid #25d366; }
.sp-wa .sp-body { background: transparent; }
.sp-wa .sp-host { color: #54656f; }
.sp-thumb { width: 76px; height: 100%; min-height: 76px; object-fit: cover; background: #d9f3d3; }
.sp-wa .sp-noimg { font-size: 0; gap: 0; }

/* ---------- generators ---------- */
.gen-set { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
.gen-set[hidden] { display: none; }
.req { color: var(--fail); font-weight: 700; }
.gen-sticky { position: sticky; top: 84px; }
@media (max-width: 640px) { .gen-sticky { position: static; } }
.gen-status { margin-top: 10px; font-size: .86rem; font-weight: 600; }
.rep-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rep-row .textarea { min-height: 46px; }
.rep-del { align-self: end; margin-bottom: 4px; }
@media (max-width: 720px) { .rep-row { grid-template-columns: minmax(0, 1fr) auto; } .rep-row .field:nth-child(2) { grid-column: 1; } .rep-del { grid-row: 1; grid-column: 2; align-self: start; } }
[data-count].c-warn { color: var(--warn); }

/* ---------- modal (PDF report) ---------- */
.modal { border: 0; padding: 0; background: transparent; width: min(520px, calc(100vw - 24px)); margin: auto; color: var(--text); }
.modal::backdrop { background: rgba(5, 5, 12, .6); backdrop-filter: blur(4px); }
.modal-box { background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow), 0 30px 80px -20px rgba(0, 0, 0, .6); padding: 22px; display: grid; gap: 16px; }
.modal-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.modal-head h2 { font-size: 1.2rem; margin: 2px 0 4px; }
.modal-head p { margin: 0; font-size: .9rem; }
.modal-head .tool-icon { background: var(--grad); color: #fff; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.report-captcha { min-height: 65px; display: flex; justify-content: center; }
.report-status { font-size: .88rem; font-weight: 600; min-height: 1.2em; }
.report-status:empty { display: none; }
.btn.is-loading { opacity: .7; cursor: progress; }
.alert[hidden], .report-captcha[hidden] { display: none; }

/* ---------- headings / ssl ---------- */
.h-counts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .h-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.h-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.h-tree li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0 5px calc(var(--lv) * 16px); border-bottom: 1px dashed var(--border); font-size: .9rem; }
.h-tree .lv { font: 700 .72rem var(--mono); padding: 2px 0; border-radius: 6px; text-align: center; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.h-tree .lv-1 { background: var(--grad); color: #fff; border-color: transparent; }
.h-tree .tx { overflow-wrap: anywhere; color: var(--text); }
.h-tree .badge { margin-left: 6px; }
.chain-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; }
.chain-list li span { display: block; font-size: .8rem; }

/* the hidden attribute always wins over component display rules */
[hidden] { display: none !important; }
