/* ==========================================================================
   Vortelio — unified stylesheet (shell + theme)
   The per-tool component styles from the merged legacy sites are appended
   after this header by the build script.
   ========================================================================== */

/* ------------------------------------------------------------------ theme */
:root {
  /* cream caramel theme (overrides legacy site accents) */
  --c-bg: var(--bg-page);
  --c-surface: var(--bg-surface);
  --c-ink: var(--text-primary);
  --c-ink-soft: var(--text-secondary);
  --c-muted: var(--text-secondary);
  --c-brand: var(--cocoa-900);
  --c-brand-dark: var(--cocoa-950);
  --c-brand-mid: var(--toffee-700);
  --c-brand-soft: var(--cream-200);
  --c-accent: var(--cocoa-850);
  --c-accent-dark: var(--cocoa-900);
  --c-accent-soft: var(--cream-200);
  --c-warn: var(--warning-text);
  --c-warn-soft: var(--warning-bg);
  --c-danger: var(--error-text);
  --c-danger-soft: var(--error-bg);
  --c-ok: var(--success-text);
  --c-ok-soft: var(--success-bg);
  --c-border: var(--border);
  --c-shadow: var(--shadow-sm);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --font: var(--font-sans);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* legacy non-prefixed template variables (cream caramel) */
  --brand: var(--cocoa-900);
  --brand-soft: var(--cream-200);
  --brand-strong: var(--cocoa-950);
  --primary: var(--cocoa-900);
  --primary-soft: var(--cream-200);
  --primary-strong: var(--cocoa-950);
  --primary-dark: var(--cocoa-950);
  --primary-deep: var(--cocoa-950);
  --primary-light: var(--cream-300);
  --accent-soft: var(--cream-200);
  --accent-strong: var(--cocoa-900);
  --accent-2: var(--toffee-700);
  --bg: var(--bg-page);
  --surface: var(--bg-surface);
  --surface-2: var(--bg-subtle);
  --card: var(--bg-surface);
  --text: var(--text-primary);
  --text-soft: var(--text-secondary);
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --ink-soft: var(--text-secondary);
  --muted: var(--text-secondary);
  --border: var(--border);
  --border-strong: var(--border-strong);
  --line: var(--border);
  --shadow: var(--shadow-sm);
  --shadow-lg: var(--shadow-lg);
  --danger: var(--error-text);
  --danger-soft: var(--error-bg);
  --ok: var(--success-text);
  --ok-soft: var(--success-bg);
  --good: var(--success-text);
  --green: var(--success-text);
  --green-soft: var(--success-bg);
  --warn: var(--warning-text);
  --rose: var(--error-text);
  --rose-soft: var(--error-bg);
  --red: var(--error-text);
  --red-soft: var(--error-bg);
  --teal: var(--cocoa-900);
  --teal-soft: var(--cream-200);
  --blue: var(--blue-solid);
  --blue-soft: var(--blue-bg);
  --code-bg: #2A2016;
  --code-ink: #F7E9D4;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 兼容：legacy 样式表沿用旧语义名，此处映射到奶油焦糖等价令牌 */
  --bg-canvas: var(--bg-page);
  --text-tertiary: var(--text-secondary);
  --accent-text: var(--link);
  --accent-active: var(--cocoa-900);
  --accent-quiet: var(--cream-300);
  --accent-quiet-hover: var(--cream-200);
  --border-subtle: var(--border);
  --danger-solid: var(--error-solid);
  --danger-text: var(--error-text);
  --bg-inverse: var(--cocoa-900);
  --text-on-inverse: var(--text-on-cta);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--c-ink); }

/* ==========================================================================
   Shell — topbar
   ========================================================================== */
.od-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.od-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.od-hamburger {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  color: var(--c-ink);
  border-radius: 8px;
}
.od-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--c-ink);
  white-space: nowrap;
}
.od-brand:hover { text-decoration: none; }
.od-brand svg { display: block; }
.od-brand .od-brand-name { color: var(--c-ink); }
.od-brand .od-brand-name b { color: var(--c-brand); }
.od-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.od-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--c-ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.od-nav a:hover { background: var(--c-brand-soft); text-decoration: none; color: var(--c-brand); }
.od-nav a.od-active { background: var(--c-brand); color: #fff; }
.od-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.od-search {
  position: relative;
}
.od-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  pointer-events: none;
}
div.od-search > input {
  width: 220px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--c-surface);
  color: var(--c-ink);
  outline: none;
}
.od-search > input:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.od-lang {
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
}
.od-lang a {
  padding: 7px 11px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: var(--c-surface);
}
.od-lang a:hover { text-decoration: none; }
.od-lang a.od-active { background: var(--c-brand); color: #fff; }
.od-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface);
  color: var(--c-ink-soft);
  cursor: pointer;
}
.od-theme-toggle:hover { color: var(--c-brand); border-color: var(--c-brand-mid); }
.od-theme-toggle svg { display: block; }
.od-theme-toggle .od-ico-sun { display: none; }
[data-theme="dark"] .od-theme-toggle .od-ico-sun { display: block; }
[data-theme="dark"] .od-theme-toggle .od-ico-moon { display: none; }

/* ==========================================================================
   Shell — layout + sidebar
   ========================================================================== */
.od-layout {
  display: flex;
  min-height: calc(100vh - 60px);
  max-width: 1280px;
  margin: 0 auto;
  align-items: flex-start;
}
.od-sidebar {
  position: sticky;
  top: 60px;
  width: 230px;
  flex: 0 0 230px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 18px 12px 40px;
  border-right: 1px solid var(--c-border);
  background: transparent;
}
.od-side-group { margin-bottom: 18px; }
.od-side-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 0 10px 6px;
}
.od-side-group a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.od-side-group a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.od-side-group a.od-active { background: var(--c-brand-soft); color: var(--c-brand); font-weight: 600; }
.od-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 28px 48px;
}
.od-content .container { max-width: var(--maxw); margin: 0 auto; }

/* ------------------------------------------------------------------ footer */
.od-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: 0.86rem;
}
.od-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: space-between;
}
.od-footer a { color: var(--c-ink-soft); }
.od-footer a:hover { color: var(--c-brand); }

/* ==========================================================================
   Home page
   ========================================================================== */
.od-home-hero {
  padding: 44px 20px 30px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -100px, var(--c-brand-soft), transparent);
}
.od-home-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.od-home-hero h1 b { color: var(--c-brand); }
.od-home-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--c-ink-soft);
  font-size: 1.05rem;
}
.od-home-search {
  max-width: 560px;
  margin: 22px auto 0;
  position: relative;
}
.od-home-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
}
.od-home-search > input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font-size: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  box-shadow: var(--c-shadow);
  outline: none;
}
.od-home-search > input:focus { border-color: var(--c-brand); box-shadow: 0 0 0 4px var(--c-brand-soft); }

.od-home {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px 60px;
}
.od-cat {
  margin: 28px 0 8px;
  scroll-margin-top: 70px;
}
.od-cat-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.od-cat-head h2 { margin: 0; font-size: 1.25rem; }
.od-cat-head span { color: var(--c-muted); font-size: 0.9rem; }
.od-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.tool-card {
  display: block;
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  color: var(--c-ink);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--c-brand-mid);
  box-shadow: var(--shadow-lg);
}
.tool-card .tool-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.tool-card h3 { margin: 0 0 4px; font-size: 1rem; }
.tool-card p { margin: 0; color: var(--c-muted); font-size: 0.85rem; }
.od-empty {
  display: none;
  text-align: center;
  padding: 40px;
  color: var(--c-muted);
}

/* ------------------------------------------------------------------ news */
.od-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
.od-sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .od-hamburger { display: block; }
  .od-nav { display: none; }
  .od-search input { width: 150px; }
  .od-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 90;
    background: var(--c-surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    padding-top: 60px;
    max-height: none;
  }
  .od-sidebar.od-open { transform: translateX(0); }
  .od-sidebar-backdrop.od-show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 33, 31, 0.4);
    z-index: 80;
  }
  .od-layout { display: block; }
  .od-content { padding: 20px 16px 40px; }
  .od-topbar .od-nav {
    display: flex;
    position: fixed;
    top: 58px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 95;
  }
  .od-topbar .od-nav.od-open { display: flex; }
}
@media (max-width: 560px) {
  .od-search input { width: 110px; }
  .od-topbar .od-brand-name { display: none; }
  .od-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}




/* ===== loan ===== */
/* ==========================================================================
   LoanCompare Lab — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group {
  display: flex;
  gap: 8px;
}
.input-group input {
  flex: 1;
  min-width: 0;
}
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.input-group select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value {
  color: var(--c-accent);
}
.result-stat.warn .value {
  color: var(--c-warn);
}

/* ---------- Charts ---------- */
.chart-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}

