/* Wegwijs Teleassistentie, the operator tool, in the Bieb app's own design system. Every value and
   every component below comes from the iOS project, named after its source:
     colours     App/Resources/Assets.xcassets (BiebColor)
     type        App/DesignSystem/Tokens/BiebTextStyle.swift, Plus Jakarta Sans
     spacing     BiebSpacing.swift, BiebScreenLayout.panel
     radii       BiebRadius.swift
     sizes       BiebSize.swift
     components  App/DesignSystem/Styles (buttons) and Components (sheet, card, stage, dotted row,
                 progress bar, text field)
   The app is dark only; so is the tool. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("fonts/PlusJakartaSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("fonts/PlusJakartaSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("fonts/PlusJakartaSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("fonts/PlusJakartaSans-Bold.woff2") format("woff2"); }

:root {
  /* BiebColor */
  --canvas: #000000;
  --sheet: #1A1A1A;
  --surface: #242424;
  --surface-raised: #FFFFFF;
  --icon-tile-sunken: #1A1A1A;
  --control-fill: rgb(255 255 255 / 0.2);
  --text-primary: #FFFFFF;
  --text-secondary: #C6C6C6;
  --text-detail: #DBDBDB;
  --text-inverse: #202020;
  --brand-accent: #C6DB4B;
  --progress-track: #242424;
  --warning-accent: #FF4444;

  /* BiebSpacing */
  --xs: 4px;
  --sm: 8px;
  --md: 12px;
  --lg: 16px;
  --xl: 24px;
  --xxl: 36px;
  --xxxl: 48px;

  /* BiebRadius */
  --radius-sheet: 24px;
  --radius-card: 10px;
  --radius-stage: 8px;
  --radius-tile: 4px;

  /* BiebSize */
  --size-input-row: 56px;
  --size-result-row: 75px;
  --size-button: 52px;
  --size-min-tap: 44px;
  --size-progress-bar: 5px;
  --size-leg-dot: 4px;
  --size-stage-border: 1.5px;
  --size-button-border: 1px;

  /* BiebTextStyle: 0.4% open tracking on the 17- and 14-point styles */
  --open-tracking: 0.004em;

  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 25.5px;
  letter-spacing: var(--open-tracking);
}
p, h1, h2, h3, dl, dd { margin: 0; }
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- BiebTextStyle ---------- */

.distance        { font-weight: 700; font-size: 82px; line-height: 108.24px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.title           { font-weight: 700; font-size: 32px; line-height: 42.24px; letter-spacing: 0; }
.title-strong    { font-weight: 700; font-size: 28px; line-height: 36.4px; letter-spacing: 0; }
.heading         { font-weight: 700; font-size: 22px; line-height: 33px; }
.heading-strong  { font-weight: 700; font-size: 22px; line-height: 28.6px; letter-spacing: 0; }
.emphasis        { font-weight: 600; font-size: 17px; line-height: 25.5px; }
.time            { font-weight: 700; font-size: 17px; line-height: 25.5px; font-variant-numeric: tabular-nums; }
.body-strong     { font-weight: 500; font-size: 17px; line-height: 25.5px; }
.body            { font-weight: 400; font-size: 17px; line-height: 25.5px; }
.secondary       { font-weight: 400; font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.secondary-strong { font-weight: 500; font-size: 14px; line-height: 21px; }
.warning         { color: var(--warning-accent); }

/* ---------- Styles: buttons (BiebSize.button high, BiebRadius.card, emphasis) ---------- */

.button {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--size-button);
  padding: var(--md) var(--lg);
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 17px;
  line-height: 25.5px;
  text-align: center;
  cursor: pointer;
}
.button:active:not(:disabled) { opacity: 0.8; }                    /* configuration.isPressed */
.button:disabled { opacity: 0.5; cursor: not-allowed; }             /* BiebOpacity.unselected */
.button.primary { background: var(--text-primary); color: var(--text-inverse); }   /* PrimaryButtonStyle */
.button.secondary { background: var(--surface); }                                   /* SecondaryButtonStyle */
.button.control { background: var(--control-fill); }                                /* ControlButtonStyle */
.button.outline { box-shadow: inset 0 0 0 var(--size-button-border) var(--text-primary); } /* OutlineButtonStyle */
/* TextButtonStyle has no fill. On a desk the header's text buttons size to their title. */
.button.inline { width: auto; min-height: var(--size-min-tap); padding: var(--sm) var(--md); }
@media (hover: hover) {
  .button:hover:not(:disabled) { opacity: 0.9; }
}

/* ---------- Components ---------- */

/* SheetChrome inside BiebScreenLayout.panel: 24 margin and top, 16 between lines. */
.sheet {
  background: var(--sheet);
  border-radius: var(--radius-sheet);
  padding: var(--xl);
  display: flex;
  flex-direction: column;
  gap: var(--xl);
}
.sheet .content { display: flex; flex-direction: column; gap: var(--lg); padding: var(--sm) 0; }
.sheet .actions { display: flex; flex-direction: column; gap: var(--md); }

/* BiebCard: surface, 12 all round, BiebRadius.card. */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--md);
  display: flex;
  flex-direction: column;
  gap: var(--xs);
}
/* StageRowView: surface, 12 all round, BiebRadius.stage; the one to start with has a white outline. */
.stage {
  background: var(--surface);
  border-radius: var(--radius-stage);
  padding: var(--md);
  display: flex;
  align-items: center;
  gap: var(--lg);
}
.stage.highlighted { box-shadow: inset 0 0 0 var(--size-stage-border) var(--text-primary); }
.stage .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--xs); }

