/* ─────────────────────────────────────────────────────────────────────
   Site styles. Every value comes from /css/tokens.css, which mirrors the
   mobile app's v2.2 design system — see that file before adding a literal
   colour or radius here.

   Breakpoint scale: 480 / 768 / 948, max content width 1200.
   ───────────────────────────────────────────────────────────────────── */

/* ── reset & base ────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; font-family: var(--font); box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { color: var(--c-body); font-size: var(--t-body); background: var(--c-white); }
.App { display: flex; flex-direction: column; }
.home { flex: 1 0 auto; position: relative; }

h1, h2, h3 { color: var(--c-heading); }
h1 { letter-spacing: var(--ls-h1); }
h2 { letter-spacing: var(--ls-h2); }
h3 { letter-spacing: var(--ls-h3); }

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ── htmx ────────────────────────────────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.search-loading { color: var(--c-muted); padding: var(--s-m); }

/* ── header ──────────────────────────────────────────────
   Light by default. The old design had a navy bar that turned white on
   scroll; v2.2 is light throughout, so `.active` now only adds the shadow
   that lifts it off the content. The markup ships two logo variants and
   two icon sets for that old swap — the light ones are simply always the
   visible ones, which keeps this a CSS-only change. */
.header {
  height: 72px; display: flex; justify-content: center;
  font-size: var(--t-title); font-weight: var(--w-medium); width: 100%;
  color: var(--c-heading);
  position: fixed; z-index: 500;
  background-color: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--transition);
}
.header.active { box-shadow: var(--shadow-card); }

.header .header-logo,
.header .globus-default,
.header .drop-icon-default { display: none !important; }
.header .header-logo-active,
.header .globus-active,
.header .drop-icon-active { display: block !important; }

.headerContent {
  display: flex; flex-direction: row; align-items: center;
  width: 70%; max-width: 1200px; justify-content: space-between;
}
.header-logo, .header-logo-active { height: 40px; }
.headerR {
  display: flex; flex-direction: row; align-items: center;
  gap: var(--s-xl); justify-content: flex-end;
}
.headerR a { text-decoration: none; color: var(--c-heading); }
.headerR h2 {
  font-size: var(--t-body); font-weight: var(--w-medium);
  color: var(--c-heading); letter-spacing: 0;
}
.headerR a:hover h2 { color: var(--c-primary); }

/* Sign in reads as the header's one action. */
.header-auth {
  cursor: pointer; border: 0; font: inherit;
  background: var(--c-primary); color: var(--c-on-dark);
  font-size: var(--t-muted); font-weight: var(--w-semibold);
  padding: var(--s-s) var(--s-l); border-radius: var(--r-pill);
  text-decoration: none; transition: background var(--transition);
}
.header-auth:hover { background: var(--c-primary-bright); }

/* language part */
.language-part {
  display: flex; align-items: center; gap: var(--s-xs);
  cursor: pointer; position: relative;
}
.language-border { font-size: var(--t-body); font-weight: var(--w-medium); }
.drop-icon { width: 14px; }
.language-modal {
  position: absolute; top: 48px; right: 0;
  background: var(--c-white); border-radius: var(--r-md);
  box-shadow: var(--shadow-raised); padding: var(--s-m);
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column; gap: var(--s-s);
  min-width: 180px; z-index: 600;
}
.language {
  display: flex; align-items: center; gap: var(--s-s);
  padding: var(--s-s); border-radius: var(--r-sm); cursor: pointer;
  color: var(--c-body); font-size: var(--t-body);
}
.language:hover { background: var(--c-screen); }
.language.active { background: var(--c-primary-soft); color: var(--c-heading); }
.language img { width: 24px; height: 24px; border-radius: var(--s-xs); }

