/* static/css/00-tokens.css */
/* Design tokens: bright + dark palettes, type, motion, layers, spacing.
   Components consume semantic tokens only — raw hex lives nowhere else. */

:root {
  color-scheme: light;

  --color-background: #F4F6F9;
  --color-surface: #FEFEFE;
  --color-surface-muted: #E8ECF1;

  --color-text-primary: #1D262F;
  --color-text-secondary: #436A88;
  --color-text-tertiary: #ACB8C6;
  --color-text-inverse: #FEFEFE;

  --color-border-subtle: #D5DBE3;
  --color-border-strong: #436A88;

  --color-signal-positive: #71B6B2;
  --color-signal-info: #9EB6C6;
  --color-signal-danger: #FD3835;
  --color-signal-sus: #C8932F;
  --color-horror-hero-text: #F7F8FA;
  --color-horror-hero-muted: #E6EAF0;
  --color-horror-hero-chrome: #F6B0AE;
  --color-horror-scrim-rgb: 4, 7, 12;

  --color-city-popularity-cool: #4A7CB1;
  --color-city-popularity-hot: #7957A6;

  --color-cta-primary: #1B2731;
  --color-cta-primary-text: #FEFEFE;
  --color-cta-secondary: #436A88;

  --color-tier-goated: #D51E3A;
  --color-tier-amazing: #2F7F78;
  --color-tier-verygood: #347F96;
  --color-tier-good: #436A88;
  --color-tier-goodish: #5E6C78;
  --color-tier-notbad: #596674;
  --color-tier-meh: #6D4A72;
  --color-tier-shit: #A7354A;
  --color-tier-godawful: #6E1E3A;

  --color-map-marker-top: #D51E3A;
  --color-map-marker-info: #436A88;
  --color-map-marker-warning: #FD3835;
  --color-map-control-ink: #333333;
  --color-border-crossing-open: #23854E;
  --color-border-crossing-unknown: #667381;
  --color-border-crossing-ink: #FEFEFE;
  --color-border-weather-alert: #F2C14D;
  --color-border-weather-ink: #3C2A00;

  --radius-card: 22px;
  --radius-control: 14px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --shadow-card: 0 8px 24px rgba(29, 38, 47, 0.12);
  --shadow-panel: 0 16px 48px rgba(29, 38, 47, 0.18);

  /* Content halos — soft dark patches behind the name, score circle,
     score number, and tier pill. Tune these to play with the overall
     readability boost without darkening the whole overlay. */
  --hp-halo-rgb: 0, 0, 0;
  --hp-halo-alpha: 0.32;
  --hp-halo-blur: 7px;
  --hp-title-halo-x: 42%;

  /* Typography */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Chakra Petch", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  --fs-page: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --fs-section: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --fs-card: 1rem;
  --fs-card-lg: 1.125rem;
  --fs-body: 0.9375rem;
  --fs-meta: 0.8125rem;
  --fs-tiny: 0.6875rem;
  --fs-score: clamp(2.5rem, 2rem + 2vw, 3.25rem);

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 650;
  --fw-bold: 700;

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.5;

  /* Motion */
  --dur-micro: 140ms;
  --dur-panel: 220ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decel: cubic-bezier(0, 0, 0, 1);
  --ease-accel: cubic-bezier(0.4, 0, 1, 1);

  /* Layers */
  --z-base: 0;
  --z-sticky: 50;
  --z-nav: 100;
  --z-dropdown: 200;
  --z-sheet: 300;
  --z-modal: 400;
  --z-tooltip: 500;

  /* Touch target floor */
  --tap: 44px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-background: #04070C;
  --color-surface: #1D262F;
  --color-surface-muted: #1B2731;

  --color-text-primary: #FEFEFE;
  --color-text-secondary: #C2CBD5;
  --color-text-tertiary: #8E99A7;
  --color-text-inverse: #04070C;

  --color-border-subtle: #355D90;
  --color-border-strong: #4A7CB1;

  --color-signal-positive: #3A6D70;
  --color-signal-info: #4A7CB1;
  --color-signal-danger: #FD323E;
  --color-signal-sus: #E2B042;

  --color-city-popularity-cool: #67A8E4;
  --color-city-popularity-hot: #B58AE6;

  --color-cta-primary: #FEFEFE;
  --color-cta-primary-text: #04070C;
  --color-cta-secondary: #4A7CB1;

  --color-tier-goated: #FF405F;
  --color-tier-amazing: #67BEB7;
  --color-tier-verygood: #63BCD8;
  --color-tier-good: #78A7DD;
  --color-tier-goodish: #9EB6C6;
  --color-tier-notbad: #8E99A7;
  --color-tier-meh: #B08BCC;
  --color-tier-shit: #FF5B70;
  --color-tier-godawful: #D64068;

  --color-map-marker-top: #FF405F;
  --color-map-marker-info: #4A7CB1;
  --color-map-marker-warning: #FD323E;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-panel: 0 16px 48px rgba(0, 0, 0, 0.44);
}

/* OS-auto follow: when no explicit override, inherit OS preference. */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    color-scheme: dark;

    --color-background: #04070C;
    --color-surface: #1D262F;
    --color-surface-muted: #1B2731;

    --color-text-primary: #FEFEFE;
    --color-text-secondary: #C2CBD5;
    --color-text-tertiary: #8E99A7;
    --color-text-inverse: #04070C;

    --color-border-subtle: #355D90;
    --color-border-strong: #4A7CB1;

    --color-signal-positive: #3A6D70;
    --color-signal-info: #4A7CB1;
    --color-signal-danger: #FD323E;

    --color-city-popularity-cool: #67A8E4;
    --color-city-popularity-hot: #B58AE6;

    --color-cta-primary: #FEFEFE;
    --color-cta-primary-text: #04070C;
    --color-cta-secondary: #4A7CB1;

    --color-tier-goated: #FF405F;
    --color-tier-amazing: #67BEB7;
    --color-tier-verygood: #63BCD8;
    --color-tier-good: #78A7DD;
    --color-tier-goodish: #9EB6C6;
    --color-tier-notbad: #8E99A7;
    --color-tier-meh: #B08BCC;
    --color-tier-shit: #FF5B70;
    --color-tier-godawful: #D64068;

    --color-map-marker-top: #FF405F;
    --color-map-marker-info: #4A7CB1;
    --color-map-marker-warning: #FD323E;

    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-panel: 0 16px 48px rgba(0, 0, 0, 0.44);
  }
}

/* Tier classes wire to a single --tier custom property — dark redefinitions
   cascade automatically without per-class dark overrides. */
.perf-goated   { --tier: var(--color-tier-goated); }
.perf-amazing  { --tier: var(--color-tier-amazing); }
.perf-verygood { --tier: var(--color-tier-verygood); }
.perf-good     { --tier: var(--color-tier-good); }
.perf-goodish  { --tier: var(--color-tier-goodish); }
.perf-notbad   { --tier: var(--color-tier-notbad); }
.perf-meh      { --tier: var(--color-tier-meh); }
.perf-shit     { --tier: var(--color-tier-shit); }
.perf-godawful { --tier: var(--color-tier-godawful); }
.perf-thin     { --tier: var(--color-text-secondary); }

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-micro: 1ms;
    --dur-panel: 1ms;
  }
}

/* static/css/01-reset.css */
/* Modern CSS reset. Trimmed for our needs. */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html, body { height: 100%; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: none; padding: 0; cursor: pointer; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

ul, ol { padding: 0; }

ul[role="list"], ol[role="list"] { list-style: none; }

a { color: inherit; }

#root, #__next { isolation: isolate; }

/* Honor reduced-motion at the reset layer too. */
@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;
  }
}

/* static/css/02-base.css */
/* Base element defaults: typography, link defaults, selection,
   focus-visible defaults, language palette. */

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  background: var(--color-background);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: var(--fs-body);
  background: var(--color-background);
  color: var(--color-text-primary);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Long-form rhythm — tight headings, body lines breathe. */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--fs-page); }
h2 { font-size: var(--fs-section); }
h3 { font-size: var(--fs-card-lg); }
h4 { font-size: var(--fs-card); }

p { line-height: var(--lh-body); }

/* Links — semantic, never blue-default. */
a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-standard);
}

a:hover { color: var(--color-text-secondary); }

::selection {
  background: var(--color-border-strong);
  color: var(--color-cta-primary-text);
}

:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Card-internal focus ring contained — components extend this. */
.c-property-card:focus-visible,
.c-property-card a:focus-visible {
  outline-offset: 2px;
}

code, kbd, pre, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
}

/* Tabular numbers everywhere we render scores / counts / ranks. */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Language colour palette — exposed as --lang-color-XX for the language stack. */
:root {
  --lang-color-en: #4A7CB1;
  --lang-color-es: #C44848;
  --lang-color-de: #2D4A6B;
  --lang-color-fr: #6B7BC4;
  --lang-color-pt: #2E8553;
  --lang-color-nl: #D8853B;
  --lang-color-it: #4F8F46;
  --lang-color-ko: #7A4080;
  --lang-color-ja: #B83448;
  --lang-color-zh: #C45A1A;
  --lang-color-pl: #B73C2A;
  --lang-color-ru: #426B96;
  --lang-color-sv: #4078B0;
  --lang-color-ar: #5C7A2E;
  --lang-color-tr: #C03A2D;
  --lang-color-hi: #C46A1A;
  --lang-color-th: #3F4480;
  --lang-color-other: #ACB8C6;
}

/* static/css/03-utilities.css */
/* Utility classes — used sparingly. Compositional helpers only,
   not a utility-first system. */

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-6); }
}

.container--narrow { max-width: 960px; }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-2 { gap: var(--space-2); }
.stack-4 { gap: var(--space-4); }
.stack-6 { gap: var(--space-6); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.no-pointer { pointer-events: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: var(--z-modal);
}
.skip-link:focus {
  position: fixed;
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
  border-radius: var(--radius-control);
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

/* static/css/10-layout/app-shell.css */
/* Top app shell: sticky header + main + footer.
   Built around safe-area insets so iOS PWA chrome doesn't bleed into content. */

.hp-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-background);
}

.hp-main {
  flex: 1;
  width: 100%;
  padding-top: var(--space-4);
  padding-bottom: var(--space-8);
}

/* One render region is shared by canonical documents and installed fragments.
   display: contents preserves the existing body flex/map layout. */
#hp-shell-page {
  display: contents;
}

/* HEADER */
.c-app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-top: env(safe-area-inset-top);
}

.c-app-header__inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 56px;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .c-app-header__inner {
    height: 64px;
    padding-inline: var(--space-6);
    gap: var(--space-4);
  }
}

.c-app-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-card);
  letter-spacing: 0;
  color: var(--color-text-primary);
  text-decoration: none;
  flex: 0 0 auto;
}

.c-app-header__logo-mark,
.c-app-header__logo-img {
  width: 32px;
  height: 32px;
}

.c-app-header__logo-mark {
  display: inline-block;
  flex: 0 0 32px;
  background-image: url("/static/img/logo/logo-bright-64.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

[data-theme="dark"] .c-app-header__logo-mark {
  background-image: url("/static/img/logo/logo-dark-64.png");
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .c-app-header__logo-mark {
    background-image: url("/static/img/logo/logo-dark-64.png");
  }
}

/* Theme-aware logo switching */
.c-logo--dark { display: none !important; }

[data-theme="dark"] .c-logo--bright { display: none !important; }
[data-theme="dark"] .c-logo--dark   { display: inline-block !important; }

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .c-logo--bright { display: none !important; }
  [data-theme="auto"] .c-logo--dark   { display: inline-block !important; }
}

.c-app-header__logo-text {
  font-size: var(--fs-card);
}
@media (max-width: 359px) {
  .c-app-header__logo-text { display: none; }
}

.c-app-header__nav {
  display: none;
  flex: 1;
  gap: var(--space-3);
}
.c-app-header__nav-short-label { display: none; }

[data-search-controls] [data-hp-search-panel][data-search-active="false"]:not([data-search-pinned]):not(.is-search-open):not(:has(#search-input:target)) {
  display: none;
}

.c-app-header__search {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  color: var(--color-text-secondary);
}
.c-app-header__search:hover,
.c-app-header__search[aria-expanded="true"] { background: var(--color-surface-muted); }
.c-app-header__search:focus-visible { outline: 2px solid var(--color-border-strong); outline-offset: 2px; }
@media (max-width: 479px) {
  .c-app-header__logo-text { display: none; }
}
@media (min-width: 640px) {
  .c-app-header__nav { display: inline-flex; align-items: center; }
}

.c-app-header__nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}
@media (hover: hover) {
  .c-app-header__nav-link:hover {
    color: var(--color-text-primary);
    background: var(--color-surface-muted);
  }
}

.c-app-header__nav-link--cta {
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
}

.c-app-header__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.c-app-header__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  border-radius: var(--radius-control);
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-app-header__menu:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

.c-app-header__menu-icon {
  display: inline-flex;
  grid-area: 1 / 1;
  transition: opacity var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-app-header__menu-icon--close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.82);
}

.has-mobile-menu-open .c-app-header__menu {
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
}

.has-mobile-menu-open .c-app-header__menu-icon--open {
  opacity: 0;
  transform: rotate(45deg) scale(0.82);
}

.has-mobile-menu-open .c-app-header__menu-icon--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (max-width: 639px) {
  .c-app-header__inner {
    gap: var(--space-2);
  }

  .c-app-header__actions {
    display: none;
  }

  .c-app-header__nav {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    margin-left: auto;
    white-space: nowrap;
  }

  .c-app-header__nav .c-app-header__nav-link {
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding-inline: var(--space-2);
    font-size: var(--fs-meta);
  }

  .c-app-header__nav-full-label { display: none; }
  .c-app-header__nav-short-label { display: inline; }

  .c-app-header__menu {
    display: inline-grid;
    flex: 0 0 var(--tap);
    margin-left: 0;
  }
}

.hp-share-trigger {
  min-width: var(--tap);
}
@media (max-width: 520px) {
  .c-app-header__actions {
    gap: var(--space-1);
  }
  .c-app-header__actions .c-app-header__nav-link {
    height: 34px;
    padding: 0 var(--space-2);
    font-size: var(--fs-meta);
  }
}

.c-app-header__pwa {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.c-app-header__pwa[hidden] { display: none !important; }
.c-app-header__pwa:not([hidden]) { display: inline-flex; }
@media (max-width: 639px) {
  .c-app-header__pwa {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
  }
  .c-app-header__pwa span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.c-app-header__user {
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}

.c-app-header__logout { display: inline-flex; }

/* MOBILE SIDEBAR */
.c-mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) - 1);
  background: rgba(4, 7, 12, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-panel) var(--ease-standard);
}

.c-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  width: min(88vw, 360px);
  max-width: 100%;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-panel);
  transform: translateX(105%);
  pointer-events: none;
  transition: transform var(--dur-panel) var(--ease-standard);
}

.has-mobile-menu-open .c-mobile-menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.has-mobile-menu-open .c-mobile-menu {
  transform: translateX(0);
  pointer-events: auto;
}

.c-mobile-menu__panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--space-4);
  gap: var(--space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.c-mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--tap);
}

.c-mobile-menu__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-card-lg);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

.c-mobile-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--tap);
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-control);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.c-mobile-menu__nav,
.c-mobile-menu__account,
.c-mobile-menu__tools {
  display: grid;
  gap: var(--space-2);
}

.c-mobile-menu__nav {
  padding-block: var(--space-2);
  border-block: 1px solid var(--color-border-subtle);
}

.c-mobile-menu__link,
.c-mobile-menu__install {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  color: var(--color-text-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-align: left;
  text-decoration: none;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-mobile-menu__link .c-icon,
.c-mobile-menu__install .c-icon {
  color: var(--color-text-secondary);
}

.c-mobile-menu__link--quiet {
  color: var(--color-text-secondary);
}

.c-mobile-menu__link--cta {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
}

.c-mobile-menu__install {
  width: 100%;
  background: transparent;
  cursor: pointer;
}
.c-mobile-menu__install[hidden] { display: none !important; }

.c-mobile-menu__user {
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  overflow-wrap: anywhere;
}

.c-mobile-menu__logout,
.c-mobile-menu__logout .c-button {
  width: 100%;
}

.c-mobile-menu .c-theme-toggle {
  justify-self: start;
}

.c-mobile-menu .c-language-switcher {
  display: block;
  width: 100%;
}

.c-mobile-menu .c-language-switcher__trigger {
  width: 100%;
  min-height: var(--tap);
  justify-content: space-between;
  background: var(--color-surface-muted);
}

.c-mobile-menu .c-language-switcher__code,
.c-mobile-menu .c-language-switcher__caret {
  display: inline-flex;
}

.c-mobile-menu .c-language-switcher__panel {
  position: static;
  min-width: 0;
  max-height: 220px;
  margin-top: var(--space-2);
  overflow: auto;
  box-shadow: none;
}

@media (hover: hover) {
  .c-app-header__menu:hover,
  .c-mobile-menu__close:hover,
  .c-mobile-menu__link:hover,
  .c-mobile-menu__install:hover {
    background: var(--color-surface-muted);
    color: var(--color-text-primary);
  }

  .c-mobile-menu__link--cta:hover {
    background: var(--color-cta-primary);
    color: var(--color-cta-primary-text);
    transform: translateY(-1px);
  }
}

@media (min-width: 640px) {
  .c-mobile-menu,
  .c-mobile-menu-backdrop {
    display: none;
  }
}

@media (max-height: 700px) and (max-width: 639px) {
  .c-mobile-menu__panel {
    gap: var(--space-3);
    padding-block: var(--space-3);
  }

  .c-mobile-menu__nav,
  .c-mobile-menu__account,
  .c-mobile-menu__tools {
    gap: var(--space-1);
  }

  .c-mobile-menu__nav {
    padding-block: var(--space-1);
  }

  .c-mobile-menu__link,
  .c-mobile-menu__install {
    padding-block: var(--space-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-app-header__menu,
  .c-app-header__menu-icon,
  .c-mobile-menu,
  .c-mobile-menu-backdrop,
  .c-mobile-menu__link,
  .c-mobile-menu__install {
    transition-duration: 1ms;
  }
}

/* THEME TOGGLE — segmented control */
.c-theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-muted);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 0;
}

.c-theme-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}
.c-theme-toggle__btn.is-active,
[data-theme="light"] .c-theme-toggle__btn[value="light"],
[data-theme="dark"] .c-theme-toggle__btn[value="dark"],
[data-theme="auto"] .c-theme-toggle__btn[value="auto"] {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}
.c-theme-toggle__btn:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

/* FOOTER */
.c-app-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  margin-top: var(--space-8);
  padding-bottom: env(safe-area-inset-bottom);
}
.c-app-footer__research-credit {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-6) var(--space-4) 0;
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.6;
}
.c-app-footer__inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .c-app-footer__research-credit {
    padding-inline: var(--space-6);
  }
  .c-app-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-inline: var(--space-6);
  }
}
.c-app-footer__tagline {
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
}
.c-app-footer__brand {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}
.c-app-footer__nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--fs-meta);
}
.c-app-footer__nav a { color: var(--color-text-secondary); }
.c-app-footer__nav a:hover { color: var(--color-text-primary); }

/* INSTALLED APP SHELL
   Progressive enhancement only: ordinary browser and no-JS pages retain the
   crawlable website header/footer above. */
.c-installed-header__back,
.c-installed-header__identity,
.c-installed-header__account,
.c-installed-account,
.c-installed-account-backdrop,
.c-installed-tabs,
.c-installed-nav-progress,
.c-auth-installed-shell {
  display: none;
}

[data-app-mode="installed"] {
  --installed-tab-bar-height: 64px;
}

