/* =============================================
   STEPS CONVERTER SUITE -- styles.css
   Aesthetic: Refined Utilitarian / Precision Tool
   Palette: Deep Navy + Teal Accent + Off-White
   ============================================= */

/* Self-hosted fonts — latin only, WOFF2, font-display:swap */
/* DM Mono 400 */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Mono 500 */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans 300 */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans 400 */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* DM Sans 500 */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Syne 700 */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/syne-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Syne 800 */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/syne-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* TOKENS */
:root {
  --bg:            #f5f6f8;
  --bg-card:       #ffffff;
  --bg-muted:      #eef0f4;
  --text:          #0f1823;
  --text-muted:    #596579;
  --text-faint:    #8a95a3;
  --border:        #dde1e8;
  --border-focus:  #00b8a2;
  --accent:        #00b8a2;
  --accent-dark:   #009682;
  --accent-light:  #e0faf7;
  --blue:          #1a3a5c;
  --danger:        #e05252;
  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:        0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:     0 12px 40px rgba(0,0,0,.10);
  --font-head:     'Syne', system-ui, sans-serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-mono:     'DM Mono', ui-monospace, monospace;
  --transition:    color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  --max-w:         1140px;
  --header-h:      64px;
}

[data-theme="dark"] {
  --bg:            #0d1520;
  --bg-card:       #161f2e;
  --bg-muted:      #1c2840;
  --text:          #e8edf3;
  --text-muted:    #8fa3bc;
  --text-faint:    #5a6f85;
  --border:        #253346;
  --border-focus:  #00d4bc;
  --accent:        #00d4bc;
  --accent-dark:   #00b8a2;
  --accent-light:  rgba(0,212,188,.12);
  --blue:          #7eb8f7;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.3);
  --shadow:        0 4px 20px rgba(0,0,0,.35);
  --shadow-lg:     0 16px 48px rgba(0,0,0,.45);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.25s, color 0.25s;
}
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
details summary { cursor: pointer; }

/* UTILITIES */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 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;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; opacity: 0.88; }
.logo-dot { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-muted);
  text-decoration: none;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-muted); color: var(--text); }

/* AD CONTAINERS */
.ad-container { display: flex; justify-content: center; align-items: center; }
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border: 1px dashed var(--border);
  color: var(--text-faint);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: var(--radius-sm);
}
.ad-label { pointer-events: none; }
.ad-leaderboard { padding: 12px 0; background: var(--bg); }
.ad-leaderboard .ad-placeholder { width: 100%; max-width: 728px; height: 90px; }
.ad-sidebar .ad-placeholder.ad-medium-rect { width: 300px; height: 250px; }
.ad-inline { padding: 12px 0 24px; }
.ad-inline .ad-placeholder.ad-inline-rect { width: 100%; height: 90px; }

/* HERO */
.hero {
  padding: 48px 0 32px;
  background: linear-gradient(160deg, var(--bg) 0%, var(--accent-light) 100%);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hero {
  background: linear-gradient(160deg, var(--bg) 0%, rgba(0,180,160,.07) 100%);
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
[data-theme="dark"] .hero-badge { color: var(--accent); }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 14px;
}
.hero-sub { color: var(--accent); }
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  font-weight: 300;
}

/* TABS */
.tabs-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 14px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  font-family: var(--font-body);
}
.tab:hover { color: var(--text); background: var(--bg-muted); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* MAIN LAYOUT */
.main-content { padding: 32px 0 64px; }
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* CALCULATOR CARD */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}
.span-two { grid-column: 1 / -1; }

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Height side-by-side */
.height-row {
  display: flex;
  gap: 10px;
}
.height-part { flex: 1; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.calc-input, .calc-select {
  width: 100%;
  padding: 13px 16px;
  padding-right: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.calc-select { padding-right: 16px; cursor: pointer; }
.calc-input:focus, .calc-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0,184,162,.15);
  background: var(--bg-card);
}
.input-unit {
  position: absolute;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  pointer-events: none;
}

