:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1a1f2e;
  --text-muted: #5c6478;
  --border: #e2ddd3;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --mk: #2563eb;
  --epcot: #7c3aed;
  --hs: #ea580c;
  --ak: #16a34a;
  --highlight: #fef3c7;
  --shadow: 0 1px 3px rgba(26, 31, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 31, 46, 0.12);
  --radius: 12px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --sidebar-width: 280px;
  --header-height: 72px;
  --content-max: 820px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--mk), var(--epcot));
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-icon {
  width: 1rem;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
}

.sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 1.5rem 1rem 2rem 1.25rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.toc a {
  display: block;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.toc a:hover {
  color: var(--text);
  background: var(--surface);
}

.toc a.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.toc a.toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.78rem;
}

.content {
  padding: 2rem 2.5rem 4rem;
  min-width: 0;
}

.plan {
  max-width: var(--content-max);
}

/* Typography in plan */
.plan > h1:first-child {
  display: none;
}

.plan h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  line-height: 1.25;
}

.plan h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.plan h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.plan p {
  margin: 0 0 1rem;
  color: var(--text);
}

.plan strong {
  font-weight: 600;
  color: var(--text);
}

.plan a {
  color: var(--accent);
  text-decoration-underline-offset: 3px;
}

.plan a:hover {
  text-decoration-thickness: 2px;
}

.plan hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

.plan code {
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  background: var(--highlight);
  border-radius: 4px;
}

/* Tables */
.plan table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.plan th {
  background: #f0ede6;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.plan tr:last-child td {
  border-bottom: none;
}

.plan tr:hover td {
  background: rgba(29, 78, 216, 0.03);
}

/* Lists */
.plan ul,
.plan ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.plan li {
  margin-bottom: 0.4rem;
}

.check-item {
  list-style: none;
  margin-left: -1.35rem;
  padding: 0.35rem 0;
}

.check-item label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s;
}

.check-item label:hover {
  background: var(--surface);
}

.check-item input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.check-item input:checked + span {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border);
}

/* Park section accents via heading text */
.plan h3:has(+ table) {
  position: relative;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0.25rem 0;
}

.footer-note {
  font-size: 0.8rem;
}

/* Back to top */
.back-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  filter: brightness(1.08);
}

/* Mobile */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    z-index: 90;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .sidebar.open {
    max-height: 60vh;
    padding: 1rem 1.25rem 1.5rem;
    overflow-y: auto;
  }

  .content {
    padding: 1.5rem 1.25rem 3rem;
  }

  .plan table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .plan h2 {
    font-size: 1.4rem;
  }
}

@media print {
  .sidebar,
  .nav-toggle,
  .back-top,
  .site-header {
    display: none !important;
  }

  .layout {
    display: block;
  }

  .content {
    padding: 0;
  }

  .plan table {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}