/* ===== DESIGN SYSTEM ===== */
:root {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f3f9;
  --bg-hero: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 50%, #dbeafe 100%);
  --text-primary: #1e1b4b;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #3730a3;
  --accent-light: #ede9fe;
  --accent-glow: rgba(99,102,241,0.15);
  --border: #e5e7eb;
  --border-hover: #c7d2fe;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
}

[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #1e1e35;
  --bg-input: #252545;
  --bg-hero: linear-gradient(135deg, #1a1a2e 0%, #16162a 50%, #0f0f1a 100%);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: rgba(99,102,241,0.15);
  --accent-glow: rgba(129,140,248,0.2);
  --border: #2d2d50;
  --border-hover: #4338ca;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.2);
  --success: #34d399;
  --success-bg: rgba(16,185,129,0.1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 0.09em;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }
.logo,
.nav a,
.tool-card,
.related-card,
.silo-link-pill,
.sidebar-link,
.sidebar-result-link,
.header-search-option,
.footer-social a,
.footer-col a,
.lang-pill,
.dmca-badge {
  text-decoration: none;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
input, select { font-family: var(--font); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #080815;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.header-right {
  display: flex; align-items: center; gap: 8px;
}
.header-controls {
  display: flex; align-items: center; gap: 8px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.18rem; color: #ffffff;
  text-decoration: none;
}
.logo:hover { color: #ffffff; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: block; flex: 0 0 36px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.logo-text-white { color: #ffffff; }
.logo-text-accent { color: #818cf8; }

.nav { display: flex; align-items: center; gap: 4px; margin-right: 16px; }
.nav a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  color: #9ca3b8; font-size: 0.9rem; font-weight: 500;
  transition: all 0.25s; text-decoration: none;
  position: relative;
}
.nav a:hover { color: #ffffff; background: rgba(255,255,255,0.06); }
.nav a.active { color: #818cf8; background: rgba(129,140,248,0.1); }

.header-search {
  position: relative;
  flex: 0 1 250px;
  width: clamp(190px, 22vw, 250px);
  margin-left: 8px;
}
.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #818cf8;
  font-size: 0.92rem;
  pointer-events: none;
  z-index: 1;
}
.header-search-input {
  width: 100%;
  height: 38px;
  padding: 8px 36px 8px 34px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 0.86rem;
  outline: none;
}
.header-search-input::placeholder {
  color: #7c8497;
}
.header-search-input:focus {
  border-color: rgba(129,140,248,0.65);
  background: rgba(129,140,248,0.12);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.16);
}
.header-search-input::-webkit-search-cancel-button {
  display: none;
}
.header-search-clear {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #9ca3b8;
  font-size: 1.05rem;
  line-height: 1;
}
.header-search-clear:hover,
.header-search-clear:focus-visible {
  background: rgba(129,140,248,0.14);
  color: #ffffff;
  outline: none;
}
.header-search-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(330px, calc(100vw - 32px));
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  background: #101022;
  box-shadow: 0 18px 46px rgba(0,0,0,0.35);
  z-index: 120;
}
.header-search-panel .header-search-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: #d1d5db;
}
.header-search-panel .header-search-option:hover,
.header-search-panel .header-search-option:focus-visible {
  background: rgba(129,140,248,0.14);
  color: #ffffff;
  outline: none;
}
.header-search-option-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(129,140,248,0.12);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 700;
}
.header-search-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.header-search-option-name,
.header-search-option-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-search-option-name {
  color: currentColor;
  font-size: 0.84rem;
  font-weight: 600;
}
.header-search-option-desc,
.header-search-empty {
  color: #8b95a7;
  font-size: 0.76rem;
}
.header-search-empty {
  display: block;
  padding: 10px;
}
.header-search-panel .header-search-option[hidden],
.header-search-empty[hidden] {
  display: none;
}

.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.25s; color: #9ca3b8;
}
.theme-toggle:hover { border-color: rgba(129,140,248,0.4); color: #818cf8; background: rgba(129,140,248,0.08); }

/* Language Selector - removed, now in footer as pills */
.goog-te-banner-frame.skiptranslate, .skiptranslate > iframe { display: none !important; }
body { top: 0px !important; }
.goog-tooltip { display: none !important; }
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }

.mobile-menu-btn {
  display: none; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  align-items: center; justify-content: center; font-size: 20px;
  color: #9ca3b8; transition: all 0.25s;
}
.mobile-menu-btn:hover { border-color: rgba(129,140,248,0.4); color: #818cf8; }

/* ===== HERO ===== */
.hero {
  background: var(--bg-hero); padding: 60px 0 50px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 2.75rem; font-weight: 800; letter-spacing: 0;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #6366f1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1.15rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ===== TOOL GRID ===== */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; text-align: center;
}
.section-subtitle {
  font-size: 1rem; color: var(--text-secondary); margin-bottom: 40px; text-align: center;
}
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; cursor: pointer; transition: all 0.3s ease;
  position: relative; overflow: hidden; color: var(--text-primary);
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6); opacity: 0;
  transition: opacity 0.3s;
}
.tool-card:hover {
  transform: translateY(-4px); border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}
.tool-card:hover::before { opacity: 1; }
.tool-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.tool-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.tool-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.tool-card .arrow {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  opacity: 0; transition: all 0.3s; color: var(--accent); font-size: 1.2rem;
}
.tool-card:hover .arrow { opacity: 1; transform: translateY(-50%) translateX(4px); }

.icon-blue { background: #eff6ff; color: #3b82f6; }
.icon-purple { background: #f5f3ff; color: #8b5cf6; }
.icon-green { background: #ecfdf5; color: #10b981; }
.icon-orange { background: #fff7ed; color: #f97316; }
.icon-pink { background: #fdf2f8; color: #ec4899; }
.icon-cyan { background: #ecfeff; color: #06b6d4; }
.icon-red { background: #fef2f2; color: #ef4444; }
.icon-teal { background: #f0fdfa; color: #14b8a6; }
.icon-amber { background: #fffbeb; color: #f59e0b; }

[data-theme="dark"] .icon-blue { background: rgba(59,130,246,0.12); }
[data-theme="dark"] .icon-purple { background: rgba(139,92,246,0.12); }
[data-theme="dark"] .icon-green { background: rgba(16,185,129,0.12); }
[data-theme="dark"] .icon-orange { background: rgba(249,115,22,0.12); }
[data-theme="dark"] .icon-pink { background: rgba(236,72,153,0.12); }
[data-theme="dark"] .icon-cyan { background: rgba(6,182,212,0.12); }
[data-theme="dark"] .icon-red { background: rgba(239,68,68,0.12); }
[data-theme="dark"] .icon-teal { background: rgba(20,184,166,0.12); }
[data-theme="dark"] .icon-amber { background: rgba(245,158,11,0.12); }

/* ===== CALCULATOR PAGE ===== */
.calc-page { padding: 40px 0 60px; }
.calc-header { margin-bottom: 32px; }
.calc-header .breadcrumb {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
  color: var(--text-muted); margin-bottom: 16px;
}
.calc-header .breadcrumb a { color: var(--accent); }
.calc-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.calc-header p { color: var(--text-secondary); font-size: 1.05rem; max-width: 700px; }

.table-of-contents {
  max-width: 760px;
  margin: -10px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.table-of-contents h2 {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 750;
  margin-bottom: 12px;
}
.table-of-contents ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px 18px;
  list-style: none;
}
.table-of-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}
.table-of-contents a:hover { color: var(--accent-hover); }

.calc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) 260px; gap: 24px; align-items: start;
}
.calc-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.calc-panel h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 24px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: 0.95rem; transition: all 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.result-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; position: sticky; top: 80px;
}
.result-panel h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.sidebar-widget-title {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.sidebar-search-wrap {
  position: relative;
}
.sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}
.sidebar-search {
  width: 100%;
  min-height: 42px;
  padding: 10px 40px 10px 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.sidebar-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.sidebar-search::-webkit-search-cancel-button {
  display: none;
}
.sidebar-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.sidebar-search-clear:hover,
.sidebar-search-clear:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
  outline: none;
}
.sidebar-results {
  list-style: none;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  max-height: 280px;
  overflow: auto;
  box-shadow: var(--shadow-card);
}
.sidebar-results a,
.sidebar-results .no-results {
  display: block;
  padding: 9px 10px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}
.sidebar-results a:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.sidebar-results .no-results {
  color: var(--text-muted);
}
.sidebar-results .sidebar-result-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.sidebar-result-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}
.sidebar-result-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-result-name,
.sidebar-result-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-result-name {
  color: var(--text-secondary);
  font-weight: 600;
}
.sidebar-result-desc {
  color: var(--text-muted);
  font-size: 0.76rem;
}
.sidebar-result-link:hover .sidebar-result-name,
.sidebar-result-link:focus-visible .sidebar-result-name {
  color: var(--accent);
}
.sidebar-search-meta {
  min-height: 18px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}
.sidebar-link.is-hidden {
  display: none;
}
.sidebar-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: var(--accent-light);
  color: var(--accent);
}
.sidebar-link::before {
  content: attr(data-icon);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 700;
  background: var(--bg-input);
  color: var(--accent);
}
.sidebar-tip p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.5;
}
.result-value {
  font-size: 2.5rem; font-weight: 800; color: var(--accent);
  margin-bottom: 4px; line-height: 1.2;
}
.result-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.result-breakdown { border-top: 1px solid var(--border); padding-top: 16px; }
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 0.9rem;
}
.result-row span:first-child { color: var(--text-secondary); }
.result-row span:last-child { font-weight: 600; }

.btn-calculate {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6366f1, #7c3aed); color: white;
  font-weight: 600; font-size: 0.95rem; border: none;
  transition: all 0.3s; margin-top: 8px;
}
.btn-calculate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-reset {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); font-weight: 500;
  font-size: 0.9rem; border: 1px solid var(--border); margin-top: 10px;
  transition: all 0.2s;
}
.btn-reset:hover { border-color: var(--danger); color: var(--danger); }