/* GENDER RADIO BUTTONS */
.gender-radio-group {
  display: flex;
  gap: 10px;
  padding-top: 2px;
}
.gender-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  user-select: none;
}
.gender-radio-label:hover {
  border-color: var(--border-focus);
  color: var(--text);
}
.gender-radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.gender-radio-label input[type="radio"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.15s ease;
}
.gender-radio-label input[type="radio"]:checked {
  border-color: var(--accent);
}
.gender-radio-label input[type="radio"]:checked::after {
  transform: translate(-50%, -50%) scale(1);
}
.gender-radio-label.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
}
[data-theme="dark"] .gender-radio-label.selected {
  background: rgba(0,212,188,.08);
}

/* STRIDE PREVIEW */
.stride-preview {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 0.78rem;
  padding: 10px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.stride-preview svg { flex-shrink: 0; }

/* RESULTS */
.results-panel {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  transition: var(--transition);
}
.result-card.primary-result {
  border-color: var(--accent);
  background: var(--accent-light);
}
[data-theme="dark"] .result-card.primary-result { background: rgba(0,212,188,.08); }
.result-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  min-height: 1.5em;
}
.primary-result .result-value { color: var(--accent-dark); font-size: 1.45rem; }
[data-theme="dark"] .primary-result .result-value { color: var(--accent); }
.result-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  margin-top: 4px;
  font-weight: 500;
}

