/* My Career Agent: the transit world.
   An ink rail over an off-white working ground. Each company owns one line colour, reused wherever
   that company appears. State colours appear only where they carry meaning, never on lines. */

@font-face { font-family: "Overpass"; src: url("/fonts/overpass-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass"; src: url("/fonts/overpass-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ground and ink */
  --rail: #15181d;
  --rail-2: #232831;
  --rail-ink: #ecebe6;
  --rail-quiet: #a9aeb7;
  --ground: #f2f3f5;
  --sheet: #ffffff;
  --ink: #17191d;
  --quiet: #565a62;
  --rule: #dcdfe4;
  --rule-strong: #c3c7ce;
  --focus: #0a63c9;

  /* state: meaning only */
  --go: #17703f;    --go-tint: #e3f1e8;
  --hold: #8a5a00;  --hold-tint: #fbf0d9;
  --stop: #b0261d;  --stop-tint: #f9e6e3;

  /* neutral fills and edges, so both themes come from one set of names */
  --fill: #e8eaee;          /* quiet hover, info message, chips at rest */
  --fill-2: #eaecf0;        /* neutral tag */
  --hover: #f8f9fb;         /* button hover */
  --row-hover: #f9fafb;
  --th: #f7f8fa;
  --edge-hover: #8c929b;
  --placeholder: #6b6f77;
  --primary: var(--rail);   /* the solid button: ink on light, paper on dark */
  --primary-ink: var(--rail-ink);
  --primary-hover: #2a3039;
  --ring: rgba(10, 99, 201, .18);
  --shade: 21, 24, 29;      /* rgb of shadows */
  --selection: #cfe0f6;
  --go-ink: #0f5530;   --go-edge: #c6e3d1;
  --hold-ink: #6b4500; --hold-edge: #efdcae;
  --stop-ink: #8c1d16; --stop-edge: #f0c9c4;
  --skel-a: #e6e8ec; --skel-b: #f1f2f5;

  /* company lines: one per company, the same hue in both themes, lightened for dark */
  --l0: #0b5cad; --l1: #7c3aad; --l2: #b3186d; --l3: #00796b; --l4: #7a5230; --l5: #3f4a5a; --l6: #0e7490;
  --line-ink: #ffffff;      /* text on a line-coloured badge */

  /* the interchange */
  --interchange: #15181d;
  --interchange-ink: #ecebe6;

  --display: "Overpass", "Public Sans", ui-sans-serif, sans-serif;
  --text: "Public Sans", ui-sans-serif, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-pill: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--rail);
  caret-color: var(--focus);
}

/* Dark: the evening laptop session. The rail drops below the ground so it still reads as the
   frame; lines lighten to keep their hue at night; the solid button turns to paper. theme.js sets
   data-theme from the saved choice or the system setting before the page draws. */
:root[data-theme="dark"] {
  --rail: #0b0d10; --rail-2: #1d2128; --rail-ink: #ecebe6; --rail-quiet: #9ba1ab;
  --ground: #111317; --sheet: #181b20; --ink: #e8e7e2; --quiet: #a3a8b1;
  --rule: #2a2f37; --rule-strong: #3b414b; --focus: #6aa8ff;
  --go: #5cc98a;   --go-tint: #12291c;   --go-ink: #8fdcae;   --go-edge: #1f4a31;
  --hold: #e0a93a; --hold-tint: #2b2210; --hold-ink: #f0c770; --hold-edge: #4d3b14;
  --stop: #f0776c; --stop-tint: #2f1614; --stop-ink: #f6a39b; --stop-edge: #5a2420;
  --fill: #22262d; --fill-2: #252a32; --hover: #1e2228; --row-hover: #1c1f25; --th: #1b1e24;
  --edge-hover: #5b626d; --placeholder: #8a909a;
  --primary: #ecebe6; --primary-ink: #111317; --primary-hover: #ffffff;
  --ring: rgba(106, 168, 255, .28); --shade: 0, 0, 0; --selection: #2b4a78;
  --skel-a: #1f2329; --skel-b: #282d34;
  --l0: #6bb4ff; --l1: #d08fff; --l2: #ff73b9; --l3: #67c5b4; --l4: #d4a783; --l5: #a5b2c5; --l6: #68bedd;
  --line-ink: #111317;
  --interchange: #ecebe6; --interchange-ink: #111317;
  color-scheme: dark;
  accent-color: var(--focus);
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; color: var(--ink); background: var(--ground);
  font: 400 15px/1.5 var(--text); font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--selection); color: var(--ink); }
