/* TechCalcu 2026 redesign — loaded after style.css.
   Clean slate + one blue accent, line icons, no gradients. */

:root {
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 14px 28px -16px rgba(15, 23, 42, 0.28);
  --header-bg: rgba(255, 255, 255, 0.96);
  --header-border: #e2e8f0;
  --input-border: #cbd5e1;
  --input-focus: #2563eb;
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --accent-gradient: linear-gradient(#2563eb, #2563eb);
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --tc-blue-bg: #eff6ff;   --tc-blue-fg: #1d4ed8;
  --tc-orange-bg: #fff7ed; --tc-orange-fg: #c2410c;
  --tc-green-bg: #ecfdf5;  --tc-green-fg: #047857;
  --tc-violet-bg: #f5f3ff; --tc-violet-fg: #6d28d9;
  --tc-slate-bg: #f1f5f9;  --tc-slate-fg: #334155;
}

[data-theme="dark"] {
  --bg-primary: #0b1120;
  --bg-secondary: #111a2e;
  --bg-tertiary: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #a8b3c4;
  --text-muted: #94a3b8;
  --border-color: #26324a;
  --card-bg: #111a2e;
  --header-bg: rgba(11, 17, 32, 0.96);
  --header-border: #26324a;
  --input-bg: #111a2e;
  --input-border: #334155;
  --input-focus: #60a5fa;
  --primary-500: #60a5fa;
  --primary-600: #93c5fd;
  --primary-700: #bfdbfe;
  --accent-gradient: linear-gradient(#3b82f6, #3b82f6);
  --ink: #e2e8f0;
  --ink-soft: #cbd5e1;
  --tc-blue-bg: #172554;   --tc-blue-fg: #93c5fd;
  --tc-orange-bg: #431407; --tc-orange-fg: #fdba74;
  --tc-green-bg: #052e2b;  --tc-green-fg: #6ee7b7;
  --tc-violet-bg: #2e1065; --tc-violet-fg: #c4b5fd;
  --tc-slate-bg: #1e293b;  --tc-slate-fg: #cbd5e1;
}

h1, h2, h3 { letter-spacing: -0.02em; }

/* ---------- Header ---------- */
.header { background-color: var(--header-bg); }
.logo { font-weight: 800; letter-spacing: -0.02em; }
.logo-icon, .footer-logo .logo-icon {
  background: var(--ink);
  color: var(--bg-primary);
  font-weight: 800;
}
.nav-link { color: var(--text-secondary); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link::after { background: var(--primary-500); }
.theme-toggle-icon { display: flex; color: var(--text-muted); }
.menu-toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
@media (max-width: 768px) {
  .nav-links { align-items: stretch; }
  .nav-links .nav-link { display: block; padding: 12px 4px; font-size: 1rem; }
}

/* ---------- Buttons ---------- */
.btn { gap: 8px; border-radius: 10px; font-weight: 600; box-shadow: none; }
.btn .tc-icon { flex: none; }
.btn-primary { background: #2563eb; color: #fff; box-shadow: none; }
.btn-primary:hover { background: #1d4ed8; color: #fff; transform: none; box-shadow: none; }
[data-theme="dark"] .btn-primary { background: #3b82f6; color: #0b1120; }
[data-theme="dark"] .btn-primary:hover { background: #60a5fa; color: #0b1120; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-outline { background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--input-border); }
.btn-outline:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--input-border); }
.tc-btn-dark { background: var(--ink); color: var(--bg-primary); border: 0; }
.tc-btn-dark:hover { opacity: 0.9; color: var(--bg-primary); }
.tc-btn-light { background: #fff; color: #0f172a; height: 48px; padding: 0 20px; margin-top: 8px; }
.tc-btn-light:hover { background: #e2e8f0; color: #0f172a; }

/* ---------- Cards (existing pages) ---------- */
.card { border: 1px solid var(--border-color); box-shadow: var(--card-shadow); border-radius: 14px; }
.card:hover { transform: none; box-shadow: var(--card-shadow-hover); }
.card-icon { background: var(--tc-blue-bg); color: var(--tc-blue-fg); box-shadow: none; }
.page-header { background: var(--bg-primary); border-bottom: 1px solid var(--border-color); }
.hero-title { background: none; -webkit-text-fill-color: currentColor; color: var(--text-primary); }
.calculator-container { border-radius: 16px; box-shadow: var(--card-shadow); border: 1px solid var(--border-color); }
.calculator-result-value { font-family: var(--font-mono); letter-spacing: -0.02em; }
.tag-primary { background: var(--tc-blue-bg); color: var(--tc-blue-fg); }

/* ---------- Shared layout ---------- */
.tc-section { padding: 72px 0; background: var(--bg-secondary); }
.tc-section--tight { padding: 40px 0 72px; }
.tc-section--tint { background: var(--bg-primary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.tc-section--tint .tc-guide { background: var(--bg-secondary); }
.tc-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.tc-h2 { margin: 0; font-size: 2.1rem; font-weight: 800; }
.tc-h3 { margin: 0 0 16px; font-size: 1.35rem; font-weight: 800; }
.tc-sub { margin: 8px 0 0; font-size: 1.05rem; color: var(--text-secondary); }
.tc-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary-600); }
.tc-note { margin-top: 32px; color: var(--text-secondary); }
.tc-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary-600); }
.tc-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ink-soft); color: var(--bg-primary); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.tc-avatar--light { background: #93c5fd; color: #0f172a; width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.tc-hero { background: var(--bg-primary); border-bottom: 1px solid var(--border-color); }
.tc-hero-inner { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.tc-hero-copy { flex: 1 1 460px; min-width: 0; }
.tc-eyebrow { margin: 0 0 16px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary-600); }
.tc-hero-title { margin: 0; font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; color: var(--text-primary); }
.tc-hero-lead { margin: 24px 0 0; font-size: 1.15rem; line-height: 1.65; max-width: 560px; color: var(--text-secondary); }
.tc-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tc-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 32px 0 0; padding: 0; font-size: 0.9rem; color: var(--text-secondary); }
.tc-trust li { display: flex; align-items: center; gap: 8px; }
.tc-trust .tc-icon { color: var(--tc-green-fg); }
.tc-trust a { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--border-color); text-underline-offset: 3px; }
.tc-trust a:hover { color: var(--text-primary); }

/* Hero quick checker */
.tc-check { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 8px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 16px; padding: 28px; box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.35); }
.tc-check-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tc-check-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.tc-badge { font-size: 0.75rem; font-weight: 700; color: var(--tc-green-fg); background: var(--tc-green-bg); padding: 4px 10px; border-radius: 999px; }
.tc-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-top: 6px; }
.tc-check .form-select { height: 48px; padding: 0 12px; line-height: 1.3; }
.tc-seg { border: 0; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tc-seg legend { grid-column: 1 / -1; margin-bottom: 6px; padding: 0; }
.tc-seg label { position: relative; }
.tc-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tc-seg span { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px; background: var(--bg-tertiary); font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); border: 1px solid transparent; }
.tc-seg input:checked + span { background: var(--bg-primary); color: var(--text-primary); border-color: var(--input-border); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.tc-seg input:focus-visible + span { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.tc-check .btn { margin-top: 14px; width: 100%; }
.tc-check-result { margin-top: 16px; padding: 16px 18px; border-radius: 12px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.tc-check-result[hidden] { display: none; }
.tc-check-num { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; min-width: 2.5ch; }
.tc-check-verdict { font-weight: 700; color: var(--text-primary); }
.tc-check-note { font-size: 0.875rem; color: var(--text-secondary); margin-top: 2px; }
.tc-check-result.is-good .tc-check-num { color: var(--tc-green-fg); }
.tc-check-result.is-mid .tc-check-num { color: var(--tc-blue-fg); }
.tc-check-result.is-warn { background: var(--tc-orange-bg); border-color: transparent; }
.tc-check-result.is-warn .tc-check-num { color: var(--tc-orange-fg); }

/* ---------- Tool cards ---------- */
.tc-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tc-tool { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px; color: var(--text-primary); transition: border-color 150ms ease, box-shadow 150ms ease; }
.tc-tool:hover { color: var(--text-primary); border-color: var(--input-border); box-shadow: var(--card-shadow-hover); }
.tc-tool:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.tc-tool-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tc-tool-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tc-tool-title { font-weight: 700; font-size: 1.05rem; }
.tc-tool-desc { font-size: 0.95rem; line-height: 1.5; color: var(--text-secondary); }
.tc-tone-blue { background: var(--tc-blue-bg); color: var(--tc-blue-fg); }
.tc-tone-orange { background: var(--tc-orange-bg); color: var(--tc-orange-fg); }
.tc-tone-green { background: var(--tc-green-bg); color: var(--tc-green-fg); }
.tc-tone-violet { background: var(--tc-violet-bg); color: var(--tc-violet-fg); }
.tc-tone-slate { background: var(--tc-slate-bg); color: var(--tc-slate-fg); }
.tc-tool-group { margin-bottom: 40px; scroll-margin-top: 96px; }

/* Chips */
.tc-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 28px; }
.tc-chips--left { justify-content: flex-start; }
.page-header .tc-chips { justify-content: center; }
.tc-chips-label { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-right: 4px; }
.tc-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--bg-primary); border: 1px solid var(--border-color); color: var(--text-primary); font-size: 0.9rem; font-weight: 600; }
.tc-chip:hover { border-color: var(--input-border); color: var(--text-primary); }
.tc-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg-primary); }

