/* catintarzie.ro
   Direction: exact, civic, a little dry. The world is the station departure board:
   dark board, white figures, one ember light. Chrome stays neutral (graphite), the
   colour goes to the delay line and the banner figure. Times and delays are set in
   mono like a board, always with a status dot: that is the signature.
   Grid: 4px. Radii: control 8, card 12, panel 16. Weights 400/500/600. */

@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-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+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  /* graphite ramp, light */
  --page: #fafafa;
  --card: #ffffff;
  --raised: #f4f4f5;
  --hairline: rgba(23, 23, 23, 0.08);
  --text: #171717;
  --text-2: #525252;
  --muted: #737373;
  --grid: #ececee;
  --axis: #d4d4d8;
  --bar: #d4d4d8;
  /* the one accent: ember, from the board light */
  --accent: #eb6834;
  --accent-wash: rgba(235, 104, 52, 0.10);
  /* status, toned to sit inside the ramp; always paired with the figure */
  --good: #16a34a; --warning: #ca8a04; --serious: #ea580c; --critical: #dc2626;
  /* chrome: the board, dark in both themes */
  --board: #0f0f10;
  --board-2: #19191b;
  --board-raised: #232325;
  --board-hairline: rgba(237, 237, 237, 0.08);
  --board-text: #ededed;
  --board-text-2: #a1a1a6;
  --board-accent: #f08a5d;

  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #141415; --card: #19191b; --raised: #232325; --hairline: rgba(237, 237, 237, 0.08);
    --text: #ededed; --text-2: #a1a1a6; --muted: #85858b;
    --grid: #232325; --axis: #333336; --bar: #3f3f46;
    --accent: #f07a45; --accent-wash: rgba(240, 122, 69, 0.12);
    --good: #4cc38a; --critical: #e5484d;
    --board-2: #0f0f10; --board: #0b0b0c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #141415; --card: #19191b; --raised: #232325; --hairline: rgba(237, 237, 237, 0.08);
  --text: #ededed; --text-2: #a1a1a6; --muted: #85858b;
  --grid: #232325; --axis: #333336; --bar: #3f3f46;
  --accent: #f07a45; --accent-wash: rgba(240, 122, 69, 0.12);
  --good: #4cc38a; --critical: #e5484d;
  --board-2: #0f0f10; --board: #0b0b0c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 15px/22px var(--sans); }
h1, h2, h3 { font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: text-decoration-color 150ms var(--ease); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono, td.num, .delay { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* header: the board */
.site-header { background: var(--board); color: var(--board-text); border-bottom: 1px solid var(--board-hairline); }
.header-row { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--board-text); text-decoration: none; font-size: 17px; font-weight: 500; line-height: 1; }
.brand img { display: block; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--board-text-2); text-decoration: none; height: 32px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px;
  transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.nav a:hover { color: var(--board-text); }
.nav a[aria-current] { color: var(--board-text); background: var(--board-raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.search { position: relative; margin-left: auto; flex: 0 1 280px; }
.search input { width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--board-hairline); background: var(--board-2);
  color: var(--board-text); font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--board-text-2); }
.search input:focus { outline: none; border-color: var(--board-text-2); }
.suggest { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: var(--card); color: var(--text); border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.suggest a { display: flex; gap: 8px; align-items: baseline; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 20px; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--raised); }
.suggest .kind { flex: 0 0 40px; color: var(--muted); font-size: 12px; }

/* banner: still the board, one step lighter; the figure carries the accent */
.banner { background: var(--board-2); color: var(--board-text); padding: 40px 0 48px; }
.eyebrow { color: var(--board-text-2); font-size: 14px; line-height: 20px; margin-bottom: 12px; }
.banner h1 { font-size: 34px; line-height: 40px; letter-spacing: -0.01em; max-width: 26em; text-wrap: balance; }
.hero { color: var(--board-accent); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.banner-sub { margin-top: 16px; color: var(--board-text-2); font-size: 16px; line-height: 24px; max-width: 40em; }
.banner-sub b { color: var(--board-text); font-weight: 500; }
.banner-note { margin-top: 8px; color: var(--board-text-2); font-size: 14px; line-height: 20px; }
.notice { margin-top: 16px; padding: 12px 16px; border-radius: 8px; background: var(--board-raised); border: 1px solid var(--board-hairline);
  color: var(--board-text); font-size: 14px; line-height: 20px; max-width: 46em; }

/* page */
.page { padding-top: 32px; padding-bottom: 64px; }
.page-title { font-size: 28px; line-height: 32px; margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 20px; }
.card-label { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text-2); }
.card-value { margin-top: 8px; font-size: 30px; line-height: 32px; font-weight: 500; font-variant-numeric: tabular-nums; }
.card-note { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--hairline); border-radius: 16px; padding: 24px; margin-bottom: 24px; min-width: 0; }
.panel-head { margin-bottom: 20px; }
.panel-head h2 { font-size: 17px; line-height: 24px; }
.panel-head p { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
.split .panel { margin-bottom: 24px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.two-col .panel { margin-bottom: 24px; }
.empty { color: var(--muted); }
.later { color: var(--text-2); font-size: 14px; line-height: 20px; }
.later b { font-weight: 500; color: var(--text); }

/* tables */
.table-scroll { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 16px; border-bottom: 1px solid var(--axis); padding: 8px 12px 8px 0; white-space: nowrap; }
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--grid); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr { transition: background-color 120ms var(--ease); }
tbody tr:hover { background: var(--raised); }
.num { text-align: right; white-space: nowrap; }
td.route { color: var(--text-2); min-width: 14em; }
tr.status-passed td { color: var(--muted); }
.delay { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.delay::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--axis); }
.delay.good::before { background: var(--good); }
.delay.warning::before { background: var(--warning); }
.delay.serious::before { background: var(--serious); }
.delay.critical::before { background: var(--critical); }
.table-view { margin-top: 16px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--text-2); width: max-content; }
.table-view table { margin-top: 12px; }
.route-mobile, .status-mobile, .arr-mobile { display: none; }
td a { white-space: nowrap; }