[data-app-mode="installed"] .c-app-header {
  background: color-mix(in srgb, var(--color-surface) 96%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

[data-app-mode="installed"] .c-app-header__inner {
  height: 56px;
  max-width: none;
  gap: var(--space-2);
  padding-inline: var(--space-3);
}

[data-app-mode="installed"] .c-app-header__browser-logo,
[data-app-mode="installed"] .c-app-header__actions,
[data-app-mode="installed"] .c-app-header__menu,
[data-app-mode="installed"] .c-mobile-menu,
[data-app-mode="installed"] .c-mobile-menu-backdrop {
  display: none !important;
}

[data-app-mode="installed"] .c-app-header__nav { display: none; }

@media (max-width: 639px) {
  [data-app-mode="installed"] .c-app-header__nav {
    display: inline-flex;
    order: 1;
  }
  [data-app-mode="installed"] .c-installed-header__account { order: 2; }
  [data-app-mode="installed"] .c-app-header__search { order: 1; }
}

[data-app-mode="installed"] .c-installed-header__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
  color: var(--color-text-primary);
  text-decoration: none;
  flex: 1 1 auto;
}

[data-app-mode="installed"] .c-installed-header__identity .c-app-header__logo-mark {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.c-installed-header__title {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-app-mode="installed"] .c-installed-header__back,
[data-app-mode="installed"] .c-installed-header__account {
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--tap);
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-standard),
              background var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

[data-app-mode="installed"] .c-installed-header__account {
  display: inline-flex;
}

[data-app-mode="installed"] .c-installed-header__account[hidden] {
  display: none !important;
}

[data-app-mode="installed"] .is-installed-detail .c-installed-header__back,
[data-app-mode="installed"] .is-installed-auth .c-installed-header__back {
  display: inline-flex;
}

.c-installed-header__back-icon {
  display: inline-flex;
  transform: rotate(180deg);
}

[data-app-mode="installed"] .is-installed-detail .c-installed-header__identity .c-app-header__logo-mark,
[data-app-mode="installed"] .is-installed-auth .c-installed-header__identity .c-app-header__logo-mark {
  display: none;
}

[data-app-mode="installed"] .is-installed-detail .c-installed-header__identity,
[data-app-mode="installed"] .is-installed-auth .c-installed-header__identity {
  pointer-events: none;
}

[data-app-mode="installed"] .c-installed-header__back:active,
[data-app-mode="installed"] .c-installed-header__account:active {
  background: var(--color-surface-muted);
  transform: scale(0.94);
}

[data-app-mode="installed"] .c-installed-header__back:focus-visible,
[data-app-mode="installed"] .c-installed-header__account:focus-visible,
[data-app-mode="installed"] .c-installed-tabs__link:focus-visible,
[data-app-mode="installed"] .c-installed-account__close:focus-visible,
[data-app-mode="installed"] .c-installed-account__action:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

[data-app-mode="installed"] .c-app-footer {
  display: none;
}

[data-app-mode="installed"] .hp-main {
  padding-bottom: calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom) + var(--space-5));
}

[data-app-mode="installed"] .c-installed-tabs {
  position: fixed;
  z-index: var(--z-nav);
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom));
  padding: 4px max(var(--space-2), env(safe-area-inset-right)) env(safe-area-inset-bottom) max(var(--space-2), env(safe-area-inset-left));
  border-top: 1px solid var(--color-border-subtle);
  background: color-mix(in srgb, var(--color-surface) 96%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: opacity var(--dur-panel) var(--ease-standard),
              transform var(--dur-panel) var(--ease-standard);
}

[data-app-mode="installed"] .c-installed-nav-progress {
  position: fixed;
  z-index: calc(var(--z-nav) + 1);
  top: calc(env(safe-area-inset-top) + 55px);
  right: 0;
  left: 0;
  display: block;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-micro) var(--ease-standard);
}

[data-app-mode="installed"] .c-installed-nav-progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--color-cta-primary);
  transform: translateX(-120%);
}

[data-app-mode="installed"].is-app-navigating .c-installed-nav-progress {
  opacity: 1;
}

[data-app-mode="installed"].is-app-navigating .c-installed-nav-progress span {
  animation: hp-installed-nav-progress 900ms var(--ease-standard) infinite;
}

[data-app-mode="installed"].is-app-navigating #hp-shell-page {
  cursor: progress;
}

@keyframes hp-installed-nav-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}

[data-app-mode="installed"].has-app-ime .c-installed-tabs {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + env(safe-area-inset-bottom)));
}

[data-app-mode="installed"].has-app-ime .hp-main {
  padding-bottom: var(--space-5);
}

[data-app-mode="installed"].has-app-ime .hp-body--map .hp-dmap {
  margin-bottom: 0;
}

.c-installed-tabs__link {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-control);
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.1;
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-installed-tabs__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 30px;
  border-radius: var(--radius-pill);
  transition: color var(--dur-micro) var(--ease-standard),
              background var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-installed-tabs__link.is-active {
  color: var(--color-text-primary);
}

.c-installed-tabs__link.is-active .c-installed-tabs__icon {
  color: var(--color-cta-primary-text);
  background: var(--color-cta-primary);
}

.c-installed-tabs__link:active {
  transform: scale(0.96);
}

.c-installed-tabs__link:active .c-installed-tabs__icon {
  transform: scale(0.92);
}

[data-app-mode="installed"] .c-installed-account-backdrop {
  position: fixed;
  z-index: calc(var(--z-sheet) - 1);
  inset: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 7, 12, 0.52);
  transition: opacity var(--dur-panel) var(--ease-standard);
}

[data-app-mode="installed"] .c-installed-account {
  position: fixed;
  z-index: var(--z-sheet);
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  max-height: min(78dvh, 680px);
  padding: var(--space-2) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-border-subtle);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
  pointer-events: none;
  transform: translateY(105%);
  transition: transform var(--dur-panel) var(--ease-standard);
}

.has-installed-account-open .c-installed-account-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.has-installed-account-open .c-installed-account {
  pointer-events: auto;
  transform: translateY(0);
}

.c-installed-account__handle {
  width: 36px;
  height: 4px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-border-subtle);
}

.c-installed-account__head,
.c-installed-account__preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.c-installed-account__eyebrow {
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
}

.c-installed-account__title {
  margin-top: 2px;
  color: var(--color-text-primary);
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
}

.c-installed-account__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--tap);
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.c-installed-account__body,
.c-installed-account__section {
  display: grid;
  gap: var(--space-3);
}

.c-installed-account__body {
  margin-top: var(--space-4);
}

.c-installed-account__section {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.c-installed-account__status {
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  overflow-wrap: anywhere;
}

.c-installed-account__action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  width: 100%;
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-decoration: none;
  cursor: pointer;
}

.c-installed-account__action--primary {
  justify-content: center;
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
  font-weight: var(--fw-semibold);
}

.c-installed-account__logout {
  width: 100%;
}

.c-installed-account__preferences {
  gap: var(--space-4);
}

.c-installed-account__preference > span {
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
}

.c-installed-account__preference--language {
  align-items: flex-start;
}

.c-installed-account .c-language-switcher__panel {
  right: 0;
}

.c-auth-installed-shell {
  display: none;
}

[data-app-mode="installed"] .c-auth-installed-shell {
  display: contents;
}

[data-app-mode="installed"] .auth-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  place-items: initial;
  padding: 0;
}

[data-app-mode="installed"] .auth-container {
  margin: auto;
  padding: var(--space-6) var(--space-4) calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom) + var(--space-6));
}

[data-app-mode="installed"] .auth-logo {
  display: none;
}

[data-app-mode="installed"] .auth-subtitle {
  margin-top: 0;
}

[data-app-mode="installed"] .hp-body--map {
  height: 100dvh;
}

[data-app-mode="installed"] .hp-body--map .hp-map-toolbar {
  top: 0;
}

[data-app-mode="installed"] .hp-body--map .hp-dmap {
  flex: 1 1 0;
  height: auto;
  margin-bottom: calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom));
}

[data-app-mode="installed"] .hp-body--map .hp-dmap__sheet {
  bottom: calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
  [data-app-mode="installed"] .c-installed-account {
    right: var(--space-4);
    bottom: calc(var(--installed-tab-bar-height) + env(safe-area-inset-bottom) + var(--space-3));
    left: auto;
    width: min(420px, calc(100vw - 32px));
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: 24px;
  }
}

@media (hover: hover) {
  [data-app-mode="installed"] .c-installed-header__back:hover,
  [data-app-mode="installed"] .c-installed-header__account:hover,
  .c-installed-account__action:hover {
    color: var(--color-text-primary);
    background: var(--color-surface-muted);
  }

  .c-installed-account__action--primary:hover {
    color: var(--color-cta-primary-text);
    background: var(--color-cta-primary);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-installed-header__back,
  .c-installed-header__account,
  .c-installed-tabs__link,
  .c-installed-tabs__icon,
  .c-installed-account,
  .c-installed-account-backdrop,
  .c-installed-nav-progress span {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* static/css/10-layout/map-shell.css */
/* Map page split-shell: mobile = stacked w/ bottom sheet.
   Desktop ≥1024px = list left (420-520px) + map right. */

.c-map-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
}
@media (min-width: 768px) {
  .c-map-shell { height: calc(100vh - 64px); height: calc(100dvh - 64px); }
}

.c-map-shell__filterbar { flex: 0 0 auto; }

.c-map-shell__body {
  flex: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  min-height: 0;
}

.c-map-shell__map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--color-surface-muted);
}

.c-map-shell__list {
  display: none;
  border-right: 1px solid var(--color-border-subtle);
  overflow-y: auto;
  background: var(--color-background);
  padding: var(--space-3);
}

@media (min-width: 1024px) {
  .c-map-shell__body {
    grid-template-columns: minmax(420px, 520px) 1fr;
    grid-template-rows: 1fr;
  }
  .c-map-shell__list { display: block; }
  .c-map-shell__sheet { display: none; }
}

/* Bottom sheet (mobile only) */
.c-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: var(--color-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: var(--shadow-panel);
  z-index: var(--z-sheet);
  transition: height var(--dur-panel) var(--ease-decel);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
.c-bottom-sheet[data-state="half"] { height: 60vh; height: 60dvh; }
.c-bottom-sheet[data-state="full"] { height: 92vh; height: 92dvh; }

.c-bottom-sheet__handle {
  display: block;
  width: 36px;
  height: 4px;
  margin: var(--space-3) auto var(--space-2);
  border-radius: 2px;
  background: var(--color-text-tertiary);
  cursor: ns-resize;
}

.c-bottom-sheet__body {
  height: calc(100% - 28px);
  overflow-y: auto;
  padding: var(--space-3) var(--space-4) var(--space-4);
}

@media (min-width: 1024px) {
  .c-bottom-sheet { display: none; }
}

/* static/css/10-layout/page-header.css */
.c-page-header {
  width: 100%;
  padding: var(--space-6) 0 var(--space-4);
}

.c-page-header__inner {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}

.c-page-header__eyebrow {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-page-header__title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
}

.c-page-header__subtitle {
  font-size: var(--fs-card);
  color: var(--color-text-secondary);
}

.c-page-header__description {
  max-width: 64ch;
  margin: 0 auto;
  font-size: var(--fs-body);
  line-height: var(--lh-copy, 1.55);
  color: var(--color-text-secondary);
}

.c-page-header__slot {
  margin-top: var(--space-2);
}

.c-page-header--hostel .c-page-header__inner {
  max-width: 1100px;
  text-align: left;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .c-page-header--hostel .c-page-header__inner { padding-inline: var(--space-6); }
}

/* static/css/20-primitives/badge.css */
.c-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: 6px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}
.c-badge--positive { background: color-mix(in srgb, var(--color-signal-positive) 16%, transparent); color: var(--color-signal-positive); }
.c-badge--info     { background: color-mix(in srgb, var(--color-signal-info) 16%, transparent); color: var(--color-signal-info); }
.c-badge--danger   { background: color-mix(in srgb, var(--color-signal-danger) 16%, transparent); color: var(--color-signal-danger); }

/* static/css/20-primitives/button.css */
.c-button {
  --button-bg: var(--color-cta-primary);
  --button-fg: var(--color-cta-primary-text);
  --button-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--tap);
  padding: 0 var(--space-5);
  border-radius: var(--radius-control);
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-standard),
              filter var(--dur-micro) var(--ease-standard),
              background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard),
              box-shadow var(--dur-micro) var(--ease-standard);
  white-space: nowrap;
}

.c-button--primary {
  --button-bg: var(--color-cta-primary);
  --button-fg: var(--color-cta-primary-text);
}

.c-button--secondary {
  --button-bg: transparent;
  --button-fg: var(--color-text-primary);
  --button-border: var(--color-border-strong);
}

.c-button--ghost {
  --button-bg: transparent;
  --button-fg: var(--color-text-primary);
  --button-border: transparent;
  padding: 0 var(--space-3);
}

.c-button--danger {
  --button-bg: var(--color-signal-danger);
  --button-fg: #FFFFFF;
}

.c-button--link {
  --button-bg: transparent;
  --button-fg: var(--color-text-secondary);
  --button-border: transparent;
  height: auto;
  padding: 0;
}
.c-button--link:hover { text-decoration: underline; }

.c-button--block { width: 100%; }

@media (hover: hover) {
  .c-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
  .c-button--ghost:hover {
    background: color-mix(in srgb, var(--color-surface-muted) 60%, transparent);
  }
}

.c-button:active {
  transform: translateY(0) scale(0.98);
}

.c-button:disabled,
.c-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.c-button__label {
  display: inline-flex;
  align-items: center;
}

/* static/css/20-primitives/chip.css */
.c-chip {
  --chip-bg: transparent;
  --chip-fg: var(--color-text-secondary);
  --chip-border: var(--color-border-subtle);

  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard),
              border-color var(--dur-micro) var(--ease-standard);
}

.c-chip--neutral { /* uses defaults */ }

.c-chip--positive {
  --chip-fg: var(--color-signal-positive);
  --chip-border: transparent;
  --chip-bg: color-mix(in srgb, var(--color-signal-positive) 12%, transparent);
}
.c-chip--info {
  --chip-fg: var(--color-signal-info);
  --chip-border: transparent;
  --chip-bg: color-mix(in srgb, var(--color-signal-info) 14%, transparent);
}
.c-chip--danger {
  --chip-fg: var(--color-signal-danger);
  --chip-border: transparent;
  --chip-bg: color-mix(in srgb, var(--color-signal-danger) 12%, transparent);
}

.c-chip.is-selected,
.c-chip--positive.is-selected {
  background: var(--color-signal-positive);
  color: var(--color-cta-primary-text);
  border-color: transparent;
}
.c-chip--info.is-selected {
  background: var(--color-signal-info);
  color: var(--color-cta-primary-text);
  border-color: transparent;
}
.c-chip--danger.is-selected {
  background: var(--color-signal-danger);
  color: #FFFFFF;
  border-color: transparent;
}

button.c-chip,
a.c-chip {
  cursor: pointer;
  text-decoration: none;
}

@media (hover: hover) {
  button.c-chip:hover,
  a.c-chip:hover {
    border-color: var(--color-border-strong);
  }
}

.c-chip__trailing {
  font-size: var(--fs-tiny);
  opacity: 0.85;
}

/* static/css/20-primitives/icon.css */
.c-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  color: currentColor;
}

/* static/css/20-primitives/input.css */
.c-input {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.c-input__field {
  width: 100%;
  height: var(--tap);
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color var(--dur-micro) var(--ease-standard),
              box-shadow var(--dur-micro) var(--ease-standard);
}

.c-input__field::placeholder { color: var(--color-text-tertiary); }

.c-input--lg .c-input__field { height: 56px; font-size: var(--fs-card-lg); padding: 14px 18px; }

.c-input--has-leading .c-input__field { padding-left: 44px; }
.c-input--has-trailing .c-input__field { padding-right: 44px; }
.c-input--lg.c-input--has-leading .c-input__field { padding-left: 52px; }
.c-input--lg.c-input--has-trailing .c-input__field { padding-right: 52px; }

.c-input__leading,
.c-input__trailing {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
  display: inline-flex;
}
.c-input__leading { left: 14px; }
.c-input__trailing { right: 14px; }

.c-input__field:focus {
  border-color: var(--color-border-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-border-strong) 22%, transparent);
}

.c-input__field:disabled {
  background: var(--color-surface-muted);
  cursor: not-allowed;
  color: var(--color-text-tertiary);
}

/* static/css/20-primitives/pill.css */
.c-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
}
[data-theme="dark"] .c-pill,
[data-theme="auto"] .c-pill {
  background: color-mix(in srgb, var(--color-surface-muted) 80%, transparent);
}

/* static/css/20-primitives/skeleton.css */
.c-skeleton {
  display: block;
  background: var(--color-surface-muted);
  border-radius: var(--radius-control);
  position: relative;
  overflow: hidden;
}
.c-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, white 8%, transparent) 50%, transparent 100%);
  animation: c-skeleton-shimmer 1.5s linear infinite;
}
@keyframes c-skeleton-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .c-skeleton::after { animation: none; }
}

/* static/css/20-primitives/tooltip.css */
.c-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.c-tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: var(--space-2) var(--space-3);
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  border-radius: var(--radius-control);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-tooltip);
  transition: opacity var(--dur-micro) var(--ease-standard),
              transform var(--dur-micro) var(--ease-standard);
}

.c-tooltip:hover .c-tooltip__bubble,
.c-tooltip:focus-visible .c-tooltip__bubble,
.c-tooltip:focus-within .c-tooltip__bubble {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* static/css/30-components/autocomplete.css */
/* Autocomplete dropdown — preserves .ac-dropdown / .ac-item / .ac-type-* /
   .ac-subtitle / .ac-label class hooks used by filters.js. */

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-panel);
  max-height: 380px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  isolation: isolate;
  container-type: inline-size;
  display: none;
}
.ac-dropdown.open,
.ac-dropdown[data-open="true"] { display: block; }

.ac-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  background: var(--color-surface);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-subtle);
  text-align: left;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover,
.ac-item.selected,
.ac-item.active {
  background: var(--color-surface-muted);
}
.ac-item.selected,
.ac-item.active {
  color: var(--color-text-primary);
}

.ac-type {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.ac-label {
  min-width: 0;
  font-weight: var(--fw-medium);
  justify-self: start;
  text-align: left;
}
.ac-subtitle {
  margin-left: auto;
  font-size: var(--fs-meta);
  color: var(--color-text-tertiary);
  text-align: right;
}

.ac-type-property::before,
.ac-type-city::before,
.ac-type-country::before,
.ac-type-continent::before,
.ac-type-facility::before,
.ac-type-disambiguation::before,
.ac-type-text::before {
  display: inline-block;
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: 6px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  margin-right: var(--space-2);
}
.ac-type-property::before  { content: "Hostel"; }
.ac-type-city::before      { content: "City"; }
.ac-type-country::before   { content: "Country"; color: var(--color-signal-info); background: color-mix(in srgb, var(--color-signal-info) 14%, transparent); }
.ac-type-continent::before { content: "Region"; }
.ac-type-facility::before  { content: "Filter"; }
.ac-type-disambiguation::before { content: "Pick"; color: var(--color-signal-info); background: color-mix(in srgb, var(--color-signal-info) 14%, transparent); }
.ac-type-text::before      { content: "Search"; }

.ac-disambiguation {
  grid-template-columns: 88px minmax(0, 1fr) auto;
  grid-auto-rows: auto;
  cursor: default;
}

.ac-disamb-options {
  grid-column: 2 / 4;
  display: grid;
  gap: var(--space-2);
  width: 100%;
}

.ac-disamb-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
  padding: var(--space-2);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.ac-disamb-option:hover,
.ac-disamb-option:focus-visible {
  border-color: var(--color-border-strong);
  background: var(--color-surface-muted);
  outline: none;
}

.ac-disamb-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
}

.ac-disamb-label {
  min-width: 0;
  font-weight: var(--fw-medium);
}

.ac-disamb-subtitle {
  color: var(--color-text-tertiary);
  font-size: var(--fs-meta);
  text-align: right;
}

@container (max-width: 500px) {
  .ac-item {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: var(--space-2);
    row-gap: var(--space-1);
  }
  .ac-type { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .ac-disambiguation .ac-type { grid-row: 1; }
  .ac-label { grid-column: 2; }
  .ac-subtitle {
    grid-column: 2;
    margin-left: 0;
    text-align: left;
  }
  .ac-disamb-options { grid-column: 1 / -1; }
  .ac-disamb-option {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-2);
    row-gap: var(--space-1);
  }
  .ac-disamb-key { grid-column: 1; grid-row: 1 / span 2; }
  .ac-disamb-label { grid-column: 2; }
  .ac-disamb-subtitle { grid-column: 2; text-align: left; }
}

/* static/css/30-components/bedbug-pill.css */
/* Bed-bug warning pill — standalone warning link.
   JS upgrades it into the incident-log drawer; without JS it navigates to
   the canonical evidence page. */