/* ---------- Table (amortization) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
table.schedule th,
table.schedule td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.schedule th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
}
table.schedule th:first-child,
table.schedule td:first-child {
  text-align: left;
}
table.schedule tr:last-child td {
  border-bottom: 0;
}
table.schedule tbody tr:hover {
  background: #fafbff;
}

.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.pagination .page-info {
  color: var(--c-muted);
  font-size: 0.88rem;
}
.pagination .btn {
  padding: 8px 14px;
  font-size: 0.9rem;
}
.pagination .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== tax ===== */
/* ==========================================================================
   TaxWatch — shared stylesheet
   Mobile-first, clean & modern. No frameworks. Tax/dollar theme.
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.site-nav a.active { background: var(--c-brand); color: #fff; }
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible { display: block; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input { accent-color: var(--c-brand); }
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover { background: var(--c-bg); }

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value { color: var(--c-accent); }
.result-stat.warn .value { color: var(--c-warn); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
table.schedule th,
table.schedule td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
}
table.schedule th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
table.schedule th:first-child,
table.schedule td:first-child { text-align: left; }
table.schedule tr:last-child td { border-bottom: 0; }
table.schedule tbody tr:hover { background: #f4faf7; }
table.schedule td.empty { text-align: center; color: var(--c-muted); }

/* State table specific */
.state-name { white-space: nowrap; }
.state-code {
  font-size: 0.78rem;
  color: var(--c-muted);
  font-family: var(--mono);
  margin-left: 4px;
}
.state-range { font-weight: 700; color: var(--c-brand); white-space: nowrap; }
.state-note { color: var(--c-ink-soft); text-align: left; min-width: 240px; }

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--none { background: var(--c-brand-soft); color: var(--c-brand); }
.badge--flat { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--progressive { background: #f7e7cf; color: #7c4a2d; }

/* ---------- Filter bar (state page) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pill {
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.filter-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.search-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
}
.search-input:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}

/* ---------- News cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 8px 0 28px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 20px;
}
.news-card .news-date {
  font-size: 0.8rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.news-card h3 a { color: var(--c-ink); }
.news-card h3 a:hover { color: var(--c-brand); text-decoration: none; }
.news-card p { margin: 0; color: var(--c-muted); font-size: 0.92rem; }
.news-card .news-more { font-weight: 700; font-size: 0.88rem; }

/* ---------- Article ---------- */
.article {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.article-meta {
  color: var(--c-muted);
  font-size: 0.88rem;
  margin: 0 0 20px;
}
.article h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 30px 0 10px;
}
.article h3 {
  color: var(--c-ink);
  font-size: 1.12rem;
  margin: 22px 0 8px;
}
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article .callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.article .callout.warn {
  background: var(--c-accent-soft);
  border-left-color: var(--c-accent);
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }

/* ---------- Section title ---------- */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
}
.section-desc {
  text-align: center;
  color: var(--c-muted);
  max-width: 640px;
  margin: 0 auto 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .result-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ===== rate ===== */
/* ==========================================================================
   RateDesk — shared stylesheet
   Mobile-first, clean & modern. No frameworks. Interest-rate / finance theme.
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.site-nav a.active { background: var(--c-brand); color: #fff; }
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible { display: block; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input { accent-color: var(--c-brand); }
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover { background: var(--c-bg); }

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value { color: var(--c-accent); }
.result-stat.warn .value { color: var(--c-warn); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
table.schedule th,
table.schedule td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
}
table.schedule th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
table.schedule th:first-child,
table.schedule td:first-child { text-align: left; }
table.schedule tr:last-child td { border-bottom: 0; }
table.schedule tbody tr:hover { background: #f4f8ff; }
table.schedule td.empty { text-align: center; color: var(--c-muted); }

/* Rate-table specific */
.rate-name { white-space: nowrap; }
.rate-code {
  font-size: 0.78rem;
  color: var(--c-muted);
  font-family: var(--mono);
  margin-left: 4px;
}
.rate-value { font-weight: 700; color: var(--c-brand); white-space: nowrap; }
.rate-cat { color: var(--c-ink-soft); text-align: left; min-width: 160px; }

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--us-mortgage { background: var(--c-brand-soft); color: var(--c-brand); }
.badge--uk-mortgage { background: #f7e7cf; color: #7c4a2d; }
.badge--ca-mortgage { background: #fef3c7; color: #b45309; }
.badge--au-mortgage { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--personal { background: #f7e7cf; color: #7c4a2d; }
.badge--auto { background: #fef2f2; color: #b91c1c; }
.badge--deposit { background: #f7e7cf; color: #b97c56; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pill {
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.filter-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.search-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
}
.search-input:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}

/* ---------- Data note ---------- */
.data-note {
  font-size: 0.84rem;
  color: var(--c-muted);
  background: var(--c-brand-soft);
  border: 1px solid #d6e2fb;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 12px 0;
}

/* ---------- News cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 8px 0 28px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 20px;
}
.news-card .news-date {
  font-size: 0.8rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.news-card h3 a { color: var(--c-ink); }
.news-card h3 a:hover { color: var(--c-brand); text-decoration: none; }
.news-card p { margin: 0; color: var(--c-muted); font-size: 0.92rem; }
.news-card .news-more { font-weight: 700; font-size: 0.88rem; }

/* ---------- Article ---------- */
.article {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.article-meta {
  color: var(--c-muted);
  font-size: 0.88rem;
  margin: 0 0 20px;
}
.article h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 30px 0 10px;
}
.article h3 {
  color: var(--c-ink);
  font-size: 1.12rem;
  margin: 22px 0 8px;
}
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article .callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.article .callout.warn {
  background: #fef3c7;
  border-left-color: var(--c-warn);
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }

/* ---------- Section title ---------- */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
}
.section-desc {
  text-align: center;
  color: var(--c-muted);
  max-width: 640px;
  margin: 0 auto 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .result-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ===== compound ===== */
/* ==========================================================================
   CompoundLab — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   Theme: growth green + coin gold.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value {
  color: var(--c-brand);
}
.result-stat.warn .value {
  color: var(--c-accent);
}

/* ---------- Charts (SVG) ---------- */
.chart-box {
  margin-top: 18px;
}
.chart-box .compound-chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.88rem;
}
.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-legend .swatch {
  width: 16px;
  height: 4px;
  border-radius: 2px;
  flex: 0 0 auto;
}

/* ---------- Table (frequency comparison) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}
table.compare th,
table.compare td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.compare th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
}
table.compare th:first-child,
table.compare td:first-child {
  text-align: left;
}
table.compare tr:last-child td {
  border-bottom: 0;
}
table.compare tbody tr:hover {
  background: #fafdfb;
}
table.compare .best td {
  background: var(--c-brand-soft);
  font-weight: 700;
}
table.compare .delta {
  color: var(--c-muted);
  font-weight: 400;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose p {
  margin: 10px 0;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}
.prose .formula {
  font-family: var(--mono);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 14px 0;
  overflow-x: auto;
  font-size: 0.95rem;
}
.prose a { color: var(--c-brand); }
.legal-meta {
  color: var(--c-muted);
  font-size: 0.9rem;
  margin: 4px 0 18px;
}
.callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== salary ===== */
/* ==========================================================================
   SalaryAfterTax — shared stylesheet
   Mobile-first, clean & modern. No frameworks. Take-home-pay / paycheck theme
   (teal + gold).
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.site-nav a.active { background: var(--c-brand); color: #fff; }
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible { display: block; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input { accent-color: var(--c-brand); }
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover { background: var(--c-bg); }

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value { color: var(--c-accent); }
.result-stat.warn .value { color: var(--c-warn); }
.result-stat.detail .value { font-size: 1.05rem; font-weight: 700; }

.result-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 14px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  margin-top: 14px;
}
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
table.schedule th,
table.schedule td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
}
table.schedule th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
table.schedule th:first-child,
table.schedule td:first-child { text-align: left; }
table.schedule tr:last-child td { border-bottom: 0; }
table.schedule tbody tr:hover { background: #f1f9fb; }
table.schedule td.empty { text-align: center; color: var(--c-muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--none { background: var(--c-brand-soft); color: var(--c-brand); }
.badge--flat { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--progressive { background: #f7e7cf; color: #7c4a2d; }

/* ---------- State matrix grid ---------- */
.state-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 8px 0 28px;
}
.state-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.state-card:hover {
  border-color: var(--c-brand);
  box-shadow: var(--c-shadow);
  text-decoration: none;
}
.state-card .state-card-name {
  font-weight: 700;
  color: var(--c-ink);
  font-size: 1rem;
}
.state-card .state-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.state-card .state-card-range {
  font-weight: 700;
  color: var(--c-brand);
}

/* ---------- Rules summary card (state landing pages) ---------- */
.rules-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 20px;
}
.rules-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}
.rules-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rules-list li {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}
.rules-list li:last-child { border-bottom: 0; }
.rules-list .rules-key {
  font-weight: 700;
  color: var(--c-ink-soft);
  min-width: 130px;
}
.rules-list .rules-val { color: var(--c-ink); }

/* ---------- Adjacent state nav ---------- */
.adjacent {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.adjacent a {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.adjacent a:hover { border-color: var(--c-brand); text-decoration: none; }
.adjacent .adj-label {
  font-size: 0.78rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.adjacent .adj-name { font-weight: 700; color: var(--c-ink); }

/* ---------- Prose / info content ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.prose .callout.warn {
  background: var(--c-accent-soft);
  border-left-color: var(--c-accent);
}

/* ---------- Section title ---------- */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
}
.section-desc {
  text-align: center;
  color: var(--c-muted);
  max-width: 640px;
  margin: 0 auto 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
  .state-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .state-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ===== inflation ===== */
/* InflationLab — site stylesheet
 * Custom inflation-themed design (warm light background, coral red primary).
 * No external frameworks. System font stack only.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: #a06a12;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.hero h1 .accent { color: var(--primary); }
.hero .lede {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0 40px;
}
@media (min-width: 820px) {
  .tool-grid.two { grid-template-columns: 1.2fr 0.8fr; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
input[type="number"] { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); box-shadow: 0 6px 18px rgba(210, 74, 55, 0.3); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.swap-row { display: flex; justify-content: center; margin: 4px 0 6px; }
.swap-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink-soft);
  transition: transform 0.2s ease, background 0.15s ease;
}
.swap-btn:hover { background: var(--surface-2); transform: rotate(180deg); }

/* ---------- Results ---------- */
.result {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: none;
}
.result.show { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.result-big {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-strong);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.result-meta { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.stat {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.stat .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-size: 1.25rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v.pos { color: var(--green); }
.stat .v.neg { color: var(--primary); }

.note {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
}
.note strong { color: #8a5a10; }

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Tool cards (homepage links) ---------- */
.tool-cards { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 26px; }
@media (min-width: 640px) { .tool-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .tool-cards { grid-template-columns: repeat(3, 1fr); } }
.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.tool-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #d8cdb8; }
.tool-card .ico { font-size: 1.7rem; }
.tool-card h3 { margin: 12px 0 6px; font-size: 1.12rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin-top: 18px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
}
table.data th, table.data td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.data th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--ink-soft);
  position: sticky;
  top: 0;
}
table.data td:first-child, table.data th:first-child { text-align: left; }
table.data tbody tr:hover { background: #faf6ef; }
.decade-head td {
  background: var(--accent-soft);
  font-weight: 700;
  color: #8a5a10;
  text-align: left;
}
.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.pos { background: var(--green-soft); color: var(--green); }
.chip.neg { background: var(--primary-soft); color: var(--primary-strong); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.toolbar input[type="search"], .toolbar select {
  width: auto;
  min-width: 200px;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ---------- SVG chart ---------- */
.chart-box { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.chart-box svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: var(--ink);
  color: #c6cbd6;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #c6cbd6; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #8f96a5;
  text-align: center;
}
.footer-bottom .lang-switch { border-color: rgba(255,255,255,0.2); }
.footer-bottom .lang-switch a { color: #c6cbd6; }
.footer-bottom .lang-switch a.active { background: var(--primary); color: #fff; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }
.error-msg { color: var(--primary-strong); font-size: 0.9rem; font-weight: 600; margin-top: 12px; display: none; }
.error-msg.show { display: block; }


/* ===== fuel ===== */
/* ==========================================================================
   FuelCostCalc — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-fuel));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Unit system toggle ---------- */
.unit-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.unit-toggle .unit-toggle-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.unit-toggle .radio-pill {
  font-size: 0.85rem;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group {
  display: flex;
  gap: 8px;
}
.input-group input {
  flex: 1;
  min-width: 0;
}
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.input-group select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.checkbox-row input {
  accent-color: var(--c-brand);
  width: 18px;
  height: 18px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero.fuel {
  background: linear-gradient(135deg, var(--c-brand), var(--c-fuel));
}
.result-hero.ev {
  background: linear-gradient(135deg, var(--c-ev), #b97c56);
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value {
  color: var(--c-ev);
}
.result-stat.fuel .value {
  color: var(--c-fuel);
}
.result-stat.warn .value {
  color: var(--c-warn);
}

/* ---------- Comparison table (car compare) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 460px;
}
table.compare th,
table.compare td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.compare th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
}
table.compare th:first-child,
table.compare td:first-child {
  text-align: left;
}
table.compare tr:last-child td {
  border-bottom: 0;
}
table.compare tbody tr:hover {
  background: #fafbff;
}
.compare-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--c-ink-soft);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  vertical-align: middle;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== tip ===== */
/* ==========================================================================
   TipSplit Calc — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   Theme: money-green + amber (tip jar / coin).
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group {
  display: flex;
  gap: 8px;
}
.input-group input {
  flex: 1;
  min-width: 0;
}
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-group input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.input-group select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}
.btn-add {
  background: var(--c-brand);
  color: #fff;
}
.btn-add:hover {
  background: var(--c-brand-dark);
}
.btn-ghost {
  background: transparent;
  color: var(--c-muted);
  border: 1px solid transparent;
  padding: 6px 10px;
  font-size: 0.9rem;
}
.btn-ghost:hover {
  color: var(--c-danger);
  background: var(--c-danger-soft);
}

/* ---------- Tip percentage quick buttons ---------- */
.tip-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tip-pill {
  flex: 1 1 auto;
  min-width: 56px;
  text-align: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-ink-soft);
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tip-pill:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}
.tip-pill.active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}

/* ---------- Toggle switch (round-up) ---------- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--c-bg);
}
.switch-row .switch-label {
  font-weight: 600;
  font-size: 0.92rem;
}
.switch-row .switch-label small {
  display: block;
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.8rem;
}
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch input:checked + .slider {
  background: var(--c-brand);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value {
  color: var(--c-brand);
}
.result-stat.warn .value {
  color: var(--c-warn);
}

.result-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--c-accent-soft);
  border: 1px solid #fde68a;
  color: var(--c-accent-dark);
  font-size: 0.9rem;
}
.result-note.hidden {
  display: none;
}

/* ---------- Split items ---------- */
.items-head,
.item-row {
  display: grid;
  grid-template-columns: 1fr 110px 36px;
  gap: 8px;
  align-items: center;
}
.items-head {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-muted);
  margin-bottom: 4px;
}
.items-head span:last-child {
  text-align: center;
}
.item-row {
  margin-bottom: 8px;
}
.item-row .field {
  gap: 0;
}
.item-row .field label {
  display: none;
}
.item-row .btn-ghost {
  align-self: center;
  justify-self: center;
}

/* ---------- Table (tip guide) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
table.tip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}
table.tip-table th,
table.tip-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
table.tip-table th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
}
table.tip-table th:first-child {
  width: 30%;
}
table.tip-table tr:last-child td {
  border-bottom: 0;
}
table.tip-table tbody tr:hover {
  background: #fafbff;
}
.tip-table .pct {
  font-weight: 800;
  color: var(--c-brand);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}
.prose table {
  margin: 16px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
  .items-head,
  .item-row {
    grid-template-columns: 1fr 140px 40px;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== macro ===== */
/* ==========================================================================
   MacroSplit — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group {
  display: flex;
  gap: 8px;
}
.input-group input {
  flex: 1;
}
.input-group select {
  flex: 0 0 auto;
  min-width: 110px;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.results-subtitle {
  margin: 20px 0 12px;
  font-size: 0.95rem;
  color: var(--c-ink-soft);
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-hero .sub {
  font-size: 0.88rem;
  opacity: 0.9;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat .sub {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 2px;
}
.result-stat.accent .value {
  color: var(--c-accent);
}
.result-stat.warn .value {
  color: var(--c-warn);
}
.result-stat.protein .value { color: var(--m-protein); }
.result-stat.carb .value { color: var(--m-carb); }
.result-stat.fat .value { color: var(--m-fat); }

/* ---------- Charts ---------- */
.chart-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.chart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-top: 14px;
}
table.macro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
table.macro-table th,
table.macro-table td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.macro-table th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
}
table.macro-table th:first-child,
table.macro-table td:first-child {
  text-align: left;
}
table.macro-table tr:last-child td {
  border-bottom: 0;
}
table.macro-table tbody tr:hover {
  background: #fafbfa;
}
table.macro-table td.protein { color: var(--m-protein); font-weight: 700; }
table.macro-table td.carb { color: var(--m-carb); font-weight: 700; }
table.macro-table td.fat { color: var(--m-fat); font-weight: 700; }

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .result-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ===== pregnancy ===== */
/* ==========================================================================
   PregnancyWeekCalc — shared stylesheet
   Mobile-first, clean & modern. No frameworks. Pregnancy / due-date theme
   (soft rose + lavender).
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.site-nav a.active { background: var(--c-brand); color: #fff; }
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible { display: block; }

/* 分段选择器风格（2026-10-17 重设计）：隐藏圆点，按钮化，选中实底 */
.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: auto;
  background: var(--bg-subtle);
  padding: 4px;
  gap: 4px;
  max-width: 100%;
}
.mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  white-space: nowrap;
  border: 0;
  border-radius: 7px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.mode-pill:hover { color: var(--text-primary); }
.mode-pill input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.mode-pill.checked {
  background: var(--bg-surface);
  color: var(--accent-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.10), 0 0 0 1px var(--border-subtle);
}
.mode-pill:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-soft, rgba(79,70,229,0.15));
}
/* 孕周+天数双输入：统一输入组样式，替代内联 max-width */
.mode-row.mode-row-inputs {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 10px;
}
.mode-row.mode-row-inputs input {
  width: 100%;
  max-width: 160px;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
}
.mode-row.mode-row-inputs input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-quiet);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover { background: var(--c-bg); }

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-hero .sub {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
}

.progress-track {
  height: 14px;
  background: var(--c-brand-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-brand), var(--c-accent));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--c-muted);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value { color: var(--c-brand); }
.result-stat.warn .value { color: var(--c-warn); }

.result-note {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 14px;
}

.overdue-alert {
  display: none;
  background: var(--c-accent-soft);
  border-left: 4px solid var(--c-accent);
  color: var(--c-ink);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 12px 0;
  font-weight: 600;
}
.overdue-alert.visible { display: block; }

/* ---------- Trimester cards ---------- */
.trimester-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 18px 0 8px;
}
.trimester-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.trimester-card .tri-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-brand);
  margin-bottom: 4px;
}
.trimester-card .tri-range {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.trimester-card .tri-desc {
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}
.trimester-card.active {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}

/* ---------- Week matrix grid ---------- */
.week-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 28px;
}
.week-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.week-card:hover {
  border-color: var(--c-brand);
  box-shadow: var(--c-shadow);
  text-decoration: none;
}
.week-card .week-num {
  font-weight: 800;
  color: var(--c-ink);
  font-size: 1.05rem;
}
.week-card .week-size {
  font-size: 0.75rem;
  color: var(--c-muted);
}
.week-card .week-analogy {
  font-size: 0.78rem;
  color: var(--c-brand);
  font-weight: 600;
}
.week-card.mark-checkup { border-color: var(--c-accent-soft); }
.week-card.mark-checkup .week-num { color: var(--c-accent); }

/* ---------- Trimester group heading ---------- */
.group-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 24px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.group-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}
.group-heading .group-range {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* ---------- Week detail page ---------- */
.week-hero {
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
  color: #fff;
  border-radius: var(--radius);
  padding: 26px;
  margin: 8px 0 22px;
  text-align: center;
}
.week-hero .week-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.week-hero h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.15;
}
.week-hero .analogy {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.95;
}

.week-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}
.fact-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--c-shadow);
  padding: 16px;
  text-align: center;
}
.fact-card .fact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}
.fact-card .fact-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-brand);
  margin-top: 4px;
}

