/* One stylesheet for the public site and the internal area. System fonts only (no third-party requests). */
:root {
  --green: #1f5f4a; --green-dark: #164536; --green-soft: #e6f1ec; --sun: #ffd166; --sun-soft: #fff6dc;
  --ink: #1c2622; --muted: #5b6963; --line: #d9e0dc; --bg: #fbfaf6; --card: #fff;
  --ok: #1d7a4f; --ok-bg: #e3f4ea; --warn: #8a5a00; --warn-bg: #fff1cc; --bad: #b3261e; --bad-bg: #fde7e5;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 4px 16px rgba(20, 40, 30, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.55; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3 { line-height: 1.2; margin: 1.4em 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: .4em; } h2 { font-size: 1.35rem; } h3 { font-size: 1.08rem; }
p, ul, ol { margin: 0 0 1em; } a { color: var(--green); } img { max-width: 100%; }
small, .muted { color: var(--muted); font-size: .88rem; } small { display: block; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* buttons */
.btn, button { font: inherit; cursor: pointer; }
.btn { display: inline-block; background: var(--green); color: #fff; border: 2px solid var(--green); border-radius: 999px; padding: .55em 1.3em; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-small { padding: .25em .9em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--green); } .btn-ghost:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--ink); } .btn-sun:hover { background: #f5c044; border-color: #f5c044; }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad); } .btn-danger:hover { background: var(--bad); color: #fff; }
button.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; }
form.inline { display: inline; }

/* forms */
.field { margin-bottom: 1rem; } .field label { display: block; font-weight: 600; margin-bottom: .25em; }
.opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea { font: inherit; width: 100%; padding: .55em .7em; border: 1.5px solid #b9c4be; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { resize: vertical; } input[type=checkbox], input[type=radio] { width: 1.15em; height: 1.15em; accent-color: var(--green); flex: none; margin-top: .25em; }
.check { display: flex; gap: .6em; margin-bottom: .7rem; align-items: flex-start; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.2rem; } legend { font-weight: 700; padding: 0 .4em; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; }
.form-narrow { max-width: 640px; }

/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.card > :first-child { margin-top: 0; } .card > :last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; } .toolbar h1, .toolbar h2 { margin: 0; }
.filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; } .filter .field { margin: 0; } .filter input, .filter select { width: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1.2rem; }
.tabs a { padding: .5em 1em; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current] { color: var(--green); border-color: var(--green); }
.stat { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.badge { display: inline-block; border-radius: 999px; padding: .05em .7em; font-size: .8rem; font-weight: 600; background: #e9eeeb; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-bad { background: var(--bad-bg); color: var(--bad); }
.flash { padding: .8em 1.1em; border-radius: var(--radius); margin: 1rem 0; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.flash-err { background: var(--bad-bg); color: var(--bad); } .flash-warn { background: var(--warn-bg); color: var(--warn); }
details.add { margin-bottom: 1.2rem; } details.add > summary { cursor: pointer; font-weight: 600; color: var(--green); margin-bottom: .8rem; }
.hp { position: absolute; left: -5000px; } /* honeypot */

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f4f6f3; white-space: nowrap; }
tr:last-child td { border-bottom: 0; } .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.void td { color: var(--muted); text-decoration: line-through; } tfoot td { font-weight: 700; background: #f4f6f3; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* public site */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.1rem; line-height: 1.15; } .brand small { font-weight: 500; }
.top nav { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; align-items: center; } .top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .3em 0; border-bottom: 3px solid transparent; }
.top nav a:not(.btn):hover, .top nav a[aria-current] { border-color: var(--sun); }
.public main { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 60vh; }
.hero { background: var(--green); color: #fff; margin-top: -1.5rem; padding: clamp(2.5rem, 8vw, 5rem) 0; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.3rem); max-width: 17em; margin: 0 0 .4em; } .hero p { font-size: 1.15rem; max-width: 36em; opacity: .93; } .hero em { font-style: normal; color: var(--sun); }
.band { padding: 2.5rem 0; } .band-soft { background: var(--sun-soft); }
.lead { font-size: 1.15rem; max-width: 42em; }
.event-date { display: inline-block; background: var(--sun); border-radius: 8px; padding: .1em .6em; font-weight: 700; font-size: .9rem; }
.foot { background: var(--green-dark); color: #dfeae5; padding: 2rem 0; font-size: .92rem; } .foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.foot a { color: #fff; margin-right: 1.2rem; }

/* internal area */
body.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; font-size: 16px; }
.side { background: var(--green-dark); color: #dfeae5; padding: 1rem .8rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; font-size: 1rem; } .side .brand small { color: #b9cfc6; }
.side nav { display: flex; flex-direction: column; gap: 2px; } .side nav a { color: #dfeae5; text-decoration: none; padding: .45em .8em; border-radius: 8px; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, .08); } .side nav a[aria-current] { background: var(--sun); color: var(--ink); font-weight: 700; }
.side-foot { margin-top: auto; font-size: .88rem; display: grid; gap: .4rem; } .side-foot small { color: #b9cfc6; } .side-foot a { color: #dfeae5; }
.admin main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; max-width: 1300px; }
.sigpad { border: 1.5px dashed #b9c4be; border-radius: 8px; background: #fff; touch-action: none; width: 100%; max-width: 520px; height: 170px; display: block; cursor: crosshair; }
pre { white-space: pre-wrap; background: #f4f6f3; padding: 1rem; border-radius: 8px; font-size: .85rem; overflow-x: auto; }
@media (max-width: 800px) {
  body.admin { display: block; } .side { position: static; height: auto; } .side nav { flex-direction: row; flex-wrap: wrap; } .side-foot { margin-top: 0; }
}
@media print { .side, .top, .foot, .btn, .tabs, .filter, details.add { display: none !important; } body.admin { display: block; } }