.c-bedbug-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);

  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-signal-danger);

  background: color-mix(in oklab, var(--color-signal-danger) 10%, var(--color-surface));
  border: 1px solid color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
  border-radius: var(--radius-card);
  cursor: pointer;
  text-decoration: none;

  transition:
    background var(--dur-micro) var(--ease-standard),
    box-shadow var(--dur-micro) var(--ease-standard),
    transform var(--dur-micro) var(--ease-standard);
}

[data-theme="dark"] .c-bedbug-pill {
  background: color-mix(in oklab, var(--color-signal-danger) 18%, transparent);
  color: #FFE6E6;
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-danger) 35%, transparent),
    0 0 0 0 transparent;
}

.c-bedbug-pill:hover,
.c-bedbug-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 18%, var(--color-surface));
  box-shadow:
    0 14px 28px -8px color-mix(in oklab, var(--color-signal-danger) 45%, transparent),
    0 4px 10px -2px color-mix(in oklab, var(--color-signal-danger) 30%, transparent);
  outline: none;
}

[data-theme="dark"] .c-bedbug-pill:hover,
[data-theme="dark"] .c-bedbug-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 28%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-danger) 50%, transparent),
    0 18px 40px -10px color-mix(in oklab, var(--color-signal-danger) 55%, transparent),
    0 6px 14px -2px color-mix(in oklab, var(--color-signal-danger) 40%, transparent);
}

.c-bedbug-pill[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-danger) 22%, var(--color-surface));
  box-shadow:
    inset 0 -2px 0 var(--color-signal-danger),
    0 8px 26px color-mix(in oklab, var(--color-signal-danger) 38%, transparent);
}

[data-theme="dark"] .c-bedbug-pill[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-danger) 32%, transparent);
}

.c-bedbug-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-signal-danger);
}

[data-theme="dark"] .c-bedbug-pill__icon {
  color: #FF6B6B;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--color-signal-danger) 60%, transparent));
}

.c-bedbug-pill__label {
  flex-shrink: 0;
}

.c-bedbug-pill__sep {
  opacity: 0.5;
  font-weight: var(--fw-regular);
}

.c-bedbug-pill__count {
  flex: 1;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: none;
  color: inherit;
  opacity: 0.92;
}

.c-bedbug-pill__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  color: currentColor;
  opacity: 0.85;
  transition: transform var(--dur-micro) var(--ease-standard);
}

.c-bedbug-pill[aria-expanded="true"] .c-bedbug-pill__chevron {
  transform: rotate(180deg);
}

/* Prominent variant — full-width warning strip at bottom of a card.
   Border radius and side borders are dropped; the parent card's
   overflow:hidden clips corners. A top border acts as the divider. */
.c-bedbug-pill--prominent {
  min-height: 56px;
  padding: var(--space-4) var(--space-4);
  font-size: var(--fs-body);
  letter-spacing: 0.08em;
  border-radius: 0;
  border: none;
  border-top: 1px solid color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
}

[data-theme="dark"] .c-bedbug-pill--prominent {
  box-shadow: none;
  border-top: 1px solid color-mix(in oklab, var(--color-signal-danger) 45%, transparent);
}

.c-bedbug-pill--prominent .c-bedbug-pill__icon .c-icon {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .c-bedbug-pill,
  .c-bedbug-pill__chevron {
    transition: none;
  }
}

/* In-pair modifier — used inside .c-hazard-pair container */
.c-bedbug-pill--in-pair {
  border-radius: 0;
  border: none;
  min-height: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: var(--space-3) var(--space-4);
}

.c-bedbug-pill--in-pair .c-bedbug-pill__line1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-bedbug-pill--in-pair .c-bedbug-pill__line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-1);
}

[data-theme="dark"] .c-bedbug-pill--in-pair {
  box-shadow: none;
}

/* static/css/30-components/certainty-chip.css */
.c-certainty-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-tiny);
  color: var(--color-text-secondary);
  background: var(--color-surface-muted);
  white-space: nowrap;
  line-height: 1;
}

.c-certainty-chip__label {
  font-weight: var(--fw-medium);
}
.c-certainty-chip__count {
  opacity: 0.8;
}

.c-certainty-chip--certain,
.c-certainty-chip--confident {
  background: color-mix(in srgb, var(--color-signal-positive) 14%, transparent);
  color: var(--color-signal-positive);
}
.c-certainty-chip--low,
.c-certainty-chip--blind {
  background: color-mix(in srgb, var(--color-signal-info) 14%, transparent);
  color: var(--color-signal-info);
}

/* static/css/30-components/city-spotlights.css */
/* Shared city signal groups used by the root hub and geographic landing pages. */
.c-city-spotlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(var(--space-3), 1.8vw, var(--space-5));
  align-items: start;
}

.c-city-spotlight {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px solid color-mix(in srgb, var(--color-text-primary) 84%, var(--color-border-subtle));
}

.c-city-spotlight--other {
  border-top-color: color-mix(in srgb, var(--color-signal-info) 70%, var(--color-border-subtle));
}

@media (min-width: 980px) {
  .c-city-spotlights--three-plus-other .c-city-spotlight--other {
    grid-column: 1 / -1;
  }

  .c-city-spotlights--three-plus-other .c-city-spotlight--other .c-city-spotlight__list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }

  .c-city-spotlights--three-plus-other .c-city-spotlight--other .c-city-spotlight-hostel,
  .c-city-spotlights--three-plus-other .c-city-spotlight--other .c-city-spotlight-hostel__link {
    height: 100%;
  }
}

.c-city-spotlight__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.c-city-spotlight__name {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  color: var(--color-text-primary);
}

.c-city-spotlight__country {
  margin: 0;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-medium);
}

.c-city-spotlight__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-city-spotlight-hostel {
  min-width: 0;
}

.c-city-spotlight-hostel__link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(112px, 128px);
  min-height: 104px;
  min-width: 0;
  align-items: stretch;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  transition: transform var(--dur-panel) var(--ease-decel),
              border-color var(--dur-micro) var(--ease-standard),
              box-shadow var(--dur-panel) var(--ease-decel);
}

.c-city-spotlight-hostel__link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--tier, var(--color-border-strong)) 55%, var(--color-border-subtle));
  box-shadow: 0 16px 30px -24px color-mix(in srgb, var(--color-text-primary) 72%, transparent);
}

.c-city-spotlight-hostel__link:focus-visible {
  outline: 2px solid var(--color-signal-positive);
  outline-offset: 2px;
}

.c-city-spotlight-hostel__photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-surface-muted);
}

.c-city-spotlight-hostel__photo.is-noimg {
  background:
    radial-gradient(120% 120% at 70% 12%,
      color-mix(in srgb, var(--tier, var(--color-signal-positive)) 26%, var(--color-surface)) 0%,
      var(--color-surface-muted) 70%);
}

.c-city-spotlight-hostel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-panel) var(--ease-decel);
}

.c-city-spotlight-hostel__link:hover .c-city-spotlight-hostel__img {
  transform: scale(1.035);
}

.c-city-spotlight-hostel__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 12, 0.02) 0%, rgba(4, 7, 12, 0.22) 100%);
  pointer-events: none;
}

.c-city-spotlight-hostel__photo-fallback {
  color: color-mix(in srgb, var(--tier, var(--color-signal-positive)) 70%, var(--color-text-secondary));
  opacity: 0;
}

.c-city-spotlight-hostel__photo.is-noimg .c-city-spotlight-hostel__photo-fallback {
  opacity: 0.85;
}

.c-city-spotlight-hostel__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: var(--space-2) var(--space-1) var(--space-2) var(--space-2);
}

.c-city-spotlight-hostel__metrics {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  min-width: 0;
  padding: var(--space-2) var(--space-2) var(--space-2) 0;
  text-align: right;
}

.c-city-spotlight-hostel__scoreline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}

.c-city-spotlight-hostel__tier {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 64px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: var(--fw-semibold);
  text-transform: none;
  letter-spacing: 0;
  line-height: var(--lh-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tier, var(--color-text-secondary));
}

.c-city-spotlight-hostel__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  color: var(--color-text-primary);
}

.c-city-spotlight-hostel__loc,
.c-city-spotlight-hostel__tagline,
.c-city-spotlight-hostel__count {
  display: block;
  overflow: hidden;
  font-size: var(--fs-tiny);
  line-height: var(--lh-snug);
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
}

.c-city-spotlight-hostel__tagline {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: normal;
  color: var(--color-text-tertiary);
}

.c-city-spotlight-hostel__count {
  font-family: var(--font-mono);
  color: var(--color-text-tertiary);
}

.c-city-spotlight-hostel__score {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  min-width: 42px;
  padding: 4px 6px;
  font-family: var(--font-mono);
  color: #fff;
  background: color-mix(in srgb, var(--tier, var(--color-signal-positive)) 88%, #000 12%);
  border-radius: var(--radius-pill);
}

.c-city-spotlight-hostel__score b {
  font-size: 0.88rem;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.c-city-spotlight-hostel__score i {
  font-style: normal;
  font-size: 0.62rem;
  opacity: 0.85;
}

.c-city-spotlight__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  max-width: 100%;
  min-height: var(--tap);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  color: var(--color-text-secondary);
  transition: color var(--dur-micro) var(--ease-standard),
              gap var(--dur-micro) var(--ease-standard);
}

.c-city-spotlight__cta:hover {
  gap: var(--space-2);
  color: var(--color-text-primary);
}

.c-city-spotlight__cta:focus-visible {
  outline: 2px solid var(--color-signal-positive);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

@media (max-width: 900px) {
  .c-city-spotlights {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--space-6);
  }
}

@media (max-width: 620px) {
  .c-city-spotlights {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  .c-city-spotlight-hostel__link {
    grid-template-columns: 58px minmax(0, 1fr) minmax(104px, 116px);
    min-height: 104px;
  }

  .c-city-spotlight-hostel__metrics {
    gap: 4px;
    padding-right: var(--space-1);
  }

  .c-city-spotlight-hostel__scoreline {
    gap: 4px;
  }

  .c-city-spotlight-hostel__tier {
    max-width: 62px;
    font-size: 0.58rem;
  }

  .c-city-spotlight-hostel__score {
    min-width: 38px;
  }

  .c-city-spotlight-hostel__name {
    font-size: 0.92rem;
  }

  .c-city-spotlight-hostel__tagline {
    font-size: 0.68rem;
  }
}

@media (max-width: 380px) {
  .c-city-spotlight-hostel__link {
    grid-template-columns: 54px minmax(0, 1fr) minmax(100px, 112px);
  }

  .c-city-spotlight-hostel__tier {
    max-width: 58px;
    font-size: 0.55rem;
  }

  .c-city-spotlight-hostel__score {
    padding-inline: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-city-spotlight-hostel__link,
  .c-city-spotlight-hostel__img,
  .c-city-spotlight__cta {
    transition: none;
  }

  .c-city-spotlight-hostel__link:hover,
  .c-city-spotlight-hostel__link:hover .c-city-spotlight-hostel__img {
    transform: none;
  }
}

/* static/css/30-components/detected-warnings.css */
/* Detected warnings tray
   Shared attached footer band for bedbug + sus warning buttons.
   The tray owns the full-width attachment and split layout; the buttons
   keep their existing interaction and overlay behavior. */

/* Hand-drawn sketch frames (9-slice border-image, sharp corners). Colors are
   baked into the SVG because data URIs cannot resolve CSS custom properties;
   they mirror --color-signal-danger / --color-signal-sus dark-theme values,
   which the attached band uses in both themes. */
:root {
  --sketch-frame-danger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23FD323E' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 237.5 95 L 234 155 L 200 158 L 150 153.5 L 95 157.5 L 45 153.5 L 5 155 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-sus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23E2B042' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 237.5 95 L 234 155 L 200 158 L 150 153.5 L 95 157.5 L 45 153.5 L 5 155 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  /* Corner variants: the attached tray sits on the parent panel's rounded
     bottom corners (hero panel / property card, --radius-card). border-image
     ignores border-radius, so rounded corners are baked into these frames.
     The 22px display radius needs a 44-unit arc, hence the 48-unit slice. */
  --sketch-frame-danger-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23FD323E' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 237.5 95 L 234 155 L 200 158 L 150 153.5 L 95 157.5 L 49 155.8 Q 5 155 5.8 111 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-sus-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23E2B042' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 237.5 95 L 234 155 L 200 158 L 150 153.5 L 95 157.5 L 49 155.8 Q 5 155 5.8 111 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-danger-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23FD323E' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 236.5 95 L 234.6 111 Q 235 155 191 155.8 L 150 153.5 L 150 153.5 L 95 157.5 L 45 153.5 L 5 155 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-sus-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23E2B042' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 236.5 95 L 234.6 111 Q 235 155 191 155.8 L 150 153.5 L 150 153.5 L 95 157.5 L 45 153.5 L 5 155 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-danger-blbr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23FD323E' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 236.5 95 L 234.6 111 Q 235 155 191 155.8 L 150 153.5 L 150 153.5 L 95 157.5 L 49 155.8 Q 5 155 5.8 111 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
  --sketch-frame-sus-blbr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cpath fill='none' stroke='%23E2B042' stroke-width='5.5' d='M 20 7 L 55 3.5 L 95 6.5 L 140 3 L 200 6.5 L 235 5 L 232.5 45 L 236.5 95 L 234.6 111 Q 235 155 191 155.8 L 150 153.5 L 150 153.5 L 95 157.5 L 49 155.8 Q 5 155 5.8 111 L 7.5 110 L 3 60 L 5 5 L 20 7'/%3E%3C/svg%3E");
}

.c-detected-warnings {
  display: grid;
  width: 100%;
}

.c-detected-warnings--count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.c-detected-warnings--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-border-subtle);
}

.c-detected-warnings__item {
  position: relative;
  min-width: 0;
  display: flex;
}

.c-detected-warnings__item > .c-bedbug-pill,
.c-detected-warnings__item > .c-sus-pill {
  width: 100%;
}

.c-detected-warnings__anchor {
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  overflow: hidden;
}

.c-detected-warnings--attached {
  overflow: hidden;
}

.c-detected-warnings--count-1 .c-bedbug-pill,
.c-detected-warnings--count-1 .c-sus-pill {
  min-height: 56px;
  padding: var(--space-4);
  font-size: var(--fs-body);
  letter-spacing: 0.08em;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.c-detected-warnings--count-1 .c-bedbug-pill {
  border-top: 1px solid color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
}

.c-detected-warnings--count-1 .c-sus-pill {
  border-top: 1px solid color-mix(in oklab, var(--color-signal-sus) 35%, var(--color-border-subtle));
}

[data-theme="dark"] .c-detected-warnings--count-1 .c-bedbug-pill {
  border-top-color: color-mix(in oklab, var(--color-signal-danger) 45%, transparent);
}

[data-theme="dark"] .c-detected-warnings--count-1 .c-sus-pill {
  border-top-color: color-mix(in oklab, var(--color-signal-sus) 45%, transparent);
}

.c-detected-warnings--count-1 .c-bedbug-pill__icon .c-icon,
.c-detected-warnings--count-1 .c-sus-pill__icon .c-icon {
  width: 20px;
  height: 20px;
}

.c-detected-warnings--attached .c-bedbug-pill:hover,
.c-detected-warnings--attached .c-bedbug-pill:focus-visible,
.c-detected-warnings--attached .c-bedbug-pill[aria-expanded="true"],
.c-detected-warnings--attached .c-sus-pill:hover,
.c-detected-warnings--attached .c-sus-pill:focus-visible,
.c-detected-warnings--attached .c-sus-pill[aria-expanded="true"] {
  box-shadow: none;
}

.c-detected-warnings--count-2 .c-detected-warnings__item--sus {
  border-left: 1px solid color-mix(in oklab, var(--color-signal-sus) 35%, var(--color-border-subtle));
}

[data-theme="dark"] .c-detected-warnings--count-2 .c-detected-warnings__item--sus {
  border-left-color: color-mix(in oklab, var(--color-signal-sus) 45%, transparent);
}

.c-detected-warnings--count-2 .c-bedbug-pill,
.c-detected-warnings--count-2 .c-sus-pill {
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.c-detected-warnings--count-2 .c-bedbug-pill__line1,
.c-detected-warnings--count-2 .c-sus-pill__line1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-detected-warnings--count-2 .c-bedbug-pill__line2,
.c-detected-warnings--count-2 .c-sus-pill__line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-1);
}

@media (max-width: 480px) {
  .c-detected-warnings--count-2 .c-bedbug-pill,
  .c-detected-warnings--count-2 .c-sus-pill {
    padding: var(--space-2) var(--space-3);
  }

  .c-detected-warnings--count-2 .c-bedbug-pill__line1,
  .c-detected-warnings--count-2 .c-sus-pill__line1 {
    gap: var(--space-1);
  }

  .c-detected-warnings--count-2 .c-bedbug-pill__icon .c-icon,
  .c-detected-warnings--count-2 .c-sus-pill__icon .c-icon {
    width: 14px;
    height: 14px;
  }

  .c-detected-warnings--count-2 .c-bedbug-pill__label,
  .c-detected-warnings--count-2 .c-sus-pill__label,
  .c-detected-warnings--count-2 .c-bedbug-pill__count,
  .c-detected-warnings--count-2 .c-sus-pill__count {
    font-size: var(--fs-tiny);
  }
}

/* Attached alarm bars
   The tray only positions warning panels. The warning button itself owns the
   visible danger surface and border. */
.c-detected-warnings--attached {
  gap: var(--space-2);
  padding: var(--space-2);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.c-detected-warnings--attached.c-detected-warnings--count-2 {
  border-top: 0;
}

.c-detected-warnings--attached .c-detected-warnings__item--sus {
  border-left: 0;
}

/* Doubled tray class keeps the sketch frame winning over later count-N
   "border: none" resets (the border shorthand clears border-image too). */
.c-detected-warnings.c-detected-warnings--attached .c-bedbug-pill,
.c-detected-warnings.c-detected-warnings--attached .c-sus-pill {
  min-height: 76px;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: 0;
  border: 2px solid transparent;
  border-image-slice: 48;
  border-image-width: 24px;
  border-image-repeat: stretch;
  color: rgb(252, 252, 253);
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.95);
}

.c-detected-warnings.c-detected-warnings--attached .c-bedbug-pill {
  border-image-source: var(--sketch-frame-danger);
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-danger) 56%, rgba(9, 10, 16, 0.72)) 0%,
      color-mix(in oklab, var(--color-signal-danger) 40%, rgba(4, 6, 12, 0.78)) 100%
    );
}

.c-detected-warnings.c-detected-warnings--attached .c-sus-pill {
  border-image-source: var(--sketch-frame-sus);
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-sus) 58%, rgba(9, 10, 16, 0.78)) 0%,
      color-mix(in oklab, var(--color-signal-sus) 42%, rgba(4, 6, 12, 0.82)) 100%
    );
}

[data-theme="dark"] .c-detected-warnings--attached .c-bedbug-pill,
[data-theme="dark"] .c-detected-warnings--attached .c-sus-pill {
  color: rgb(252, 252, 253);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .c-detected-warnings--attached .c-bedbug-pill {
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-danger) 56%, rgba(9, 10, 16, 0.72)) 0%,
      color-mix(in oklab, var(--color-signal-danger) 40%, rgba(4, 6, 12, 0.78)) 100%
    );
}

[data-theme="dark"] .c-detected-warnings--attached .c-sus-pill {
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-sus) 58%, rgba(9, 10, 16, 0.78)) 0%,
      color-mix(in oklab, var(--color-signal-sus) 42%, rgba(4, 6, 12, 0.82)) 100%
    );
}

.c-detected-warnings--attached .c-bedbug-pill::before,
.c-detected-warnings--attached .c-sus-pill::before {
  display: none;
}

.c-detected-warnings--attached .c-bedbug-pill__icon {
  color: #ffefef;
  filter: drop-shadow(0 0 8px color-mix(in oklab, var(--color-signal-danger) 78%, transparent));
}

.c-detected-warnings--attached .c-sus-pill__icon {
  color: #fff2ad;
  filter: drop-shadow(0 0 8px color-mix(in oklab, var(--color-signal-sus) 78%, transparent));
}

.c-detected-warnings--attached .c-bedbug-pill__label,
.c-detected-warnings--attached .c-sus-pill__label {
  min-width: 0;
  color: rgb(255, 255, 255);
  font-size: var(--fs-body);
  letter-spacing: 0.02em;
}

.c-detected-warnings--attached .c-bedbug-pill__count,
.c-detected-warnings--attached .c-sus-pill__count {
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
  font-size: var(--fs-meta);
  letter-spacing: 0;
}