.rail ::selection { background: #3a4a62; color: #fff; }

/* scrollbars carry the palette */
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 10px; border: 2px solid var(--ground); }
::-webkit-scrollbar-track { background: transparent; }

:focus { outline: none; }
/* main takes focus after each route change for screen readers; it is not a control */
main:focus-visible, [tabindex="-1"]:focus-visible { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.rail :focus-visible { outline-color: #8fbfff; }

a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sheet); padding: 8px 12px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- rail ---------- */
.rail { background: var(--rail); color: var(--rail-ink); position: sticky; top: 0; z-index: 5; }
.rail-in { max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); display: flex; align-items: center; gap: var(--s4); min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 16px/1 var(--display); letter-spacing: -0.01em; color: var(--rail-ink); text-decoration: none; white-space: nowrap; }
.brand svg { flex: none; }
.rail nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.rail nav::-webkit-scrollbar { display: none; }
.rail nav a { color: var(--rail-quiet); text-decoration: none; font: 600 14px/1 var(--display); padding: 12px 10px 10px; border-radius: var(--r-sm); white-space: nowrap; position: relative; }
.rail nav a:hover { color: var(--rail-ink); background: var(--rail-2); }
.rail nav a[aria-current="page"] { color: var(--rail-ink); }
.rail nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--rail-ink); }
.rail nav .count { display: inline-block; min-width: 18px; padding: 2px 5px 1px; margin-left: 6px; border-radius: var(--r-pill); background: var(--rail-2); color: var(--rail-ink); font-size: 11px; text-align: center; }
.rail .who { color: var(--rail-quiet); font-size: 13px; white-space: nowrap; }
.rail .who button { color: var(--rail-quiet); background: none; border: 0; padding: 6px 8px; font: inherit; cursor: pointer; border-radius: var(--r-sm); }
.rail .who button:hover { color: var(--rail-ink); background: var(--rail-2); }
.rail .who { display: flex; align-items: center; gap: 2px; }
.rail .theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; }
.rail .theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .rail .who .email { display: none; } .brand span { display: none; } }
@media (max-width: 640px) {
  .rail-in { flex-wrap: wrap; row-gap: 0; padding-top: 4px; min-height: 0; }
  .rail .who button { padding: 4px 8px; }
  .rail .who { margin-left: auto; }
  .rail nav { order: 3; flex: 1 1 100%; flex-wrap: wrap; overflow: visible; margin: 0 -10px 4px; }
  .rail nav a { padding: 7px 8px 6px; font-size: 13.5px; }
}

/* ---------- page ---------- */
main { max-width: 1120px; margin: 0 auto; padding: var(--s6) var(--s4) 96px; }
.page-head { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head .grow { flex: 1 1 320px; min-width: 0; }
h1 { font: 800 32px/1.08 var(--display); letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h2 { font: 750 19px/1.2 var(--display); letter-spacing: -0.01em; margin: var(--s7) 0 var(--s3); text-wrap: balance; }
h3 { font: 700 15px/1.3 var(--display); margin: 0; }
.lede { color: var(--quiet); margin: var(--s2) 0 0; max-width: 68ch; }
.note { color: var(--quiet); font-size: 13.5px; }
.measure { max-width: 70ch; }
p { margin: var(--s2) 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

/* sheets: one level only, never nested */
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: var(--s4) var(--s5); }
.sheet + .sheet { margin-top: var(--s3); }
.sheet > h2:first-child, .sheet > .sheet-head:first-child h2 { margin-top: 0; }
.sheet-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.sheet-head h2 { margin: 0; flex: 1 1 auto; }
@media (max-width: 560px) { .sheet { padding: var(--s4); } main { padding-top: var(--s5); } h1 { font-size: 25px; } }

.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: var(--s3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }
.split { display: grid; grid-template-columns: 220px 1fr; gap: var(--s6); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--s4); } }