/* mobile menu */
.menu-bar { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-bar span { width: 24px; height: 2px; background: currentColor; display: block; }
.menu-modal {
  position: absolute; top: 72px; right: 5%;
  background: var(--c-white); border-radius: var(--r-md);
  box-shadow: var(--shadow-raised); padding: var(--s-m);
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column; gap: var(--s-s);
  min-width: 180px; z-index: 600;
}
.menu-modal a {
  text-decoration: none; color: var(--c-body);
  font-size: var(--t-body); padding: var(--s-xs) 0;
}
.menu-modal a:hover { color: var(--c-primary); }
.showOnMobile { display: none; }

@media (max-width: 768px) {
  .headerContent { width: 90%; }
  .headerR { gap: var(--s-m); }
  .showOnDesktop { display: none !important; }
  .showOnMobile { display: block !important; }
  .menu-bar { display: flex; }
}

/* ── searchbar ───────────────────────────────────────────
   The one large navy surface: it anchors the page and gives the white
   search card something to sit against. */
.searchbar {
  min-height: 225px; width: 100%;
  display: flex; flex-direction: row;
  align-items: flex-end; justify-content: flex-start;
  position: relative; background-color: var(--c-navy); margin-top: -1px;
}
.searchPart-div {
  margin: 0 auto; width: 70%; max-width: 1200px;
  padding: 80px 15px var(--s-xxl) 15px;
}
.searchPart {
  position: relative; width: calc(100% - 20px);
  display: flex; flex-direction: row;
  justify-content: space-between; background-color: var(--c-white);
  height: 56px; border-radius: var(--r-lg); align-items: center;
  box-shadow: var(--shadow-raised);
  cursor: pointer; z-index: 50; padding: var(--s-s); gap: var(--s-xs);
}
.searchPart .searchButton {
  height: 44px; width: 110px; min-width: 110px;
  border-radius: var(--r-md); font-size: var(--t-body);
  font-weight: var(--w-bold); color: var(--c-on-dark);
  background-color: var(--c-primary); border: none; cursor: pointer;
  transition: background var(--transition);
}
.searchPart .searchButton:hover { background-color: var(--c-primary-bright); }
.city-field { position: relative; flex: 1; }
.city-input {
  width: 100%; border: none; outline: none; font-size: var(--t-body);
  padding: var(--s-xs) var(--s-s); background: transparent; color: var(--c-heading);
}
.city-input::placeholder, .inputPersonNum::placeholder { color: var(--c-faint); }
.city-dropdown {
  position: absolute; top: 36px; left: 0; right: 0;
  background: var(--c-white); border-radius: var(--r-md);
  box-shadow: var(--shadow-raised); border: 1px solid var(--c-border);
  z-index: 200; max-height: 220px; overflow-y: auto;
}
.city-option {
  padding: var(--s-s) var(--s-m); font-size: var(--t-body);
  cursor: pointer; color: var(--c-body);
}
.city-option:hover { background: var(--c-screen); }
.date-input {
  border: none; outline: none; font-size: var(--t-body);
  padding: var(--s-xs) var(--s-s); background: transparent;
  cursor: pointer; min-width: 110px; color: var(--c-heading);
}
.inputPersonNum {
  border: none; outline: none; font-size: var(--t-body);
  padding: var(--s-xs) var(--s-s); background: transparent;
  width: 90px; color: var(--c-heading);
}
.swap-div-desktop {
  display: flex; position: relative; width: 40px;
  justify-content: center; align-items: center;
}
.swap-div-desktop hr {
  width: 1px; height: 28px; border: none;
  background: var(--c-border); margin: 0 var(--s-xs);
}
.swap-div-desktop .swap-icon {
  position: absolute; z-index: 56; width: 22px;
  background: var(--c-white); cursor: pointer;
}
.swap-div-mobile { display: none; }
hr#hr1, hr#hr2, hr#hr3 {
  width: 1px; height: 28px; border: none;
  background: var(--c-border); margin: 0 var(--s-xs);
}

/* search type tabs */
.searchTypePart { margin-bottom: var(--s-m); }
.searchTypePart-content { display: flex; gap: var(--s-m); }
.searchTypePart-content-div {
  display: flex; align-items: center; gap: var(--s-s);
  padding: var(--s-s) var(--s-l); border-radius: var(--r-pill); cursor: pointer;
  color: var(--c-on-dark-muted); font-size: var(--t-body);
  font-weight: var(--w-medium); transition: var(--transition);
}
.searchTypePart-content-div:hover { color: var(--c-on-dark); }
.searchTypePart-content-div.active {
  color: var(--c-navy); background: var(--c-white); font-weight: var(--w-semibold);
}
.searchTypePart-content-div img { width: 22px; height: 22px; }
.searchTypePart-mobile { display: none; }

@media (max-width: 768px) {
  .searchPart-div { width: 90%; padding: 80px 0 var(--s-xl) 0; }
  .searchPart { flex-direction: column; height: auto; padding: var(--s-m); gap: var(--s-s); }
  .city-field { width: 100%; }
  .date-input { width: 100%; }
  .searchPart .searchButton { width: 100%; }
  .swap-div-desktop { display: none; }
  .swap-div-mobile { display: flex; align-items: center; justify-content: center; width: 100%; }
  .swap-div-mobile .swap-icon { width: 22px; }
  hr#hr1, hr#hr2, hr#hr3 { width: 100%; height: 1px; margin: 2px 0; }
  .isMobileHr { width: 100%; height: 1px; border: none; background: var(--c-divider); }
  .searchTypePart-desktop { display: none; }
  .searchTypePart-mobile { display: block; margin-bottom: var(--s-m); }
  .searchTypePart-mobile-content { display: flex; gap: var(--s-s); }
  .searchTypePart-mobile-content-div {
    display: flex; align-items: center; gap: var(--s-s); padding: var(--s-s) var(--s-m);
    border-radius: var(--r-pill); color: var(--c-on-dark-muted);
    font-size: var(--t-muted); text-decoration: none;
  }
  .searchTypePart-mobile-content-div.active {
    color: var(--c-navy); background: var(--c-white); font-weight: var(--w-semibold);
  }
}

/* ── listing cards ───────────────────────────────────────
   Mirrors the mobile app v2.2 card: route strip with a connector, divider,
   then poster and numbers. See src/views/components/TripCard.tsx. */
.cards-part {
  width: 100%; display: flex; align-items: center; flex-direction: column;
  padding-bottom: 50px; min-height: calc(100vh - 700px);
  background-color: var(--c-screen);
}
.cards-content.trips {
  width: 70%; max-width: 1200px; padding: var(--s-xxl) 0; display: flex;
  flex-direction: column; align-items: center;
}
.offer-link {
  width: 100%; display: block; margin-bottom: var(--s-m);
  text-decoration: none; color: inherit;
}
.listing-card {
  background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s-l);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.offer-link:hover .listing-card {
  box-shadow: var(--shadow-raised); transform: translateY(-1px);
  border-color: var(--c-primary);
}

/* route strip */
.route-strip { display: flex; align-items: flex-start; gap: var(--s-s); }
.route-place {
  flex: 1; min-width: 0;
  font-size: var(--t-title); font-weight: var(--w-extrabold);
  color: var(--c-heading); letter-spacing: var(--ls-title);
  overflow-wrap: anywhere;
}
.route-place-end { text-align: right; }
.route-mid { display: flex; flex-direction: column; align-items: center; padding: 0 var(--s-xs); flex: none; }
.route-connector { display: flex; align-items: center; margin-bottom: var(--s-xs); }
.route-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.route-dot-hollow { border: 2px solid var(--c-primary); }
.route-dot-full { background: var(--c-primary); }
.route-line { width: 28px; height: 2px; background: var(--c-primary); }
.route-date { font-size: var(--t-small); font-weight: var(--w-bold); color: var(--c-heading); white-space: nowrap; }