/* main chart: the delay line */
.lc { margin: 0; padding-left: 40px; }
.lc-area { position: relative; height: 280px; }
.lc-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.lc-tick.base { border-top-color: var(--axis); }
.lc-tick span { position: absolute; right: calc(100% + 8px); top: -8px; font: 12px/16px var(--mono); color: var(--muted); }
.lc-plot { position: absolute; inset: 0; }
.lc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc-wash { fill: var(--accent-wash); stroke: none; }
.lc-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
.lc-label { position: absolute; transform: translate(-100%, -28px); font: 500 12px/16px var(--mono); color: var(--text); white-space: nowrap; }
.lc-hits { position: absolute; inset: 0; display: flex; }
.lc-hit { flex: 1; min-width: 0; transition: background-color 120ms var(--ease); }
.lc-hit:hover, .lc-hit:focus-visible { background: var(--accent-wash); outline: none; }
.lc-x { position: relative; height: 16px; margin-top: 8px; }
.lc-x span { position: absolute; transform: translateX(-50%); font: 12px/16px var(--mono); color: var(--muted); white-space: nowrap; }
.lc-x span:last-child { transform: translateX(-100%); }

/* ranked list with thin bars; neutral, the worst row in the accent */
.hbars { display: grid; gap: 16px; }
.hbar { display: grid; gap: 4px; }
.hbar-label { font-size: 14px; line-height: 20px; }
.hbar-label .muted { font-size: 13px; }
.hbar-track { display: flex; align-items: center; gap: 8px; }
.hbar-fill { height: 8px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 4px; }
.hbar-fill.lead { background: var(--accent); }
.hbar-value { font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; }

.tooltip { position: fixed; z-index: 20; pointer-events: none; max-width: 280px; padding: 8px 12px; border-radius: 8px;
  background: var(--board-2); color: var(--board-text); border: 1px solid var(--board-hairline); font-size: 13px; line-height: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); }

/* lists, search */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 8px; text-decoration: none;
  background: var(--page); transition: background-color 150ms var(--ease); }
.chips a:hover { background: var(--raised); }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--grid); }
.search-big { display: flex; gap: 8px; margin-bottom: 24px; max-width: 560px; }
.search-big input { flex: 1; height: 44px; padding: 0 16px; font: inherit; border: 1px solid var(--axis); border-radius: 8px; background: var(--card); color: var(--text); }
.search-big button { height: 44px; padding: 0 20px; font: inherit; font-weight: 500; border: 0; border-radius: 8px; background: var(--text); color: var(--page); cursor: pointer;
  transition: transform 120ms var(--ease); }
.search-big button:active { transform: scale(0.98); }
.prose { max-width: 720px; }
.prose h2 { font-size: 20px; line-height: 28px; margin-top: 40px; margin-bottom: 12px; }
.prose ul { padding-left: 20px; margin: 0; }
.prose li { margin: 8px 0; }
.prose p { margin: 12px 0; }
.prose b { font-weight: 500; }

