:root {
  --bg: #0b0d12;
  --bg-elevated: #10141c;
  --panel: rgba(21, 25, 34, 0.96);
  --panel-strong: #1a1d24;
  --panel-soft: #202633;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --muted-strong: #c2c7d0;
  --accent: #8b0000;
  --accent-strong: #b30000;
  --accent-hover: #ff2a2a;
  --blue: #5f7cff;
  --red: #d32626;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(179, 0, 0, 0.22), transparent 20%),
    radial-gradient(circle at top right, rgba(96, 16, 16, 0.18), transparent 24%),
    linear-gradient(180deg, #090b10 0%, #0f1115 52%, #131722 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  font-size: 14px;
}

a {
  color: #f2f5ff;
}

code {
  font-family: Consolas, Monaco, monospace;
  font-size: 0.92em;
  color: #ffd9d9;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 1.9vw, 2.35rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1rem, 1vw, 1.18rem);
  line-height: 1.15;
}

h3 {
  font-size: 0.92rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: #ff7c7c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lead,
.stats,
.small-text,
.result-card__text,
.result-card__meta {
  color: var(--muted);
  line-height: 1.48;
  font-size: 0.84rem;
}

.home-shell,
.case-shell {
  width: min(96vw, 1800px);
  margin: 0 auto;
  padding: 18px;
}

.site-notice {
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 42, 42, 0.28);
  border-radius: 14px;
  background: rgba(179, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.article-card,
.article-card--home {
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(26, 29, 36, 0.98) 0%, rgba(18, 22, 30, 0.98) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.case-content,
.case-content--home {
  padding: 16px;
}

.page-back,
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.page-back:hover,
.page-back:focus-visible,
.case-back:hover,
.case-back:focus-visible {
  outline: none;
  color: #ffffff;
  border-color: rgba(255, 42, 42, 0.45);
  background: rgba(179, 0, 0, 0.18);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.home-hero {
  margin-bottom: 14px;
}

.case-hero {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.18) 0%, rgba(139, 0, 0, 0.08) 28%, rgba(14, 17, 24, 0.96) 100%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 26%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
  pointer-events: none;
}

.case-hero > * {
  position: relative;
  z-index: 1;
}

.case-hero__intro {
  width: min(100%, 1180px);
}

.case-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: clamp(220px, 34vw, 520px);
  min-height: 220px;
  max-height: 520px;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.12), rgba(15, 17, 21, 0.84)),
    #111827;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.case-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.case-hero__media::after {
  display: none;
}

.case-hero__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(120px, 12vw, 180px);
  min-height: 120px;
  max-height: 180px;
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.14), rgba(15, 17, 21, 0.72)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 32%);
  color: rgba(229, 231, 235, 0.68);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-hero--fallback .case-hero__media {
  height: clamp(120px, 12vw, 180px);
  min-height: 120px;
  max-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-hero__media--fallback::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.035) 100%);
}

.case-hero .eyebrow,
.case-hero .lead {
  color: rgba(229, 231, 235, 0.78);
}

.case-hero h1 {
  margin-bottom: 5px;
  color: #ffffff;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.45);
}

.page-case .case-hero h1 {
  max-width: 980px;
  font-size: clamp(1.65rem, 2vw, 2.7rem);
  line-height: 1.04;
}

.page-case .case-hero .eyebrow {
  margin-bottom: 5px;
  font-size: 0.64rem;
}

.page-case .case-hero .lead {
  max-width: 960px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.home-layout,
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sidebar,
.content,
.sidebar--home,
.content--home {
  min-width: 0;
}

.sidebar,
.sidebar--home {
  display: grid;
  gap: 14px;
  align-content: start;
}

.content,
.content--home {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(28, 32, 42, 0.96) 0%, rgba(21, 25, 34, 0.96) 100%);
  box-shadow: var(--shadow-soft);
}

.panel--hero {
  background:
    linear-gradient(160deg, rgba(139, 0, 0, 0.14) 0%, rgba(29, 33, 44, 0.96) 34%, rgba(21, 25, 34, 0.98) 100%);
}