.card-divider { height: 1px; background: var(--c-divider); margin: var(--s-m) 0; }

/* footer: who, and how much */
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-m); }
.card-person { flex: 1; display: flex; align-items: center; gap: var(--s-s); min-width: 0; }
.card-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  background: var(--c-surface-alt); flex: none;
}
.card-person-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.card-name {
  display: flex; align-items: center; gap: var(--s-xs);
  font-size: var(--t-muted); font-weight: var(--w-bold); color: var(--c-heading);
  overflow-wrap: anywhere;
}
.card-verified { color: var(--c-green); font-weight: var(--w-bold); }
.card-rate { display: flex; align-items: center; gap: 3px; font-size: var(--t-tiny); font-weight: var(--w-bold); color: var(--c-heading); }
.card-star { color: var(--c-star); }

.card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-xs); flex: none; }
.card-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  padding: 5px var(--s-s);
  font-size: var(--t-small); font-weight: var(--w-semibold); color: var(--c-muted);
  white-space: nowrap;
}
/* The price is the one number that should catch the eye. */
.card-pill-price { color: var(--c-primary); border-color: var(--c-primary); font-weight: var(--w-bold); }

/* skeleton */
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
.loadingcard {
  width: 100%; background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s-l); margin-bottom: var(--s-m);
  animation: pulse 1.5s ease-in-out infinite;
}
.loadingcard .route-place, .loadingcard .route-mid { height: 20px; background: var(--c-surface-alt); border-radius: var(--s-xs); }
.loadingcard .route-mid { width: 60px; }
.loadingcard .card-person, .loadingcard .card-meta { height: 38px; background: var(--c-surface-alt); border-radius: var(--s-xs); }
.loadingcard .card-meta { width: 90px; }

.not-found-msg { text-align: center; padding: 40px; color: var(--c-muted); font-size: var(--t-body); }

/* pagination */
.pagination { display: flex; gap: var(--s-s); margin-top: var(--s-xl); flex-wrap: wrap; justify-content: center; }
.page-btn {
  min-width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-white); color: var(--c-body);
  font-size: var(--t-body); cursor: pointer; padding: 0 var(--s-m);
}
.page-btn:hover { background: var(--c-screen); }
.page-btn.active { background: var(--c-primary); color: var(--c-on-dark); border-color: var(--c-primary); }

@media (max-width: 948px) {
  .cards-content.trips { width: 90%; }
}

@media (max-width: 480px) {
  .listing-card { padding: var(--s-m); }
  .route-place { font-size: var(--t-body); }
  .route-line { width: 16px; }
  .card-foot { align-items: flex-start; }
}

/* ── how it works ────────────────────────────────────── */
.how-it-works { width: 100%; display: flex; justify-content: center; padding: 60px 0; }
.how-content { width: 70%; max-width: 1200px; }
.section-title {
  font-size: var(--t-h1); font-weight: var(--w-extrabold);
  letter-spacing: var(--ls-h1); margin-bottom: 40px; color: var(--c-heading);
}
.how-tabs { display: flex; gap: 40px; margin-bottom: 40px; }
.how-tab { flex: 1; }
.how-tab h3 {
  font-size: var(--t-h3); font-weight: var(--w-bold);
  color: var(--c-heading); margin-bottom: var(--s-l);
}
.how-step { margin-bottom: var(--s-l); }
.how-step strong { font-size: var(--t-body); color: var(--c-heading); display: block; margin-bottom: var(--s-s); }
.how-step ul { padding-left: var(--s-xl); }
.how-step li { font-size: var(--t-body); color: var(--c-body); line-height: 1.7; }
.how-step span { font-size: var(--t-body); color: var(--c-body); }
.attend-box {
  background: var(--c-primary-soft-bg); border-left: 4px solid var(--c-primary);
  border-radius: var(--r-sm); padding: var(--s-l) var(--s-xl); margin-top: var(--s-xl);
}
.attend-box strong { font-size: var(--t-body); color: var(--c-heading); display: block; margin-bottom: var(--s-s); }
.attend-box ul { padding-left: var(--s-xl); }
.attend-box li { font-size: var(--t-body); color: var(--c-body); line-height: 1.8; }

@media (max-width: 948px) {
  .how-content { width: 90%; }
  .how-tabs { flex-direction: column; gap: var(--s-xxl); }
  .section-title { font-size: var(--t-h2); letter-spacing: var(--ls-h2); }
}