.info-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
  margin: 0 0 18px;
}
.info-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: var(--c-ink);
}
.info-card ul {
  margin: 0;
  padding-left: 20px;
}
.info-card li {
  margin: 7px 0;
  color: var(--c-ink-soft);
}

.checkup-callout {
  background: var(--c-accent-soft);
  border-left: 4px solid var(--c-accent);
  padding: 16px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 18px;
}
.checkup-callout .checkup-label {
  font-weight: 800;
  color: var(--c-accent);
  margin-bottom: 4px;
}
.checkup-callout p {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.92rem;
}

/* ---------- Adjacent week nav ---------- */
.adjacent {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.adjacent a {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.adjacent a:hover { border-color: var(--c-brand); text-decoration: none; }
.adjacent .adj-label {
  font-size: 0.78rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.adjacent .adj-name { font-weight: 700; color: var(--c-ink); }
.adjacent a.next { text-align: right; }

/* ---------- Prose / info content ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .callout {
  background: var(--c-brand-soft);
  border-left: 4px solid var(--c-brand);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.prose .callout.warn {
  background: var(--c-accent-soft);
  border-left-color: var(--c-accent);
}

/* ---------- Section title ---------- */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
}
.section-desc {
  text-align: center;
  color: var(--c-muted);
  max-width: 640px;
  margin: 0 auto 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
  .week-grid { grid-template-columns: repeat(5, 1fr); }
  .trimester-row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .week-grid { grid-template-columns: repeat(7, 1fr); }
  .week-facts { grid-template-columns: repeat(2, 1fr); }
}


/* ===== sleep ===== */
/* ==========================================================================
   SleepCycleCalc — shared stylesheet
   Mobile-first, calm night palette. No frameworks.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-night-deep));
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 660px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Mode / unit toggles ---------- */
.mode-toggle,
.nap-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.mode-toggle .toggle-label,
.nap-tabs .toggle-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.field input[type="time"] {
  max-width: 260px;
  font-variant-numeric: tabular-nums;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
  margin-top: 10px;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill:has(input:checked) {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

/* ---------- Notes ---------- */
.note {
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  background: var(--c-brand-soft);
  border: 1px solid #d9defb;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 4px 0 16px;
}

/* ---------- Results ---------- */
.results {
  margin-top: 22px;
}
.results-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
table.cycles {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 420px;
}
table.cycles th,
table.cycles td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
table.cycles th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  white-space: nowrap;
}
table.cycles th:last-child,
table.cycles td:last-child {
  text-align: right;
}
table.cycles tr:last-child td {
  border-bottom: 0;
}
table.cycles tbody tr:hover {
  background: #fafbff;
}
table.cycles td:first-child {
  font-weight: 700;
  color: var(--c-ink);
}
.time-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.time-value {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-brand);
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--c-ok);
  background: var(--c-ok-soft);
  border: 1px solid #bfe8d8;
  white-space: nowrap;
}

/* ---------- Nap page ---------- */
.nap-tab {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--c-ink-soft);
  background: #fff;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.nap-tab:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}
.nap-tab.active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}

.nap-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--c-brand), var(--c-night-deep));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin: 18px 0;
}
.nap-result .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.nap-result .value {
  font-family: var(--mono);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.nap-result .tag {
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.95;
}

.nap-detail {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--c-ink-soft);
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose h3 {
  color: var(--c-ink);
  font-size: 1.1rem;
  margin: 22px 0 8px;
}
.prose ul,
.prose ol {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}


/* ===== drugprice ===== */
/* DrugPriceWatch — site stylesheet
 * Custom health/pharmacy theme (light teal-tinted background, teal-green
 * primary, warm amber accent). No external frameworks. System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name {
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 52px 0 36px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.hero h1 .accent { color: var(--primary); }
.hero .lede {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0 40px;
}
@media (min-width: 820px) {
  .tool-grid.two { grid-template-columns: 1.15fr 0.85fr; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); box-shadow: 0 6px 18px rgba(14, 159, 110, 0.3); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* ---------- Results / drug cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.drug-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .drug-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .drug-grid { grid-template-columns: repeat(3, 1fr); } }

.drug-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.drug-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #bfd8ce; }
.drug-card .generic { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.drug-card .brands { color: var(--muted); font-size: 0.88rem; margin: 2px 0 10px; }
.drug-card .price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.price-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-pill.retail { background: var(--primary-soft); color: var(--primary-strong); }
.price-pill.cash { background: var(--blue-soft); color: var(--blue); }
.drug-card .more { margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.cat { background: var(--accent-soft); color: var(--accent-strong); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Notes / disclaimers ---------- */
.note {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
}
.note strong { color: #8a5a10; }

.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Compare ---------- */
.compare-select { margin-bottom: 18px; }
.compare-table-wrap { overflow-x: auto; margin-top: 8px; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  background: #fff;
}
table.compare th, table.compare td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.compare th { background: var(--surface-2); font-weight: 700; color: var(--ink-soft); }
table.compare td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
table.compare td.label { color: var(--muted); font-weight: 600; width: 180px; }
table.compare .highlight { background: var(--primary-soft); }

/* ---------- Drug detail (landing) pages ---------- */
.drug-hero { padding: 40px 0 20px; }
.drug-hero .eyebrow { margin-bottom: 10px; }
.drug-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 8px; letter-spacing: -0.03em; }
.drug-hero .sub { color: var(--muted); font-size: 1.05rem; }

.price-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 22px 0;
}
@media (min-width: 640px) { .price-cards { grid-template-columns: 1fr 1fr; } }
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.price-card .pk { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.price-card .pv { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.price-card.retail .pv { color: var(--primary-strong); }
.price-card.cash .pv { color: var(--blue); }
.price-card .ps { color: var(--muted); font-size: 0.82rem; }

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}
.fact {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.fact .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }

.sibling-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sibling-links a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
  text-decoration: none;
}
.sibling-links a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #14211d;
  color: #c6d3ce;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #c6d3ce; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #93a39c;
  text-align: center;
}
.footer-bottom p { max-width: 720px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }
.error-msg { color: #b0402c; font-size: 0.9rem; font-weight: 600; margin-top: 12px; display: none; }
.error-msg.show { display: block; }


/* ===== recall ===== */
/* RecallRadar — site stylesheet
 * Custom safety/radar theme (warm light background, alert red-orange primary,
 * amber accent). No external frameworks. System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name { font-weight: 800; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a { padding: 6px 12px; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 14px; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 .accent { color: var(--primary); }
.hero .lede { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

/* ---------- Results / recall cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.recall-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .recall-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .recall-grid { grid-template-columns: repeat(3, 1fr); } }

.recall-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.recall-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #e2c3bd; }
.recall-card .product { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
.recall-card .brand { color: var(--muted); font-size: 0.88rem; margin: 2px 0 10px; }
.recall-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.recall-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; font-size: 0.8rem; color: var(--muted); }
.recall-card .more { margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.cat { background: var(--accent-soft); color: var(--accent-strong); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }
.chip.hazard { background: var(--primary-soft); color: var(--primary-strong); }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.active { background: var(--green-soft); color: var(--green); }
.badge.completed { background: var(--surface-2); color: var(--muted); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Notes / disclaimers ---------- */
.demo-banner {
  font-size: 0.88rem;
  color: #7a4d08;
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 20px 0;
}
.demo-banner strong { color: #8a5a10; }

.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Timeline (latest) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 18px 24px;
  margin-bottom: 14px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--primary);
}
.timeline a.title { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.timeline a.title:hover { color: var(--primary-strong); text-decoration: underline; }
.timeline .meta { color: var(--muted); font-size: 0.84rem; margin-top: 2px; }
.timeline .desc { color: var(--ink-soft); font-size: 0.92rem; margin-top: 8px; }

/* ---------- Category cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }

.cat-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.cat-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cat-card h3 { margin: 0 0 8px; font-size: 1.2rem; letter-spacing: -0.01em; }
.cat-card p { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.cat-card .count { font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

/* ---------- Recall detail (landing) pages ---------- */
.recall-hero { padding: 40px 0 20px; }
.recall-hero .eyebrow { margin-bottom: 10px; }
.recall-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; letter-spacing: -0.03em; }
.recall-hero .sub { color: var(--muted); font-size: 1.05rem; }

.fact-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.fact {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.fact .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }

.hazard-box {
  background: var(--primary-soft);
  border: 1px solid #f3c9c3;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 18px 0;
}
.hazard-box h3 { margin: 0 0 8px; color: var(--primary-strong); }
.hazard-box p { margin: 0; color: var(--ink-soft); }

.remedy-box {
  background: var(--green-soft);
  border: 1px solid #c6e6d5;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 18px 0;
}
.remedy-box h3 { margin: 0 0 8px; color: var(--green); }
.remedy-box p { margin: 0; color: var(--ink-soft); }

