:root{color-scheme:dark;--bg:#0b1018;--panel:#111a26;--line:#344255;--text:#f7f9fc;--muted:#c0cad8;--yellow:#ffda58;--new-time:#59d8f2;--green:#63e6a0;--red:#ff8291;--font:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);line-height:1.5}a{color:var(--yellow)}a:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}.skip-link{position:absolute;top:-100px;left:12px;background:var(--yellow);color:#111;padding:10px 16px;z-index:5}.skip-link:focus{top:12px}.site-shell{width:min(100%,1400px);margin:0 auto;padding:24px 32px}.site-header{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding-bottom:20px}.brand{font-size:1.75rem;font-weight:850;letter-spacing:-.045em;color:var(--yellow)}.brand-dot{color:var(--text)}.header-note{font-size:.75rem;letter-spacing:.09em;color:var(--muted);font-weight:700;display:flex;align-items:center;gap:12px}.demo-chip{color:#0b1018;background:var(--yellow);padding:3px 7px;border-radius:3px;font-size:.7rem;letter-spacing:.03em}.page-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:36px 0 24px}.eyebrow{margin:0 0 4px;color:var(--muted);font-size:.75rem;letter-spacing:.12em;font-weight:750}.page-heading h1{font-size:clamp(1.65rem,3vw,2.5rem);line-height:1.2;margin:0 0 12px;font-weight:800}.section-title{margin:0;color:var(--yellow);font-size:1.1rem;font-weight:750}.sample-note{margin:0;color:var(--muted);font-size:.85rem;text-align:right}.board{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--panel)}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}thead{background:#1a2736}th{color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.07em;padding:15px 18px;font-weight:750}td{padding:16px 18px;border-top:1px solid var(--line);font-size:1rem}tbody tr:first-child td{border-top:0}tbody tr:hover{background:#1a2635}.cell-time{font-size:1.08rem;font-weight:800;white-space:nowrap;width:12%}.cell-destination{font-weight:700;width:38%}.cell-track{font-weight:700;width:11%}.cell-train{color:var(--muted);width:15%}.cell-status{width:24%;white-space:nowrap}.status{display:inline-flex;align-items:center;gap:8px;font-weight:700}.status-dot{width:9px;height:9px;border-radius:50%;background:var(--green);flex:none}.status-normal{color:var(--muted)}.status-delayed{color:var(--new-time)}.status-delayed .status-dot{background:var(--new-time)}.status-cancelled{color:var(--red);text-transform:uppercase}.status-cancelled .status-dot{background:var(--red)}.new-time{font-size:1.1rem;font-weight:850;color:var(--new-time)}.status-delayed .cell-time{text-decoration:line-through}.status-delayed .cell-time time{text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:var(--yellow)}.mobile-train,.track-label{display:none}.site-footer{display:flex;justify-content:space-between;gap:16px;padding:22px 0;color:var(--muted);font-size:.78rem}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.site-shell{padding:14px 12px}.site-header{padding-bottom:14px}.brand{font-size:1.5rem}.header-note{font-size:.64rem;gap:7px}.page-heading{display:block;margin:26px 2px 18px}.page-heading h1{font-size:1.65rem}.section-title{font-size:1rem}.sample-note{text-align:left;margin-top:12px;font-size:.8rem}.board{border-radius:8px}thead{display:none}table,tbody,tr,td{display:block;width:100%}tbody tr{display:grid;grid-template-columns:65px minmax(0,1fr) auto;grid-template-areas:"time dest track" "time dest status";column-gap:10px;row-gap:2px;align-items:center;padding:14px 12px;border-top:1px solid var(--line)}tbody tr:first-child{border-top:0}td{border:0;padding:0;min-width:0}.cell-time{grid-area:time;align-self:start;font-size:1.02rem;padding-top:2px}.cell-destination{grid-area:dest;align-self:start;font-size:.98rem;overflow-wrap:anywhere}.mobile-train{display:block;color:var(--muted);font-weight:500;font-size:.78rem;margin-top:2px}.cell-track{grid-area:track;align-self:start;justify-self:end;font-size:.85rem;white-space:nowrap}.track-label{display:inline;color:var(--muted);font-weight:500}.cell-train{display:none}.cell-status{grid-area:status;justify-self:end;font-size:.8rem;white-space:nowrap}.status{gap:5px}.status-dot{width:7px;height:7px}.new-time{font-size:.9rem}.desktop-status{display:none}.site-footer{display:block}.site-footer span{display:block;margin-bottom:4px}}
@media(max-width:380px){tbody tr{grid-template-columns:55px minmax(0,1fr) auto;column-gap:7px;padding:13px 9px}.cell-time{font-size:.95rem}.cell-destination{font-size:.92rem}.cell-track{font-size:.78rem}.cell-status{font-size:.75rem}.header-note{letter-spacing:0}}
/* Mobilfix: gridceller får inte behålla desktopkolumnernas bredder. */
@media (max-width:700px) {
  .table-scroll, .board, table, tbody { width:100%; max-width:100%; min-width:0; }
  tbody tr {
    grid-template-columns: 64px minmax(0,1fr) 100px;
    grid-template-areas: "time dest track" "time dest status";
    column-gap: 10px;
    padding: 12px 10px;
    min-width:0;
  }
  tbody td.cell-time, tbody td.cell-destination, tbody td.cell-track,
  tbody td.cell-train, tbody td.cell-status { width:auto; min-width:0; max-width:100%; }
  .cell-destination { overflow-wrap:normal; word-break:normal; }
  .cell-track { justify-self:end; text-align:right; }
  .cell-status { justify-self:stretch;align-self:center;display:flex;align-items:center;
    justify-content:center;text-align:center;white-space:normal;line-height:1.3; }
  .cell-status .status { justify-content:center; }
  .status-delayed .destination-name,
  .status-cancelled .destination-name { color:var(--text); }
}
@media (max-width:380px) {
  tbody tr { grid-template-columns:56px minmax(0,1fr) 88px; column-gap:7px; }
  .cell-status { font-size:.72rem; }
}

/* TågNu: mindre förseningar (1–9 minuter) */
tr.status-minor-delay .cell-time time { color:var(--new-time); text-decoration:none; }
tr.status-minor-delay .status { color:var(--new-time); }
tr.status-minor-delay .status-dot { background:var(--new-time); }
tr.status-delayed .cell-time time { color:var(--new-time); text-decoration:line-through; text-decoration-thickness:2px; text-decoration-color:var(--new-time); }

/* Inställda tåg: endast planerad tid överstruken. */
tr.status-cancelled .cell-time time {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}
tr.status-cancelled .destination-name,
tr.status-cancelled .cell-track,
tr.status-cancelled .cell-train,
tr.status-cancelled .mobile-train,
tr.status-cancelled .cell-track .track-label {
  color: var(--red);
  text-decoration: none;
}
tr.status-cancelled .cell-status .status-cancelled {
  color: var(--red);
  text-decoration: none;
}

/* Tidigarelagda avgångar får samma färg som nya tiden. */
tr.status-early .cell-time time { color:var(--new-time); text-decoration:none; }
