/*
 * TrekMe public site styles (mobile-first).
 * Breakpoints: 600px (tablet), 960px (desktop), 1280px (wide).
 *
 * Scoping: component and base styles only apply inside <body class="site">
 * (written as :where(.site) so page styles still win on specificity). Legacy
 * pages that link this file without body.site only get the shell header,
 * footer and report modal, whose inner classes are prefixed with "sh-".
 */

:root {
  /* Palette v2 (docs/網頁端UI重新設計_實作計畫書.md §3.1). */
  --c-forest-900: #0B2E22;
  --c-forest-700: #14553B;
  --c-forest-500: #1F8A5B;
  --c-moss-300: #8FC9A8;
  --c-moss-100: #E6F4EC;
  --c-trail-500: #F2832B;
  --c-trail-600: #A34A0C;
  --c-trail-100: #FDEBDD;
  --c-rock-900: #1C1F1D;
  --c-rock-600: #5B615E;
  --c-rock-400: #8E948F;
  --c-rock-200: #DDE2DE;
  --c-rock-100: #F3F5F3;
  --c-snow: #FFFFFF;
  --c-contour: rgba(20, 85, 59, .08);
  --c-elev-low: #3F8F5B;
  --c-elev-mid: #C9A86A;
  --c-elev-high: #FFFFFF;

  /* Semantic names mapped onto the v2 palette. */
  --c-text: var(--c-rock-900);
  --c-text-2: var(--c-rock-600);
  --c-muted: #6B716D;
  --c-line: var(--c-rock-200);
  --c-bg: var(--c-snow);
  --c-bg-2: var(--c-rock-100);
  --c-dark: var(--c-forest-900);
  --c-link: var(--c-forest-700);
  --c-danger: #c62828;
  --c-danger-soft: #fdecea;
  --c-caution: #a15c00;
  --c-caution-soft: #fff4e0;
  --c-info: #1565c0;
  --c-info-soft: #e8f1fc;
  --c-focus: #1565c0;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(11, 46, 34, .06), 0 2px 8px rgba(11, 46, 34, .06);
  --shadow-2: 0 10px 30px rgba(11, 46, 34, .14);
  --shadow-3: 0 18px 48px rgba(11, 46, 34, .22);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;

  --container-max: 1280px;
  --container-wide: 1440px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --touch: 44px;

  --fs-xs: .75rem;
  --fs-sm: clamp(.8125rem, .78rem + .15vw, .875rem);
  --fs-base: clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  --fs-xl: clamp(1.25rem, 1.1rem + .8vw, 1.75rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --fs-3xl: clamp(2rem, 1.4rem + 3vw, 3.5rem);

  --font: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-num: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --site-header-h: 60px;
}

/* ---------- Base (body.site only) ---------- */

body.site {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}
:where(.site) *, :where(.site) *::before, :where(.site) *::after {
  box-sizing: border-box;
}
:where(.site) img, :where(.site) video, :where(.site) svg,
:where(.site) canvas, :where(.site) iframe {
  max-width: 100%;
}
:where(.site) img, :where(.site) video { height: auto; }
:where(.site) a { color: var(--c-link); text-underline-offset: 2px; }
:where(.site) h1, :where(.site) h2, :where(.site) h3, :where(.site) h4 {
  line-height: 1.35;
  margin: 0 0 var(--sp-3);
}
:where(.site) p { margin: 0 0 var(--sp-4); }
:where(.site) button, :where(.site) input, :where(.site) select,
:where(.site) textarea {
  font: inherit;
  color: inherit;
}
:where(.site) :focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */

:where(.site) .site-main { flex: 1 0 auto; padding-bottom: var(--sp-7); }
:where(.site) .container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
:where(.site) .container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }

:where(.site) .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--sp-5);
}

:where(.site) .section { padding-block: var(--sp-6); }
:where(.site) .section + .section { padding-top: 0; }
:where(.site) .section__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-4);
}
:where(.site) .section__title a { font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
:where(.site) .page-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin: var(--sp-5) 0 var(--sp-4);
}
:where(.site) .muted { color: var(--c-muted); }
:where(.site) .list-plain { list-style: none; margin: 0; padding: 0; }

/* ---------- Breadcrumb ---------- */

:where(.site) .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
:where(.site) .breadcrumb li + li::before { content: "›"; margin-right: var(--sp-2); }
:where(.site) .breadcrumb a { color: inherit; }

/* ---------- Hero ---------- */

:where(.site) .hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(220px, 45vw, 460px);
  padding: var(--sp-6) var(--gutter);
  color: #fff;
  background: var(--c-dark) center / cover no-repeat;
  overflow: hidden;
}
:where(.site) .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .65) 100%);
}
:where(.site) .hero > * { position: relative; }
:where(.site) .hero h1, :where(.site) .hero h2 { font-size: var(--fs-2xl); margin: 0 0 var(--sp-2); }
:where(.site) .hero a { color: #fff; }
:where(.site) .hero img.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Card ---------- */

:where(.site) .card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
:where(.site) a.card:hover, :where(.site) .card:has(a:hover) { box-shadow: var(--shadow-2); }
:where(.site) .card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-2);
  overflow: hidden;
}
:where(.site) .card__media img, :where(.site) img.card__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:where(.site) .card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  flex: 1;
}
:where(.site) .card__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
:where(.site) .card__title a { color: inherit; text-decoration: none; }
:where(.site) .card__title a::after { content: ""; position: absolute; inset: 0; }
:where(.site) .card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  margin: 0;
}

/* ---------- Badge, chip, verified ---------- */

:where(.site) .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.6;
  background: var(--c-moss-100);
  color: var(--c-forest-900);
  white-space: nowrap;
}
:where(.site) .badge--danger { background: var(--c-danger-soft); color: var(--c-danger); }
:where(.site) .badge--caution { background: var(--c-caution-soft); color: var(--c-caution); }
:where(.site) .badge--info { background: var(--c-info-soft); color: var(--c-info); }

:where(.site) .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;
}
:where(.site) a.chip:hover, :where(.site) button.chip:hover { border-color: var(--c-forest-700); color: var(--c-forest-700); }
:where(.site) .chip[aria-current="page"], :where(.site) .chip.is-active {
  background: var(--c-forest-700);
  border-color: var(--c-forest-700);
  color: #fff;
}

.verified, :where(.site) .verified {
  position: relative;
  display: inline-block;
  width: .8em;
  height: .8em;
  min-width: 14px;
  min-height: 14px;
  border-radius: 50%;
  background: #1d9bf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
  vertical-align: -0.08em;
  overflow: hidden;
  color: transparent;
  user-select: none;
  flex: none;
}
.verified > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ---------- Buttons ---------- */

