/* QRForge design system. Light by default, dark via [data-theme="dark"]. */
:root {
  --bg: #ffffff; --surface: #ffffff; --soft: #f5f5f7; --soft-2: #fafafa;
  --text: #1d1d1f; --muted: #55555c; --line: #e4e4e8; --line-strong: #c9c9d0;
  --brand: #5258e4; --brand-d: #3f44c4; --brand-soft: rgba(82, 88, 228, .1);
  --ink: #1d1d1f; --on-ink: #ffffff; --on-brand: #ffffff;
  --ok: #138a5a; --ok-bg: rgba(19, 138, 90, .12); --bad: #c62a63; --bad-bg: rgba(198, 42, 99, .12);
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 24px rgba(20, 20, 40, .06);
  --ring: 0 0 0 3px rgba(82, 88, 228, .3);
  --hero-img: url(../images/hero-blobs.svg);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0f14; --surface: #171923; --soft: #1d2030; --soft-2: #1a1d2a;
  --text: #f1f2f6; --muted: #a6a9b8; --line: #2b2f42; --line-strong: #444965;
  --brand: #8087ff; --brand-d: #6e75f5; --brand-soft: rgba(128, 135, 255, .16);
  --ink: #f1f2f6; --on-ink: #0e0f14; --on-brand: #0e0f14;
  --ok: #43d399; --ok-bg: rgba(67, 211, 153, .14); --bad: #ff7aa6; --bad-bg: rgba(255, 122, 166, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --ring: 0 0 0 3px rgba(128, 135, 255, .4);
  --hero-img: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; }