/* ── FAQ ─────────────────────────────────────────────── */
.faq-part { width: 100%; display: flex; justify-content: center; padding: 60px 0; background: var(--c-screen); }
.faq-content { width: 70%; max-width: 1200px; }
.faq-section { margin-bottom: var(--s-xxl); }
.faq-section-title {
  font-size: var(--t-h3); font-weight: var(--w-bold);
  color: var(--c-heading); margin-bottom: var(--s-m);
}
.faq-item {
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  margin-bottom: var(--s-s); overflow: hidden; background: var(--c-white);
}
.faq-question {
  padding: var(--s-l) var(--s-xl); font-size: var(--t-body);
  font-weight: var(--w-medium); cursor: pointer; color: var(--c-heading); list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-item[open] .faq-question { background: var(--c-primary-soft); color: var(--c-heading); }
.faq-answer {
  padding: var(--s-l) var(--s-xl); font-size: var(--t-body); color: var(--c-body);
  line-height: 1.8; white-space: pre-wrap; background: var(--c-white);
}

@media (max-width: 948px) { .faq-content { width: 90%; } }

/* ── opportunities (email subscribe) ─────────────────── */
.opportunities-part { width: 100%; display: flex; justify-content: center; padding: 60px 0; }
.opportunities-content {
  width: 70%; max-width: 1200px; background: var(--c-primary-soft);
  border-radius: var(--r-xl); padding: 50px 40px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-xxl);
}
.opportunities-title {
  font-size: var(--t-h2); font-weight: var(--w-extrabold);
  letter-spacing: var(--ls-h2); color: var(--c-heading);
}
.opportunities-input {
  flex: 1; min-width: 220px; height: 48px; border: 1px solid var(--c-border);
  border-right: none; border-radius: var(--r-md) 0 0 var(--r-md);
  padding: 0 var(--s-l); font-size: var(--t-body); outline: none; color: var(--c-heading);
}
.opportunities-btn {
  height: 48px; background: var(--c-primary); border: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--c-on-dark); font-size: var(--t-body); font-weight: var(--w-bold);
  padding: 0 var(--s-xxl); cursor: pointer; white-space: nowrap;
  transition: background var(--transition);
}
.opportunities-btn:hover { background: var(--c-primary-bright); }

@media (max-width: 948px) {
  .opportunities-content { width: 90%; padding: var(--s-xxl) var(--s-l); }
  .opportunities-title { font-size: var(--t-h3); letter-spacing: var(--ls-h3); }
  .opportunities-input { border-radius: var(--r-md); border-right: 1px solid var(--c-border); }
  .opportunities-btn { border-radius: var(--r-md); }
}

/* ── app download section ────────────────────────────── */
.app-download-part { width: 100%; display: flex; justify-content: center; padding: 60px 0; }
.app-download-content { width: 70%; max-width: 1200px; display: flex; flex-direction: column; gap: var(--s-xxl); }
.app-download-text h2 {
  font-size: var(--t-h1); font-weight: var(--w-extrabold);
  letter-spacing: var(--ls-h1); color: var(--c-heading);
}
.app-download-text p { font-size: var(--t-title); color: var(--c-muted); margin-top: var(--s-s); }
.app-download-buttons { display: flex; gap: var(--s-l); flex-wrap: wrap; }
.store-btn { height: 50px; }

@media (max-width: 948px) {
  .app-download-content { width: 90%; }
  .app-download-text h2 { font-size: var(--t-h2); letter-spacing: var(--ls-h2); }
}

/* ── partner program banner ──────────────────────────────
   Reuses the app-download strip's structure so the home page keeps one
   banner shape. Lives here rather than in affiliate.css because the home
   page does not load that stylesheet. */
.affiliate-banner { background-color: var(--c-navy); }
.affiliate-banner .app-download-text h2 { color: var(--c-on-dark); max-width: 720px; }
.affiliate-banner-kicker {
  display: inline-flex; align-items: center; min-height: 30px;
  padding: var(--s-xs) var(--s-m); margin-bottom: var(--s-m);
  border-radius: var(--r-pill);
  background-color: rgba(255, 255, 255, 0.12); color: var(--c-on-dark);
  font-size: var(--t-muted); font-weight: var(--w-medium);
}
.affiliate-banner-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-xxl); border-radius: var(--r-lg);
  background-color: var(--c-primary); color: var(--c-on-dark);
  font-size: var(--t-title); font-weight: var(--w-bold); text-decoration: none;
  box-shadow: var(--shadow-primary); transition: background var(--transition);
}
.affiliate-banner-btn:hover { background-color: var(--c-primary-bright); }

/* ── app download popup ──────────────────────────────── */
.app-download-popup {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 28, 54, .45); z-index: 999999;
  justify-content: center; align-items: center;
}
.popup-content {
  position: relative; background: var(--c-navy); border-radius: var(--r-xl);
  max-width: 500px; width: 90%; padding: 40px var(--s-xxl);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-xl); color: var(--c-on-dark);
}
.popup-close {
  position: absolute; top: var(--s-m); right: var(--s-l);
  background: none; border: none; color: var(--c-on-dark);
  font-size: var(--t-h3); cursor: pointer;
}
.popup-logo { width: 64px; }
.popup-buttons { display: flex; gap: var(--s-l); flex-wrap: wrap; justify-content: center; }
.popup-store-btn { height: 48px; }

/* ── popular searches ────────────────────────────────── */
.popular-part { width: 100%; display: flex; justify-content: center; padding: 50px 0; }
.popular-content { width: 70%; max-width: 1200px; display: flex; gap: var(--s-xl); }
.popular-section { flex: 1; }
.popular-section h3 {
  font-size: var(--t-h3); font-weight: var(--w-bold);
  color: var(--c-heading); margin-bottom: var(--s-m);
}
.popular-tags {
  display: flex; flex-direction: column; background: var(--c-screen);
  border-radius: var(--r-md); padding: var(--s-m);
  max-height: 240px; overflow-y: auto;
}
.popular-tag {
  color: var(--c-body); text-decoration: none; font-size: var(--t-body);
  font-weight: var(--w-medium); line-height: 34px;
  padding: 0 var(--s-s); border-radius: var(--s-s);
}
.popular-tag:hover { background: var(--c-white); color: var(--c-primary); }

@media (max-width: 948px) {
  .popular-content { width: 90%; flex-direction: column; }
}

