:root {
  --green: #087820; --deep: #04360e; --ink: #14201a; --ground: #eef3ef; --paper: #fff; --line: #cfdbd3;
  --sun: #f6c516; --mute: #56665c; --bad: #a32020; --good: #087820;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.5 var(--sans); color: var(--ink); background: var(--ground); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: 24px; padding-bottom: 48px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.narrow { max-width: 700px; }
main.bare { padding-top: 0; padding-bottom: 0; }
a { color: var(--green); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
h2 { font-size: 1.3rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
h1 small, h3 small { font-weight: 500; color: var(--mute); font-size: .6em; letter-spacing: 0; }
p { margin: 0 0 1em; }
section { margin-bottom: 8px; }
.lede { font-size: 1.12rem; max-width: 60ch; }
.meta, small { color: var(--mute); font-size: .9rem; }
.crumb { margin: 0 0 6px; font-size: .9rem; }
.empty { color: var(--mute); padding: 18px; background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; }
.prose { max-width: 68ch; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* header */
.top { background: var(--deep); color: #fff; }
.console-top { background: var(--ink); }
.bar { display: flex; align-items: center; gap: 10px; max-width: 1080px; margin: 0 auto; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
.bar form { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand img { border-radius: 9px; display: block; flex: none; background: #fff; }
.brand span { white-space: nowrap; }
.grow { flex: 1; }
.who { margin-left: auto; font-size: .82rem; line-height: 1.25; color: #cfe3d6; text-align: right; min-width: 0; }
.rail { display: flex; gap: 2px; max-width: 1080px; margin: 0 auto; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail a { color: #dbeadf; text-decoration: none; padding: 10px 10px 9px; white-space: nowrap; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.rail a[aria-current] { color: #fff; border-bottom-color: var(--sun); }
.console-top .rail { flex-wrap: wrap; overflow: visible; }
.preview { background: var(--sun); color: var(--ink); text-align: center; font-weight: 700; font-size: .85rem; padding: 5px 12px; }

/* member tab bar: fixed to the bottom on phones, a strip under the header on wide screens */
.tabs { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--mute); text-decoration: none; font-size: .72rem; font-weight: 700; border-top: 3px solid transparent; margin-top: -1px; }
.tabs a[aria-current] { color: var(--green); border-top-color: var(--green); }
.area-member main { padding-bottom: 110px; }
.area-member .foot { display: none; }
@media (min-width: 860px) {
  .tabs { position: static; display: flex; justify-content: center; gap: 8px; border-top: 0; border-bottom: 1px solid var(--line); }
  .tabs a { flex-direction: row; gap: 8px; font-size: .95rem; padding: 12px 16px; border-top: 0; border-bottom: 3px solid transparent; margin: 0; }
  .tabs a[aria-current] { border-bottom-color: var(--green); }
  .area-member main { padding-bottom: 48px; }
  .area-member .foot { display: block; }
}

/* hero */
.hero { background: var(--deep); color: #fff; border-bottom: 8px solid var(--sun); padding: 44px 0 36px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4.6rem); line-height: .98; letter-spacing: -0.035em; max-width: 13ch; margin-bottom: .35em; }
.hero .lede { color: #d6e6db; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.roster { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-weight: 800; font-size: clamp(1.05rem, 3.4vw, 1.5rem); letter-spacing: -0.01em; color: var(--sun); line-height: 1.25; }
.roster span:not(:last-child)::after { content: "/"; color: #3f8a52; margin: 0 .45em; font-weight: 400; }
.herogrid { display: grid; gap: 26px; align-items: center; }
.herologo { order: -1; background: #fff; border-radius: 18px; padding: 12px; width: min(60vw, 240px); }
.herologo img { display: block; width: 100%; height: auto; }
@media (min-width: 860px) {
  .herogrid { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; }
  .herologo { order: 0; width: 100%; padding: 26px; border-radius: 24px; }
}
.hero + .wrap { padding-top: 12px; padding-bottom: 40px; }

/* buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; line-height: 1.2; padding: .7em 1.1em; border-radius: 8px; border: 2px solid var(--green); background: var(--green); color: #fff; text-decoration: none; cursor: pointer; text-align: center; }
.btn.accent { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--green); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: .4em .75em; font-size: .9rem; }
.btn.big { padding: .85em 1.4em; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: default; }
.top .btn.ghost, .hero .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
button.link { white-space: nowrap; background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: #cfe3d6; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
form.inline { display: inline-block; margin: 0; }

/* forms */
form { margin: 0 0 20px; }
fieldset { border: 0; border-top: 2px solid var(--ink); padding: 14px 0 2px; margin: 22px 0 0; min-width: 0; }
legend { font-weight: 800; padding: 0 10px 0 0; letter-spacing: -0.01em; }
.f { display: block; margin: 0 0 14px; }
.f > span { display: block; font-weight: 650; margin-bottom: 4px; font-size: .95rem; }
.f > span i { font-weight: 400; color: var(--mute); font-style: normal; }
.f small { display: block; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid #97ab9f; border-radius: 8px; padding: 11px 12px; min-height: 46px; }
textarea { resize: vertical; }
.two { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.c { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.c input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--green); }
.checks { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.filter .f { margin: 0; flex: 1 1 180px; }
.filter .btn { min-height: 46px; }
details > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details[open] > summary { margin-bottom: 10px; }

/* blocks */
.flash { padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; font-weight: 600; border-left: 5px solid var(--good); background: #dff2e6; }
.flash.err { border-left-color: var(--bad); background: #fbe3e1; }
.flash p:last-child { margin-bottom: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card.off, .reply.off { opacity: .55; }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid .card + .card { margin-top: 0; }
.split { display: grid; gap: 0 32px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--paper); border-left: 5px solid var(--green); border-radius: 0 10px 10px 0; padding: 16px 18px; margin: 22px 0; }
.panel h2 { margin-top: 0; }
.panel.warn { border-left-color: var(--sun); background: #fffbe6; }
.notice { background: var(--paper); border-radius: 12px; padding: 28px 22px; border-top: 6px solid var(--green); }

.rows { list-style: none; margin: 0 0 14px; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; gap: 14px; align-items: center; padding: 13px 14px; color: inherit; text-decoration: none; }
.row:hover { background: #f5f9f6; }
.row .body { display: flex; flex-direction: column; min-width: 0; }
.row .body strong { letter-spacing: -0.01em; }
.row .body .chip { align-self: flex-start; margin: 2px 0; }
.row .date { flex: none; width: 52px; height: 56px; border-radius: 8px; background: var(--deep); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; line-height: 1.1; }
.row .date b { font-size: 1.35rem; font-weight: 800; }
.menu .row { padding: 16px 14px; }

.facts { display: grid; grid-template-columns: 1fr; gap: 2px 18px; margin: 0 0 16px; }
.facts dt { color: var(--mute); font-size: .86rem; margin-top: 8px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 560px) { .facts { grid-template-columns: max-content 1fr; } .facts dt { margin-top: 2px; } .facts dd { margin-bottom: 6px; } }
.card dl { margin: 0; }
.card dt { color: var(--mute); font-size: .82rem; margin-top: 8px; }
.card dd { margin: 0; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 8px; }
.stats.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.stat { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.stat b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--green); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--mute); }

.meter { margin: 12px 0; }
.meter p { margin: 6px 0 0; font-size: .95rem; }
progress { width: 100%; height: 14px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 7px; overflow: hidden; background: #dbe6df; accent-color: var(--green); display: block; }
progress::-webkit-progress-bar { background: #dbe6df; }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }

.chip { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #e3e9e5; color: var(--ink); vertical-align: middle; white-space: nowrap; }
.chip.good { background: #cfeeda; color: #064a29; }
.chip.warn { background: #fdeeb0; color: #5b4500; }
.chip.bad { background: #f8d4d1; color: #7c1515; }
.chip.mute { background: #e3e9e5; color: var(--mute); }

.reply { margin: 14px 0 0 6px; padding: 2px 0 2px 14px; border-left: 3px solid var(--line); }
.reply p { margin-bottom: 6px; }
code.copy { display: block; background: var(--paper); border: 1px dashed var(--mute); border-radius: 8px; padding: 10px 12px; font: 600 .95rem/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* tables turn into stacked cards on phones */
.tablewrap { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-size: .8rem; color: var(--mute); font-weight: 700; padding: 10px 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
@media (max-width: 699px) {
  .tablewrap { background: none; border: 0; overflow: visible; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
  td { border: 0; padding: 4px 0; display: flex; gap: 10px; justify-content: space-between; text-align: right; }
  td::before { content: attr(data-label); color: var(--mute); font-size: .82rem; text-align: left; flex: none; }
  td:empty { display: none; }
}

.foot { border-top: 1px solid var(--line); color: var(--mute); font-size: .9rem; padding: 20px 0 28px; }
.foot p { margin: 0 0 8px; }
.foot a { margin-right: 14px; }

.receipt { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.receipt header { border-bottom: 2px solid var(--ink); margin-bottom: 18px; overflow: hidden; }
.rlogo { float: right; width: 150px; height: auto; margin: 0 0 10px 16px; }
@media print {
  body { background: #fff; }
  .top, .tabs, .foot, .preview, .noprint, .flash { display: none !important; }
  .receipt { border: 0; padding: 0; }
  main { padding: 0; }
}
