/* =============================================
   KalkulatorNadgodzin – Design System
   OKLCH Midnight Blue + Emerald Dark Theme
   Fonts: Syne (headings) + DM Sans (body)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Custom Properties ── */
:root {
  --bg:            oklch(0.14 0.02 240);
  --card:          oklch(0.18 0.02 240);
  --muted:         oklch(0.22 0.02 240);
  --input:         oklch(0.22 0.02 240);
  --sidebar:       oklch(0.16 0.02 240);
  --fg:            oklch(0.98 0.01 240);
  --fg-muted:      oklch(0.70 0.02 240);
  --card-fg:       oklch(0.98 0.01 240);
  --primary:       oklch(0.65 0.15 150);
  --primary-fg:    oklch(0.10 0.05 150);
  --primary-hover: oklch(0.72 0.16 150);
  --accent:        oklch(0.85 0.15 80);
  --accent-muted:  oklch(0.85 0.15 80 / 0.12);
  --secondary:     oklch(0.25 0.05 150);
  --border:        oklch(0.25 0.03 240);
  --ring:          oklch(0.65 0.15 150);
  --danger:        oklch(0.65 0.20 25);
  --success:       oklch(0.65 0.15 150);

  --font-sans:  'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head:  'Syne', sans-serif;
  --font-mono:  'JetBrains Mono', 'Geist Mono', monospace;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --shadow-sm:  0 1px 3px oklch(0 0 0 / 0.3);
  --shadow:     0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg:  0 12px 40px oklch(0 0 0 / 0.5);

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1100px;
  --header-h:  64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Subtle dot pattern */
  background-image: radial-gradient(circle, oklch(0.30 0.03 240 / 0.25) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--fg-muted); }
strong { color: var(--fg); font-weight: 600; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: oklch(0.14 0.02 240 / 0.92);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
}

.logo-text span { color: var(--primary); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--fg);
  background: var(--muted);
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-fg);
  background: var(--primary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-cta:hover { background: var(--primary-hover); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hamburger:hover { background: var(--muted); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem 1rem;
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { font-size: 1rem; padding: 0.6rem 0.5rem; }
.mobile-menu .nav-cta { margin-top: 0.5rem; text-align: center; padding: 0.6rem; }

/* ── Hero / Page Banner ── */
.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 65%);
  opacity: 0.06;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--secondary);
  border: 1px solid oklch(0.65 0.15 150 / 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: 1.05rem; max-width: 640px; margin-bottom: 1.5rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--fg-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: oklch(0.40 0.02 240); }
.breadcrumb .current { color: var(--fg); }

/* ── Main Layout ── */
main { flex: 1; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 4rem;
}

.page-grid.wide { grid-template-columns: 1fr; max-width: 820px; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card-sm { padding: 1.25rem; }
.card-lg { padding: 2.25rem; }

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  width: 42px;
  height: 42px;
  background: var(--secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.card-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.card-subtitle { font-size: 0.82rem; color: var(--fg-muted); }

/* ── Calculator Widget ── */
.calc-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.calc-header {
  background: var(--secondary);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calc-header-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-fg);
}

.calc-header-text { flex: 1; }
.calc-header-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}
.calc-header-sub { font-size: 0.78rem; color: var(--fg-muted); }

.calc-body { padding: 1.5rem; }

.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  font-family: var(--font-mono);
  color: var(--fg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -moz-appearance: textfield;
}
.form-input::-webkit-inner-spin-button,
.form-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.form-input::placeholder { color: oklch(0.45 0.02 240); font-family: var(--font-sans); font-size: 0.9rem; }
.form-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.65 0.15 150 / 0.15);
}
.form-input.error { border-color: var(--danger); }

.form-select {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--fg);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='oklch(0.70 0.02 240)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.form-select:focus { border-color: var(--ring); box-shadow: 0 0 0 3px oklch(0.65 0.15 150 / 0.15); }
.form-select option { background: var(--card); }

.form-hint { font-size: 0.76rem; color: var(--fg-muted); margin-top: 0.3rem; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.calc-btn {
  width: 100%;
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
  letter-spacing: -0.01em;
}
.calc-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.calc-btn:active { transform: translateY(0); }

.calc-reset {
  width: 100%;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.85rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.calc-reset:hover { color: var(--fg); background: var(--muted); }

/* ── Results Panel ── */
.results {
  background: var(--muted);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: none;
  animation: fadeSlideIn 0.3s ease;
}
.results.show { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.result-row:last-child { border-bottom: none; }

.result-label { font-size: 0.85rem; color: var(--fg-muted); }
.result-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  text-align: right;
  white-space: nowrap;
}

.result-row.highlight {
  background: var(--secondary);
  margin: 0.5rem -1.25rem -1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-bottom: none;
}
.result-row.highlight .result-label {
  font-weight: 600;
  color: var(--fg);
  font-size: 0.9rem;
}
.result-row.highlight .result-value {
  font-size: 1.15rem;
  color: var(--accent);
}

.result-row.bonus-50 .result-value { color: var(--primary); }
.result-row.bonus-100 .result-value { color: var(--primary-hover); }

/* ── Toggle ── */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.toggle-label { font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--fg-muted);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--secondary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--primary); }