:where(.site) .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 10px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
:where(.site) .btn:hover { border-color: #bdbdbd; }
:where(.site) .btn:disabled, :where(.site) .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
:where(.site) .btn--primary { background: var(--c-forest-700); border-color: var(--c-forest-700); color: #fff; }
:where(.site) .btn--primary:hover { background: var(--c-forest-900); border-color: var(--c-forest-900); }
:where(.site) .btn--ghost { background: transparent; border-color: transparent; color: var(--c-link); }
:where(.site) .btn--ghost:hover { background: var(--c-moss-100); border-color: transparent; }
:where(.site) .btn--danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
:where(.site) .btn--block { display: flex; width: 100%; }

/* ---------- Article typography ---------- */

:where(.site) .article { font-size: var(--fs-base); line-height: 1.85; }
:where(.site) .article > * + * { margin-top: var(--sp-4); }
:where(.site) .article h2 {
  font-size: var(--fs-xl);
  margin: var(--sp-7) 0 var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid var(--c-forest-500);
  scroll-margin-top: calc(var(--site-header-h) + 12px);
}
:where(.site) .article h3 {
  font-size: var(--fs-lg);
  margin: var(--sp-6) 0 var(--sp-2);
  padding-left: var(--sp-3);
  border-left: 4px solid var(--c-forest-500);
  scroll-margin-top: calc(var(--site-header-h) + 12px);
}
:where(.site) .article p { margin: 0; }
:where(.site) .article p + p { margin-top: var(--sp-4); }
:where(.site) .article img { display: block; border-radius: var(--r-sm); margin-inline: auto; }
:where(.site) .article figure { margin: var(--sp-5) 0; }
:where(.site) .article figcaption {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-muted);
  text-align: center;
}
:where(.site) .article blockquote {
  margin: var(--sp-5) 0;
  padding: var(--sp-3) var(--sp-4);
  border-left: 4px solid var(--c-line);
  background: var(--c-bg-2);
  color: var(--c-text-2);
}
:where(.site) .article blockquote > :last-child { margin-bottom: 0; }
:where(.site) .article ul, :where(.site) .article ol { padding-left: 1.5em; }
:where(.site) .article li + li { margin-top: var(--sp-1); }
:where(.site) .article hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--sp-6) 0; }
:where(.site) .article pre { overflow-x: auto; padding: var(--sp-3); background: var(--c-bg-2); border-radius: var(--r-sm); }
/* Tables: wrap in <div class="table-wrap"> for horizontal scrolling. */
:where(.site) .table-wrap, :where(.site) .article .table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--sp-5) 0;
}
:where(.site) .article table, :where(.site) table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
:where(.site) .article table { min-width: 480px; }
:where(.site) .article th, :where(.site) .article td,
:where(.site) table.table th, :where(.site) table.table td {
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
:where(.site) .article th, :where(.site) table.table th { background: var(--c-bg-2); font-weight: 700; }

/* ---------- TOC ---------- */

:where(.site) .toc {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg-2);
  font-size: var(--fs-sm);
}
:where(.site) .toc > :first-child { margin-top: 0; }
:where(.site) .toc ol, :where(.site) .toc ul { margin: var(--sp-2) 0 0; padding-left: 1.4em; }
:where(.site) .toc li { margin: 4px 0; }
:where(.site) .toc a { color: var(--c-text); text-decoration: none; }
:where(.site) .toc a:hover { color: var(--c-link); text-decoration: underline; }

/* ---------- Callout & alert banner ---------- */

:where(.site) .callout {
  margin: var(--sp-5) 0;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border-left: 4px solid var(--c-forest-500);
  background: var(--c-moss-100);
}
:where(.site) .callout > :last-child { margin-bottom: 0; }
:where(.site) .callout--info { border-color: var(--c-info); background: var(--c-info-soft); }
:where(.site) .callout--caution { border-color: var(--c-caution); background: var(--c-caution-soft); }
:where(.site) .callout--danger { border-color: var(--c-danger); background: var(--c-danger-soft); }

:where(.site) .alert-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--gutter);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--c-info-soft);
  color: var(--c-info);
}
:where(.site) .alert-banner a { color: inherit; }
:where(.site) .alert-banner--info { background: var(--c-info-soft); color: var(--c-info); }
:where(.site) .alert-banner--caution { background: var(--c-caution-soft); color: var(--c-caution); }
:where(.site) .alert-banner--danger { background: var(--c-danger); color: #fff; }

/* ---------- Embeds, carousel ---------- */

:where(.site) .embed-16x9 {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: #000;
}
:where(.site) .embed-16x9 > iframe, :where(.site) .embed-16x9 > video,
:where(.site) .embed-16x9 > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

:where(.site) .carousel {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-md);
}
:where(.site) .carousel__item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--c-bg-2);
  overflow: hidden;
  border-radius: var(--r-md);
}
:where(.site) .carousel__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Commerce ---------- */

:where(.site) .product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--c-text);
}
:where(.site) .product-price s, :where(.site) .product-price del {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--c-muted);
}
:where(.site) .price--sale { color: var(--c-danger); }

/* ---------- Share bar, pager ---------- */

:where(.site) .share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-5) 0;
}
:where(.site) .share-bar a, :where(.site) .share-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
}

:where(.site) .pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
}
:where(.site) .pager a, :where(.site) .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  text-decoration: none;
  color: var(--c-text);
}
:where(.site) .pager [aria-current="page"] {
  background: var(--c-forest-700);
  border-color: var(--c-forest-700);
  color: #fff;
}

/* ---------- Forms ---------- */

:where(.site) .form-field, .sh-modal .form-field { display: grid; gap: 6px; margin: 0 0 var(--sp-4); }
:where(.site) .form-field > label, .sh-modal .form-field > label,
:where(.site) .form-field > .form-field__label {
  font-weight: 700;
  font-size: var(--fs-sm);
}
:where(.site) .form-field input:not([type="checkbox"]):not([type="radio"]),
:where(.site) .form-field select, :where(.site) .form-field textarea,
.sh-modal .form-field textarea, .sh-modal .form-field input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 12px;
  border: 1px solid #c4c4c4;
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 16px; /* keeps iOS from zooming on focus */
  color: var(--c-text);
}
:where(.site) .form-field textarea, .sh-modal .form-field textarea { min-height: 96px; resize: vertical; }
:where(.site) .form-field input:focus, :where(.site) .form-field select:focus,
:where(.site) .form-field textarea:focus, .sh-modal .form-field textarea:focus {
  border-color: var(--c-forest-700);
  outline: 2px solid var(--c-moss-100);
}
:where(.site) .form-field__hint { font-size: var(--fs-sm); color: var(--c-muted); }
:where(.site) .form-field__error { font-size: var(--fs-sm); color: var(--c-danger); }

