:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #5b6875;
  --line: #d8e0e8;
  --soft: #eef4f8;
  --paper: #ffffff;
  --blue: #0b4f79;
  --blue-dark: #083752;
  --red: #c91f2d;
  --gold: #c88d20;
  --green: #28775d;
  --shadow: 0 18px 42px rgba(19, 42, 61, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(11, 79, 121, 0.09), transparent 340px),
    repeating-linear-gradient(90deg, rgba(11, 79, 121, 0.035) 0 1px, transparent 1px 96px),
    #f8fbfd;
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

main {
  display: flex;
  flex-direction: column;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 24px;
  padding: 32px 0 18px;
}

.brand-block {
  display: grid;
  align-content: end;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(45, 42, 74, 0.28);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    #a51931 0 17%,
    #f4f5f8 17% 33%,
    #2d2a4a 33% 67%,
    #f4f5f8 67% 83%,
    #a51931 83% 100%
  );
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  box-shadow: var(--shadow);
}

.brand strong {
  display: block;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
}

.brand-block p {
  max-width: 780px;
  margin: 0;
  color: #344351;
  font-size: 1.08rem;
  line-height: 1.65;
}

.urgent-panel {
  align-self: end;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(201, 31, 45, 0.22);
  border-left: 6px solid var(--red);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.urgent-panel span {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.urgent-panel a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(201, 31, 45, 0.18);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.urgent-panel a:hover,
.urgent-panel a:focus-visible {
  border-color: var(--red);
  background: #fff5f6;
}

.urgent-panel b {
  color: var(--red);
  font-size: 1rem;
}

.urgent-panel small {
  margin-left: auto;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  margin: 8px 0 22px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue-dark);
  box-shadow: var(--shadow);
}

.hero-visual > a:first-child {
  position: relative;
  display: block;
  min-height: clamp(260px, 36vw, 430px);
  color: #fff;
  text-decoration: none;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.hero-visual > a:first-child::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 26, 41, 0.82), rgba(5, 26, 41, 0.24) 58%, rgba(5, 26, 41, 0.08));
  content: "";
}

.hero-copy {
  position: absolute;
  z-index: 1;
  left: clamp(20px, 5vw, 58px);
  bottom: clamp(24px, 5vw, 56px);
  display: grid;
  gap: 8px;
  max-width: 620px;
}

.hero-copy strong {
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.9;
}

