:root {
  color-scheme: light;
  --background: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --text: #17201c;
  --muted: #5d6964;
  --line: #d8e1dc;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --accent-soft: #d9f2ee;
  --warn: #9f2f2f;
  --shadow: 0 18px 48px rgba(23, 32, 28, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: grid;
  gap: 0.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand strong,
.login-box h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.1;
}

.header-actions,
.nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a,
button,
.button-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  white-space: nowrap;
}

.nav a.active,
button,
.button-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

button {
  cursor: pointer;
  font: inherit;
}

button.secondary {
  background: var(--surface);
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem) 0 4rem;
}

.hero,
.detail-hero {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1.4rem, 5vw, 3rem);
  background: linear-gradient(135deg, #ffffff 0%, #e8f4ef 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero h1,
.detail-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p,
.detail-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

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

.option-card,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.option-card {
  display: grid;
  min-height: 430px;
  gap: 1.35rem;
  align-content: space-between;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}

.option-card h2,
.section-heading h2,
.card h3 {
  margin: 0;
}

.option-card h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.option-card p,
.card p {
  color: var(--muted);
}

.summary-list,
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.summary-list div,
.hero-stats div {
  min-width: 0;
  padding: 0.9rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

dd {
  margin: 0.2rem 0 0;
  font-size: 1.08rem;
  font-weight: 750;
}

.back-link {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.content-section {
  margin-top: clamp(1.6rem, 5vw, 3rem);
}

.section-heading {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

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

.stack {
  display: grid;
  gap: 1rem;
}

.compact-stack {
  gap: 0.75rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.card {
  padding: 1rem;
}

.day-card {
  display: grid;
  gap: 0.45rem;
}

.day-card span {
  color: var(--accent-dark);
  font-weight: 800;
}

.card h3 a {
  text-decoration: none;
}

.card ul {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

.timeline {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: route;
}

.timeline li {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline li::before {
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  content: counter(route);
  counter-increment: route;
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline span {
  display: block;
  color: var(--muted);
}

.timeline p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

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

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-box {
  width: min(420px, 100%);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-box form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.error {
  margin: 0;
  color: var(--warn);
}

@media (max-width: 820px) {
  .site-header,
  .header-actions,
  .two-column,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .header-actions {
    display: grid;
    align-items: stretch;
  }

  .nav,
  .header-actions form,
  .header-actions button {
    width: 100%;
  }

  .nav a,
  .button-link {
    flex: 1;
  }

  .option-card {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 1rem, 1120px);
  }

  .hero,
  .detail-hero {
    padding: 1.1rem;
  }

  .summary-list,
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
