/* ===========================================================
   Stacie — shared tokens + base
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* --- color: ink & instrument panel --- */
  --ink: #0e1a2e;
  --ink-deep: #0a1322;
  --ink-raised: #16253f;
  --paper: #f4f0e4;
  --paper-dim: #e7e1d0;
  --brass: #c79a46;
  --brass-bright: #e0b968;
  --uk-dial: #b23a48;
  --uk-dial-bright: #d4626f;
  --us-dial: #3a6ea5;
  --us-dial-bright: #5f92c9;

  --ink-text: #1b2233;
  --ink-text-muted: #5b6478;
  --paper-text: #f4f0e4;
  --paper-text-muted: #aab2c4;
  --line: rgba(244, 240, 228, 0.14);
  --line-strong: rgba(244, 240, 228, 0.28);

  /* --- type --- */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-data: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;

  /* --- scale --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-panel: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.tabular {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

button {
  font-family: inherit;
}

/* --- shared nav bar (used on every page) --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 19, 34, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--paper-text);
}

.wordmark .mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.data-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- print / save as PDF --- */
.print-only {
  display: none;
}

@media print {
  :root {
    --ink: #ffffff;
    --ink-deep: #ffffff;
    --ink-raised: #f4f4f4;
    --paper-text: #14141c;
    --paper-text-muted: #45495a;
    --line: #cfcfcf;
    --line-strong: #a8a8a8;
    --shadow-panel: none;
    --brass-bright: #8a6a20;
  }

  body {
    background: #fff;
  }

  .no-print,
  .nav,
  .btn,
  button,
  input,
  select {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .app-shell {
    padding-top: 12px;
  }

  .sticky-col {
    position: static;
  }

  .combined-card,
  .result-card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

  table.trips {
    break-inside: avoid;
  }
}

/* --- focus visibility --- */
:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

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

/* --- layout helpers --- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-data);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brass-bright);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-brass {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  color: var(--ink-deep);
}

.btn-brass:hover {
  background: linear-gradient(180deg, #eac57a, var(--brass-bright));
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--paper-text);
}

.btn-ghost:hover {
  border-color: var(--brass-bright);
  color: var(--brass-bright);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-danger {
  background: transparent;
  border-color: rgba(178, 58, 72, 0.5);
  color: var(--uk-dial-bright);
}

.btn-danger:hover {
  border-color: var(--uk-dial-bright);
  background: rgba(178, 58, 72, 0.12);
}
