/* ==========================================================================
   Went Hiking — design tokens
   Paper and ink: off-white ground, near-black type, square corners,
   uppercase micro-labels. Everything below is consumed by the rules that
   follow; prefer adding a token over introducing a new literal.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- Color: ground and ink ------------------------------------------- */
  --bg: #f7f7f4;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #2e2e2a;
  --muted: #696963;
  --faint: #aaa9a2;
  --line: #d9d9d2;
  --soft: #eeeeea;

  /* --- Color: signal ---------------------------------------------------- */
  --danger: #b8403a;
  --danger-strong: #8a2b24;
  --success: #2f6b44;

  /* --- Color: media surfaces -------------------------------------------- */
  --photo-void: #050505;
  --map-wash: #dfe7df;

  /* --- Color: veils and scrims ------------------------------------------ */
  --paper-veil: rgba(255, 255, 255, 0.58);
  --paper-veil-strong: rgba(255, 255, 255, 0.92);
  --scrim: rgba(17, 17, 17, 0.42);
  --scrim-deep: rgba(0, 0, 0, 0.9);
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.88);
  --on-dark-faint: rgba(255, 255, 255, 0.62);
  --on-dark-dim: rgba(255, 255, 255, 0.42);
  --on-dark-veil: rgba(255, 255, 255, 0.16);
  --dark-control: rgba(15, 15, 15, 0.74);
  --header-veil: rgba(247, 247, 244, 0.86);

  /* --- Elevation -------------------------------------------------------- */
  --shadow-sm: 0 8px 18px rgba(17, 17, 17, 0.18);
  --shadow-md: 0 12px 24px rgba(17, 17, 17, 0.2);
  --shadow-lg: 0 14px 28px rgba(17, 17, 17, 0.12);
  --shadow-xl: 0 24px 70px rgba(17, 17, 17, 0.26);
  --shadow-photo: 0 18px 70px rgba(0, 0, 0, 0.42);

  /* --- Space (4px base) -------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;

  /* --- Measure and rhythm ------------------------------------------------ */
  --max: 1120px;
  --measure: 760px;
  --measure-narrow: 620px;
  --measure-wide: 900px;
  --gutter: 32px;
  --map-band: clamp(260px, 30vw, 400px);
  --map-band-expanded: min(76vh, 680px);

  /* --- Type ramp — 12 · 13 · 14 · 15 · 16 · 17 · 18 · 21 · 26 · 34 · 44 --- */
  --font-sans: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-script: "Went Hiking Script", "Brush Script MT", cursive;
  --text-3xs: 12px;
  --text-2xs: 13px;
  --text-xs: 14px;
  --text-s: 15px;
  --text-m: 16px;
  --text-l: 17px;
  --text-xl: 18px;
  --text-2xl: 21px;
  --text-3xl: 26px;
  --text-4xl: 34px;
  --text-5xl: 44px;
  --text-display: clamp(40px, 6vw, 72px);
  --text-display-sm: clamp(30px, 4vw, 46px);

  --leading-display: 0.98;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-body: 1.6;
  --leading-relaxed: 1.7;

  --tracking-label: 0.08em;
  --tracking-display: -0.02em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Line and shape ---------------------------------------------------- */
  --border: 1px;
  --border-strong: 2px;
  --radius: 0;
  --radius-round: 50%;

  /* --- Motion ------------------------------------------------------------ */
  --dur-1: 120ms;
  --dur-2: 160ms;
  --dur-3: 260ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Focus ------------------------------------------------------------- */
  --focus-width: 2px;
  --focus-color: var(--ink);
  --focus-offset: 3px;

  /* --- Depth ladder ------------------------------------------------------ */
  --z-below: 0;
  --z-raised: 1;
  --z-float: 2;
  --z-header: 100;
  --z-overlay: 900;
  --z-modal: 1000;
  --z-lightbox: 1100;
}

@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Went Hiking Script";
  src: url("/fonts/Satisfy-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-m);
  font-feature-settings: "cv05" 1, "cv08" 1;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color var(--dur-1) var(--ease-out),
    opacity var(--dur-1) var(--ease-out),
    text-decoration-color var(--dur-1) var(--ease-out),
    text-decoration-thickness var(--dur-1) var(--ease-out);
}

/* --------------------------------------------------------------------------
   Interaction states. One focus ring for the whole site, set at zero-ish
   specificity via :where() so any component can still speak for itself (the
   lightbox, for instance, needs a white ring on black). The hover vocabulary
   is deliberately quiet: prose links thicken their rule, media dims a touch,
   controls invert.
   -------------------------------------------------------------------------- */

:where(a, button, summary, input, select, textarea, [tabindex], [role="button"]):focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}

/* Prose and utility links: the underline is the affordance, so hover leans on
   it rather than on colour. */
a:hover {
  text-decoration-thickness: var(--border-strong);
}

.site-nav a,
.site-nav-greeting {
  text-decoration: none;
}

.site-nav a:not(.site-nav-add):hover,
.site-nav a:not(.site-nav-add):focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
}

/* Trip titles carry a hairline rule at rest that inks in on hover — loud
   enough to read as a link, quiet enough for a 46px headline. */
.trip-row-heading a,
.trip-title-bar a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: var(--border-strong);
  text-underline-offset: 0.12em;
}

.trip-row-heading a:hover,
.trip-row-heading a:focus-visible,
.trip-title-bar a:hover,
.trip-title-bar a:focus-visible {
  text-decoration-color: var(--ink);
}

/* Photo thumbs and map tiles dim slightly under the cursor. */
.trip-photo-grid a img,
.photo-gallery a img,
.trip-inline-photo a img,
.member-list img {
  transition: opacity var(--dur-2) var(--ease-out);
}

.trip-photo-grid a:hover img,
.trip-photo-grid a:focus-visible img,
.photo-gallery a:hover img,
.photo-gallery a:focus-visible img,
.trip-inline-photo a:hover img,
.trip-inline-photo a:focus-visible img,
.member-list a:hover img {
  opacity: 0.78;
}

.trip-map-tile .trip-map-tile-map {
  transition: opacity var(--dur-2) var(--ease-out);
}

.trip-map-tile:hover .trip-map-tile-map,
.trip-map-tile:focus-visible .trip-map-tile-map {
  opacity: 0.78;
}

