:root {
  color-scheme: dark;
  --ink: #f7f7f4;
  --muted: #c3c7c2;
  --line: rgba(238, 240, 235, 0.18);
  --paper: #090d0a;
  --panel: rgba(18, 25, 20, 0.88);
  --panel-strong: rgba(24, 34, 27, 0.95);
  --soft: rgba(39, 52, 42, 0.72);
  --accent: #57c58c;
  --accent-dark: #31a76c;
  --accent-soft: rgba(87, 197, 140, 0.16);
  --danger: #e05f58;
  --danger-soft: rgba(224, 95, 88, 0.16);
  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;
  background:
    radial-gradient(circle at 18% 0%, rgba(87, 197, 140, 0.14), transparent 34rem),
    linear-gradient(145deg, #0b100c 0%, #111a13 54%, #0b100c 100%);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

body::before {
  background: url("assets/cedar-flag.svg") center / cover no-repeat;
  content: "";
  filter: blur(2px);
  inset: -24px;
  opacity: 0.2;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body::after {
  background:
    radial-gradient(circle at 50% 18%, rgba(9, 13, 10, 0.08), rgba(9, 13, 10, 0.58) 62%),
    rgba(9, 13, 10, 0.28);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: rgba(9, 13, 10, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  max-width: min(58vw, 520px);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  position: relative;
}

nav a,
.nav-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 0;
  text-decoration: none;
}

nav a:hover,
.nav-button:hover,
.brand:hover {
  color: var(--accent);
}

.header-menu {
  position: relative;
}

.header-menu summary {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  height: 40px;
  justify-content: center;
  list-style: none;
  width: 44px;
}

.header-menu summary::-webkit-details-marker {
  display: none;
}

.header-menu summary span {
  background: var(--ink);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 18px;
}

.header-menu-panel {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  padding: 22px;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(760px, calc(100vw - 36px));
  z-index: 20;
}

.header-menu-panel h2 {
  font-size: 14px;
  margin: 0 0 10px;
}

.header-menu-panel a {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: block;
  font-size: 14px;
  padding: 10px 0;
  text-decoration: none;
}

.header-menu-panel a:hover {
  color: var(--accent);
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 28px 56px;
  position: relative;
  z-index: 1;
}

.hero {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  min-height: 520px;
  padding: 72px 0 52px;
}

.hero h1 {
  font-size: clamp(56px, 9vw, 112px);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
}

.hero-line {
  color: var(--muted);
  font-size: 24px;
  margin: 18px 0 28px;
}

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

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--accent);
  color: #061009;
}

.button.primary:hover {
  border-color: #8be0b3;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.tutorial-card,
.menu-group,
.content-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(28, 45, 33, 0.08);
}

.tutorial-launch {
  font-size: clamp(24px, 4vw, 42px);
  min-height: 180px;
  padding: 22px 28px;
  width: 100%;
}

.status-pill {
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  padding: 5px 10px;
}

.section-heading {
  margin: 24px 0 18px;
}

.section-heading h2 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  margin: 0;
}

.menu-section {
  padding: 36px 0;
}

.subpage-menu {
  margin-top: 28px;
}

.tutorial-modal[hidden] {
  display: none;
}

.tutorial-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.tutorial-backdrop {
  backdrop-filter: blur(10px);
  background: rgba(3, 6, 4, 0.72);
  inset: 0;
  position: absolute;
}

.tutorial-popup {
  display: flex;
  flex-direction: column;
  height: min(460px, calc(100vh - 48px));
  max-height: min(460px, calc(100vh - 48px));
  max-width: 560px;
  overflow: hidden;
  position: relative;
  width: min(100%, 560px);
  z-index: 1;
}

.modal-header {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 14px 18px;
}

.modal-header h2 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.08;
  margin: 0;
}

.close-button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 36px;
  padding: 7px 10px;
}

.close-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tutorial-card {
  border-radius: 0 0 8px 8px;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.tutorial-real {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 22px;
}

.tutorial-status {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.tutorial-mode {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.tutorial-real h3 {
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
  margin: 0 0 16px;
}

.tutorial-inline-icon {
  display: inline-block;
  height: 1em;
  margin: 0 0.05em;
  object-fit: contain;
  vertical-align: -0.14em;
  width: 1em;
}

.tutorial-points {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.tutorial-points li {
  color: var(--muted);
  font-size: 16px;
  list-style: none;
  padding-left: 22px;
  position: relative;
}

.tutorial-points li::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  height: 6px;
  left: 3px;
  position: absolute;
  top: 10px;
  width: 6px;
}

.tutorial-controls {
  background: rgba(255, 255, 255, 0.035);
  border-top: 1px solid var(--line);
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}

.step-dots {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dot {
  background: rgba(214, 224, 214, 0.28);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 8px;
  padding: 0;
  width: 8px;
}

.dot.active {
  background: var(--accent);
  width: 22px;
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row .button {
  flex: 1;
}

.menu-grid {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-group {
  box-shadow: none;
  min-height: 260px;
  padding: clamp(24px, 4vw, 36px);
}

.menu-group h3 {
  font-size: 20px;
  margin: 0 0 22px;
}

.menu-group a {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: block;
  font-size: 17px;
  padding: 16px 0;
  text-decoration: none;
}

.menu-group a:hover {
  color: var(--accent);
}

.page-main {
  max-width: 820px;
  padding-top: 56px;
}

.content-card {
  box-shadow: none;
  padding: 34px;
}

.content-card h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  margin: 0 0 18px;
}

.content-card h2 {
  margin: 30px 0 8px;
}

.content-card h3 {
  font-size: 20px;
  margin: 24px 0 6px;
}

.content-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}

.content-card p,
.content-card li {
  color: var(--muted);
  font-size: 18px;
}

.content-card ul {
  padding-left: 22px;
}

.back-link {
  color: var(--accent);
  display: inline-block;
  font-weight: 750;
  margin-bottom: 18px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero,
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .tutorial-popup {
    height: min(460px, calc(100vh - 32px));
    max-height: min(460px, calc(100vh - 32px));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
  }

  .brand {
    max-width: calc(100% - 58px);
  }

  nav {
    gap: 12px;
  }

  .header-menu-panel {
    grid-template-columns: 1fr;
    left: auto;
    right: 0;
    width: calc(100vw - 36px);
  }

  main {
    padding: 0 18px 40px;
  }

  .tutorial-modal {
    padding: 14px;
  }

  .modal-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .close-button {
    width: 100%;
  }

  .hero-line {
    font-size: 20px;
  }

  .tutorial-real,
  .content-card {
    padding: 18px;
  }
}