/* SectionHeaderView: body text with 12 above it. */
.section-header { padding-top: var(--md); font-weight: 400; font-size: 17px; line-height: 25.5px; }
.list { display: flex; flex-direction: column; gap: var(--sm); }

/* DottedRowView: secondary text, a 4-point white dot before every fact after the first. */
.dotted { display: flex; flex-wrap: wrap; align-items: center; gap: var(--xs) 10px; } /* BiebSpacing.legGap */
.dotted span { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.dotted span + span::before { content: ""; width: var(--size-leg-dot); height: var(--size-leg-dot); border-radius: 50%; background: var(--text-primary); }
.dotted span.warning { color: var(--warning-accent); }

/* RouteOptionRowView: a result row, BiebSize.resultRow high, 12 above and below. */
.result { min-height: var(--size-result-row); padding: var(--md) 0; display: flex; flex-direction: column; gap: var(--xs); }
.result + .result { border-top: 1px solid var(--surface); }
.result .times { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sm); }

/* ProgressBannerView's bar: a 5-point capsule, brand accent on the progress track. */
.progress { height: var(--size-progress-bar); border-radius: 999px; background: var(--progress-track); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--brand-accent); transition: width 1s linear; }
.sheet .progress { background: var(--surface); } /* on the sheet the track must still show */
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }

/* BiebTextField: surface, BiebSize.inputRow high, 16 inside, BiebRadius.card. */
.field { display: flex; flex-direction: column; gap: var(--sm); }
.field > span { font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.field input, .field select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: var(--size-input-row);
  padding: 0 var(--lg);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 25.5px;
  caret-color: var(--text-primary);
}
.field select {
  padding-right: var(--xxl);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23C6C6C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--lg) center;
}
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--surface) inset; -webkit-text-fill-color: var(--text-primary); }

/* ---------- the desk ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lg);
  flex-wrap: wrap;
  padding: var(--md) var(--xl);
}
.brand { display: flex; align-items: center; gap: var(--md); min-width: 0; }
.brand img { display: block; height: 32px; width: auto; }
.brand .who { color: var(--text-secondary); font-size: 14px; line-height: 21px; }
.topbar nav { display: flex; gap: var(--xs); margin-left: auto; }

main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--lg) var(--xl) var(--xxxl);
}
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--xl); align-items: start; }
.column { display: flex; flex-direction: column; gap: var(--sm); min-width: 0; }
.column > .sheet + * { margin-top: var(--md); }
.narrow { width: 100%; max-width: 480px; margin: var(--xxxl) auto 0; }

.statusline { padding: var(--md) var(--xl) var(--xl); font-size: 14px; line-height: 21px; color: var(--text-secondary); text-align: center; }

@media (max-width: 820px) {
  .desk { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .topbar { padding: var(--md) var(--lg); }
  main { padding: var(--sm) var(--lg) var(--xxl); }
  .narrow { margin-top: var(--lg); }
  .brand .who { display: none; }
  .distance { font-size: 64px; line-height: 84.5px; }
}