/* ---------- controls ---------- */
label, .label { display: block; font: 600 13px/1.3 var(--text); color: var(--ink); margin-bottom: 6px; }
label .note, .label .note { font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm); padding: 9px 11px; min-height: 40px;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover, select:hover, textarea:hover { border-color: var(--edge-hover); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--ring); border-radius: var(--r-sm); }
input[aria-invalid="true"] { border-color: var(--stop); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; }
input[type="file"] { padding: 7px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.check input { margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 650 14px/1 var(--display); padding: 11px 14px 9px; min-height: 40px; border-radius: var(--r-sm);
  border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out), transform .1s var(--ease-out);
}
.btn:hover { border-color: var(--edge-hover); background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--stop); }
.btn.danger.armed { background: var(--stop); border-color: var(--stop); color: var(--sheet); }
.btn.quiet { border-color: transparent; background: transparent; padding-left: 8px; padding-right: 8px; }
.btn.quiet:hover { background: var(--fill); }
.btn.small { min-height: 32px; padding: 8px 10px 6px; font-size: 13px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 600 13px/1 var(--display); padding: 9px 12px 7px; border-radius: var(--r-pill); border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--quiet); cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--edge-hover); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip .n { margin-left: 4px; opacity: .75; }

/* status tags: state colour carries meaning */
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px/1 var(--text); padding: 5px 8px 4px; border-radius: var(--r-sm); background: var(--fill-2); color: var(--quiet); white-space: nowrap; }
.tag.go { background: var(--go-tint); color: var(--go); }
.tag.hold { background: var(--hold-tint); color: var(--hold); }
.tag.stop { background: var(--stop-tint); color: var(--stop); }
.tag svg { width: 13px; height: 13px; }

/* messages */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); margin: var(--s3) 0; border: 1px solid transparent; }
.msg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.msg.go { background: var(--go-tint); color: var(--go-ink); border-color: var(--go-edge); }
.msg.hold { background: var(--hold-tint); color: var(--hold-ink); border-color: var(--hold-edge); }
.msg.stop { background: var(--stop-tint); color: var(--stop-ink); border-color: var(--stop-edge); }
.msg.info { background: var(--fill); color: var(--ink); }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg .btn { margin-left: auto; }

/* ---------- line identity ---------- */
/* Route badge: the company's name on its line colour, as on a transit sign. */
.route { display: inline-flex; align-items: center; gap: 7px; font: 750 13px/1 var(--display); letter-spacing: .01em; color: var(--line-ink);
  background: var(--line); padding: 6px 10px 5px 7px; border-radius: var(--r-pill); white-space: nowrap; text-decoration: none; }
.route::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--line-ink); flex: none; box-sizing: border-box; }
a.route:hover { text-decoration: underline; text-underline-offset: 3px; }
.bullet { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--line); background: var(--sheet); flex: none; vertical-align: -1px; }
.bullet.reached { background: var(--line); }
.co { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-family: var(--display); }

/* ---------- today: the date and today's line ---------- */
.today-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3) var(--s5); align-items: end; margin-bottom: var(--s5); }
.today-head h1 { font-size: 40px; letter-spacing: -0.035em; line-height: 1.02; }
.today-head h1 .wd { display: block; color: var(--quiet); font-size: 17px; letter-spacing: -0.005em; font-weight: 700; margin-bottom: 6px; }
.today-head .acts { display: flex; gap: var(--s2); align-items: center; }
.today-head .lede { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .today-head { grid-template-columns: 1fr; } .today-head h1 { font-size: 32px; } .today-head .acts { order: 3; } }