.steps { counter-reset: step; list-style: none; margin: 18px 0; padding: 0; }
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 16px 60px;
  margin-bottom: 12px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li p { margin: 0; color: var(--ink-soft); }

.sibling-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sibling-links a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
  text-decoration: none;
}
.sibling-links a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #2a1714;
  color: #d9c6c1;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #d9c6c1; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #a58f89;
  text-align: center;
}
.footer-bottom p { max-width: 760px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }


/* ===== unit ===== */
/* ==========================================================================
   UnitSmith — shared stylesheet
   Engineering unit converter. Clean, industrial, mobile-first. No frameworks.
   ========================================================================== */



* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

.mono { font-family: var(--mono); }
.strong { font-weight: 700; }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-brand-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  color: #fff;
}
.brand:hover { text-decoration: none; }
.brand .brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--c-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand .brand-icon svg { width: 18px; height: 18px; }
.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fb3cf;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: #d7e0ee;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.site-nav a.active { background: var(--c-accent); color: #fff; }

.lang-link {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  white-space: nowrap;
}
.lang-link:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--c-brand-dark) 0%, var(--c-brand-mid) 55%, var(--c-brand) 100%);
  color: #fff;
  padding: 42px 0 46px;
  border-bottom: 3px solid var(--c-accent);
}
.hero .container { max-width: var(--maxw); }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero p {
  margin: 0;
  max-width: 720px;
  color: #d7e0ee;
  font-size: 1.05rem;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f6c46b;
  margin-bottom: 12px;
}

/* ---------- Cards & sections ---------- */
main.container { padding-top: 28px; padding-bottom: 40px; }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
}

.section { margin-top: 34px; }
.section-title {
  margin: 0 0 14px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
}
.section-lede { color: var(--c-ink-soft); margin: 0 0 18px; }

/* ---------- Converter ---------- */
.converter { margin-bottom: 8px; }
.conv-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.conv-units {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.conv-units .conv-field { flex: 1 1 140px; min-width: 120px; }
.conv-value-field { flex: 1 1 160px !important; }
.conv-field { display: flex; flex-direction: column; gap: 6px; }
.conv-field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-ink-soft);
}
.conv-field input,
.conv-field select {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--c-ink);
  background: #fbfcfe;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.conv-field input:focus,
.conv-field select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(232, 137, 12, 0.16);
}
.conv-field input.mono { font-family: var(--mono); }

.conv-swap {
  flex: 0 0 46px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  background: var(--c-brand);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.conv-swap:hover { background: var(--c-brand-mid); }

.conv-output {
  margin-top: 20px;
  padding: 18px 20px;
  background: linear-gradient(180deg, var(--c-accent-soft), #fff);
  border: 1px solid #f2d9ae;
  border-radius: var(--radius-sm);
}
.conv-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.conv-result-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-accent-dark);
}
.conv-result-value {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-brand-dark);
  line-height: 1.1;
  word-break: break-all;
}
.conv-result-unit {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-ink-soft);
}
.conv-formula {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--c-muted);
  word-break: break-all;
}

/* ---------- Quantity cards (index) ---------- */
.qty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.qty-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 20px;
  color: var(--c-ink);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.qty-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--c-accent);
  box-shadow: 0 4px 8px rgba(12, 37, 69, 0.06), 0 14px 30px rgba(12, 37, 69, 0.12);
}
.qty-card .qty-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-card .qty-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--c-accent-soft);
  color: var(--c-accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.qty-card h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.qty-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.45;
}
.qty-card .qty-units {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--c-ink-soft);
}
.qty-card .qty-cta {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-accent-dark);
}

/* ---------- Unit comparison table ---------- */
.table-wrap { overflow-x: auto; }
table.unit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.unit-table th,
table.unit-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
table.unit-table thead th {
  background: var(--c-brand-dark);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: none;
}
table.unit-table thead th:first-child { border-top-left-radius: var(--radius-sm); }
table.unit-table thead th:last-child { border-top-right-radius: var(--radius-sm); }
table.unit-table tbody tr:nth-child(even) { background: #f7f9fc; }
table.unit-table tbody tr:hover { background: var(--c-accent-soft); }
table.unit-table td.mono { font-family: var(--mono); }
table.unit-table td.strong { font-weight: 700; color: var(--c-brand-dark); }

/* ---------- Prose ---------- */
.prose { color: var(--c-ink-soft); }
.prose h2 {
  color: var(--c-ink);
  font-size: 1.2rem;
  margin: 24px 0 8px;
}
.prose h3 { color: var(--c-ink); font-size: 1.05rem; margin: 20px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: #eef2f8;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--c-brand-dark);
}

/* ---------- Related links ---------- */
.rel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.rel-links a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-brand);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: border-color 0.12s, color 0.12s;
}
.rel-links a:hover { border-color: var(--c-accent); color: var(--c-accent-dark); text-decoration: none; }

/* ---------- Callout ---------- */
.callout {
  margin-top: 18px;
  padding: 14px 18px;
  background: #eef4fb;
  border-left: 4px solid var(--c-brand);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 44px;
  background: var(--c-brand-dark);
  color: #b8c5d8;
  padding: 34px 0 40px;
  font-size: 0.88rem;
}
.site-footer .container { max-width: var(--maxw); }
.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #d7e0ee; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: #8fa1ba;
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .conv-controls {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 780px) {
  .site-footer .foot-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 779px) {
  .site-header .container { flex-direction: column; align-items: stretch; }
  .site-header .top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


/* ===== datediff ===== */
/* DateDiff Pro — global stylesheet */


* { box-sizing: border-box; }

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

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

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

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, #5c3a26 0%, #35674a 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.16); text-decoration: none; }
.site-nav a.active { background: rgba(255, 255, 255, 0.22); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px;
  margin-left: 6px;
}
.lang-switch a {
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-switch a:hover { text-decoration: none; color: #fff; }
.lang-switch a.on { background: #fff; color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #5c3a26 0%, #35674a 100%);
  color: #fff;
  padding: 52px 0 60px;
  margin-bottom: -34px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.15;
  font-weight: 800;
}
.hero p {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}

/* ---------- Cards & panels ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card.floating {
  margin-top: -8px;
  box-shadow: var(--shadow-lg);
}
.card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
}
.card .sub {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field textarea,
.field select {
  font-family: var(--font);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.field textarea { resize: vertical; min-height: 84px; }
.field .hint { font-size: 0.82rem; color: var(--muted); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn.ghost:hover { background: var(--primary-light); }
.btn.block { width: 100%; }

/* ---------- Results ---------- */
.result {
  margin-top: 8px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.stat {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  text-align: center;
}
.stat .num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--mono);
}
.stat .lbl {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 2px;
  font-weight: 600;
}

.big-days {
  text-align: center;
  padding: 22px 10px;
}
.big-days .num {
  font-size: clamp(2.6rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--primary);
  font-family: var(--mono);
  line-height: 1;
}
.big-days .lbl { color: var(--muted); margin-top: 8px; }

.breakdown-line {
  font-size: 1.15rem;
  text-align: center;
  color: var(--ink);
  padding: 10px 0;
}
.breakdown-line strong { color: var(--primary); }

.error-msg {
  color: var(--danger);
  font-weight: 600;
  margin-top: 10px;
  min-height: 1.2em;
}

/* ---------- Holiday table ---------- */
.holiday-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.holiday-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.holiday-list li a:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.holiday-list .emoji { font-size: 1.3rem; }
.holiday-list .next-date { color: var(--muted); font-size: 0.82rem; font-weight: 500; }

table.date-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
table.date-table th, table.date-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
table.date-table th {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
table.date-table tr:last-child td { border-bottom: none; }
table.date-table .past { color: var(--muted); }

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.year-nav a {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
}
.year-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.year-nav a.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; font-size: 1.3rem; }
.prose p { color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); padding-left: 20px; }
/* Prose sitting on the emerald page background, not inside a white card. */
main > .prose:not(.card),
main > .prose:not(.card) h2,
main > .prose:not(.card) p,
main > .prose:not(.card) li {
  color: #022c22;
}
main > .prose:not(.card) a {
  color: #022c22;
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.site-footer nav a {
  color: var(--muted);
  margin-right: 16px;
  font-size: 0.9rem;
}
.site-footer nav a:hover { color: var(--primary); }
.site-footer .fine { font-size: 0.82rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.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;
}

@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px; }
}


/* ===== namegen ===== */
/* ==========================================================================
   NameGenStudio — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   Theme: violet → fuchsia "sparkle" (name-tag / naming tool).
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 34px 0 22px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 0 auto;
  max-width: 660px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards / boxes ---------- */
.gen-box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: var(--c-ink-soft);
}
.check-row label:has(input:checked) {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.check-row input { accent-color: var(--c-brand); }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input { accent-color: var(--c-brand); }
.radio-pill:has(input:checked) {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

/* ---------- Buttons ---------- */
.gen-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 11px 22px;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--c-brand), var(--c-accent));
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(124, 58, 237, 0.36); }
.btn-ghost {
  background: var(--c-surface);
  color: var(--c-brand);
  border: 1px solid var(--c-brand);
}
.btn-ghost:hover { background: var(--c-brand-soft); }

/* ---------- Name chips ---------- */
.name-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.name-chip {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  text-align: center;
  word-break: break-word;
  transition: border-color 0.12s, background 0.12s, transform 0.05s;
}
.name-chip:hover {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.name-chip:active { transform: translateY(1px); }
.name-chip.copied {
  border-color: var(--c-ok);
  background: var(--c-ok-soft);
  color: var(--c-ok);
}
.empty {
  grid-column: 1 / -1;
  color: var(--c-muted);
  text-align: center;
  margin: 0;
}

/* ---------- Generator directory (home) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 8px 0 30px;
}
.gen-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 18px;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.gen-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-brand);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.14);
  text-decoration: none;
}
.gen-card .icon {
  font-size: 1.7rem;
  line-height: 1;
}
.gen-card h3 { margin: 2px 0 0; font-size: 1.12rem; color: var(--c-ink); }
.gen-card p { margin: 0; color: var(--c-muted); font-size: 0.92rem; }

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose h3 { color: var(--c-ink); font-size: 1.1rem; margin: 20px 0 8px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose .links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  list-style: none;
  padding-left: 0;
}
.prose .links-grid a {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--c-ink-soft);
}
.prose .links-grid a:hover { color: var(--c-brand); border-color: var(--c-brand); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a { color: var(--c-ink-soft); font-weight: 600; }
.disclaimer { font-size: 0.82rem; max-width: 720px; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
  .name-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .prose .links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .name-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ===== paint ===== */
/* ==========================================================================
   PaintArea Calc — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   Warm "paint / home improvement" palette.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), #f59e0b);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group {
  display: flex;
  gap: 8px;
}
.input-group input {
  flex: 1;
  min-width: 0;
}
.input-group select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
}
.field-error.visible {
  display: block;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input {
  accent-color: var(--c-brand);
}
.radio-pill.checked {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
}
.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--c-brand);
  flex: 0 0 auto;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), #f59e0b);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.accent .value {
  color: var(--c-accent);
}
.result-stat.warn .value {
  color: var(--c-warn);
}
.result-note {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  background: var(--c-brand-soft);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .field.span-2 {
    grid-column: span 2;
  }
}
@media (min-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== screensize ===== */
/* ==========================================================================
   ScreenSizeDB — display / PPI database site
   Pure CSS, no frameworks. Light, professional, display-focused theme.
   ========================================================================== */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--ink);
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 7px; }
.brand .accent { color: var(--primary); }

.main-nav { display: flex; gap: 2px; margin-left: 6px; flex: 1; }
.main-nav a {
  color: var(--ink-2);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .94rem;
  font-weight: 600;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  font-size: .86rem;
  font-weight: 600;
}
.lang-switch a {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
}
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.lang-switch a.active { background: var(--primary); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #7c4a2d 0%, #b97c56 52%, #b97c56 100%);
  color: #fff;
  padding: 52px 0 60px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero p.lede {
  margin: 0;
  max-width: 640px;
  font-size: 1.05rem;
  color: #dbeafe;
}
.hero .stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
}
.hero .stat { font-size: .92rem; color: #bfdbfe; }
.hero .stat b { display: block; font-size: 1.3rem; color: #fff; }

/* ---------- Toolbar / filters ---------- */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: -34px;
  position: relative;
}
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-row input[type="search"] {
  flex: 1 1 260px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-2);
}
.search-row input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  align-items: flex-end;
  margin-top: 16px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group > label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.type-tab {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
}
.type-tab:hover { border-color: var(--primary); color: var(--primary); }
.type-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-inputs select, .range-inputs input[type="number"] {
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: var(--surface-2);
}
.range-inputs select:focus, .range-inputs input:focus { outline: none; border-color: var(--primary); }
.range-inputs .sep { color: var(--muted); }