/* ── footer ──────────────────────────────────────────── */
.footer-part { background: var(--c-navy); color: var(--c-on-dark); padding: 50px 0 var(--s-xl); }
.footer-content {
  width: 70%; max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 40px;
}
.footer-left { display: flex; flex-direction: column; gap: var(--s-l); }
.footer-logo { height: 40px; }
.footer-desc { font-size: var(--t-body); color: var(--c-on-dark-muted); max-width: 300px; line-height: 1.7; }
.footer-social { display: flex; gap: var(--s-m); }
.footer-social img { width: 28px; height: 28px; filter: brightness(0) invert(1) opacity(.8); }
.footer-contact {
  display: flex; flex-direction: column; gap: var(--s-s);
  font-size: var(--t-body); color: var(--c-on-dark-muted);
}
.footer-bottom {
  width: 70%; max-width: 1200px; margin: 30px auto 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-s);
  font-size: var(--t-small); color: var(--c-on-dark-faint);
  padding-top: var(--s-l); border-top: 1px solid var(--c-border-on-dark);
}
.footer-bottom a { color: var(--c-on-dark-faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--c-on-dark); }

@media (max-width: 948px) {
  .footer-content { width: 90%; flex-direction: column; }
  .footer-bottom { width: 90%; flex-direction: column; gap: var(--s-s); }
}

/* ── listing detail page ─────────────────────────────── */
/* These two lived in the card block until the card was rebuilt; the detail
   page still uses them, so they belong here now. */
.image-profile {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  background: var(--c-surface-alt); flex: none;
}
.date-part span, .date-part { font-size: var(--t-muted); color: var(--c-muted); }
.user { display: flex; align-items: center; gap: var(--s-s); font-size: var(--t-muted); font-weight: var(--w-medium); color: var(--c-body); min-width: 0; }

.detail-part {
  width: 100%; display: flex; align-items: center; flex-direction: column;
  padding-bottom: 50px; min-height: calc(100vh - 700px);
  background-color: var(--c-screen);
}
.detail-content { width: 70%; max-width: 1200px; padding: 5vh 0; gap: var(--s-m); position: relative; }
.layer2 { display: flex; gap: var(--s-xl); margin-top: var(--s-xl); }
.layer-left {
  flex: 2; background: var(--c-white); border-radius: var(--r-lg);
  padding: var(--s-xxl); border: 1px solid var(--c-border); box-shadow: var(--shadow-card);
}
.layer-right { flex: 1; display: flex; flex-direction: column; gap: var(--s-l); }
.left-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-l); }
.l { display: flex; gap: var(--s-l); align-items: flex-start; }
.l div { display: flex; flex-direction: column; gap: var(--s-s); }
.l span {
  font-size: var(--t-h3); font-weight: var(--w-bold);
  color: var(--c-heading); letter-spacing: var(--ls-h3);
}
.r div { display: flex; align-items: center; gap: var(--s-s); }
.price {
  font-size: var(--t-h2); font-weight: var(--w-extrabold);
  color: var(--c-heading); letter-spacing: var(--ls-h2);
}
.left-bottom {
  display: flex; gap: var(--s-m); margin-top: var(--s-l);
  padding-top: var(--s-l); border-top: 1px solid var(--c-divider); flex-wrap: wrap;
}
.left-bottom span { font-size: var(--t-body); color: var(--c-body); }
.layer3 { display: flex; align-items: center; gap: var(--s-s); }
.layer4 { margin-top: auto; }
.reservation {
  display: inline-block; background: var(--c-primary); color: var(--c-on-dark);
  border-radius: var(--r-lg); padding: var(--s-m) var(--s-xxl);
  font-size: var(--t-title); font-weight: var(--w-bold); cursor: pointer;
  box-shadow: var(--shadow-primary); transition: background var(--transition);
}
.reservation:hover { background: var(--c-primary-bright); }
.age { font-size: var(--t-body); color: var(--c-muted); }
.about { font-size: var(--t-body); color: var(--c-body); line-height: 1.7; }
.vehicle { font-size: var(--t-body); color: var(--c-heading); font-weight: var(--w-medium); }

@media (max-width: 948px) {
  .detail-content { width: 90%; }
  .layer2 { flex-direction: column; }
}

/* ── about page ──────────────────────────────────────── */
.about-part { width: 100%; display: flex; justify-content: center; padding: 60px 0; }
.about-content { width: 70%; max-width: 1200px; }
.about-title {
  font-size: var(--t-h1); font-weight: var(--w-extrabold);
  letter-spacing: var(--ls-h1); color: var(--c-heading); margin-bottom: var(--s-xl);
}
.about-desc {
  font-size: var(--t-title); color: var(--c-body); line-height: 1.8;
  white-space: pre-wrap; margin-bottom: 40px;
}
.about-sections { display: flex; gap: 40px; margin-bottom: 40px; }
.about-section { flex: 1; }
.about-section h2 {
  font-size: var(--t-h3); font-weight: var(--w-bold);
  color: var(--c-heading); margin-bottom: var(--s-m); letter-spacing: var(--ls-h3);
}
.about-section p { font-size: var(--t-body); color: var(--c-body); line-height: 1.8; }
.about-attend {
  background: var(--c-primary-soft-bg); border-left: 4px solid var(--c-primary);
  border-radius: var(--r-sm); padding: var(--s-l) var(--s-xl);
}
.about-attend strong { display: block; margin-bottom: var(--s-s); color: var(--c-heading); }
.about-attend ul { padding-left: var(--s-xl); }
.about-attend li { font-size: var(--t-body); color: var(--c-body); line-height: 1.8; }