/* One stop per role in today's queue; a stop fills when you approve or apply. */
.dayline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: center; margin: 0 0 var(--s4); }
.dayline .count { font: 750 14px/1.2 var(--display); white-space: nowrap; }
.dayline .count b { font-size: 22px; letter-spacing: -0.02em; font-weight: 800; }
.dayline ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; position: relative; min-width: 0; }
.dayline ol::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: var(--r-pill); background: var(--rule-strong); }
.dayline ol::after { content: ""; position: absolute; left: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: var(--r-pill); background: var(--ink); width: var(--done, 0%); transition: width .6s var(--ease-out); }
.dayline li { position: relative; z-index: 1; flex: 1 1 0; display: flex; justify-content: center; }
.dayline li:first-child { justify-content: flex-start; } .dayline li:last-child { justify-content: flex-end; }
.dayline li span { width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--rule-strong); background: var(--ground); }
.dayline li.on span { border-color: var(--ink); background: var(--ink); }
.dayline li.skip span { border-style: dashed; }

/* ---------- today: window strip ---------- */
.strip { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; background: var(--rail); color: var(--rail-ink); border-radius: var(--r-md); padding: 10px 12px 10px 10px; margin-bottom: var(--s5); }
.strip .cap { display: inline-flex; align-items: center; gap: 8px; font: 750 14px/1 var(--display); padding: 9px 12px 7px; border: 2px solid var(--rail-ink); border-radius: var(--r-pill); white-space: nowrap; }
.strip .facts { display: flex; gap: var(--s4); flex-wrap: wrap; color: var(--rail-quiet); font-size: 13.5px; }
.strip .facts b { color: var(--rail-ink); font-weight: 650; }
.strip a { color: var(--rail-ink); text-decoration-color: var(--rail-quiet); margin-left: auto; font-size: 13.5px; }