/* Timesheet rows */
.timesheet-row {
  display: grid; grid-template-columns: 90px 1fr 1fr 80px 50px;
  gap: 10px; align-items: center; margin-bottom: 10px;
}
.timesheet-row .day-label { font-size: 0.85rem; font-weight: 500; }
.timesheet-row input { padding: 10px 12px; font-size: 0.88rem; }
.timesheet-row .hours-display {
  font-size: 0.9rem; font-weight: 600; color: var(--accent); text-align: center;
}
.timesheet-header {
  display: grid; grid-template-columns: 90px 1fr 1fr 80px 50px;
  gap: 10px; margin-bottom: 12px; font-size: 0.78rem; font-weight: 500;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.btn-add-row {
  padding: 10px 18px; border-radius: var(--radius-sm); background: var(--accent-light);
  color: var(--accent); font-weight: 500; font-size: 0.88rem; border: none;
  transition: all 0.2s; margin-top: 4px;
}
.btn-add-row:hover { background: var(--accent); color: white; }
.btn-remove {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-remove:hover { background: #fef2f2; color: var(--danger); }
[data-theme="dark"] .btn-remove:hover { background: rgba(239,68,68,0.1); }

/* ===== FAQ ===== */
.faq-section { padding: 60px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 12px; overflow: hidden; background: var(--bg-card);
}
.faq-question {
  width: 100%; padding: 18px 24px; background: none; border: none;
  text-align: left; font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary); display: flex; justify-content: space-between;
  align-items: center; transition: all 0.2s;
  cursor: pointer; list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--accent); }
.faq-question::after {
  content: '+';
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.3s;
}
.faq-item[open] .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 24px 18px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7;
}

