/* Plant Food System Summit look: deep green #006838, lime #8DC63F, Montserrat, pill buttons, tag blocks. */
@font-face {
  font-family: "Montserrat";
  src: url("assets/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #006838;
  --green-deep: #004d29;
  --lime: #8dc63f;
  --lime-ink: #0d3b1e;     /* text on lime */
  --lime-soft: #eef6e2;
  --ink: #333333;
  --muted: #67706a;
  --panel: #f3f3f3;
  --line: #e1e3dd;
  --card: #ffffff;
  --magenta: #cc3366;
  --orange: #c46a00;
  --warn: #8a4b00;
  --warn-soft: #fff0d9;
  --bad: #b0244f;
  --bad-soft: #fbe3ea;
  --radius: 12px;
  --head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--panel); color: var(--ink);
  font: 16px/1.5 -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, button, .btn, .tag, .eyebrow, .kicker, .pick, .team > summary, .crit .lbl, th, .pill, .status, .foot-stats, .summary {
  font-family: var(--head);
}
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--green) url("assets/field-sm.jpg") center / cover no-repeat;
}
@media (min-width: 900px) { .hero { background-image: url("assets/field.jpg"); } }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 40, 20, .35) 0%, rgba(0, 50, 26, .55) 55%, rgba(0, 60, 30, .88) 100%);
}
.hero-inner {
  position: relative; max-width: 680px; margin: 0 auto; padding: 18px 16px 52px;
}
.wide-hero .hero-inner { max-width: 1140px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.logo { display: block; width: 78px; flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.logo img { display: block; width: 100%; height: auto; }
.tags { display: flex; flex-direction: column; align-items: flex-end; }
.tag {
  display: inline-block; padding: 3px 10px; font-size: 15px; font-weight: 500; line-height: 1.35; white-space: nowrap;
}
.tag-dark { background: var(--green); color: var(--lime); }
.tag-lime { background: var(--lime); color: var(--green); text-transform: uppercase; letter-spacing: .02em; }
.kicker { margin-top: 18px; font-size: 15px; font-weight: 500; color: #fff; opacity: .95; }
.hero h1 {
  margin: 2px 0 0; font-weight: 800; font-size: clamp(30px, 8.5vw, 46px); line-height: 1.04; letter-spacing: -.01em;
  text-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.hero .lede { margin: 8px 0 0; font-size: 16px; color: #eaf5dc; max-width: 34em; }
.hero.compact .hero-inner { padding: 12px 16px 40px; }
.hero.compact .logo { width: 54px; }
.hero.compact .kicker { margin-top: 10px; }
.hero.compact h1 { font-size: clamp(26px, 7vw, 34px); }

/* content panel overlaps the hero, like the summit's keynote panel */
main { position: relative; max-width: 680px; margin: -28px auto 0; padding: 0 12px 130px; }
main.wide { max-width: 1140px; }

/* ---------------------------------------------------------------- basics */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,40,20,.06); }
.eyebrow { color: var(--lime); font-weight: 600; font-size: 15px; }
h2 { font-size: 22px; font-weight: 800; color: var(--green); margin: 32px 4px 12px; }

button, .btn {
  font-size: 15px; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 30px; padding: 10px 20px; min-height: 44px; cursor: pointer; touch-action: manipulation;
  transition: background-color .12s, border-color .12s, transform .06s;
}
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: #7fb733; border-color: #7fb733; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-danger { color: var(--bad); border-color: #ecc0cd; background: #fff; }
.link { border: 0; background: none; color: var(--green); padding: 4px 0; min-height: 0; text-decoration: underline; font-weight: 600; }

input[type=text], input[type=password], input[type=number], input[inputmode] {
  font: inherit; font-size: 18px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus { border-color: var(--green); outline: none; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 8px 0; }

/* big state messages (audience) */
.big-msg { padding: 36px 22px 30px; text-align: center; }
.big-msg .icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 14px; transform: rotate(-8deg);
  background: var(--green); color: var(--lime); display: grid; place-items: center; font-size: 30px;
}
.big-msg .icon > * { transform: rotate(8deg); }
.big-msg h3 { font-size: 24px; font-weight: 800; color: var(--green); margin: 0 0 6px; line-height: 1.15; }

/* ---------------------------------------------------------------- audience ballot */
.intro { background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.points { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.points span { font-family: var(--head); font-size: 13px; font-weight: 600; background: var(--lime-soft); color: var(--green); border-radius: 30px; padding: 3px 10px; }
.pick-list { display: grid; gap: 8px; }
.pick {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; min-height: 60px; border-radius: var(--radius); font-size: 17px; font-weight: 600;
  border: 2px solid transparent; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.pick .num { color: var(--green); opacity: .55; font-size: 14px; width: 22px; flex: none; text-align: right; font-weight: 700; }
.pick .name { flex: 1; line-height: 1.25; }
.pick .badge {
  flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  border: 2px dashed #cfd6c8; color: transparent; font-weight: 800; font-size: 17px; transform: rotate(-8deg);
}
.pick.sel { background: var(--green); color: #fff; border-color: var(--green); }
.pick.sel .num { color: var(--lime); opacity: 1; }
.pick.sel .badge { border: 0; background: var(--lime); color: var(--green); }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgba(255,255,255,.97);
  border-top: 3px solid var(--lime); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  backdrop-filter: blur(6px); box-shadow: 0 -6px 20px rgba(0,40,20,.08);
}
.sticky-bar .inner { max-width: 656px; margin: 0 auto; }
.summary { font-size: 14px; color: var(--muted); margin-bottom: 8px; min-height: 20px; font-weight: 500; }
.summary b { color: var(--green); font-weight: 800; }

/* ---------------------------------------------------------------- jury */
.status { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 30px; background: var(--lime-soft); color: var(--green); white-space: nowrap; }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-family: var(--head); font-size: 15px; }
.help summary { font-family: var(--head); font-weight: 700; color: var(--green); cursor: pointer; }
.team { padding: 0; overflow: hidden; }
.team > summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; min-height: 62px;
}
.team > summary::-webkit-details-marker { display: none; }
.team > summary .num {
  flex: none; width: 32px; height: 32px; border-radius: 8px; transform: rotate(-8deg);
  background: var(--green); color: var(--lime); display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.team > summary .name { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.25; }
.team > summary .tot {
  font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted);
  padding: 3px 10px; border-radius: 30px; background: var(--panel);
}
.team.done > summary .tot { background: var(--lime); color: var(--lime-ink); font-weight: 800; }
.team.abst > summary .tot { background: #e6e6e6; color: var(--muted); }
.team.part > summary .tot { background: var(--warn-soft); color: var(--warn); }
.team[open] > summary { border-bottom: 1px solid var(--line); }
.team[open] > summary .num { background: var(--lime); color: var(--green); }
.team .body { padding: 4px 14px 16px; }
.crit { margin-top: 14px; }
.crit .lbl { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink); }
.crit .lbl .val { color: var(--green); font-weight: 800; }
.crit .hint { font-size: 13px; color: var(--muted); margin: 1px 0 7px; line-height: 1.35; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.scale button {
  min-height: 46px; padding: 0; border-radius: 9px; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600;
  border: 1.5px solid var(--line); background: #fafaf8;
}
.scale button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 800; box-shadow: inset 0 -3px 0 var(--lime); }
.abstain { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--panel); font-size: 15px; cursor: pointer; }
.abstain input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.team.abst .crit { opacity: .3; pointer-events: none; }
.locked .scale button, .locked .abstain { pointer-events: none; }
.who-list { display: grid; gap: 8px; }
.who-list button { min-height: 56px; font-size: 17px; border-radius: var(--radius); border-color: transparent; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-align: left; padding: 12px 18px; }
.foot-stats { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--green); }

/* ---------------------------------------------------------------- admin */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle b { font-family: var(--head); font-size: 17px; color: var(--green); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 30px; background: var(--lime); color: var(--lime-ink); letter-spacing: .03em; margin-right: 4px; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--magenta); color: #fff; }
.pill.off { background: #e4e4e4; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--green); font-weight: 700; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.first td { background: var(--lime-soft); font-weight: 800; color: var(--green); }
tr.first td:first-child { box-shadow: inset 4px 0 0 var(--lime); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,40,20,.06); }
.matrix td, .matrix th { text-align: center; padding: 7px 4px; }
.matrix td:first-child, .matrix th:first-child { text-align: left; white-space: nowrap; padding-left: 12px; }
.m-done { color: var(--green); font-weight: 800; }
.m-partial { color: var(--orange); font-weight: 800; }
.m-abstain { color: var(--muted); }
.m-none { color: #c9ccc4; }
.edit-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.edit-row.j { grid-template-columns: 1fr auto auto; }
.edit-row input[type=text], .edit-row input[type=number] { font-size: 15px; padding: 8px 10px; }
.edit-row label { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.edit-row input[type=checkbox] { accent-color: var(--green); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
#foot-stats { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