/* ---------- today: queue ---------- */
.queue { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); }
.qrow { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s4); align-items: center; padding: 14px var(--s5) 14px var(--s4); transition: background .15s var(--ease-out); }
.qrow:hover { background: var(--row-hover); }
.queue > .qrow:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.queue > .qrow:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.qrow + .qrow { border-top: 1px solid var(--rule); }
h1.co-head { display: flex; gap: 12px; align-items: baseline; }
h1.co-head .bullet { width: 18px; height: 18px; border-width: 5px; flex: none; transform: translateY(-1px); }
h1.co-head .at { font-weight: 600; color: var(--quiet); }
.co-badge { margin-bottom: 10px; }
.co-badge .route { font-size: 14px; padding: 7px 12px 6px 8px; }
h3.badged { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qrow .fit { font: 800 26px/1 var(--display); text-align: right; letter-spacing: -0.03em; }
.qrow .fit small { display: block; font: 600 10.5px/1.3 var(--display); color: var(--quiet); letter-spacing: .06em; text-transform: uppercase; margin-top: 5px; }
.qrow .fit.low { color: var(--quiet); }
.qrow h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.qrow h3 .title { font-weight: 650; letter-spacing: -0.005em; }
.qrow .meta { color: var(--quiet); font-size: 13.5px; margin-top: 3px; }
.qrow .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.qrow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qrow .drawer { grid-column: 2 / -1; }
.qrow .drawer:empty { display: none; }
.qrow.done { opacity: .6; }
@media (max-width: 760px) {
  .qrow { grid-template-columns: 44px 1fr; padding: var(--s4); }
  .qrow .fit { font-size: 20px; }
  .qrow .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .qrow .drawer { grid-column: 1 / -1; }
}

.person { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.person:first-child { border-top: 0; }
.person .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.draft { white-space: pre-wrap; font: 14px/1.55 var(--text); background: var(--ground); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 14px; margin: 0; grid-column: 1 / -1; max-width: 75ch; }
@media (max-width: 560px) { .person { grid-template-columns: 1fr; } .person .acts { justify-content: flex-start; } }

/* ---------- applications: transit diagram ---------- */
.transit-wrap { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: var(--s4) var(--s4) var(--s3); overflow-x: auto; }
.transit { display: block; width: 100%; min-width: 600px; height: auto; font-family: var(--display); }
.transit.compact { min-width: 0; }
.transit.compact .col { font-size: 10.5px; letter-spacing: .03em; }
.transit.compact .name { font-size: 13.5px; }
.transit .col { font: 700 11.5px/1 var(--display); fill: var(--quiet); letter-spacing: .04em; text-transform: uppercase; }
.transit .name { font: 750 14px/1 var(--display); fill: var(--ink); }
.transit .sub { font: 500 11.5px/1 var(--text); fill: var(--quiet); }
.transit .eta { font: 650 12px/1 var(--text); fill: var(--ink); }
.transit .eta.off { fill: var(--hold); }
.transit .cap-label { font: 800 13px/1 var(--display); fill: var(--interchange-ink); letter-spacing: .02em; }
.transit .cap-date { font: 700 12px/1 var(--text); fill: var(--ink); }
.transit .guide { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; }
.transit a:focus-visible { outline: none; }
.transit a:focus-visible .name { text-decoration: underline; }
.transit .line-solid { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.transit .line-ahead { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 7; }
.transit .line-held { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 10 6; opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .transit.draw .line-solid { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 900ms var(--ease-out) forwards; animation-delay: var(--delay, 0ms); }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}
.transit-legend { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: 12.5px; color: var(--quiet); padding: var(--s3) var(--s2) 0; border-top: 1px solid var(--rule); margin-top: var(--s2); align-items: center; }
.transit-legend svg { vertical-align: middle; margin-right: 6px; }
.transit-legend .end { margin-left: auto; }

/* ---------- applications: table ---------- */
.filters { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin: var(--s4) 0 var(--s3); }
.filters .search { flex: 1 1 220px; max-width: 320px; position: relative; }
.filters .search svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; color: var(--quiet); pointer-events: none; }
.filters .search input { padding-left: 34px; }
.tablebox { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child > td { border-bottom: 0; }
th { font: 700 12px/1.2 var(--display); color: var(--quiet); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; background: var(--th); position: sticky; top: 0; }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
th[aria-sort="ascending"] button::after { content: "\2191"; }
th[aria-sort="descending"] button::after { content: "\2193"; }
td.num, th.num { text-align: right; white-space: nowrap; }
td select { min-width: 108px; }
td .title { color: var(--quiet); font-size: 13px; margin-top: 2px; }
tbody tr:hover > td { background: var(--row-hover); }
td.notes { min-width: 180px; max-width: 240px; }
td .move { display: flex; align-items: center; gap: 2px; }
td .move .btn { padding-left: 2px; }
.note-edit { width: 100%; border: 1px solid transparent; background: transparent; padding: 6px 8px; margin: -6px -8px; min-height: 0; border-radius: var(--r-sm); resize: none; font-size: 13.5px; line-height: 1.45; field-sizing: content; min-width: 100%; }
.note-edit:hover { border-color: var(--rule); background: var(--sheet); }
.note-edit:focus-visible { background: var(--sheet); }
td select { min-height: 34px; padding: 6px 8px; font-size: 13px; max-width: 170px; }
tr.history > td { background: var(--ground); padding: var(--s3) var(--s5); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: var(--s3); padding: 4px 0; font-size: 13.5px; }
.timeline time { color: var(--quiet); }
@media (max-width: 760px) {
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { border-bottom: 1px solid var(--rule); padding: var(--s3) var(--s4); display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s3); }
  table.responsive td { border: 0; padding: 2px 0; max-width: none; min-width: 0; }
  table.responsive td:first-child, table.responsive td.notes, table.responsive td:last-child { grid-column: 1 / -1; }
  table.responsive td:empty { display: none; }
  table.responsive td:first-child::before { display: none !important; }
  table.responsive td .move { flex-direction: row; align-items: center; }
  table.responsive td.m-hide { display: none; }
  table.responsive tr.history { display: block; }
  table.responsive td[data-label]::before { content: attr(data-label); display: block; font: 700 11px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--quiet); margin-bottom: 2px; }
  table.responsive td.num { text-align: left; }
  table.responsive tr.history { padding: var(--s3) var(--s4); background: var(--ground); }
  .rail-in { gap: var(--s2); }
}

/* ---------- packet ---------- */
.field { display: grid; grid-template-columns: minmax(160px, 240px) 1fr auto; gap: var(--s3); align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.field:first-of-type { border-top: 0; }
.field .lbl { font-size: 13.5px; color: var(--quiet); }
.field .val { word-break: break-word; font-weight: 500; }
@media (max-width: 640px) { .field { grid-template-columns: 1fr auto; } .field .lbl { grid-column: 1 / -1; } }
.files { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.issues { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.issues li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13.5px; }
.issues svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.answer { border-top: 1px solid var(--rule); padding-top: var(--s4); margin-top: var(--s4); }
.answer:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.counter { font-size: 12.5px; color: var(--quiet); }
.counter.over { color: var(--stop); font-weight: 600; }
.facts-pick { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--ground); }
.facts-pick .check { font-size: 13.5px; }

/* ---------- auth & onboarding ---------- */
.gate { min-height: calc(100vh - 56px); display: grid; grid-template-columns: 1.1fr 1fr; }
.gate-art { background: var(--rail); color: var(--rail-ink); padding: var(--s7) var(--s6); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s6); }
.gate-art h1 { font-size: 40px; max-width: 14ch; color: var(--rail-ink); letter-spacing: -0.03em; }
.gate-art p { color: var(--rail-quiet); max-width: 46ch; }
.gate-art svg { width: 100%; max-width: 520px; height: auto; }
.gate-form { padding: var(--s7) var(--s6); display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; }
.gate-form form > * + * { margin-top: var(--s4); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: var(--s5); }
.tabs button { all: unset; cursor: pointer; font: 700 15px/1 var(--display); padding: 12px 4px 10px; margin-right: var(--s4); color: var(--quiet); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; min-height: 0; }
  .gate-art { padding: var(--s6) var(--s4); }
  .gate-art h1 { font-size: 30px; }
  .gate-art svg { display: none; }
  .gate-form { padding: var(--s6) var(--s4); max-width: none; }
}