/* ===== RELATED TOOLS ===== */
.related-tools { padding: 60px 0; }
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px;
}
.related-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-card);
  transition: all 0.2s; cursor: pointer;
}
.related-card:hover {
  border-color: var(--border-hover); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.related-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.related-card-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.related-card p { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ===== SILO LINKS ===== */
.silo-links-section {
  padding: 0 0 60px;
}
.silo-link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1060px;
  margin: 0 auto;
}
.silo-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.silo-link-pill:hover,
.silo-link-pill.active {
  border-color: var(--border-hover);
  background: var(--accent-light);
  color: var(--accent);
}
/* ===== HOW TO USE ===== */
.how-to-section { padding: 60px 0; }
.how-to-steps { max-width: 700px; margin: 0 auto; }
.step-item {
  display: flex; gap: 20px; margin-bottom: 24px; align-items: flex-start;
}
.step-number {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.step-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.step-content p { font-size: 0.9rem; color: var(--text-secondary); }

/* ===== COUNTRY INFO ===== */
.country-info {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; margin-top: 32px;
}
.country-info h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.info-card {
  padding: 20px; border-radius: var(--radius-md); background: var(--bg-input);
}
.info-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.info-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.info-card ul { padding-left: 18px; margin-top: 8px; }
.info-card li { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }

/* Tool card tags (homepage country cards) */
.tool-card-tags {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.tool-card-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid transparent; transition: all 0.2s;
}
[data-theme="dark"] .tool-card-tag {
  background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.2);
}

/* Country page header badges */
.country-badges {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.country-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 500;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.country-badge-icon { font-size: 1rem; }
.country-badge-icon.currency-sign {
  font-weight: 800; font-size: 0.95rem; color: var(--accent);
  font-family: var(--font);
}

/* Country quick facts bar */
.country-quick-facts {
  display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.quick-fact {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--bg-input); flex: 1; min-width: 200px;
}
.quick-fact-label {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap;
}
.quick-fact-value {
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 0.88rem; color: var(--text-secondary); margin-top: 12px; line-height: 1.6; }
.footer-heading {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 16px;
}
.footer-col a {
  display: block; color: var(--text-secondary); font-size: 0.88rem;
  padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  text-align: left; font-size: 0.82rem; color: var(--text-secondary);
}
.dmca-badge {
  display: inline-flex; align-items: center; flex-shrink: 0;
  border-radius: 6px; transition: opacity 0.2s ease, transform 0.2s ease;
}
.dmca-badge:hover {
  opacity: 0.86; transform: translateY(-1px);
}
.dmca-badge img {
  display: block; width: 144px; height: 40px;
}

/* Footer Language Pills */
.lang-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.lang-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s ease;
}
.lang-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}
.lang-pill.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ===== LEGAL PAGES ===== */
.legal-page { padding: 60px 0; max-width: 800px; margin: 0 auto; }
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.legal-page .last-updated { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 32px; }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; margin: 32px 0 12px; }
.legal-page p, .legal-page li { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; }
.legal-page a { color: var(--accent); }

/* Contact form */
.contact-form { max-width: 600px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: 0.95rem; font-family: var(--font);
  min-height: 140px; resize: vertical; outline: none; transition: all 0.2s;
}
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Sitemap */
.sitemap-list { list-style: none; }
.sitemap-list li { padding: 8px 0; }
.sitemap-list a { font-size: 0.95rem; }
.sitemap-category { margin-bottom: 32px; }
.sitemap-category h2 { font-size: 1.15rem; margin-bottom: 12px; }