.member-list a:hover span,
.leaderboard-list a:hover,
.section-heading a:hover,
.breadcrumbs a:hover {
  text-decoration: underline;
  text-decoration-thickness: var(--border-strong);
}

img {
  display: block;
  max-width: 100%;
}

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

/* Out of the way until it is tabbed to, then the first thing on the page. */
.skip-link {
  position: absolute;
  z-index: 100;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-3) var(--space-4);
  transform: translateY(calc(-100% - var(--space-4)));
  border: var(--border) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-s);
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .skip-link {
    transition: transform var(--dur-2) var(--ease-out);
  }
}

.site-header {
  width: 100%;
  border-bottom: var(--border) solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 26px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo-svg {
  display: block;
  overflow: visible;
}

.wordmark-logo {
  width: 204px;
  height: auto;
  transform: translateY(-3px);
}

.logo-text {
  font-family: var(--font-script);
  font-size: 92px;
  font-weight: var(--weight-regular);
  letter-spacing: -0.025em;
}

.logo-text-shadow {
  fill: var(--ink);
  opacity: 0.16;
  paint-order: stroke fill;
  stroke: var(--ink);
  stroke-linejoin: round;
  stroke-width: 7px;
  transform: translate(8px, 6px);
}

.logo-text-fill {
  fill: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: var(--text-xs);
}

.site-nav-greeting {
  color: var(--muted);
}

.site-nav-add {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: var(--border) solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) var(--ease-out);
}

.site-nav-add svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.4;
}

.site-nav-add:hover,
.site-nav-add:focus-visible {
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.site-nav-add:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: 3px;
}

/* The overflow disclosure is a narrow-screen affordance only; above the mobile
   breakpoint every destination is already in the row. */
.site-nav-menu {
  display: none;
}

.site-nav-menu-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
}

.site-nav-menu-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.site-nav-menu-button:hover,
.site-nav-menu-button[aria-expanded="true"] {
  background: none;
  color: var(--ink);
}

.site-nav-menu-button[aria-expanded="true"] svg {
  opacity: 0.55;
}

.site-nav-menu-panel {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: var(--z-overlay);
  display: grid;
  min-width: 172px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: var(--space-2) 0;
  box-shadow: var(--shadow-lg);
}

/* display:grid above would otherwise beat the UA rule for [hidden]. */
.site-nav-menu-panel[hidden] {
  display: none;
}

.site-nav-menu-greeting {
  margin: 0;
  border-bottom: var(--border) solid var(--line);
  color: var(--muted);
  padding: var(--space-1) var(--space-4) var(--space-3);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.site-nav .site-nav-menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  font-size: var(--text-s);
  white-space: nowrap;
}

.site-nav .site-nav-menu-panel a:hover,
.site-nav .site-nav-menu-panel a:focus-visible {
  background: var(--soft);
  text-decoration: none;
}

main {
  min-height: 70vh;
}

/* The skip link's destination. A 2px ring around a 70vh region reads as damage
   rather than as feedback; the scroll to the top of the content is the signal,
   and the next Tab lands inside. */
main:focus,
main:focus-visible {
  outline: 0;
}

/* --- Flash --------------------------------------------------------------
   Rules and a coloured edge rather than a tinted box, because the rest of the
   site separates things with lines and not with fills.
   ------------------------------------------------------------------------ */

.flash-region {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding-top: var(--space-7);
}

.flash {
  max-width: var(--measure);
  margin-bottom: var(--space-3);
  border-left: var(--border-strong) solid var(--line);
  padding: var(--space-3) var(--space-4);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: var(--text-s);
}

.flash:last-child {
  margin-bottom: 0;
}

.flash-notice {
  border-left-color: var(--success);
}

.flash-error {
  border-left-color: var(--danger);
  color: var(--danger-strong);
}

.home-hero,
.section,
.narrow,
.trip-page,
.form-page,
.profile-header,
.photo-page {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
}

/* Masthead: statement on the left, archive totals stacked down the right.
   The totals used to run as one inline row under the map, which left a
   300px hole in the right of the container on any desktop viewport. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-5) var(--space-9);
  padding: var(--space-8) 0 var(--space-2);
}

.home-hero-lead {
  min-width: 0;
}

/* The home page's editorial statement. It is a real h1 but sits at statement
   scale rather than display scale, so the trip feed below stays the subject. */
.home-title {
  max-width: none;
  margin-bottom: var(--space-3);
  font-size: var(--text-4xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

.home-hero .home-kicker {
  display: grid;
  justify-items: end;
  gap: 2px;
  margin-bottom: 0;
  text-align: right;
  white-space: nowrap;
}

.home-hero .home-kicker > *:not(:last-child)::after {
  content: none;
}

.narrow {
  max-width: var(--measure);
  padding: 80px 0;
}

.kicker,
.meta,
.breadcrumbs {
  color: var(--muted);
  font-size: var(--text-2xs);
  text-transform: uppercase;
}

.kicker {
  letter-spacing: 0.08em;
}

.inline-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: var(--space-5);
}

.inline-kicker > * {
  display: inline-flex;
  align-items: center;
}

.trip-kicker-action {
  gap: 0.35em;
}

.inline-kicker > *:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-3);
  color: var(--faint);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: var(--measure-wide);
  margin-bottom: 18px;
  font-size: var(--text-display);
  line-height: var(--leading-display);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
}

h2 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

h3 {
  font-size: var(--text-xl);
  line-height: 1.25;
}

.lede {
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: var(--text-2xl);
  margin-bottom: 0;
}

.section {
  padding: 48px 0;
}