/* ---------- Modal (also used by the report widget on legacy pages) ---------- */

:where(.site) .modal, .sh-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  font-family: var(--font);
  color: var(--c-text);
  line-height: 1.6;
}
:where(.site) .modal[hidden], .sh-modal[hidden] { display: none; }
:where(.site) .modal__panel, .sh-modal .modal__panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.sh-modal .modal__panel *, .sh-modal .modal__panel *::before, .sh-modal .modal__panel *::after { box-sizing: border-box; }
@media (min-width: 600px) {
  :where(.site) .modal, .sh-modal { align-items: center; padding: var(--sp-5); }
  :where(.site) .modal__panel, .sh-modal .modal__panel {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    box-shadow: var(--shadow-2);
  }
}
:where(.site) .modal__close, .sh-modal .modal__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #666;
  cursor: pointer;
}
:where(.site) .modal__title, .sh-modal .modal__title {
  margin: 0 40px var(--sp-3) 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.4;
}
:where(.site) .modal__actions, .sh-modal .modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
html.sh-scroll-lock, html.sh-scroll-lock body { overflow: hidden; }

/* Report widget internals */
.sh-modal .sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  font: 700 15px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.sh-modal .sh-btn--primary { background: var(--c-forest-700); border-color: var(--c-forest-700); color: #fff; }
.sh-modal .sh-btn:disabled { opacity: .5; cursor: not-allowed; }
.sh-modal .sh-btn:focus-visible, .sh-modal .modal__close:focus-visible,
.sh-modal input:focus-visible, .sh-modal textarea:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}
.sh-modal .sh-cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 0 var(--sp-4);
  padding: 0;
  border: 0;
}
@media (min-width: 600px) {
  .sh-modal .sh-cats { grid-template-columns: 1fr 1fr; }
}
.sh-modal .sh-cats legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.sh-modal .sh-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font-size: 15px;
  cursor: pointer;
}
.sh-modal .sh-cat:has(input:checked) { border-color: var(--c-forest-700); background: var(--c-moss-100); }
.sh-modal .sh-cat input { width: 18px; height: 18px; margin: 0; accent-color: var(--c-forest-700); }
.sh-modal .sh-msg { margin: 0 0 var(--sp-3); font-size: 15px; color: var(--c-text-2); }
.sh-modal .sh-err { margin: var(--sp-2) 0 0; font-size: 14px; color: var(--c-danger); }
.sh-modal .sh-err:empty { display: none; }

/* Inline "檢舉" trigger used by legacy pages */
.sh-report-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: #767676;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.sh-report-link:hover { color: var(--c-danger); text-decoration: underline; }
.sh-report-link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* ---------- Shell header (v2, plan §4.1) ---------- */

.site-header[data-shell] {
  position: sticky;
  top: 0;
  z-index: 1100;
  box-sizing: border-box;
  height: var(--site-header-h);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--c-line);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--c-text);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  transition: height var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.site-header[data-shell].is-scrolled:not([data-shell="compact"]) { height: 52px; box-shadow: var(--shadow-1); border-bottom-color: transparent; }
.site-header[data-shell="compact"] { --site-header-h: 48px; height: 48px; }
.site-header[data-shell] *, .site-header[data-shell] *::before, .site-header[data-shell] *::after,
.site-footer[data-shell] *, .site-footer[data-shell] *::before, .site-footer[data-shell] *::after,
.sh-drawer *, .sh-drawer *::before, .sh-drawer *::after {
  box-sizing: border-box;
}
.site-header[data-shell] a:focus-visible, .site-header[data-shell] button:focus-visible,
.site-footer[data-shell] a:focus-visible, .sh-drawer a:focus-visible, .sh-drawer button:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}
.sh-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sh-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--c-forest-700);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.sh-skip:focus { top: 8px; }
.sh-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-header[data-shell="compact"] .sh-bar { max-width: none; padding: 0 12px; }
.sh-spacer { flex: 1; }
.sh-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  margin-right: 8px;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
}
.sh-logo img { display: block; height: 28px; width: auto; }
.sh-logo__img { display: contents; }
.sh-logo__img--light { display: none; }
.site-header[data-shell="compact"] .sh-logo img { height: 24px; }
@media (max-width: 600px) { .site-header[data-shell] .sh-logo img { height: 30px; } }

/* Desktop nav with dropdown groups. */
.sh-nav { display: none; min-width: 0; }
.sh-nav ul, .sh-drawer ul, .sh-menu { list-style: none; margin: 0; padding: 0; }
.sh-nav__list { display: flex; align-items: center; gap: 2px; }
.sh-nav__group { position: relative; }
.sh-nav__link, .sh-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--c-text-2);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.sh-nav__link:hover, .sh-nav__btn:hover, .sh-nav__btn[aria-expanded="true"] { color: var(--c-forest-700); background: var(--c-moss-100); }
.sh-nav__link[aria-current="page"], .sh-nav__btn.is-current { color: var(--c-forest-700); box-shadow: inset 0 -3px 0 var(--c-forest-500); border-radius: 0; }
.sh-chev { width: 14px; height: 14px; transform: rotate(90deg); transition: transform var(--dur-2) var(--ease); opacity: .7; }
.sh-nav__btn[aria-expanded="true"] .sh-chev { transform: rotate(-90deg); }
.sh-dd {
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  z-index: 3;
  min-width: 280px;
  padding: 8px;
  border-radius: var(--r-md);
  background: #fff;
  color: var(--c-text);
  box-shadow: var(--shadow-3);
  animation: sh-pop var(--dur-2) var(--ease) both;
}
.sh-dd::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.sh-dd[hidden] { display: none; }
@keyframes sh-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sh-dd__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--c-text);
  text-decoration: none;
}
.sh-dd__link:hover, .sh-dd__link:focus-visible { background: var(--c-rock-100); }
.sh-dd__link[aria-current="page"] { background: var(--c-moss-100); }
.sh-dd__icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--c-moss-100);
  color: var(--c-forest-700);
}
.sh-dd__icon .icon { width: 20px; height: 20px; }
.sh-dd__text { display: grid; gap: 1px; min-width: 0; }
.sh-dd__text b { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.sh-dd__text small { color: var(--c-muted); font-size: 13px; }
.sh-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--c-caution-soft);
  color: var(--c-caution);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sh-badge[hidden] { display: none; }

