.route-edition { min-width: 0; align-self: center; scroll-margin-top: 16px; }
.indicator-switch { display: inline-flex; align-items: center; min-height: 44px; color: #28574e; font: 600 14px/1.3 var(--type); }
.care-route { min-width: 0; display: grid; gap: 14px; }
.care-route.side-route { grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 12px; }
.guide-mount { position: sticky; z-index: 2; top: 6px; width: fit-content; max-width: 100%; padding: 5px; background: #f7f6ed; border-radius: 4px; }
.side-route .guide-mount { top: 15vh; }
.stage-nav {
  --progress: 0; --night: #193d41; --leaf: #85a988; --hot: #e48230; --cream: #f7f5e9;
  position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(4, minmax(41px,1fr));
  align-items: center; width: fit-content; max-width: 100%; font-family: var(--type); color: var(--night);
}
.stage-nav .station {
  position: relative; display: grid; place-items: center; height: 44px; min-width: 41px; padding: 0 6px; background: transparent;
  border: 0; border-radius: 0; color: inherit; text-decoration: none; cursor: pointer; line-height: 1; font-size: 14px;
  font-weight: 550; font-variant-numeric: tabular-nums;
}
.stage-nav .station span { position: relative; z-index: 1; }
.stage-nav .station[aria-current] { color: #143d3a; font-weight: 750; }
.stage-nav .station:focus-visible { outline: 2px solid #bd5c13; outline-offset: -2px; z-index: 3; }
.stage-instrument { display: none; }
.stage-instrument b { display: none; }
.indicator-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,265px),1fr)); gap: 18px; }
.indicator-example { display: flex; flex-direction: column; min-width: 0; border: 1px solid #bccec2; background: #fffef7; border-radius: 3px 17px 3px 3px; overflow: hidden; }
.indicator-example header { display: flex; align-items: baseline; gap: 10px; padding: 17px 16px 10px; }
.indicator-example header small { font-size: 12px; font-variant-numeric: tabular-nums; color: #507267; }
.indicator-example h2 { display: block; font: 580 21px/1.12 var(--type); letter-spacing: -.035em; }
.indicator-well { flex: 1; min-height: 207px; display: grid; place-items: center; padding: 10px; background: #f5f4e9; }
.indicator-example footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; border-top: 1px solid #d6ded1; padding: 9px 13px; font-size: 13px; }
.indicator-example output { color: #486555; }
.indicator-example footer a { display: inline-flex; align-items: center; min-height: 35px; white-space: nowrap; color: var(--forest); }

/* The screw marks, engraved ticks and sliding copper index belong to one
   scale. Its 0 and 100% points sit directly beneath the outer numerals. */
.guide-mount:has(.stage-regua) { width: 100%; padding: 0; border-radius: 4px; }
.stage-regua {
  display: grid; width: 100%; grid-template-columns: repeat(4,minmax(0,1fr));
  padding: 15px clamp(12px,2.1vw,27px) 12px; overflow: hidden;
  background: #fcf9ee; border: 1px solid #aab7a6; border-top: 3px solid #24514c;
  border-radius: 4px 14px 4px 4px; box-shadow: 0 3px 0 #d2d9c9,0 8px 18px #263c320d;
}
.ruler-caption { grid-column: 1 / 4; min-width: 0; }
.ruler-caption small { display: block; color: #52695d; font: 610 10px/1.4 var(--type); letter-spacing: .12em; text-transform: uppercase; }
.ruler-caption strong { display: block; color: #153e3b; font: italic clamp(23px,2vw,34px)/1.12 "Instrument Serif",Georgia,serif; letter-spacing: -.02em; }
.stage-regua .stage-instrument { display: inline-flex; justify-self: end; align-items: baseline; gap: 3px; color: #537064; font: 510 11px/1 var(--type); font-variant-numeric: tabular-nums; }
.stage-regua .stage-instrument b { display: inline; color: #8f451c; font: 630 17px/1 var(--type); }
.stage-regua .stage-instrument small { white-space: nowrap; font-size: 11px; }
.stage-regua .station { height: 45px; min-width: 0; align-items: end; padding-bottom: 6px; color: #526257; }
.stage-regua .station[aria-current] { color: #904118; font: 700 17px/1 var(--type); }
.ruler-scale {
  position: relative; grid-column: 1/-1; height: 15px; margin-bottom: 5px; border-bottom: 1px solid #849580;
  background: repeating-linear-gradient(90deg,#99a993 0 1px,transparent 1px 5px) bottom center / 100% 4px no-repeat,
    repeating-linear-gradient(90deg,#8c9d87 0 1px,transparent 1px 25px) bottom center / 100% 8px no-repeat;
}
.ruler-scale::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg,transparent 0 calc(12.5% - .5px),#567265 calc(12.5% - .5px) calc(12.5% + .5px),transparent calc(12.5% + .5px) 25%); }
.ruler-scale i { position: absolute; inset: 0 12.5%; }
.ruler-scale i::before { content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: #ac632c; transform: scaleX(var(--progress,0)); transform-origin: left; }
.ruler-scale i::after {
  content: ''; position: absolute; left: calc(var(--progress,0)*100%); top: -2px; width: 11px; height: 22px;
  transform: translateX(-50%); background: #b2632a;
  clip-path: polygon(0 0,100% 0,100% 22%,58% 45%,58% 100%,42% 100%,42% 45%,0 22%);
}
.indicator-well .stage-regua { width: min(100%,320px); padding: 12px 14px; }
.indicator-well .ruler-caption strong { font-size: 23px; }
.indicator-switch { margin-top: 8px; }
@media (max-width: 700px) {
  .stage-regua { padding-block: 10px 7px; }
  .ruler-caption strong { font-size: 24px; }
}
@media (max-width: 420px) { .guide-mount .ruler-caption strong { min-height: 2.24em; } }
/* 02 — an architectural stair in four heights. */
.stage-degraus { align-items: end; gap: 2px; }
.stage-degraus .station { height: 44px; background: #d5e3ce; border-radius: 2px 8px 0 0; align-items: end; padding-bottom: 11px; }
.stage-degraus .station:nth-of-type(2) { height: 53px; }
.stage-degraus .station:nth-of-type(3) { height: 62px; }
.stage-degraus .station:nth-of-type(4) { height: 71px; }
.stage-degraus .station[aria-current] { background: var(--night); color: white; box-shadow: inset 0 4px var(--hot); }
/* 03 — the selected archive tab rises above the folder seam. */
.stage-arquivo { border-bottom: 3px solid #476c59; align-items: end; padding: 0 6px; }
.stage-arquivo .station { height: 46px; margin-right: -2px; background: #d6ddcd; border: 1px solid #a4b5a2; border-radius: 8px 12px 0 0; }
.stage-arquivo .station[aria-current] { height: 56px; background: #f4c99f; border-color: #b57f51; z-index: 1; }
/* 04 — a transit map with a ring and completed stops. */
.stage-metro { gap: 7px; }
.stage-metro::before { content: ''; position: absolute; inset: 13px 22px auto; height: 3px; background: linear-gradient(90deg,#197c76 calc(var(--progress)*100%),#b8cbbe 0); }
.stage-metro .station { padding-top: 22px; }
.stage-metro .station i { position: absolute; top: 8px; width: 13px; height: 13px; border: 2px solid #92ad9a; border-radius: 50%; background: var(--cream); }
.stage-metro .visited i { background: #4d877a; border-color: #4d877a; }
.stage-metro .station[aria-current] i { border-color: #1b635a; box-shadow: 0 0 0 3px #e9ac73; }
/* 05 — vertical marginalia, with a bracket around the current folio. */
.stage-margem { grid-template-columns: auto; border-left: 1px solid #9caa9b; }
.stage-margem .station { min-width: 52px; color: #687767; font: italic 19px/1 Georgia,serif; }
.stage-margem .station[aria-current] { color: #89461f; font-size: 25px; }
.stage-margem .station[aria-current]::before { content: ''; position: absolute; inset: 7px auto 7px -1px; width: 9px; border: solid #b5632e; border-width: 2px 0 2px 2px; }
/* 06 — overlapping leaf silhouettes. */
.stage-folhas { gap: 4px; }
.stage-folhas .station { background: #c8dec6; border-radius: 85% 5% 80% 5%; border-bottom: 2px solid #81a48a; }
.stage-folhas .station[aria-current] { background: #2d685c; color: #fff; transform: translateY(-4px) rotate(-5deg); }
/* 07 — radial completion with a compact two-row keypad. */
.stage-anel { grid-template-columns: 57px repeat(2,44px); gap: 1px; }
.stage-anel .stage-instrument { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; grid-row: span 2; background: conic-gradient(var(--night) calc(12% + var(--progress)*88%),#d4dfd4 0); }
.stage-anel .stage-instrument b { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 50%; background: var(--cream); font: italic 21px/1 Georgia,serif; }
.stage-anel .station[aria-current] { border-bottom: 2px solid var(--hot); }
/* 08 — frames with exposed film perforations. */
.stage-filme { padding: 10px 6px; gap: 3px; color: white; background: #162d2d; border-radius: 3px; }
.stage-filme::before,.stage-filme::after { content: ''; position: absolute; inset: 3px 6px auto; height: 4px; background: repeating-linear-gradient(90deg,#c8d1c2 0 6px,transparent 6px 13px); }
.stage-filme::after { top: auto; bottom: 3px; }
.stage-filme .station { color: #dce6da; background: #34504c; }
.stage-filme .station[aria-current] { color: #203b35; background: #f0c693; }
/* 09 — the current numeral becomes the display face. */
.stage-tipo { align-items: end; gap: 4px; border-bottom: 1px solid #939f90; }
.stage-tipo .station { height: 65px; min-width: 45px; place-items: end center; padding: 0 0 5px; font: italic 23px/1 Georgia,serif; color: #778476; }
.stage-tipo .station[aria-current] { font: italic 39px/1 Georgia,serif; color: #923e20; }
/* 10 — four lanes share a finish line. */
.stage-trilhos { grid-template-columns: 120px; border-inline: 1px solid #9baea0; padding-inline: 4px; }
.stage-trilhos .station { display: flex; justify-content: space-between; height: 44px; padding: 0 5px; }
.stage-trilhos .station i { height: 4px; flex: 1; margin-right: 8px; border-radius: 1px; background: #c9d7c7; }
.stage-trilhos .visited i { background: #86aa93; }
.stage-trilhos .station[aria-current] i { background: linear-gradient(90deg,var(--night) 80%,var(--hot) 80%); height: 8px; }
/* 11 — detachable paper tickets. */
.stage-bilhetes { border-radius: 4px; border: 1px solid #b99170; background: #f3dec1; }
.stage-bilhetes .station { border-right: 1px dashed #b58761; }
.stage-bilhetes .station:last-child { border-right: 0; }
.stage-bilhetes .station[aria-current] { background: #e8ab76; }
.stage-bilhetes .station::after { content: ''; position: absolute; bottom: -4px; right: -4px; width: 7px; height: 7px; border-radius: 50%; background: #f7f6ed; z-index: 1; }
/* 12 — a tessellated block, active tile marked by a clipped corner. */
.stage-mosaico { grid-template-columns: repeat(2,50px); gap: 3px; transform: rotate(-2deg); }
.stage-mosaico .station { background: #c3d8c5; }
.stage-mosaico .station:nth-of-type(2),.stage-mosaico .station:nth-of-type(3) { background: #e9c49c; }
.stage-mosaico .station[aria-current] { color: white; background: #204b4c; clip-path: polygon(0 0,75% 0,100% 25%,100% 100%,0 100%); }
/* 13 — coloured index flags project from the spine. */
.stage-fichario { grid-template-columns: 58px; border-left: 4px solid #2e5350; gap: 2px; }
.stage-fichario .station { width: 47px; background: #cad9c4; border-radius: 0 14px 3px 0; }
.stage-fichario .station:nth-of-type(even) { background: #ebc89f; }
.stage-fichario .station[aria-current] { width: 58px; color: white; background: #36716a; }
/* 14 — a two-colour hourglass transfers its ink as the stages advance. */
.stage-ampulheta { padding-top: 38px; border-bottom: 1px solid #afc1b3; }
.stage-ampulheta .stage-instrument { display: block; position: absolute; top: 0; left: calc(50% - 15px); width: 30px; height: 34px; clip-path: polygon(0 0,100% 0,58% 50%,100% 100%,0 100%,42% 50%); background: linear-gradient(0deg,#bd6229 calc(10% + var(--progress)*80%),#abc6b2 0); }
.stage-ampulheta .station[aria-current] { box-shadow: inset 0 -3px #bf652e; }
/* 15 — connected chevrons unfold toward the next step. */
.stage-sanfona { color: #25483d; }
.stage-sanfona .station { min-width: 50px; margin-left: -6px; background: #c4d8c5; clip-path: polygon(0 0,80% 0,100% 50%,80% 100%,0 100%,20% 50%); }
.stage-sanfona .station:first-of-type { margin-left: 0; }
.stage-sanfona .station:nth-of-type(even) { background: #a9cabb; }
.stage-sanfona .station[aria-current] { background: #315f59; color: white; }
/* 16 — the active patch lifts from the stitched line. */
.stage-costura { gap: 7px; }
.stage-costura::before { content: ''; position: absolute; inset: 50% 0 auto; border-top: 2px dashed #93634c; }
.stage-costura .station { background: #f4e8d4; border: 1px dashed #a17f62; border-radius: 8px; }
.stage-costura .station[aria-current] { transform: rotate(-6deg) translateY(-3px); background: #774636; color: white; outline: 2px dashed #e9bc8f; outline-offset: -5px; }
/* 17 — the needle points to one of four cardinal stations. */
.stage-bussola { width: 132px; height: 132px; grid-template: repeat(3,44px) / repeat(3,44px); background: radial-gradient(circle,transparent 43%,#c1cdbb 44% 45%,transparent 46%); }
.stage-bussola .station:nth-of-type(1) { grid-area: 1/2; }
.stage-bussola .station:nth-of-type(2) { grid-area: 2/3; }
.stage-bussola .station:nth-of-type(3) { grid-area: 3/2; }
.stage-bussola .station:nth-of-type(4) { grid-area: 2/1; }
.stage-bussola .station[aria-current] { color: #9a431d; border: 1px solid #cda681; border-radius: 50%; }
.stage-bussola .stage-instrument { display: block; grid-area: 2/2; justify-self: center; width: 15px; height: 42px; clip-path: polygon(50% 0,90% 50%,50% 100%,10% 50%); background: linear-gradient(#c46e2a 50%,#254b47 50%); transform: rotate(calc(var(--progress)*270deg)); }
/* 18 — fanned folios, each retaining a distinct hit area. */
.stage-folios { padding: 10px 7px 2px; }
.stage-folios .station { background: #e1e5d6; height: 58px; border: 1px solid #8fa594; border-radius: 3px 7px 2px 2px; transform: rotate(-6deg); transform-origin: center bottom; box-shadow: -2px 0 2px #254d3a12; }
.stage-folios .station:nth-of-type(3) { transform: rotate(3deg); }
.stage-folios .station:nth-of-type(4) { transform: rotate(6deg); }
.stage-folios .station[aria-current] { transform: translateY(-8px); color: white; background: #347369; }
/* 19 — four listening levels; the active bar opens into a waveform. */
.stage-ondas { border-radius: 10px; padding: 6px 9px; background: #163e42; color: #d6e6da; }
.stage-ondas .station { height: 52px; justify-items: center; align-content: end; gap: 4px; }
.stage-ondas .station i { width: 31px; height: 14px; background: repeating-linear-gradient(90deg,#94c3ad 0 3px,transparent 3px 6px); clip-path: polygon(0 38%,18% 30%,31% 0,54% 35%,76% 12%,100% 40%,100% 60%,74% 80%,55% 66%,32% 100%,12% 62%,0 60%); }
.stage-ondas .station[aria-current] { color: #ffbd7e; }
.stage-ondas .station[aria-current] i { height: 29px; background: repeating-linear-gradient(90deg,#efaa68 0 3px,transparent 3px 6px); }
/* 20 — a fabric bookmark with a cut tail. */
.stage-fita { grid-template-columns: 53px; padding: 4px 0 13px; color: #e5eedf; background: #315951; clip-path: polygon(0 0,100% 0,100% 100%,50% 95%,0 100%); }
.stage-fita .station { margin-inline: 3px; border-inline: 1px dashed #8da697; }
.stage-fita .station[aria-current] { color: #fff; background: #183a34; box-shadow: inset 4px 0 #e8a05c; }

@media (prefers-reduced-motion:no-preference) {
  .stage-nav .station,.stage-nav .station i { transition: background-color .17s ease-out,color .17s ease-out,transform .23s ease-out,height .18s ease-out,width .18s ease-out; }
  .stage-bussola .stage-instrument { transition: transform .2s ease-out; }
  .indicator-well .ruler-scale i::after { transition: left .22s cubic-bezier(.2,.75,.2,1); }
  .indicator-well .ruler-scale i::before { transition: transform .22s cubic-bezier(.2,.75,.2,1); }
}
@media (max-height: 430px) { .guide-mount,.side-route .guide-mount { position: static; } }
@media print { .guide-mount,.indicator-switch,.edition-nav { display: none; } }