@media (max-width: 948px) {
  .about-content { width: 90%; }
  .about-sections { flex-direction: column; gap: var(--s-xxl); }
  .about-title { font-size: var(--t-h2); letter-spacing: var(--ls-h2); }
}

/* ── legal page ──────────────────────────────────────── */
.policy-part { width: 100%; display: flex; justify-content: center; padding: 100px 0 60px; }
.policy-content { width: 70%; max-width: 1200px; }
.policy-content h1 {
  font-size: var(--t-h1); font-weight: var(--w-extrabold);
  letter-spacing: var(--ls-h1); color: var(--c-heading); margin-bottom: var(--s-xxl);
}
.policy-content p { font-size: var(--t-body); color: var(--c-body); line-height: 1.8; }

@media (max-width: 948px) { .policy-content { width: 90%; } }

.legal-updated { color: var(--c-muted); font-size: var(--t-muted); margin-bottom: var(--s-s); }
.legal-intro   { margin-bottom: var(--s-xxl); color: var(--c-body); }

.legal-toc {
  margin: 0 0 40px; padding: var(--s-l) var(--s-xl);
  border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-white);
}
.legal-toc h2 { font-size: var(--t-title); margin: 0 0 var(--s-m); }
.legal-toc-group { margin-bottom: var(--s-m); }
.legal-toc-doc { font-weight: var(--w-semibold); display: block; margin-bottom: var(--s-s); color: var(--c-heading); }
.legal-toc ol { margin: 0; padding-left: var(--s-xl); }
.legal-toc li { margin: var(--s-xs) 0; }
.legal-toc a { color: var(--c-primary); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

.legal-doc { margin-bottom: 48px; }
.legal-doc h1 { margin-bottom: var(--s-l); }
.legal-section { scroll-margin-top: 88px; margin-bottom: var(--s-xxl); }
.legal-section h2 { font-size: var(--t-h3); margin: var(--s-xxl) 0 var(--s-s); letter-spacing: var(--ls-h3); }
.legal-section p { margin: 0 0 var(--s-m); line-height: 1.6; }

/* ── feed states ─────────────────────────────────────── */
.load-more-btn {
  grid-column: 1 / -1;
  margin: var(--s-l) auto 0;
  padding: var(--s-m) var(--s-xxl);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-white);
  color: var(--c-heading);
  font: inherit; font-weight: var(--w-semibold);
  cursor: pointer; transition: var(--transition);
}
.load-more-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.load-more-btn.htmx-request { opacity: .6; pointer-events: none; }

.api-error-msg {
  grid-column: 1 / -1;
  padding: var(--s-m) var(--s-l);
  border-radius: var(--r-md);
  background: var(--c-error-bg);
  color: var(--c-error-text);
  text-align: center;
}

.subscribe-error   { color: var(--c-error-text);   font-size: var(--t-body); }
.subscribe-warning { color: var(--c-warning-text); font-size: var(--t-body); }
.subscribe-success { color: var(--c-success-text); font-size: var(--t-body); }

/* ── error page ──────────────────────────────────────── */
.error-part    { display: flex; justify-content: center; padding: 120px var(--s-l) 80px; }
.error-content { max-width: 520px; text-align: center; }
.error-content h1 { margin-bottom: var(--s-m); font-size: var(--t-h1); letter-spacing: var(--ls-h1); }
.error-content p  { margin-bottom: var(--s-xxl); color: var(--c-muted); }
.error-home-link  { color: var(--c-primary); font-weight: var(--w-semibold); }

/* ── auth ────────────────────────────────────────────── */
.auth-part    { display: flex; justify-content: center; padding: 120px var(--s-l) 64px; }
.auth-content {
  width: 100%; max-width: 400px; background: var(--c-white);
  border: 1px solid var(--c-border); border-radius: var(--r-xl);
  padding: var(--s-xxl); box-shadow: var(--shadow-card);
}
.auth-step    { display: flex; flex-direction: column; gap: var(--s-xs); }
.auth-label   { font-size: var(--t-muted); color: var(--c-body); margin-top: var(--s-m); font-weight: var(--w-medium); }
.auth-input   {
  padding: var(--s-m) var(--s-l); border: 1px solid var(--c-border);
  border-radius: var(--r-md); font: inherit; color: var(--c-heading);
}
.auth-input:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; border-color: transparent; }
.auth-hint    { color: var(--c-muted); font-size: var(--t-muted); }
.auth-error   { color: var(--c-error-text); font-size: var(--t-muted); }
.auth-submit  {
  margin-top: var(--s-l); padding: var(--s-m) var(--s-l); border: 0;
  border-radius: var(--r-lg); background: var(--c-primary); color: var(--c-on-dark);
  font: inherit; font-weight: var(--w-bold); cursor: pointer;
  box-shadow: var(--shadow-primary); transition: background var(--transition);
}
.auth-submit:hover { background: var(--c-primary-bright); }

@media (max-width: 480px) {
  .auth-part { padding: 100px var(--s-m) 48px; }
  .auth-content { padding: var(--s-xl); }
}

/* ── account area ────────────────────────────────────── */
.account-part { width: 100%; display: flex; justify-content: center; padding: 120px 0 60px; background: var(--c-screen); min-height: 70vh; }
.account-content { width: 70%; max-width: 900px; }
.account-title { font-size: var(--t-h1); font-weight: var(--w-extrabold); letter-spacing: var(--ls-h1); margin-bottom: var(--s-xl); }

