:root {
  --bg: #f3f6f1;
  --card: #ffffff;
  --text: #1d2a1f;
  --muted: #5d6e60;
  --primary: #2f7d4f;
  --primary-dark: #256640;
  --accent: #d9a441;
  --accent-soft: #f6ead0;
  --line: #dde5da;
  --paper: #fbf7ec;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .08);
  --font-head: "DM Serif Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-common: #5d6e60;
  --r-uncommon: #2f7d4f;
  --r-rare: #2b6cb0;
  --r-epic: #7b4bb3;
  --r-legendary: #95600a;
  --r-mythic: #c2410c;
  --r-secret: #1d2a1f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: 48px; }
h2 { font-size: 28px; margin-top: 48px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--primary); letter-spacing: .02em; margin-bottom: 12px; }
.lead { font-size: 18px; max-width: 70ch; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 24px; }

/* Header and footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-size: 22px; }
.brand-mark { width: 28px; height: 28px; color: var(--primary); }
.nav { display: flex; gap: 8px; }
.nav a { white-space: nowrap; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--radius); }
.nav a:hover { background: var(--bg); color: var(--primary); }
.site-footer { margin-top: 64px; padding: 48px 0 24px; background: var(--card); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-brand { font-family: var(--font-head); font-size: 22px; margin-bottom: 8px; }
.footer-links { display: grid; gap: 8px; font-size: 15px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--radius); font: 600 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--card); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--bg); }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: 600 14px var(--font-body); cursor: pointer; }

/* Hero: active codes as seed packets */
.hero { padding-top: 48px; }
.packets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 32px 0 12px; }
.packet { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; }
.packet-tear { height: 24px; background: var(--accent-soft); border-bottom: 2px dashed var(--accent); }
.packet-body { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.packet-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.packet-code { margin: 0; font-size: 22px; font-weight: 700; word-break: break-all; }
.packet-reward { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.packet .copy-btn { margin-top: auto; }
.copy-btn[data-copied] { background: var(--primary-dark); }
.packets-note { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Home hub: codes card + side links */
.hero-inner { padding-top: 16px; }
.hub { display: grid; gap: 16px; margin-top: 32px; }
.hub a { text-decoration: none; color: var(--text); }
.hub-codes { display: flex; flex-direction: column; gap: 12px; background: var(--paper); border-top: 4px dashed var(--accent); }
.hub-codes:hover, .hub-link:hover { box-shadow: var(--shadow-2); }
.hub-kicker { font-size: 14px; font-weight: 600; color: var(--primary); }
.hub-title { font-family: var(--font-head); font-size: 28px; line-height: 1.2; }
.code-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.code-chip { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-weight: 700; }
.hub-more { font-weight: 600; color: var(--primary); margin-top: auto; }
.hub-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hub-link { display: flex; flex-direction: column; gap: 4px; }
.hub-link .hub-title { font-size: 22px; }

/* Redeem + expired split */
.split { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: start; }
.split h2 { margin-top: 48px; }
.split-side { margin-top: 48px; }
.split-side h3 { font-size: 22px; }
.steps { padding-left: 24px; margin: 0; }
.steps li { margin-bottom: 12px; max-width: 70ch; }
.expired { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.expired code { text-decoration: line-through; color: var(--muted); }

/* Article */
.article { max-width: 1120px; }
.article > * { max-width: 70ch; }
.article table { max-width: 100%; }
.article h2:first-child { margin-top: 48px; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin-bottom: 8px; }
.page-article { padding-top: 16px; }
.crumbs { padding-top: 24px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.notfound { padding-top: 64px; }
.article table, .plants { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article th, .article td, .plants th, .plants td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.article thead th, .plants thead th { background: var(--bg); font-weight: 700; }

/* FAQ */
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 0 24px; }
.faq-item summary { cursor: pointer; padding: 16px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { display: inline; font-family: var(--font-body); font-weight: 600; font-size: 18px; }
.faq-item p { max-width: 70ch; }

/* Plant index */
.index-head { padding-top: 16px; }
.filters { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 24px 0 16px; }
.field { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select { font: 400 16px var(--font-body); padding: 8px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 600 14px var(--font-body); cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.table-wrap { overflow-x: auto; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--r-common); }
.tag-uncommon { background: var(--r-uncommon); }
.tag-rare { background: var(--r-rare); }
.tag-epic { background: var(--r-epic); }
.tag-legendary { background: var(--r-legendary); }
.tag-mythic, .tag-mythical { background: var(--r-mythic); }
.tag-secret, .tag-eternal { background: var(--r-secret); }
.tag-unknown { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.empty-row { padding: 16px; }

/* Discussion */
.discuss-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 48px; }
.discuss-head h2 { margin: 0; }
.discuss-actions { display: flex; align-items: center; gap: 8px; }
.like-btn[aria-pressed="true"] { background: var(--primary); color: #fff; }
.comment-form { display: grid; gap: 12px; margin-bottom: 24px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.comment-form:not([data-gf-replying]) [data-gf-reply-cancel], .comment-form:not([data-gf-replying]) .replying { display: none; }
.comment { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment[data-gf-owner] { background: var(--accent-soft); border-radius: var(--radius); padding: 16px; }
.comment-meta { margin-bottom: 4px; }
.owner-tag { display: none; font-size: 12px; font-weight: 700; color: var(--primary); }
.comment[data-gf-owner] .owner-tag { display: inline; }
.replies { margin-left: 24px; }
.comments-empty { display: none; }
.comments[data-gf-empty] .comments-empty { display: block; }
.comments[data-gf-off] { display: none; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 32px; }
  .header-row { gap: 8px; }
  .brand { font-size: 18px; gap: 6px; }
  .brand-mark { width: 22px; height: 22px; }
  .nav { gap: 0; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .nav a { padding: 8px 6px; font-size: 13px; }
  .split, .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .hub-side { grid-template-columns: 1fr; }
  .hub-title { font-size: 24px; }
  .split-side { margin-top: 24px; }
  .hero-actions .btn { width: 100%; }
  .packets { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .packet-tear { height: 8px; }
  .packet-body { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px 16px; }
  .packet-label { grid-column: 1 / -1; }
  .packet-code { grid-column: 1; grid-row: 2; font-size: 20px; }
  .packet .copy-btn { grid-column: 2; grid-row: 2; margin-top: 0; }
  .packet-reward { grid-column: 1 / -1; margin: 0; font-size: 14px; }
  .article th, .article td, .plants th, .plants td { padding: 8px 12px; }
}

/* Home hero with luck calculator */
.hero-split { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.calc { display: grid; gap: 8px; padding: 20px 24px; box-shadow: var(--shadow-2); }
.calc-title { font-size: 22px; margin: 0; }
.calc .field select, .calc .field input { min-height: 40px; padding: 6px 12px; }
.calc-boosts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.calc-result { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; }
.calc-result p { margin: 0 0 4px; }
.calc-odds strong { font-size: 18px; color: var(--primary-dark); }
.calc-note { margin: 0; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 0; }
  .hero-text { display: contents; }
  .hero-split .calc { order: 1; margin-top: 24px; }
  .hero-split .hub { order: 2; }
}