.stepper { display: flex; align-items: flex-start; margin: 0 0 var(--s6); padding: 0; list-style: none; overflow-x: auto; }
.stepper li { flex: 1 1 0; min-width: 92px; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 5px; background: var(--rule-strong); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--ink); }
.stepper a, .stepper span.stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--quiet); font: 600 12.5px/1.25 var(--display); padding: 0 4px; }
.stepper .dot { width: 23px; height: 23px; border-radius: 50%; border: 4px solid var(--rule-strong); background: var(--sheet); position: relative; z-index: 1; }
.stepper li.done .dot { border-color: var(--ink); background: var(--ink); }
.stepper li.current .dot { border-color: var(--ink); background: var(--sheet); box-shadow: 0 0 0 4px rgba(var(--shade), .12); }
.stepper li.current a { color: var(--ink); }
.stepper li.optional .dot { border-style: dashed; }

.wizard { max-width: 760px; }
.wizard-foot { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.wizard-foot .grow { color: var(--quiet); font-size: 13.5px; }
/* resume import: one drop target, then one review */
.drop { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; padding: var(--s6) var(--s5);
  border: 2px dashed var(--rule-strong); border-radius: var(--r-md); background: var(--ground); cursor: pointer; margin: 0;
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out); }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--fill); }
#resume-file:focus-visible + .drop { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop-icon { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--ink); display: grid; place-items: center; color: var(--ink); background: var(--sheet); }
.drop-icon svg { width: 22px; height: 22px; }
.drop-text { display: grid; gap: 4px; font-weight: 400; }
.drop-text strong { font: 750 17px/1.2 var(--display); }
@media (max-width: 640px) { .drop { grid-template-columns: 1fr; justify-items: start; padding: var(--s5) var(--s4); } }
.reading { display: flex; align-items: center; gap: 10px; margin-top: var(--s4); font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--rule-strong); border-top-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
details.paste { padding: var(--s3) var(--s2); }