.home-hero + .section {
  padding-top: 26px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: var(--border) solid var(--line);
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

/* A section heading that is also the page title (/hikes, /search) reads a
   step larger than the in-page section labels it sits alongside. */
.section-heading h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

.hike-index-section .search-form {
  margin-bottom: 28px;
}

.comment {
  border-top: var(--border) solid var(--line);
  padding-top: 18px;
}

/* --------------------------------------------------------------------------
   Trip rows — one editorial list unit, shared by the home feed, /hikes,
   /search and profiles. The text holds a readable measure while the photo
   grid runs the full column, so the page reads as a deliberate frame instead
   of a left-aligned block with a dead gutter.
   -------------------------------------------------------------------------- */

.trip-list {
  display: grid;
  gap: 0;
}

.trip-row {
  display: block;
  border-bottom: var(--border) solid var(--line);
  padding: var(--space-7) 0 var(--space-8);
}

.trip-list .trip-row:first-child {
  padding-top: var(--space-2);
}

.trip-row-content {
  max-width: var(--measure);
  min-width: 0;
}

.trip-row .trip-row-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.trip-row-heading h2,
.trip-row-heading h3 {
  max-width: none;
  font-size: var(--text-display-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

.trip-row .meta a {
  color: inherit;
}

.trip-row-stats {
  margin-bottom: 14px;
}

.trip-row-excerpt {
  max-width: var(--measure);
  margin-bottom: 0;
  color: var(--ink);
  font-size: var(--text-2xl);
  line-height: 1.65;
}

.trip-row .trip-photo-gallery {
  max-width: none;
  margin-top: 22px;
  margin-bottom: 0;
}

.trip-row .trip-photo-gallery .trip-photo-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.trip-row-map {
  width: min(100%, var(--measure));
  height: 280px;
  margin-top: var(--space-5);
  border: var(--border) solid var(--line);
  background: var(--soft);
  pointer-events: none;
}

.trip-row-map .leaflet-control-container {
  display: none;
}

.trip-header {
  max-width: var(--measure-wide);
  padding: 28px 0 var(--space-6);
}

.trip-header h1 {
  margin-bottom: var(--space-3);
}

.trip-row-heading,
.trip-title-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.trip-row-heading h2,
.trip-row-heading h3,
.trip-title-bar h1 {
  min-width: 0;
  margin-bottom: 0;
}

.trip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: var(--space-4);
  font-size: var(--text-xs);
}

.heart-form {
  flex: 0 0 auto;
  margin: 4px 0 0;
}

.trip-row-heading .heart-form,
.trip-title-bar .heart-form {
  margin-top: 0;
}

.heart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 42px;
  height: 34px;
  border: var(--border) solid var(--line);
  border-radius: 0;
  background: var(--paper-veil);
  color: var(--muted);
  padding: 0 10px;
  font-size: var(--text-2xs);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

.heart-button:hover,
.heart-button:focus-visible {
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-1px);
}

.heart-button:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: 2px;
}

.heart-button.is-hearted {
  border-color: var(--danger);
  color: var(--danger);
}

.heart-button-compact {
  min-width: 36px;
  height: 30px;
  gap: 5px;
  padding: 0 8px;
}

.trip-title-bar .heart-button {
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
}

.heart-icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* The class is the single source of truth for the filled state, so the
   optimistic toggle in site.js never has to touch the path itself. */
.heart-icon path {
  fill: none;
  transition: fill var(--dur-1) var(--ease-out);
}

.is-hearted .heart-icon path {
  fill: currentColor;
}

/* A short beat of feedback for the optimistic toggle, so a heart that is still
   in flight does not feel like nothing happened. */
.heart-button.is-hearting .heart-icon {
  animation: heart-pop var(--dur-3) var(--ease-out);
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.24); }
  100% { transform: scale(1); }
}

.heart-count {
  min-width: 1ch;
  font-size: var(--text-3xs);
  font-weight: var(--weight-bold);
}

.trip-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 34px;
  border-top: var(--border) solid var(--line);
  padding-top: var(--space-4);
  padding-bottom: 28px;
}

.trip-post-main {
  min-width: 0;
}

.trip-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.trip-photo-grid a {
  display: block;
  min-width: 0;
}

/* height: auto is load-bearing. A width/height pair in the markup arrives as a
   presentational hint, and a definite height beats aspect-ratio — so the moment
   photos started carrying real dimensions, a landscape shot began reserving a
   portrait tile. Releasing the height lets the ratio below decide the box while
   the attributes still tell the browser what is coming. */
.trip-photo-grid > a:not(.trip-map-tile) > img,
.trip-map-tile-map {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
}

.trip-map-tile {
  overflow: hidden;
  border: var(--border) solid var(--line);
}

.trip-map-tile-map {
  display: block;
  pointer-events: none;
}

.trip-map-tile-map .leaflet-control-container {
  display: none;
}

.trip-photo-gallery {
  max-width: none;
  margin-bottom: 42px;
}

.trip-photo-gallery .trip-photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trip-inline-photo {
  width: min(900px, 100%);
  margin: 30px 0;
}

.trip-inline-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 760px;
  background: var(--photo-void);
}

.trip-inline-photo figcaption {
  max-width: var(--measure);
  margin-top: 10px;
  color: var(--muted);
}

.trip-inline-photo figcaption p {
  margin-bottom: 2px;
  font-size: var(--text-xs);
  line-height: 1.45;
}

.map-panel {
  width: 100%;
  height: 360px;
  margin: 0 0 44px;
  border: var(--border) solid var(--line);
  background: var(--soft);
}

/* Leaflet stacks its panes at z-index 400 and up, which beats the sticky
   header's 100 the moment a map scrolls past it. Isolating each map keeps
   those values internal, so a map slides under the header like any photo. */
.leaflet-container {
  isolation: isolate;
}

.map-band {
  width: 100%;
}

.profile-map-band {
  position: relative;
  z-index: var(--z-below);
}

/* One band ratio for every hero map. The old fixed 190px letterboxed to
   6.7:1 on a desktop viewport, which is why fitBounds kept framing open
   ocean; clamping to roughly 3:1 (and proportionally taller on phones) lets
   the region fill the frame. */
.site-map {
  height: var(--map-band);
  margin: 0;
  border: 0;
  border-bottom: var(--border) solid var(--line);
  background: var(--map-wash);
  overflow: hidden;
  transition: height var(--dur-3) var(--ease-out);
}

.site-map.map-expanded {
  height: var(--map-band-expanded);
}

.map-size-control {
  margin-right: 10px;
  margin-bottom: 22px;
}

.map-size-button {
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: var(--border) solid var(--ink);
  border-radius: 0;
  background: var(--paper-veil-strong);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  transition:
    background-color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

.map-size-button:hover,
.map-size-button:focus-visible {
  background: var(--paper);
  transform: translateY(-1px);
}

.map-size-button:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: 2px;
}

.map-size-button:active .map-size-icon {
  transform: scale(0.92);
}

.map-size-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.5;
  transition: transform var(--dur-2) var(--ease-out);
}

[data-photo-lightbox-trigger] {
  cursor: zoom-in;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-7);
}

.leaderboard-grid h3 {
  margin-bottom: 10px;
}