.panel--hero h2 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.panel--results {
  min-height: 240px;
}

.filters {
  display: grid;
  gap: 11px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input::placeholder,
.field select::placeholder,
.field textarea::placeholder {
  color: rgba(156, 163, 175, 0.72);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(179, 0, 0, 0.18);
}

.checkbox-group {
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.checkbox-group legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 0.8rem;
}

.checkbox-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-strong);
}

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

.filter-actions {
  display: flex;
  gap: 10px;
}

.button,
.chip,
body.page-case .link-list a {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(179, 0, 0, 0.18) 0%, rgba(109, 0, 0, 0.16) 100%);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

body.page-case .link-list__placeholder {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(179, 0, 0, 0.18) 0%, rgba(109, 0, 0, 0.16) 100%);
  color: var(--text);
  font-weight: 700;
}

.button:hover,
.button:focus-visible,
.chip:hover,
.chip:focus-visible,
body.page-case .link-list a:hover,
body.page-case .link-list a:focus-visible {
  outline: none;
  color: #ffffff;
  border-color: rgba(255, 42, 42, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 42, 42, 0.26) 0%, rgba(139, 0, 0, 0.22) 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

body.page-case .link-list a {
  display: grid;
  gap: 4px;
}

body.page-case .link-list a strong {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.page-case .link-list a span {
  color: #d7dbe4;
  font-weight: 500;
  line-height: 1.55;
}

.media-section {
  display: grid;
  gap: 14px;
}

.media-group-list {
  display: grid;
  gap: 18px;
}

.media-group {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.media-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.025);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.media-group__toggle:hover,
.media-group__toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.045);
}

.media-group__toggle:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 42, 42, 0.42);
}

.media-group__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.media-group__count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.media-group__chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  transition: transform var(--transition);
}

.media-group__toggle[aria-expanded="true"] .media-group__chevron {
  transform: rotate(180deg);
}

.media-group__panel {
  padding: 0 14px 14px;
  animation: media-panel-in 180ms ease both;
}

.media-group__panel[hidden] {
  display: none;
}

.media-icon,
.media-card__external {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media-group__heading .media-icon,
.media-card__icon {
  color: var(--accent);
}

.media-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.media-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.media-card--featured {
  grid-column: 1 / -1;
  gap: 13px;
  padding: 15px;
  border-color: rgba(255, 42, 42, 0.24);
  background: rgba(255, 255, 255, 0.045);
}

.media-card--featured .media-card__icon .media-icon {
  width: 24px;
  height: 24px;
}

.media-card--featured .media-card__source {
  font-size: 1rem;
}

.media-card:hover,
.media-card:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.media-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.media-card__service,
.media-card__type {
  display: inline-flex;
  align-items: center;
}

.media-card__type {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.media-card__body strong,
.media-card__source {
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.media-card__episode,
.media-card__description {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.media-card__description {
  color: #d7dbe4;
}

.media-card__external {
  color: var(--muted);
  opacity: 0.82;
}

.media-card:hover .media-card__external,
.media-card:focus-visible .media-card__external {
  color: var(--accent);
  opacity: 1;
}

@keyframes media-panel-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .media-group__panel {
    animation: none;
  }

  .media-group__chevron {
    transition: none;
  }
}

.button--ghost {
  background: rgba(255, 255, 255, 0.03);
}

.map,
.case-map {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: #11151d;
  box-shadow: var(--shadow-soft);
}

.map {
  height: calc(100vh - 48px);
  min-height: 620px;
}

.map--home {
  height: 64vh;
  min-height: 660px;
}

.map--seo {
  height: 48vh;
  min-height: 360px;
  margin-top: 8px;
}

.case-map {
  height: clamp(420px, 42vh, 620px);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.results-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 42, 42, 0.28);
  background: rgba(179, 0, 0, 0.16);
  color: #ffd8d8;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.results-list,
.link-list,
.chip-list {
  display: grid;
  gap: 8px;
}

.result-card {
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(32, 38, 51, 0.96) 0%, rgba(23, 28, 37, 0.96) 100%);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.result-card--compact {
  display: grid;
  gap: 6px;
  text-decoration: none;
}

.result-card--compact.is-active {
  border-color: rgba(255, 42, 42, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 42, 42, 0.12);
}

.result-card--button {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.result-card--button:hover,
.result-card--button:focus-visible,
.result-card--compact:hover,
.result-card--compact:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.34);
  background:
    linear-gradient(180deg, rgba(38, 44, 58, 0.98) 0%, rgba(27, 31, 41, 0.98) 100%);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.result-card h3 {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 0.84rem;
  line-height: 1.25;
}

.result-card__meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 42, 42, 0.18);
  border-radius: 999px;
  background: rgba(139, 0, 0, 0.12);
  color: #e3b9b9;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.result-card__text {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.45;
}

.result-card__link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  color: #ffb3b3;
  font-weight: 800;
  text-decoration: none;
}