.c-detected-warnings--attached .c-bedbug-pill__sep,
.c-detected-warnings--attached .c-sus-pill__sep {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.c-detected-warnings--attached .c-bedbug-pill__chevron,
.c-detected-warnings--attached .c-sus-pill__chevron {
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
}

.c-detected-warnings--attached .c-bedbug-pill:hover,
.c-detected-warnings--attached .c-bedbug-pill:focus-visible,
.c-detected-warnings--attached .c-bedbug-pill[aria-expanded="true"],
[data-theme="dark"] .c-detected-warnings--attached .c-bedbug-pill:hover,
[data-theme="dark"] .c-detected-warnings--attached .c-bedbug-pill:focus-visible,
[data-theme="dark"] .c-detected-warnings--attached .c-bedbug-pill[aria-expanded="true"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-danger) 66%, rgba(9, 10, 16, 0.78)) 0%,
      color-mix(in oklab, var(--color-signal-danger) 48%, rgba(4, 6, 12, 0.84)) 100%
    );
  box-shadow: 0 18px 34px -12px rgba(0, 0, 0, 0.96);
}

.c-detected-warnings--attached .c-sus-pill:hover,
.c-detected-warnings--attached .c-sus-pill:focus-visible,
.c-detected-warnings--attached .c-sus-pill[aria-expanded="true"],
[data-theme="dark"] .c-detected-warnings--attached .c-sus-pill:hover,
[data-theme="dark"] .c-detected-warnings--attached .c-sus-pill:focus-visible,
[data-theme="dark"] .c-detected-warnings--attached .c-sus-pill[aria-expanded="true"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-sus) 68%, rgba(9, 10, 16, 0.82)) 0%,
      color-mix(in oklab, var(--color-signal-sus) 50%, rgba(4, 6, 12, 0.86)) 100%
    );
  box-shadow: 0 18px 34px -12px rgba(0, 0, 0, 0.96);
}

@media (max-width: 767.98px) {
  .c-detected-warnings--attached.c-detected-warnings--count-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.c-detected-warnings--count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.c-detected-warnings__item > .c-safety-pill {
  width: 100%;
}

.c-detected-warnings--count-1 .c-safety-pill {
  min-height: 56px;
  padding: var(--space-4);
  font-size: var(--fs-body);
  letter-spacing: 0.08em;
  border-radius: 0;
  border: none;
  border-top: 1px solid color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
  box-shadow: none;
}

.c-detected-warnings--count-2 .c-safety-pill,
.c-detected-warnings--count-3 .c-bedbug-pill,
.c-detected-warnings--count-3 .c-sus-pill,
.c-detected-warnings--count-3 .c-safety-pill {
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.c-detected-warnings--count-2 .c-safety-pill__line1,
.c-detected-warnings--count-3 .c-bedbug-pill__line1,
.c-detected-warnings--count-3 .c-sus-pill__line1,
.c-detected-warnings--count-3 .c-safety-pill__line1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-detected-warnings--count-2 .c-safety-pill__line2,
.c-detected-warnings--count-3 .c-bedbug-pill__line2,
.c-detected-warnings--count-3 .c-sus-pill__line2,
.c-detected-warnings--count-3 .c-safety-pill__line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-1);
}

.c-detected-warnings.c-detected-warnings--attached .c-safety-pill {
  min-height: 76px;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: 0;
  border: 2px solid transparent;
  border-image-source: var(--sketch-frame-danger);
  border-image-slice: 48;
  border-image-width: 24px;
  border-image-repeat: stretch;
  color: rgb(252, 252, 253);
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.95);
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-danger) 56%, rgba(9, 10, 16, 0.72)) 0%,
      color-mix(in oklab, var(--color-signal-danger) 40%, rgba(4, 6, 12, 0.78)) 100%
    );
}

.c-detected-warnings--attached .c-safety-pill__icon {
  color: #ffefef;
  filter: drop-shadow(0 0 8px color-mix(in oklab, var(--color-signal-danger) 78%, transparent));
}

.c-detected-warnings--attached .c-safety-pill__label {
  min-width: 0;
  color: rgb(255, 255, 255);
  font-size: var(--fs-body);
  letter-spacing: 0.02em;
}

.c-detected-warnings--attached .c-safety-pill__count {
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
  font-size: var(--fs-meta);
  letter-spacing: 0;
}

.c-detected-warnings--attached .c-safety-pill__sep {
  color: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.c-detected-warnings--attached .c-safety-pill__chevron {
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
}

.c-detected-warnings--attached .c-safety-pill:hover,
.c-detected-warnings--attached .c-safety-pill:focus-visible,
[data-theme="dark"] .c-detected-warnings--attached .c-safety-pill:hover,
[data-theme="dark"] .c-detected-warnings--attached .c-safety-pill:focus-visible {
  background:
    linear-gradient(
      135deg,
      color-mix(in oklab, var(--color-signal-danger) 66%, rgba(9, 10, 16, 0.78)) 0%,
      color-mix(in oklab, var(--color-signal-danger) 48%, rgba(4, 6, 12, 0.84)) 100%
    );
  box-shadow: 0 18px 34px -12px rgba(0, 0, 0, 0.96);
}


/* Rounded sketch corners on the tray edges that meet the parent panel's
   rounded bottom corners. First/last items only; count-1 rounds both. */
.c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:first-child:not(:last-child) .c-bedbug-pill {
  border-image-source: var(--sketch-frame-danger-bl);
}

.c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:first-child:not(:last-child) .c-sus-pill {
  border-image-source: var(--sketch-frame-sus-bl);
}

.c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:last-child:not(:first-child) .c-safety-pill {
  border-image-source: var(--sketch-frame-danger-br);
}

.c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:last-child:not(:first-child) .c-sus-pill {
  border-image-source: var(--sketch-frame-sus-br);
}

.c-detected-warnings.c-detected-warnings--attached.c-detected-warnings--count-1 .c-bedbug-pill,
.c-detected-warnings.c-detected-warnings--attached.c-detected-warnings--count-1 .c-safety-pill {
  border-image-source: var(--sketch-frame-danger-blbr);
}

.c-detected-warnings.c-detected-warnings--attached.c-detected-warnings--count-1 .c-sus-pill {
  border-image-source: var(--sketch-frame-sus-blbr);
}

@media (max-width: 767.98px) {
  /* Stacked tray: only the last pill touches the panel's bottom corners. */
  .c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:first-child:not(:last-child) .c-bedbug-pill {
    border-image-source: var(--sketch-frame-danger);
  }

  .c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:first-child:not(:last-child) .c-sus-pill {
    border-image-source: var(--sketch-frame-sus);
  }

  .c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:last-child:not(:first-child) .c-safety-pill,
  .c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:last-child:not(:first-child) .c-bedbug-pill {
    border-image-source: var(--sketch-frame-danger-blbr);
  }

  .c-detected-warnings.c-detected-warnings--attached .c-detected-warnings__item:last-child:not(:first-child) .c-sus-pill {
    border-image-source: var(--sketch-frame-sus-blbr);
  }
}

@media (max-width: 767.98px) {
  .c-detected-warnings--attached.c-detected-warnings--count-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* static/css/30-components/empty-state.css */
.c-empty-state,
.c-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  max-width: 480px;
  margin-inline: auto;
  padding: var(--space-8) var(--space-4);
}

.c-empty-state__icon,
.c-error-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
}

.c-empty-state__title,
.c-error-state__title {
  font-size: var(--fs-section);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
}

.c-empty-state__body,
.c-error-state__body {
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

.c-error-state__icon { color: var(--color-signal-danger); background: color-mix(in srgb, var(--color-signal-danger) 12%, transparent); }

/* static/css/30-components/filter-bar.css */
/* Filter chips bar — preserves .chip / .chip-x / .chip-type / .chip--*
   class hooks used by filters.js. */

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-primary);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard),
              border-color var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}

.chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-tertiary);
  margin-left: var(--space-1);
  cursor: pointer;
  text-decoration: none;
}
.chip-x:hover { color: var(--color-signal-danger); }

@media (hover: hover) {
  .chip:hover { border-color: var(--color-border-strong); }
}

.chip.selected,
.chip--positive.selected {
  background: var(--color-cta-primary);
  color: var(--color-cta-primary-text);
  border-color: transparent;
}

.chip--positive {
  color: var(--color-signal-positive);
  border-color: color-mix(in srgb, var(--color-signal-positive) 30%, transparent);
  background: color-mix(in srgb, var(--color-signal-positive) 10%, transparent);
}
.chip--info {
  color: var(--color-signal-info);
  border-color: color-mix(in srgb, var(--color-signal-info) 30%, transparent);
  background: color-mix(in srgb, var(--color-signal-info) 10%, transparent);
}
.chip--danger {
  color: var(--color-signal-danger);
  border-color: color-mix(in srgb, var(--color-signal-danger) 30%, transparent);
  background: color-mix(in srgb, var(--color-signal-danger) 10%, transparent);
}

.chip-type {
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* Lang filter dropdown — preserves .lang-filter-* hooks used by filters.js. */
.lang-filter-wrap { position: relative; }

.lang-filter-toggle {
  /* styled by c-button; this layer only owns responsive label behavior */
  position: relative;
  min-width: 112px;
}

.lang-filter-toggle-short { display: none; }

@media (max-width: 520px) {
  .lang-filter-toggle {
    min-width: 88px;
    padding-inline: var(--space-3);
  }
  .lang-filter-toggle-full { display: none; }
  .lang-filter-toggle-short { display: inline-flex; }
}

.lang-filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 280px;
  max-width: 360px;
  width: max-content;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-panel);
  z-index: var(--z-dropdown);
  display: none;
  padding: var(--space-2);
}

@media (max-width: 520px) {
  .lang-filter-dropdown {
    left: 50%;
    right: auto;
    width: min(360px, calc(100vw - 32px));
    min-width: 0;
    transform: translateX(-50%);
  }
}
.lang-filter-dropdown.open,
.lang-filter-dropdown[data-open="true"] { display: block; }

.lang-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.lang-filter-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: var(--fs-body);
  color: var(--color-text-primary);
}
.lang-filter-item:hover { background: var(--color-surface-muted); }
.lang-filter-item.selected { background: var(--color-surface-muted); font-weight: var(--fw-medium); }

.lang-filter-flag { font-size: 1em; }
.lang-filter-name { flex: 1; }
.lang-filter-action,
.lang-filter-action-positive,
.lang-filter-action-negative,
.lang-filter-action-up,
.lang-filter-action-down,
.lang-filter-action-hot {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  padding: 2px var(--space-2);
  border: 1px solid transparent;
  border-radius: 6px;
  text-transform: uppercase;
}
.lang-filter-action-positive {
  color: var(--color-signal-positive);
  background: color-mix(in srgb, var(--color-signal-positive) 14%, transparent);
}
.lang-filter-action-up {
  color: var(--color-signal-positive);
  background: color-mix(in srgb, var(--color-signal-positive) 14%, transparent);
}
.lang-filter-action-negative,
.lang-filter-action-down {
  color: var(--color-signal-danger);
  background: color-mix(in srgb, var(--color-signal-danger) 12%, transparent);
}
.lang-filter-action-hot {
  color: var(--color-tier-goated);
  background: color-mix(in srgb, var(--color-tier-goated) 14%, transparent);
}
.lang-filter-action.active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}
.lang-filter-empty {
  padding: var(--space-3);
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--fs-meta);
}

/* static/css/30-components/incident-log.css */
/* Incident-log iOS-style bottom sheet — slides up from bottom,
   overlays hostel page with dimmed backdrop. Click backdrop to close. */

/* Overlay/backdrop */
.c-incident-log-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-sheet);
  opacity: 0;
  transition: opacity var(--dur-panel) var(--ease-decel);
  pointer-events: none;
}

.c-incident-log-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.c-incident-log-overlay[hidden] {
  display: none !important;
}

/* Bottom sheet panel */
.c-incident-log {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-panel);
  transform: translateY(100%);
  transition: transform var(--dur-panel) var(--ease-decel);
  z-index: calc(var(--z-sheet) + 1);
}

.c-incident-log.is-visible {
  transform: translateY(0);
}

[data-theme="dark"] .c-incident-log {
  background:
    radial-gradient(circle at 0% 100%, color-mix(in oklab, var(--color-signal-danger) 8%, transparent), transparent 40%),
    linear-gradient(160deg, #0a111b 0%, #050a11 100%);
  border-top: 1px solid color-mix(in oklab, var(--color-signal-danger) 45%, rgba(160, 180, 205, 0.30));
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.55),
    0 0 32px color-mix(in oklab, var(--color-signal-danger) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: reduce) {
  .c-incident-log-overlay,
  .c-incident-log {
    transition: none !important;
  }
  .c-incident-log.is-visible {
    transform: none;
  }
}

/* Drag-handle decoration (visual only) */
.c-incident-log__handle {
  width: 36px;
  height: 4px;
  margin: -8px auto var(--space-3);
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-text-tertiary));
  opacity: 0.55;
  cursor: grab;
}

.c-incident-log__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.c-incident-log__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.c-incident-log__title::before {
  content: "■ ";
  color: var(--color-signal-danger);
  letter-spacing: 0.1em;
}

.c-incident-log__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    background var(--dur-micro) var(--ease-standard),
    border-color var(--dur-micro) var(--ease-standard),
    color var(--dur-micro) var(--ease-standard);
}

.c-incident-log__close:hover,
.c-incident-log__close:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 12%, transparent);
  border-color: var(--color-signal-danger);
  color: var(--color-signal-danger);
  outline: none;
}

/* Filter strip */
.c-incident-log__filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-tiny);
  color: var(--color-text-tertiary);
}

.c-incident-log__filter-label {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.c-incident-log__filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--color-signal-danger);
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-signal-danger) 12%, transparent);
  color: var(--color-signal-danger);
  font-family: var(--font-display);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] .c-incident-log__filter-chip {
  color: #FFB8B8;
  background: color-mix(in oklab, var(--color-signal-danger) 22%, transparent);
}

/* Summary */
.c-incident-log__summary {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}

/* Empty state */
.c-incident-log__empty {
  margin: 0;
  padding: var(--space-4);
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-control);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
  text-align: center;
}

/* Incident rows */
.c-incident-log__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.c-incident-log__list--safety-dense {
  gap: 0;
}

.c-incident-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.c-incident-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-3);
  bottom: var(--space-3);
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-signal-danger);
  opacity: 0.85;
}

.c-incident-row:has(.c-incident-row__severity--possible)::before {
  opacity: 0.35;
}

.c-incident-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--fs-tiny);
}

.c-incident-row__severity {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c-incident-row__severity--confirmed {
  color: var(--color-signal-danger);
}

.c-incident-row__severity--possible {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .c-incident-row__severity--confirmed {
  color: #FF6B6B;
}

.c-incident-row__source {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
}

.c-incident-row__source::before {
  content: "[";
  margin-right: 1px;
}
.c-incident-row__source::after {
  content: "]";
  margin-left: 1px;
}

.c-incident-row__time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-tertiary);
}

.c-incident-row__body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
}

.c-incident-row__body p {
  margin: 0;
}

.c-incident-row__translation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  color: var(--color-text-tertiary);
}

.c-incident-row__translation-state {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-incident-row__translation-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition:
    background var(--dur-micro) var(--ease-standard),
    border-color var(--dur-micro) var(--ease-standard),
    color var(--dur-micro) var(--ease-standard);
}

.c-incident-row__translation-toggle:hover,
.c-incident-row__translation-toggle:focus-visible {
  background: color-mix(in oklab, var(--color-signal-info) 14%, transparent);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  outline: none;
}

.c-incident-row__variant[hidden] {
  display: none !important;
}

/* A compact detector trace: the reason stays scannable while the exact source
   phrase remains visibly connected to its place in the full review. */
.c-sus-trace {
  margin-bottom: var(--space-3);
  padding: 10px var(--space-3);
  border-left: 3px solid var(--color-signal-sus);
  background: color-mix(in oklab, var(--color-signal-sus) 9%, transparent);
}

.c-sus-trace__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
}

.c-sus-trace__eyebrow {
  color: var(--color-signal-sus);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c-sus-trace__source {
  color: var(--color-text-tertiary);
}

.c-sus-trace__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-sus-trace__item {
  display: grid;
  gap: 2px;
}

.c-sus-trace__reason {
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
}

.c-sus-trace__quote {
  color: var(--color-text-primary);
  font-size: var(--fs-meta);
  line-height: var(--lh-body);
}

.c-incident-row__match {
  padding: 0 0.08em;
  border-bottom: 1px solid var(--color-signal-sus);
  background: transparent;
  box-shadow: inset 0 -0.42em color-mix(in oklab, var(--color-signal-sus) 24%, transparent);
  color: inherit;
}

[data-theme="dark"] .c-sus-trace {
  background: color-mix(in oklab, var(--color-signal-sus) 13%, transparent);
}

[data-theme="dark"] .c-incident-row__match {
  box-shadow: inset 0 -0.42em color-mix(in oklab, var(--color-signal-sus) 34%, transparent);
}

/* Sus overlay accent */
.c-incident-log-overlay--sus .c-incident-log__handle {
  background: color-mix(in oklab, var(--color-signal-positive) 40%, var(--color-text-tertiary));
}

.c-incident-log__filter-chip--sus {
  border-color: var(--color-signal-positive);
  background: color-mix(in oklab, var(--color-signal-positive) 12%, transparent);
  color: var(--color-signal-positive);
}

[data-theme="dark"] .c-incident-log__filter-chip--sus {
  color: #b8ffd8;
  background: color-mix(in oklab, var(--color-signal-positive) 22%, transparent);
}

/* Loading scaffold */
.c-incident-log__loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  animation: incident-spinner-fade-in var(--dur-micro) var(--ease-decel) 240ms forwards;
}

@keyframes incident-spinner-fade-in {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .c-incident-log__loading {
    animation: none;
    opacity: 1;
  }
}

/* Spinner ring */
.c-loading-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: currentColor;
  animation: incident-spin 700ms linear infinite;
  flex-shrink: 0;
}

@keyframes incident-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .c-loading-spinner {
    animation: none;
    opacity: 0.5;
  }
}

.c-loading-spinner--danger { color: var(--color-signal-danger); }
.c-loading-spinner--warn   { color: var(--color-signal-positive); }

.c-loading-text {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}

/* Clickable empty/error state */
.c-incident-log__empty--clickable {
  cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}

.c-incident-log__empty--clickable:hover,
.c-incident-log__empty--clickable:focus-visible {
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  outline: none;
}

/* Footer */
.c-incident-log__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
  font-size: var(--fs-meta);
}

.c-incident-log__foot-prompt {
  color: var(--color-text-secondary);
}

.c-incident-log__foot-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--color-signal-danger);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-signal-danger);
  font-family: var(--font-display);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background var(--dur-micro) var(--ease-standard),
    box-shadow var(--dur-micro) var(--ease-standard);
}

.c-incident-log__foot-link:hover,
.c-incident-log__foot-link:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 14%, transparent);
  box-shadow: 0 4px 16px color-mix(in oklab, var(--color-signal-danger) 30%, transparent);
  outline: none;
}

[data-theme="dark"] .c-incident-log__foot-link {
  color: #FFB8B8;
}

/* static/css/30-components/language-divergence.css */
.c-lang-divergence {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.c-lang-divergence__row {
  display: grid;
  grid-template-columns: minmax(64px, auto) 1fr minmax(72px, auto);
  gap: var(--space-2);
  align-items: center;
  font-size: 12px;
  line-height: 1;
}

.c-lang-divergence__name {
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-lang-divergence__bar {
  position: relative;
  height: 6px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
}

.c-lang-divergence__center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--color-border-strong);
  transform: translateX(-50%);
}

.c-lang-divergence__mark {
  position: absolute;
  left: calc(50% + var(--offset, 0%));
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-text-tertiary);
}

.c-lang-divergence__bar[data-direction="pos"] .c-lang-divergence__mark {
  background: var(--color-signal-positive);
}

.c-lang-divergence__bar[data-direction="neg"] .c-lang-divergence__mark {
  background: var(--color-signal-danger);
}

.c-lang-divergence__label {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  text-align: right;
  white-space: nowrap;
}

/* static/css/30-components/language-stack.css */
.c-lang-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.c-lang-stack__bar {
  display: flex;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  overflow: hidden;
}

.c-lang-stack--thick .c-lang-stack__bar { height: 10px; }

