:root {
  color-scheme: dark;
  --ink: #e7f0ee;
  --muted: #a8bab7;
  --paper: #14211f;
  --wash: #000000;
  --accent: #59c7b5;
  --accent-dark: #8bdfd1;
  --line: #30433f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-size: 1.05rem;
  line-height: 1.7;
}

.site-header {
  padding: clamp(1rem, 3vw, 2rem) 1rem 0;
}

.logo-link {
  display: block;
  width: min(100%, 760px);
  margin: auto;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(.72) contrast(1.08);
}

main {
  width: min(100% - 2rem, 900px);
  margin: clamp(1rem, 4vw, 2.5rem) auto 4rem;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(20, 33, 31, .96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

h1, h2 {
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}

h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); }

h3 {
  margin: 2rem 0 .6rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

h4 { margin: 1.4rem 0 .4rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}

pre {
  overflow-x: auto;
  padding: .9rem 1rem;
  color: #dff7f2;
  background: #000000;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #182825;
  font-size: .96rem;
}

th, td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th { color: var(--accent-dark); background: #20332f; }
tr:last-child td { border-bottom: 0; }

a {
  color: var(--accent-dark);
  text-decoration-color: rgba(25, 112, 100, .4);
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid #f2bd52; outline-offset: 3px; }

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

ol, ul { padding-left: 1.4rem; }

main > ol > li,
main > ul > li {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  background: #182825;
  border: 1px solid var(--line);
  border-radius: 12px;
}

li::marker { color: var(--accent); font-weight: 700; }

details { margin: -1rem -1.15rem; }

summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 1.2rem;
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
  transform: translateY(-50%) rotate(90deg);
  transition: transform .15s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(-90deg);
}

summary:hover { color: var(--accent-dark); }

summary:focus-visible {
  outline: 3px solid #f2bd52;
  outline-offset: -3px;
  border-radius: 10px;
}

.answer {
  padding: 0 1.15rem 1rem;
  color: var(--muted);
}

.intro { font-size: 1.18rem; color: var(--muted); }

.link-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.link-card {
  display: block;
  padding: 1.1rem 1.25rem;
  background: #1a2b28;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.map {
  display: block;
  width: 100%;
  height: min(650px, 72vh);
  margin-top: 1rem;
  border: 1px solid var(--line) !important;
  border-radius: 14px;
}

small { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  main { width: min(100% - 1rem, 900px); padding: 1.2rem; border-radius: 16px; }
  .site-header { padding: .5rem .5rem 0; }
  .link-group { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link-card, summary::after { transition: none; }
}