.result-card__link:hover,
.result-card__link:focus-visible {
  color: #ffffff;
  outline: none;
}

.stats strong {
  color: #ffffff;
}

.stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card,
.detail-card,
.place-nav__info {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(29, 34, 46, 0.96) 0%, rgba(22, 27, 36, 0.96) 100%);
}

.stat-card__label,
.detail-card strong,
.chip-group__label {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card__value {
  margin: 5px 0;
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
}

.stat-card__detail,
.place-nav__info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

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

.detail-card {
  display: grid;
  gap: 4px;
}

.detail-card span {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.35;
}

.article-section {
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.article-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.article-section--home-map {
  padding-top: 0;
}

.article-section--map-nav {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
}

.place-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: start;
}

.place-nav__list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.place-nav__button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.place-nav__button:hover,
.place-nav__button:focus-visible,
.place-nav__button.is-active {
  outline: none;
  border-color: rgba(255, 42, 42, 0.34);
  background: rgba(179, 0, 0, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.place-nav__title {
  font-weight: 700;
}

.place-nav__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.place-nav__image,
.case-image {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.place-nav__image:empty,
.case-image:empty {
  display: none;
}

.place-nav__image img,
.case-image img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  background: #0f1115;
}

.place-nav__image img {
  cursor: zoom-in;
}

.place-nav__image-empty {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.related-places-section {
  display: grid;
  gap: 10px;
}

.related-place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 10px;
}

.related-place-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.62fr) minmax(0, 1fr);
  overflow: hidden;
  height: 172px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.015)),
    rgba(12, 15, 22, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.related-place-grid:has(.related-place-card.is-active) .related-place-card:not(.is-active) {
  opacity: 0.58;
}

.related-place-card:not(:has(.related-place-card__media)) {
  grid-template-columns: 1fr;
  height: auto;
  min-height: 132px;
}

.related-place-card:hover,
.related-place-card:focus-visible,
.related-place-card.is-active {
  outline: none;
  border-color: rgba(255, 42, 42, 0.78);
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.14), rgba(255, 255, 255, 0.018)),
    rgba(12, 15, 22, 0.92);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px) scale(1.015);
  opacity: 1;
}

.related-place-card__media {
  min-height: 0;
  height: 100%;
  background: #0f1115;
}

.related-place-card__media img,
.place-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.related-place-card__body {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
  padding: 12px 14px;
  overflow: hidden;
}

.related-place-card__body h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.22;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-place-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.43;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.related-place-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
}

.related-place-card__pin {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.case-related-marker-label {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 13, 19, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(220, 38, 38, 0.12);
  backdrop-filter: blur(8px);
}

.case-related-marker-label::before {
  display: none;
}

.place-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 8, 12, 0.76);
  backdrop-filter: blur(10px);
  z-index: 3200;
  animation: place-modal-fade 160ms ease both;
}

.place-modal[hidden] {
  display: none;
}

.place-modal__dialog {
  width: min(96vw, 920px);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(15, 19, 27, 0.98);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
  animation: place-modal-scale 180ms ease both;
}