/* Search: inline from 1200 px, toggled panel below the bar otherwise. */
.sh-search {
  position: relative;
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-rock-100);
  color: var(--c-text);
}
.sh-search:focus-within { border-color: var(--c-forest-500); background: #fff; box-shadow: 0 0 0 3px rgba(31, 138, 91, .18); }
.sh-search__icon { color: var(--c-rock-600); }
.sh-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
}
.sh-search input::placeholder { color: var(--c-rock-400); }
.site-header[data-shell] .sh-search input:focus-visible { outline: 0; }
.sh-search:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--c-focus); }
.sh-search input::-webkit-search-cancel-button { cursor: pointer; }
.site-header.is-search-open .sh-search {
  display: flex;
  position: absolute;
  top: calc(100% + 8px);
  left: var(--gutter);
  right: var(--gutter);
  height: 48px;
  background: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-3);
  animation: sh-pop var(--dur-2) var(--ease) both;
}
.sh-sugg {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 260px;
  padding: 6px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-3);
}
.sh-sugg[hidden] { display: none; }
.sh-sugg__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 14px;
  text-decoration: none;
}
.sh-sugg__item:hover, .sh-sugg__item:focus-visible { background: var(--c-moss-100); outline-offset: -3px; }
.sh-sugg__item .icon { color: var(--c-forest-500); }
.sh-sugg__item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-sugg__item b { color: var(--c-forest-700); margin: 0 2px; }
.sh-sugg__item em { font-style: normal; font-weight: 700; }

.sh-right { display: flex; align-items: center; gap: 4px; margin-left: auto; position: relative; }
.sh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-text);
  cursor: pointer;
}
.sh-icon-btn:hover { background: var(--c-rock-100); }
.sh-icon-btn .icon, .sh-burger svg { width: 22px; height: 22px; }
.sh-burger { margin-right: -8px; }
.sh-app {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--c-rock-200);
  border-radius: var(--r-pill);
  color: var(--c-forest-700);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sh-app:hover { border-color: var(--c-forest-500); background: var(--c-moss-100); }
.sh-account { position: relative; display: flex; align-items: center; }
.sh-login {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--c-forest-700);
  border-radius: var(--r-pill);
  background: var(--c-forest-700);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.sh-login:hover { background: var(--c-forest-500); border-color: var(--c-forest-500); }
.site-header[data-shell="compact"] .sh-login { min-height: 36px; padding: 0 14px; }
.sh-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.sh-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-moss-100);
  color: var(--c-forest-900);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-rock-200);
}
.sh-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  color: var(--c-text);
  animation: sh-pop var(--dur-2) var(--ease) both;
}
.sh-menu[hidden] { display: none; }
.sh-menu__name { padding: 8px 12px; font-weight: 800; color: var(--c-text); border-bottom: 1px solid var(--c-line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-menu a, .sh-menu button, .sh-drawer__link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--c-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sh-menu .icon, .sh-drawer__link .icon { color: var(--c-forest-500); width: 18px; height: 18px; }
.sh-menu a:hover, .sh-menu button:hover, .sh-drawer__link:hover { background: var(--c-rock-100); }

/* Overlay mode: transparent with white text over a hero until scrolled. */
.site-header[data-shell="overlay"] { margin-bottom: calc(-1 * var(--site-header-h)); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) {
  background: linear-gradient(180deg, rgba(11, 46, 34, .55), rgba(11, 46, 34, 0));
  border-bottom-color: transparent;
  color: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-logo__img--dark { display: none; }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-logo__img--light { display: contents; }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) :is(.sh-nav__link, .sh-nav__btn, .sh-icon-btn) { color: #fff; }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) :is(.sh-nav__link, .sh-nav__btn, .sh-icon-btn):hover { background: rgba(255, 255, 255, .16); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) :is(.sh-nav__link[aria-current="page"], .sh-nav__btn.is-current) { box-shadow: inset 0 -3px 0 var(--c-trail-500); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-search { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-search input::placeholder { color: rgba(255, 255, 255, .8); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-search__icon { color: #fff; }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-app { color: #fff; border-color: rgba(255, 255, 255, .55); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-app:hover { background: rgba(255, 255, 255, .14); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-login { background: #fff; border-color: #fff; color: var(--c-forest-900); }
.site-header[data-shell="overlay"]:not(.is-scrolled):not(.is-solid) .sh-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }

/* Drawer (phones / tablets, and the nav on compact headers). */
.sh-drawer { position: fixed; inset: 0; z-index: 1200; font-family: var(--font); font-size: 15px; line-height: 1.4; color: var(--c-text); }
.sh-drawer[hidden] { display: none; }
.sh-drawer__backdrop { position: absolute; inset: 0; background: rgba(11, 46, 34, .5); opacity: 0; transition: opacity var(--dur-2) ease; }
.sh-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(340px, 88vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  padding: 8px 12px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-3);
  transform: translateX(100%);
  transition: transform var(--dur-2) var(--ease);
}
.sh-drawer__panel:focus { outline: 0; }
.sh-drawer.is-open .sh-drawer__backdrop { opacity: 1; }
.sh-drawer.is-open .sh-drawer__panel { transform: none; }
.sh-drawer__head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding-left: 4px; }
.sh-drawer__close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-text-2);
  cursor: pointer;
}
.sh-drawer__close:hover { background: var(--c-rock-100); }
.sh-drawer__close .icon { width: 22px; height: 22px; }
.sh-drawer__group { padding: 8px 0; border-top: 1px solid var(--c-rock-100); }
.sh-drawer__nav .sh-drawer__group:first-child { border-top: 0; }
.sh-drawer__heading { margin: 4px 12px 2px; color: var(--c-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.sh-drawer__link span:first-of-type { flex: 1; }
.sh-drawer__link[aria-current="page"] { color: var(--c-forest-700); background: var(--c-moss-100); }
.sh-drawer__auth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--c-rock-100); }
.sh-btn-solid, .sh-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--r-pill);
  font-weight: 700;
  text-decoration: none;
}
.sh-btn-solid { background: var(--c-forest-700); color: #fff; }
.sh-btn-ghost { border: 1px solid var(--c-rock-200); color: var(--c-forest-700); }
.sh-appcard {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--c-forest-900) url("/images/brand/contour-dark.svg") center / 360px auto;
  color: #fff;
}
.sh-appcard img { flex: none; }
.sh-appcard b { font-size: 15px; }
.sh-appcard p { margin: 4px 0 10px; color: var(--c-moss-300); font-size: 13px; line-height: 1.6; }

@media (min-width: 960px) {
  .site-header[data-shell]:not([data-shell="compact"]) .sh-nav { display: block; }
  .site-header[data-shell]:not([data-shell="compact"]) .sh-burger { display: none; }
  .sh-app { display: inline-flex; }
}
@media (min-width: 1200px) {
  .site-header[data-shell] .sh-search { display: flex; flex: 1; max-width: 300px; margin-left: auto; }
  .site-header[data-shell] .sh-search-toggle { display: none; }
  .site-header[data-shell] .sh-search ~ .sh-right { margin-left: 0; }
}