/* ACTIONS */
.calc-actions { display: flex; gap: 12px; }
.btn-reset, .btn-copy, .btn-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.btn-reset { background: transparent; color: var(--text-muted); }
.btn-reset:hover { background: var(--bg-muted); color: var(--text); }
.btn-copy { background: var(--accent); color: #fff; border-color: var(--accent); margin-left: auto; }
.btn-copy:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-copy.copied { background: #28a745; border-color: #28a745; }
.btn-share { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-share:hover { background: var(--surface-hover); border-color: var(--text); }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card-title {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.sidebar-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.sidebar-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: .08em;
  color: var(--text-faint);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.sidebar-table td {
  padding: 7px 8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.sidebar-table tr:last-child td { border-bottom: none; }
.sidebar-table tr:hover td { background: var(--bg-muted); }

/* CONTENT SECTIONS */
.content-section { padding: 40px 0; border-top: 1px solid var(--border); content-visibility: auto; contain-intrinsic-size: 0 400px; }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
}
.section-intro { color: var(--text-muted); margin-bottom: 24px; max-width: 720px; }
.content-section h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.content-section p { color: var(--text-muted); margin-bottom: 14px; max-width: 72ch; }

/* FORMULA BOX */
.formula-box {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 16px 0 24px;
}
.formula-line { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); margin-bottom: 8px; }
.formula-example { font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-mono); }
.formula-example strong { color: var(--accent-dark); }
[data-theme="dark"] .formula-example strong { color: var(--accent); }

/* COMMON CONVERSIONS TABLE */
.conv-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.conv-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 480px; }
.conv-table thead { background: var(--blue); color: #fff; }
[data-theme="dark"] .conv-table thead { background: var(--bg-muted); color: var(--text); }
.conv-table th {
  padding: 13px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.conv-table td {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.conv-table tbody tr:hover td { background: var(--bg-muted); }
.conv-table td:first-child { font-weight: 600; color: var(--text); font-family: var(--font-body); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item[open] { border-color: var(--accent); }
.faq-q {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; font-size: 1.3rem; font-weight: 300; color: var(--accent); flex-shrink: 0; }
.faq-item[open] .faq-q::after { content: "−"; }
.faq-a { padding: 14px 20px 16px; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid var(--border); }
.faq-a p { margin-bottom: 0; }

/* DISCLAIMER */
.disclaimer-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff8e6;
  border: 1px solid #f0c060;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 8px 0 40px;
}
[data-theme="dark"] .disclaimer-box { background: rgba(240,192,96,.08); border-color: rgba(240,192,96,.25); }
.disclaimer-box svg { color: #c08000; flex-shrink: 0; margin-top: 2px; }
[data-theme="dark"] .disclaimer-box svg { color: #f0c060; }
.disclaimer-box p { font-size: 0.82rem; color: var(--text-muted); margin: 0; max-width: none; }
.disclaimer-box a { color: var(--accent); }

/* STATIC PAGE PROSE (about, privacy, etc.) */
.prose-page { max-width: 800px; padding-top: 48px; border-top: none; }
.prose-page h1 { font-family: var(--font-head); font-size: clamp(1.6rem,4vw,2.2rem); font-weight: 800; letter-spacing: -0.02em; color: var(--text); margin-bottom: 8px; }
.prose-page .page-date { color: var(--text-faint); font-family: var(--font-mono); font-size: .78rem; margin-bottom: 32px; }
.prose-page h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 36px 0 10px; }
.prose-page h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 600; color: var(--text); margin: 24px 0 8px; }
.prose-page p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.75; }
.prose-page ul { margin: 10px 0 16px 22px; color: var(--text-muted); line-height: 2; }
.prose-page a { color: var(--accent); }
.prose-page strong { color: var(--text); font-weight: 600; }

/* CONTACT PAGE */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: none; padding-bottom: 0; }
.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .contact-icon { background: rgba(0,212,188,.12); }
.contact-icon svg { color: var(--accent); }
.contact-details { display: flex; flex-direction: column; gap: 3px; }
.contact-role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-family: var(--font-mono); }
.contact-email { font-size: 1rem; font-weight: 500; color: var(--text); }
.contact-email a { color: var(--accent); font-weight: 600; }
.contact-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* FOOTER */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 40px 0; content-visibility: auto; contain-intrinsic-size: 0 160px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-logo { font-size: 0.95rem; }
.footer-tagline { font-size: 0.82rem; color: var(--text-faint); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; }
.footer-nav a { font-size: 0.82rem; color: var(--text-muted); transition: color 0.15s; }
.footer-nav a:hover { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: 0.78rem; color: var(--text-faint); font-family: var(--font-mono); }

/* RESULT ANIMATION */
@keyframes pop-in { 0% { transform: scale(0.94); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.result-value.animate { animation: pop-in 0.2s ease forwards; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { order: 1; }
  .ad-sidebar { display: none; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .container { padding: 0 16px; }
  .calc-card { padding: 20px 16px; }
  .calc-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .hero { padding: 32px 0 24px; }
  .tab { padding: 12px 13px; font-size: 0.8rem; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-leaderboard .ad-placeholder { height: 60px; }
}
@media (max-width: 420px) {
  .calc-actions { flex-wrap: wrap; }
  .btn-copy, .btn-share { margin-left: 0; width: 100%; justify-content: center; }
}
@media print {
  .site-header, .tabs-section, .ad-container, .calc-actions, .site-footer, .theme-toggle { display: none !important; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 800px;
}
.cookie-text a {
  color: var(--accent);
  text-decoration: underline;
}
.cookie-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}
.cookie-btn:hover {
  background: var(--accent-dark);
}
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .cookie-btn {
    width: 100%;
  }
}

/* =============================================
   SHARE MODAL
   ============================================= */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.share-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.share-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.share-modal-overlay.active .share-modal {
  transform: translateY(0) scale(1);
}
.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.share-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}
.btn-share-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-share-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.share-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.share-btn svg {
  width: 28px;
  height: 28px;
  transition: transform 0.2s;
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.share-btn:hover svg {
  transform: scale(1.1);
}
.share-btn.fb:hover { border-color: #1877F2; color: #1877F2; }
.share-btn.wa:hover { border-color: #25D366; color: #25D366; }
.share-btn.x:hover { border-color: var(--text); color: var(--text); }
.share-btn.rd:hover { border-color: #FF4500; color: #FF4500; }
.share-btn.pi:hover { border-color: #E60023; color: #E60023; }
.share-btn.tg:hover { border-color: #0088cc; color: #0088cc; }
.share-btn.li:hover { border-color: #0A66C2; color: #0A66C2; }
.share-btn.em:hover { border-color: #D44638; color: #D44638; }
.share-btn.sm:hover { border-color: #34C759; color: #34C759; }

@media (max-width: 360px) {
  .share-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Remove expensive backdrop-filter on mobile for better GPU performance */
@media (max-width: 768px) {
  .share-modal-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.82);
  }
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