.c-lang-stack__seg {
  display: block;
  height: 100%;
  background: var(--lang-color);
  transition: filter var(--dur-micro) var(--ease-standard);
}
.c-lang-stack__seg:hover { filter: brightness(1.1); }

.c-lang-stack__legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}

.c-lang-stack__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.c-lang-stack__swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lang-color);
}

.c-lang-stack__legend-label {
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
}
.c-lang-stack__legend-pct {
  color: var(--color-text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* static/css/30-components/language-switcher.css */
.c-language-switcher {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.c-language-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 36px;
  min-width: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--color-text-secondary);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}

.c-language-switcher__trigger::marker,
.c-language-switcher__trigger::-webkit-details-marker {
  display: none;
  content: "";
}

.c-language-switcher__trigger:hover,
.c-language-switcher[open] .c-language-switcher__trigger {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.c-language-switcher__trigger:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

.c-language-switcher__code,
.c-language-switcher__option-code {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
}

.c-language-switcher__caret {
  display: inline-flex;
  transition: transform var(--dur-micro) var(--ease-standard);
}

.c-language-switcher[open] .c-language-switcher__caret {
  transform: rotate(180deg);
}

.c-language-switcher__panel {
  position: absolute;
  z-index: var(--z-dropdown);
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-panel);
  animation: hp-language-panel-in var(--dur-panel) var(--ease-decel);
}

.c-language-switcher__link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-2);
  border-left: 2px solid transparent;
  border-radius: var(--radius-control);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}

.c-language-switcher__link:hover,
.c-language-switcher__link:focus-visible {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.c-language-switcher__link:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

.c-language-switcher__link.is-active {
  border-left-color: var(--color-border-strong);
  color: var(--color-text-primary);
}

.c-language-switcher__mark {
  display: inline-flex;
  color: var(--color-border-strong);
}

.c-language-switcher__native {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-language-switcher__option-code {
  color: var(--color-text-tertiary);
}

@keyframes hp-language-panel-in {
  from {
    opacity: 0;
    transform: translateY(calc(var(--space-1) * -1));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .c-language-switcher__trigger {
    width: 36px;
    padding: 0;
  }

  .c-language-switcher__code,
  .c-language-switcher__caret {
    display: none;
  }

  .c-language-switcher__panel {
    position: fixed;
    top: auto;
    right: var(--space-3);
    bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
    left: var(--space-3);
    max-height: min(320px, calc(100dvh - 96px));
    overflow: auto;
    animation-name: hp-language-sheet-in;
  }
}

@keyframes hp-language-sheet-in {
  from {
    opacity: 0;
    transform: translateY(var(--space-4));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* static/css/30-components/locale-banner.css */
.c-locale-banner {
  background: var(--color-surface-muted);
  border-bottom: 1px solid var(--color-border-subtle);
}

.c-locale-banner__inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.c-locale-banner__question {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}

.c-locale-banner__suggestions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-body);
}

.c-locale-banner__suggestions li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.c-locale-banner__suggestions li:not(:first-child)::before {
  content: "/";
  color: var(--color-text-tertiary);
}

.c-locale-banner__suggestions a {
  color: var(--color-text-secondary);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.c-locale-banner__suggestions a:hover,
.c-locale-banner__suggestions a:focus-visible {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.c-locale-banner__suggestions a:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 3px;
}

.c-locale-banner__dismiss {
  margin-left: auto;
  flex: 0 0 auto;
}

.c-locale-banner__dismiss button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}

.c-locale-banner__dismiss button:hover,
.c-locale-banner__dismiss button:focus-visible {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.c-locale-banner__dismiss button:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .c-locale-banner__inner {
    padding-inline: var(--space-6);
  }
}

@media (max-width: 560px) {
  .c-locale-banner__inner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .c-locale-banner__question {
    flex: 1 1 100%;
  }

  .c-locale-banner__suggestions {
    flex: 1 1 auto;
  }
}
[data-hp-locale-banner][hidden] { display: none; }
.c-locale-banner [data-hp-language][hidden] { display: none; }

/* static/css/30-components/modal.css */
.c-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: var(--z-modal);
  animation: c-modal-fade var(--dur-panel) var(--ease-decel);
}
.c-modal-overlay[hidden] { display: none !important; }

.c-modal {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
  padding: var(--space-6);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  animation: c-modal-rise var(--dur-panel) var(--ease-decel);
}

.c-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard);
}
.c-modal__close:hover { background: var(--color-surface-muted); color: var(--color-text-primary); }

.c-modal__eyebrow {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.c-modal__title {
  font-size: var(--fs-section);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
}

.c-modal__subtitle {
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
}

.c-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

@keyframes c-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes c-modal-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .c-modal-overlay,
  .c-modal { animation: none; }
}

/* Share-modal supplementary elements — used by index/hostel pages. */
.share-status {
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}
.share-qr {
  background: #FFFFFF;
  padding: var(--space-3);
  border-radius: var(--radius-control);
  display: inline-flex;
  align-self: center;
}
.share-qr[hidden] { display: none; }
.share-link {
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
  word-break: break-all;
  text-decoration: underline;
}
.share-link[hidden] { display: none; }

/* static/css/30-components/owner-contact.css */
.c-owner-contact {
  margin: auto;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: var(--space-6);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-panel);
}
.c-owner-contact::backdrop { background: color-mix(in srgb, var(--color-text-primary) 55%, transparent); }
body:has(.c-owner-contact[open]) { overflow: hidden; }
.c-owner-contact__head { display: flex; align-items: start; gap: var(--space-4); margin-bottom: var(--space-4); }
.c-owner-contact__head h2 { flex: 1; margin: 0; font-size: var(--fs-card); line-height: var(--lh-snug); }
.c-owner-contact__close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: var(--radius-control); background: transparent; color: inherit; cursor: pointer; }
.c-owner-contact__close:hover { background: var(--color-surface-muted); }
.c-owner-contact__close:focus-visible { outline: 2px solid var(--color-border-strong); outline-offset: 2px; }
.c-owner-contact__form { display: grid; gap: var(--space-4); }
.c-owner-contact__form textarea { box-sizing: border-box; width: 100%; min-height: 144px; padding: var(--space-3); resize: vertical; font: inherit; font-size: 1rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-control); color: var(--color-text-primary); background: var(--color-background); }
.c-owner-contact__form textarea:focus-visible { outline: 2px solid var(--color-border-strong); outline-offset: 2px; }
.c-owner-contact__form textarea::placeholder { color: var(--color-text-secondary); }
.c-owner-contact__form .c-button { justify-self: start; min-width: 96px; }
.c-owner-contact__status { margin: 0; color: var(--color-text-secondary); }
.c-owner-contact__status:empty { display: none; }
.c-owner-contact__status[role="alert"] { color: var(--color-signal-danger); }
.c-owner-contact__honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.c-owner-contact-page { max-width: 640px; padding-block: var(--space-8); }
.c-owner-contact-page h1 { font-size: 1.75rem; margin: 0 0 var(--space-6); }
@media (max-width: 639px) {
  .c-app-header__nav .c-app-header__contact { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .c-owner-contact[open] { animation: hp-owner-contact-in 180ms var(--ease-decel); }
  @keyframes hp-owner-contact-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

/* static/css/30-components/phrase-insights.css */
/* Unusual review phrases — property-level phrase anomalies compared with
   nearby review language. Chips open retained sample evidence in the shared
   incident drawer. */

.c-phrase-insights {
  padding-top: var(--space-2);
}

.c-phrase-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: stretch;
}

.c-phrase-chip {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon text lift"
    "icon stat lift";
  column-gap: var(--space-2);
  row-gap: 2px;
  align-items: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid color-mix(in oklab, var(--color-signal-info) 42%, var(--color-border-subtle));
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-signal-info) 12%, var(--color-surface));
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background var(--dur-micro) var(--ease-standard),
    border-color var(--dur-micro) var(--ease-standard),
    box-shadow var(--dur-micro) var(--ease-standard),
    transform var(--dur-micro) var(--ease-standard);
}

.c-phrase-chip:hover,
.c-phrase-chip:focus-visible,
.c-phrase-chip[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-info) 20%, var(--color-surface));
  border-color: var(--color-border-strong);
  box-shadow: 0 10px 24px -14px color-mix(in oklab, var(--color-signal-info) 70%, transparent);
  outline: none;
}

.c-phrase-chip:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 2px;
}

.c-phrase-chip[aria-expanded="true"] {
  transform: translateY(-1px);
}

.c-phrase-chip__icon {
  grid-area: icon;
  display: inline-flex;
  color: var(--color-text-secondary);
}

.c-phrase-chip__text {
  grid-area: text;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
}

.c-phrase-chip__stat {
  grid-area: stat;
  color: var(--color-text-secondary);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-medium);
}

.c-phrase-chip__lift {
  grid-area: lift;
  justify-self: end;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-signal-positive) 18%, transparent);
  color: color-mix(in oklab, var(--color-signal-positive) 75%, var(--color-text-primary));
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

[data-theme="dark"] .c-phrase-chip {
  background: color-mix(in oklab, var(--color-signal-info) 18%, transparent);
  border-color: color-mix(in oklab, var(--color-signal-info) 48%, var(--color-border-subtle));
}

[data-theme="dark"] .c-phrase-chip:hover,
[data-theme="dark"] .c-phrase-chip:focus-visible,
[data-theme="dark"] .c-phrase-chip[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-info) 28%, transparent);
}

[data-theme="dark"] .c-phrase-chip__lift {
  color: var(--color-text-primary);
  background: color-mix(in oklab, var(--color-signal-positive) 28%, transparent);
}

.c-incident-log-overlay--phrase .c-incident-log__handle {
  background: color-mix(in oklab, var(--color-signal-info) 44%, var(--color-text-tertiary));
}

.c-incident-log--phrase .c-incident-log__title::before {
  color: var(--color-signal-info);
}

.c-incident-log__filter-chip--phrase {
  border-color: var(--color-signal-info);
  background: color-mix(in oklab, var(--color-signal-info) 14%, transparent);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .c-incident-log__filter-chip--phrase {
  color: var(--color-text-primary);
  background: color-mix(in oklab, var(--color-signal-info) 24%, transparent);
}

.c-phrase-evidence-label {
  color: var(--color-text-primary);
  font-weight: var(--fw-bold);
}

.c-phrase-sample-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.c-phrase-sample-list .c-review-card {
  margin: 0;
  border-color: color-mix(in oklab, var(--color-signal-info) 28%, var(--color-border-subtle));
}

.c-loading-spinner--info {
  color: var(--color-signal-info);
}

@media (max-width: 520px) {
  .c-phrase-chip {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-phrase-chip {
    transition: none;
  }
}

/* static/css/30-components/property-card.css */
/* PropertyCard
   - Narrow (<720px container): full-bleed image with a stained-glass body
     overlay anchored to the bottom; a handle glyph slides the overlay down
     to reveal the unobstructed photo.
   - Wide (720px+ container): image left, info grid right (flat, no overlay).
   The wrapping list element should set `container-type: inline-size`
   so this query keys off the column it lives in, not the viewport.
*/

.c-property-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-micro) var(--ease-standard),
              box-shadow var(--dur-micro) var(--ease-standard);
  isolation: isolate;
}

@media (hover: hover) {
  .c-property-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-panel);
  }
}

.c-property-card[data-certainty="low"],
.c-property-card[data-certainty="blind"] {
  border-color: var(--color-border-subtle);
}

/* MEDIA */
.c-property-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-muted);
  overflow: hidden;
}
.c-property-card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}
.c-property-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.c-property-card__media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  opacity: 0;
}
.c-property-card__media--pending .c-property-card__media-fallback,
.c-property-card__media--loading .c-property-card__media-fallback {
  opacity: 0.35;
}
.c-property-card__media--loading img {
  opacity: 0;
}
.c-property-card__media img {
  transition: opacity var(--dur-micro) var(--ease-decel);
}
.c-property-card__media--no-img .c-property-card__media-fallback { opacity: 1; }

/* BODY */
.c-property-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  min-width: 0;
}

.c-property-card__eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.c-property-card__sep {
  color: var(--color-text-tertiary);
  font-weight: var(--fw-regular);
  letter-spacing: 0;
}

.c-property-card__head {
  display: block;
}
.c-property-card__name {
  font-size: var(--fs-card-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--color-text-primary);
  margin: 0;
  width: fit-content;
  max-width: 100%;
  position: relative;
  isolation: isolate;
}
.c-property-card__name::before {
  content: "";
  position: absolute;
  inset: -0.7em -1.2em;
  z-index: -1;
  background: radial-gradient(
    ellipse at var(--hp-title-halo-x) 55%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.88)) 0%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.56)) 28%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.25)) 58%,
    transparent 100%
  );
  filter: blur(var(--hp-halo-blur));
  pointer-events: none;
}
.c-property-card__name a {
  color: inherit;
  text-decoration: none;
}
.c-property-card__name a:hover,
.c-property-card__name a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  outline: none;
}
.c-property-card:focus-within {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 2px;
}

.c-property-card__verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-card);
  color: var(--color-text-primary);
  line-height: var(--lh-snug);
  -webkit-line-clamp: 2;
}

.c-property-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.c-property-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}
.c-property-card__price { font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.c-property-card__cta { margin-left: auto; position: relative; z-index: 1; }

/* CINEMA POSTER (wide ≥720px container) — full-bleed image with a
   dark-glass info panel that fades in from the middle. No slide handle:
   info is always visible. Same partial works in the index list and the
   map shell list (when the column is wide enough). */
@container hp-list (min-width: 720px) {
  .c-property-card {
    --hp-card-content-start: 48%;
    --hp-card-scrim-start: calc(var(--hp-card-content-start) - 18%);
    aspect-ratio: 16 / 7;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .c-property-card__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    height: 100%;
    overflow: hidden;
    background: #0b0e14;
    z-index: 0;
  }
  .c-property-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }
  .c-property-card__body {
    --color-text-primary: rgb(244, 246, 250);
    --color-text-secondary: rgba(244, 246, 250, 0.78);
    --color-text-tertiary: rgba(244, 246, 250, 0.55);
    --color-border-subtle: rgba(255, 255, 255, 0.18);

    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-6);
    padding-left: var(--hp-card-content-start);
    color: var(--color-text-primary);
    background: transparent;
    backdrop-filter: none;
    border-top: none;
    box-shadow: none;
    transform: none;
    transition: none;
  }

  /* Stained-glass panel on the right side: backdrop blur, dark gradient,
     a faint diagonal weave, and SVG fractal-noise grain. Masked from the
     left so the photo breathes through the seam. */
  .c-property-card__body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
      repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 6px),
      linear-gradient(
        to right,
        transparent 0%,
        color-mix(in oklab, #06090f 18%, transparent) var(--hp-card-scrim-start),
        color-mix(in oklab, #06090f 40%, transparent) var(--hp-card-content-start),
        color-mix(in oklab, #06090f 50%, transparent) 72%,
        color-mix(in oklab, #06090f 48%, transparent) 100%
      );
    backdrop-filter: blur(2px) saturate(125%);
    -webkit-backdrop-filter: blur(2px) saturate(125%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent var(--hp-card-scrim-start), black var(--hp-card-content-start), black 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent var(--hp-card-scrim-start), black var(--hp-card-content-start), black 100%);
  }
  /* Handle is mobile-only — desktop always shows the info. */
  .c-property-card__handle {
    display: none;
  }

  /* Let clicks fall through the overlay to the image link beneath, so
     clicking anywhere on the card (except the interactive bits) opens the
     hostel page. Re-enable pointer events on real interactive elements. */
  .c-property-card__body,
  .c-property-card__body * {
    pointer-events: none;
  }
  .c-property-card__body a,
  .c-property-card__body button {
    pointer-events: auto;
  }
  /* Show the View CTA on desktop. */
  .c-property-card__cta {
    display: revert;
  }
  /* Slide-down state has no effect on desktop. */
  .c-property-card[data-revealed="true"] .c-property-card__body,
  .c-property-card[data-revealed="true"] .c-property-card__media img {
    transform: none;
  }
  .c-property-card__head {
    align-items: flex-start;
  }
  .c-property-card__name {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  }
  .c-property-card__cta .c-button__label {
    color: inherit;
  }
}

@container hp-list (min-width: 880px) {
  .c-property-card {
    --hp-card-content-start: 46%;
    aspect-ratio: 16 / 6;
  }
}

/* Shared detected-warnings tray spans the full card width under media + body. */
.c-property-card > .c-detected-warnings {
  grid-column: 1 / -1;
}

@container hp-list (min-width: 720px) {
  .c-property-card:has(> .c-detected-warnings--count-1) {
    --hp-card-warning-tray-height: 56px;
    --hp-card-warning-reserve: 72px;
  }

  .c-property-card:has(> .c-detected-warnings--count-2) {
    --hp-card-warning-tray-height: 72px;
    --hp-card-warning-reserve: 96px;
  }

  .c-property-card:has(> .c-detected-warnings--count-3) {
    --hp-card-warning-tray-height: 72px;
    --hp-card-warning-reserve: 96px;
  }

  .c-property-card:has(> .c-detected-warnings) {
    aspect-ratio: 16 / 7.4;
    min-height: 420px;
  }

  .c-property-card:has(> .c-detected-warnings) .c-property-card__body {
    justify-content: safe center;
    padding-top: var(--space-6);
    padding-bottom: calc(var(--space-6) + var(--hp-card-warning-reserve));
  }

  .c-property-card > .c-detected-warnings {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    background: transparent;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill,
  .c-property-card > .c-detected-warnings--count-2 .c-bedbug-pill,
  .c-property-card > .c-detected-warnings--count-2 .c-sus-pill,
  .c-property-card > .c-detected-warnings--count-2 .c-safety-pill,
  .c-property-card > .c-detected-warnings--count-3 .c-bedbug-pill,
  .c-property-card > .c-detected-warnings--count-3 .c-sus-pill,
  .c-property-card > .c-detected-warnings--count-3 .c-safety-pill {
    min-height: var(--hp-card-warning-tray-height);
  }
}

/* When bedbug strip + horizontal variant collide, switch to vertical inline ribbon. */
@container hp-list (min-width: 720px) {
  .c-property-card .c-bedbug-strip {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    height: auto;
    padding: 0;
    z-index: 2;
  }
  .c-property-card .c-bedbug-strip > * { display: none; }
  .c-property-card:has(.c-bedbug-strip) .c-property-card__media { padding-left: 4px; }
}

/* ── Narrow variant: full-bleed image + stained-glass body overlay ───── */
@container hp-list (max-width: 719.98px) {
  .c-property-card {
    aspect-ratio: 3 / 4;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .c-property-card__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    z-index: 0;
    overflow: hidden;
    background: #0b0e14;
  }
  .c-property-card__media img {
    width: 100%;
    height: 130%;
    object-fit: cover;
    transform: translateY(calc(-1 * var(--hp-img-shift, 23%)));
    transform-origin: center top;
    transition: transform 420ms var(--ease-decel);
    will-change: transform;
  }
  .c-property-card[data-revealed="true"] .c-property-card__media img {
    transform: translateY(0);
  }

  .c-property-card__body {
    /* Local light-on-dark palette so children that read these tokens
       (eyebrow, name, score panel title/meta, footer text) flip cleanly. */
    --color-text-primary: rgb(244, 246, 250);
    --color-text-secondary: rgba(244, 246, 250, 0.78);
    --color-text-tertiary: rgba(244, 246, 250, 0.55);
    --color-border-subtle: rgba(255, 255, 255, 0.18);

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-4) var(--space-4);
    color: var(--color-text-primary);
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
      repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 5px),
      color-mix(in oklab, #0b0e14 20%, transparent);
    backdrop-filter: blur(3px) saturate(120%);
    -webkit-backdrop-filter: blur(3px) saturate(120%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -16px 36px -18px rgba(0, 0, 0, 0.35);
    transition: transform 420ms var(--ease-decel);
    will-change: transform;
  }

  [data-theme="dark"] .c-property-card__body {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
      repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 5px),
      color-mix(in oklab, #02040a 26%, transparent);
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -16px 36px -18px rgba(0, 0, 0, 0.5);
  }

  .c-property-card[data-revealed="true"] .c-property-card__body {
    transform: translateY(100%);
  }

  .c-property-card:has(> .c-detected-warnings--count-1) {
    --hp-card-mobile-warning-height: 92px;
  }

  .c-property-card:has(> .c-detected-warnings--count-2) {
    --hp-card-mobile-warning-height: 176px;
  }

  .c-property-card:has(> .c-detected-warnings--count-3) {
    --hp-card-mobile-warning-height: 260px;
  }

  .c-property-card:has(> .c-detected-warnings) .c-property-card__body {
    bottom: var(--hp-card-mobile-warning-height);
    max-height: calc(100% - var(--hp-card-mobile-warning-height));
  }

  .c-property-card__handle {
    position: absolute;
    top: calc(-1 * var(--hp-handle-poke, 38px));
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: var(--hp-handle-poke, 38px);
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
    z-index: 3;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* When revealed, the body is fully off-screen — give the handle a subtle
     chip so it reads as a tap target against any photo background. */
  .c-property-card[data-revealed="true"] .c-property-card__handle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--color-surface) 62%, transparent);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid color-mix(in oklab, var(--color-border-subtle) 65%, transparent);
    box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.35);
    z-index: -1;
  }

  [data-theme="dark"] .c-property-card[data-revealed="true"] .c-property-card__handle::before {
    background: color-mix(in oklab, var(--color-surface) 52%, transparent);
    border-color: color-mix(in oklab, var(--color-border-subtle) 78%, transparent);
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.55);
  }

  .c-property-card__handle:focus-visible {
    outline: none;
  }
  .c-property-card__handle:focus-visible .c-property-card__handle-glyph {
    opacity: 1;
    filter:
      drop-shadow(0 0 6px color-mix(in oklab, var(--color-text-primary) 38%, transparent))
      drop-shadow(0 0 14px color-mix(in oklab, var(--color-text-primary) 22%, transparent));
  }

  .c-property-card__handle-glyph {
    width: 30px;
    height: 22px;
    color: color-mix(in oklab, var(--color-text-primary) 86%, transparent);
    opacity: 0.78;
    filter: drop-shadow(0 1px 2px color-mix(in oklab, var(--color-background) 70%, transparent));
    transition:
      opacity 220ms var(--ease-standard),
      transform 420ms var(--ease-decel),
      filter 220ms var(--ease-standard);
  }

  .c-property-card[data-revealed="true"] .c-property-card__handle-glyph {
    transform: rotate(180deg);
    opacity: 1;
  }

  @media (hover: hover) {
    .c-property-card__handle:hover .c-property-card__handle-glyph {
      opacity: 1;
    }
  }

  /* Eyebrow + name read better tightened up over the frosted backdrop. */
  .c-property-card__eyebrow {
    color: var(--color-text-secondary);
  }

  /* Detected warnings tray: standard bottom alarm bar over the image. */
  .c-property-card > .c-detected-warnings {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
  }

  .c-property-card > .c-detected-warnings--count-2 {
    grid-template-columns: 1fr;
    border-top: none;
  }

  .c-property-card > .c-detected-warnings--count-3 {
    grid-template-columns: 1fr;
    border-top: none;
  }

  .c-property-card > .c-detected-warnings--count-2 .c-detected-warnings__item--sus {
    border-left: 0;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: var(--space-2);
    row-gap: var(--space-1);
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill__icon,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill__icon,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill__icon {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill__label,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill__label,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill__label {
    grid-column: 2;
    grid-row: 1;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill__sep,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill__sep,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill__sep {
    display: none;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill__count,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill__count,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill__count {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    line-height: var(--lh-snug);
    overflow-wrap: anywhere;
  }

  .c-property-card > .c-detected-warnings--count-1 .c-bedbug-pill__chevron,
  .c-property-card > .c-detected-warnings--count-1 .c-sus-pill__chevron,
  .c-property-card > .c-detected-warnings--count-1 .c-safety-pill__chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin-left: 0;
  }

  /* Trim the overlay: the redundant View CTA doesn't earn its vertical
     real estate over the photo. */
  .c-property-card__cta {
    display: none;
  }
}

/* static/css/30-components/rank-badge.css */
.c-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.c-rank-badge__scope {
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

.c-rank-badge__n {
  font-variant-numeric: tabular-nums;
}

.c-rank-badge--goated {
  background: var(--color-tier-goated);
  color: var(--color-cta-primary-text);
  border-color: transparent;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-tier-goated) 32%, transparent);
}
.c-rank-badge--goated .c-rank-badge__scope { color: inherit; opacity: 0.85; }

/* Text rank labels — replace the (City #1) badge format with readable strings.
   Used in property cards and hostel hero. */
.c-rank-label {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.c-rank-label--goated {
  background: var(--color-tier-goated);
  color: var(--color-cta-primary-text);
  border-color: transparent;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-tier-goated) 32%, transparent);
}