.review-page .sheet.review + .sheet.review { margin-top: var(--s3); }
.entries { display: grid; gap: 0; }
.entry { padding: var(--s4) 0; border-top: 1px solid var(--rule); }
.entry:first-child { border-top: 0; padding-top: 0; }
.review-page { max-width: 1040px; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 116px 116px; gap: var(--s3); align-items: end; }
.entry-grid .check.now { grid-column: 4 / span 2; justify-self: start; padding-bottom: 10px; font-size: 13.5px; }
.review .sheet-head + .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .entry-grid, .review .sheet-head + .entry-grid { grid-template-columns: 1fr 1fr; } .entry-grid .check.now { grid-column: 1 / -1; } }
@media (max-width: 480px) {
  .entry-grid, .review .sheet-head + .entry-grid { grid-template-columns: 1fr 1fr; }
  .entry-grid > .fld:not(.date) { grid-column: 1 / -1; }
  .review-foot { padding: var(--s2) var(--s3); }
  .review-foot .grow .note, .review-foot .grow > strong { display: none; }
  .review-foot .grow { min-width: 0; flex-basis: 100%; }
  .review-foot .grow:empty, .review-foot .grow:not(:has(label)) { display: none; }
}
.fld label { display: flex; align-items: center; gap: 6px; }
.fld .check-tag { padding: 3px 6px 2px; font-size: 11.5px; }
.fld-err { display: block; color: var(--stop); font-size: 12.5px; min-height: 0; margin-top: 4px; }
.fld-err:empty { display: none; }
input.guess { border-color: var(--hold); background: var(--hold-tint); }
.lines { list-style: none; margin: var(--s3) 0 4px; padding: 0; display: grid; gap: 6px; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: start; }
.lines textarea { min-height: 40px; field-sizing: content; resize: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--quiet); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--fill); color: var(--stop); }
.icon-btn svg { width: 16px; height: 16px; }
.entry-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { display: inline-flex; align-items: center; gap: 2px; padding: 3px 2px 3px 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-pill); background: var(--sheet); font-size: 14px; }
.skill .icon-btn { width: 26px; height: 26px; border-radius: 50%; }
.other h3 { margin: var(--s3) 0 4px; }
.review-foot { position: sticky; bottom: 0; z-index: 3; display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-top: var(--s4);
  padding: var(--s3) var(--s4); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: 0 -6px 18px rgba(var(--shade), .08); }
.review-foot .grow { min-width: 240px; font-size: 14px; }

/* work authorization: one grid for the setup step and Settings, so names, statuses and notes align */
.auth-row { display: grid; grid-template-columns: 200px minmax(0, 340px); column-gap: var(--s5); row-gap: 4px; align-items: center; padding: var(--s3) 0; }
.auth-set .auth-row + .auth-row, .auth-table .auth-row + .auth-row { border-top: 1px solid var(--rule); }
.auth-name { font: 650 15px/1.3 var(--display); color: var(--ink); margin: 0; }
.auth-row .check.auth-name { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.auth-note { grid-column: 2; margin: 0; font-size: 13px; color: var(--quiet); }
.auth-note:empty { display: none; }
.auth-row.off .auth-note { color: var(--placeholder); }
.auth-row.off select:disabled { opacity: .5; background: var(--ground); cursor: not-allowed; }
.auth-set { border: 0; border-top: 1px solid var(--rule); margin: var(--s3) 0 0; padding: var(--s4) 0 0; min-width: 0; }
.auth-set legend { font: 750 17px/1.2 var(--display); padding: 0; float: left; width: 100%; }
.auth-set legend + .note { clear: both; margin: 4px 0 var(--s2); max-width: 70ch; }
.auth-table .auth-row, .auth-head { grid-template-columns: 130px minmax(0, 1fr) 104px 104px 64px; column-gap: var(--s4); }
.auth-table .auth-note { grid-column: 2 / -1; }
.auth-head { display: grid; padding: 0 0 6px; border-bottom: 1px solid var(--rule); font: 700 12px/1.2 var(--display); color: var(--quiet); text-transform: uppercase; letter-spacing: .03em; }
.auth-na { padding-left: 12px; }
.auth-num { margin: 0; }
.auth-num-label { display: none; }
@media (max-width: 640px) {
  .auth-row, .auth-table .auth-row { grid-template-columns: 1fr; }
  .auth-note, .auth-table .auth-note { grid-column: 1; }
  .auth-head { display: none; }
  .auth-num { display: grid; grid-template-columns: 130px 110px; align-items: center; gap: var(--s3); }
  .auth-num-label { display: block; font: 600 13px/1.3 var(--text); }
  .auth-na { display: none; }
}

/* ---------- settings ---------- */
.reset-list .check { align-items: flex-start; }
.reset-list .empty-part { color: var(--quiet); cursor: default; }
.section-nav { position: sticky; top: 80px; display: grid; gap: 2px; }
.section-nav a { text-decoration: none; color: var(--quiet); font: 600 14px/1.2 var(--display); padding: 9px 10px 7px; border-radius: var(--r-sm); }
.section-nav a:hover { color: var(--ink); background: var(--fill); }
@media (max-width: 860px) { .section-nav { position: static; display: flex; overflow-x: auto; gap: 4px; } .section-nav a { white-space: nowrap; border: 1px solid var(--rule); } }
.settings section { scroll-margin-top: 80px; }
.settings section + section { margin-top: var(--s4); }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 6px var(--s4); font-size: 14px; }
.kv dt { color: var(--quiet); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }
.secret { display: flex; gap: var(--s2); align-items: center; background: var(--rail); color: var(--rail-ink); border-radius: var(--r-sm); padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }
.secret .btn { margin-left: auto; }
pre.code { background: var(--rail); color: var(--rail-ink); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: var(--s2) 0; }

