:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-strong: #eef3e8;
  --text: #172019;
  --muted: #5d6b62;
  --line: #d9dfd2;
  --blue: #355d46;
  --blue-dark: #234334;
  --orange: #b9783f;
  --green: #4f7c58;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(23, 32, 25, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

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

code {
  background: #eef3e8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #294536;
  font-size: 0.92em;
  padding: 0.1rem 0.32rem;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #1d2b22;
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 0.78rem;
  height: 34px;
  justify-content: center;
  width: 42px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.nav a {
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 0.48rem 0.72rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: #eaf1e8;
  color: var(--blue-dark);
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 3rem 5vw 4rem;
}

.hero {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  min-height: calc(100vh - 190px);
}

.venue-hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(340px, 1.18fr);
}

.hero-copy h1,
.page-hero h1,
.auth-panel h1 {
  font-size: clamp(2.4rem, 6.2vw, 5rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
  max-width: 780px;
}

.hero-copy p,
.page-hero p,
.auth-panel p {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 1.4rem 0 0;
  max-width: 680px;
}

.hero-copy p {
  max-width: 560px;
}

.hero-image {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1rem;
  text-decoration: none;
}

.button.primary {
  background: var(--blue);
  color: white;
}

.button.secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
}

.split-section,
.timeline,
.columns,
.cache-board,
.contrast-callout,
.demo-panel,
.auth-panel {
  margin-top: 4.5rem;
}

.split-section {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: 0.75fr 1.25fr;
}

.section-label {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.12rem;
  margin: 0 0 0.45rem;
}

.behavior-grid,
.columns,
.cache-board {
  display: grid;
  gap: 1rem;
}

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

.behavior-grid article,
.columns article,
.cache-card,
.contrast-callout,
.demo-panel,
.timeline,
.login-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.35rem;
}

.timeline ol {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.2rem;
}

.page-hero.compact {
  max-width: 840px;
}

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

.cache-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cache-card {
  cursor: pointer;
  min-height: 230px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.cache-card:hover,
.cache-card.selected {
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(29, 104, 242, 0.12);
  transform: translateY(-2px);
}

.cache-token {
  align-items: center;
  background: var(--surface-strong);
  border-radius: 8px;
  color: var(--blue-dark);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 58px;
}

.contrast-callout {
  border-left: 5px solid var(--green);
}

.demo-panel {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: 0.85fr 1.15fr;
}

.demo-panel.two-column {
  border-left: 5px solid var(--orange);
}

.check-list {
  display: grid;
  gap: 0.78rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  border-bottom: 1px solid var(--line);
  padding: 0 0 0.78rem 1.55rem;
  position: relative;
}

.check-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.check-list li::before {
  background: var(--green);
  border-radius: 999px;
  content: "";
  height: 0.55rem;
  left: 0;
  position: absolute;
  top: 0.52rem;
  width: 0.55rem;
}

.auth-panel {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-form label {
  color: var(--text);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.35rem;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 0.7rem 0.82rem;
}

.login-form select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 0.7rem 0.82rem;
}

.login-form input:focus,
.login-form select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(29, 104, 242, 0.16);
}

.screen-reader-only {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.notice {
  background: #ecfdf3;
  border: 1px solid #b7ebc9;
  border-radius: 8px;
  color: #14532d;
  padding: 0.8rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem 5vw;
}

@media (max-width: 900px) {
  .hero,
  .split-section,
  .demo-panel,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

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

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 1rem;
    padding-top: 1rem;
    position: static;
  }

  main {
    padding-top: 2.4rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .auth-panel h1 {
    font-size: 2.35rem;
    line-height: 1.04;
  }

  .behavior-grid,
  .columns,
  .cache-board {
    grid-template-columns: 1fr;
  }

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