/* static/css/30-components/review-card.css */
.c-review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.c-review-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
}

.c-review-card__author { font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.c-review-card__lang   { letter-spacing: 0.06em; }
.c-review-card__date   { color: var(--color-text-tertiary); }
.c-review-card__rating {
  margin-left: auto;
  padding: 2px var(--space-2);
  border-radius: 6px;
  background: var(--color-surface-muted);
  font-weight: var(--fw-semibold);
}

.c-review-card__body {
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  line-height: var(--lh-body);
}

.c-review-card__body p {
  margin: 0;
}

.c-review-card__translation {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border-subtle);
}

.c-review-card__translation-state {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-review-card__translation p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.c-review-card__source {
  font-size: var(--fs-tiny);
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* static/css/30-components/safety-pill.css */
/* Safety warning pill — links directly to the canonical safety evidence page. */

.c-safety-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);

  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-signal-danger);

  background: color-mix(in oklab, var(--color-signal-danger) 10%, var(--color-surface));
  border: 1px solid color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
  border-radius: var(--radius-card);
  cursor: pointer;
  text-decoration: none;

  transition:
    background var(--dur-micro) var(--ease-standard),
    box-shadow var(--dur-micro) var(--ease-standard),
    transform var(--dur-micro) var(--ease-standard);
}

[data-theme="dark"] .c-safety-pill {
  background: color-mix(in oklab, var(--color-signal-danger) 18%, transparent);
  color: #FFE6E6;
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-danger) 35%, transparent),
    0 0 0 0 transparent;
}

.c-safety-pill:hover,
.c-safety-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 18%, var(--color-surface));
  box-shadow:
    0 14px 28px -8px color-mix(in oklab, var(--color-signal-danger) 45%, transparent),
    0 4px 10px -2px color-mix(in oklab, var(--color-signal-danger) 30%, transparent);
  outline: none;
}

[data-theme="dark"] .c-safety-pill:hover,
[data-theme="dark"] .c-safety-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-danger) 28%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-danger) 50%, transparent),
    0 18px 40px -10px color-mix(in oklab, var(--color-signal-danger) 55%, transparent),
    0 6px 14px -2px color-mix(in oklab, var(--color-signal-danger) 40%, transparent);
}

.c-safety-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-signal-danger);
}

[data-theme="dark"] .c-safety-pill__icon {
  color: #FF6B6B;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--color-signal-danger) 60%, transparent));
}

.c-safety-pill__label {
  flex-shrink: 0;
}

.c-safety-pill__sep {
  opacity: 0.5;
  font-weight: var(--fw-regular);
}

.c-safety-pill__count {
  flex: 1;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: none;
  color: inherit;
  opacity: 0.92;
}

.c-safety-pill__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  color: currentColor;
  opacity: 0.85;
}

.c-safety-pill--severe {
  border-width: 1.5px;
}

.c-safety-pill--in-pair {
  border-radius: 0;
  border: none;
  min-height: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: var(--space-3) var(--space-4);
}

.c-safety-pill--in-pair .c-safety-pill__line1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-safety-pill--in-pair .c-safety-pill__line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-1);
}

/* ── Dense safety dossier ─────────────────────────────────────────────── */

.c-safety-dossier {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.c-safety-dossier__summary {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
}

.c-safety-dossier__stat--rate {
  color: var(--color-signal-danger);
  font-weight: var(--fw-bold);
}

.c-safety-note {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  line-height: 1.4;
}

.c-safety-note--verification {
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-border-strong);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.c-safety-note--inline {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.c-safety-notes {
  display: grid;
  gap: 2px;
  padding: 4px 0 0;
  border-top: 0;
}

/* Why this surfaced — dense matrix */

.c-safety-reasons {
  margin: var(--space-2) 0 0;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  border-radius: 0;
}

.c-safety-reasons h3,
.c-safety-reasons p {
  margin: 0;
}

.c-safety-reasons h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-primary);
}

.c-safety-reasons__hdr {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.c-safety-reasons__intro {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.c-safety-reasons ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-safety-reasons__row {
  display: block;
  padding: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--color-border-subtle) 65%, transparent);
}

.c-safety-reasons__row:last-child {
  border-bottom: 0;
}
.c-safety-reasons__bar {
  display: block;
  height: 4px;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-border-subtle) 85%, transparent);
  overflow: hidden;
}

.c-safety-reasons__fill {
  display: block;
  height: 100%;
  background: var(--color-signal-danger);
  border-radius: inherit;
}

[data-theme="dark"] .c-safety-reasons__fill {
  background: #FF6B6B;
}

.c-safety-reasons__count {
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-align: right;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

.c-safety-reasons__btn {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 88px 36px 16px;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px 6px 6px;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--color-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--dur-micro) var(--ease-standard),
    border-color var(--dur-micro) var(--ease-standard),
    color var(--dur-micro) var(--ease-standard);
}

.c-safety-reasons__btn:hover,
.c-safety-reasons__btn:focus-visible {
  background: var(--color-surface-muted);
  border-left-color: var(--color-border-subtle);
  outline: none;
}