.hero-copy span {
  font-size: clamp(1.15rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-credit {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.75rem;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(19, 42, 61, 0.08);
  backdrop-filter: blur(14px);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #b8c7d5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

input[type="search"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 79, 121, 0.16);
  outline: none;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.stats strong {
  color: var(--ink);
}

.filter-block {
  display: grid;
  gap: 12px;
  padding: 18px 0 12px;
}

.filter-block > div {
  display: grid;
  gap: 8px;
}

.filter-block span {
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.chip-nav button {
  min-height: 36px;
  border: 1px solid #bfd0dd;
  border-radius: 999px;
  background: #fff;
  color: #264455;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 13px;
}

.area-nav button {
  border-color: #c9d8c7;
  color: #2b573f;
}

.chip-nav button[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.area-nav button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
}

.notice {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 141, 32, 0.32);
  border-radius: 8px;
  background: #fff9ea;
}

.notice p {
  margin: 0;
  color: #564117;
  font-size: 0.95rem;
  line-height: 1.55;
}

.landmark-strip {
  order: 10;
  margin: 22px 0 26px;
}

.landmark-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.landmark-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.landmark-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.landmark-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(19, 42, 61, 0.08);
}

.landmark-photo {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--soft);
}

.landmark-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.landmark-photo img.fit-contain {
  object-fit: contain;
  background: #e6edf2;
}

.landmark-photo:hover img,
.landmark-photo:focus img {
  transform: scale(1.035);
}

.landmark-photo:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.landmark-grid figcaption {
  display: grid;
  gap: 4px;
  padding: 10px 11px 11px;
}

.landmark-grid figcaption strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.landmark-grid figcaption a {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 24px;
}

.quick-grid a {
  display: grid;
  min-height: 94px;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(19, 42, 61, 0.08);
}

.quick-grid a:focus,
.quick-grid a:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.quick-grid span {
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-grid b {
  font-size: 1.05rem;
}

.directory {
  display: grid;
  gap: 24px;
}

.category-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 140px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding-top: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.link-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(19, 42, 61, 0.07);
}

.link-card:hover {
  border-color: #9eb9ca;
}

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

.link-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.link-card .badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.link-card p {
  margin: 0;
  color: #42515f;
  font-size: 0.95rem;
  line-height: 1.5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.meta span {
  border: 1px solid #dce5ed;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 3px 7px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.link-card a {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.card-actions a:first-child {
  padding-right: 10px;
  border-right: 1px solid #dce5ed;
}

.link-card a:hover {
  color: var(--red);
}

.empty-state {
  margin: 28px 0;
  padding: 28px;
  border: 1px dashed #a9bac6;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

footer {
  padding: 32px 0 42px;
  color: var(--muted);
  font-size: 0.94rem;
}

.results-dialog {
  width: min(1040px, calc(100% - 24px));
  max-height: min(86vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #b9cad6;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(8, 55, 82, 0.3);
}

.results-dialog::backdrop {
  background: rgba(8, 31, 47, 0.62);
  backdrop-filter: blur(3px);
}

.dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(86vh, 900px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.dialog-header h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.45rem;
}

.dialog-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.dialog-close {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #bdcbd6;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  border-color: var(--red);
  color: var(--red);
  outline: none;
}

.dialog-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
}

.dialog-results .link-card {
  min-height: 0;
  height: max-content;
  align-content: start;
  overflow: visible;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
    position: static;
  }

  .stats {
    justify-content: flex-start;
  }

  .quick-grid,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landmark-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dialog-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    gap: 16px;
    padding-top: 20px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
  }

  .brand strong {
    font-size: 2.25rem;
  }

  .brand small {
    margin-top: 5px;
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .brand-block p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .urgent-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 14px;
  }

  .urgent-panel span {
    grid-column: 1 / -1;
  }

  .urgent-panel a {
    font-size: 0.92rem;
  }

  .hero-visual {
    margin-top: 2px;
  }

  .hero-visual > a:first-child {
    min-height: 240px;
  }

  .hero-visual > a:first-child::after {
    background: linear-gradient(0deg, rgba(5, 26, 41, 0.84), rgba(5, 26, 41, 0.12) 78%);
  }

  .hero-copy {
    right: 18px;
    bottom: 34px;
    left: 18px;
    gap: 5px;
  }

  .hero-copy strong {
    font-size: 3rem;
  }

  .hero-copy span {
    font-size: 1.15rem;
  }

  .hero-credit {
    right: 8px;
    bottom: 6px;
    max-width: calc(100% - 16px);
    font-size: 0.75rem;
  }

  .controls {
    gap: 10px;
    padding: 12px;
  }

  .stats {
    white-space: normal;
  }

  .filter-block {
    gap: 16px;
    padding-top: 14px;
  }

  .chip-nav {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .chip-nav button {
    flex: 0 0 auto;
    min-height: 44px;
    scroll-snap-align: start;
  }

  .quick-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .landmark-heading {
    display: grid;
    gap: 4px;
  }

  .landmark-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-card {
    min-width: 0;
    min-height: 0;
    padding: 14px;
  }

  .card-top {
    flex-wrap: wrap;
  }

  .link-card h3,
  .link-card p {
    overflow-wrap: anywhere;
  }

  .card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .card-actions a,
  .card-actions a:first-child {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 7px 8px;
    border: 1px solid #c9d6df;
    border-radius: 6px;
    background: #f8fbfd;
    text-align: center;
  }

  .results-dialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    margin: auto;
  }

  .dialog-shell {
    max-height: calc(100dvh - 12px);
  }

  .dialog-header {
    gap: 10px;
    padding: 14px;
  }

  .dialog-header h2 {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }

  .dialog-close {
    width: 44px;
    height: 44px;
  }

  .dialog-results {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

@media (max-width: 390px) {
  .site-header,
  main,
  footer {
    width: min(100% - 14px, 1180px);
  }

  .landmark-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .dialog-header p {
    font-size: 0.82rem;
  }
}