/* ── Content Sections ── */
.content-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.section-number {
  width: 32px;
  height: 32px;
  background: var(--secondary);
  border: 1px solid oklch(0.65 0.15 150 / 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.content-section p + p { margin-top: 0.9rem; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.info-card {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.info-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 0.3rem;
}
.info-card-value {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}
.info-card-desc { font-size: 0.82rem; color: var(--fg-muted); margin-top: 0.2rem; }

.highlight-box {
  background: var(--secondary);
  border: 1px solid oklch(0.65 0.15 150 / 0.25);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.highlight-box p { color: var(--fg); }

.warning-box {
  background: oklch(0.65 0.20 25 / 0.08);
  border: 1px solid oklch(0.65 0.20 25 / 0.3);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.warning-box p { color: var(--fg); }

/* ── Example Calculation Box ── */
.calc-example {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.calc-example-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-example-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: var(--secondary);
  border: 1px solid oklch(0.65 0.15 150 / 0.3);
  border-radius: 100px;
  color: var(--primary);
}

.formula {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  line-height: 1.8;
}
.formula .val { color: var(--accent); }
.formula .op  { color: var(--fg-muted); }
.formula .res { color: var(--primary); font-weight: 600; }

/* ── FAQ Accordion ── */
.faq-section { margin-bottom: 3.5rem; }
.faq-title {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.faq-title-icon {
  width: 36px;
  height: 36px;
  background: var(--secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: oklch(0.65 0.15 150 / 0.35); }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  cursor: pointer;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--muted); }
.faq-item.open .faq-question { background: var(--secondary); }

.faq-q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  text-align: left;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--fg-muted);
  transition: transform var(--transition), color var(--transition);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }

.faq-answer {
  display: none;
  padding: 0.75rem 1.25rem 1rem;
  background: var(--card);
  border-top: 1px solid var(--border);
  animation: fadeIn 0.2s ease;
}
.faq-item.open .faq-answer { display: block; }
.faq-answer p { font-size: 0.92rem; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Author Box ── */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid oklch(0.65 0.15 150 / 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.author-info { flex: 1; }
.author-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
  margin-bottom: 0.15rem;
}
.author-role { font-size: 0.82rem; color: var(--primary); font-weight: 600; margin-bottom: 0.5rem; }
.author-bio { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.55; }
.author-updated { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.5rem; }

/* ── Trust Badges ── */
.trust-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.trust-item svg { color: var(--primary); flex-shrink: 0; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label { font-size: 0.78rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Internal Links / Related Calculators ── */
.related-section {
  margin-bottom: 3rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.related-card:hover {
  border-color: oklch(0.65 0.15 150 / 0.5);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.related-card-icon {
  width: 40px;
  height: 40px;
  background: var(--secondary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.related-card-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}
.related-card-desc { font-size: 0.82rem; color: var(--fg-muted); }
.related-card-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
}

/* ── Footer ── */
.site-footer {
  background: var(--sidebar);
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-logo { display: flex; align-items: center; gap: 0.6rem; }
.footer-logo-text {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
}
.footer-logo-text span { color: var(--primary); }
.footer-desc { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.6; }

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.footer-social-link {
  width: 34px;
  height: 34px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-social-link:hover { color: var(--primary); border-color: oklch(0.65 0.15 150 / 0.4); background: var(--secondary); }

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.87rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copyright { font-size: 0.8rem; color: var(--fg-muted); }
.footer-legal {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: 0.8rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--fg); }

/* ── Utility ── */
.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;
}

.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--fg-muted); }
.text-center  { text-align: center; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.data-table th {
  background: var(--muted);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--muted); }
.data-table .td-highlight { color: var(--fg); font-weight: 600; }
.data-table .td-primary { color: var(--primary); font-weight: 600; font-family: var(--font-mono); }

/* ── Contact Form ── */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-textarea {
  width: 100%;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--fg);
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea::placeholder { color: oklch(0.45 0.02 240); }
.form-textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px oklch(0.65 0.15 150 / 0.15); }
.submit-btn {
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  cursor: pointer;
  border: none;
  align-self: flex-start;
}
.submit-btn:hover { background: var(--primary-hover); }
.form-success {
  display: none;
  background: var(--secondary);
  border: 1px solid oklch(0.65 0.15 150 / 0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--primary);
  font-weight: 600;
}
.form-success.show { display: block; }

/* ── Privacy / Legal Content ── */
.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.legal-content p + p { margin-top: 0.75rem; }
.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}
.legal-content ul li { color: var(--fg-muted); font-size: 0.95rem; padding: 0.2rem 0; }

/* ── Page transitions / animations ── */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: slideUp 0.5s ease both; }
  .hero p  { animation: slideUp 0.5s 0.1s ease both; }
  .hero .trust-bar { animation: slideUp 0.5s 0.2s ease both; }
  .calc-widget { animation: slideUp 0.5s 0.15s ease both; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .calc-widget { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .trust-bar { gap: 1rem; }
  .hero { padding: 2rem 0 1.5rem; }
  .author-box { flex-direction: column; }
  .data-table { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 400px) {
  .info-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
}