.place-modal__topbar,
.place-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.place-modal__topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.place-modal__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.place-modal__body {
  min-height: 0;
  overflow: auto;
}

.place-modal__image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f1115;
}

.place-modal__image {
  opacity: 0;
  transition: opacity 180ms ease;
}

.place-modal__image.is-loaded {
  opacity: 1;
}

.place-modal__image-wrap.is-tall {
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  max-height: 70vh;
}

.place-modal__image-wrap.is-tall .place-modal__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.place-modal__content {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.place-modal__content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.18;
}

.place-modal__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.place-modal__facts {
  display: grid;
  gap: 10px;
}

.place-modal__fact {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.place-modal__fact-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.place-modal__fact address {
  display: grid;
  gap: 2px;
  margin: 0;
  color: #ffffff;
  font-style: normal;
  line-height: 1.45;
}

.place-modal__map {
  height: 280px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #0f1115;
}

.place-modal__map .case-map {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.place-modal__close,
.place-modal__nav {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.place-modal__close {
  width: 42px;
  padding: 0;
}

.place-modal__nav {
  padding: 0 16px;
}

.place-modal__close:hover,
.place-modal__close:focus-visible,
.place-modal__nav:hover,
.place-modal__nav:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.48);
  background: rgba(179, 0, 0, 0.14);
  transform: translateY(-1px);
}

.place-modal__counter {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.place-modal__progress {
  display: grid;
  gap: 4px;
  min-width: min(52vw, 320px);
  text-align: right;
}

.place-modal__step-type {
  margin: 0;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.place-modal__progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.place-modal__progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 42, 42, 0.9), rgba(255, 255, 255, 0.78));
  transition: width 180ms ease;
}

.place-modal__journey-panel {
  align-content: start;
}

.media-section--journey {
  gap: 16px;
}

.document-grid--journey {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.document-card--journey {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 116px;
  padding: 15px;
  border-color: rgba(255, 42, 42, 0.18);
}

.document-card__icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent);
}

.document-card__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-card__body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-card__open {
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  .place-modal__progress-bar {
    transition: none;
  }
}

@keyframes place-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes place-modal-scale {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(10px);
  z-index: 3000;
}

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

.image-lightbox__dialog {
  width: min(92vw, 1100px);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(24, 29, 39, 0.98) 0%, rgba(15, 19, 27, 0.98) 100%);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
}

.image-lightbox__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.image-lightbox__meta {
  display: grid;
  gap: 4px;
}

.image-lightbox__meta h3 {
  margin: 0;
}

.image-lightbox__meta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.image-lightbox__close,
.image-lightbox__nav {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.image-lightbox__close {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
}

.image-lightbox__nav {
  padding: 10px 16px;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible,
.image-lightbox__nav:hover,
.image-lightbox__nav:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.34);
  background: rgba(179, 0, 0, 0.12);
  transform: translateY(-1px);
}

.image-lightbox__close[disabled],
.image-lightbox__nav[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.image-lightbox__body {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
}

.image-lightbox__body img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  border-radius: 20px;
  object-fit: contain;
  background: #0f1115;
}

.image-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-section {
  display: grid;
  gap: 8px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.document-card {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(12, 15, 22, 0.82);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: default;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.document-card[data-document-url] {
  cursor: pointer;
}

.document-card:hover,
.document-card:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.42);
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(12, 15, 22, 0.9);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.document-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
}

.document-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.document-open-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.page-contact .case-shell {
  width: min(100%, 900px);
}

.contact-card {
  background:
    linear-gradient(180deg, rgba(26, 29, 36, 0.98) 0%, rgba(18, 22, 30, 0.98) 100%);
}

