/* Approved UI override: official Longdan logo, compact navigation, and clearer survey selection. */
:root { --header-offset: 82px; }
html { scroll-padding-top: var(--header-offset); }
main[id], section[id] { scroll-margin-top: var(--header-offset); }

/* Compact floating navigation */
.site-header {
  top: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}
.site-header .bar {
  width: min(1120px, calc(100% - 32px));
  height: 60px;
  padding: 5px 7px 5px 12px;
  border: 1px solid rgba(11,42,36,.14);
  border-radius: 13px;
  background: rgba(251,250,246,.97);
  box-shadow: 0 10px 32px rgba(3,24,19,.16);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  pointer-events: auto;
}
.site-header.scrolled,
.site-header.menu-open {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.site-header.scrolled .bar {
  height: 56px;
  background: rgba(251,250,246,.99);
  border-color: rgba(11,42,36,.2);
  box-shadow: 0 9px 26px rgba(3,24,19,.21);
}
.brand {
  height: 46px;
  min-width: 105px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.brand-logo {
  display: block;
  width: 102px;
  height: auto;
  max-height: 43px;
  object-fit: contain;
}
.brand-mark, .brand-text { display: none; }

.nav { gap: 2px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  color: rgba(11,42,36,.78);
  font-size: 12.5px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--pine-950); background: var(--mint-soft); }
.nav a[aria-current="location"] { color: #fff; background: var(--pine-900); }
.nav a[aria-current="location"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

.head-actions { gap: 7px; }
.lang, .menu-btn {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--pine-950);
  border-color: rgba(11,42,36,.25);
}
.lang:hover, .menu-btn:hover {
  color: var(--pine-950);
  border-color: rgba(11,42,36,.48);
  background: var(--mint-soft);
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after { background: var(--pine-950); }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.btn-small {
  min-height: 40px;
  padding-inline: 16px;
  border-radius: 9px;
  background: var(--orange);
  color: var(--pine-950);
  font-size: 12.5px;
}
.btn-small:hover { background: #f6a45e; }

.mnav { margin-top: 7px; border: 0; pointer-events: auto; }
.mnav .shell {
  max-height: calc(100dvh - 86px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(11,42,36,.14);
  border-radius: 13px;
  background: rgba(251,250,246,.99);
  box-shadow: 0 22px 70px rgba(3,24,19,.34);
}
.mnav a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: rgba(11,42,36,.8);
}
.mnav a:hover,
.mnav a[aria-current="location"] { color: var(--pine-950); background: var(--mint-soft); }
.mnav a[aria-current="location"]::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--orange);
}
.mnav a.cta {
  min-height: 50px;
  margin-top: 8px;
  justify-content: center;
  border-radius: 9px;
}
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4,22,18,.56);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.site-header.menu-open + .nav-scrim { display: block; }
body.nav-open { overflow: hidden; }

/* Multi-select: selection and information are separate actions. */
.survey-guide {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 2px;
  padding: 11px 13px;
  border: 1px solid rgba(23,74,61,.15);
  border-left: 3px solid var(--orange);
  background: rgba(230,240,233,.7);
}
.survey-guide strong {
  color: var(--pine-950);
  font-size: 13.5px;
  line-height: 1.35;
  white-space: nowrap;
}
.survey-guide span {
  color: #4b5b56;
  font-size: 12.5px;
  line-height: 1.45;
}
.tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(23,74,61,.42);
  box-shadow: 0 12px 26px rgba(8,42,34,.08);
}
.tile.on { border-color: var(--pine-900); background: var(--pine-900); color: #fff; }
.tile.viewing { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.tile-main,
.tile:not(.on) .tile-main:hover {
  position: relative;
  min-height: 112px;
  padding: 13px 12px 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.tile.on .tile-main,
.tile.on.viewing .tile-main,
.tile.viewing .tile-main { border: 0; background: transparent; box-shadow: none; }
.tile-main:focus-visible,
.tile-detail:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.tile-main[aria-disabled="true"] { cursor: default; }
.tile-main .n { font-size: 20px; }
.tile-main b { font-size: 13.5px; line-height: 1.3; }
.check { top: 5px; right: 5px; width: 42px; height: 42px; }
.check::before {
  inset: 9px;
  border-radius: 4px;
  border: 1.5px solid rgba(20,32,29,.48);
  background: #fff;
}
.check::after { width: 6px; height: 11px; }
.tile.on .check::before { background: var(--orange); border-color: var(--orange); }
.tile.on .check::after { border-color: var(--pine-950); }
.tile-detail {
  min-height: 39px;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(247,242,233,.66);
  color: var(--pine-800);
  cursor: pointer;
  text-align: left;
  font: 800 12px/1 var(--sans);
}
.tile-detail::after { content: " →"; color: var(--orange-ink); }
.tile-detail:hover { background: var(--mint-soft); color: var(--pine-950); }
.tile.on .tile-detail {
  border-top-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--mint);
}
.tile.on .tile-detail:hover { background: rgba(255,255,255,.11); color: #fff; }

/* The desktop detail panel stays contextual and compact. */
.detail {
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  min-height: 0;
  padding: 22px;
  gap: 14px;
}
.detail .n { font-size: 40px; }
.detail h3 { font-size: 24px; }
.detail dd { font-size: 14px; line-height: 1.55; }
.detail-close { display: none; }
.detail-scrim[hidden], .detail[hidden] { display: none !important; }

@media (max-width: 1060px) {
  :root { --header-offset: 78px; }
  .site-header { top: 8px; }
  .site-header .bar,
  .site-header.scrolled .bar { height: 58px; }
  .brand { height: 44px; min-width: 101px; }
  .brand-logo { width: 98px; max-height: 41px; }
}

@media (max-width: 900px) {
  .detail-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(4,22,18,.64);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
  }
  .detail.sheet-open {
    display: grid !important;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    top: auto;
    z-index: 120;
    width: min(640px, 100%);
    max-height: min(82dvh, 720px);
    overflow-y: auto;
    padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -22px 70px rgba(0,0,0,.32);
    transform: translateX(-50%);
    animation: detail-in .22s ease-out both;
  }
  .detail-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font: 400 28px/1 var(--sans);
  }
  .detail-close:hover { background: rgba(255,255,255,.16); }
  .detail.sheet-open .row { padding-right: 48px; }
  body.detail-open { overflow: hidden; }
  @keyframes detail-in {
    from { opacity: .7; transform: translate(-50%, 28px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }
}

@media (max-width: 640px) {
  :root { --header-offset: 74px; }
  .site-header { top: 6px; }
  .site-header .bar,
  .site-header.scrolled .bar {
    width: calc(100% - 20px);
    height: 56px;
    padding: 5px 6px 5px 10px;
    border-radius: 12px;
  }
  .brand { height: 43px; min-width: 94px; }
  .brand-logo { width: 92px; max-height: 39px; }
  .head-actions { gap: 5px; }
  .lang, .menu-btn { width: 40px; height: 40px; }
  .mnav { margin-top: 5px; }
  .mnav .shell { width: calc(100% - 20px); border-radius: 12px; }
  .survey-guide { display: grid; gap: 3px; padding: 10px 12px; }
  .survey-guide strong { white-space: normal; }
  .tile-main { min-height: 105px; }
  .tile-main b { font-size: 13px; }
  .tile-main .rec { font-size: 11px; }
  .tile-detail { min-height: 42px; }
  .detail.sheet-open { padding-inline: 18px; }
}

@media (min-width: 1061px) {
  .nav-scrim { display: none !important; }
  body.nav-open { overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .bar, .tile { transition: none; }
  .detail.sheet-open { animation: none; }
}
