.local-trip { color:#22281f; background:#efeadc; border-block:1px solid #d8d2bf; padding-block:clamp(42px,6.5vw,94px); scroll-margin-top:84px; }
.trip-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:clamp(28px,6vw,90px); }
.trip-config,.trip-ticket { min-width:0; }
.trip-config .trip-context { display:flex; align-items:center; gap:9px; margin:0 0 13px; color:#505347; font-weight:650; font-size:.92rem; }
.trip-context::before { content:""; width:24px; height:3px; background:#a57c0b; }
.trip-config h2 { margin:0; max-width:16ch; font-size:clamp(32px,4.1vw,61px); line-height:1.03; letter-spacing:-.045em; overflow-wrap:anywhere; text-wrap:balance; }
.trip-config .trip-intro { margin:15px 0 0; max-width:46ch; color:#464c40; font-size:clamp(16px,1.32vw,19px); }
.trip-controls { display:grid; gap:15px; margin:23px 0 0; }
.trip-controls[hidden] { display:none; }
.trip-controls fieldset { min-width:0; margin:0; padding:0; border:none; }
.trip-controls legend { padding:0; margin:0 0 6px; font-size:.94rem; font-weight:680; }
.trip-options { display:grid; grid-auto-columns:minmax(0,1fr); grid-auto-flow:column; max-width:30rem; gap:4px; padding:4px; background:#e2dece; border:1px solid #c8c3b4; border-radius:13px; }
.trip-options label { position:relative; min-width:0; cursor:pointer; }
.trip-options input { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.trip-options span { display:flex; align-items:center; justify-content:center; min-height:44px; padding:7px 4px; color:#42483c; text-align:center; font:600 clamp(.88rem,1.1vw,1rem)/1.25 var(--display,sans-serif); border:1px solid transparent; border-radius:9px; }
.trip-options input:checked + span { background:#273027; border-color:#273027; color:#fffdf3; box-shadow:inset 0 -3px #eec653; }
.trip-options input:focus-visible + span { outline:3px solid #815d00; outline-offset:2px; }
@media(hover:hover) { .trip-options input:not(:checked) + span:hover { background:#f6f3e9; } }
.trip-ticket { overflow:hidden; background-color:#242c25; background-image:linear-gradient(120deg,#28332a 0%,#222922 100%); border:1px solid #354036; border-radius:18px; box-shadow:0 7px 24px #36332314; color:#fbf9ec; }
.trip-ticket-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px clamp(18px,2.2vw,32px); color:#efeedd; border-bottom:1px solid #ffffff25; font-size:.92rem; font-weight:650; }
.trip-line-icon { width:33px; height:8px; border:solid #ffcf42; border-width:0 2px 2px 0; transform:skewX(-32deg); }
.trip-stops { margin:0; padding:clamp(17px,2.1vw,27px) clamp(18px,2.2vw,32px); list-style:none; }
.trip-stop { display:grid; grid-template-columns:32px minmax(0,1fr); column-gap:14px; position:relative; align-items:start; }
.trip-stop:first-child { padding-bottom:22px; }
.trip-stop:first-child::before { content:""; position:absolute; left:15px; top:30px; bottom:0; border-left:2px dashed #9b9d75; }
.trip-pulse { position:absolute; top:30px; left:12.5px; width:7px; height:7px; border-radius:50%; background:#ffdc72; opacity:0; pointer-events:none; }
.trip-pin { position:relative; display:grid; place-content:center; width:32px; height:32px; border:1px solid #e8c75c; border-radius:50%; color:#ffdf76; font-weight:720; }
.trip-stop:last-child .trip-pin { color:#252b21; background:#ffcf42; border-color:#ffcf42; }
.trip-phase { display:block; color:#d4d9c8; font-size:.85rem; font-weight:560; }
.trip-stop h3 { margin:2px 0 5px; color:#fffcef; font-size:clamp(22px,2vw,30px); line-height:1.13; letter-spacing:-.029em; overflow-wrap:anywhere; }
.trip-stop p { margin:0; color:#e0e4d5; line-height:1.48; font-size:clamp(.96rem,1.15vw,1.06rem); }
.trip-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px 17px; padding:12px clamp(18px,2.2vw,32px); border-top:1px solid #ffffff25; }
.trip-actions .btn { margin:0; }
.trip-directory { display:inline-flex; align-items:center; min-height:44px; color:#f7f5e6; font-size:.93rem; text-underline-offset:4px; }
.trip-directory:is(:hover,:focus-visible) { color:#ffda6a; }
@media(max-width:760px) {
  .trip-layout { grid-template-columns:minmax(0,1fr); gap:21px; }
  .trip-controls { margin-top:17px; gap:12px; }
  .trip-config h2 { max-width:22ch; }
}
@media(max-width:380px) {
  .trip-actions { gap:1px 10px; }
  .trip-stop { column-gap:10px; }
}
@media(prefers-reduced-motion:no-preference) { .trip-options input:active + span { transform:scale(.97); } }
@media(forced-colors:active) { .trip-options input:checked + span { outline:2px solid Highlight; outline-offset:-3px; } }

/* Apply the same photo treatment and section navigation to the three landing types. */
body[data-detail-kind] {
  --detail-ink: #202925;
  --detail-accent: #ffca42;
  --detail-track: #6c650c;
}
body[data-detail-kind] .route-field,
body[data-detail-kind] .commune-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
body[data-detail-kind] .route-field > .wrap,
body[data-detail-kind] .commune-hero > .wrap {
  position: relative;
  z-index: 1;
}

/* Service pages show the photograph against graphite. Local pages use ink on ivory. */
body[data-detail-kind="serviciu"] .route-field {
  --detail-track: #ffe08c;
  background: #1b2520;
  border-bottom: 1px solid #313c33;
}
body[data-detail-kind="serviciu"] .route-field::before {
  opacity: 1;
  background-image: linear-gradient(104deg,#19231efa 9%,#19231ee0 38%,#24312733 83%),
    repeating-linear-gradient(90deg,transparent 0 52px,#d0ccaf16 52px 53px),
    repeating-linear-gradient(0deg,transparent 0 52px,#d0ccaf16 52px 53px);
}
body[data-detail-kind="cartier"] .route-field,
body[data-detail-kind="comuna"] .commune-hero {
  background: #f5f1e4;
  color: var(--detail-ink);
  border-bottom: 1px solid #cec8b6;
}
body[data-detail-kind="cartier"] .route-field::before,
body[data-detail-kind="comuna"] .commune-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 1;
  background-image: linear-gradient(105deg,#faf7ee 5%,#faf7edec 44%,#faf6e22a 90%),
    repeating-linear-gradient(90deg,transparent 0 47px,#a49b7d24 47px 48px),
    repeating-linear-gradient(0deg,transparent 0 47px,#a49b7d24 47px 48px);
}
body[data-detail-kind] .route-field::after { content: none; }
body[data-detail-kind] .detail-route-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--detail-track);
  opacity: .28;
}
body[data-detail-kind] .detail-route-art path { fill: none; stroke: currentColor; stroke-width: 1.75; vector-effect: non-scaling-stroke; }
body[data-detail-kind] .detail-route-art circle { fill: currentColor; }

body[data-detail-kind="cartier"] .route-field .crumb,
body[data-detail-kind="cartier"] .route-field .crumb a,
body[data-detail-kind="cartier"] .route-field .lead { color: #475045; }
body[data-detail-kind="cartier"] .route-field .crumb .sep { color: #726541; }
body[data-detail-kind="cartier"] .route-field .textlink { color: #374135; text-decoration-color: #887a54; }
body[data-detail-kind="cartier"] .route-field .textlink:hover { color: #684b08; text-decoration-color: currentColor; }
body[data-detail-kind="cartier"] .route-field :focus-visible { outline: 3px solid #78600d; outline-offset: 3px; }
body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) > div { min-width: 0; }
body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) h1 {
  line-height: 1.02;
  letter-spacing: -.048em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
body[data-detail-kind] .inner-hero > div::before {
  content: "";
  display: block;
  width: 43px;
  height: 5px;
  margin-bottom: clamp(12px,1.15vw,18px);
  border-radius: 4px;
  background: linear-gradient(90deg,#f2bd3a 0 75%,transparent 75% 86%,#f2bd3a 86% 100%);
}
body[data-detail-kind] .inner-hero .lead,
body[data-detail-kind] .commune-lead { max-width: 49ch; }
body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) .actions .btn {
  min-height: 49px;
  border-radius: 10px;
  font-weight: 690;
}
body[data-detail-kind="cartier"] .inner-hero .btn.gold { color: #fffaf0; background: #263229; border-color: #263229; }
body[data-detail-kind="cartier"] .inner-hero .btn.gold:hover { background: #3b493b; }
body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) .textlink { min-height: 46px; }
body[data-detail-kind] :is(.inner-photo,.commune-photo) {
  position: relative;
  min-width: 0;
  isolation: isolate;
  margin: 0 7px 7px 0;
  overflow: hidden;
  border: 1px solid #444634;
  border-radius: 7px clamp(32px,4vw,64px) 7px 7px;
  box-shadow: 6px 6px 0 #e2b345,0 14px 26px #282a1814;
}
body[data-detail-kind="serviciu"] .inner-photo { border-color: #7a7864; box-shadow: 6px 6px 0 #cca142,0 15px 29px #090f0b3d; }
body[data-detail-kind] .inner-photo::after { content: none; }
body[data-detail-kind] :is(.inner-photo,.commune-photo) > img { display: block; width: 100%; height: auto; object-fit: cover; aspect-ratio: 1.49; }
body[data-detail-kind] .commune-photo figcaption { border-top: 0; background: #263128; color: #fffbed; }
body[data-detail-kind] .commune-facts { border-radius: 6px 13px 6px 6px; }

.detail-jumps {
  color: #2b3429;
  background: #eeeadd;
  border-block: 1px solid #d7d1c0;
}
.detail-jumps > .wrap { display: flex; flex-wrap: wrap; gap: 7px 9px; align-items: stretch; padding-block: 12px; }
.detail-jumps [data-detail-jump] {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  max-width: 100%;
  padding: 9px 15px;
  border: 1px solid #cbc7b4;
  border-radius: 999px;
  color: #354034;
  background: #fffdf5;
  text-decoration: none;
  font-size: clamp(.94rem,1.08vw,1.04rem);
  font-weight: 630;
  line-height: 1.26;
  overflow-wrap: anywhere;
}
.detail-jumps [data-detail-jump]::before {
  display: block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  content: "";
  border: 1.5px solid #787453;
  border-radius: 50%;
}
.detail-jumps [data-detail-jump][aria-current="location"] { color: #fffbeb; border-color:#283428; background: #283428; }
.detail-jumps [data-detail-jump][aria-current="location"]::before { border-color: #ffd35c; background:#ffd35c; }
.detail-jumps [data-detail-jump]:focus-visible { outline: 3px solid #765500; outline-offset: 2px; }
@media (hover:hover) {
  .detail-jumps [data-detail-jump]:hover { box-shadow: inset 0 0 0 1px #957b2d; border-color:#957b2d; }
}
@media (max-width: 880px) {
  body[data-detail-kind] :is(.inner-photo,.commune-photo) > img { aspect-ratio: 1.86; max-height: 340px; }
  body[data-detail-kind] .detail-route-art { opacity: .18; }
}
@media (max-width: 560px) {
  body[data-detail-kind] .inner-hero { gap: 20px; padding-block: 20px 27px; }
  body[data-detail-kind] .inner-hero > div::before { height: 4px; margin-bottom: 11px; }
  body[data-detail-kind] .inner-hero .lead { margin-top: 13px; }
  body[data-detail-kind] :is(.inner-photo,.commune-photo) { border-radius: 5px 29px 5px 5px; margin: 0 5px 5px 0; box-shadow: 4px 4px 0 #d9ac3f; }
  .detail-jumps > .wrap { gap: 6px; padding-block: 9px; }
  .detail-jumps [data-detail-jump] { min-height:44px; gap:6px; padding:8px 10px; font-size:.92rem; }
  .detail-jumps [data-detail-jump]::before { width:7px; height:7px; }
}
@media (prefers-reduced-motion:no-preference) {
  body[data-detail-kind] .detail-route-art path { stroke-dasharray: 1; animation: detail-trace 1.05s ease-out both; }
  body[data-detail-kind] :is(.inner-photo,.commune-photo) { animation: detail-photo-settle .36s ease-out both; }
  .detail-jumps [data-detail-jump], body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) .actions a { transition: transform .12s ease-out; }
  .detail-jumps [data-detail-jump]:active, body[data-detail-kind] :is(.inner-hero,.commune-hero-grid) .actions a:active { transform: translateY(1px); }
  @keyframes detail-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes detail-photo-settle { from { transform: translateY(5px); } to { transform: translateY(0); } }
}
@media (forced-colors:active) {
  .detail-jumps [aria-current="location"] { outline: 2px solid Highlight; outline-offset: -3px; }
  body[data-detail-kind] .detail-route-art { display:none; }
}