.contact-section {
  padding-top: 14px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(139, 0, 0, 0.12) 0%, rgba(28, 32, 42, 0.96) 38%, rgba(21, 25, 34, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attachment-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.attachment-dropzone {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  border: 1px dashed rgba(255, 42, 42, 0.38);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(179, 0, 0, 0.14), rgba(255, 255, 255, 0.025));
  color: var(--text);
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.attachment-dropzone:hover,
.attachment-dropzone:focus-within {
  border-color: rgba(255, 42, 42, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 42, 42, 0.18), rgba(255, 255, 255, 0.035));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

.attachment-dropzone strong {
  font-size: 0.94rem;
}

.attachment-dropzone small,
.attachment-count {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.attachment-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.attachment-preview {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.attachment-preview__media {
  position: relative;
}

.attachment-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.attachment-preview__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.attachment-preview__remove:hover,
.attachment-preview__remove:focus-visible {
  border-color: rgba(255, 42, 42, 0.72);
  background: rgba(179, 0, 0, 0.86);
}

.attachment-preview figcaption {
  overflow: hidden;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 42, 42, 0.42);
  border-radius: var(--radius-md);
  background: rgba(179, 0, 0, 0.18);
  color: #ffd1d1;
  font-weight: 700;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-status {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.contact-actions .button:disabled::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: contactSpinner 820ms linear infinite;
}

@keyframes contactSpinner {
  to {
    transform: rotate(360deg);
  }
}

.document-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 7, 11, 0.86);
  backdrop-filter: blur(10px);
  z-index: 4000;
  animation: overlayFadeIn 180ms ease;
}

.document-overlay[hidden] {
  display: none;
}

.document-overlay__dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  width: min(96vw, 1720px);
  height: min(94vh, 1080px);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 29, 39, 0.98) 0%, rgba(10, 13, 19, 0.98) 100%);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.56);
}

.document-overlay__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.document-overlay__topbar .eyebrow {
  margin-bottom: 5px;
}

.document-overlay__topbar h2 {
  margin: 0;
}

.document-overlay__close {
  min-width: 44px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.document-overlay__close:hover,
.document-overlay__close:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(179, 0, 0, 0.18);
}

.document-overlay__viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 75vh;
  overflow: hidden;
  border-radius: 12px;
  background: #0d1016;
}

.document-overlay iframe,
.document-overlay object {
  display: block;
  grid-row: 1 / -1;
  width: 100%;
  height: 100%;
  min-height: 75vh;
  border: 0;
  background: #0d1016;
}

.document-overlay__loading,
.document-overlay__fallback {
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 75vh;
  padding: 28px;
  text-align: center;
  color: var(--text);
}

.document-overlay__loading[hidden],
.document-overlay__fallback[hidden],
.document-overlay__pdf-toolbar[hidden],
.document-overlay__pdf-stage[hidden],
.document-overlay iframe[hidden],
.document-overlay object[hidden] {
  display: none;
}

.document-overlay__pdf-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 15, 0.94);
}

.document-overlay__pdf-toolbar .document-overlay__close {
  min-height: 38px;
  padding: 0 12px;
}

.document-overlay__page-status {
  padding: 0 8px;
  color: var(--muted-strong);
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.document-overlay__pdf-stage {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #12161f;
  text-align: center;
}

.document-overlay__pdf-page {
  display: grid;
  place-items: center;
  min-height: 420px;
  margin: 0 auto 18px;
  color: var(--muted-strong);
  font-weight: 800;
}

.document-overlay__pdf-page:last-child {
  margin-bottom: 0;
}

.document-overlay__pdf-page canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.document-overlay__spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: #ff7c7c;
  border-radius: 50%;
  animation: contactSpinner 820ms linear infinite;
}

