:root {
  color-scheme: dark;
  --bg: #090b12;
  --panel: #111722;
  --panel-strong: #182233;
  --ink: #f4f7fb;
  --muted: #9eacc2;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #f7c948;
  --amber: #f59e0b;
  --green: #6ee7b7;
  --cyan: #67e8f9;
  --rose: #fb7185;
  --violet: #c4b5fd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(247, 201, 72, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(103, 232, 249, 0.1), transparent 26rem),
    linear-gradient(180deg, #090b12 0%, #0d111a 52%, #080a10 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 var(--line);
  background: rgba(9, 11, 18, 0.88);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.brand strong {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topnav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 11px;
  text-decoration: none;
  font-size: 0.84rem;
}

.topnav a:hover,
.topnav a.active {
  border-color: rgba(247, 201, 72, 0.38);
  color: var(--ink);
  background: rgba(247, 201, 72, 0.1);
}

.hero {
  padding: 58px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: center;
}

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

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

h1 {
  margin: 10px 0 14px;
  max-width: 780px;
  font-size: clamp(2.2rem, 7vw, 4.9rem);
  line-height: 0.96;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.04rem;
}

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

.lead {
  max-width: 760px;
  color: #dbe5f4;
  font-size: 1.08rem;
}

.hero-card,
.card,
.callout,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.84);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.hero-card {
  padding: 24px;
}

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

.icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  color: #dbe5f4;
  font-size: 0.88rem;
}

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

.section {
  padding: 28px 0;
}

.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);
}

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

.card-link:hover {
  border-color: rgba(247, 201, 72, 0.45);
  transform: translateY(-1px);
}

.number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 8px;
  color: #111827;
  background: var(--gold);
  font-weight: 900;
}

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

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

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

.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: 600;
  line-height: 1.35;
}

.asset-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 3px 6px 3px 0;
  color: #dbe5f4;
  font-size: 0.84rem;
  font-weight: 750;
  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.04);
  padding: 4px 6px;
  color: #dbe5f4;
  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(--ink);
}

.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: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.78);
  margin: 14px 0;
  overflow: hidden;
}

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

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

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

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.04);
  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(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-title {
  background: rgba(247, 201, 72, 0.08);
  color: #ffe08a;
  font-size: 0.86rem;
  letter-spacing: 0;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
}

td {
  color: #d7dfed;
}

.formula {
  overflow-x: auto;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.06);
  color: #dffbff;
  padding: 14px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
}

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

.footer-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: #dbe5f4;
  text-decoration: none;
}

.footer-nav a:hover {
  border-color: rgba(247, 201, 72, 0.5);
}

@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 {
    grid-template-columns: 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;
  }
}