.result-meta { margin-top: 16px; font-size: .9rem; color: var(--muted); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7d6f7; }
.card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card .brand { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.card .model { font-size: 1.08rem; font-weight: 700; margin: 2px 0 12px; }
.badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.phone { background: #f7e7cf; color: #b97c56; border-color: #e9d6bd; }
.badge.tablet { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.badge.laptop { background: #e9f2ea; color: #35674a; border-color: #c4dcc9; }
.badge.monitor { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 6px 0 4px; }
.spec .k { font-size: .76rem; color: var(--muted); font-weight: 600; }
.spec .v { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.spec .v.ppi-val { color: var(--primary-strong); }

.card .more {
  display: none;
  border-top: 1px dashed var(--line);
  margin-top: 12px;
  padding-top: 12px;
  font-size: .9rem;
  color: var(--ink-2);
}
.card.open .more { display: block; }
.card .more .row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.card .more .row span:first-child { color: var(--muted); }
.card .more .note { margin-top: 8px; color: var(--ink-2); font-style: italic; }

.card .actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-strong); color: #fff; }
.btn.small { padding: 6px 11px; font-size: .84rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.hint { font-size: .78rem; color: var(--muted); }

/* Compare dock */
.compare-dock {
  position: sticky;
  bottom: 14px;
  margin-top: 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}
.compare-dock .slots { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.compare-dock .slot {
  background: #1e293b;
  border: 1px dashed #475569;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: .88rem;
  min-width: 150px;
}
.compare-dock .slot.filled { border-style: solid; border-color: var(--accent); background: #0f172a; }
.compare-dock .slot b { font-weight: 700; }
.compare-dock .slot button { background: none; border: none; color: #94a3b8; cursor: pointer; margin-left: 8px; font-size: 1rem; }

/* ---------- Panels / prose ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin: 24px 0;
}
.panel h2 { margin-top: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.prose { max-width: 760px; }
.prose h3 { font-size: 1.08rem; margin-top: 22px; }
.prose p, .prose li { color: var(--ink-2); }

/* ---------- Section titles ---------- */
.section-title { font-size: 1.3rem; margin: 34px 0 4px; letter-spacing: -.01em; }
.section-sub { color: var(--muted); margin: 0 0 6px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin: 18px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th {
  position: sticky;
  top: 63px;
  background: var(--surface-2);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
table.data thead th:hover { color: var(--ink); }
table.data thead th .dir { color: var(--primary); margin-left: 4px; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data td.ppi { font-weight: 700; color: var(--primary-strong); font-variant-numeric: tabular-nums; }

/* ---------- Compare page ---------- */
.compare-selectors { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
@media (max-width: 720px) { .compare-selectors { grid-template-columns: 1fr; } .compare-selectors .vs { text-align: center; } }
.compare-selectors select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--ink);
}
.compare-selectors select:focus { outline: none; border-color: var(--primary); }
.compare-selectors .vs { font-weight: 800; color: var(--muted); }

table.compare { width: 100%; border-collapse: collapse; }
table.compare th, table.compare td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.compare th { width: 130px; color: var(--muted); font-weight: 600; font-size: .9rem; }
table.compare td { font-weight: 600; }
table.compare .col-a, table.compare .col-b { width: 1%; }
table.compare .win { color: var(--good); font-weight: 700; }

.advice { border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 16px 0; }
.advice b { color: var(--primary-strong); }

/* ---------- Calculator ---------- */
.calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.calc-form label { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.calc-form input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.calc-form input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }

.calc-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
.calc-result .tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.calc-result .tile .k { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.calc-result .tile .v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.calc-result .tile.hero { background: var(--primary); border-color: var(--primary); color: #fff; }
.calc-result .tile.hero .k { color: #bfdbfe; }
.calc-result .tile.hero .v { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  margin-top: 50px;
  padding: 34px 0 26px;
}
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 5px 0; font-size: .9rem; }
.site-footer .fine { margin-top: 22px; font-size: .8rem; color: #94a3b8; border-top: 1px solid #1e293b; padding-top: 16px; }

/* ---------- Utility ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.inline-links { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-links a { background: var(--surface-2); border: 1px solid var(--line); padding: 7px 13px; border-radius: 9px; font-weight: 600; font-size: .9rem; }
.inline-links a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .78rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 1rem; }

@media (max-width: 640px) {
  .main-nav { gap: 0; }
  .main-nav a { padding: 6px 8px; font-size: .86rem; }
  .hero { padding: 36px 0 44px; }
  .toolbar { padding: 16px; }
}


/* ===== cron ===== */
/* CronHelp — site-wide stylesheet (light theme, clock/gear motif). */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 28px; height: 28px; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary-strong); text-decoration: none; }
.main-nav a.active { background: var(--primary); color: #fff; }
.lang-switch { margin-left: auto; }
.lang-switch a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface);
}
.lang-switch a:hover { background: var(--primary-soft); text-decoration: none; }

/* Hero */
.hero { padding: 48px 0 24px; }
.hero h1 { margin: 0 0 8px; font-size: 2.2rem; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 720px; }

/* Cards & panels */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 20px 0;
}
.card h2, .card h3 { margin-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* Forms */
label { font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input[type="text"] { flex: 1 1 260px; }

/* Expression display */
.expr-box {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  word-break: break-all;
  letter-spacing: 0.03em;
}
.mono { font-family: var(--font-mono); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { background: var(--bg); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
td.mono, th.mono { font-family: var(--font-mono); }

/* Field chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Messages */
.msg { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-size: 0.95rem; }
.msg-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.msg-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #bbf7d0; }
.hidden { display: none !important; }

/* Builder grid */
.builder-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field-row {
  display: grid;
  grid-template-columns: 140px 150px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.field-row .field-name { font-weight: 700; }
.field-row .field-token { font-family: var(--font-mono); color: var(--primary-strong); background: var(--primary-soft); padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
@media (max-width: 760px) {
  .field-row { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .lang-switch { margin-left: 0; }
}

/* Run list */
.run-list { list-style: none; padding: 0; margin: 0; }
.run-list li {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}
.run-list .time { font-family: var(--font-mono); font-weight: 600; }
.run-list .diff { color: var(--muted); font-size: 0.9rem; }
.run-list li.next { border-color: var(--primary); background: var(--primary-soft); }

/* Countdown */
.countdown { font-size: 2rem; font-weight: 700; font-family: var(--font-mono); color: var(--primary); }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { padding-top: 4px; }

/* Field control inputs */
.field-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-ctrl input[type="number"] { width: 80px; padding: 6px 8px; }
.field-ctrl .chips { max-height: 140px; overflow-y: auto; }

/* Example cards */
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.example-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.example-card .expr { font-family: var(--font-mono); font-weight: 600; color: var(--primary-strong); }
.example-card .desc { color: var(--muted); font-size: 0.9rem; }
.example-card .open { margin-top: auto; font-size: 0.9rem; font-weight: 600; }

/* Syntax reference */
.syntax-table td:first-child { font-family: var(--font-mono); font-weight: 600; color: var(--primary-strong); white-space: nowrap; }
code, .inline-code {
  font-family: var(--font-mono);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}

/* Prose blocks */
.prose { max-width: 760px; }
.prose h2 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 48px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }

/* Utility */
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.center { text-align: center; }
.small { font-size: 0.85rem; color: var(--muted); }


/* ===== metatag ===== */
/* ==========================================================================
   MetaTagCheck — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   ========================================================================== */



* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}
.hero .privacy-badge {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border: 1px solid #bfe9d8;
  border-radius: 999px;
  padding: 5px 14px;
}

/* ---------- Cards ---------- */
.tool-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--c-brand);
  color: #fff;
}
.btn-primary:hover { background: var(--c-brand-dark); }
.btn-ghost {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg); }

/* ---------- Textarea ---------- */
.paste-area {
  width: 100%;
  min-height: 220px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #0f1222;
  color: #e5e7eb;
  resize: vertical;
}
.paste-area:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 12px;
}
.field-error.visible { display: block; }

/* ---------- Results ---------- */
.results { margin-top: 26px; }
.results[hidden] { display: none; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat-card .label { font-size: 0.8rem; color: var(--c-muted); }
.stat-card .value { font-size: 1.3rem; font-weight: 800; color: var(--c-ink); }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
}
.section-title h2 { margin: 0; font-size: 1.25rem; }
.summary-pills { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill--error { background: var(--c-danger-soft); color: var(--c-danger); }
.pill--warn { background: var(--c-warn-soft); color: var(--c-warn); }
.pill--pass { background: var(--c-accent-soft); color: var(--c-accent); }

/* ---------- Issue list ---------- */
.issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.issue {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-muted);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--c-surface);
}
.issue--error { border-left-color: var(--c-danger); }
.issue--warn { border-left-color: var(--c-warn); }
.issue--pass { border-left-color: var(--c-accent); }
.issue-badge {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 1px;
}
.issue--error .issue-badge { background: var(--c-danger-soft); color: var(--c-danger); }
.issue--warn .issue-badge { background: var(--c-warn-soft); color: var(--c-warn); }
.issue--pass .issue-badge { background: var(--c-accent-soft); color: var(--c-accent); }
.issue-body p { margin: 0 0 6px; }
.issue-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 1px 8px;
  color: var(--c-ink-soft);
}

/* ---------- Previews ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.preview-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
}
.preview-panel h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
}

/* Google SERP */
.serp {
  font-family: Arial, sans-serif;
  max-width: 560px;
}
.serp-title {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.3;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.serp-url { color: #006621; font-size: 14px; line-height: 1.4; }
.serp-desc { color: #545454; font-size: 14px; line-height: 1.58; }

/* Twitter / X cards */
.tw-card {
  border: 1px solid #cfd9de;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  max-width: 500px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.tw-card--summary {
  display: flex;
  align-items: stretch;
}
.tw-thumb {
  flex: 0 0 122px;
  min-height: 122px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 0.75rem;
  text-align: center;
  overflow: hidden;
}
.tw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-hero {
  height: 250px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 0.8rem;
  overflow: hidden;
}
.tw-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-body { padding: 12px; }
.tw-domain { color: #536471; font-size: 13px; margin-bottom: 2px; }
.tw-title { color: #0f1419; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.tw-desc { color: #536471; font-size: 14px; }

/* WeChat-style card */
.wechat-card {
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 500px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wechat-thumb {
  flex: 0 0 110px;
  min-height: 110px;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 0.72rem;
  text-align: center;
  overflow: hidden;
}
.wechat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wechat-body {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.wechat-title {
  color: #181818;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.wechat-desc {
  color: #888;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.is-placeholder {
  border: 1px dashed var(--c-border);
}

/* ---------- OG image check page ---------- */
.og-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.og-input-row input[type="url"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.og-input-row input[type="url"]:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.dropzone {
  margin-top: 16px;
  border: 2px dashed var(--c-border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  color: var(--c-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.is-dragover {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.dropzone input[type="file"] { display: none; }

.og-result {
  margin-top: 20px;
}
.og-result[hidden] { display: none; }
.verdict {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.verdict--pass { background: var(--c-accent-soft); color: var(--c-accent); }
.verdict--ok { background: var(--c-brand-soft); color: var(--c-brand); }
.verdict--adjust { background: var(--c-warn-soft); color: var(--c-warn); }
.og-advice { color: var(--c-ink-soft); margin-top: 4px; }
.og-preview {
  margin-top: 16px;
  max-width: 480px;
  min-height: 140px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 0.8rem;
}
.og-preview img { width: 100%; height: auto; display: block; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
table.spec th, table.spec td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
table.spec th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
table.spec tr:last-child td { border-bottom: 0; }
table.spec tbody tr:hover { background: #fafbff; }
table.spec code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--c-brand-soft);
  color: var(--c-brand-dark);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 { color: var(--c-ink); font-size: 1.4rem; margin: 28px 0 10px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose .inner-links { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--c-ink-soft); font-weight: 600; }
.disclaimer { font-size: 0.82rem; max-width: 720px; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-panel--full { grid-column: span 2; }
}


/* ===== password ===== */
/* ==========================================================================
   PasswordStrengthLab — shared stylesheet
   Mobile-first, clean & modern. No frameworks. Security/indigo theme.
   ========================================================================== */



* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-brand-soft); color: var(--c-brand); text-decoration: none; }
.site-nav a.active { background: var(--c-brand); color: #fff; }
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover { background: var(--c-brand-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 32px 0 20px; text-align: center; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p { margin: 0 auto; max-width: 640px; color: var(--c-muted); font-size: 1.05rem; }

/* ---------- Privacy banner (zero upload) ---------- */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--c-brand-soft), #f7e7cf);
  border: 1px solid #f7e7cf;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--c-brand-dark);
  font-weight: 600;
}
.privacy-banner .lock-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--c-brand);
  color: #fff;
  font-size: 1.1rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--c-muted); font-size: 0.82rem; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px var(--c-danger-soft);
}
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }
.input-group button {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink-soft);
  padding: 0 14px;
  cursor: pointer;
}
.input-group button:hover { background: var(--c-brand-soft); color: var(--c-brand); }

.field-error { display: none; color: var(--c-danger); font-size: 0.85rem; }
.field-error.visible { display: block; }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: #fff;
}
.radio-pill input { accent-color: var(--c-brand); }
.radio-pill.checked { border-color: var(--c-brand); background: var(--c-brand-soft); color: var(--c-brand); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; }
.check-row input { accent-color: var(--c-brand); width: 18px; height: 18px; }

.form-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-reset { background: var(--c-surface); color: var(--c-ink-soft); border: 1px solid var(--c-border); }
.btn-reset:hover { background: var(--c-bg); }
.btn-primary { background: var(--c-brand); color: #fff; }
.btn-primary:hover { background: var(--c-brand-dark); }

/* ---------- Strength score (home) ---------- */
.score-hero {
  background: linear-gradient(135deg, var(--c-brand), #b97c56);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin: 18px 0;
}
.score-hero .score-value {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
}
.score-hero .score-of { opacity: 0.8; font-size: 0.95rem; }

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  margin-top: 10px;
}
.badge[data-level="0"] { background: var(--lv0); }
.badge[data-level="1"] { background: var(--lv1); }
.badge[data-level="2"] { background: var(--lv2); color: #3a2e00; }
.badge[data-level="3"] { background: var(--lv3); }
.badge[data-level="4"] { background: var(--lv4); }

.score-meter {
  height: 12px;
  background: #ece9f6;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}
.score-meter .score-bar {
  height: 100%;
  width: 0%;
  background: var(--lv0);
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}
.score-bar[data-level="0"] { background: var(--lv0); }
.score-bar[data-level="1"] { background: var(--lv1); }
.score-bar[data-level="2"] { background: var(--lv2); }
.score-bar[data-level="3"] { background: var(--lv3); }
.score-bar[data-level="4"] { background: var(--lv4); }

/* ---------- Results / stats ---------- */
.results { margin-top: 24px; border-top: 1px dashed var(--c-border); padding-top: 22px; }
.results-title { margin: 0 0 16px; font-size: 1.05rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label { font-size: 0.82rem; color: var(--c-muted); }
.result-stat .value { font-size: 1.3rem; font-weight: 800; color: var(--c-ink); word-break: break-word; }
.result-stat.accent .value { color: var(--c-accent); }
.result-stat.warn .value { color: var(--c-warn); }

/* charset mini-grid */
.charset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.charset-grid .result-stat { padding: 12px; }
.charset-grid .result-stat .value { font-family: var(--mono); font-size: 1.15rem; }

/* ---------- Crack-time table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
table.ctable { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 420px; }
table.ctable th, table.ctable td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--c-border); }
table.ctable th { background: var(--c-bg); font-weight: 700; color: var(--c-ink-soft); }
table.ctable td:not(:first-child) { text-align: right; }
table.ctable tr:last-child td { border-bottom: 0; }
table.ctable tbody tr:hover { background: #fafbff; }

/* ---------- Suggestions ---------- */
.suggestions { margin: 0; padding-left: 20px; }
.suggestions li { margin: 6px 0; }
.suggestions li.ok { color: var(--c-accent); font-weight: 600; list-style: none; margin-left: -20px; }

/* ---------- Passphrase output ---------- */
.passphrase-output {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-brand-dark);
  background: var(--c-brand-soft);
  border: 1px solid #f7e7cf;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  word-break: break-all;
}

/* ---------- Info / content ---------- */
.prose { max-width: 720px; margin: 0 auto 40px; color: var(--c-ink-soft); }
.prose h2 { color: var(--c-ink); font-size: 1.4rem; margin: 28px 0 10px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container { display: flex; flex-direction: column; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--c-ink-soft); font-weight: 600; }
.disclaimer { font-size: 0.82rem; max-width: 720px; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .field.span-2 { grid-column: span 2; }
}
@media (min-width: 900px) {
  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .charset-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ===== wordcount ===== */
/* ==========================================================================
   WordCounterPlus — shared stylesheet
   Mobile-first, clean & modern. No frameworks.
   Theme: "ink & paper" — deep indigo ink with cyan/violet/emerald accents.
   ========================================================================== */



* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand), var(--c-chars));
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--c-brand);
  color: #fff;
}
.lang-link {
  color: var(--c-brand);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.lang-link:hover {
  background: var(--c-brand-soft);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--c-muted);
  font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.calc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 24px;
  margin: 8px 0 28px;
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field .hint {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.82rem;
}
.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.55;
  font-family: var(--font);
}
.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-soft);
}
.field-error {
  display: none;
  color: var(--c-danger);
  font-size: 0.85rem;
  margin-top: 8px;
}
.field-error.visible {
  display: block;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  transition: transform 0.05s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-reset {
  background: var(--c-surface);
  color: var(--c-ink-soft);
  border: 1px solid var(--c-border);
}
.btn-reset:hover {
  background: var(--c-bg);
}
.btn-primary {
  background: var(--c-brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-brand-dark);
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.results-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.result-hero {
  background: linear-gradient(135deg, var(--c-brand), var(--c-sent));
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}
.result-hero .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.result-hero .value {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
}

/* Stat grid (word counter + reading time) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.result-stat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.result-stat .label {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.result-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-ink);
  word-break: break-word;
}
.result-stat.words .value { color: var(--c-words); }
.result-stat.chars .value { color: var(--c-chars); }
.result-stat.sent .value { color: var(--c-sent); }
.result-stat.para .value { color: var(--c-para); }
.result-stat.read .value { color: var(--c-read); }
.result-stat.accent .value { color: var(--c-para); }

/* Reading time block */
.reading-block {
  margin-top: 20px;
}
.reading-block .results-title {
  margin-bottom: 12px;
}
.hint-line {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: 4px;
}

/* ---------- Keyword density ---------- */
.kw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px dashed var(--c-border);
  padding-top: 22px;
}
.kw-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.kw-results .result-stat {
  text-align: center;
}
.kw-results .result-stat .value {
  font-size: 1.6rem;
}
.kw-results .result-stat.kw-density .value {
  color: var(--c-brand);
}

/* Frequency table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-top: 20px;
}
table.freq {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 320px;
}
table.freq th,
table.freq td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.freq th {
  background: var(--c-bg);
  font-weight: 700;
  color: var(--c-ink-soft);
}
table.freq td.num,
table.freq th.num,
table.freq td.rank,
table.freq th.rank {
  text-align: right;
}
table.freq tr:last-child td {
  border-bottom: 0;
}
table.freq tbody tr:hover {
  background: #fafbff;
}
table.freq td.empty {
  text-align: center;
  color: var(--c-muted);
}
.rank {
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Case converter ---------- */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.btn-mode {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 11px 12px;
  background: #fff;
  color: var(--c-ink-soft);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-mode:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.btn-mode.active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}
.output-box {
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  min-height: 160px;
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
}

/* ---------- Info / content ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--c-ink-soft);
}
.prose h2 {
  color: var(--c-ink);
  font-size: 1.4rem;
  margin: 28px 0 10px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin: 6px 0;
}

/* ---------- About / Privacy ---------- */
.page-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 28px;
  margin: 20px auto 40px;
  max-width: 820px;
}
.page-card h2 {
  margin-top: 28px;
}
.page-card h2:first-child {
  margin-top: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: var(--c-ink-soft);
  font-weight: 600;
}
.disclaimer {
  font-size: 0.82rem;
  max-width: 720px;
}

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .mode-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .kw-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .kw-grid .field {
    grid-column: 1 / -1;
  }
}
@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ===== devstamp ===== */
/* DevStamp — global stylesheet
   Developer stamp / seal theme: vermilion "stamp ink" + dark slate editor. */


* { box-sizing: border-box; }

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

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

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

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 45%, var(--accent) 130%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 14px rgba(23, 27, 34, 0.14);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.2px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; border-radius: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; text-decoration: none; }
.site-nav a.active { background: rgba(255, 255, 255, 0.22); color: #fff; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 9px;
  text-decoration: none;
}
.lang-switch a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; text-decoration: none; }
.lang-switch a.on { background: #fff; color: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--primary-deep) 0%, var(--primary) 50%, var(--accent) 135%);
  color: #fff;
  padding: 44px 0 46px;
}
.hero .container { max-width: 860px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.4px;
}
.hero p {
  margin: 0;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 640px;
}

/* ---------- Layout ---------- */
main.container { padding: 32px 20px 48px; }

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 28px;
}

.tool-card h2 { margin: 0 0 18px; font-size: 1.25rem; font-weight: 700; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.field .hint { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

textarea,
input[type="text"],
input[type="number"] {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink);
  background: #fbfbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  resize: vertical;
}
textarea:focus, input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 61, 61, 0.12);
  background: #fff;
}

textarea.mono-output {
  background: var(--code-bg);
  color: var(--code-ink);
  border-color: var(--code-bg);
  min-height: 180px;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
textarea.mono-output:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(226, 61, 61, 0.18); background: var(--code-bg); }

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 16px;
}

.controls .opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.controls select {
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 14px rgba(226, 61, 61, 0.32); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--border); }
.btn-ghost:hover { background: #f3f4f6; border-color: #d1d5db; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.error-box {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 12px 0;
  word-break: break-word;
}
.error-box.visible { display: block; }

.result-label { font-weight: 600; font-size: 0.88rem; color: var(--ink-soft); margin: 16px 0 6px; }

/* ---------- Result chips (timestamp / cron / regex) ---------- */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.result-stat {
  background: #fbfbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.result-stat .label { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.result-stat .value { font-family: var(--mono); font-size: 0.92rem; color: var(--ink); word-break: break-all; }

/* ---------- Tables (cron parts, regex matches) ---------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 10px 0;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.3px; }
table.data-table td.mono { font-family: var(--mono); font-size: 0.86rem; }

.highlight-pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.9rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 10px 0 0;
}
.highlight-pre mark {
  background: #fbbf24;
  color: #1f2937;
  border-radius: 3px;
  padding: 0 1px;
}

.matches-list { list-style: none; margin: 10px 0; padding: 0; }
.matches-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.matches-list li .idx {
  font-family: var(--mono);
  color: var(--muted);
  min-width: 52px;
}
.matches-list li .mtxt { font-family: var(--mono); color: var(--primary-dark); word-break: break-all; }

/* ---------- Prose (usage notes / about / privacy) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; font-weight: 700; margin: 28px 0 10px; }
.prose h3 { font-size: 1.08rem; font-weight: 700; margin: 22px 0 8px; }
.prose p { color: var(--ink-soft); margin: 10px 0; }
.prose ul, .prose ol { color: var(--ink-soft); margin: 10px 0; padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose code {
  font-family: var(--mono);
  background: #eef0f3;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.86em;
  color: var(--primary-deep);
}
.prose a { font-weight: 600; }

/* ---------- Tool cross-links grid ---------- */
.tool-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.tool-link {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  text-decoration: none;
  transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}
.tool-link:hover { box-shadow: var(--shadow); border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.tool-link .t-name { font-weight: 700; color: var(--ink); display: block; margin-bottom: 2px; }
.tool-link .t-desc { font-size: 0.83rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 34px 0 40px;
  margin-top: 20px;
}
.site-footer .container { max-width: 1080px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.footer-links a { color: #e2e8f0; font-size: 0.88rem; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.disclaimer { font-size: 0.82rem; color: #94a3b8; margin: 10px 0; max-width: 720px; }
.site-footer .copy { font-size: 0.82rem; color: #94a3b8; margin: 6px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header .container { gap: 10px; }
  .site-nav { margin-left: 0; width: 100%; }
  .tool-card { padding: 18px; }
  .hero { padding: 34px 0 36px; }
}


/* ===== flightdelay ===== */
/* FlightDelayDesk — site stylesheet
 * Custom aviation theme (light sky background, navy + flight-blue primary,
 * amber accent for delays). No external frameworks. System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

.mono { font-family: var(--mono); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name { font-weight: 800; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a { padding: 6px 12px; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 14px; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 .accent { color: var(--primary); }
.hero .lede { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="text"], input[type="search"], input[type="number"], input[type="time"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

/* ---------- Metric bars / result cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.meter { display: block; border-radius: 5px; }

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0;
}
@media (min-width: 560px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .metric-grid { grid-template-columns: repeat(4, 1fr); } }

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.metric .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.metric .v { font-size: 1.35rem; font-weight: 800; margin-top: 4px; letter-spacing: -0.01em; }
.metric .v .unit { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.metric .meter { margin-top: 10px; }

.result-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-top: 20px;
}
.result-panel h3 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -0.01em; }
.result-panel .sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }

.route-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
}
.route-chip .arrow { color: var(--primary); }

.route-list { list-style: none; margin: 16px 0 0; padding: 0; }
.route-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
}
.route-list .rc { font-family: var(--mono); font-weight: 800; color: var(--ink); }
.route-list .rc .arrow { color: var(--primary); padding: 0 4px; }
.route-list .mini { font-size: 0.85rem; color: var(--muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.good { background: var(--green-soft); color: var(--green); }
.badge.mid { background: var(--accent-soft); color: var(--accent-strong); }
.badge.bad { background: var(--red-soft); color: var(--red); }

.good { color: var(--green); }
.mid { color: var(--accent-strong); }
.bad { color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.data-table thead th {
  text-align: left;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data-table thead th.sortable { cursor: pointer; user-select: none; }
table.data-table thead th.sortable:hover { color: var(--primary-strong); background: #dde9f6; }
table.data-table thead th .arrow { color: var(--primary); }
table.data-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: #f6fafd; }
.col-code { font-weight: 800; }
.col-num { text-align: right; font-variant-numeric: tabular-nums; }
thead th.col-num { text-align: right; }

/* ---------- Notes / disclaimers ---------- */
.demo-banner {
  font-size: 0.88rem;
  color: #7a4d08;
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 20px 0;
}
.demo-banner strong { color: #8a5a10; }

.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Arrival estimate ---------- */
.eta-box {
  text-align: center;
  background: var(--primary-soft);
  border: 1px solid #c9ddf6;
  border-radius: var(--radius);
  padding: 26px 20px;
  margin: 20px 0;
}
.eta-box .eta-label { font-size: 0.82rem; font-weight: 700; color: var(--primary-strong); text-transform: uppercase; letter-spacing: 0.05em; }
.eta-box .eta-value { font-family: var(--mono); font-size: 3rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.eta-box .eta-note { color: var(--ink-soft); font-size: 0.92rem; margin-top: 8px; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #0e2136;
  color: #c7d5e3;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #c7d5e3; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #8ba3ba;
  text-align: center;
}
.footer-bottom p { max-width: 760px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }


/* ===== grant ===== */
/* GrantFinder — site stylesheet
 * Custom education / scholarship theme (light indigo-tinted background,
 * scholarly indigo primary, warm gold accent). No external frameworks.
 * System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name {
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a { padding: 6px 12px; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 14px; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 .accent { color: var(--primary); }
.hero .lede { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0 40px;
}
@media (min-width: 820px) {
  .tool-grid.two { grid-template-columns: 1.15fr 0.85fr; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* ---------- Results / scholarship cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.scholar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .scholar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .scholar-grid { grid-template-columns: repeat(3, 1fr); } }

.scholar-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.scholar-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #efc68d; }
.scholar-card .name { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.3; }
.scholar-card .provider { color: var(--muted); font-size: 0.85rem; margin: 2px 0 10px; }
.scholar-card .amount {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-strong);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 10px;
}
.scholar-card .chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.scholar-card .more { margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.level { background: var(--primary-soft); color: var(--primary-strong); }
.chip.field { background: var(--accent-soft); color: var(--accent-strong); }
.chip.region { background: var(--surface-2); color: var(--muted); }
.chip.deadline { background: var(--teal-soft); color: var(--teal); }
.chip.renewable { background: var(--rose-soft); color: var(--rose); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Notes / disclaimers ---------- */
.note {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 16px;
}
.note strong { color: #8a5a10; }

.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Deadline calendar ---------- */
.month-block { margin-bottom: 22px; }
.month-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.month-heading .count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 2px 9px;
  border-radius: 999px;
}
.deadline-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.deadline-item:hover { text-decoration: none; box-shadow: var(--shadow); border-color: #efc68d; }
.deadline-item .dname { font-weight: 700; flex: 1 1 220px; }
.deadline-item .dmeta { color: var(--muted); font-size: 0.85rem; }
.deadline-item .damount { font-weight: 800; color: var(--primary-strong); font-variant-numeric: tabular-nums; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 8px 0 20px; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
}
.checklist li:hover { border-color: #efc68d; }
.checklist input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.checklist .item-label { font-weight: 600; color: var(--ink-soft); }
.checklist .item-hint { color: var(--muted); font-size: 0.82rem; }
.checklist li.done { background: var(--primary-soft); border-color: #efc68d; }
.checklist li.optional { background: #fbfbfe; }
.checklist .optional-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.progress-wrap { margin: 18px 0 8px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.progress-bar {
  height: 12px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ---------- Scholarship detail (landing) pages ---------- */
.scholar-hero { padding: 40px 0 20px; }
.scholar-hero .eyebrow { margin-bottom: 10px; }
.scholar-hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 8px; letter-spacing: -0.03em; }
.scholar-hero .sub { color: var(--muted); font-size: 1.05rem; }

.fact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 22px 0;
}
@media (min-width: 640px) { .fact-cards { grid-template-columns: 1fr 1fr; } }
.fact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.fact-card .pk { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact-card .pv { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.fact-card.amount .pv { color: var(--primary-strong); }
.fact-card.deadline .pv { color: var(--teal); }
.fact-card .ps { color: var(--muted); font-size: 0.82rem; }

.fact-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.fact { flex: 1; min-width: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.fact .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 12px 0 0; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  margin-bottom: 10px;
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.step-list .step-title { font-weight: 700; color: var(--ink); }
.step-list p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }

.sibling-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sibling-links a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
  text-decoration: none;
}
.sibling-links a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #171a2e;
  color: #efc68d;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #efc68d; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #9296b5;
  text-align: center;
}
.footer-bottom p { max-width: 760px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }


/* ===== outage ===== */
/* OutageBoard — custom status-board theme (no external frameworks). */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- *
 * Header
 * ---------------------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.brand-name span { color: var(--brand); }

.main-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.main-nav a {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.main-nav a:hover { background: var(--bg); color: var(--text); }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); }

.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  background: var(--bg);
}
.lang-switch a {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

/* ---------------------------------------------------------------- *
 * Demo-data banner
 * ---------------------------------------------------------------- */

.demo-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 7px 20px;
}
.demo-banner .dot { margin-right: 6px; }
.demo-banner .dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  vertical-align: baseline;
  margin-right: 6px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------------------------------------------------------------- *
 * Hero
 * ---------------------------------------------------------------- */

.hero {
  background: linear-gradient(135deg, #f7e7cf 0%, #f5f7fb 45%, #e9f2ea 100%);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 38px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.hero h1 .accent { color: var(--brand); }
.hero .lede {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0;
}

/* ---------------------------------------------------------------- *
 * Sections & cards
 * ---------------------------------------------------------------- */

.section { padding: 36px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h2 { margin-top: 0; }

.muted { color: var(--muted); }
.lead { font-size: 1.05rem; color: var(--text-soft); }

.prose { max-width: 780px; }
.prose h2 { margin: 0 0 12px; font-size: 1.35rem; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.1rem; }
.prose p { color: var(--text-soft); }
.prose ul { color: var(--text-soft); padding-left: 1.3em; }
.prose li { margin: 6px 0; }

/* ---------------------------------------------------------------- *
 * Health badge (overall status)
 * ---------------------------------------------------------------- */

.health-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.health-badge > .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.health-text { display: flex; flex-direction: column; }
.health-summary { font-weight: 800; font-size: 1.1rem; }
.health-counts { font-size: 0.88rem; color: var(--muted); }

.health-operational { border-left: 4px solid var(--op); }
.health-operational > .dot { background: var(--op); }
.health-degraded { border-left: 4px solid var(--dg); }
.health-degraded > .dot { background: var(--dg); }
.health-partial-outage { border-left: 4px solid var(--po); }
.health-partial-outage > .dot { background: var(--po); }
.health-major-outage { border-left: 4px solid var(--mo); }
.health-major-outage > .dot { background: var(--mo); }

/* ---------------------------------------------------------------- *
 * Status dots & pills
 * ---------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

.status-operational { background: var(--op-bg); color: var(--op-strong); }
.status-operational .dot { background: var(--op); }
.status-degraded { background: var(--dg-bg); color: var(--dg-strong); }
.status-degraded .dot { background: var(--dg); }
.status-partial-outage { background: var(--po-bg); color: var(--po-strong); }
.status-partial-outage .dot { background: var(--po); }
.status-major-outage { background: var(--mo-bg); color: var(--mo-strong); }
.status-major-outage .dot { background: var(--mo); }

/* ---------------------------------------------------------------- *
 * Service grid
 * ---------------------------------------------------------------- */

.status-group { margin-bottom: 30px; }
.group-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.service-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.service-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }

.service-card-meta { display: flex; align-items: center; gap: 10px; }
.uptime { display: flex; align-items: center; gap: 8px; }
.uptime-badge {
  font-weight: 800;
  font-size: 0.82rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.uptime-green { background: var(--op-bg); color: var(--op-strong); }
.uptime-yellow { background: var(--dg-bg); color: var(--dg-strong); }
.uptime-red { background: var(--mo-bg); color: var(--mo-strong); }
.uptime-label { font-size: 0.78rem; color: var(--muted); }

.service-card-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}

/* ---------------------------------------------------------------- *
 * Badges (severity)
 * ---------------------------------------------------------------- */

.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-minor { background: #eff6ff; color: #1d4ed8; }
.badge-major { background: #fffbeb; color: #b45309; }
.badge-critical { background: var(--mo-bg); color: var(--mo-strong); }

/* ---------------------------------------------------------------- *
 * Filters & forms
 * ---------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.8rem; font-weight: 700; color: var(--text-soft); }
.field select {
  font: inherit;
  font-size: 0.92rem;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-width: 200px;
}

.result-count { font-size: 0.88rem; color: var(--muted); margin: 0 0 10px; }

/* ---------------------------------------------------------------- *
 * Incident table
 * ---------------------------------------------------------------- */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.incident-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.incident-table thead th {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.incident-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.incident-table tbody tr:last-child td { border-bottom: none; }
.incident-table tbody tr:hover { background: #fafbfd; }

.table-service { font-weight: 700; color: var(--brand); }
.incident-title { display: block; font-weight: 600; color: var(--text); }
.incident-date { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.resolved { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.resolved.resolved { color: var(--op-strong); }
.resolved.ongoing { color: var(--mo-strong); }

.empty-state {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 30px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.disclaimer {
  background: var(--brand-soft);
  border: 1px solid #f7e7cf;
  color: #3730a3;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-top: 20px;
}

/* ---------------------------------------------------------------- *
 * Incident list (service detail pages)
 * ---------------------------------------------------------------- */

.incident-list { list-style: none; margin: 0; padding: 0; }
.incident-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--surface);
}
.incident-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.incident-item-title { font-weight: 700; }
.incident-item-meta { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.incident-item-summary { margin: 8px 0 0; font-size: 0.9rem; color: var(--text-soft); }

/* ---------------------------------------------------------------- *
 * Uptime calculator
 * ---------------------------------------------------------------- */

.nines-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.nines-chip {
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.12s ease;
}
.nines-chip:hover { border-color: var(--brand); }
.nines-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.nines-chip .chip-sub { font-size: 0.72rem; font-weight: 600; opacity: 0.75; }

.downtime-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.downtime-table thead th {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 11px 14px;
  border-bottom: 2px solid var(--border);
}
.downtime-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.downtime-table tbody tr.selected { background: var(--brand-soft); }
.downtime-table tbody tr.selected td:first-child { font-weight: 800; color: var(--brand); }

.result-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7e7cf, #f5f7fb);
  border: 1px solid #f7e7cf;
}
.result-line { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand); }
.result-big { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.01em; }
.result-sub { font-size: 0.9rem; color: var(--muted); }

/* ---------------------------------------------------------------- *
 * News
 * ---------------------------------------------------------------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.news-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.news-card .news-meta { font-size: 0.78rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; }
.news-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.news-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.news-card .news-read { font-weight: 700; color: var(--brand); font-size: 0.86rem; margin-top: auto; }

.article { max-width: 760px; }
.article .article-meta { font-size: 0.84rem; color: var(--muted); margin-bottom: 8px; }
.article h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 16px; }
.article p { color: var(--text-soft); font-size: 1.02rem; }
.article h2 { font-size: 1.3rem; margin: 28px 0 10px; letter-spacing: -0.01em; }
.article .article-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-top: 26px;
}

/* ---------------------------------------------------------------- *
 * Footer
 * ---------------------------------------------------------------- */

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 40px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 28px;
}
.site-footer h4 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px; }
.site-footer a { display: block; color: #cbd5e1; margin: 6px 0; font-size: 0.9rem; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { font-size: 0.88rem; color: #94a3b8; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 18px 20px;
  text-align: center;
}
.footer-bottom p { margin: 6px 0; font-size: 0.82rem; color: #64748b; }

/* ---------------------------------------------------------------- *
 * Responsive
 * ---------------------------------------------------------------- */

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .main-nav { order: 3; width: 100%; justify-content: center; margin-left: 0; }
  .lang-switch { margin-left: auto; }
  .hero { padding: 30px 0 26px; }

  .incident-table, .incident-table tbody, .incident-table tr, .incident-table td {
    display: block;
    width: 100%;
  }
  .incident-table thead { display: none; }
  .incident-table tbody tr {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .incident-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: none;
    padding: 6px 14px;
  }
  .incident-table tbody td::before {
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    flex: 0 0 auto;
  }
  .table-wrap { border: none; background: transparent; box-shadow: none; }
}


/* ===== patent ===== */
/* PatentPulse — site stylesheet
 * Custom "patent / light bulb" theme: warm paper background, indigo primary,
 * amber (light-bulb) accent. No external frameworks. System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name { font-weight: 800; font-size: 1.18rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a { padding: 6px 12px; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 36px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 0 14px; letter-spacing: -0.03em; line-height: 1.12; }
.hero h1 .accent { color: var(--primary); }
.hero .lede { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

/* ---------- Results / patent cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.patent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .patent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .patent-grid { grid-template-columns: repeat(3, 1fr); } }

.patent-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.patent-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #d5cff0; }
.patent-card .pid { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--primary); letter-spacing: 0.03em; }
.patent-card .title { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; margin-top: 4px; }
.patent-card .assignee { color: var(--muted); font-size: 0.88rem; margin: 2px 0 10px; }
.patent-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.patent-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; font-size: 0.8rem; color: var(--muted); }
.patent-card .more { margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.field { background: var(--accent-soft); color: var(--accent-strong); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.granted { background: var(--green-soft); color: var(--green); }
.badge.pending { background: var(--accent-soft); color: var(--accent-strong); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Notes / disclaimers ---------- */
.demo-banner {
  font-size: 0.88rem;
  color: #7a4d08;
  background: var(--accent-soft);
  border: 1px solid #f3dfb6;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 20px 0;
}
.demo-banner strong { color: #8a5a10; }

.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Field / category cards ---------- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .field-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .field-grid { grid-template-columns: repeat(3, 1fr); } }

.field-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.field-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.field-card h3 { margin: 0 0 8px; font-size: 1.2rem; letter-spacing: -0.01em; }
.field-card p { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.field-card .count { font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

/* ---------- Patent detail pages ---------- */
.patent-hero { padding: 40px 0 20px; text-align: left; }
.patent-hero .eyebrow { margin-bottom: 10px; }
.patent-hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 0 8px; letter-spacing: -0.03em; }
.patent-hero .sub { color: var(--muted); font-size: 1.05rem; }

.fact-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.fact {
  flex: 1;
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.fact .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 1.05rem; font-weight: 700; margin-top: 4px; word-break: break-word; }

.abstract-box {
  background: var(--primary-soft);
  border: 1px solid #d8d2f5;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 18px 0;
}
.abstract-box h3 { margin: 0 0 8px; color: var(--primary-strong); }
.abstract-box p { margin: 0; color: var(--ink-soft); }

.inventor-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 18px 0;
}
.inventor-box h3 { margin: 0 0 8px; color: var(--ink-soft); }
.inventor-box p { margin: 0; color: var(--ink-soft); }

.steps { counter-reset: step; list-style: none; margin: 18px 0; padding: 0; }
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 16px 60px;
  margin-bottom: 12px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li p { margin: 0; color: var(--ink-soft); }

.sibling-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sibling-links a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
  text-decoration: none;
}
.sibling-links a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------- Timeline (guide) ---------- */
.timeline-svg { width: 100%; height: auto; display: block; margin: 18px 0; }
.timeline-svg text { font-family: var(--font); }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #241f3a;
  color: #efc68d;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #efc68d; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #9f97bb;
  text-align: center;
}
.footer-bottom p { max-width: 760px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }


/* ===== weather ===== */
/* WeatherRisk — site stylesheet
 * Custom weather theme (light sky-blue background, storm-navy primary,
 * sun-amber accent). No external frameworks. System font stack.
 */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

img, svg { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.brand-name {
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.active { background: var(--primary); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 52px 0 36px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.hero h1 .accent { color: var(--primary); }
.hero .lede {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); box-shadow: 0 6px 18px rgba(21, 105, 214, 0.3); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* ---------- Results / city cards ---------- */
.result-count { color: var(--muted); font-size: 0.9rem; margin: 4px 0 16px; }

.city-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .city-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }

.city-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.city-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: #bcd3ee; }
.city-card .city-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.city-card .city-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.city-card .region { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.score-badge.lv-low { background: var(--low-soft); color: var(--low); }
.score-badge.lv-moderate { background: var(--moderate-soft); color: var(--accent-strong); }
.score-badge.lv-high { background: var(--high-soft); color: var(--high); }

/* mini risk bars on a card */
.mini-bars { display: flex; flex-direction: column; gap: 5px; margin: 14px 0; }
.mini-row { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 8px; font-size: 0.76rem; }
.mini-row .k { color: var(--muted); font-weight: 600; text-align: right; }
.mini-row .track { background: var(--surface-2); border-radius: 4px; height: 7px; overflow: hidden; }
.mini-row .fill { height: 100%; border-radius: 4px; }
.fill.lv-low { background: var(--low); }
.fill.lv-moderate { background: var(--moderate); }
.fill.lv-high { background: var(--high); }
.mini-row .v { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 700; }

.city-card .temps { color: var(--muted); font-size: 0.82rem; margin: 2px 0 10px; }
.city-card .more { margin-top: 8px; font-size: 0.85rem; font-weight: 700; color: var(--primary-strong); }

/* ---------- Notes / disclaimers ---------- */
.disclaimer {
  font-size: 0.86rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}
.disclaimer strong { color: var(--ink-soft); }
.disclaimer.warn { background: var(--accent-soft); border-color: #f3dfb6; }
.disclaimer.warn strong { color: #8a5a10; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Sections ---------- */
.section { padding: 26px 0 46px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; letter-spacing: -0.01em; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Tables (ranking / compare) ---------- */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  background: #fff;
}
table.data th, table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.data th { background: var(--surface-2); font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
table.data tr:hover td { background: #f8fbfe; }
table.data .rank { color: var(--muted); font-weight: 700; width: 44px; }
table.data td.city-cell a { font-weight: 700; color: var(--ink); }
table.data td.city-cell a:hover { color: var(--primary-strong); }
table.data .lvl { font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.lvl.lv-low { background: var(--low-soft); color: var(--low); }
.lvl.lv-moderate { background: var(--moderate-soft); color: var(--accent-strong); }
.lvl.lv-high { background: var(--high-soft); color: var(--high); }

/* risk bar in tables / compare */
.bar { background: var(--surface-2); border-radius: 4px; height: 8px; min-width: 120px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; }

/* ---------- Compare ---------- */
.compare-select { margin-bottom: 18px; }
.compare-table-wrap { overflow-x: auto; margin-top: 8px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: #fff; }
table.compare th, table.compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.compare th { background: var(--surface-2); font-weight: 700; color: var(--ink-soft); }
table.compare td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
table.compare td.label { color: var(--muted); font-weight: 600; width: 150px; }
.compare-bars { display: flex; gap: 10px; align-items: center; }
.compare-bars .bar { flex: 1; }
.compare-bars .val { width: 40px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.88rem; }

/* ---------- City detail pages ---------- */
.city-hero { padding: 40px 0 20px; }
.city-hero .eyebrow { margin-bottom: 10px; }
.city-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 8px; letter-spacing: -0.03em; }
.city-hero .sub { color: var(--muted); font-size: 1.05rem; }

.risk-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 22px 0;
}
@media (min-width: 560px) { .risk-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .risk-cards { grid-template-columns: repeat(3, 1fr); } }
.risk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.risk-card .rk { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.risk-card .rk .name { font-weight: 700; font-size: 0.95rem; }
.risk-card .rk .lvl { font-size: 0.72rem; }
.risk-card .bar { height: 10px; }
.risk-card .rval { margin-top: 8px; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.risk-card .rval small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.score-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}
.score-panel .big {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.score-panel .big.lv-low { color: var(--low); }
.score-panel .big.lv-moderate { color: var(--accent-strong); }
.score-panel .big.lv-high { color: var(--high); }
.score-panel .meta { color: var(--muted); font-size: 0.9rem; }

.fact-strip { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.fact {
  flex: 1;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.fact .k { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact .v { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }

/* events */
.event-list { list-style: none; padding: 0; margin: 14px 0 0; }
.event-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.event-item .e-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-item .e-year { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.event-item .e-title { font-weight: 700; }
.event-item .e-impact { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }

/* prep steps */
.prep-steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0 0; }
.prep-steps li {
  position: relative;
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 16px 16px 58px;
  margin-bottom: 12px;
}
.prep-steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.prep-steps li .t { font-weight: 700; }
.prep-steps li .d { color: var(--muted); font-size: 0.9rem; }

.sibling-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sibling-links a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-strong);
  text-decoration: none;
}
.sibling-links a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---------- News ---------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-card .meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.article-card h2 { margin: 8px 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.article-card p { margin: 0; color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.article-body { max-width: 760px; margin: 0 auto; }
.article-body h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px; }
.article-body .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }
.article-body h2 { margin-top: 1.7em; }
.article-body p { color: var(--ink-soft); font-size: 1.04rem; }
.article-body .callout {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #12233a;
  color: #c6d3de;
  padding: 40px 0 32px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.footer-col h4 { color: #fff; margin: 0 0 10px; font-size: 0.95rem; }
.footer-col a { color: #c6d3de; display: block; padding: 3px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.85rem; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #93a3b5;
  text-align: center;
}
.footer-bottom p { max-width: 720px; margin: 6px auto; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 18px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 32px 0; border: 0; }
.error-msg { color: #b0402c; font-size: 0.9rem; font-weight: 600; margin-top: 12px; display: none; }
.error-msg.show { display: block; }

/* cream caramel contrast lock — must stay last */
body {
  color: var(--text-primary);
  background-color: var(--bg-page);
}
.od-content,
.od-content .container,
.od-content main,
.od-content .hero,
.od-content .hero h1,
.od-content .hero h2,
.od-content .hero p,
.od-content .lede,
.od-content .lead {
  color: var(--text-primary);
}
.od-content .hero p,
.od-content .lede,
.od-content .lead,
.od-content .muted,
.od-content .hint {
  color: var(--text-secondary);
}
.od-content a { color: var(--link); }
.od-content .btn,
.od-content button.btn,
.od-content .btn-primary,
.od-content button[type="submit"] {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-color: transparent;
}
.od-content .btn-reset,
.od-content .btn-secondary,
.od-content button[type="reset"] {
  background: var(--primary-subtle);
  color: var(--link);
  border-color: transparent;
}
.od-content input,
.od-content select,
.od-content textarea {
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--border-strong);
}
.od-content label,
.od-content .label,
.od-content th,
.od-content td {
  color: var(--text-primary);
}
.od-topbar { background: color-mix(in oklab, var(--bg-surface) 92%, transparent); }
.od-brand, .od-side-group a { color: var(--text-primary); }
.od-side-title { color: var(--text-secondary); }
.od-side-group a.od-active,
.od-side-group a:hover { color: var(--link); background: var(--primary-subtle); }

/* hero is a light band; later legacy sheets painted it pale and left color:#fff */
.od-content .hero:not(.tile) {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-bottom-color: var(--border);
}
.od-content .hero:not(.tile) :is(h1, h2, h3, .eyebrow, .stat, .stat b) {
  color: var(--text-primary);
  background: none;
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentcolor;
}
.od-content .hero:not(.tile) :is(p, .lede, .lead, .stat) {
  color: var(--text-secondary);
  -webkit-text-fill-color: currentcolor;
}

/* ---------- Fix: number inputs too narrow, term-unit select too wide (2026-10-17) ---------- */
.form-grid .field input[type="number"] {
  width: 100%;
  min-width: 140px;
}
.input-group input[type="number"] {
  flex: 1 1 auto;
  min-width: 120px;
}
.input-group select,
.field .input-group select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: 96px;
  padding-left: 10px;
  padding-right: 10px;
}

/* SEO: breadcrumb and related links */
.od-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--c-muted);
}
.od-crumb a { color: var(--c-brand); text-decoration: none; }
.od-crumb a:hover { text-decoration: underline; }
.od-related {
  margin: 28px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border);
}
.od-related h2 { font-size: 1.05rem; margin: 0 0 10px; }
.od-related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.od-related a { color: var(--c-brand); }