/* ---------- Shell footer (v2, plan §4.2) ---------- */

.site-footer[data-shell] {
  --sh-ridge: clamp(24px, 4vw, 48px);
  flex-shrink: 0;
  margin-top: auto;
  padding-top: var(--sh-ridge);
  background:
    url("/images/brand/ridge-dark.svg") top center / 100% var(--sh-ridge) no-repeat,
    linear-gradient(var(--c-forest-900), var(--c-forest-900)) 0 calc(var(--sh-ridge) - 1px) / 100% 100% no-repeat;
  color: var(--c-moss-300);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}
.sh-foot {
  display: grid;
  gap: 32px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
}
.sh-foot .sh-logo { min-height: 0; }
.sh-foot__tag { margin: 12px 0 0; color: var(--c-moss-300); font-size: 14px; line-height: 1.8; }
.sh-foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.sh-foot__cols h2 { margin: 0 0 6px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.sh-foot__cols ul { list-style: none; margin: 0; padding: 0; }
.sh-foot__cols a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--c-moss-300);
  text-decoration: none;
}
.sh-foot__cols a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.sh-foot__app {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(143, 201, 168, .18);
  color: #fff;
}
.sh-foot__app b { font-size: 15px; }
.sh-foot__app p { margin: 2px 0 10px; color: var(--c-moss-300); font-size: 13px; }
.sh-foot__phone {
  flex: none;
  width: 64px;
  height: 112px;
  padding: 5px;
  border-radius: 14px;
  background: #0d1110;
  box-shadow: inset 0 0 0 1px #2a302d;
}
.sh-foot__screen {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--c-forest-700) url("/images/brand/contour-dark.svg") center / 160px auto;
}
.sh-foot__screen svg { width: 80%; height: auto; }
.sh-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 16px 4px 12px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--r-sm);
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.sh-play .icon { width: 22px; height: 22px; }
.sh-play small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.sh-play:hover { border-color: #fff; }
.sh-play--sm { min-height: 44px; font-size: 14px; }
.sh-copy { margin: 0; padding-top: 20px; border-top: 1px solid rgba(143, 201, 168, .18); color: var(--c-moss-300); font-size: 13px; opacity: .85; }
@media (min-width: 600px) {
  .sh-foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .sh-foot { grid-template-columns: minmax(200px, 1fr) minmax(0, 2.6fr) minmax(220px, 1fr); align-items: start; }
  .sh-foot__app { flex-direction: column; align-items: flex-start; }
  .sh-copy { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  .sh-foot__app { flex-direction: row; align-items: center; }
}

/* =====================================================================
 * Component library v2 (plan §4). Markup helpers live in /js/trek-viz.js
 * (browser) and functions/lib/trek_viz.js (SSR); see /_styleguide.html.
 * ===================================================================== */

/* ---------- Icons, numbers ---------- */

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.icon--fill { fill: currentColor; stroke: none; }
:where(.site) .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Backgrounds and dividers ---------- */

:where(.site) .bg-contour {
  background-color: var(--c-bg-2);
  background-image: url("/images/brand/contour.svg");
  background-size: 640px auto;
}
:where(.site) .bg-forest {
  background: var(--c-forest-900) url("/images/brand/contour-dark.svg");
  background-size: 640px auto;
  color: var(--c-snow);
}
:where(.site) .bg-forest a:not(.btn) { color: var(--c-moss-300); }
:where(.site) .bg-soft { background: var(--c-bg-2); }
:where(.site) .ridge-divider {
  display: block;
  width: 100%;
  height: clamp(28px, 5vw, 64px);
  background: url("/images/brand/ridge.svg") bottom center / 100% 100% no-repeat;
  margin-top: calc(-1 * clamp(28px, 5vw, 64px));
  position: relative;
  pointer-events: none;
}
:where(.site) .ridge-divider--dark { background-image: url("/images/brand/ridge-dark.svg"); }

/* ---------- Section heads, eyebrow, layout ---------- */

:where(.site) .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--sp-2);
  color: var(--c-forest-500);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .04em;
}
:where(.site) .bg-forest .eyebrow { color: var(--c-moss-300); }
:where(.site) .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-5);
}
:where(.site) .section-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 800; }
:where(.site) .section-head p { margin: 4px 0 0; color: var(--c-muted); }
:where(.site) .section-head__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--touch);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
:where(.site) .section-head__more:hover { text-decoration: underline; }
:where(.site) .container--wide { max-width: var(--container-wide); }

:where(.site) .cols { display: grid; gap: var(--sp-5); }
:where(.site) .cols--2, :where(.site) .cols--3, :where(.site) .cols--4,
:where(.site) .cols--5 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) {
  :where(.site) .cols--2, :where(.site) .cols--3, :where(.site) .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(.site) .cols--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  :where(.site) .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :where(.site) .cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :where(.site) .cols--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Horizontal scroll row on phones, grid from 960px. */
:where(.site) .scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 78%);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-2);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scrollbar-width: thin;
}
:where(.site) .scroll-row > * { scroll-snap-align: start; }
@media (min-width: 600px) { :where(.site) .scroll-row { grid-auto-columns: minmax(260px, 44%); } }
@media (min-width: 960px) {
  :where(.site) .scroll-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* Content + sticky aside (activity map, TOC, list sidebars). */
:where(.site) .split { display: grid; gap: var(--sp-6); }
@media (min-width: 960px) {
  :where(.site) .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  :where(.site) .split--aside-left { grid-template-columns: 280px minmax(0, 1fr); }
  :where(.site) .split--aside-right { grid-template-columns: minmax(0, 1fr) 320px; }
  :where(.site) .sticky { position: sticky; top: calc(var(--site-header-h) + var(--sp-4)); }
}

/* ---------- Tabs, chip rows, filters ---------- */

:where(.site) .tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: var(--sp-5);
  scrollbar-width: none;
}
:where(.site) .tabs::-webkit-scrollbar { display: none; }
:where(.site) .tab {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 var(--sp-4);
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--c-text-2);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
:where(.site) .tab:hover { color: var(--c-text); }
:where(.site) .tab[aria-selected="true"], :where(.site) .tab.is-active {
  color: var(--c-forest-700);
  border-bottom-color: var(--c-forest-500);
}
:where(.site) .chip-row { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
:where(.site) .chip-row::-webkit-scrollbar { display: none; }
:where(.site) .chip[aria-pressed="true"], :where(.site) .chip.is-active {
  background: var(--c-forest-700);
  border-color: var(--c-forest-700);
  color: #fff;
}
:where(.site) .chip--trail { background: var(--c-trail-100); color: var(--c-trail-600); border-color: transparent; }
:where(.site) .chip--glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }

:where(.site) .filter-panel { display: grid; gap: var(--sp-4); }
:where(.site) .filter-panel fieldset { border: 0; margin: 0; padding: 0; }
:where(.site) .filter-panel legend { font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
:where(.site) .filter-panel .chip-row { flex-wrap: wrap; overflow: visible; }

/* ---------- Search box ---------- */

:where(.site) .search-box {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  max-width: 560px;
  min-height: 52px;
  padding: 4px 4px 4px var(--sp-4);
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--shadow-2);
  color: var(--c-text);
}
:where(.site) .search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: var(--fs-base);
}
:where(.site) .search-box .btn { min-height: 44px; border-radius: var(--r-pill); }

/* ---------- Avatar, author row ---------- */

:where(.site) .avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-rock-200);
}
:where(.site) .avatar--xs { width: 24px; height: 24px; }
:where(.site) .avatar--lg { width: 56px; height: 56px; }
:where(.site) .avatar--xl { width: 88px; height: 88px; }
:where(.site) .author-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}
:where(.site) .author-row__link { display: inline-flex; align-items: center; gap: inherit; min-width: 0; color: inherit; text-decoration: none; }
:where(.site) a.author-row__link:hover .author-row__name { text-decoration: underline; }
:where(.site) .tcard__head--author { padding-bottom: var(--sp-3); }
:where(.site) .author-row__name { color: var(--c-text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.site) .author-row__meta { color: var(--c-muted); white-space: nowrap; }
:where(.site) .avatar-stack { display: inline-flex; align-items: center; }
:where(.site) .avatar-stack > * {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  background: var(--c-rock-200);
}
:where(.site) .avatar-stack > * + * { margin-left: -10px; }
:where(.site) .avatar-stack__more {
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--c-forest-700);
  background: var(--c-moss-100) !important;
}
:where(.site) .avatar-stack--sm > * { width: 24px; height: 24px; }
:where(.site) .avatar-stack--sm > * + * { margin-left: -8px; }
:where(.site) .bg-forest .avatar-stack > *, :where(.site) .hero-v2 .avatar-stack > * { border-color: var(--c-forest-900); }

/* ---------- Media frame + track thumbnail ---------- */

:where(.site) .media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--c-moss-100) url("/images/brand/contour.svg") center / 320px auto;
}
:where(.site) .media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-2) var(--ease); }
:where(.site) .media--16x9 { aspect-ratio: 16 / 9; }
:where(.site) .media--1x1 { aspect-ratio: 1 / 1; }
:where(.site) .media--4x5 { aspect-ratio: 4 / 5; }
:where(.site) .media--shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 46, 34, 0) 45%, rgba(11, 46, 34, .78) 100%);
  pointer-events: none;
}
:where(.site) .media__badges { position: absolute; top: var(--sp-2); left: var(--sp-2); z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
:where(.site) .media__corner { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 2; }
:where(.site) .track-thumb {
  position: absolute;
  right: var(--sp-2);
  bottom: var(--sp-2);
  z-index: 2;
  width: 34%;
  max-width: 120px;
  aspect-ratio: 1;
  padding: 6px;
  border-radius: var(--r-sm);
  background: rgba(11, 46, 34, .62);
  backdrop-filter: blur(4px);
}
:where(.site) .track-thumb svg, :where(.site) .track-svg { display: block; width: 100%; height: 100%; overflow: visible; }
:where(.site) .track-svg .track-line { fill: none; stroke: var(--c-trail-500); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
:where(.site) .track-svg .track-halo { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; vector-effect: non-scaling-stroke; }
:where(.site) .track-svg .track-start { fill: var(--c-forest-500); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
:where(.site) .track-svg .track-end { fill: var(--c-trail-500); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }

/* ---------- Stats ---------- */

:where(.site) .stat-strip {
  display: flex;
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}
:where(.site) .stat-strip::-webkit-scrollbar { display: none; }
:where(.site) .stat-strip > li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
:where(.site) .stat-strip .icon { color: var(--c-forest-500); }
:where(.site) .stat-strip b { color: var(--c-text); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; }
:where(.site) .stat-strip small { font-size: 1em; color: var(--c-muted); }
:where(.site) .stat-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
:where(.site) .stat-hero > li { background: #fff; padding: var(--sp-3) var(--sp-4); }
:where(.site) .stat-hero__label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-muted); }
:where(.site) .stat-hero__label .icon { color: var(--c-forest-500); }
:where(.site) .stat-hero__value { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: 800; color: var(--c-text); line-height: 1.3; }
:where(.site) .stat-hero__value small { font-size: .55em; font-weight: 700; color: var(--c-text-2); margin-left: 2px; }
@media (min-width: 600px) { :where(.site) .stat-hero { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); } }

:where(.site) .stat-band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); text-align: center; }
:where(.site) .stat-band__value { display: block; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-2xl); font-weight: 800; color: var(--c-forest-700); line-height: 1.2; }
:where(.site) .bg-forest .stat-band__value { color: #fff; }
:where(.site) .stat-band__label { color: var(--c-muted); font-size: var(--fs-sm); }
:where(.site) .bg-forest .stat-band__label { color: var(--c-moss-300); }
@media (min-width: 960px) { :where(.site) .stat-band { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

:where(.site) .elev-spark { display: block; width: 100%; height: 64px; }
:where(.site) .elev-spark .elev-area { fill: var(--c-trail-100); }
:where(.site) .elev-spark .elev-line { fill: none; stroke: var(--c-trail-500); stroke-width: 2; vector-effect: non-scaling-stroke; }
:where(.site) .elev-spark--lg { height: 140px; }

/* ---------- Reactions, social proof, bubbles ---------- */

:where(.site) .reaction-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}
:where(.site) .reaction-bar > span { display: inline-flex; align-items: center; gap: 4px; }
:where(.site) .reaction-bar b { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: var(--c-text); }
:where(.site) .reaction-bar__emoji { display: inline-flex; }
:where(.site) .reaction-bar__emoji > i {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .15);
  font-style: normal;
  font-size: 13px;
}
:where(.site) .reaction-bar__emoji > i + i { margin-left: -6px; }

:where(.site) .social-proof { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-sm); }
:where(.site) .social-proof b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

:where(.site) .social-bubble {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 280px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .96);
  color: var(--c-text);
  box-shadow: var(--shadow-3);
  font-size: var(--fs-sm);
  line-height: 1.4;
  animation: tm-bubble-in 600ms var(--ease) both;
}
:where(.site) .social-bubble__text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
:where(.site) .social-bubble b { color: var(--c-forest-700); }
@keyframes tm-bubble-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Card family ---------- */