/* ===== BLOG ===== */
.blog-page { padding: 56px 0 72px; }
.blog-page .breadcrumb { margin-bottom: 28px; }
.blog-hero { max-width: 840px; margin: 0 auto 36px; }
.blog-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.blog-hero h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.blog-hero p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.blog-article { max-width: 840px; margin: 0 auto; }
.blog-article-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.blog-meta span,
.blog-meta time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.blog-article-header h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 12px;
}
.blog-author {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.blog-author a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-share {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.blog-share h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text-primary);
}
.blog-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.86rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
}
.blog-share-btn .share-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.blog-share-btn:hover .share-icon {
  transform: scale(1.1);
}
.blog-share-btn.facebook {
  border-color: rgba(24, 119, 242, 0.25);
  color: #1877f2;
  background: rgba(24, 119, 242, 0.04);
}
.blog-share-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
  transform: scale(1.05) translateY(-2px);
}
.blog-share-btn.x-twitter {
  border-color: var(--border);
  color: var(--text-primary);
  background: var(--bg-card);
}
.blog-share-btn.x-twitter:hover {
  background: #000;
  border-color: #000;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: scale(1.05) translateY(-2px);
}
[data-theme="dark"] .blog-share-btn.x-twitter:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}
.blog-share-btn.linkedin {
  border-color: rgba(10, 102, 194, 0.25);
  color: #0a66c2;
  background: rgba(10, 102, 194, 0.04);
}
.blog-share-btn.linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.35);
  transform: scale(1.05) translateY(-2px);
}
.blog-share-btn.email {
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--accent);
  background: var(--accent-light);
}
.blog-share-btn.email:hover {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transform: scale(1.05) translateY(-2px);
}
.blog-article-header p,
.blog-article-body p,
.blog-article-body li {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}
.blog-article-body p,
.blog-article-body ul,
.blog-article-body ol,
.blog-callout,
.blog-tool-links {
  margin-bottom: 22px;
}
.blog-article-body h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 750;
  margin: 32px 0 10px;
}
.blog-article-body ul,
.blog-article-body ol {
  padding-left: 22px;
}
.blog-article-body li {
  margin-bottom: 10px;
}
.blog-callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 16px 18px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.blog-step-list strong { color: var(--text-primary); }
.blog-tool-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  padding: 18px 0;
}
.blog-tool-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 650;
  font-size: 0.92rem;
}
.blog-tool-links a:hover {
  border-color: var(--border-hover);
  background: var(--accent-light);
}
.blog-sources {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.blog-home-grid {
  max-width: 840px;
  margin: 0 auto;
}
.blog-home-card {
  display: block;
  position: relative;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}
.blog-home-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}
.blog-home-card h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 800;
  margin-bottom: 10px;
}
.blog-home-date {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-muted);
}
.blog-home-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.blog-card-link {
  color: var(--accent);
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .nav {
    margin-right: 8px;
  }
  .nav a {
    padding: 8px 12px;
  }
  .header-search {
    flex-basis: 210px;
    width: 210px;
    margin-left: 4px;
  }
  .sidebar {
    order: -1;
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 940px) {
  .nav a {
    padding: 8px 10px;
  }
  .header-search {
    flex-basis: 180px;
    width: 180px;
  }
  .header-search-input {
    font-size: 0.82rem;
  }
}

@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 40px 0; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #0c0c1e; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 16px 20px; gap: 4px; z-index: 99; }
  .nav.open .header-search {
    width: 100%;
    flex: none;
    margin: 8px 0 0;
  }
  .nav.open .header-search-panel {
    position: static;
    width: 100%;
    max-height: 260px;
    margin-top: 8px;
    box-shadow: none;
  }
  .nav.open .header-search-panel .header-search-option {
    display: grid;
    width: 100%;
  }
  .nav.open .header-search-panel .header-search-option[hidden] {
    display: none;
  }
  .mobile-menu-btn { display: flex; }
  .tool-grid { grid-template-columns: 1fr; }
  .calc-panel { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .timesheet-row { grid-template-columns: 70px 1fr 1fr 60px 40px; gap: 6px; }
  .timesheet-header { grid-template-columns: 70px 1fr 1fr 60px 40px; gap: 6px; font-size: 0.7rem; }
  .form-row { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .lang-pills { grid-template-columns: repeat(4, 1fr); }
  .hero-calc-fields { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  .hero h1 { font-size: 1.65rem; }
  .calc-header h1 { font-size: 1.5rem; }
  .calc-panel { padding: 16px; }
  .hero-calc { padding: 16px; margin-top: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .lang-pills { grid-template-columns: repeat(4, 1fr); }
  .timesheet-row { grid-template-columns: 50px 1fr 1fr 50px 36px; gap: 4px; }
  .timesheet-row input { padding: 8px 6px; font-size: 0.8rem; }
  .timesheet-header { grid-template-columns: 50px 1fr 1fr 50px 36px; font-size: 0.65rem; }
}

/* ===== HERO CALCULATOR ===== */
.hero-calc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 800px;
  min-height: 154px;
  margin: 32px auto 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.hero-calc-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.hero-calc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.hero-calc-field input {
  width: 100%;
  height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.hero-calc-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.hero-calc-result {
  background: var(--accent-light);
  min-height: 64px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-calc-result label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-calc-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-top: 2px;
}

.hero-calc-link {
  align-self: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.hero-calc-link:hover {
  text-decoration: underline;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--accent);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

[data-theme="dark"] .back-to-top {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
}

[data-theme="dark"] .back-to-top:hover {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Keep hover and disclosure effects compositor-friendly for Lighthouse. */
.nav a,
.theme-toggle,
.mobile-menu-btn,
.header-search-input,
.header-search-clear,
.header-search-option,
.form-group input,
.form-group select,
.btn-calculate,
.btn-reset,
.add-day-btn,
.remove-row,
.faq-question,
.related-card,
.lang-pill,
.footer-col a,
.tool-card-tag,
.country-badge,
.contact-form input,
.contact-form textarea,
.tool-card,
.blog-home-card,
.scroll-to-top,
.back-to-top {
  transition: none !important;
}

.tool-card .arrow,
.faq-question::after,
.scroll-to-top,
.back-to-top {
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

/* Final mobile overrides live last so they win over component defaults. */
@media (max-width: 640px) {
  .header-inner {
    height: 60px;
    padding: 0 14px;
  }
  .logo {
    gap: 8px;
    font-size: 1rem;
    min-width: 0;
  }
  .logo span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .logo-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .header-right,
  .header-controls {
    gap: 6px;
  }
  .theme-toggle,
  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }
  .nav.open {
    top: 60px;
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    padding: 12px 14px;
  }
  .nav.open a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
  }
  .hero {
    padding: 34px 0 30px;
  }
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.15;
    letter-spacing: 0;
  }
  .hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }
  .hero-calc {
    border-radius: var(--radius-md);
    margin-top: 18px;
    padding: 16px;
  }
  .hero-calc-fields,
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-calc-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .header-search-input,
  .sidebar-search,
  .form-group input,
  .form-group select,
  .hero-calc-field input,
  .contact-form textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .section,
  .faq-section,
  .related-tools,
  .silo-links-section,
  .how-to-section,
  .blog-page {
    padding: 36px 0;
  }
  .section-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .section-subtitle {
    margin-bottom: 24px;
  }
  .blog-page .breadcrumb {
    margin-bottom: 20px;
  }
  .blog-hero {
    margin-bottom: 26px;
  }
  .blog-hero h1 {
    font-size: 1.7rem;
    line-height: 1.2;
  }
  .blog-article-header h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .blog-meta {
    gap: 8px;
  }
  .blog-meta span,
  .blog-meta time {
    min-height: 32px;
  }
  .blog-tool-links {
    grid-template-columns: 1fr;
  }
  .blog-home-card {
    padding: 22px 18px;
  }
  .tool-card {
    min-height: 0;
    padding: 22px 18px;
  }
  .tool-card .arrow {
    opacity: 1;
  }
  .calc-page {
    padding: 26px 0 42px;
  }
  .calc-header {
    margin-bottom: 20px;
  }
  .calc-header .breadcrumb {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .calc-header h1 {
    font-size: 1.55rem;
    line-height: 1.2;
  }
  .calc-header p {
    font-size: 0.98rem;
  }
  .table-of-contents {
    margin: -4px 0 20px;
    padding: 16px;
  }
  .table-of-contents ul {
    grid-template-columns: 1fr;
  }
  .calc-layout {
    gap: 16px;
  }
  .calc-panel,
  .result-panel,
  .sidebar-widget,
  .country-info {
    border-radius: var(--radius-md);
    padding: 18px;
  }
  .result-value {
    font-size: 2rem;
    overflow-wrap: anywhere;
  }
  .result-row {
    gap: 12px;
    align-items: flex-start;
  }
  .result-row span:last-child {
    text-align: right;
  }
  .timesheet-header {
    display: none;
  }
  .timesheet-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
  }
  .timesheet-row .day-label {
    grid-column: 1 / -1;
    font-weight: 700;
  }
  .timesheet-row input {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    font-size: 16px;
  }
  .timesheet-row .btn-remove {
    justify-self: end;
  }
  .related-card {
    align-items: flex-start;
    padding: 16px;
  }
  .step-item {
    gap: 14px;
  }
  .country-badge,
  .quick-fact {
    width: 100%;
  }
  .quick-fact {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }
  .quick-fact-label {
    white-space: normal;
  }
  .quick-fact-value {
    overflow-wrap: anywhere;
  }
  .footer {
    padding: 36px 0 22px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }
  .logo-text-white {
    display: none;
  }
  .hero h1 {
    font-size: 1.58rem;
  }
  .calc-panel,
  .result-panel,
  .sidebar-widget,
  .country-info,
  .hero-calc {
    padding: 14px;
  }
  .lang-pills {
    grid-template-columns: repeat(3, 1fr);
  }
}

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