.service-explorer {
  --sx-ink: #232b24;
  --sx-ivory: #f9f6ec;
  --sx-gold: #ffcf4b;
  padding-block: clamp(40px, 6vw, 78px);
  background: #f1eee3;
  scroll-margin-top: 84px;
}
.service-explorer .sx-shell {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  align-items: stretch;
  gap: 0;
  color: var(--sx-ink);
}
.sx-choice-block {
  min-width: 0;
  padding: clamp(23px,3.7vw,51px);
  border-radius: 18px 0 0 18px;
  color: #fffdf2;
  background: radial-gradient(ellipse at 0 0,#353d2f 0,transparent 85%), #232b24;
}
.sx-choice-block h2 {
  margin: 0 0 clamp(19px,2.3vw,31px);
  max-width: 16ch;
  font-size: clamp(29px,3.6vw,52px);
  line-height: 1.05;
  letter-spacing: -.043em;
  text-wrap: balance;
}
.sx-choices { display: grid; gap: 8px; }
.sx-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 50px;
  padding: 11px 16px;
  border: 1px solid #6a7062;
  border-radius: 9px;
  color: #fbf8eb;
  background: #30382f;
  font-weight: 620;
  line-height: 1.26;
  text-decoration: none;
}
.sx-tab::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #b1b4a4;
}
.sx-tab span { min-width: 0; overflow-wrap: anywhere; }
.sx-tab[aria-selected="true"] {
  color: #201e14;
  background: var(--sx-gold);
  border-color: var(--sx-gold);
}
.sx-tab[aria-selected="true"]::after { background: #2c3026; border-color: #2c3026; }
.sx-tab:focus-visible { outline: 3px solid #fff9dc; outline-offset: 2px; }
.sx-reading {
  min-width: 0;
  padding: clamp(23px,3.5vw,49px);
  border: 1px solid #d4cfbd;
  border-left: none;
  border-radius: 0 18px 18px 0;
  background-color: #fffdf6;
}
.sx-panel { scroll-margin-top: 94px; }
.sx-panel + .sx-panel { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e1dccb; }
.sx-panel h3 { color: var(--sx-ink); font-size: clamp(24px,2.2vw,34px); line-height: 1.12; letter-spacing: -.027em; }
.sx-panel > p { margin: 12px 0 0; color: #484d41; max-width: 63ch; line-height: 1.55; }
.sx-phone-note { margin: 17px 0 8px; padding: 13px 15px; border-left: 3px solid #d7a832; border-radius: 0 7px 7px 0; background: #f1eedf; }
.sx-phone-note strong { font-size: .97rem; color: #373d31; }
.sx-phone-note p { margin: 5px 0 0; color: #46493f; line-height: 1.5; }
.sx-related { display: inline-flex; align-items: center; min-height: 44px; color: #4c481f; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sx-related:focus-visible, .sx-panel:focus-visible, .sx-call a:focus-visible { outline: 3px solid #795900; outline-offset: 3px; }
.sx-call { margin-top: 10px; }
.sx-call .btn { min-height: 48px; }
.service-explorer[data-enhanced] .sx-answers { display: grid; }
.service-explorer[data-enhanced] .sx-panel {
  grid-area: 1 / 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.service-explorer[data-enhanced] .sx-panel[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
@media (hover:hover) {
  .sx-tab:not([aria-selected="true"]):hover { background: #40483a; border-color: #aea577; }
}
@media (prefers-reduced-motion:no-preference) {
  .service-explorer[data-changed] .sx-panel[aria-hidden="false"] { animation: sx-answer-in 190ms ease-out; }
  @keyframes sx-answer-in { from { opacity:.84; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
}
@media (max-width:720px) {
  .service-explorer .sx-shell { grid-template-columns: minmax(0,1fr); }
  .sx-choice-block { border-radius: 14px 14px 0 0; padding: 19px 16px 16px; }
  .sx-choice-block h2 { margin-bottom: 16px; max-width: 22ch; }
  .sx-choices { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .sx-tab { justify-content: center; text-align: center; min-width: 0; min-height: 49px; padding: 8px 4px; font-size: clamp(.81rem,3.3vw,1rem); }
  .sx-tab::after { display: none; }
  .sx-reading { padding: 19px 16px; border-left: 1px solid #d4cfbd; border-top: none; border-radius: 0 0 14px 14px; }
  .sx-call .btn { width: 100%; justify-content: center; }
  .sx-phone-note { margin-top: 13px; padding: 11px 12px; }
}
@media (forced-colors:active) {
  .sx-tab[aria-selected="true"] { 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; }
}