.site-footer { border-top: 1px solid var(--hairline); padding: 24px 0 40px; color: var(--muted); font-size: 13px; line-height: 20px; }
.site-footer p + p { margin-top: 4px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .header-row { height: auto; flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; }
  .search { flex: 1 1 100%; order: 3; }
  .nav a { padding: 0 8px; }
  .banner { padding: 32px 0 40px; }
  .banner h1 { font-size: 26px; line-height: 32px; }
  .cards { gap: 8px; }
  .card { padding: 16px; }
  .card-value { font-size: 24px; line-height: 28px; }
  .panel { padding: 20px 16px; border-radius: 12px; }
  .table-scroll { margin: 0 -16px; padding: 0 16px; }
  .lc-area { height: 200px; }
  .lc-x span.odd { display: none; }
  td.route { min-width: 10em; }
  /* phone: train + route | departure (arrival below) | delay (status below) */
  table.today { table-layout: fixed; }
  table.today th:nth-child(2), table.today td.route,
  table.today th:nth-child(3), table.today td:nth-child(3),
  table.today th:nth-child(5), table.today td:nth-child(5),
  table.today th:last-child, table.today td.status { display: none; }
  table.today th:nth-child(4) { width: 76px; }
  table.today th:nth-child(6) { width: 92px; }
  table.today td { overflow-wrap: anywhere; }
  table.today .arr-mobile { display: block; font: 12px/20px var(--sans); color: var(--muted); white-space: nowrap; }
  table.today .route-mobile, table.today .status-mobile { display: block; font-size: 13px; line-height: 20px; color: var(--muted); font-family: var(--sans); white-space: normal; }
}

/* maps */
.banner-tight { padding: 32px 0 36px; }
.map-panel { padding: 16px; }
.map-panel .panel-head { padding: 8px 8px 0; margin-bottom: 16px; }
.map { height: min(70vh, 640px); min-height: 360px; border-radius: 8px; background: var(--raised); z-index: 0; }
.map-train { height: min(55vh, 480px); min-height: 320px; }
.map-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 8px 0; padding: 0; font-size: 14px; line-height: 20px; }
.map-note { margin: 8px 8px 4px; font-size: 13px; line-height: 20px; }
.leaflet-container { font: 400 13px/18px var(--sans); }
.leaflet-tooltip { background: var(--card); color: var(--text); border: 1px solid var(--hairline); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); padding: 8px 10px; }
.leaflet-tooltip-top::before { border-top-color: var(--card); }
.map-tip p { margin: 0; }
.map-tip-title { font-weight: 500; }
.map-tip .delay { font-size: 13px; }
.leaflet-control-attribution { font-size: 11px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(25, 25, 27, 0.8); color: var(--muted); }
  :root:not([data-theme="light"]) .leaflet-control-attribution a { color: var(--text-2); }
  :root:not([data-theme="light"]) .leaflet-bar a { background: var(--card); color: var(--text); border-bottom-color: var(--hairline); }
}
@media (max-width: 640px) { .map { height: 60vh; } .map-panel { padding: 8px; } }
/* OSM tiles toned toward the graphite ramp so the delay dots carry the colour */
.map-tiles { filter: saturate(0.35) contrast(0.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-tiles { filter: invert(1) hue-rotate(180deg) saturate(0.25) brightness(0.85) contrast(0.9); }
}
:root[data-theme="dark"] .map-tiles { filter: invert(1) hue-rotate(180deg) saturate(0.25) brightness(0.85) contrast(0.9); }

/* train page: the facts row, set like a departure board */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1px; margin: 24px 0 0;
  background: var(--board-hairline); border: 1px solid var(--board-hairline); border-radius: 12px; overflow: hidden; }
.fact { background: var(--board); padding: 14px 16px; min-width: 0; }
.fact dt { color: var(--board-text-2); font-size: 13px; line-height: 18px; }
.fact dd { margin: 0; }
.fact-main { margin-top: 6px !important; color: var(--board-text); font-size: 18px; line-height: 24px; font-weight: 500;
  overflow-wrap: anywhere; }
.fact-main a { text-decoration-color: var(--board-hairline); }
.fact-sub { margin-top: 2px !important; color: var(--board-text-2); font-size: 13px; line-height: 18px; }
.fact-sub b { color: var(--board-accent); font-weight: 500; }
.board-muted { color: var(--board-text-2); opacity: 0.75; }
.facts-note { margin-top: 10px; color: var(--board-text-2); font-size: 12px; line-height: 16px; }
.live-pill, .done-pill { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; vertical-align: 1px; }
.live-pill { background: rgba(76, 195, 138, 0.16); color: #6fd3a2; }
.live-pill::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.done-pill { background: var(--board-raised); color: var(--board-text-2); }
.map-train { height: 280px; min-height: 0; }
@media (max-width: 640px) { .map-train { height: 240px; } .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fact-main { font-size: 16px; } }