.leaderboard-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.leaderboard-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 0;
  border-top: var(--border) solid var(--line);
}

.leaderboard-list span {
  white-space: nowrap;
  color: var(--muted);
}

.member-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 24px;
}

.member-list a {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}

.member-list img {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  background: var(--soft);
}

.member-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-body,
.legacy-social {
  max-width: none;
  margin-bottom: 42px;
}

.trip-body > :not(.trip-inline-photo) {
  max-width: var(--measure);
}

.trip-body p,
.trip-body li,
.comment p {
  font-size: var(--text-l);
  line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   Pager. The archive is eight thousand hikes deep and the listings used to
   stop dead at fifty, so this is the only way into most of it — for a reader
   and for a crawler alike. Every target is a real href. It reads as an index
   rail rather than a widget: a rule above, label type, and the current page
   marked the way the year rail on a profile marks its year.
   -------------------------------------------------------------------------- */

.pager {
  margin-top: var(--space-8);
  border-top: var(--border) solid var(--line);
  padding-top: var(--space-4);
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.pager-page,
.pager-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-bottom: var(--border-strong) solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition:
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}

.pager-page {
  min-width: 24px;
  padding-bottom: 2px;
  font-size: var(--text-l);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pager-page:hover,
.pager-page:focus-visible,
.pager-step:hover,
.pager-step:focus-visible {
  border-bottom-color: var(--line);
  color: var(--ink);
  text-decoration: none;
}

.pager-page.is-current {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: var(--weight-bold);
}

.pager-step {
  flex: 0 0 auto;
  padding-bottom: 2px;
  font-size: var(--text-3xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The end of the run is stated, not linked: a disabled control that still takes
   focus and then does nothing is worse than plain text. */
.pager-step.is-disabled {
  color: var(--faint);
}

.pager-gap {
  color: var(--faint);
  line-height: 1;
}

.pager-status {
  margin: var(--space-3) 0 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Members index. A roster, not a gallery: one line per hiker, ruled like the
   leaderboards, so a few dozen names read as a list rather than a wall.
   -------------------------------------------------------------------------- */

.member-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-index-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  border-top: var(--border) solid var(--line);
  padding: var(--space-3) 0;
}

.member-index-row:last-child {
  border-bottom: var(--border) solid var(--line);
}

.member-index-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
}

.member-index-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: var(--radius-round);
  background: var(--soft);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.member-index-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-index-name {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-l);
  font-weight: var(--weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-index-location,
.member-index-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.member-index-location {
  overflow: hidden;
  flex: 0 1 auto;
  text-overflow: ellipsis;
}

.member-index-count {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Author-written markdown. Headings inside a trip report, a comment, or the
   editor preview belong to the content, not to the page — they get a content
   ramp instead of inheriting the page display ramp (a `# heading` in a report
   used to render at 100px and blow past the column).
   -------------------------------------------------------------------------- */

.trip-body h1,
.trip-body h2,
.trip-body h3,
.trip-body h4,
.trip-body h5,
.trip-body h6,
.comment h1,
.comment h2,
.comment h3,
.comment h4,
.comment h5,
.comment h6,
.preview-body h1,
.preview-body h2,
.preview-body h3,
.preview-body h4,
.preview-body h5,
.preview-body h6 {
  max-width: var(--measure);
  margin: 1.7em 0 0.45em;
  font-weight: var(--weight-semibold);
  letter-spacing: normal;
  line-height: var(--leading-snug);
}

.trip-body > :first-child,
.comment > :first-child,
.preview-body > :first-child {
  margin-top: 0;
}

.trip-body h1,
.comment h1,
.preview-body h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}

.trip-body h2,
.comment h2,
.preview-body h2 {
  font-size: var(--text-2xl);
}

.trip-body h3,
.comment h3,
.preview-body h3 {
  font-size: var(--text-xl);
}

.trip-body h4,
.comment h4,
.preview-body h4 {
  font-size: var(--text-l);
}

.trip-body h5,
.comment h5,
.preview-body h5 {
  font-size: var(--text-m);
}

.trip-body h6,
.comment h6,
.preview-body h6 {
  color: var(--muted);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.trip-body blockquote,
.comment blockquote,
.preview-body blockquote {
  max-width: var(--measure);
  margin: 1.6em 0;
  border-left: var(--border-strong) solid var(--line);
  padding: 2px 0 2px var(--space-5);
  color: var(--ink-soft);
}

.trip-body hr,
.comment hr,
.preview-body hr {
  max-width: var(--measure);
  margin: 2.2em 0;
  border: 0;
  border-top: var(--border) solid var(--line);
}

.trip-body code,
.comment code,
.preview-body code {
  background: var(--soft);
  padding: 0.1em 0.34em;
  font-size: 0.92em;
}

.trip-body pre,
.comment pre,
.preview-body pre {
  max-width: var(--measure);
  overflow-x: auto;
  border: var(--border) solid var(--line);
  background: var(--soft);
  padding: var(--space-3) var(--space-4);
}

.trip-body pre code,
.comment pre code,
.preview-body pre code {
  background: none;
  padding: 0;
}

.profile-header {
  position: relative;
  z-index: 1;
  display: block;
  padding: 40px 0 28px;
  border-bottom: var(--border) solid var(--line);
}

.profile-header-with-map {
  padding-top: 72px;
}

.profile-avatar {
  position: absolute;
  z-index: 2;
  top: 30px;
  right: 0;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: var(--border) solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  padding: 6px;
  box-shadow: var(--shadow-lg);
}

.profile-header-with-map .profile-avatar {
  top: -72px;
  right: auto;
  left: 0;
  background: var(--bg);
}

.profile-header-with-map .profile-summary {
  padding-right: 0;
}

.profile-avatar .avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar span {
  color: var(--muted);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.profile-summary {
  min-width: 0;
  max-width: 920px;
  min-height: 112px;
  padding-right: 172px;
}

.profile-summary .inline-kicker {
  margin-bottom: 10px;
}

.profile-summary h1 {
  margin-bottom: var(--space-3);
}

.profile-summary .lede {
  margin-bottom: 6px;
}

.profile-stats {
  align-items: center;
  margin-bottom: 0;
}

/* "1 night out in 2026" rather than "1 night out · in 2026". */
.profile-stats > *:has(+ .profile-year-label)::after {
  content: none;
}

.profile-subscribe-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.profile-follow-notice {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--success);
  font-size: var(--text-xs);
}

.profile-follow-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
}

.profile-follow-modal.is-open,
.profile-follow-modal:target {
  display: grid;
}

body.profile-follow-modal-open {
  overflow: hidden;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--scrim);
  padding: 0;
  cursor: default;
}

.profile-modal-backdrop:hover,
.profile-modal-backdrop:active {
  background: var(--scrim);
}

.profile-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: 28px;
  box-shadow: var(--shadow-xl);
}

.profile-modal-panel h2 {
  margin-bottom: 18px;
  font-size: var(--text-3xl);
}

.profile-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.profile-modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 2;
}

.profile-modal-close:hover,
.profile-modal-close:focus-visible {
  background: none;
  color: var(--ink);
}

.profile-modal-close-fallback {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: var(--text-2xs);
}

.profile-follow-form {
  display: grid;
  gap: 10px;
}

.profile-follow-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
}