.account-nav { display: flex; gap: var(--s-s); flex-wrap: wrap; margin-bottom: var(--s-xl); }
.account-nav-item {
  padding: var(--s-s) var(--s-l); border-radius: var(--r-pill);
  background: var(--c-white); border: 1px solid var(--c-border);
  color: var(--c-body); text-decoration: none;
  font-size: var(--t-muted); font-weight: var(--w-medium);
  transition: var(--transition);
}
.account-nav-item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.account-nav-item.active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-dark); font-weight: var(--w-semibold); }

.account-panel {
  background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); padding: var(--s-xxl); box-shadow: var(--shadow-card);
}

/* profile form */
.account-form { display: flex; flex-direction: column; gap: var(--s-l); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-l); }
.account-field { display: flex; flex-direction: column; gap: var(--s-xs); }
.account-label { font-size: var(--t-muted); font-weight: var(--w-medium); color: var(--c-body); }
.account-hint { font-size: var(--t-small); color: var(--c-muted); }
.account-input {
  padding: var(--s-m) var(--s-l); border: 1px solid var(--c-border);
  border-radius: var(--r-md); font: inherit; font-size: var(--t-body);
  color: var(--c-heading); background: var(--c-white);
}
.account-input:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; border-color: transparent; }
.account-file { font-size: var(--t-muted); color: var(--c-body); }

.account-avatar-row { display: flex; align-items: center; gap: var(--s-xl); }
.account-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--c-surface-alt); flex: none; }
.account-avatar-field { display: flex; flex-direction: column; gap: var(--s-xs); }

.account-checkbox { display: flex; align-items: center; gap: var(--s-s); font-size: var(--t-body); color: var(--c-body); cursor: pointer; }

.account-submit {
  align-self: flex-start; padding: var(--s-m) var(--s-xxl); border: 0;
  border-radius: var(--r-lg); background: var(--c-primary); color: var(--c-on-dark);
  font: inherit; font-weight: var(--w-bold); cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-primary); transition: background var(--transition);
}
.account-submit:hover { background: var(--c-primary-bright); }

.account-message { padding: var(--s-m) var(--s-l); border-radius: var(--r-md); font-size: var(--t-body); }
.account-message.saved { background: var(--c-success-bg); color: var(--c-success-text); }
.account-message.error { background: var(--c-error-bg); color: var(--c-error-text); }

/* my listings */
.account-rows { display: flex; flex-direction: column; gap: var(--s-m); }
.account-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-l);
  padding: var(--s-l); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  flex-wrap: wrap;
}
.account-row-main { display: flex; flex-direction: column; gap: var(--s-xs); min-width: 0; }
.account-row-route { display: flex; align-items: center; gap: var(--s-s); font-size: var(--t-title); font-weight: var(--w-bold); color: var(--c-heading); letter-spacing: var(--ls-title); }
.account-row-arrow { color: var(--c-faint); }
.account-row-meta { display: flex; align-items: center; gap: var(--s-m); font-size: var(--t-muted); color: var(--c-muted); flex-wrap: wrap; }
.account-row-actions { display: flex; align-items: center; gap: var(--s-s); }
.account-row-link { color: var(--c-primary); text-decoration: none; font-size: var(--t-muted); font-weight: var(--w-semibold); }
.account-row-btn {
  padding: var(--s-s) var(--s-l); border-radius: var(--r-pill);
  border: 1px solid var(--c-border); background: var(--c-white);
  color: var(--c-body); font: inherit; font-size: var(--t-muted); cursor: pointer;
  transition: var(--transition);
}
.account-row-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }

.account-status { padding: 2px var(--s-s); border-radius: var(--r-pill); font-size: var(--t-small); font-weight: var(--w-semibold); }
.account-status-active   { background: var(--c-success-bg);   color: var(--c-success-text); }
.account-status-paused   { background: var(--c-surface-alt);  color: var(--c-body); }
.account-status-expired  { background: var(--c-error-bg);     color: var(--c-error-text); }
.account-status-archived { background: var(--c-surface-alt);  color: var(--c-muted); }

.account-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s-m); padding: var(--s-xxl) var(--s-l); text-align: center; }
.account-empty strong { font-size: var(--t-h3); color: var(--c-heading); }
.account-empty span { font-size: var(--t-body); color: var(--c-muted); }

@media (max-width: 948px) { .account-content { width: 90%; } }
@media (max-width: 768px) {
  .account-part { padding: 100px 0 40px; }
  .account-panel { padding: var(--s-xl); }
  .account-grid { grid-template-columns: 1fr; }
  .account-row { flex-direction: column; align-items: flex-start; }
}

/* ── public profile ──────────────────────────────────── */
.profile-part { width: 100%; display: flex; justify-content: center; padding: 120px 0 60px; background: var(--c-screen); min-height: 70vh; }
.profile-content { width: 70%; max-width: 720px; background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--r-xl); padding: var(--s-xxl); box-shadow: var(--shadow-card); }
.profile-card { display: flex; align-items: center; gap: var(--s-xl); }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--c-surface-alt); flex: none; }
.profile-identity { display: flex; flex-direction: column; gap: var(--s-xs); }
.profile-name { font-size: var(--t-h2); font-weight: var(--w-extrabold); letter-spacing: var(--ls-h2); display: flex; align-items: center; gap: var(--s-s); }
.profile-verified { color: var(--c-green); font-size: var(--t-title); }
.profile-since { font-size: var(--t-muted); color: var(--c-muted); }
.profile-about { margin-top: var(--s-xl); font-size: var(--t-body); color: var(--c-body); line-height: 1.7; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-l); margin-top: var(--s-xxl); }
.profile-stat { display: flex; flex-direction: column; gap: var(--s-xs); padding: var(--s-l); background: var(--c-screen); border-radius: var(--r-md); }
.profile-stat-label { font-size: var(--t-small); color: var(--c-muted); }
.profile-stat-value { font-size: var(--t-h3); font-weight: var(--w-bold); color: var(--c-heading); }
.profile-stat-empty { font-size: var(--t-muted); color: var(--c-faint); }
.profile-star { color: var(--c-star); }
.profile-phone { display: inline-block; margin-top: var(--s-xl); color: var(--c-primary); font-weight: var(--w-semibold); text-decoration: none; }

