/* ==========================================================================
   CalcHub stylesheet
   Design: precision-instrument. Cool neutrals, one confident blue for brand
   and actions, jade green reserved for the result readout (the "answer").
   System fonts for speed; tabular monospace for numbers.
   ========================================================================== */

:root {
  --bg: #fbfcfd;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --border: #e6eaef;
  --border-strong: #d4dae2;
  --text: #0f1729;
  --muted: #5b6472;
  --primary: #2b59ff;
  --primary-dark: #1f44d6;
  --primary-tint: #eef2ff;
  --accent: #00a86b;
  --accent-tint: #e6f7f0;
  --danger: #d6453d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15,23,41,.04), 0 4px 16px rgba(15,23,41,.05);
  --shadow-lg: 0 8px 30px rgba(15,23,41,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary);
  color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,252,253,.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--primary); color: #fff; border-radius: 8px;
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem;
}
.brand-name { font-size: 1.12rem; }

.site-nav { display: none; gap: 4px; }
.site-nav a {
  color: var(--muted); font-weight: 600; font-size: .94rem;
  padding: 7px 11px; border-radius: 8px;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; }
}
/* mobile open state */
.site-nav.open {
  display: flex; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 18px 14px;
  box-shadow: var(--shadow);
}
.site-nav.open a { padding: 11px 8px; border-bottom: 1px solid var(--border); }

/* ---------- Ads ---------- */
.ad-wrap { margin: 14px auto; }
.ad-slot { text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.calc-sidebar .ad-slot { margin-bottom: 18px; }

main { display: block; padding: 24px 0 40px; }

/* ---------- Hero + search ---------- */
.hero { text-align: center; padding: 30px 0 22px; }
.hero p.lede { color: var(--muted); font-size: 1.12rem; max-width: 620px; margin: 0 auto 22px; }
.search-box { position: relative; max-width: 540px; margin: 0 auto; }
.search-box input {
  width: 100%; font-size: 1.05rem; padding: 15px 18px 15px 46px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.search-box svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.no-results { text-align: center; color: var(--muted); padding: 30px; display: none; }

/* ---------- Category sections + cards ---------- */
.cat-section { margin-top: 38px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.cat-head h2 { margin: 0; }
.cat-head a { font-weight: 600; font-size: .9rem; white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.calc-card {
  display: flex; align-items: center; gap: 13px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.calc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); text-decoration: none; }
.calc-card .ico {
  flex: 0 0 44px; height: 44px; display: grid; place-items: center;
  font-size: 1.35rem; background: var(--primary-tint); border-radius: 10px;
}
.calc-card .ico.txt { font-family: var(--mono); font-weight: 700; color: var(--primary); }
.calc-card .meta strong { display: block; color: var(--text); font-size: 1rem; }
.calc-card .meta span { color: var(--muted); font-size: .85rem; }

/* ---------- Calculator page layout ---------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); margin: 4px 0 16px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }

.calc-layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 1000px) { .calc-layout { grid-template-columns: minmax(0,1fr) 300px; align-items: start; } }
.calc-sidebar { display: none; }
@media (min-width: 1000px) { .calc-sidebar { display: block; position: sticky; top: 78px; } }

.calc-intro { color: var(--muted); max-width: 70ch; }

/* The interactive tool */
.calc-tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 18px 0;
}
.field-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .field-grid.two { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--text); }
.field .hint { font-size: .78rem; color: var(--muted); font-weight: 400; }
.field input, .field select {
  font-size: 1rem; padding: 11px 13px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-family: var(--font); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }

.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-prefix input { padding-left: 28px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 7px 15px; border-radius: 999px;
  font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1rem; font-weight: 700; padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Result readout: the signature element */
.readout {
  margin-top: 18px; background: var(--accent-tint); border: 1px solid #bfe9d6;
  border-top: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 18px 20px;
}
.readout .r-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #0a7c50; font-weight: 700; }
.readout .r-value {
  font-family: var(--mono); font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px;
}
.readout .r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 14px; }
.readout .r-grid div { font-size: .9rem; color: var(--muted); }
.readout .r-grid b { display: block; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.15rem; color: var(--text); font-weight: 700; }
.readout.updated { animation: pop .25s ease; }
@keyframes pop { 0% { transform: scale(.99); } 60% { transform: scale(1.004); } 100% { transform: scale(1); } }

/* Content sections */
.content-block { margin: 30px 0; max-width: 72ch; }
.content-block h2 { margin-top: 0; }
.content-block ul { padding-left: 20px; }
.content-block li { margin-bottom: 6px; }

/* FAQ */
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 10px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 18px 16px; color: var(--muted); }