/* lists inside sheets */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: var(--s3); align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.list > li:first-child { border-top: 0; }
.list > li .grow { min-width: 200px; }

/* empty and loading */
.empty { padding: var(--s6) var(--s5); text-align: left; }
.empty h3 { font-size: 17px; margin-bottom: 4px; }
.empty .row { margin-top: var(--s4); }
.loading { display: grid; gap: 10px; }
.loading i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--skel-a), var(--skel-b), var(--skel-a)); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .loading i { animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } }
.loading i:nth-child(2) { width: 82%; } .loading i:nth-child(3) { width: 64%; }

details > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font: 650 14px/1.2 var(--display); color: var(--ink); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s var(--ease-out); margin-right: 2px; }
details[open] > summary::before { transform: rotate(45deg); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--rail); color: var(--rail-ink); padding: 11px 16px 9px; border-radius: var(--r-sm); font: 650 14px/1 var(--display);
  box-shadow: 0 8px 24px rgba(var(--shade), .22); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease-out), transform .3s var(--ease-out); z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer.foot { max-width: 1120px; margin: 0 auto; padding: 0 var(--s4) var(--s6); color: var(--quiet); font-size: 13px; display: flex; gap: var(--s4); flex-wrap: wrap; }
footer.foot a { color: var(--quiet); }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Answer editor: question, kind and limit share a row on wide screens and stack on phones. */
.q-grid { grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) 130px; }
@media (max-width: 640px) { .q-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .q-grid > :first-child { grid-column: 1 / -1; } }

/* Email suggestions on Today: one decision per row. */
.suggestions .sugg { display: flex; align-items: center; gap: var(--s4); padding: 12px var(--s5); }
.suggestions .sugg .what { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; line-height: 1.5; }
.suggestions .sugg .acts { display: flex; gap: var(--s2); flex: none; }
@media (max-width: 640px) { .suggestions .sugg { flex-direction: column; align-items: stretch; } .suggestions .sugg .acts { justify-content: flex-end; } }

/* Forwarding set-up: numbered stops on a short line. */
.guide { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s4); position: relative; }
.guide li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); position: relative; }
.guide li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: calc(-1 * var(--s4)); width: 2px; background: var(--rule-strong); }
.guide .dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font: 800 13px/1 var(--display); background: var(--sheet); }
.guide strong { display: block; font-family: var(--display); font-size: 15px; margin-top: 4px; }
.guide .note { margin: 4px 0 0; }
.secret.wrap span { white-space: normal; word-break: break-word; font-size: 12.5px; line-height: 1.5; }
.code-big { font: 800 20px/1 var(--display); letter-spacing: .04em; }
