/* One shared header: approved calculator typography, colors, spacing and controls. */
header {
  --bg: #fbfcfe; --text: #151e32; --muted: #60708a; --line: #dde4ef; --accent: #1260e8;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: auto; color-scheme: light;
}
[data-theme="dark"] header { --bg: #131a25; --text: #eef2fa; --muted: #a7b5cb; --line: #334157; --accent: #8bb5ff; color-scheme: dark; }
header, header * { box-sizing: border-box; }
header button { font: inherit; cursor: pointer; color: inherit; }
header a { text-underline-offset: 4px; }
header button, header a { -webkit-tap-highlight-color: transparent; }
header button:focus-visible, header a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
header .brand { color: var(--text); text-decoration: none; }
header { max-width: 1160px; min-height: 88px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.brand { font-size: 28px; font-weight: 800; letter-spacing: -.045em; line-height: 1.1; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.language-nav { display: flex; align-items: center; gap: 7px; padding-right: 18px; border-right: 1px solid var(--line); color: var(--muted); font-size: 14px; white-space: nowrap; }
.lang-option { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.lang-option:hover, .lang-option[aria-current="page"] { color: var(--accent); }
.lang-option[aria-current="page"] { font-weight: 750; }
.theme-control { display: flex; align-items: center; gap: 5px; }
.theme-icon { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; }
.theme-track { width: 34px; height: 20px; padding: 3px; border-radius: 20px; background: #6755ed; }
.theme-track::before { content: ''; display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.theme[aria-checked="true"] .theme-track::before { transform: translateX(14px); }
@media (max-width: 760px) {
  header { min-height: 72px; padding: 0 20px; }
  .brand { font-size: 24px; }
  .header-actions { gap: 8px; }
}
@media (max-width: 380px) {
  header { padding: 0 14px; gap: 6px; }
  .brand { font-size: 22px; }
  .header-actions { gap: 2px; }
  .language-nav { font-size: 12px; gap: 4px; padding-right: 6px; }
}