/* ---------- Guide cards ---------- */
.tc-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.tc-guide { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; transition: box-shadow 150ms ease, border-color 150ms ease; }
.tc-guide:hover { box-shadow: var(--card-shadow-hover); border-color: var(--input-border); }
.tc-guide-link { display: flex; flex-direction: column; height: 100%; color: var(--text-primary); }
.tc-guide-link:hover { color: var(--text-primary); }
.tc-guide-link:focus-visible { outline: 2px solid var(--primary-500); outline-offset: -2px; }
.tc-guide-media { display: block; aspect-ratio: 16 / 9; background: var(--bg-tertiary); overflow: hidden; }
.tc-guide-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-guide-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.tc-guide-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; flex: 1; }
.tc-guide-title { font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.tc-guide-excerpt { font-size: 0.95rem; line-height: 1.55; color: var(--text-secondary); }
.tc-guide-meta { margin-top: auto; font-size: 0.85rem; color: var(--text-muted); }
.tc-guide--large { margin-bottom: 24px; }
.tc-guide--large .tc-guide-link { flex-direction: row; flex-wrap: wrap; }
.tc-guide--large .tc-guide-media { flex: 1 1 520px; min-width: 0; }
.tc-guide--large .tc-guide-body { flex: 1 1 340px; min-width: 0; justify-content: center; padding: 32px 36px; gap: 14px; }
.tc-guide--large .tc-guide-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.tc-guide--large .tc-guide-meta { margin-top: 0; }
.tc-pagination { margin-top: 40px; text-align: center; }

/* ---------- Trust band ---------- */
.tc-band { background: #0f172a; color: #cbd5e1; border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; gap: 40px; }
[data-theme="dark"] .tc-band { background: #111a2e; border: 1px solid var(--border-color); }
.tc-band h2 { color: #fff; margin: 0; font-size: 1.85rem; font-weight: 800; }
.tc-band p { color: #cbd5e1; }
.tc-band-intro { flex: 1 1 300px; min-width: 0; }
.tc-band-intro p { margin: 14px 0 16px; line-height: 1.65; }
.tc-band-grid { flex: 2 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.tc-band-item { background: #1e293b; border-radius: 14px; padding: 22px; }
.tc-band-item .tc-icon { color: #93c5fd; }
.tc-band-item h3 { color: #fff; font-size: 1.05rem; margin: 14px 0 6px; }
.tc-band-item p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.tc-band-item a { color: #93c5fd; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-primary); border-top: 1px solid var(--border-color); }

/* ---------- Guide article extras ---------- */
.tpl-quick-answer { border-left-color: var(--primary-500) !important; }

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  .tc-section { padding: 48px 0; }
  .tc-hero-inner { padding-top: 40px; padding-bottom: 48px; gap: 32px; }
  .tc-h2 { font-size: 1.65rem; }
  .tc-band { padding: 28px 22px; }
  .tc-guide--large .tc-guide-body { padding: 22px; }
  .tc-guide--large .tc-guide-title { font-size: 1.35rem; }
  .tc-tools { grid-template-columns: 1fr; }
  .tc-tool { padding: 14px; align-items: center; }
  .tc-tool-icon { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .tc-check { padding: 20px; }
  .tc-hero-actions .btn { width: 100%; }
}