.profile-follow-controls input {
  min-width: 0;
}

.profile-follow-errors p {
  margin-bottom: 0;
  color: var(--danger-strong);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.inline-hints {
  margin: 0 0 0;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.4;
}

.honey-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The year used to be a 12px select buried in the stats line. It is a primary
   way through a profile, so it gets its own rail above the trips: an archive
   index rather than a form control, and it works with JS switched off. */
.profile-years {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: var(--border) solid var(--line);
}

.profile-years-label {
  flex: 0 0 auto;
  padding-bottom: var(--space-3);
}

.profile-years ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.profile-year {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: var(--border-strong) solid transparent;
  color: var(--muted);
  padding-bottom: 2px;
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  transition:
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}

.profile-year:hover,
.profile-year:focus-visible {
  border-bottom-color: var(--line);
  color: var(--ink);
  text-decoration: none;
}

.profile-year.is-current {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: var(--weight-bold);
}

/* Sixteen seasons of links wrap three rows deep on a phone, so below the
   breakpoint the list yields to the platform's own picker. Wide screens never
   show the form. */
.profile-years-form {
  display: none;
}

.profile-trips-section {
  padding-top: var(--space-5);
}

.profile-trips-section .section-heading {
  margin-bottom: 0;
}

/* Drafts are workspace, not published work, so the rail stays quiet: rules and
   label type, no cards, no photography. It sits under the year it belongs to
   and only the hiker who wrote them ever sees it. */
.profile-drafts {
  padding-top: var(--space-7);
}

/* The cap sits on the children, not the section: .section centres itself, so
   capping it there would pull the rail off the gutter every other block on the
   page is aligned to. */
.profile-drafts-heading,
.profile-draft-list {
  max-width: var(--measure);
}

.profile-drafts-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.profile-drafts-heading p {
  margin: 0;
}

.profile-draft-list {
  margin: 0;
  border-top: var(--border) solid var(--line);
  padding: 0;
  list-style: none;
}

.profile-draft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: var(--space-3) var(--space-4);
  border-bottom: var(--border) solid var(--line);
  padding: var(--space-3) 0;
}

.profile-draft-link {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-m);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-draft-meta {
  color: var(--muted);
  font-size: var(--text-2xs);
}

.profile-draft-delete {
  margin: 0;
}

.profile-draft-delete button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.profile-draft-delete button:hover,
.profile-draft-delete button:focus-visible {
  background: transparent;
  color: var(--danger);
}

@media (max-width: 620px) {
  /* The date drops under the name so the delete control keeps a real target. */
  .profile-draft {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-draft-meta {
    grid-row: 2;
    grid-column: 1;
  }

  .profile-draft-delete {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
  }

  .profile-draft-delete button {
    min-height: 44px;
    padding: 0 0 0 var(--space-3);
  }
}

.photo-page {
  padding: 40px 0 72px;
}

.photo-gallery-page {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.gallery-header {
  padding: 30px 0 36px;
}

/* Row-major, so the reading order matches the shooting order, and every tile
   reserves its box up front so nothing reflows as the photos arrive. */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5) var(--space-3);
}

.photo-gallery a {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  text-decoration: none;
}

.photo-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.photo-gallery span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.4;
}

.photo-page figure {
  margin: 0;
}

.photo-page figure > img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: var(--photo-void);
}

.photo-page figcaption {
  max-width: var(--measure);
  margin-top: 18px;
}

/* A photo used to be a cul-de-sac: one link back and no way through the roll. */
.photo-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-7);
  border-top: var(--border) solid var(--line);
  border-bottom: var(--border) solid var(--line);
  padding: var(--space-3) 0;
  font-size: var(--text-xs);
}

.photo-pager-step {
  text-decoration: none;
}

.photo-pager-step:hover,
.photo-pager-step:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: var(--border-strong);
}

.photo-pager-step:last-child {
  text-align: right;
}

.photo-pager-step.is-disabled {
  color: var(--faint);
  pointer-events: none;
}

.photo-pager-position {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.photo-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-5);
  font-size: var(--text-xs);
}

body.photo-lightbox-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px;
  background: var(--scrim-deep);
  color: var(--on-dark);
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox button {
  display: grid;
  place-items: center;
  border: var(--border) solid var(--on-dark-faint);
  border-radius: 0;
  background: var(--dark-control);
  color: var(--on-dark);
  padding: 0;
  cursor: pointer;
}

.photo-lightbox button:hover,
.photo-lightbox button:focus-visible {
  background: var(--on-dark-veil);
}

.photo-lightbox button:focus-visible {
  outline: var(--focus-width) solid var(--on-dark);
  outline-offset: 3px;
}

.photo-lightbox button:disabled {
  opacity: 0.34;
  cursor: default;
}

.photo-lightbox svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.5;
}

.photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 42px;
  height: 42px;
}

.photo-lightbox-stage {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 0;
  gap: var(--space-4);
}

.photo-lightbox-nav {
  width: 44px;
  height: 54px;
}

.photo-lightbox-figure {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  max-height: 100%;
  margin: 0;
  gap: 10px;
  touch-action: pan-y;
  user-select: none;
}

.photo-lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 178px);
  object-fit: contain;
  background: var(--photo-void);
  box-shadow: var(--shadow-photo);
}

/* A photo that will not load leaves a placeholder rather than a black hole, so
   it reads as one bad file instead of a broken viewer. */