.document-overlay__fallback p {
  max-width: 640px;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.document-overlay__fallback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fup-viewer {
  display: grid;
  gap: 14px;
}

.fup-viewer__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fup-viewer__tab {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.fup-viewer__tab:hover,
.fup-viewer__tab:focus-visible,
.fup-viewer__tab.is-active {
  outline: none;
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(179, 0, 0, 0.18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.fup-viewer__frame {
  min-height: 78vh;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  overflow: hidden;
  background: #0d1016;
  box-shadow: var(--shadow-soft);
}

.fup-viewer__frame iframe {
  display: block;
  width: 100%;
  min-height: 78vh;
  border: 0;
  background: #0d1016;
}

.supplementary-media {
  display: grid;
  gap: 16px;
}

.supplementary-media__card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(29, 34, 46, 0.96) 0%, rgba(22, 27, 36, 0.96) 100%);
}

.supplementary-media__card h3 {
  margin-bottom: 12px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-group__label {
  width: 100%;
}

.chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.chip.is-active {
  border-color: rgba(255, 42, 42, 0.42);
  background: rgba(179, 0, 0, 0.18);
  color: #ffffff;
}

.map-legend {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(18, 21, 29, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.map-legend__title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.map-legend__item + .map-legend__item {
  margin-top: 6px;
}

.map-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-legend__dot--case {
  background: var(--blue);
}

.map-legend__dot--related {
  background: var(--red);
}

.leaflet-container {
  background: #11151d;
  color: var(--text);
}

.leaflet-bar a,
.leaflet-bar a:hover {
  background: rgba(26, 29, 36, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  line-height: 34px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #1b202a;
  color: var(--text);
}

.leaflet-popup-content {
  margin: 14px 16px;
}

.popup h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  line-height: 1.3;
  color: #ffffff;
}

.popup p {
  margin: 6px 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.48;
}

.popup__link {
  display: inline-block;
  margin-top: 10px;
  color: #ffb3b3;
  font-weight: 700;
  text-decoration: none;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  line-height: 1.6;
}

.layout--seo .sidebar {
  align-self: start;
  align-content: start;
}

.layout--seo .content {
  align-self: start;
  gap: 14px;
}

.layout--seo {
  width: min(96vw, 1800px);
  margin: 0 auto;
  padding: 18px;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.layout--seo .panel {
  padding: 18px;
}

.layout--seo .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: stretch;
}

.layout--seo .stat-card {
  min-height: 100%;
}

.layout--seo .results-list {
  gap: 12px;
}

.layout--seo .result-card {
  padding: 14px 16px;
}

.layout--seo .page-back {
  margin-bottom: 4px;
}

.page-home .page-back {
  margin-bottom: 14px;
}

.site-footer {
  padding: 0 20px 28px;
}

.site-footer__inner {
  width: min(96vw, 1800px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 17, 21, 0.92);
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer__links a {
  color: #ffb3b3;
  text-decoration: none;
  font-weight: 700;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: #ffd1d1;
}

.related-case-section {
  display: grid;
  gap: 6px;
}

.related-case-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  overflow: visible;
}

.related-case-column,
.related-case-columns > div {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.related-case-column h2,
.related-case-columns > div > h2 {
  margin: 0;
}

.related-case-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.related-case-section .related-case-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.related-case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  height: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(32, 38, 51, 0.96) 0%, rgba(23, 28, 37, 0.96) 100%);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.related-case-card:hover,
.related-case-card:focus-visible {
  outline: none;
  border-color: rgba(255, 42, 42, 0.34);
  background:
    linear-gradient(180deg, rgba(38, 44, 58, 0.98) 0%, rgba(27, 31, 41, 0.98) 100%);
  box-shadow: 0 28px 44px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.related-case-card span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-case-card small {
  color: #ffb3b3;
  font-size: 0.74rem;
  font-weight: 800;
}

.related-case-card strong {
  color: #ffffff;
  font-size: 0.84rem;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .related-case-columns,
  .related-case-section .related-case-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .home-layout,
  .layout,
  .article-section--map-nav,
  .place-nav,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .image-lightbox {
    padding: 16px;
  }

  .image-lightbox__dialog {
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 14px;
  }

  .image-lightbox__topbar,
  .image-lightbox__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .place-modal {
    padding: 12px;
  }

  .place-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
  }

  .related-place-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .home-shell,
  .case-shell {
    padding: 12px;
  }

  .home-layout {
    display: flex;
    flex-direction: column;
  }

  .content--home {
    order: 1;
  }

  .sidebar--home {
    order: 2;
  }

  .site-footer {
    padding: 0 12px 16px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-content,
  .case-content--home {
    padding: 14px;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .case-hero {
    padding: 14px;
  }

  .case-hero__media {
    width: 100%;
    height: clamp(200px, 46vw, 360px);
    min-height: 200px;
    max-height: 360px;
  }

  .case-hero__media img {
    width: 100%;
    height: 100%;
    max-height: none;
  }

  .case-hero--fallback .case-hero__media,
  .case-hero__media--fallback {
    height: clamp(96px, 18vw, 140px);
    min-height: 96px;
    max-height: 140px;
  }

  .map,
  .map--home {
    height: 56vh;
    min-height: 360px;
  }

  .case-map {
    height: 340px;
  }

  .related-place-card {
    grid-template-columns: minmax(160px, 0.72fr) minmax(0, 1fr);
    height: 168px;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.08;
  }

  h2 {
    font-size: 1.08rem;
  }

  .home-shell,
  .case-shell {
    padding: 8px;
  }

  .article-card,
  .article-card--home {
    border-radius: 20px;
  }

  .case-content,
  .case-content--home {
    padding: 12px;
  }

  .home-hero {
    margin-bottom: 14px;
  }

  .case-hero {
    padding: 14px;
    border-radius: 18px;
  }

  .case-hero__media {
    width: 100%;
    height: clamp(170px, 54vw, 320px);
    min-height: 170px;
    max-height: 320px;
  }

  .case-hero__media img {
    width: 100%;
    height: 100%;
    max-height: none;
  }

  .case-hero--fallback .case-hero__media,
  .case-hero__media--fallback {
    height: clamp(82px, 22vw, 112px);
    min-height: 82px;
    max-height: 112px;
  }

  .case-hero .eyebrow {
    margin-bottom: 6px;
    font-size: 0.64rem;
  }

  .case-hero .lead {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .home-layout,
  .content--home,
  .sidebar--home,
  .sidebar,
  .content {
    gap: 12px;
  }

  .panel {
    padding: 14px;
    border-radius: 18px;
  }

  .panel--hero {
    display: none;
  }

  .field input,
  .field select,
  .button,
  .chip,
  body.page-case .link-list a {
    padding: 11px 12px;
  }

  .checkbox-group {
    padding: 12px;
    border-radius: 16px;
  }

  .checkbox-list {
    max-height: 180px;
  }

  .map,
  .map--home {
    height: 44vh;
    min-height: 280px;
  }

  .results-header {
    margin-bottom: 12px;
  }

  .results-count {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
  }

  .result-card {
    padding: 14px;
    border-radius: 16px;
  }

  .result-card h3 {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  .result-card__meta {
    margin-bottom: 7px;
    padding: 4px 8px;
    font-size: 0.64rem;
  }

  .result-card__text {
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .related-place-grid {
    gap: 12px;
  }

  .related-place-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .related-place-card__media {
    aspect-ratio: 16 / 9;
    height: 132px;
  }

  .related-place-card__media img {
    height: 100%;
  }

  .related-place-card__body {
    padding: 12px;
  }

  .related-place-card__body h3 {
    font-size: 0.9rem;
  }

  .place-modal {
    padding: 8px;
    place-items: stretch;
  }

  .place-modal__dialog {
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .place-modal__topbar,
  .place-modal__footer {
    padding: 10px;
  }

  .place-modal__progress {
    min-width: 0;
  }

  .place-modal__progress-track {
    display: none;
  }

  .place-modal__footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .place-modal__nav {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .place-modal__counter {
    white-space: nowrap;
    font-size: 0.74rem;
  }

  .place-modal__content {
    gap: 13px;
    padding: 14px;
  }

  .place-modal__content h2 {
    font-size: 1.08rem;
  }

  .place-modal__description {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .place-modal__map {
    height: 230px;
  }

  .document-grid--journey,
  .media-section--journey .media-card-grid {
    grid-template-columns: 1fr;
  }

  .document-overlay {
    padding: 8px;
  }

  .document-overlay__dialog {
    width: 100%;
    height: calc(100vh - 16px);
    padding: 10px;
    border-radius: 14px;
  }

  .document-overlay__topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .document-overlay__close {
    width: 100%;
  }
}
