/* TrueTravelCost - shared site styles: theme tokens, header, navigation, footer, theme toggle.
 Loaded on every page (injected by build.mjs). Page-specific styles stay in the page. */

/* Self-hosted fonts (no requests to Google): Inter, Calistoga (wordmark), JetBrains Mono */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('/fonts/inter-latin-wght-normal.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; }
@font-face { font-family: 'Calistoga'; font-style: normal; font-display: swap; font-weight: 400; src: url('/fonts/calistoga-latin-400-normal.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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800; src: url('/fonts/jetbrains-mono-latin-wght-normal.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; }

/* Brand palette
   Deep navy #071A2B  | Near-black #05080B | Off-white #F5F7F4 | Acid lime #B7F000 | Muted blue-grey #71808D
   Acid lime is a fill and highlight colour. On off-white it is too light to carry text, so in light mode
   text and links use navy; lime is used for buttons, markers and active states, and as the accent in dark mode.
   A few tints are derived from the palette (panel, line, muted text) to keep text at accessible contrast. */
:root {
  --lime: #B7F000;
  --lime-ink: #05080B;
  --slate: #71808D;

  --bg: #F5F7F4;
  --panel: #FFFFFF;
  --panel-2: #ECF0EC;
  --line: #D9DFDB;
  --text: #05080B;
  --muted: #55646F;
  --navy: #071A2B;
  --blue: #071A2B;
  --blue-dim: #E7ECEF;
  --on-blue: #F5F7F4;
  --gold: #4F6900;
  --gold-dim: #EDF6CF;
  --green: #3E6B00;
  --green-dim: #E9F4CC;
  --red: #B23A2E;
  --red-dim: #FBEAE7;
  --logo-color: #071A2B;
  --radius-sm: 8px;
  --radius-md: 14px;
  --field-h: 46px;
  --field-radius: 10px;
  --field-line: #C5CDC8;
  --ring: 0 0 0 3px color-mix(in srgb, var(--lime) 55%, transparent);
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  --bg: #05080B; --panel: #071A2B; --panel-2: #0B2236; --line: #1A3247;
  --text: #F5F7F4; --muted: #8493A0; --navy: #F5F7F4;
  --blue: #B7F000; --blue-dim: #1C3426; --on-blue: #05080B;
  --gold: #B7F000; --gold-dim: #1C3426;
  --green: #B7F000; --green-dim: #1C3426;
  --red: #E88A7E; --red-dim: #2B1A1C;
  --logo-color: #B7F000;
  --field-line: #2B4660;
  --ring: 0 0 0 3px color-mix(in srgb, var(--lime) 28%, transparent);
  color-scheme: dark;
}

/* ---------- Header, navigation and footer (shared) ---------- */
/* ---------- Top bar ---------- */
header.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 4px 0 22px;
}
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; }
/* Logo is painted from the PNG's shape, so it follows the theme (navy in light mode, lime in dark mode) */
.site-logo {
  display: block; width: 72px; height: 72px; flex-shrink: 0;
  background-color: var(--logo-color);
  -webkit-mask: url('/truetravelcost-elephant-logo.png') center / contain no-repeat;
  mask: url('/truetravelcost-elephant-logo.png') center / contain no-repeat;
}
.wordmark-block {
  display: flex; flex-direction: column; gap: 4px;
  padding-left: 16px; border-left: 1.5px solid var(--line);
}
.brand .wordmark {
  font-family: 'Calistoga', Georgia, serif; font-weight: 400; font-size: 26px;
  color: var(--navy); letter-spacing: 0; line-height: 1.05;
  text-transform: none;
}
.brand .tagline {
  font-family: 'Times New Roman', Times, serif; font-style: italic;
  font-size: 14px; font-weight: 400;
  color: var(--muted); line-height: 1.3;
}
.brand .motto {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-top: 1px;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  --tw: 60px; --th: 32px; --td: 24px;
  position: relative; flex-shrink: 0; cursor: pointer;
  width: var(--tw); height: var(--th); padding: 0;
  display: inline-flex; align-items: center; justify-content: space-between;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-toggle .tt-bg { width: 14px; height: 14px; margin: 0 8px; opacity: 0.55; flex-shrink: 0; }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-thumb {
  position: absolute; top: 50%; left: 3px; width: var(--td); height: var(--td);
  border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(5, 8, 11, 0.22); color: var(--gold);
  display: grid; place-items: center;
  transform: translateY(-50%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.tt-thumb svg { grid-area: 1 / 1; width: 13px; height: 13px; transition: opacity 0.2s ease, transform 0.28s ease; }
.tt-thumb .tt-moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
:root[data-theme="dark"] .tt-thumb { transform: translate(calc(var(--tw) - var(--td) - 8px), -50%); }
:root[data-theme="dark"] .tt-thumb .tt-sun { opacity: 0; transform: rotate(40deg) scale(0.6); }
:root[data-theme="dark"] .tt-thumb .tt-moon { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .tt-thumb, .tt-thumb svg, .theme-toggle { transition: none; }
}


/* ---------- Site navigation ---------- */
.top-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.top-nav a {
  padding: 7px 10px; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 12.5px; font-weight: 500; text-decoration: none;
}
.top-nav a:hover { border-color: var(--line); background: var(--panel); color: var(--navy); }
.top-nav a[aria-current="page"] { border-color: var(--line); background: var(--panel); color: var(--navy); box-shadow: inset 0 -2px 0 var(--lime); }

/* ---------- Footer ---------- */
footer.legend { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }


/* ---------- Compact header (shared across all pages) ---------- */
header.top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  column-gap: 16px; padding: 0 0 14px; border-bottom: 1px solid var(--line);
}
.site-logo { width: 50px; height: 50px; }
.wordmark-block { gap: 2px; padding-left: 12px; }
.brand { gap: 12px; }
.brand .wordmark { font-size: 21px; white-space: nowrap; }
.brand .tagline { font-size: 13px; }
.brand .motto { display: none; }
.top-nav { justify-self: end; flex-wrap: nowrap; gap: 2px; }
.top-nav a { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

@media (max-width: 1240px) {
  header.top { grid-template-columns: 1fr auto; row-gap: 10px; }
  .brand { grid-column: 1; grid-row: 1; }
  .top-actions { grid-column: 2; grid-row: 1; }
  .top-nav {
    grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: flex-start;
    overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  header.top { flex-wrap: wrap; }
  .site-logo { width: 44px; height: 44px; }
  .brand { min-width: 0; }
  .brand .tagline { display: none; }
  .theme-toggle { --tw: 52px; --th: 28px; --td: 20px; }
  .theme-toggle .tt-bg { width: 12px; height: 12px; margin: 0 7px; }
  .tt-thumb svg { width: 11px; height: 11px; }
  .wordmark-block { padding-left: 12px; }
  .brand .wordmark { font-size: 18px; white-space: nowrap; }
  .brand .motto { display: none; }
}

/* Link states: keep the brand and nav free of the default link underline on hover */
.brand:hover, .top-nav a:hover { text-decoration: none; }

/* ---------- Brand accents (shared; loads after style.css so these win) ---------- */
.eyebrow { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--lime); border-radius: 2px; flex-shrink: 0; }
.feature-number { color: var(--muted); }
.button { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.highlight { border-left-color: var(--lime); }
.formula strong { color: var(--lime); }
/* Call-to-action: deep navy panel with a lime top edge, same in light and dark */
.cta { background: #071A2B; border: 1px solid #071A2B; border-top: 3px solid var(--lime); }
.cta h2 { color: #F5F7F4; }
.cta p { color: #AEB9C2; }
:root[data-theme="dark"] .cta { border-color: var(--line); border-top-color: var(--lime); }
::selection { background: var(--lime); color: var(--lime-ink); }

/* ---------- Type: Inter throughout, tighter headings, tabular figures for numbers ---------- */
body { font-feature-settings: 'cv11' 1, 'ss03' 1; }
h1, h2, h3 { letter-spacing: -0.02em; }
.content h2, .content h3, .feature h3 { letter-spacing: -0.015em; }
td.number, th.number, .number { font-variant-numeric: tabular-nums; }