.photo-lightbox-figure.is-failed .photo-lightbox-image {
  display: none;
}

.photo-lightbox-failure {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  width: min(360px, 100%);
  min-height: 200px;
  margin: 0;
  border: var(--border) dashed var(--on-dark-dim);
  color: var(--on-dark-muted);
  padding: var(--space-7) var(--space-5);
  font-size: var(--text-xs);
  text-align: center;
}

.photo-lightbox-failure[hidden] {
  display: none;
}

.photo-lightbox .photo-lightbox-failure svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.5;
  opacity: 0.7;
}

.photo-lightbox-caption {
  max-width: min(760px, 100%);
  color: var(--on-dark-muted);
  font-size: var(--text-xs);
  line-height: 1.45;
  text-align: center;
}

.photo-lightbox-caption p {
  margin-bottom: 0;
}

.photo-lightbox-caption-text + .photo-lightbox-metadata {
  margin-top: 2px;
}

.photo-lightbox-metadata {
  color: var(--on-dark-faint);
  font-size: var(--text-3xs);
  text-transform: uppercase;
}

.photo-lightbox-thumbnails {
  display: flex;
  min-width: 0;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 2px 56px 4px;
  scrollbar-color: var(--on-dark-dim) transparent;
}

.photo-lightbox-thumb {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  opacity: 0.62;
}

.photo-lightbox-thumb[aria-current="true"] {
  border-color: var(--on-dark);
  opacity: 1;
}

.photo-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty {
  color: var(--muted);
}

.form-page {
  padding: 64px 0 80px;
}

.form-header {
  max-width: var(--measure);
  margin-bottom: var(--space-7);
}

.form-errors {
  max-width: var(--measure);
  margin-bottom: 28px;
  border-top: var(--border-strong) solid var(--ink);
  border-bottom: var(--border) solid var(--line);
  padding: 16px 0;
}

.form-errors p {
  margin-bottom: var(--space-2);
  font-weight: var(--weight-bold);
}

.form-errors ul {
  margin: 0;
  padding-left: var(--space-5);
}

.form-notice {
  max-width: var(--measure);
  border-top: var(--border) solid var(--line);
  border-bottom: var(--border) solid var(--line);
  padding: 14px 0;
}

.form-notice-success {
  border-top-color: var(--success);
  border-top-width: var(--border-strong);
  color: var(--success);
  font-weight: var(--weight-medium);
}

/* Account navigation, kept clear of the form's own actions. */
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  max-width: var(--measure);
  margin-top: var(--space-8);
  border-top: var(--border) solid var(--line);
  padding-top: var(--space-4);
  font-size: var(--text-xs);
}

.trip-form,
.account-form,
.photo-form {
  display: grid;
  gap: var(--space-7);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  max-width: var(--measure);
}

.form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row-full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: var(--text-2xs);
  text-transform: uppercase;
}

input,
textarea,
select,
button {
  max-width: 100%;
  font: inherit;
}

input,
textarea,
select {
  width: min(100%, var(--measure));
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: 10px 12px;
}

input[type="file"] {
  padding: 8px;
}

input[type="file"]::file-selector-button {
  margin-right: var(--space-3);
  border: var(--border) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

textarea {
  min-height: 320px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: 2px;
}

button,
input[type="submit"] {
  width: auto;
  border: var(--border) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  cursor: pointer;
  transition:
    background-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out);
}

button:hover,
input[type="submit"]:hover {
  background: var(--paper);
  color: var(--ink);
}

button:active,
input[type="submit"]:active {
  background: var(--soft);
}

.secondary-button {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--ink);
  background: var(--paper);
}

input[type="file"]::file-selector-button {
  transition:
    background-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out);
}

input[type="file"]:hover::file-selector-button {
  background: var(--paper);
  color: var(--ink);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.trip-location-picker {
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
}

.trip-location-map {
  height: 360px;
  border: var(--border) solid var(--line);
  background: var(--soft);
}

.trip-location-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.trip-location-status p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.trip-location-status button[hidden] {
  display: none;
}

.coordinate-fallback {
  border-top: var(--border) solid var(--line);
  padding-top: 10px;
}

.coordinate-fallback summary {
  cursor: pointer;
  color: var(--muted);
  font-size: var(--text-2xs);
  text-transform: uppercase;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding-top: 14px;
}

.photo-upload-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 520px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: 10px;
}

.photo-upload-preview[hidden] {
  display: none;
}

.photo-upload-preview img {
  width: 96px;
  height: 72px;
  background: var(--soft);
  object-fit: cover;
}

.photo-upload-preview p {
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}

.photo-upload-progress {
  display: grid;
  gap: var(--space-2);
  max-width: var(--measure);
}

.photo-upload-progress[hidden] {
  display: none;
}

.photo-upload-progress::before {
  display: block;
  height: 8px;
  background: var(--soft);
  content: "";
}

.photo-upload-progress-bar {
  width: 0;
  height: 8px;
  margin-top: -16px;
  background: var(--ink);
  transition: width var(--dur-1) var(--ease-out);
}

.photo-upload-progress span {
  color: var(--muted);
  font-size: var(--text-2xs);
}

.search-form {
  max-width: var(--measure-narrow);
  margin-bottom: 36px;
}