.c-safety-reasons__btn.is-active,
.c-safety-reasons__btn[aria-expanded="true"] {
  background: var(--color-surface-muted);
  border-left-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

[data-theme="dark"] .c-safety-reasons__btn:hover,
[data-theme="dark"] .c-safety-reasons__btn:focus-visible {
  background: color-mix(in oklab, var(--color-surface-muted) 80%, transparent);
}

[data-theme="dark"] .c-safety-reasons__btn.is-active,
[data-theme="dark"] .c-safety-reasons__btn[aria-expanded="true"] {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.c-safety-reasons__cat {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: inherit;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.c-safety-reasons__chev {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  color: var(--color-text-tertiary);
  transition: transform var(--dur-micro) var(--ease-standard), color var(--dur-micro) var(--ease-standard);
}

.c-safety-reasons__btn:hover .c-safety-reasons__chev,
.c-safety-reasons__btn:focus-visible .c-safety-reasons__chev,
.c-safety-reasons__btn.is-active .c-safety-reasons__chev {
  color: var(--color-text-secondary);
  transform: translateX(2px);
}

/* Bar + count restored; idx (review index pills) stays hidden */
.c-safety-reasons__idx {
  display: none !important;
}

/* Legacy pill wall — keep for non-dense contexts, but shrink if rendered */
.c-safety-reasons__reason {
  min-width: 0;
}

.c-safety-reasons__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.c-safety-reasons__links a {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.c-safety-reasons__links a:hover,
.c-safety-reasons__links a:focus-visible {
  border-color: var(--color-signal-danger);
  color: var(--color-signal-danger);
  outline: none;
}

.c-safety-reasons li strong {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.c-safety-reasons .c-safety-reasons__note {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

/* Evidence title + placeholder */

.c-safety-evidence__title {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.c-safety-placeholder {
  margin: 0 0 var(--space-3);
  padding: 10px 12px;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.c-safety-placeholder[hidden] {
  display: none !important;
}

/* JS progressive disclosure: when JS is enabled, hide evidence list until a category is selected */
.js-enabled .c-incident-log__list--safety-dense[hidden] {
  display: none !important;
}

/* Component display rules otherwise override the browser's default [hidden]. */
.c-incident-row--safety[hidden],
.c-safety-review__match[hidden] {
  display: none !important;
}

/* Legacy toolbar/filter kept for crawlers but hidden when categories drive filter */
.c-safety-toolbar,
.c-safety-filter {
  display: none !important;
}

/* Evidence rows — dense */

.c-incident-row--safety {
  scroll-margin-top: var(--space-5);
}

.c-incident-row--safety:target {
  background: color-mix(in oklab, var(--color-signal-danger) 6%, transparent);
}

/* Dense dossier overrides via ancestor — keeps child class names test-stable */
.c-incident-log__list--safety-dense .c-incident-row {
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid var(--color-border-subtle);
}

.c-incident-log__list--safety-dense .c-incident-row::before {
  display: none;
}

.c-incident-log__list--safety-dense .c-incident-row__head {
  gap: 4px;
  font-size: 10px;
  color: var(--color-text-secondary);
  min-height: 0;
}

.c-incident-log__list--safety-dense .c-incident-row__severity--confirmed {
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
}

.c-incident-log__list--safety-dense .c-incident-row__body {
  font-size: 13px;
  line-height: 1.45;
}

.c-incident-row--dense {
  gap: 4px;
  padding: 8px 8px 8px 10px;
}

.c-incident-row--dense::before {
  top: 8px;
  bottom: 8px;
  width: 2px;
}

.c-incident-row__head--dense {
  gap: 8px;
  font-size: 11px;
}

.c-incident-row__body--dense {
  font-size: 13px;
  line-height: 1.45;
}

/* Legacy labels kept for crawlability but visually de-emphasized in dense */
.c-safety-review__match-label,
.c-safety-review__quote-label,
.c-safety-review__full-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.c-safety-review__matches {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c-safety-review__matches--dense,
.c-incident-log__list--safety-dense .c-safety-review__matches {
  gap: 2px;
}

.c-safety-review__match {
  display: grid;
  gap: 3px;
  padding: 4px 0;
  scroll-margin-top: var(--space-5);
  background: transparent;
  border-left: 0;
}

.c-safety-review__match--dense,
.c-incident-log__list--safety-dense .c-safety-review__match {
  padding: 6px 8px;
  gap: 4px;
}

.c-safety-review__match:target {
  outline: none;
  background: color-mix(in oklab, var(--color-signal-danger) 6%, transparent);
  border-radius: 4px;
}

.c-safety-review__category {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.c-safety-review__category--dense,
.c-incident-log__list--safety-dense .c-safety-review__category {
  padding: 0;
  font-size: 10px;
}

.c-safety-review__quote {
  color: var(--color-text-primary);
  font-size: 13px;
  line-height: 1.45;
}

.c-safety-review__quote--dense,
.c-incident-log__list--safety-dense .c-safety-review__quote {
  font-size: 12px;
  line-height: 1.45;
}

.c-safety-review__unsupported {
  color: var(--color-text-secondary);
  font-size: 10px;
  line-height: 1.3;
  font-style: italic;
  margin: 0;
}

.c-safety-review__unsupported--dense,
.c-incident-log__list--safety-dense .c-safety-review__unsupported {
  font-size: 10px;
  border: 0;
  padding: 0;
  background: transparent;
  font-style: italic;
  line-height: 1.3;
  margin: 0;
}

.c-safety-review__full {
  margin-top: 4px;
  border-top: 0;
}

.c-safety-review__full--dense,
.c-incident-log__list--safety-dense .c-safety-review__full {
  margin-top: 3px;
}

.c-safety-review__full summary {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 2px 0;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.c-safety-review__full summary:hover,
.c-safety-review__full summary:focus-visible {
  color: var(--color-text-primary);
  outline: none;
}

.c-safety-review__full-label {
  display: block;
  margin-top: 4px;
}

.c-safety-review__full blockquote {
  margin: 4px 0 0;
  padding: 0 0 0 var(--space-3);
  border-left: 1px solid var(--color-border-subtle);
  white-space: pre-line;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* Responsive tweak for category buttons */

@media (max-width: 640px) {
  .c-safety-reasons__btn {
    min-height: 42px;
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-safety-pill {
    transition: none;
  }
}

/* static/css/30-components/score-badge.css */
.c-score-badge {
  --tier: var(--color-text-secondary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  background: transparent;
  position: relative;
  isolation: isolate;
}

.c-score-badge__num {
  display: inline-flex;
  align-items: baseline;
  color: var(--tier);
  line-height: 1;
}

.c-score-badge__pct {
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.c-score-badge__sym {
  font-size: 0.55em;
  font-weight: var(--fw-semibold);
  margin-left: 2px;
  margin-bottom: 0.2em;
  align-self: flex-end;
}

.c-score-badge__label {
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.c-score-badge__verdict {
  font-size: var(--fs-meta);
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 24ch;
  line-height: 1.3;
}

/* Sizes */
.c-score-badge--sm .c-score-badge__pct { font-size: 1.25rem; font-weight: var(--fw-semibold); }
.c-score-badge--sm { padding: var(--space-1) var(--space-2); }
.c-score-badge--sm .c-score-badge__label { font-size: var(--fs-tiny); }

.c-score-badge--md .c-score-badge__pct { font-size: calc(var(--fs-card-lg) * 1.6); }
.c-score-badge--md { min-width: 96px; }

.c-score-badge--lg .c-score-badge__pct { font-size: var(--fs-score); }
.c-score-badge--lg { min-width: 160px; padding: var(--space-3) var(--space-4); }

.c-score-badge__spark {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  color: var(--color-tier-goated);
  z-index: 1;
}
.c-score-badge--lg .c-score-badge__spark { top: var(--space-3); left: var(--space-3); }

/* Low-confidence treatment — single rule. */
[data-certainty="low"]  .c-score-badge,
[data-certainty="blind"] .c-score-badge {
  filter: saturate(0.7);
}

/* static/css/30-components/score-panel.css */
/* hp-score: large score panel. Coral-red score ring, cyan confidence ring, Chakra Petch typography.
   Server renders all --confidence-* vars inline; theme cascades from [data-theme="dark"] on <html>. */

/* Animatable numeric property for the score stroke reveal. */
@property --score-dash {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.hp-score {
  /* Component accent: coral-red — not in global tokens, exclusive to this panel. */
  --hp-score-accent: #ff4b4b;
  --hp-score-accent-bg: rgba(255, 75, 75, 0.12);

  /* Confidence vars — overridden per-instance via server-rendered inline style. */
  --confidence: 0;
  --confidence-ring-width: 2px;
  --confidence-ring-color: rgb(150 160 175);
  --confidence-glow-primary-opacity: 0;
  --confidence-glow-secondary-opacity: 0;

  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(var(--space-6), 5vw, 56px);
  padding: clamp(var(--space-6), 4.5vw, 52px);

  width: min(960px, 100%);
  border-radius: clamp(var(--radius-card), 4vw, 44px);
}

[data-theme="dark"] .hp-score {
  --hp-score-accent-bg: rgba(255, 75, 75, 0.16);
}

/* ── SVG circle ──────────────────────────────────────────── */

.hp-score__circle {
  flex-shrink: 0;
}

.hp-score__circle-button {
  appearance: none;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  line-height: 0;
  cursor: zoom-in;
  touch-action: manipulation;
}

.hp-score__circle-button:hover .hp-score__svg {
  filter: drop-shadow(0 0 18px rgba(35, 231, 255, 0.16));
}

.hp-score__circle-button:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: var(--space-2);
}

.hp-score__svg {
  display: block;
  width: clamp(140px, 21vw, 200px);
  height: clamp(140px, 21vw, 200px);
  overflow: visible;
}

.hp-score__confidence-ring,
.hp-score__score-ring-bg,
.hp-score__raw-ring,
.hp-score__score-ring {
  fill: none;
  transform-origin: 60px 60px;
  transform: rotate(-90deg);
}

.hp-score__dial-ticks,
.hp-score__tier-thresholds,
.hp-score__tier-zones {
  pointer-events: none;
}

.hp-score__dial-tick,
.hp-score__tier-threshold {
  fill: none;
  stroke: color-mix(in oklab, var(--color-text-secondary) 82%, var(--color-text-primary));
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}

.hp-score__dial-tick--minor {
  stroke-width: 0.9px;
  opacity: 1;
}

.hp-score__dial-tick--major {
  stroke-width: 1px;
  opacity: 1;
}

[data-theme="dark"] .hp-score__dial-tick {
  stroke: color-mix(in oklab, var(--color-text-secondary) 84%, var(--color-text-primary));
}

.hp-score__tier-threshold {
  --tier-threshold-width: 1px;
  --tier-threshold-opacity: 0.82;
  --tier-threshold-color: color-mix(in oklab, var(--tier, var(--color-text-primary)) 88%, var(--color-text-primary));
  color: var(--tier-threshold-color);
  stroke: currentColor;
  stroke-width: var(--tier-threshold-width);
  opacity: var(--tier-threshold-opacity);
}

.hp-score__tier-threshold--unlocked {
  --tier-unlock-color: color-mix(in oklab, var(--color-text-primary) 82%, var(--color-signal-positive));
  --tier-unlock-stroke-width: 3.2px;
  --tier-unlock-peak-stroke-width: 4px;
  --tier-unlock-glow:
    drop-shadow(0 0 1px color-mix(in oklab, var(--color-signal-positive) 88%, transparent))
    drop-shadow(0 0 5px color-mix(in oklab, var(--color-signal-positive) 42%, transparent));
  --tier-unlock-peak-glow:
    drop-shadow(0 0 2px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 8px color-mix(in oklab, var(--color-signal-positive) 58%, transparent));
  color: var(--tier-unlock-color);
  opacity: 1;
  stroke-width: var(--tier-unlock-stroke-width);
  filter: var(--tier-unlock-glow);
}

.hp-score__tier-zone {
  --tier-zone-neutral-color: color-mix(in oklab, var(--tier, var(--color-text-tertiary)) 34%, var(--color-text-tertiary));
  --tier-zone-neutral-opacity: 0.42;
  --tier-zone-active-color: color-mix(in oklab, var(--tier, var(--color-text-primary)) 54%, var(--color-signal-positive));
  --tier-zone-dim-color: color-mix(in oklab, var(--tier, var(--color-text-secondary)) 68%, var(--color-text-secondary));
  --tier-zone-dim-opacity: 0.72;
  --tier-zone-glow:
    drop-shadow(0 0 1px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 7px color-mix(in oklab, var(--color-signal-positive) 62%, transparent));
  --tier-zone-peak-glow:
    drop-shadow(0 0 2px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 12px color-mix(in oklab, var(--color-signal-positive) 72%, transparent));
  fill: currentColor;
  color: var(--tier-zone-neutral-color);
  font-family: var(--font-mono);
  font-size: 3.05px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-anchor: middle;
  dominant-baseline: central;
  opacity: 0;
  paint-order: stroke;
  stroke: color-mix(in oklab, var(--color-surface) 94%, transparent);
  stroke-width: 0.35px;
  text-transform: uppercase;
}

[data-theme="dark"] .hp-score__tier-threshold {
  --tier-threshold-color: color-mix(in oklab, var(--tier, var(--color-text-primary)) 84%, var(--color-text-primary));
}

[data-theme="dark"] .hp-score__tier-threshold--unlocked {
  --tier-unlock-color: color-mix(in oklab, var(--color-text-primary) 88%, var(--color-signal-positive));
  --tier-unlock-glow:
    drop-shadow(0 0 1px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 6px color-mix(in oklab, var(--color-signal-positive) 58%, transparent));
  --tier-unlock-peak-glow:
    drop-shadow(0 0 2px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 10px color-mix(in oklab, var(--color-signal-positive) 72%, transparent));
}

[data-theme="dark"] .hp-score__tier-zone {
  --tier-zone-neutral-color: color-mix(in oklab, var(--tier, var(--color-text-tertiary)) 30%, var(--color-text-tertiary));
  --tier-zone-neutral-opacity: 0.48;
  --tier-zone-active-color: color-mix(in oklab, var(--tier, var(--color-text-primary)) 38%, var(--color-text-primary));
  --tier-zone-dim-color: color-mix(in oklab, var(--tier, var(--color-text-secondary)) 64%, var(--color-text-secondary));
  --tier-zone-dim-opacity: 0.76;
  --tier-zone-glow:
    drop-shadow(0 0 1px color-mix(in oklab, var(--tier, var(--color-signal-positive)) 100%, transparent))
    drop-shadow(0 0 8px color-mix(in oklab, var(--tier, var(--color-signal-positive)) 64%, transparent));
  --tier-zone-peak-glow:
    drop-shadow(0 0 2px color-mix(in oklab, var(--tier, var(--color-signal-positive)) 100%, transparent))
    drop-shadow(0 0 12px color-mix(in oklab, var(--tier, var(--color-signal-positive)) 76%, transparent));
  stroke: color-mix(in oklab, var(--color-background) 92%, transparent);
}

.hp-score__confidence-ring {
  stroke: var(--confidence-ring-color);
  stroke-width: var(--confidence-ring-width);
  filter:
    drop-shadow(0 0 var(--confidence-glow-blur-primary)   rgba(35, 231, 255, var(--confidence-glow-primary-opacity)))
    drop-shadow(0 0 var(--confidence-glow-blur-secondary) rgba(35, 231, 255, var(--confidence-glow-secondary-opacity)));
}

.hp-score__score-ring-bg {
  stroke: var(--hp-score-accent-bg);
  stroke-width: 10;
}

.hp-score__raw-ring {
  stroke: color-mix(in oklab, var(--color-text-secondary) 42%, var(--color-surface));
  stroke-width: 2.4;
  stroke-linecap: butt;
  stroke-dasharray: var(--raw-score-percent) 100;
  shape-rendering: geometricPrecision;
  opacity: 0.38;
  filter: none;
}

[data-theme="dark"] .hp-score__raw-ring {
  stroke: color-mix(in oklab, var(--color-text-secondary) 48%, var(--color-surface));
  opacity: 0.34;
}

.hp-score__score-ring {
  --score-dash: var(--score-percent);
  stroke: var(--hp-score-accent);
  stroke-width: 10;
  stroke-linecap: butt;
  stroke-dasharray: var(--score-dash) 100;
  filter: drop-shadow(0 0 10px rgba(255, 75, 75, 0.30));
}

[data-theme="dark"] .hp-score__score-ring {
  filter: drop-shadow(0 0 14px rgba(255, 75, 75, 0.45));
}

.hp-score__spark {
  fill: var(--hp-score-accent);
  transform: none;
  filter: drop-shadow(0 0 8px rgba(255, 75, 75, 0.26));
}

[data-theme="dark"] .hp-score__spark {
  filter: drop-shadow(0 0 12px rgba(255, 75, 75, 0.40));
}

.hp-score__diff-label {
  fill: color-mix(in oklab, var(--color-text-primary) 88%, var(--hp-score-accent));
  display: none;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.98;
  stroke: none;
}

[data-theme="dark"] .hp-score__diff-label {
  fill: color-mix(in oklab, var(--hp-score-accent) 82%, var(--color-text-primary));
}

/* ── Hazard state (bedbugs) ──────────────────────────────── */

.hp-score[data-hazard="bedbug"] .hp-score__spark { display: none; }

.hp-score__bug {
  stroke: var(--hp-score-accent);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 10px rgba(255, 75, 75, 0.40));
}

[data-theme="dark"] .hp-score__bug {
  filter: drop-shadow(0 0 14px rgba(255, 75, 75, 0.55));
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-score-bug-twitch {
    0%, 92%, 100% { transform: translate(0, 0) rotate(0); }
    94%           { transform: translate(0.4px, -0.6px) rotate(-1.2deg); }
    96%           { transform: translate(-0.6px, 0.4px) rotate(1deg); }
    98%           { transform: translate(0.3px, -0.2px) rotate(-0.5deg); }
  }
  .hp-score__bug {
    transform-box: fill-box;
    transform-origin: center;
    animation: hp-score-bug-twitch 4s var(--ease-standard) infinite;
  }
}

.hp-score__reticle {
  stroke: var(--hp-score-accent);
  stroke-width: 1;
  fill: none;
  opacity: 0.55;
}

[data-theme="dark"] .hp-score__reticle {
  opacity: 0.75;
  filter: drop-shadow(0 0 6px rgba(255, 75, 75, 0.55));
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-score-reticle-pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.85; }
  }
  .hp-score__reticle {
    animation: hp-score-reticle-pulse 3.2s var(--ease-standard) infinite;
  }
  [data-theme="dark"] .hp-score__reticle {
    animation: hp-score-reticle-pulse 3.2s var(--ease-standard) infinite;
  }
}

/* When hazard is active, the score ring desaturates very slightly so the bug
   glyph reads as the focal point — but the score number stays on accent. */
.hp-score[data-hazard="bedbug"] .hp-score__score-ring {
  opacity: 0.85;
}

/* ── Hazard state (sus / incentivized reviews) ──────────── */

.hp-score[data-hazard="sus"] .hp-score__spark { display: none; }

.hp-score__coin {
  stroke: var(--color-signal-sus);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--color-signal-sus) 40%, transparent));
}

[data-theme="dark"] .hp-score__coin {
  filter: drop-shadow(0 0 14px color-mix(in oklab, var(--color-signal-sus) 55%, transparent));
}

.hp-score__reticle--sus {
  stroke: var(--color-signal-sus);
  stroke-width: 1;
  fill: none;
  opacity: 0.55;
}

[data-theme="dark"] .hp-score__reticle--sus {
  opacity: 0.75;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--color-signal-sus) 55%, transparent));
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-score-coin-flip {
    0%, 92%, 100% { transform: rotateY(0); }
    94%           { transform: rotateY(20deg); }
    96%           { transform: rotateY(-15deg); }
    98%           { transform: rotateY(8deg); }
  }
  .hp-score__coin {
    transform-box: fill-box;
    transform-origin: center;
    animation: hp-score-coin-flip 5s var(--ease-standard) infinite;
  }
  .hp-score__reticle--sus {
    animation: hp-score-reticle-pulse 3.2s var(--ease-standard) infinite;
  }
}

.hp-score[data-hazard="sus"] .hp-score__score-ring {
  opacity: 0.96;
}

.hp-score[data-hazard="sus"] .hp-score__raw-ring {
  stroke: color-mix(in oklab, var(--color-text-secondary) 44%, var(--color-surface));
  opacity: 0.42;
}

[data-theme="dark"] .hp-score[data-hazard="sus"] .hp-score__raw-ring {
  stroke: color-mix(in oklab, var(--color-text-secondary) 46%, var(--color-surface));
  opacity: 0.36;
}

.hp-score__hazard-note {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-signal-sus);
  opacity: 0.92;
}

[data-theme="dark"] .hp-score__hazard-note--sus {
  color: #F7DC8B;
}

/* ── Text content ────────────────────────────────────────── */

.hp-score__content {
  min-width: 0;
}

.hp-score__title {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: clamp(var(--fs-section), 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hp-score__main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(var(--space-4), 3.5vw, 40px);
  margin-top: clamp(var(--space-3), 1.5vw, var(--space-5));
}

.hp-score__value {
  color: var(--hp-score-accent);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8.5vw, 6.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 0.92;
  letter-spacing: -0.04em;
  filter: drop-shadow(0 0 8px rgba(255, 75, 75, 0.18));
}

[data-theme="dark"] .hp-score__value {
  filter: drop-shadow(0 0 16px rgba(255, 75, 75, 0.38));
}

.hp-score__tier-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}

.hp-score__level {
  color: var(--hp-score-accent);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  border: 2px solid currentColor;
  border-radius: var(--radius-control);
  padding: 0.45em 0.9em;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 75, 75, 0.10);
}

.hp-score[data-tier="perf-thin"] .hp-score__level {
  color: var(--color-text-secondary);
  box-shadow: none;
}

[data-theme="dark"] .hp-score__level {
  box-shadow:
    0 0 20px rgba(255, 75, 75, 0.18),
    inset 0 0 14px rgba(255, 75, 75, 0.06);
}

[data-theme="dark"] .hp-score[data-tier="perf-thin"] .hp-score__level {
  box-shadow: none;
}

.hp-score__trust-badge {
  --trust-badge-color: var(--color-signal-positive);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 1.9rem;
  padding: 0.34em 0.68em;
  border: 1px solid color-mix(in oklab, var(--trust-badge-color) 68%, var(--color-border-subtle));
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--trust-badge-color) 18%, var(--color-surface));
  color: color-mix(in oklab, var(--trust-badge-color) 78%, var(--color-text-primary));
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.hp-score__trust-badge--positive { --trust-badge-color: var(--color-signal-positive); }
.hp-score__trust-badge--info { --trust-badge-color: var(--color-signal-info); }
.hp-score__trust-badge--goated { --trust-badge-color: var(--color-tier-goated); }
.hp-score__trust-badge--amazing { --trust-badge-color: var(--color-tier-amazing); }
.hp-score__trust-badge--good { --trust-badge-color: var(--color-tier-good); }
.hp-score__trust-badge--sus { --trust-badge-color: var(--color-signal-sus); }
.hp-score__trust-badge--meh { --trust-badge-color: var(--color-tier-meh); }
.hp-score__trust-badge--graphite { --trust-badge-color: var(--color-text-secondary); }

[data-theme="dark"] .hp-score__trust-badge {
  border-color: color-mix(in oklab, var(--trust-badge-color) 80%, var(--color-border-strong));
  background: color-mix(in oklab, var(--trust-badge-color) 38%, var(--color-surface));
  color: var(--color-text-primary);
}

.hp-score__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: clamp(var(--space-3), 2vw, var(--space-5));

  color: var(--color-text-secondary);
  font-size: clamp(var(--fs-meta), 1.8vw, 1.1rem);
  font-weight: var(--fw-medium);
}

.hp-score__confidence-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--confidence-ring-color);
  box-shadow: 0 0 calc(14px * var(--confidence)) var(--confidence-ring-color);
  flex-shrink: 0;
}

.hp-score__separator {
  opacity: 0.45;
}

.hp-score__tier-note {
  max-width: 48ch;
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--fs-body);
  line-height: 1.35;
}

/* ── Score stroke reveal animation ───────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-score-stroke-in {
    from { --score-dash: 0; }
  }

  .hp-score__score-ring {
    animation: hp-score-stroke-in 900ms var(--ease-decel) both;
  }

  @keyframes hp-score-glow-in {
    from { opacity: 0; }
  }

  .hp-score__confidence-ring {
    animation: hp-score-glow-in 600ms 200ms var(--ease-decel) both;
  }

  @keyframes hp-score-tier-unlock {
    0% {
      color: var(--tier-threshold-color);
      opacity: var(--tier-threshold-opacity);
      stroke-width: var(--tier-threshold-width);
      filter: none;
    }
    58% {
      color: var(--tier-unlock-color);
      opacity: 1;
      stroke-width: var(--tier-unlock-peak-stroke-width);
      filter: var(--tier-unlock-peak-glow);
    }
    100% {
      color: var(--tier-unlock-color);
      opacity: 1;
      stroke-width: var(--tier-unlock-stroke-width);
      filter: var(--tier-unlock-glow);
    }
  }

  .hp-score__tier-threshold--unlocked {
    animation: hp-score-tier-unlock 280ms var(--ease-decel) both;
    animation-delay: var(--tier-unlock-delay, 0ms);
  }
}

/* ── Responsive collapse ─────────────────────────────────── */

@media (max-width: 480px) {
  .hp-score {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hp-score__main,
  .hp-score__meta {
    justify-content: center;
  }
}

/* ── Property card context — flat, tighter sizing ───────── */

.c-property-card .hp-score {
  padding: 0;
  gap: clamp(var(--space-3), 3.5vw, var(--space-5));
  border: none;
  box-shadow: none;
  background: transparent;
  /* Keep ring-left / content-right even on narrow screens. */
  grid-template-columns: auto 1fr;
  align-items: stretch;
  justify-items: stretch;
  text-align: left;
}

.c-property-card .hp-score__circle,
.c-property-card .hp-score__circle-button {
  align-self: center;
}

.c-property-card .hp-score__svg {
  width: clamp(84px, 22vw, 130px);
  height: clamp(84px, 22vw, 130px);
}

/* Spread title / value-row / confidence to roughly match the ring height. */
.c-property-card .hp-score__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-1);
  padding: 2px 0;
}

.c-property-card .hp-score__title {
  font-size: var(--fs-meta);
  letter-spacing: 0.02em;
  margin: 0;
}

.c-property-card .hp-score__main {
  gap: var(--space-2);
  margin-top: 0;
}

.c-property-card .hp-score__main,
.c-property-card .hp-score__meta {
  justify-content: flex-start;
}

.c-property-card .hp-score__value {
  font-size: clamp(2.4rem, 11vw, 4rem);
  line-height: 0.88;
}

.c-property-card .hp-score__level {
  font-size: clamp(0.7rem, 2vw, 1.1rem);
  padding: 0.3em 0.65em;
}

.c-property-card .hp-score__trust-badge,
.hp-hostel__hero .hp-score__trust-badge {
  min-height: 1.45rem;
  padding: 0.26em 0.52em;
  font-size: clamp(0.66rem, 1.6vw, 0.8rem);
}

@container hp-list (min-width: 0) {
  .c-property-card .hp-score__trust-badge {
    border-color: color-mix(in oklab, var(--trust-badge-color) 78%, rgba(255, 255, 255, 0.32));
    background: color-mix(in oklab, var(--trust-badge-color) 24%, rgba(6, 9, 15, 0.78));
    color: rgb(244, 246, 250);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
    box-shadow: 0 0 14px color-mix(in oklab, var(--trust-badge-color) 18%, transparent);
  }
}

.c-property-card .hp-score__meta {
  font-size: var(--fs-meta);
  margin-top: 0;
  gap: var(--space-2);
}

.hp-hostel__hero .hp-score__tier-note {
  max-width: 38ch;
  margin-top: 0;
  font-size: var(--fs-meta);
  line-height: 1.25;
}

.c-property-card .hp-score__confidence-dot {
  width: 8px;
  height: 8px;
}

/* Review count lives in the card footer; drop the duplicate from the score meta. */
.c-property-card .hp-score__meta .hp-score__separator,
.c-property-card .hp-score__meta .hp-score__reviews {
  display: none;
}

/* Soft dark halo behind the score circle so the ring reads cleanly over
   busy photos without darkening the whole overlay. */
.c-property-card .hp-score__circle,
.hp-hostel__hero .hp-score__circle {
  position: relative;
  isolation: isolate;
}
.c-property-card .hp-score__circle::before,
.hp-hostel__hero .hp-score__circle::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -1;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 1.3)) 0%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.7)) 40%,
    transparent 72%
  );
  pointer-events: none;
}

/* Same idea for the score number and the tier pill — rounded, no hard
   edges, barely noticeable. filter: blur() softens the gradient edge. */
.c-property-card .hp-score__value,
.hp-hostel__hero .hp-score__value {
  position: relative;
  isolation: isolate;
}
.c-property-card .hp-score__value::before,
.hp-hostel__hero .hp-score__value::before {
  content: "";
  position: absolute;
  inset: -0.7em -0.9em;
  z-index: -1;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(var(--hp-halo-rgb), var(--hp-halo-alpha)) 0%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.62)) 25%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.31)) 55%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.12)) 80%,
    transparent 100%
  );
  filter: blur(var(--hp-halo-blur));
  pointer-events: none;
}

.c-property-card .hp-score__level,
.hp-hostel__hero .hp-score__level {
  position: relative;
  isolation: isolate;
}
.c-property-card .hp-score__level::before,
.hp-hostel__hero .hp-score__level::before {
  content: "";
  position: absolute;
  inset: -0.8em -1em;
  z-index: -1;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.88)) 0%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.56)) 28%,
    rgba(var(--hp-halo-rgb), calc(var(--hp-halo-alpha) * 0.25)) 58%,
    transparent 100%
  );
  filter: blur(var(--hp-halo-blur));
  pointer-events: none;
}

/* Cinema poster (desktop) — the score sits in a narrow right column,
   so cap the vw-scaled sizes from the mobile rule. */
@container hp-list (min-width: 720px) {
  .c-property-card .hp-score__svg {
    width: clamp(80px, 9vw, 130px);
    height: clamp(80px, 9vw, 130px);
  }
  .c-property-card .hp-score__value {
    font-size: clamp(1.9rem, 3.4vw, 3rem);
  }
  .c-property-card .hp-score__level {
    font-size: clamp(0.7rem, 1vw, 1rem);
    padding: 0.28em 0.6em;
  }
}

/* ── Hostel detail hero — same compact horizontal layout as the card. */

.hp-hostel__hero .hp-score {
  padding: 0;
  gap: clamp(var(--space-3), 3.5vw, var(--space-5));
  border: none;
  box-shadow: none;
  background: transparent;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  justify-items: stretch;
  text-align: left;
}

.hp-hostel__hero .hp-score__circle,
.hp-hostel__hero .hp-score__circle-button {
  align-self: center;
}

.hp-hostel__hero .hp-score__svg {
  width: clamp(84px, 22vw, 150px);
  height: clamp(84px, 22vw, 150px);
}

.hp-hostel__hero .hp-score__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-1);
  padding: 2px 0;
}

