/* YPP Ready — design tokens (gold brand) */
:root {
  --bg: #F8F6F3;
  --surface: #ffffff;
  --surface-2: #F1EDE7;
  --ink: #0E0B08;
  --ink-2: #3D3731;
  --muted: #6B6259;
  --line: #E6DED4;
  --brand: #FFB21E;
  --brand-ink: #8A5300;
  --brand-soft: #FFF3D6;
  --on-brand: #0E0B08;
  --accent: #2F5BEA;
  --ok: #12a150;
  --ok-soft: #e6f6ec;
  --warn: #C2410C;
  --warn-soft: #FFEDE3;
  --bad: #d92d20;
  --bad-soft: #fde9e7;
  --info: #2F5BEA;
  --info-soft: #E9EEFF;
  --shadow: 0 1px 2px rgba(14, 11, 8, .05), 0 8px 24px rgba(14, 11, 8, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #111111; --surface-2: #1b1b1b; --ink: #f2f2f2; --ink-2: #c8c8c8; --muted: #8e8e8e; --line: #2a2a2a;
    --brand: #FFC23D; --brand-ink: #FFD27A; --brand-soft: #2A1F08; --on-brand: #0E0B08; --accent: #7c93ff;
    --ok: #34d17a; --ok-soft: #0f2a1d; --warn: #FF8F5A; --warn-soft: #2D1A10; --bad: #ff6b5e; --bad-soft: #321614; --info: #8fa2ff; --info-soft: #171a22;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #111111; --surface-2: #1b1b1b; --ink: #f2f2f2; --ink-2: #c8c8c8; --muted: #8e8e8e; --line: #2a2a2a;
  --brand: #FFC23D; --brand-ink: #FFD27A; --brand-soft: #2A1F08; --on-brand: #0E0B08; --accent: #7c93ff;
  --ok: #34d17a; --ok-soft: #0f2a1d; --warn: #FF8F5A; --warn-soft: #2D1A10; --bad: #ff6b5e; --bad-soft: #321614; --info: #8fa2ff; --info-soft: #171a22;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); overflow-x: hidden; }
img, canvas, video { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
.narrow { max-width: 780px; }
.pad-y { padding-top: 48px; padding-bottom: 48px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header / footer */
[hidden] { display: none !important; }
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo-img { display: block; height: 34px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (max-width: 359px) { .logo-img { height: 27px; } }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; flex-shrink: 0; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:focus-visible, .btn:focus-visible, .nav a:focus-visible, .mobile-menu a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.menu-btn { display: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }
/* Full-screen menu under the header with its own scrolling (the page behind stays put). */
.mobile-menu { position: fixed; left: 0; right: 0; top: var(--head-h, 64px); bottom: 0; z-index: 40; border-top: 1px solid var(--line); background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; animation: menuin .22s ease-out; }
.mobile-menu .wrap { padding-top: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@keyframes menuin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mobile-menu { animation: none; } }
.menu-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.menu-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-group:first-child { grid-column: 1 / -1; }
.menu-title, .foot-title { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mobile-menu a:not(.btn) { display: block; padding: 11px 12px; margin: 0 -12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.mobile-menu a:not(.btn):hover, .mobile-menu a[aria-current="page"] { background: var(--surface-2); }
.mobile-menu a[aria-current="page"] { color: var(--brand-ink); }
.block-btn { display: flex; width: 100%; padding: 14px 18px; }
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .head-actions { margin-left: auto; }

}
@media (max-width: 380px) { .menu-grid { grid-template-columns: 1fr; } }
@media (max-width: 359px) { .site-head .head-login { display: none; } }
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0 32px; background: var(--surface); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); }
.foot-grid > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.foot-grid a:not(.brand) { color: var(--ink-2); font-size: .92rem; text-decoration: none; padding: 4px 0; }
.foot-grid a:not(.brand):hover { color: var(--brand-ink); text-decoration: underline; }
.foot-brand p { margin: 10px 0 0; max-width: 320px; }
.disclaimer { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; } }

/* hero */
.hero { padding: 40px 0 20px; }
@media (max-width: 600px) { .hero { padding-top: 28px; } .card { padding: 16px; } h1 { font-size: 1.85rem; } }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.hero p.lead { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--ink-2); max-width: 720px; }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
section.block { margin-top: 28px; }
div.block, form.block { margin-top: 16px; }
#notice:empty { display: none; }

/* forms */
label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=number], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field { margin-bottom: 14px; }
.counter { float: right; font-weight: 500; font-size: .78rem; color: var(--muted); }
.counter.over { color: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); font: 700 .95rem/1 var(--font); padding: 12px 18px; border-radius: 11px; cursor: pointer; text-decoration: none; transition: transform .05s, filter .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.small { padding: 8px 12px; font-size: .85rem; }
.search-bar { display: flex; gap: 10px; }
.search-bar input { font-size: 1.05rem; padding: 14px 16px; }
@media (max-width: 560px) { .search-bar { flex-direction: column; } }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.drop strong { display: block; font-size: 1.05rem; }
.drop input { display: none; }
details.more { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
details.more > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .inner { padding: 0 14px 14px; }

/* questionnaire */
.q { padding: 14px 0; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; }
.q > .q-title { font-weight: 700; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .88rem; cursor: pointer; background: var(--surface); color: var(--ink-2); font-weight: 500; }
.opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 7px 0; margin: 0; cursor: pointer; }
.checks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }

/* results */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
@media (max-width: 600px) { .verdict { grid-template-columns: 1fr; justify-items: start; } }
.ring { --p: 0; --c: var(--brand); width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-size: 2.1rem; line-height: 1; letter-spacing: -.03em; }
.ring small { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat .k { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.stat .s { font-size: .78rem; color: var(--muted); }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 999px; width: 0; transition: width .6s ease; }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.bar .range { opacity: .35; }
.path { padding: 14px 0; border-top: 1px solid var(--line); }
.path:first-of-type { border-top: 0; }
.path .row { justify-content: space-between; margin-bottom: 6px; }
.path .lbl { font-weight: 650; font-size: .92rem; }
.path .num { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.issues { list-style: none; padding: 0; margin: 0; }
.issues li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.issues li:first-child { border-top: 0; }
.issues .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #fff; margin-top: 2px; }
.ic.ok { background: var(--ok); } .ic.warn { background: var(--warn); } .ic.bad { background: var(--bad); } .ic.info { background: var(--info); }
.issues b { display: block; font-size: .95rem; }
.issues .why { color: var(--ink-2); font-size: .9rem; }
.issues .fix { font-size: .88rem; margin-top: 4px; }
.issues .fix::before { content: "Fix: "; font-weight: 700; color: var(--brand-ink); }
.issues .t { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.issues a.src { font-size: .8rem; }
.channel-card { display: flex; gap: 14px; align-items: center; }
.channel-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.channel-card h3 { margin: 0; }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; background: var(--info-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.progress-wrap { margin: 14px 0; }
.progress-wrap .bar > i { transition: width .2s linear; }
.steps-log { font-size: .85rem; color: var(--muted); margin-top: 8px; min-height: 1.4em; }
.sec-scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sec-score { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; text-decoration: none; color: inherit; display: block; }
.sec-score .k { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.sec-score .v { font-weight: 800; font-size: 1.25rem; }
.sec-score .bar { height: 6px; margin-top: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sheet.vertical { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.sheet figure { margin: 0; position: relative; }
.sheet canvas, .sheet img { width: 100%; height: auto; border-radius: 8px; display: block; background: #000; }
.sheet figcaption { font-size: .75rem; color: var(--muted); font-family: var(--mono); margin-top: 3px; }
.sheet figure button { position: absolute; right: 6px; top: 6px; }
.chart { width: 100%; height: 170px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.transcript { max-height: 280px; overflow: auto; font-size: .9rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
.transcript p { margin: 0 0 6px; }
.transcript .ts { font-family: var(--mono); color: var(--muted); font-size: .78rem; margin-right: 6px; }
mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.ai-out { white-space: pre-wrap; font-size: .95rem; }

/* thumbnail previews */
.feed { border-radius: var(--radius); padding: 16px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; }
.feed.light { background: #ffffff; color: #0f0f0f; border: 1px solid #e5e5e5; }
.feed.dark { background: #0f0f0f; color: #f1f1f1; }
.feed .tile .img { position: relative; border-radius: 10px; overflow: hidden; background: #222; }
.feed .tile canvas { display: block; width: 100%; height: auto; }
.feed .tile .dur { position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,.8); color: #fff; font: 600 11px/1 var(--font); padding: 3px 4px; border-radius: 4px; }
.feed .tile .meta { margin-top: 8px; display: grid; gap: 5px; }
.feed .tile .meta i { display: block; height: 9px; border-radius: 4px; background: currentColor; opacity: .16; }
.feed .tile .meta i:nth-child(2) { width: 80%; }
.feed .tile .meta i:nth-child(3) { width: 50%; opacity: .1; }
.feed .tile .cap { font-size: .72rem; opacity: .6; margin-top: 6px; }

/* content / article */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose table { margin: 1em 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.features { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.features .card h3 { margin-bottom: 6px; }
.features .card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 10px; }
.kpi-note { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.privacy-pill { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--ok); font-weight: 650; }

@media print {
  .site-head, .site-foot, .no-print, .theme-btn, form, .hero p.lead { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
}
.grid > .card + .card { margin-top: 0; }
@media (max-width: 600px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* auth + forms */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 40px 0 8px; }
.auth-card { padding: 28px; }
@media (max-width: 480px) { .auth-wrap { padding-top: 24px; } .auth-card { padding: 20px 16px; } }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; margin: 18px 0; }
.tabs button { border: 0; background: none; font: 650 .92rem var(--font); color: var(--ink-2); padding: 10px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 650 .95rem var(--font); text-decoration: none; cursor: pointer; }
.google-btn:hover { background: var(--surface-2); }
.google-btn svg { flex-shrink: 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-msg { font-size: .9rem; margin: 10px 0 0; min-height: 1.2em; }
.form-msg.bad { color: var(--bad); } .form-msg.ok { color: var(--ok); }
input[type=email], input[type=password] { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; outline: none; }
input[type=email]:focus, input[type=password]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.otp { font: 700 1.6rem/1 var(--mono) !important; letter-spacing: .35em; text-align: center; padding: 14px !important; }
.pw-row { position: relative; }
.pw-row input { padding-right: 64px; }
.pw-row button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font: 600 .82rem var(--font); cursor: pointer; padding: 6px 8px; }
.w-full { width: 100%; }
.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.qr-box img { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 8px; }
@media (max-width: 560px) { .qr-box { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: var(--mono); font-size: .95rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: .95rem; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dt { margin-top: 8px; } }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger-btn { background: var(--bad); color: #fff; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.history li:first-child { border-top: 0; }
.legal h2 { font-size: 1.3rem; }
.legal p, .legal li { color: var(--ink-2); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.toc ol { margin: 6px 0 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.sitemap-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sitemap-grid ul { list-style: none; padding: 0; margin: 0; }
.sitemap-grid li { padding: 6px 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- theme switch animation ---------- */
/* Circular reveal from the toggle (View Transitions API); colour cross-fade where unsupported. */
:root.vt-theme::view-transition-old(root), :root.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.vt-theme::view-transition-old(root) { z-index: 1; }
:root.vt-theme::view-transition-new(root) { z-index: 2; }
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease !important;
}
.theme-btn { position: relative; overflow: hidden; color: var(--ink-2); }
.theme-icon { display: block; overflow: visible; }
.theme-icon .i-sun, .theme-icon .i-moon { transform-origin: 12px 12px; transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .3s ease; }
/* light mode: show the moon (click for dark) */
.theme-icon .i-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-icon .i-moon { opacity: 1; transform: rotate(0) scale(1); }
/* dark mode: show the sun (click for light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon .i-sun { opacity: 1; transform: rotate(0) scale(1); }
  :root:not([data-theme="light"]) .theme-icon .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
}
:root[data-theme="dark"] .theme-icon .i-sun { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-icon .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn { color: var(--brand); } }
:root[data-theme="dark"] .theme-btn { color: var(--brand); }
.theme-btn.spin { animation: themepop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes themepop { 0% { transform: scale(1); } 40% { transform: scale(.86); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .theme-icon .i-sun, .theme-icon .i-moon { transition: none; }
  .theme-btn.spin { animation: none; }
}
/* backdrop-filter would trap the fixed menu inside the header box, so drop it while the menu is open */
html.menu-open .site-head { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }

/* My channel table */
.vt td { vertical-align: middle; }
.vt td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.vt-vid { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.vt-vid img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.vt-vid a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vt-vid a:hover { text-decoration: underline; }
.est { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.est .big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.est-scale { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--bad-soft), var(--warn-soft) 25%, var(--ok-soft) 60%); margin: 22px 0 6px; }
.est-scale .range { position: absolute; top: -3px; height: 16px; border-radius: 999px; background: var(--brand); opacity: .9; }
.est-scale .mine { position: absolute; top: -8px; width: 3px; height: 26px; background: var(--ink); border-radius: 2px; }
.est-scale-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
@media (max-width: 520px) { .est { grid-template-columns: 1fr; } }