/* Related */
.related-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 38px 18px 22px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-about p { color: var(--muted); font-size: .92rem; margin-top: 12px; max-width: 32ch; }
.footer-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text); font-size: .92rem; }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 18px; }
.footer-bottom p { color: var(--muted); font-size: .82rem; margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 60px 0; }
.notfound .code { font-family: var(--mono); font-size: 4rem; font-weight: 700; color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   On-screen calculator widget (Standard + Scientific)
   ========================================================================== */
.calc-screen {
  max-width: 480px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.calc-screen.wide { max-width: 520px; }
.cs-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cs-top .seg button { font-size: .82rem; padding: 6px 12px; }

.cs-display {
  background: #0f1729; border-radius: var(--radius-sm); padding: 16px 18px;
  text-align: right; margin-bottom: 14px; overflow: hidden;
}
.cs-expr {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 6vw, 2.3rem); color: #fff; line-height: 1.2;
  white-space: nowrap; overflow: hidden; min-height: 1.2em; font-weight: 600;
}
.cs-prev {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 1rem; color: #34d399; min-height: 1.2em; margin-top: 4px; white-space: nowrap; overflow: hidden;
}

.cs-sci, .cs-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cs-sci { margin-bottom: 8px; }

.cs-btn {
  -webkit-appearance: none; appearance: none; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 1.2rem; font-weight: 600; min-height: 50px;
  display: grid; place-items: center; cursor: pointer; user-select: none;
  transition: background .12s, transform .04s, border-color .12s;
}
.cs-btn:hover { background: var(--surface-2); }
.cs-btn:active { transform: translateY(1px); }
.cs-btn.op { background: var(--primary-tint); color: var(--primary); font-weight: 700; border-color: #d7e0ff; }
.cs-btn.op:hover { background: #e2e9ff; }
.cs-btn.eq { background: var(--primary); color: #fff; border-color: var(--primary); }
.cs-btn.eq:hover { background: var(--primary-dark); }
.cs-btn.act { background: var(--surface-2); color: var(--muted); font-size: 1.05rem; }
.cs-btn.act:hover { background: #e9edf3; }
.cs-btn.fn { background: #f0f3f8; color: var(--text); font-size: .98rem; }
.cs-btn.fn:hover { background: #e6ebf2; }

@media (max-width: 420px) {
  .cs-sci, .cs-pad { gap: 6px; }
  .cs-btn { min-height: 46px; font-size: 1.1rem; }
}

/* Homepage calculator block */
.hp-calc-wrap { margin: 8px 0 26px; }
.hp-calc-wrap .hp-calc-head { text-align: center; margin-bottom: 14px; }
.hp-calc-wrap .hp-calc-head h2 { margin: 0 0 4px; }
.hp-calc-wrap .hp-calc-head p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ==========================================================================
   HOMEPAGE v2 (hero, explore, trust), DARK MODE, FAVORITES
   ========================================================================== */

/* ---- Header actions (theme toggle + favorites) ---- */
.header-inner { justify-content: flex-start; }
.site-nav { margin: 0 auto 0 14px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text); padding: 0; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .sun { display: block; }
[data-theme="dark"] .icon-btn .moon { display: none; }
.fav-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; background: var(--primary); color: #fff; border: 0; border-radius: 10px; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.fav-btn:hover { background: var(--primary-dark); text-decoration: none; }
.fav-btn.on { background: var(--accent); }
@media (max-width: 600px) { .fav-btn .lbl { display: none; } .fav-btn { padding: 9px 11px; } }

/* ---- Hero panel ---- */
.hero-wrap { background: linear-gradient(135deg, #eaf1ff 0%, #f6f9ff 60%, #eef4ff 100%); border: 1px solid var(--border); border-radius: 20px; padding: 26px; margin: 14px 0 8px; position: relative; overflow: hidden; }
.hero2 { display: grid; gap: 26px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 940px) { .hero2 { grid-template-columns: minmax(0, 430px) 1fr; gap: 42px; } }
.hero2-content { position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; color: var(--primary); background: rgba(43,89,255,.1); padding: 6px 13px; border-radius: 999px; margin-bottom: 16px; }
.hero-title { font-size: clamp(2.1rem, 5.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 800; }
.hero-title .accent { color: var(--primary); display: block; }
.hero-sub { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.16rem); max-width: 48ch; margin: 0 0 20px; }
.hero2 .search-box { max-width: none; margin: 0 0 18px; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.popular .plabel { font-weight: 700; font-size: .86rem; color: var(--text); margin-right: 2px; }
.tag { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.tag:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
.stile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); }
.stile .ic { width: 38px; height: 38px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-tint); color: var(--primary); }
.stile .big { font-size: 1.2rem; font-weight: 800; font-family: var(--mono); line-height: 1.1; }
.stile .lab { font-size: .74rem; color: var(--muted); font-weight: 600; margin-top: 2px; }

.hero-illu { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); width: 240px; opacity: .92; pointer-events: none; z-index: 0; display: none; }
@media (min-width: 1180px) { .hero-illu { display: block; } }

/* ---- Section + Explore ---- */
.section { padding: 32px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 22px; }
.section-head h2 { margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; }
.explore-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .explore-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .explore-cards { grid-template-columns: repeat(4, 1fr); } }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cat-card .ic { flex: 0 0 48px; height: 48px; display: grid; place-items: center; font-size: 1.45rem; border-radius: 12px; }
.cat-card .nm strong { display: block; color: var(--text); font-size: 1.02rem; }
.cat-card .nm span { color: var(--muted); font-size: .84rem; }
.browse-all { text-align: center; margin-top: 22px; }

/* ---- Trust bar ---- */
.trust { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr; gap: 20px; padding: 24px; }
@media (min-width: 560px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; gap: 13px; align-items: flex-start; }
.trust-item .ic { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-tint); color: var(--accent); }
.trust-item h3 { margin: 0 0 3px; font-size: .98rem; }
.trust-item p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---- Favorites stars on cards ---- */
.calc-card { position: relative; }
.fav-star { position: absolute; top: 9px; right: 9px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: #c4ccda; cursor: pointer; font-size: 1rem; line-height: 1; z-index: 2; user-select: none; }
.fav-star:hover { color: #f5b301; background: var(--surface-2); }
.fav-star.on { color: #f5b301; }
.fav-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px; }

/* ---- Dark theme ---- */
[data-theme="dark"] {
  --bg: #0e1626; --surface: #16203a; --surface-2: #1e2a44; --border: #28344e; --border-strong: #3a4a6e;
  --text: #e7edf7; --muted: #9aa7c0; --primary: #6088ff; --primary-dark: #4a73ff; --primary-tint: rgba(96,136,255,.16);
  --accent: #1fcf8a; --accent-tint: rgba(31,207,138,.15);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.35); --shadow-lg: 0 10px 34px rgba(0,0,0,.5);
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .site-header { background: rgba(14,22,38,.85); }
[data-theme="dark"] .hero-wrap { background: linear-gradient(135deg, #14223f 0%, #0f1830 70%); }
[data-theme="dark"] .hero-badge { background: rgba(96,136,255,.16); }
[data-theme="dark"] .tag { background: var(--surface-2); }
[data-theme="dark"] .cs-display { background: #0a1020; border: 1px solid var(--border); }
[data-theme="dark"] .cs-btn.fn { background: #1e2a44; }
[data-theme="dark"] .cs-btn.act { background: #1e2a44; }
[data-theme="dark"] .readout { border-color: rgba(31,207,138,.32); }
[data-theme="dark"] .readout .r-label { color: #34d399; }
[data-theme="dark"] .readout .r-grid b, [data-theme="dark"] .readout .r-value { color: var(--text); }
[data-theme="dark"] .search-box input,
[data-theme="dark"] .field input, [data-theme="dark"] .field select,
[data-theme="dark"] .seg, [data-theme="dark"] textarea,
[data-theme="dark"] input[type=text], [data-theme="dark"] input[type=date], [data-theme="dark"] input[type=time], [data-theme="dark"] input[type=range] { background: #0f1830; color: var(--text); }
[data-theme="dark"] .seg button.active { background: #28344e; }
[data-theme="dark"] .faq summary::after { color: var(--primary); }