.logo i { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #5258e4, #d73b9f 60%, #ff8a3c); display: inline-block; }
.nav nav { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav nav a, .nav nav button { font: inherit; font-size: .95rem; font-weight: 500; padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; transition: background .15s; }
.nav nav a:hover, .nav nav button:hover { background: var(--soft); }
.nav .pill { border: 1.5px solid var(--ink); font-weight: 700; padding: 8px 16px; }
.nav .pill.solid { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.nav .pill.solid:hover { background: var(--brand-d); }
.nav select.lang { width: auto; padding: 6px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; border-width: 1px; }
.nav .icon-btn { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; font-size: 1.05rem; }
@media (max-width: 760px) { .nav nav a:not(.pill):not(.keep) { display: none; } }
@media (max-width: 520px) { .nav nav .pill:not(.solid) { display: none; } .wrap { padding: 0 16px; } }

@media (max-width: 520px) {
  .nav { gap: 8px; }
  .logo { font-size: 1.1rem; }
  .nav nav { gap: 2px; }
  .nav .pill { padding: 7px 12px; font-size: .85rem; }
  .nav select.lang { padding: 5px 8px; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-block; border: 0; background: var(--brand); color: var(--on-brand); padding: 13px 26px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; text-align: center; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--brand-d); box-shadow: 0 6px 16px rgba(82, 88, 228, .3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.alt { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.alt:hover { background: var(--soft); box-shadow: none; }
.btn.small { padding: 8px 16px; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); }
.btn.danger:hover { background: var(--bad-bg); box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

label { display: block; font-size: .85rem; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=url], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 84px; }
input[type=color] { width: 46px; height: 40px; padding: 2px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--brand); }
input[type=checkbox] { accent-color: var(--brand); margin-right: 8px; }
input[type=file] { width: 100%; font: inherit; font-size: .85rem; color: var(--muted); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: 999px; margin-right: 12px; cursor: pointer; }
.check { display: flex; align-items: center; font-weight: 500; margin: 12px 0 0; cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row.r3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.hint { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.err { color: var(--bad); font-size: .85rem; min-height: 1.2em; margin-top: 6px; }
.color { display: flex; align-items: center; gap: 10px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 24px 40px; margin: 0 -24px; background: var(--hero-img) center / cover no-repeat; border-radius: 0 0 40px 40px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; max-width: 840px; margin: 0 auto 16px; text-wrap: balance; }
.hero p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.15rem; text-wrap: balance; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.chips span { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .9rem; font-weight: 600; }
@media (max-width: 520px) { .hero { margin: 0 -16px; padding: 48px 16px 28px; } }

/* ---------- tool ---------- */
.tool { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin: 8px 0 24px; padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: 28px; align-items: start; }
@media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .tool { padding: 12px; border-radius: 22px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); min-width: 0; }
@media (max-width: 520px) { .card { padding: 20px; } }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button, .ptabs button { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.tabs button:hover, .ptabs button:hover { border-color: var(--ink); }
.tabs button.active, .ptabs button.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.panel-title h3 { margin: 0; font-size: 1rem; }

details { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--muted); }
details[open] > summary::after { content: "–"; }
.box { background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-top: 14px; }

.templates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 560px) { .templates { grid-template-columns: repeat(3, 1fr); } }
.tpl { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 8px 6px; cursor: pointer; text-align: center; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tpl:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.tpl.sel { border-color: var(--brand); box-shadow: var(--ring); }
.tpl .thumb { border-radius: 8px; overflow: hidden; line-height: 0; display: flex; justify-content: center; }
.tpl .thumb canvas { width: 100% !important; height: auto !important; }
.tpl span { display: block; font-size: .75rem; font-weight: 600; margin-top: 6px; }

.drop { border: 1.5px dashed var(--line-strong); background: var(--soft-2); border-radius: var(--r-md); padding: 16px; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.icons button { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; padding: 8px; transition: transform .15s, border-color .15s; }
.icons button:hover { transform: translateY(-2px); border-color: var(--brand); }
.icons img { width: 100%; height: 100%; }
.swatches { display: flex; gap: 8px; margin: 10px 0 4px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; transition: transform .15s; }
.swatches button:hover { transform: scale(1.08); }
.swatches button.sel { outline: 2px solid var(--brand); outline-offset: 2px; }

.kits { display: grid; gap: 8px; margin-top: 12px; }
.kit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.kit img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.kit .dots { display: flex; gap: 4px; }
.kit .dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.kit b { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- preview ---------- */
.preview { position: sticky; top: 84px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
@media (max-width: 900px) { .preview { position: static; } }
.ptabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ptabs button { padding: 6px 12px; font-size: .8rem; }
.stage { width: 100%; display: grid; place-items: center; min-height: 300px; }
#qrHost { position: absolute; left: -9999px; top: 0; }
#preview { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 12px; box-shadow: var(--shadow); max-width: min(100%, 360px); height: auto; transition: opacity .15s; }
#preview.dim { opacity: .35; }
.tools-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dl { width: 100%; display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.dl .span { grid-column: 1 / -1; }
.dl select { width: 100%; }
.scan { font-size: .85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; display: none; }
.scan.ok { display: block; background: var(--ok-bg); color: var(--ok); }
.scan.bad { display: block; background: var(--bad-bg); color: var(--bad); }
.print-chip { width: 100%; font-size: .85rem; border-radius: 12px; padding: 10px 14px; }
.print-chip.ok { background: var(--ok-bg); color: var(--ok); }
.print-chip.bad { background: var(--bad-bg); color: var(--bad); }
.recent { width: 100%; }
.recent h4 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recent .strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.recent button { flex: none; width: 56px; height: 56px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.recent button:hover { border-color: var(--brand); }
.recent img { width: 100%; height: 100%; object-fit: contain; }

/* mockups */
.mock { --mc: #1d1d1f; width: 100%; display: grid; place-items: center; }
.mock img { display: block; }
.m-card { width: min(100%, 340px); aspect-ratio: 1.75; border-radius: 12px; background: #fff; border: 1px solid #ddd; box-shadow: 0 14px 30px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: space-between; padding: 6% 7%; color: #222; }
.m-card .who b { display: block; font-size: 1.1rem; color: var(--mc); }
.m-card .who span { display: block; font-size: .72rem; color: #666; margin-top: 3px; }
.m-card img { width: 38%; }
.m-flyer { width: min(100%, 250px); aspect-ratio: .72; border-radius: 10px; background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.2); display: flex; flex-direction: column; overflow: hidden; color: #222; text-align: center; }
.m-flyer .hd { background: var(--mc); color: #fff; padding: 18px 12px; font-weight: 800; font-size: 1.25rem; line-height: 1.1; }
.m-flyer p { margin: 12px 14px 4px; font-size: .75rem; color: #555; }
.m-flyer img { width: 62%; margin: auto auto 16px; }
.m-tent { width: min(100%, 230px); aspect-ratio: .78; background: #fff; border-radius: 6px 6px 14px 14px; box-shadow: 0 18px 28px rgba(0,0,0,.22), inset 0 -10px 0 var(--mc); display: flex; flex-direction: column; align-items: center; padding: 14px 12px 22px; color: #222; text-align: center; }
.m-tent b { font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mc); }
.m-tent span { font-size: .7rem; color: #666; margin: 2px 0 8px; }
.m-tent img { width: 78%; margin-top: auto; }
.m-sticker { width: min(100%, 240px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.22), 0 0 0 7px var(--mc); display: grid; place-items: center; }
.m-sticker img { width: 66%; }
.m-phone { width: min(100%, 190px); aspect-ratio: .5; border-radius: 28px; background: #111; padding: 10px; box-shadow: 0 16px 32px rgba(0,0,0,.3); }
.m-phone .scr { height: 100%; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 20%, #fff), #fff); display: grid; place-items: center; align-content: center; gap: 14px; position: relative; }
.m-phone .scr::before { content: ""; position: absolute; top: 8px; width: 40%; height: 8px; border-radius: 6px; background: #111; }
.m-phone img { width: 70%; }
.m-phone small { color: #444; font-size: .7rem; font-weight: 600; }

/* ---------- sections ---------- */
.band { margin: 56px 0; padding: 64px 32px 72px; border-radius: 28px; background: linear-gradient(160deg, #8a7df0 0%, #c15fd8 55%, #ef5bc0 100%); }
.band h2 { color: #fff; text-align: center; font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; margin: 0 0 28px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.step-card { background: #fff; color: #1d1d1f; border-radius: 16px; padding: 22px; display: flex; gap: 14px; align-items: flex-start; box-shadow: 0 8px 24px rgba(40, 10, 80, .14); transition: transform .2s; }
.step-card:hover { transform: translateY(-3px); }
.step-card img { width: 44px; height: 44px; flex: none; }
.step-card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.step-card p { margin: 0; color: #55555c; font-size: .95rem; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 64px 0; }
.feature-row.flip .ftext { order: 2; }
.feature-row img { width: 100%; height: auto; border-radius: 28px; box-shadow: var(--shadow); }
.feature-row h2, .block h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; margin: 0 0 14px; }
.feature-row p { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; } .feature-row.flip .ftext { order: 0; } }
.block { padding: 64px 0; }
.block > h2 { text-align: center; margin-bottom: 28px; }
.fcard { padding: 26px; }
.fcard h3 { margin: 0 0 8px; font-size: 1.15rem; }
.fcard p { margin: 0; color: var(--muted); }
.usecases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.usecases a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; font-weight: 600; transition: border-color .15s, transform .15s; }
.usecases a:hover { border-color: var(--brand); transform: translateY(-2px); }
.usecases a small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.faq { max-width: 780px; margin: 0 auto; }
.faq details { margin: 0 0 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.faq p { color: var(--muted); margin: 10px 0 0; }
.cta { text-align: center; background: var(--soft); border-radius: 28px; padding: 64px 24px; margin: 24px 0 72px; }
.cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; }
.cta p { color: var(--muted); margin: 0 0 20px; }
.cta .btn { background: var(--ink); color: var(--on-ink); }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

footer.site { background: var(--soft); padding: 48px 0 28px; }
.fcols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 700px) { .fcols { grid-template-columns: 1fr 1fr; } }
.fcols h4 { margin: 0 0 10px; }
.fcols a { display: block; text-decoration: none; color: var(--muted); padding: 3px 0; }
.fcols a:hover { color: var(--text); text-decoration: underline; }
.fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- dialog & toast ---------- */
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(10, 10, 20, .55); }
dialog h3 { margin: 0 0 4px; font-size: 1.3rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- simple notice pages (redirect errors, password) ---------- */
body.plain { display: grid; place-items: center; min-height: 100vh; background: var(--soft); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.notice h1 { margin: 0 0 8px; font-size: 1.5rem; }
.notice p { color: var(--muted); }

/* ---------- long-form pages (docs / legal) ---------- */
.prose { max-width: 780px; margin: 0 auto; padding: 48px 0 72px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; }
.prose h2 { margin: 36px 0 10px; font-size: 1.5rem; }
.prose p, .prose li { color: var(--muted); }
.prose code { background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.prose pre { background: #14151c; color: #e8e9f0; padding: 16px 18px; border-radius: 14px; overflow-x: auto; font-size: .85rem; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); }

/* ---------- dashboard ---------- */
.dash { padding-top: 32px; padding-bottom: 72px; }
.dash h1 { font-size: 2rem; margin: 0 0 4px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.auth-card { max-width: 440px; margin: 48px auto; }
.dtabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.dtabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.dtabs button.active { background: var(--ink); color: var(--on-ink); }
table.links { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.links th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.links td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.links tr.row-link { cursor: pointer; }
table.links tr.row-link:hover td { background: var(--soft-2); }
.table-wrap { overflow-x: auto; }
.pill-s { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill-s.ok { background: var(--ok-bg); color: var(--ok); }
.pill-s.off { background: var(--soft); color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { background: var(--soft-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tile b { display: block; font-size: 1.7rem; letter-spacing: -.02em; }
.tile span { color: var(--muted); font-size: .8rem; }
.chart { width: 100%; height: 160px; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: .85rem; }
.bar .t { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar .t i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .cols2 { grid-template-columns: 1fr; } }
.cols2 h4 { margin: 0 0 10px; font-size: .9rem; }
.empty { text-align: center; padding: 40px 12px; color: var(--muted); }
.link-rows { display: grid; gap: 8px; margin-top: 8px; }
.link-rows .row { grid-template-columns: 1fr 2fr auto; align-items: center; }
@media (max-width: 600px) { .link-rows .row { grid-template-columns: 1fr; } }

/* ---------- small-screen fixes ---------- */
.prose table { display: block; overflow-x: auto; }
.prose :not(pre) > code { overflow-wrap: anywhere; }
.kit { flex-wrap: wrap; }
.kit b { min-width: 80px; }

/* ---------- sign-in form & account security ---------- */
.auth-title { font-size: 1.6rem; margin: 0 0 4px; }
.auth-switch { text-align: center; margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand); font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.pw-toggle:hover { background: var(--brand-soft); }
.meter { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .2s, background .2s; }
.meter[data-level="1"] i { width: 33%; background: var(--bad); }
.meter[data-level="2"] i { width: 66%; background: #d98e04; }
.meter[data-level="3"] i { width: 100%; background: var(--ok); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.code-input { font-size: 1.5rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge.on { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: var(--bad-bg); color: var(--bad); }
.sec-stack { display: grid; gap: 20px; max-width: 680px; }
.sec-stack h3 { margin: 0 0 4px; }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.setup-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin: 14px 0; }
@media (max-width: 560px) { .setup-grid { grid-template-columns: 1fr; justify-items: center; } }
.qr-box { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; padding: 14px; border-radius: 12px; background: var(--soft-2); border: 1px dashed var(--line-strong); }
.recovery code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; letter-spacing: .05em; }
.events { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.events li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.events li:last-child { border-bottom: 0; }
.events .when { color: var(--muted); white-space: nowrap; font-size: .8rem; }
.events .bad { color: var(--bad); }
.nudge { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--line); }

.guide .prose { padding: 8px 0 24px; }
.guide .prose ol { padding-left: 1.2em; }
