#commutes-reference {
  --journey-dark: #124d45;
  --journey-muted: #4c6157;
  --journey-line: #c0c8b6;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
#commutes-reference a {color: var(--journey-dark); text-underline-offset: .2em}
.journey-head, .journey-controls {display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.05rem clamp(1rem, 3vw, 3rem); border-bottom: 1px solid var(--journey-line)}
.journey-head {justify-content: space-between; padding-block: 1.4rem}
.journey-head h2,.roster-head h2 {font: 650 clamp(1.8rem, 3.15vw, 3.35rem)/1.05 Archivo, sans-serif; letter-spacing: -.055em}
.journey-head p, .roster-head p {color: var(--journey-muted); margin-top: .35rem; font-size: .94rem}
.journey-totals {display: flex; flex-wrap: wrap; gap: .7rem 1.5rem}
.journey-totals dt,.journey-controls label {font: 600 .75rem/1.2 Archivo, sans-serif; color: var(--journey-muted)}
.journey-totals dd {font: 600 clamp(1.25rem,2.1vw,2rem)/1.17 Archivo, sans-serif; letter-spacing: -.04em}
.journey-controls {background: #e9ecdf; padding-block: .7rem; gap: .55rem 1.3rem}
.journey-controls label {display: flex; align-items: center; flex-wrap: wrap; gap: .5rem}
.journey-controls select, .roster-panel input, .roster-panel select {
  color: var(--ink); background: #fffef8; border: 1px solid #98a99a; border-radius: 2px; padding: .4rem .5rem; max-width: 100%; font-family: inherit; font-size: .9rem; line-height: 1.35;
}
.journey-controls select {min-width: 12rem}
.journey-direction {display: inline-flex; flex-wrap: wrap; gap: 2px}
.journey-direction button,.roster-panel button {border: 1px solid #b1bdac; border-radius: 2px; background: #f7f7ee; color: var(--ink); font-size: .88rem; padding: .4rem .65rem; cursor: pointer}
.journey-direction [aria-pressed=true] {background: var(--journey-dark); border-color: var(--journey-dark); color: #fffdf2}
.journey-controls>a {margin-left: auto; font-size: .88rem}
.journey-grid {display: grid; grid-template-columns: minmax(0,1fr) minmax(18rem,29%); border-bottom: 1px solid var(--journey-line)}
.journey-figure {margin: 0; background: #e9ecde; display: flex; flex-direction: column; justify-content: center; min-width: 0}
#journey-map {width: 100%; height: clamp(345px,51vh,620px); display: block; margin: auto; padding: .4rem}
#journey-map [data-area] {stroke: #879a86; stroke-width: .7; stroke-linejoin: round; cursor: pointer}
#journey-map [data-area]:hover {stroke: #123e34; stroke-width: 1.7; filter: brightness(.96)}
.journey-place-label {font:600 13px Archivo,sans-serif; fill:#163c32;stroke:#f9f8ec;stroke-width:3.5;stroke-linejoin:round;paint-order:stroke}
.journey-figure figcaption {border-top: 1px solid var(--journey-line); padding: .6rem clamp(1rem,2.5vw,2.5rem); font-size: .79rem; background: #f0f1e7; color: var(--journey-muted)}
.journey-figure figcaption p {margin-top: .24rem}
.journey-key {display: flex; flex-wrap: wrap; align-items: center; gap: .22rem .75rem; font-weight: 600; color: var(--ink)}
.journey-key span {display: inline-flex; align-items: center; gap: .22rem; font-weight: 400}
.journey-key i {width: 12px; height: 12px; border: 1px solid #83917b}
.journey-inspector {padding: clamp(1rem,1.8vw,1.8rem); min-width: 0; border-left: 1px solid var(--journey-line)}
.journey-inspector h3 {font: 600 clamp(1.55rem,2.25vw,2.6rem)/1.1 Archivo, sans-serif; letter-spacing: -.045em}
.journey-inspector p,.roster-panel p {line-height: 1.45}
.journey-lead {font-weight: 600; margin-top: .65rem}
#journey-outside {font-size: .86rem; margin: .3rem 0 .8rem; color: var(--journey-muted)}
.journey-table,.roster-panel table {width: 100%; border-collapse: collapse; font-size: .85rem}
.journey-table :is(th,td),.roster-panel :is(th,td) {text-align: right; padding: .33rem .16rem; border-bottom: 1px solid var(--journey-line); vertical-align: top}
.journey-table :is(th,td):first-child,.roster-panel :is(th,td):first-child {text-align:left}
.journey-table th,.roster-panel th {font-weight: 600}
.journey-table thead th,.roster-panel thead th {font-size: .76rem; color: var(--journey-muted)}
.journey-all-rows {max-height: 18rem; overflow-y:auto; margin-top:.4rem}
.journey-inspector details {margin: .65rem 0}
.journey-inspector summary,.journey-method summary,.roster-score summary {color: var(--journey-dark); cursor:pointer; font-weight:550; font-size:.88rem}
#journey-census {font-size:.83rem}
.journey-inspector .journey-profile {margin:.35rem 0 .55rem; font-size:.82rem}
.roster-panel {padding: clamp(1.2rem,2.7vw,2.6rem) clamp(1rem,3vw,3rem); background: #f7f6ec}
.roster-grid {display:grid; grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr); gap: 1.4rem clamp(1.5rem,4vw,4rem); margin-top:1.35rem}
.roster-grid section {min-width:0}
.roster-grid h3,.roster-score h3 {font: 600 1.3rem/1.2 Archivo, sans-serif; letter-spacing:-.035em; margin-bottom:.5rem}
.roster-panel p {font-size:.88rem; margin:.5rem 0}
.roster-controls {display:flex; align-items:flex-end; flex-wrap:wrap; gap:.6rem .75rem; margin:.75rem 0}
.roster-controls label,.roster-closure label {display:block; color:var(--journey-muted);font-size:.78rem;font-weight:600}
.roster-controls label select,.roster-controls label input:not([type=number]) {display:block;margin-top:.15rem;max-width:min(15rem,100%)}
.roster-controls > label {min-width:0;max-width:100%}
.roster-controls select {width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.roster-controls form>label {margin-bottom:.15rem}
#roster-seed {width:7.3em}
.roster-table-wrap {max-width:100%;overflow-x:auto}
.roster-page {display:flex;align-items:center;gap:.75rem;margin:.6rem 0; font-size:.78rem}
.roster-panel button:disabled {opacity:.55;cursor:default}
.roster-panel button[data-job] {border:0;padding:.12rem;color:var(--journey-dark);text-decoration:underline;text-underline-offset:.15em}
.roster-closure {border-left:1px solid var(--journey-line); padding-left:clamp(1rem,2.5vw,2.5rem)}
.roster-closure label {margin:.75rem 0}
.roster-closure label select {margin-left:.25rem}
.roster-person {border-left:3px solid #a6b79d;padding-left:.55rem}
.roster-score {border-top:1px solid var(--journey-line); padding-top:1rem;margin-top:1.25rem}
.roster-score[open] {max-width:72rem}
.roster-score h3 {font-size:1rem;margin-top:.9rem}
.journey-method,.journey-error {padding:1rem clamp(1rem,3vw,3rem); border-top:1px solid var(--journey-line)}
.journey-method p {max-width:88ch;margin:.5rem 0;font-size:.85rem}
@media(max-width:740px){
  .journey-head {align-items:flex-start; gap:1rem;padding-block:1rem}
  .journey-totals {gap:.4rem .9rem}
  .journey-totals dt {font-size:.7rem}
  .journey-controls label {width:100%}
  .journey-controls select {min-width:0;max-width:100%}
  .journey-controls>a {margin-left:0}
  .journey-grid,.roster-grid {grid-template-columns:1fr}
  #journey-map {height:auto; aspect-ratio:720/580;max-height:62vh}
  .journey-inspector,.roster-closure {border-left:0;border-top:1px solid var(--journey-line);padding:1rem}
  .roster-closure {padding-inline:0}
  .roster-panel table {font-size:.8rem}
  .source-switch {max-width:100%;flex-wrap:wrap}
}

@media(max-width:470px) {
  .mast .source-switch {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.1rem}
  .source-switch button {padding:.45rem .15rem;min-width:0;white-space:normal}
}
