/* Airline Inbox base: font, reset, element defaults, typography, links, focus ring, icons, utilities,
   skip link, print, reduced motion and forced colours. Every value comes from tokens.css; nothing here
   sets a colour directly. Loaded after tokens.css and before layout.css, controls.css, data.css, pages.css. */

/* -- font ---------------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* -- reset --------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: var(--weight-regular) var(--text-base)/var(--lh-base) var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11";  /* single-storey a: calmer in Inter */
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
/* every pressable thing has its own pressed look, so the phone's grey tap flash is not needed */
a, button, summary, label, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a, button, summary, label, select, [role="button"], input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
/* controls are not text: a long press on a button or tab must not select its label (body and content text stay selectable) */
button, summary, [role="button"], [role="tab"] { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }

/* -- typography ---------------------------------------------------------------------------- */
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: var(--text-2xl); line-height: 28px; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
h2 { font-size: var(--text-lg); line-height: 22px; font-weight: var(--weight-semibold); }
h3 { font-size: var(--text-base); line-height: 20px; font-weight: var(--weight-semibold); }
p { margin: 0 0 var(--space-2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: var(--weight-semibold); }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-6) 0; }

/* -- links --------------------------------------------------------------------------------- */
a { color: var(--link); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
/* links inside running text are underlined always, so they are not told apart by colour alone */
p a, .prose a, .hint a, .callout a, .flash a { text-decoration: underline; text-underline-offset: 2px; }

/* -- focus and selection ------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* -- icons: Lucide geometry, coloured by currentColor -------------------------------------- */
.i {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}
/* duotone icons: the first shape (.duo) is a soft tint of the icon colour behind the outline */
.i .duo { fill: currentColor; fill-opacity: var(--icon-tint); stroke: none; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }
.i-xl { width: 24px; height: 24px; }
.brand-logo { width: 18px; height: 18px; display: block; }  /* Google / Microsoft keep their own fills */

/* -- illustrations: inline SVG colours (empty states, sign-in, landing hero) ---------------- */
/* Illustrations: every colour comes from these classes, so one inline SVG serves light and dark (values in tokens.css). */
.ill-bg { fill: var(--ill-bg); }             .ill-paper { fill: var(--ill-paper); }       .ill-paper-2 { fill: var(--ill-paper-2); }
.ill-detail { fill: var(--ill-detail); }     .ill-muted { fill: var(--ill-muted); }
.ill-accent { fill: var(--ill-accent); }     .ill-accent-soft { fill: var(--ill-accent-soft); }
.ill-teal { fill: var(--ill-teal); }         .ill-teal-soft { fill: var(--ill-teal-soft); }
.ill-good { fill: var(--ill-good); }         .ill-good-soft { fill: var(--ill-good-soft); }
.ill-warn { fill: var(--ill-warn); }         .ill-warn-soft { fill: var(--ill-warn-soft); }
.ill-shadow { fill: var(--ill-shadow); }     .ill-on-accent { fill: var(--ill-on-accent); }
.ill-s-stroke { stroke: var(--ill-stroke); } .ill-s-soft { stroke: var(--ill-stroke-soft); }
.ill-s-accent { stroke: var(--ill-accent); } .ill-s-teal { stroke: var(--ill-teal); }
.ill-s-good { stroke: var(--ill-good); }     .ill-s-warn { stroke: var(--ill-warn); }
.ill-s-paper { stroke: var(--ill-paper); }   .ill-s-on-accent { stroke: var(--ill-on-accent); }
.ill-c-accent-a { stop-color: var(--ill-g-accent-a); } .ill-c-accent-b { stop-color: var(--ill-g-accent-b); }
.ill-c-paper-a { stop-color: var(--ill-g-paper-a); }   .ill-c-paper-b { stop-color: var(--ill-g-paper-b); }
.ill-c-bg-a { stop-color: var(--ill-g-bg-a); }         .ill-c-bg-b { stop-color: var(--ill-g-bg-b); }
.ill-c-teal-a { stop-color: var(--ill-g-teal-a); }     .ill-c-teal-b { stop-color: var(--ill-g-teal-b); }
.ill-c-good { stop-color: var(--ill-g-good); }         .ill-c-warn { stop-color: var(--ill-g-warn); }
.ill-c-glow { stop-color: var(--ill-g-glow); }         .ill-c-shadow { stop-color: var(--ill-g-shadow); }

/* -- utilities ----------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0.01em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* stack is a layout utility for blocks; a table with class "stack" (mail and booking lists on phones) stays a table */
.stack:not(table) { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.stack-sm:not(table) { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.stack-lg:not(table) { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.spacer { flex: 1; }

/* screen-reader only: visually hidden, still read out */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* skip link: hidden until it takes focus, then sits in the top-left corner */
.skip-link {
  position: fixed;
  left: var(--space-3);
  top: calc(-1 * var(--space-16));
  z-index: var(--z-skip);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); outline-offset: 2px; }

/* -- print --------------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .scrim, .flash-close, .skip-link, .actions, .form-actions, .pager, .menu-btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }  /* print ignores the theme on purpose */
  .card, .table-wrap { box-shadow: none; border-color: #999; break-inside: avoid; }
  a { color: inherit; }
  th { position: static; }
}

/* -- motion: reduced ----------------------------------------------------------------------- */
/* reduced motion keeps fades and colour changes, drops movement; spinners still turn, slowly, because they say work is going on */
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, outline-color, box-shadow, fill, stroke !important;
  }
  .is-busy::before, .syncing .i {
    animation-duration: 1.6s !important;
    animation-iteration-count: infinite !important;
  }
}

/* app.js sets html.instant around keyboard-initiated state changes, so nothing animates for keyboard users */
html.instant *, html.instant *::before, html.instant *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
/* the iOS haptic switch that haptics.js creates: rendered (iOS may need that to play the tap) but invisible and untouchable */
.haptic-hook { position: fixed; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; white-space: nowrap; }

/* -- forced colours (Windows high contrast) ------------------------------------------------ */
@media (forced-colors: active) {
  .pill, .badge, .btn, .card, .table-wrap, .flash, .callout, input, select, textarea { border: 1px solid CanvasText; }
  .nav-link.active, .tab.active { outline: 2px solid Highlight; }
  .dot { forced-color-adjust: none; }
  .i .duo { fill-opacity: 0; }
}