.hp-hostel__hero .hp-score__title {
  font-size: var(--fs-meta);
  letter-spacing: 0.02em;
  margin: 0;
}

.hp-hostel__hero .hp-score__main {
  gap: var(--space-2);
  margin-top: 0;
  justify-content: flex-start;
}

.hp-hostel__hero .hp-score__value {
  font-size: clamp(2.4rem, 11vw, 4.5rem);
  line-height: 0.88;
}

.hp-hostel__hero .hp-score__level {
  font-size: clamp(0.7rem, 2vw, 1.25rem);
  padding: 0.3em 0.65em;
}

.hp-hostel__hero .hp-score__meta {
  font-size: var(--fs-meta);
  margin-top: 0;
  gap: var(--space-2);
  justify-content: flex-start;
}

.hp-hostel__hero .hp-score__confidence-dot {
  width: 8px;
  height: 8px;
}

/* On desktop the score sits in a narrow right column, so the vw-based
   clamps need a tighter cap until the viewport is genuinely wide. */
@media (min-width: 768px) {
  .hp-hostel__hero .hp-score__svg {
    width: clamp(96px, 12vw, 150px);
    height: clamp(96px, 12vw, 150px);
  }
  .hp-hostel__hero .hp-score__value {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
  }
  .hp-hostel__hero .hp-score__level {
    font-size: clamp(0.78rem, 1.1vw, 1.2rem);
  }
}

/* ── Enlarged score circle popover ───────────────────────── */

.hp-score-popover {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(var(--space-5), 5vw, var(--space-8));
  background:
    radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.94) 48%,
      rgba(255, 255, 255, 0.88) 100%);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease-standard);
}

.hp-score-popover.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hp-score-popover__panel {
  --hp-score-accent: #ff4b4b;
  --hp-score-accent-bg: rgba(255, 75, 75, 0.12);

  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  display: grid;
  justify-items: center;
  gap: clamp(var(--space-4), 3vh, var(--space-6));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: scale(0.82);
  opacity: 0;
  transition:
    transform 210ms var(--ease-decel),
    opacity 160ms var(--ease-standard);
}

.hp-score-popover.is-open .hp-score-popover__panel {
  transform: scale(1);
  opacity: 1;
}

[data-theme="dark"] .hp-score-popover {
  background:
    radial-gradient(circle at 50% 42%,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.88) 46%,
      rgba(0, 0, 0, 0.98) 100%);
}

[data-theme="dark"] .hp-score-popover__panel {
  --hp-score-accent-bg: rgba(255, 75, 75, 0.16);
}

.hp-score-popover__panel:focus {
  outline: none;
}

.hp-score-popover__header {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  text-align: center;
}

.hp-score-popover__name {
  max-width: min(760px, 92vw);
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.hp-score-popover__city {
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hp-score-popover__circle {
  display: grid;
  place-items: center;
  width: 100%;
}

.hp-score-popover__svg {
  width: min(68vw, 54svh, 440px);
  height: min(68vw, 54svh, 440px);
}

.hp-score-popover__panel[data-hazard="sus"] .hp-score__spark,
.hp-score-popover__panel[data-hazard="bedbug"] .hp-score__spark {
  display: none;
}

.hp-score-popover__panel[data-hazard="sus"] .hp-score__score-ring,
.hp-score-popover__panel[data-hazard="bedbug"] .hp-score__score-ring {
  opacity: 0.85;
}

.hp-score-popover__panel .hp-score__dial-tick--minor {
  stroke-width: 0.9px;
  opacity: 1;
}

.hp-score-popover__panel .hp-score__dial-tick--major {
  stroke-width: 3px;
  opacity: 1;
}

.hp-score-popover__panel .hp-score__tier-threshold {
  --tier-threshold-width: 1.04px;
  --tier-threshold-opacity: 0.92;
  stroke-width: 1.04px;
  opacity: 0.92;
}

.hp-score-popover__panel .hp-score__tier-threshold--unlocked {
  --tier-unlock-stroke-width: 5.4px;
  --tier-unlock-peak-stroke-width: 6.6px;
  --tier-unlock-glow:
    drop-shadow(0 0 1px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 7px color-mix(in oklab, var(--color-signal-positive) 64%, transparent))
    drop-shadow(0 0 14px color-mix(in oklab, var(--color-signal-positive) 32%, transparent));
  --tier-unlock-peak-glow:
    drop-shadow(0 0 2px color-mix(in oklab, var(--color-signal-positive) 100%, transparent))
    drop-shadow(0 0 12px color-mix(in oklab, var(--color-signal-positive) 78%, transparent))
    drop-shadow(0 0 20px color-mix(in oklab, var(--color-signal-positive) 42%, transparent));
  opacity: 1;
  stroke-width: var(--tier-unlock-stroke-width);
  filter: var(--tier-unlock-glow);
}

.hp-score-popover__panel .hp-score__tier-zone {
  opacity: 1;
}

.hp-score-popover__panel .hp-score__tier-zone--neutral {
  color: var(--tier-zone-neutral-color);
  font-weight: 500;
  opacity: var(--tier-zone-neutral-opacity);
  filter: none;
}

.hp-score-popover__panel .hp-score__tier-zone--earned {
  color: var(--tier-zone-dim-color);
  font-weight: 600;
  opacity: var(--tier-zone-dim-opacity);
  filter: none;
}

.hp-score-popover__panel .hp-score__tier-zone--current {
  color: var(--tier-zone-active-color);
  font-weight: 750;
  opacity: 1;
  filter: var(--tier-zone-glow);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hp-score-tier-zone-light {
    0% {
      color: var(--tier-zone-neutral-color);
      opacity: var(--tier-zone-neutral-opacity);
      filter: none;
    }
    62% {
      color: var(--tier-zone-active-color);
      opacity: 1;
      filter: var(--tier-zone-peak-glow);
    }
    100% {
      color: var(--tier-zone-active-color);
      opacity: 1;
      filter: var(--tier-zone-glow);
    }
  }

  @keyframes hp-score-tier-zone-dim {
    0% {
      color: var(--tier-zone-active-color);
      opacity: 1;
      filter: var(--tier-zone-peak-glow);
    }
    100% {
      color: var(--tier-zone-dim-color);
      opacity: var(--tier-zone-dim-opacity);
      filter: none;
    }
  }

  .hp-score-popover__panel .hp-score__tier-zone--earned {
    animation:
      hp-score-tier-zone-light 190ms var(--ease-decel) var(--tier-zone-glow-delay, 0ms) both,
      hp-score-tier-zone-dim 190ms var(--ease-standard) var(--tier-zone-dim-delay, 0ms) forwards;
  }

  .hp-score-popover__panel .hp-score__tier-zone--current {
    animation: hp-score-tier-zone-light 230ms var(--ease-decel) var(--tier-zone-glow-delay, 0ms) both;
  }
}

.hp-score-popover__panel .hp-score__diff-label {
  display: block;
}

.hp-score-popover__legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.55rem);
  color: var(--color-text-secondary);
}

.hp-score-popover__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  min-height: 42px;
  padding: 0.42rem 0.82rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-surface-muted) 68%, transparent);
  white-space: nowrap;
}

.hp-score-popover__legend-item--primary,
.hp-score-popover__legend-item--diff {
  color: var(--hp-score-accent);
}

.hp-score-popover__legend-item--primary {
  flex-wrap: wrap;
  justify-content: center;
  white-space: normal;
}

.hp-score-popover__legend-score {
  font-weight: 700;
}

.hp-score-popover__legend-confidence {
  color: color-mix(in oklab, var(--color-text-primary) 82%, var(--hp-score-accent));
  font-size: 0.72em;
  font-weight: 650;
}

.hp-score-popover__legend-confidence::before,
.hp-score-popover__legend-title::before {
  content: "·";
  margin-right: 0.42em;
  color: color-mix(in oklab, var(--color-text-secondary) 62%, transparent);
}

.hp-score-popover__legend-title {
  color: var(--color-text-secondary);
  font-size: 0.66em;
  font-weight: 600;
}

.hp-score-popover__legend-item--diff {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.9vw, 1.24rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-theme="dark"] .hp-score-popover__legend-item {
  background: color-mix(in oklab, var(--color-surface-muted) 62%, transparent);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .hp-score-popover {
    background:
      radial-gradient(circle at 50% 42%,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.88) 46%,
        rgba(0, 0, 0, 0.98) 100%);
  }

  [data-theme="auto"] .hp-score-popover__panel {
    --hp-score-accent-bg: rgba(255, 75, 75, 0.16);
  }

  [data-theme="auto"] .hp-score-popover__legend-item {
    background: color-mix(in oklab, var(--color-surface-muted) 62%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-score-popover,
  .hp-score-popover__panel {
    transition: none;
  }
}

@media (max-width: 480px) {
  .hp-score-popover {
    padding: var(--space-4);
  }

  .hp-score-popover__panel {
    width: min(100%, 390px);
    gap: var(--space-4);
  }

  .hp-score-popover__svg {
    width: min(86vw, 48svh, 340px);
    height: min(86vw, 48svh, 340px);
  }

  .hp-score-popover__legend {
    gap: var(--space-2);
  }

  .hp-score-popover__legend-item {
    min-height: 44px;
    padding: 0.42rem 0.75rem;
  }
}

/* static/css/30-components/sus-pill.css */
/* Sus 5★ review pill — incentivized-review warning link.
   JS upgrades it into the evidence drawer; without JS it navigates to the
   canonical evidence page. Uses the amber/coin signal color. */

.c-sus-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);

  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-signal-sus);

  background: color-mix(in oklab, var(--color-signal-sus) 10%, var(--color-surface));
  border: 1px solid color-mix(in oklab, var(--color-signal-sus) 35%, var(--color-border-subtle));
  border-radius: var(--radius-card);
  cursor: pointer;
  text-decoration: none;

  transition:
    background var(--dur-micro) var(--ease-standard),
    box-shadow var(--dur-micro) var(--ease-standard),
    transform var(--dur-micro) var(--ease-standard);
}

[data-theme="dark"] .c-sus-pill {
  background: color-mix(in oklab, var(--color-signal-sus) 18%, transparent);
  color: #F7DC8B;
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-sus) 35%, transparent),
    0 0 0 0 transparent;
}

.c-sus-pill:hover,
.c-sus-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-sus) 18%, var(--color-surface));
  box-shadow:
    0 14px 28px -8px color-mix(in oklab, var(--color-signal-sus) 45%, transparent),
    0 4px 10px -2px color-mix(in oklab, var(--color-signal-sus) 30%, transparent);
  outline: none;
}

[data-theme="dark"] .c-sus-pill:hover,
[data-theme="dark"] .c-sus-pill:focus-visible {
  background: color-mix(in oklab, var(--color-signal-sus) 28%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-sus) 50%, transparent),
    0 18px 40px -10px color-mix(in oklab, var(--color-signal-sus) 55%, transparent),
    0 6px 14px -2px color-mix(in oklab, var(--color-signal-sus) 40%, transparent);
}

.c-sus-pill[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-sus) 22%, var(--color-surface));
  box-shadow:
    inset 0 -2px 0 var(--color-signal-sus),
    0 8px 26px color-mix(in oklab, var(--color-signal-sus) 38%, transparent);
}

[data-theme="dark"] .c-sus-pill[aria-expanded="true"] {
  background: color-mix(in oklab, var(--color-signal-sus) 32%, transparent);
}

.c-sus-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-signal-sus);
}

[data-theme="dark"] .c-sus-pill__icon {
  color: #F7DC8B;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--color-signal-sus) 60%, transparent));
}

.c-sus-pill__label {
  flex-shrink: 0;
}

.c-sus-pill__sep {
  opacity: 0.5;
  font-weight: var(--fw-regular);
}

.c-sus-pill__count {
  flex: 1;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: none;
  color: inherit;
  opacity: 0.92;
}

.c-sus-pill__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  color: currentColor;
  opacity: 0.85;
  transition: transform var(--dur-micro) var(--ease-standard);
}

.c-sus-pill[aria-expanded="true"] .c-sus-pill__chevron {
  transform: rotate(180deg);
}

/* Tier modifiers — high gets the strongest treatment, watch the lightest */
.c-sus-pill--watch {
  opacity: 0.92;
}

.c-sus-pill--high {
  border-width: 1.5px;
}

/* Prominent variant — full-width strip at bottom of a card. */
.c-sus-pill--prominent {
  min-height: 56px;
  padding: var(--space-4) var(--space-4);
  font-size: var(--fs-body);
  letter-spacing: 0.08em;
  border-radius: 0;
  border: none;
  border-top: 1px solid color-mix(in oklab, var(--color-signal-sus) 35%, var(--color-border-subtle));
}

[data-theme="dark"] .c-sus-pill--prominent {
  box-shadow: none;
  border-top: 1px solid color-mix(in oklab, var(--color-signal-sus) 45%, transparent);
}

.c-sus-pill--prominent .c-sus-pill__icon .c-icon {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .c-sus-pill,
  .c-sus-pill__chevron {
    transition: none;
  }
}

/* In-pair modifier — used inside .c-hazard-pair container */
.c-sus-pill--in-pair {
  border-radius: 0;
  border: none;
  min-height: 48px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: var(--space-3) var(--space-4);
}

.c-sus-pill--in-pair .c-sus-pill__line1 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c-sus-pill--in-pair .c-sus-pill__line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-1);
}

[data-theme="dark"] .c-sus-pill--in-pair {
  box-shadow: none;
}

/* "Explain how it works" disclosure inside the sus drawer */
.c-sus-explain {
  margin: 0;
  border: 1px solid color-mix(in oklab, var(--color-signal-sus) 30%, var(--color-border-subtle));
  border-radius: var(--radius-control);
  background: color-mix(in oklab, var(--color-signal-sus) 6%, var(--color-surface));
}

[data-theme="dark"] .c-sus-explain {
  background: color-mix(in oklab, var(--color-signal-sus) 12%, transparent);
  border-color: color-mix(in oklab, var(--color-signal-sus) 40%, transparent);
}

.c-sus-explain__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-signal-sus);
  user-select: none;
}

[data-theme="dark"] .c-sus-explain__toggle {
  color: #F7DC8B;
}

.c-sus-explain__toggle::-webkit-details-marker { display: none; }
.c-sus-explain__toggle::marker { content: ""; }

.c-sus-explain__toggle::after {
  content: "+";
  margin-left: auto;
  font-size: 1.1em;
  opacity: 0.7;
  transition: transform var(--dur-micro) var(--ease-standard);
}

.c-sus-explain[open] .c-sus-explain__toggle::after {
  content: "−";
}

.c-sus-explain__toggle:hover,
.c-sus-explain__toggle:focus-visible {
  background: color-mix(in oklab, var(--color-signal-sus) 10%, transparent);
  outline: none;
}

.c-sus-explain__body {
  padding: 0 var(--space-4) var(--space-4);
  border-top: 1px solid color-mix(in oklab, var(--color-signal-sus) 25%, var(--color-border-subtle));
  font-size: var(--fs-meta);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
}

[data-theme="dark"] .c-sus-explain__body {
  color: var(--color-text-primary);
  border-top-color: color-mix(in oklab, var(--color-signal-sus) 35%, transparent);
}

.c-sus-explain__body p {
  margin: var(--space-3) 0 0;
}

.c-sus-explain__body strong {
  color: var(--color-signal-sus);
  font-weight: var(--fw-bold);
}

[data-theme="dark"] .c-sus-explain__body strong {
  color: #F7DC8B;
}

/* static/css/30-components/tag-chip.css */
.c-tag-chip {
  --tag-chip-bg: var(--color-surface-muted);
  --tag-chip-fg: var(--color-text-secondary);
  --tag-chip-count-fg: var(--color-text-tertiary);

  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--tag-chip-bg);
  color: var(--tag-chip-fg);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
}
[data-theme="dark"] .c-tag-chip,
[data-theme="auto"] .c-tag-chip {
  --tag-chip-bg: color-mix(in srgb, var(--color-surface-muted) 80%, transparent);
}

.c-tag-chip__emoji { font-size: 0.85em; line-height: 1; }
.c-tag-chip__count { color: var(--tag-chip-count-fg); font-size: var(--fs-tiny); }

@container hp-list (min-width: 720px) {
  .c-property-card__body .c-tag-chip {
    --tag-chip-bg: color-mix(in oklab, #04070C 62%, transparent);
    --tag-chip-fg: rgb(244, 246, 250);
    --tag-chip-count-fg: rgba(244, 246, 250, 0.72);
  }
}

@container hp-list (max-width: 719.98px) {
  .c-property-card__body .c-tag-chip {
    --tag-chip-bg: color-mix(in oklab, #04070C 62%, transparent);
    --tag-chip-fg: rgb(244, 246, 250);
    --tag-chip-count-fg: rgba(244, 246, 250, 0.72);
  }
}

/* static/css/30-components/trust-checks.css */
/* Trust checks — small status row on hostel detail pages reporting whether
   absence-of-signal claims are warranted by the analyzed-review sample size.
   Rendered states are clean (positive token) and pending (neutral). Detected
   issues are surfaced by warning pills. Copy is plain-language per the
   trust-copy carve-out in docs/hp_style_guide.md — do not slangify. */

.c-trust-checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.c-trust-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-3);

  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;

  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-pill, 999px);
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.c-trust-check__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-trust-check__label {
  font-weight: var(--fw-bold);
}

.c-trust-check__detail {
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
  opacity: 0.85;
}

/* Clean state — green-teal positive token. Text uses the darker positive
   shade (#3A6D70) for contrast against the tinted surface; the icon keeps the
   bright token so the check itself reads strongly. */
.c-trust-check--clean {
  color: #2C5557;
  background: color-mix(in oklab, var(--color-signal-positive) 28%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-signal-positive) 70%, var(--color-border-subtle));
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--color-signal-positive) 25%, transparent),
    0 6px 14px -8px color-mix(in oklab, var(--color-signal-positive) 50%, transparent);
}

.c-trust-check--clean .c-trust-check__icon {
  color: var(--color-signal-positive);
}

.c-trust-check--clean .c-trust-check__detail {
  color: #2C5557;
  opacity: 0.78;
}

[data-theme="dark"] .c-trust-check--clean {
  background: color-mix(in oklab, var(--color-signal-positive) 32%, transparent);
  color: #DCF3F1;
  border-color: color-mix(in oklab, var(--color-signal-positive) 65%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-signal-positive) 50%, transparent),
    0 8px 18px -10px color-mix(in oklab, var(--color-signal-positive) 60%, transparent);
}

[data-theme="dark"] .c-trust-check--clean .c-trust-check__icon {
  color: #A6E2DD;
  filter: drop-shadow(0 0 4px color-mix(in oklab, var(--color-signal-positive) 60%, transparent));
}

[data-theme="dark"] .c-trust-check--clean .c-trust-check__detail {
  color: #DCF3F1;
  opacity: 0.85;
}

/* Pending state — neutral; signals coverage rather than verdict. */
.c-trust-check--pending {
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-color: var(--color-border-subtle);
}

.c-trust-check--pending .c-trust-check__icon {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

/* Detected state — red-orange danger token. Used by paid reviews only;
   bed-bug detected is rendered by c-bedbug-pill higher up the page. */
.c-trust-check--detected {
  color: var(--color-signal-danger);
  background: color-mix(in oklab, var(--color-signal-danger) 10%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-signal-danger) 35%, var(--color-border-subtle));
}

.c-trust-check--detected .c-trust-check__icon {
  color: var(--color-signal-danger);
}

.c-trust-check--detected .c-trust-check__detail {
  color: color-mix(in oklab, var(--color-signal-danger) 70%, var(--color-text-secondary));
}

[data-theme="dark"] .c-trust-check--detected {
  background: color-mix(in oklab, var(--color-signal-danger) 18%, transparent);
  color: #FFE6E6;
  border-color: color-mix(in oklab, var(--color-signal-danger) 45%, transparent);
}

[data-theme="dark"] .c-trust-check--detected .c-trust-check__icon {
  color: #FF6B6B;
}

@media (max-width: 480px) {
  .c-trust-check {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* static/css/30-components/view-toggle.css */
.c-view-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-muted);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 0;
}

.c-view-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-standard),
              color var(--dur-micro) var(--ease-standard);
}

.c-view-toggle__btn.is-active,
.c-view-toggle__btn[aria-current="page"] {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

@media (max-width: 479px) {
  .c-view-toggle__btn span:not([aria-hidden]) { display: none; }
  .c-view-toggle__btn { width: 44px; justify-content: center; }
}