input[type="search"]::placeholder {
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   Dead ends. 404, 410, and 500 all used to stop the reader cold, so they now
   end with the same way out.
   -------------------------------------------------------------------------- */

.dead-end {
  padding-bottom: var(--space-11);
}

.dead-end-search {
  margin-top: var(--space-7);
  margin-bottom: 0;
}

.way-back {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  max-width: var(--measure-narrow);
  margin-top: var(--space-6);
  border-top: var(--border) solid var(--line);
  padding-top: var(--space-4);
  font-size: var(--text-xs);
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Auth. One column, one job per page. rodauth ships Bootstrap class names, so
   the .form-group / .form-control / .is-invalid hooks below are its vocabulary
   rather than ours.
   -------------------------------------------------------------------------- */

.auth-page {
  width: min(520px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 72px 0 var(--space-11);
}

.auth-page form.rodauth {
  margin: 0;
}

/* Reset-password and verify-account still come straight from rodauth without a
   wrapper of their own. */
form.rodauth,
.rodauth-login-form-footer-links-heading,
.rodauth-links {
  width: min(520px, calc(100vw - 32px));
  margin-right: auto;
  margin-left: auto;
}

.auth-page form.rodauth,
.auth-page .rodauth-links {
  width: 100%;
}

form.rodauth {
  padding-top: var(--space-11);
}

.auth-page form.rodauth {
  padding-top: 0;
}

.auth-migration-notice {
  margin-bottom: var(--space-6);
  border-top: var(--border) solid var(--line);
  border-bottom: var(--border) solid var(--line);
  padding: 20px 0;
}

.auth-migration-notice h1 {
  margin-bottom: var(--space-2);
  font-size: var(--text-3xl);
  line-height: 1.1;
}

.auth-migration-notice p {
  max-width: none;
  margin-bottom: 0;
  color: var(--muted);
}

.rodauth .form-group {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.rodauth .form-control {
  width: 100%;
}

.rodauth button[type="submit"],
.rodauth input[type="submit"] {
  width: 100%;
  margin-top: var(--space-2);
  padding: 13px 14px;
}

/* rodauth already emits aria-invalid and aria-describedby on the field and
   wires the message to it; all that was missing was any sign of trouble. */
.rodauth .form-control.error,
.rodauth .form-control.is-invalid,
.rodauth [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.rodauth .error_message,
.rodauth .invalid-feedback {
  display: block;
  color: var(--danger-strong);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}

.rodauth .error_message::before {
  content: "↑ ";
  opacity: 0.8;
}

.auth-optional-heading {
  margin: var(--space-6) 0 var(--space-4);
  border-top: var(--border) solid var(--line);
  color: var(--muted);
  padding-top: var(--space-3);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.auth-aside {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.auth-links {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-6) 0 0;
  border-top: var(--border) solid var(--line);
  padding: var(--space-4) 0 0;
  list-style: none;
  font-size: var(--text-xs);
}

.auth-card {
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: var(--space-7);
}

.auth-card h1 {
  margin-bottom: var(--space-3);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

.auth-card p {
  max-width: none;
  color: var(--muted);
  font-size: var(--text-s);
}

.auth-card .form-actions {
  margin-top: var(--space-6);
}

.auth-card .rodauth button[type="submit"] {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
}

.rodauth-login-form-footer-links-heading {
  margin-top: var(--space-7);
  font-size: var(--text-xl);
}

.rodauth-links {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
  margin-bottom: 0;
  padding: 0 0 80px;
  list-style: none;
  font-size: var(--text-xs);
}

.trip-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: var(--space-7);
  align-items: start;
}

.markdown-editor {
  display: grid;
  gap: var(--space-6);
}

.markdown-preview {
  border-top: var(--border) solid var(--line);
  padding-top: 14px;
}

.preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: 14px;
}

.preview-heading h2 {
  margin-bottom: 0;
}

.preview-body {
  max-width: none;
  min-height: 320px;
  margin-bottom: 0;
  border: var(--border) solid var(--line);
  background: var(--paper);
  padding: 18px;
  overflow-wrap: anywhere;
}

.trip-photo-workbench {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
  min-width: 0;
  border-top: var(--border) solid var(--line);
  padding-top: 14px;
}

.trip-photo-workbench-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.trip-photo-workbench-heading h2,
.trip-photo-workbench-heading p {
  margin-bottom: 0;
}

.trip-photo-workbench-heading a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: var(--text-2xs);
}

.trip-photo-dropzone {
  display: grid;
  place-items: center;
  min-height: 116px;
  border: var(--border) dashed var(--muted);
  background: var(--paper);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  text-transform: none;
  cursor: pointer;
}

.trip-photo-dropzone.is-dragging {
  border-color: var(--ink);
  background: var(--soft);
  color: var(--ink);
}

.trip-photo-dropzone input {
  width: 100%;
  margin-top: 10px;
}

.trip-photo-workbench-list {
  display: grid;
  gap: var(--space-3);
}

.trip-photo-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-3);
  border-top: var(--border) solid var(--line);
  padding-top: var(--space-3);
}

.trip-photo-card img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
}

.trip-photo-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.trip-photo-card-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.trip-photo-card code {
  overflow: hidden;
  border: var(--border) solid var(--line);
  background: var(--soft);
  padding: 4px 6px;
  font-size: var(--text-3xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-photo-card button {
  flex: 0 0 auto;
  padding: 6px 9px;
  font-size: var(--text-2xs);
}

.trip-photo-card textarea {
  min-height: 62px;
  font-size: var(--text-xs);
}

.trip-photo-card-uploading {
  opacity: 0.72;
}

.trip-photo-card-error {
  border-top-color: var(--danger);
}

.site-footer {
  margin-top: var(--space-10);
  color: var(--muted);
  border-top: var(--border) solid var(--line);
  background: var(--soft);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
  font-size: var(--text-2xs);
}

.footer-wordmark {
  display: inline-flex;
  grid-column: 1 / -1;
  justify-self: center;
  margin: -6px 0 2px;
  text-decoration: none;
}

.footer-wordmark-logo {
  width: 230px;
  height: auto;
}

/* The footer wordmark used to be white on #eeeeea — about 1.1:1, effectively
   invisible. It is ink now, with the same soft drop shadow as the header. */
.footer-wordmark-logo .logo-text-shadow {
  fill: var(--ink);
  opacity: 0.14;
  stroke: var(--ink);
  transform: translate(8px, 6px);
}

.footer-wordmark-logo .logo-text-fill {
  fill: var(--ink);
}

.site-footer p {
  margin-bottom: 10px;
}

.site-footer-migration {
  color: var(--ink);
}

.site-footer a {
  color: var(--ink);
  text-decoration-color: var(--faint);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration-color: var(--ink);
  text-decoration-thickness: var(--border-strong);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

.site-footer-links span {
  color: var(--faint);
}

@media (max-width: 1040px) {
  .trip-row .trip-photo-gallery .trip-photo-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  /* Compact, sticky, one row. The old mobile header stacked to 176px with
     22px tap targets and scrolled away with the page. */
  html {
    scroll-padding-top: 68px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--bg);
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header {
      background: var(--header-veil);
      -webkit-backdrop-filter: saturate(160%) blur(12px);
      backdrop-filter: saturate(160%) blur(12px);
    }
  }

  .site-header-inner {
    align-items: center;
    flex-direction: row;
    gap: var(--space-2);
    min-height: 56px;
    padding: var(--space-1) 0;
  }

  .wordmark-logo {
    width: 124px;
    transform: translateY(-2px);
  }

  /* Signed in there are five destinations and room for about two. Hikes and the
     add button stay in the row; the rest move into the overflow disclosure, so
     nothing has to scroll sideways or wrap to a second line. The scrolling row
     survives underneath as the no-JS fallback. */
  .site-nav {
    position: relative;
    flex-wrap: nowrap;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    font-size: var(--text-2xs);
  }

  /* An open panel must not be clipped by the row it hangs off. */
  .site-nav.site-nav-has-menu {
    overflow-x: visible;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav > a,
  .site-nav > span {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 var(--space-2);
    white-space: nowrap;
  }

  /* The greeting is decorative; the row is short on space. */
  .site-nav .site-nav-greeting {
    display: none;
  }

  .site-nav-authenticated.site-nav-has-menu .site-nav-wide-link {
    display: none;
  }

  .site-nav-authenticated.site-nav-has-menu .site-nav-menu {
    display: block;
    flex: 0 0 auto;
    /* The dots sit deep inside their 44px box while the plus fills more of
       its own, so the boxes pull together to make the VISIBLE gaps match —
       what the eye spaces is glyphs, not hit areas. */
    margin-left: -18px;
  }

  /* On a phone the filled disc reads as a blob between a text link and the
     bare-dots menu — three visual languages in one short row. The add button
     drops the disc and matches the kebab beside it: an ink glyph in the same
     44px box. Desktop keeps the disc, where the nav has room for a CTA. */
  .site-nav .site-nav-add {
    width: 44px;
    height: 44px;
    min-height: 0;
    padding: 0;
    margin: 0 0 0 8px;
    border: 0;
    background: none;
    color: var(--ink);
    box-shadow: none;
  }

  .site-nav .site-nav-add:hover,
  .site-nav .site-nav-add:focus-visible {
    background: none;
    color: var(--ink);
    transform: none;
    box-shadow: none;
  }

  .site-nav .site-nav-add svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-6) 0 6px;
  }

  .home-hero .home-kicker {
    justify-items: start;
    text-align: left;
    white-space: normal;
  }

  .trip-header {
    padding: 24px 0 20px;
  }

  .profile-header {
    padding: 66px 0 22px;
  }

  .profile-avatar {
    top: 24px;
    width: 96px;
    height: 96px;
    padding: 4px;
  }

  .profile-header-with-map .profile-avatar {
    top: -48px;
  }

  .profile-avatar span {
    font-size: var(--text-4xl);
  }

  .profile-summary {
    min-height: 0;
    padding-right: 0;
  }

  .profile-summary h1,
  .profile-summary .lede {
    padding-right: 112px;
  }

  .profile-header-with-map .profile-summary h1,
  .profile-header-with-map .profile-summary .lede {
    padding-right: 0;
  }

  .profile-map .leaflet-control-attribution {
    max-width: calc(100% - 118px);
    line-height: 1.25;
    text-align: right;
    white-space: normal;
  }

  .profile-stats {
    gap: 4px 10px;
    font-size: var(--text-3xs);
  }

  .profile-follow-controls {
    grid-template-columns: 1fr;
  }

  .profile-years {
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .profile-years ul {
    display: none;
  }

  .profile-years-form {
    display: block;
  }

  /* Dressed as the current-year link it replaces: ink, bold, a 2px rule.
     The chevron is the only admission that it opens a picker. */
  .profile-year-select {
    appearance: none;
    -webkit-appearance: none;
    min-height: 44px;
    border: 0;
    border-bottom: var(--border-strong) solid var(--ink);
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2.4' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 14px;
    color: var(--ink);
    padding: 0 22px 2px 0;
    font-family: inherit;
    font-size: var(--text-l);
    font-weight: var(--weight-bold);
    line-height: 1;
  }

  .profile-years-go {
    min-height: 44px;
    border: var(--border) solid var(--ink);
    background: none;
    color: var(--ink);
    padding: 0 var(--space-4);
    font: inherit;
  }

  .profile-trips-section {
    padding-top: var(--space-4);
  }

  .trip-row {
    padding: var(--space-6) 0 30px;
  }

  /* Hearting is a one-tap interaction now, so the finger gets the full 44px
     even though the chip itself stays small enough to sit beside a headline.
     The extra height falls inside the row's own gap, so it cannot steal a tap
     from the trip title. */
  .heart-button {
    position: relative;
  }

  .heart-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }

  .trip-row-stats {
    font-size: var(--text-xs);
    line-height: 1.35;
  }

  .trip-row-excerpt {
    font-size: var(--text-l);
    line-height: 1.6;
  }

  .trip-row .trip-photo-gallery .trip-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trip-row-map {
    height: 220px;
  }

  .form-grid,
  .coordinate-grid,
  .trip-editor-layout,
  .markdown-editor,
  .leaderboard-grid,
  .member-list {
    grid-template-columns: 1fr;
  }

  .trip-photo-workbench {
    position: static;
  }

  .trip-location-map {
    height: 300px;
  }

  .trip-location-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-page {
    padding: 44px 0 64px;
  }

  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .map-panel {
    height: 280px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-links {
    gap: 0 var(--space-4);
  }

  .site-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .site-footer-links span {
    display: none;
  }

  .photo-lightbox {
    gap: var(--space-3);
    padding: 64px 12px 12px;
  }

  .photo-lightbox-close {
    top: 12px;
    right: 12px;
  }

  .photo-lightbox-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-lightbox .photo-lightbox-nav {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .photo-lightbox-figure {
    width: 100%;
    padding: 0;
  }

  .photo-lightbox-image {
    max-height: calc(100vh - 198px);
  }

  .photo-lightbox-thumbnails {
    padding: 0 0 4px;
  }

  .photo-lightbox-thumb {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  /* Prev and Next earn the width on a phone; the numbers between them scroll
     rather than wrapping into a block or pushing the page sideways. */
  .pager-row {
    gap: var(--space-3);
  }

  .pager-pages {
    flex-wrap: nowrap;
    gap: 0 var(--space-4);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .pager-pages::-webkit-scrollbar {
    display: none;
  }

  .pager-page,
  .pager-step {
    min-height: 44px;
  }

  .member-index-location {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion. Nothing on this site depends on animation to convey
   meaning, so honour the request everywhere rather than case by case.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
