:root {
  color-scheme: light;
  --ink: #123044;
  --blue: #168eea;
  --blue-deep: #075da8;
  --sun: #ffd84d;
  --coral: #ff7a59;
  --mint: #4fd99a;
  --cream: #fff7d6;
  --paper: #ffffff;
  --soft: #e9f8ff;
  --muted: #5c7282;
  --line: rgba(18, 48, 68, 0.14);
  font-family: Outfit, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f5fbff 0%, #eef9ff 48%, #fffaf0 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 36, 57, 0.94);
  backdrop-filter: blur(8px);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 1.25rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.65rem;
  min-width: 160px;
  text-decoration: none;
}

.brand img {
  border-radius: 999px;
  height: 40px;
  object-fit: contain;
  width: auto;
}

.brand span {
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.15rem;
}

.topnav a {
  color: rgba(255,255,255,0.82);
  padding: 0;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topnav a:hover,
.topnav a.active {
  color: var(--sun);
}

.topnav a.play-link {
  background: linear-gradient(135deg, var(--coral), #ff9e45);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--blue-deep);
  color: #fff;
  padding: 0.45rem 0.85rem;
}

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
}

.eyebrow {
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 10px 0 14px;
  max-width: 820px;
  color: var(--blue-deep);
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 1000;
  line-height: 0.96;
  text-shadow: 2px 2px 0 rgba(255, 216, 77, 0.6);
  text-transform: uppercase;
}

h2 {
  margin: 0 0 16px;
  color: var(--blue-deep);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 1000;
  line-height: 1.05;
}

h3 {
  margin: 0 0 10px;
  color: var(--blue-deep);
  font-size: 1.04rem;
  font-weight: 1000;
}

p {
  color: var(--muted);
  line-height: 1.62;
}

.lead {
  max-width: 780px;
  color: #4f6678;
  font-size: 1.08rem;
  font-weight: 650;
}

.hero-card,
.card,
.callout,
.table-wrap {
  border: 3px solid #fff;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 5px 5px 0 rgba(22,142,234,0.16);
}

.hero-card {
  padding: 1.35rem;
}

.hero-art {
  overflow: hidden;
  padding: 0;
}

.hero-art img,
.feature-art img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.hero-art img {
  aspect-ratio: 16 / 9;
}

.feature-art img {
  aspect-ratio: 4 / 3;
}

.icon-row,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  box-shadow: 2px 2px 0 rgba(255, 216, 77, 0.4);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.icon-chip img,
.mini-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.section {
  padding: 28px 0;
}

.guide-page {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 250px minmax(0, 1fr);
  padding-top: 28px;
}

.guide-page > .hero {
  grid-column: 1 / -1;
}

.guide-content {
  min-width: 0;
}

.guide-sidebar {
  background: rgba(255,255,255,0.92);
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 4px 4px 0 rgba(22,142,234,0.14);
  padding: 1rem;
  position: sticky;
  top: 86px;
}

.guide-sidebar__eyebrow {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.guide-sidebar__home {
  background: var(--blue-deep);
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(255,216,77,0.7);
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 1000;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-sidebar ol {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-sidebar li a {
  align-items: center;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1.65rem minmax(0, 1fr);
  padding: 0.48rem 0.55rem;
  text-decoration: none;
}

.guide-sidebar li a:hover,
.guide-sidebar li a.active {
  background: #eef9ff;
}

.guide-sidebar li span {
  align-items: center;
  background: var(--sun);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 1000;
  height: 1.65rem;
  justify-content: center;
  width: 1.65rem;
}

.guide-sidebar li strong {
  color: var(--blue-deep);
  font-size: 0.88rem;
  line-height: 1.15;
}

.section-band {
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(233,248,255,0.7));
  border-block: 1px solid rgba(255,255,255,0.7);
}

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

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

.card {
  padding: 18px;
}

.card p,
.card li {
  color: var(--muted);
  font-weight: 600;
}

.card-link {
  display: block;
  min-height: 100%;
  text-decoration: none;
}

.card-link:hover {
  border-color: var(--sun);
  transform: translateY(-1px);
}

.number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background: var(--sun);
  font-weight: 1000;
}

.crop-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.crop-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.visual-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.visual-tile {
  border: 3px solid #fff;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 4px 4px 0 rgba(79,217,154,0.18);
  padding: 12px;
  text-align: center;
  text-decoration: none;
}

.visual-tile img {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.visual-tile strong {
  color: var(--blue-deep);
  display: block;
  font-weight: 1000;
}

.visual-tile span {
  color: var(--muted);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2px;
}

.lineage-mini {
  overflow: hidden;
  padding: 0;
}

.lineage-mini img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.lineage-mini div {
  padding: 14px 16px 16px;
}

.asset-name {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 190px;
  color: var(--ink);
  font-weight: 900;
}

.asset-name img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: contain;
}

.crop-desc {
  display: block;
  flex: 1 0 100%;
  margin-left: 40px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.asset-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 3px 6px 3px 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.asset-pill img {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.icon-only {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.icon-only img {
  width: 24px;
  height: 24px;
}

.terrain-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 230px;
}

.terrain-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  padding: 4px 6px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.terrain-chip img {
  width: 18px;
  height: 18px;
}

.stat-pair,
.stat-stack {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-pair img,
.stat-stack img {
  width: 24px;
  height: 24px;
}

.stat-stack {
  margin: 8px 0;
}

.callout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
}

.callout img {
  width: 34px;
  height: 34px;
}

.callout strong {
  color: var(--blue-deep);
}

.callout p {
  margin: 4px 0 0;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 7px 0;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
}

details.reference {
  border: 3px solid #fff;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  box-shadow: 4px 4px 0 rgba(255, 216, 77, 0.18);
  margin: 14px 0;
  overflow: hidden;
}

details.reference summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  color: var(--blue-deep);
  font-weight: 1000;
}

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

details.reference summary::after {
  content: "+";
  float: right;
  color: var(--coral);
}

details.reference[open] summary::after {
  content: "-";
}

.reference-body {
  border-top: 1px solid var(--line);
  padding: 18px;
}

.note-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.note-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  margin: 0;
  padding: 12px;
}

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

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

th {
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-title {
  background: rgba(255, 216, 77, 0.26);
  color: var(--ink);
  font-size: 0.86rem;
  letter-spacing: 0;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
}

td {
  color: #334d5f;
  font-weight: 600;
}

.formula {
  overflow-x: auto;
  border: 2px solid rgba(22,142,234,0.25);
  border-radius: 8px;
  background: rgba(233,248,255,0.9);
  color: #21465e;
  padding: 14px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
}

.tier-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 8px 0 4px;
  flex-wrap: wrap;
}

.tier-head h2 {
  margin: 0;
}

.tier-head .tier-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  padding: 3px 10px;
  margin: 2px 4px 2px 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.pill.good { border-color: rgba(79, 217, 154, 0.6); color: #147a52; }
.pill.warn { border-color: rgba(255, 158, 69, 0.65); color: #a84c14; }
.pill.risk { border-color: rgba(255, 122, 89, 0.7); color: #b33226; }

.footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 34px 0 54px;
}

.footer-nav a {
  border: 3px solid #fff;
  border-radius: 8px;
  background: rgba(255,255,255,0.88);
  box-shadow: 3px 3px 0 rgba(22,142,234,0.16);
  padding: 12px 14px;
  color: var(--blue-deep);
  font-weight: 900;
  text-decoration: none;
}

.footer-nav a:hover {
  border-color: var(--sun);
}

.site-footer {
  background: #060e17;
  color: rgba(255,255,255,0.55);
  padding: 2.5rem 1rem;
  text-align: center;
}

.site-footer__tagline {
  color: var(--sun);
  font-size: 1.1rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.site-footer nav a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer nav a:hover {
  color: var(--sun);
}

.site-footer__copy {
  color: rgba(255,255,255,0.48);
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
}

@media (max-width: 860px) {
  .topbar {
    position: static;
  }

  .topbar .shell,
  .hero-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .topnav {
    justify-content: flex-start;
    padding-bottom: 12px;
  }

  .grid,
  .grid.two,
  .note-list,
  .guide-page {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }

  .guide-sidebar ol {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 520px) {
  .topbar .shell {
    gap: 0.75rem;
  }

  .topnav a {
    font-size: 0.72rem;
    padding: 0.42rem 0.54rem;
  }

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

@media (max-width: 420px) {
  .shell {
    width: min(100% - 22px, 1180px);
  }

  .crop-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .crop-card img {
    width: 54px;
    height: 54px;
  }
}