:where(.site) .tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
:where(.site) a.tcard:hover, :where(.site) .tcard:focus-within { box-shadow: var(--shadow-2); transform: translateY(-2px); }
:where(.site) a.tcard:hover .media > img { transform: scale(1.04); }
:where(.site) .tcard__body { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
:where(.site) .tcard__head { padding: var(--sp-3) var(--sp-4) 0; }
:where(.site) .tcard__title {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1.4;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
:where(.site) .tcard__text { margin: 0; color: var(--c-text-2); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:where(.site) .tcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-3); font-size: var(--fs-sm); color: var(--c-muted); }
:where(.site) .tcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-rock-100);
}
:where(.site) .tcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
:where(.site) .tcard .author-row a, :where(.site) .tcard .btn { position: relative; z-index: 3; }

/* Summit card: altitude over the photo. */
:where(.site) .card-summit .media__caption {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-3);
  z-index: 2;
  color: #fff;
}
:where(.site) .card-summit__alt { display: block; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; }
:where(.site) .card-summit__alt small { font-size: .5em; margin-left: 2px; }
:where(.site) .card-summit__name { font-weight: 800; font-size: var(--fs-lg); }

/* Moment card: photo tile with author overlay. */
:where(.site) .card-moment { border-radius: var(--r-md); }
:where(.site) .card-moment .media { aspect-ratio: 1; }
:where(.site) .card-moment__overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--sp-3);
  color: #fff;
  font-size: var(--fs-sm);
}
:where(.site) .card-moment__overlay .author-row, :where(.site) .card-moment__overlay .author-row__name { color: #fff; }
:where(.site) .card-moment__text { margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
:where(.site) .card-moment:hover .card-moment__text { -webkit-line-clamp: 3; }
:where(.site) .masonry { columns: 2 160px; column-gap: var(--sp-3); }
:where(.site) .masonry > * { break-inside: avoid; margin-bottom: var(--sp-3); }
@media (min-width: 960px) { :where(.site) .masonry { columns: 5 180px; } }

/* Hiker card. */
:where(.site) .card-hiker { align-items: center; text-align: center; padding: var(--sp-5) var(--sp-4); gap: var(--sp-2); }
:where(.site) .card-hiker__name { font-weight: 800; color: var(--c-text); display: inline-flex; align-items: center; gap: 4px; }
:where(.site) .card-hiker__stat { color: var(--c-muted); font-size: var(--fs-sm); }

/* Article card, featured variant. */
:where(.site) .card-article--featured { display: grid; }
@media (min-width: 960px) {
  :where(.site) .card-article--featured { grid-template-columns: 3fr 2fr; }
  :where(.site) .card-article--featured .media { aspect-ratio: auto; min-height: 320px; height: 100%; }
  :where(.site) .card-article--featured .tcard__title { font-size: var(--fs-xl); -webkit-line-clamp: 3; }
  :where(.site) .card-article--featured .tcard__body { padding: var(--sp-6); justify-content: center; }
}

/* Notice row. */
:where(.site) .notice-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--c-line);
  color: inherit;
  text-decoration: none;
}
:where(.site) .notice-row:hover .notice-row__title { text-decoration: underline; }
:where(.site) .notice-row__title { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.site) .notice-row__date { color: var(--c-muted); font-size: var(--fs-sm); white-space: nowrap; }

/* Feed item (activities feed view). */
:where(.site) .feed-item { display: grid; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-1); }
:where(.site) .feed-item__summary { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--sp-3); align-items: center; }
:where(.site) .feed-item__track { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--c-forest-900) url("/images/brand/contour-dark.svg") center / 200px; padding: 8px; }

/* ---------- Thread (community replies) ---------- */

:where(.site) .thread { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
:where(.site) .thread__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--sp-3); }
:where(.site) .thread__bubble { background: var(--c-bg-2); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); padding: var(--sp-3) var(--sp-4); }
:where(.site) .thread__meta { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: 4px; }
:where(.site) .thread .thread { margin-top: var(--sp-3); }

/* ---------- Checkpoint timeline ---------- */

:where(.site) .timeline { list-style: none; margin: 0; padding: 0; }
:where(.site) .timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px 24px minmax(0, 1fr);
  gap: 0 var(--sp-2);
  padding-bottom: var(--sp-4);
}
:where(.site) .timeline__time { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 800; color: var(--c-text); font-size: var(--fs-sm); padding-top: 2px; }
:where(.site) .timeline__rail { position: relative; display: flex; justify-content: center; }
:where(.site) .timeline__rail::before { content: ""; position: absolute; top: 4px; bottom: calc(-1 * var(--sp-4)); width: 3px; border-radius: 3px; background: var(--c-moss-300); }
:where(.site) .timeline__item:last-child .timeline__rail::before { display: none; }
:where(.site) .timeline__dot { position: relative; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: #fff; border: 3px solid var(--c-forest-500); }
:where(.site) .timeline__item--start .timeline__dot { background: var(--c-forest-500); }
:where(.site) .timeline__item--end .timeline__dot { border-color: var(--c-trail-500); background: var(--c-trail-500); }
:where(.site) .timeline__name { font-weight: 800; }
:where(.site) .timeline__leg { font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- Weather strip ---------- */

:where(.site) .weather-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: var(--sp-2); overflow-x: auto; }
:where(.site) .weather-strip > * { display: grid; justify-items: center; gap: 2px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-md); background: var(--c-bg-2); font-size: var(--fs-sm); text-align: center; }
:where(.site) .weather-strip img { width: 40px; height: 40px; }
:where(.site) .weather-strip b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------- Table ---------- */

:where(.site) .table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); }
:where(.site) .table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
:where(.site) .table th, :where(.site) .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
:where(.site) .table th { background: var(--c-bg-2); color: var(--c-text-2); font-weight: 700; }
:where(.site) .table tr:last-child td { border-bottom: 0; }
:where(.site) .table .num, :where(.site) .table td.r { text-align: right; }

/* ---------- Hero v2 ---------- */

