/* Stations: the published guides first, in route order, each with the trains that stop there; the Japan-wide inventory sits below and is laid out the
   way the guide list will look once more of it has guides. */
.stations-sub{margin:.4rem 0 0;color:var(--muted)}
.stations-sub a{color:inherit}

/* the guides: one route, a dot per station */
.guides{margin-top:clamp(1.5rem,4vw,2.4rem)}
.guides h2{margin:0 0 .5rem;font-size:1.125rem;letter-spacing:-.01em}
.guide-list{list-style:none;margin:0;padding:0}
.guide-list li{position:relative;padding-left:1.75rem}
.guide-list li::before{content:"";position:absolute;left:.15rem;top:1.14rem;width:.62rem;height:.62rem;box-sizing:border-box;border:1.5px solid var(--muted);border-radius:50%;background:var(--paper);z-index:1;transition:border-color 140ms ease,background 140ms ease}
.guide-list li::after{content:"";position:absolute;left:calc(.15rem + .31rem - .5px);top:calc(1.14rem + .31rem);height:100%;width:1px;background:var(--rule)}
.guide-list li:last-child::after{display:none}
.guide-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.05rem 1rem;align-items:baseline;min-height:44px;padding:.7rem 0;color:inherit;text-decoration:none}
.g-name{line-height:1.5}
.g-name b{font-weight:600;font-size:1.0625rem;transition:color 140ms ease}
.g-name small{margin-left:.55rem;color:var(--muted);font-size:.875rem}
.g-services{grid-column:1/-1;grid-row:2;color:var(--muted);font-size:.875rem;line-height:1.4}
.g-pref{color:var(--muted);font-size:.8125rem;text-align:end;white-space:nowrap}
.guide-row:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
@media(hover:hover) and (pointer:fine){.guide-list li:hover::before{border-color:var(--ink);background:var(--ink)}.guide-row:hover .g-name b{color:var(--accent)}}

/* the inventory */
.ndir{margin-top:clamp(2.75rem,8vw,5rem);padding-top:clamp(1.25rem,3vw,2rem);border-top:1px solid var(--rule)}
.ndir-head h2{margin:0;font-size:1.25rem;letter-spacing:-.01em}
.ndir-figures{display:flex;flex-wrap:wrap;gap:.15rem 1.25rem;margin:.45rem 0 0;color:var(--muted);font-size:.9rem}
.ndir-figures b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.ndir .directory-scope{margin:.9rem 0 0}
.ndir-regions{list-style:none;margin:1.4rem 0 clamp(1.5rem,4vw,2rem);padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
@media(min-width:680px){.ndir-regions{grid-template-columns:repeat(4,minmax(0,1fr))}}
.ndir-regions a{display:grid;align-content:start;gap:.1rem;min-height:5.6rem;padding:.7rem .85rem .75rem;border:1px solid var(--rule);border-radius:8px;color:inherit;text-decoration:none;transition:border-color 140ms ease,background 140ms ease}
.r-name{font-weight:600;font-size:.9375rem;line-height:1.3}
.r-ja{font-size:.78rem;line-height:1.3;color:var(--muted)}
.r-n{margin-top:.35rem;font-size:1.25rem;line-height:1.2;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.r-guides{margin-top:.1rem;font-size:.75rem;color:var(--accent)}
.r-guides b{font-weight:600}
.ndir-regions a.has-guides{border-color:color-mix(in srgb,var(--accent) 45%,var(--rule))}
.ndir-regions a[aria-current=true]{border-color:var(--ink);background:var(--panel)}
.ndir-regions a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(hover:hover) and (pointer:fine){.ndir-regions a:hover{border-color:var(--muted);background:var(--panel)}}

.ndir .directory-filters{margin:0 0 .9rem}
.ndir label{font-size:.85rem;color:var(--muted)}
.ndir select,.ndir input[type=search]{display:block;width:100%;min-height:44px;margin-top:.35rem;padding:.55rem .8rem;border:1px solid var(--rule);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;font-size:1rem}
.ndir input[type=search]{appearance:none}
.ndir select:focus-visible,.ndir input:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
.ndir .directory-results-meta{margin:.9rem 0 .5rem}
.ndir output{color:var(--muted);font-size:.8125rem;font-variant-numeric:tabular-nums}
.ndir button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:.4rem .95rem;border:1px solid var(--rule);border-radius:999px;color:var(--ink);background:transparent;font:inherit;font-size:.86rem;font-weight:500;line-height:1.35;cursor:pointer}
.ndir button[hidden]{display:none}
.ndir button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(hover:hover) and (pointer:fine){.ndir button:hover{background:var(--panel);border-color:var(--muted)}}
.ndir-more{margin-top:1rem}

/* results: a row is the name, where it runs, the prefecture and whether there is a guide; a guide row looks the same, only fuller */
.ndir-results{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}
.ndir-results li{border-bottom:1px solid var(--rule)}
.ndir-results summary{display:grid;grid-template-columns:1.1rem minmax(0,1fr) auto;gap:.05rem .75rem;align-items:baseline;min-height:48px;padding:.7rem .25rem;cursor:pointer;list-style:none}
.ndir-results summary::before{grid-row:1/3;align-self:center;margin:0;vertical-align:baseline}
.ndir-results summary::-webkit-details-marker{display:none}
.ndir-results summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:4px}
.n-name{grid-column:2/-1;grid-row:1;line-height:1.5}
.n-name strong{font-weight:600;font-size:1.0625rem}
.n-name small{margin-left:.55rem;font-size:.875rem;font-weight:400;color:var(--muted)}
.n-meta{grid-column:2;grid-row:2;font-size:.875rem;line-height:1.4;color:var(--muted)}
.n-status{grid-column:3;grid-row:2;justify-self:end;align-self:baseline;padding:.18rem .6rem;border:1px solid var(--rule);border-radius:999px;font-size:.72rem;line-height:1.3;color:var(--muted);white-space:nowrap}
.n-status.is-guide{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 50%,var(--rule))}
.ndir-results details[open]>summary{background:var(--panel)}
@media(hover:hover) and (pointer:fine){.ndir-results summary:hover{background:var(--panel)}}
.ndir-results details>:not(summary){margin:.5rem .25rem 0 2.35rem;font-size:.875rem;line-height:1.6}
.ndir-results details>p{color:var(--muted)}
.ndir-results details>:last-child{margin-bottom:.85rem}

.ndir-source{display:grid;gap:.6rem;justify-items:start;margin:1.75rem 0 0}
.ndir-source>a{display:inline-flex;align-items:center;min-height:36px;padding:.4rem .95rem;border:1px solid var(--rule);border-radius:999px;color:var(--ink);text-decoration:none;font:inherit;font-size:.86rem;font-weight:500;line-height:1.35}
.ndir-source small{color:var(--muted);line-height:1.6}
@media(hover:hover) and (pointer:fine){.ndir-source>a:hover{background:var(--panel);border-color:var(--muted)}}
@media(prefers-reduced-motion:reduce){.guide-list li::before,.g-name b,.ndir-regions a{transition:none}}