@media (max-width: 948px) { .profile-content { width: 90%; } }
@media (max-width: 480px) {
  .profile-card { flex-direction: column; text-align: center; }
  .profile-content { padding: var(--s-xl); }
}

/* Owner block on a listing detail page — a link through to the public profile. */
.listing-owner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-m);
  padding: var(--s-l); background: var(--c-white); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); text-decoration: none; transition: var(--transition);
}
.listing-owner:hover { border-color: var(--c-primary); }
.listing-owner-more { font-size: var(--t-muted); font-weight: var(--w-semibold); color: var(--c-primary); }

/* reviews on a public profile */
.profile-reviews { margin-top: var(--s-xxl); padding-top: var(--s-xl); border-top: 1px solid var(--c-divider); }
.profile-reviews-title { font-size: var(--t-h3); font-weight: var(--w-bold); letter-spacing: var(--ls-h3); margin-bottom: var(--s-l); }
.profile-review-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-m); }
.profile-review { padding: var(--s-l); background: var(--c-screen); border-radius: var(--r-md); }
.profile-review-head { display: flex; align-items: center; gap: var(--s-m); flex-wrap: wrap; }
.profile-review-score { font-weight: var(--w-bold); color: var(--c-heading); }
.profile-review-role { font-size: var(--t-small); color: var(--c-muted); }
.profile-review-date { font-size: var(--t-small); color: var(--c-faint); margin-left: auto; }
.profile-review-comment { margin-top: var(--s-s); font-size: var(--t-body); color: var(--c-body); line-height: 1.6; }
.account-offer-message { color: var(--c-body); }

/* save / unsave a listing */
.favorite-btn {
  display: inline-flex; align-items: center; gap: var(--s-s);
  margin-top: var(--s-m); padding: var(--s-m) var(--s-xl);
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-white); color: var(--c-body);
  font: inherit; font-size: var(--t-muted); font-weight: var(--w-semibold);
  cursor: pointer; transition: var(--transition);
}
.favorite-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.favorite-btn.saved { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.favorite-icon { color: var(--c-star); font-size: var(--t-title); line-height: 1; }

/* ── accessibility ───────────────────────────────────────
   The header is fixed and full of navigation; without this a keyboard user
   tabs through all of it on every page before reaching anything. Visible only
   while focused. */
.skip-link {
  position: absolute; left: var(--s-s); top: -60px; z-index: 1000;
  padding: var(--s-m) var(--s-l); border-radius: var(--r-md);
  background: var(--c-primary); color: var(--c-on-dark);
  font-size: var(--t-muted); font-weight: var(--w-semibold); text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--s-s); }

/* The two dropdown triggers are <button> now; strip the UA chrome without
   losing the focus ring. */
.language-trigger,
.menu-bar {
  background: none; border: 0; padding: 0; font: inherit;
  color: inherit; cursor: pointer;
}
.language-trigger { display: flex; align-items: center; gap: var(--s-xs); }
.language-trigger:focus-visible,
.menu-bar:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 4px; border-radius: var(--s-xs); }

/* .reservation became a button too. */
.reservation { border: 0; font: inherit; }

/* ── narrow-viewport hardening ───────────────────────────
   `html, body { overflow-x: hidden }` above hides horizontal overflow rather
   than preventing it: anything too wide is clipped and unreachable instead of
   scrollable, which is also why such bugs never show up in testing. It stays as
   a safety net, but nothing below should need it.

   The usual cause is not the layout, it is the content. A flex child defaults
   to `min-width: auto`, so it refuses to shrink below its longest unbreakable
   word — one long city name, email or URL pushes the whole row wider than the
   screen. These rules let those children shrink, and let long strings break. */

.account-row-main,
.account-row-route,
.account-row-meta,
.profile-identity,
.listing-owner,
.left-top,
.cities-part,
.user { min-width: 0; }

.account-row-route span,
.profile-name,
.from span,
.to span { overflow-wrap: anywhere; }

/* Free text supplied by users: an "about" paragraph or a review can contain a
   URL with no break opportunity in it at all. */
.profile-about,
.profile-review-comment,
.account-offer-message,
.left-bottom span,
.about { overflow-wrap: anywhere; }

/* The contact links on a profile are email addresses and phone numbers, both
   long and unbreakable. */
.footer-contact span,
.profile-phone { overflow-wrap: anywhere; }

@media (max-width: 480px) {
  /* Avatar beside a file input does not fit at 360; stack it. */
  .account-avatar-row { flex-direction: column; align-items: flex-start; gap: var(--s-m); }
  .account-avatar { width: 64px; height: 64px; }

  /* Route and price side by side on a detail page is two long strings in one
     row at this width. */
  .left-top { flex-direction: column; gap: var(--s-m); }

  .account-nav { gap: var(--s-xs); }
  .account-nav-item { padding: var(--s-s) var(--s-m); }

  .account-part, .profile-part { padding-left: var(--s-m); padding-right: var(--s-m); }
  .account-content, .profile-content { width: 100%; }
}