:where(.site) .hero-v2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--c-forest-900);
}
:where(.site) .hero-v2__bg { position: absolute; inset: 0; z-index: -2; }
:where(.site) .hero-v2__bg img { width: 100%; height: 100%; object-fit: cover; }
:where(.site) .hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    url("/images/brand/contour-dark.svg") center / 720px auto,
    linear-gradient(180deg, rgba(11, 46, 34, .35) 0%, rgba(11, 46, 34, .55) 55%, rgba(11, 46, 34, .96) 100%),
    linear-gradient(90deg, rgba(11, 46, 34, .7) 0%, rgba(11, 46, 34, 0) 70%);
}
:where(.site) .hero-v2__inner { display: grid; gap: var(--sp-6); align-items: center; min-height: min(78vh, 640px); padding-block: var(--sp-8) var(--sp-9); }
:where(.site) .hero-v2 h1 { margin: 0 0 var(--sp-3); font-size: var(--fs-3xl); font-weight: 900; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
:where(.site) .hero-v2__lead { margin: 0 0 var(--sp-5); max-width: 36em; font-size: var(--fs-lg); color: rgba(255, 255, 255, .88); }
:where(.site) .hero-v2__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
:where(.site) .hero-v2--sm .hero-v2__inner { min-height: 0; padding-block: var(--sp-7) var(--sp-8); }
@media (min-width: 960px) { :where(.site) .hero-v2__inner--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }

/* Phone mockup with floating bubbles. */
:where(.site) .phone-stage { position: relative; display: none; justify-self: center; width: min(320px, 100%); }
@media (min-width: 960px) { :where(.site) .phone-stage { display: block; } }
:where(.site) .phone {
  position: relative;
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  padding: 10px;
  background: #0d1110;
  box-shadow: var(--shadow-3), inset 0 0 0 2px #2a302d;
}
:where(.site) .phone__screen { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--c-moss-100); }
:where(.site) .phone__screen img { width: 100%; height: 100%; object-fit: cover; }
:where(.site) .phone-stage .social-bubble { position: absolute; z-index: 2; }
:where(.site) .phone-stage .social-bubble:nth-of-type(1) { top: 14%; left: -38%; }
:where(.site) .phone-stage .social-bubble:nth-of-type(2) { top: 46%; right: -34%; animation-delay: .4s; }
:where(.site) .phone-stage .social-bubble:nth-of-type(3) { bottom: 12%; left: -30%; animation-delay: .8s; }

/* Mobile "just happened" ticker. */
:where(.site) .ticker { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-block: var(--sp-3); }
:where(.site) .ticker::-webkit-scrollbar { display: none; }
:where(.site) .ticker .social-bubble { flex: none; animation: none; box-shadow: var(--shadow-1); }
@media (min-width: 960px) { :where(.site) .ticker--mobile { display: none; } }

/* ---------- Steps (how it works) ---------- */

:where(.site) .steps { display: grid; gap: var(--sp-5); counter-reset: step; list-style: none; margin: 0; padding: 0; }
:where(.site) .steps > li { position: relative; padding: var(--sp-5); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-1); counter-increment: step; }
:where(.site) .steps > li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--sp-3);
  border-radius: 50%;
  background: var(--c-forest-700);
  color: #fff;
  font-family: var(--font-num);
  font-weight: 800;
}
:where(.site) .steps h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
:where(.site) .steps p { margin: 0; color: var(--c-text-2); font-size: var(--fs-sm); }
@media (min-width: 960px) {
  :where(.site) .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :where(.site) .steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 38px;
    left: calc(var(--sp-5) + 44px);
    right: calc(-1 * var(--sp-5) + 8px);
    border-top: 3px dashed var(--c-trail-500);
    opacity: .6;
  }
}

/* ---------- App CTA ---------- */

:where(.site) .app-cta {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  overflow: hidden;
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--c-forest-900) url("/images/brand/contour-dark.svg") center / 640px auto;
  color: #fff;
}
:where(.site) .app-cta h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-xl); font-weight: 800; color: #fff; }
:where(.site) .app-cta p { margin: 0 0 var(--sp-4); color: rgba(255, 255, 255, .85); }
:where(.site) .app-cta__art { display: none; }
@media (min-width: 960px) {
  :where(.site) .app-cta { grid-template-columns: minmax(0, 1fr) 260px; padding: var(--sp-7); }
  :where(.site) .app-cta__art { display: block; align-self: end; margin-bottom: calc(-1 * var(--sp-7)); }
  :where(.site) .app-cta__art .phone { border-radius: 36px 36px 0 0; aspect-ratio: 9 / 12; }
  :where(.site) .app-cta__art .phone__screen { border-radius: 26px 26px 0 0; }
}
:where(.site) .btn--accent { background: var(--c-trail-500); border-color: var(--c-trail-500); color: var(--c-forest-900); }
:where(.site) .btn--accent:hover { filter: brightness(1.06); }
:where(.site) .btn--light { background: #fff; border-color: #fff; color: var(--c-forest-900); }
:where(.site) .btn--outline-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
:where(.site) .btn--outline-light:hover { background: rgba(255, 255, 255, .12); }
:where(.site) .btn--lg { min-height: 52px; padding-inline: var(--sp-6); font-size: var(--fs-lg); }
:where(.site) .btn--sm { min-height: 36px; padding: 6px 14px; font-size: var(--fs-sm); }

/* ---------- States: skeleton, empty, error, toast ---------- */

:where(.site) .skeleton {
  display: block;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--c-rock-100) 0%, #e9ece9 50%, var(--c-rock-100) 100%);
  background-size: 200% 100%;
  animation: tm-shimmer 1.3s linear infinite;
  min-height: 1em;
}
:where(.site) .skeleton--card { aspect-ratio: 4 / 5; border-radius: var(--r-md); }
:where(.site) .skeleton--text { height: 1em; margin-bottom: .5em; }
@keyframes tm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
:where(.site) .empty-state, :where(.site) .error-state {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--c-bg-2) url("/images/brand/contour.svg") center / 480px auto;
  text-align: center;
  color: var(--c-text-2);
}
:where(.site) .empty-state__art { width: 88px; height: 88px; }
:where(.site) .empty-state h3, :where(.site) .error-state h3 { margin: 0; color: var(--c-text); font-size: var(--fs-lg); }
:where(.site) .empty-state p, :where(.site) .error-state p { margin: 0; max-width: 32em; }
.tm-toast-host { position: fixed; left: 50%; bottom: 24px; z-index: 1500; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.tm-toast {
  padding: 12px 18px;
  border-radius: 999px;
  background: #0B2E22;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(11, 46, 34, .3);
  animation: tm-bubble-in 300ms cubic-bezier(.2, .8, .2, 1) both;
}

/* ---------- Breakpoint helpers ---------- */

@media (min-width: 600px) {
  :where(.site) .carousel__item { flex-basis: 85%; }
}
@media (min-width: 960px) {
  :where(.site) .carousel__item { flex-basis: 70%; }
  :where(.site) .section { padding-block: var(--sp-7); }
}
@media (min-width: 1280px) {
  :where(.site) .grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  :where(.site) *, :where(.site) *::before, :where(.site) *::after,
  .sh-drawer *, .sh-modal *, .site-header[data-shell] * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header[data-shell], .site-footer[data-shell], .sh-drawer, .sh-modal, .share-bar { display: none !important; }
}
