:root {
  color-scheme: light;
  --ink: #182927;
  --muted: #667772;
  --green: #24594c;
  --green-strong: #1d4b40;
  --pale: #eaf1ed;
  --line: #dce5df;
  --paper: #fffefa;
  --canvas: #f1f5f1;
  --accent: #d47754;
  --danger: #8a382c;
  --shadow-card: 0 8px 26px rgb(39 58 44 / 5%);
  --shadow-float: 0 14px 34px rgb(39 58 44 / 9%);
  --radius-card: 16px;
  --radius-control: 10px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f9f5 0, var(--canvas) 380px);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--green-strong); }
:focus-visible { outline: 3px solid rgb(36 89 76 / 34%); outline-offset: 3px; }
header { background: rgb(255 254 250 / 94%); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgb(24 41 39 / 3%); }
.nav { width: min(1040px, calc(100% - 36px)); min-height: 72px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 750; letter-spacing: -.03em; }
.brand img { display: block; width: 36px; height: 36px; border-radius: 11px; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-actions > a { color: var(--muted); font-weight: 600; text-decoration: none; }
.nav-actions > a:hover { color: var(--green); }
main { width: min(1040px, calc(100% - 36px)); margin: 42px auto 76px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.045em; line-height: 1.13; }
h2 { font-size: 1.35rem; letter-spacing: -.03em; line-height: 1.25; }
h3 { font-size: 1.08rem; letter-spacing: -.015em; line-height: 1.35; }
.muted { color: var(--muted); }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.member-card { display: block; color: inherit; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.member-card .row { align-items: center; }
.member-card h3 { margin-bottom: 4px; }
.member-card:hover { transform: translateY(-2px); border-color: #c9d8cd; box-shadow: var(--shadow-float); color: inherit; }
.member-card:focus-visible { outline-offset: 4px; }
.member-list { padding: 5px 22px; }
.member-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 3px; border-top: 1px solid #e8eee9; color: var(--ink); text-decoration: none; transition: color 140ms ease, padding 140ms ease; }
.member-row:first-child { border-top: 0; }
.member-row:hover { padding-right: 0; padding-left: 7px; color: var(--green); }
.member-row-name { font-weight: 650; }
.member-row-action { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: .9rem; }
.member-row:hover .member-row-action { color: var(--green); }
.member-list > .empty { margin: 0; }
.button, button {
  display: inline-flex;
  min-height: 42px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 680;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.button:hover, button:hover { background: var(--green-strong); color: white; box-shadow: 0 4px 12px rgb(29 75 64 / 15%); }
.button:active, button:active { transform: translateY(1px); }
.button.secondary, button.secondary { border-color: #dce8df; background: var(--pale); color: var(--green); }
.button.secondary:hover, button.secondary:hover { border-color: #c7d9cd; background: #e1ece4; color: var(--green-strong); }
.button.danger, button.danger { border-color: #f1d8ce; background: #faeee9; color: var(--danger); }
.button.danger:hover, button.danger:hover { background: #f6e2d9; }
.button.small, button.small { min-height: 34px; padding: 7px 11px; border-radius: 8px; font-size: .88rem; }
form.inline { display: inline; }
.item { padding: 20px 0; border-top: 1px solid #e8eee9; }
.item:first-child { border-top: 0; }
.item h3 { margin: 0 0 5px; }
.item p { margin: 6px 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid #dfe9e1; border-radius: 999px; background: var(--pale); color: var(--green); font-size: .8rem; font-weight: 700; line-height: 1.25; }
.badge.accent { border-color: #f2e3d8; background: #fbf0e9; color: #91492f; }
label { display: block; margin: 14px 0 6px; color: #364942; font-size: .9rem; font-weight: 650; }
input, textarea { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid #d3ded6; border-radius: var(--radius-control); background: #fffefa; color: var(--ink); font: inherit; transition: border-color 140ms ease, box-shadow 140ms ease; }
textarea { min-height: 96px; resize: vertical; }
input:hover, textarea:hover { border-color: #bdcfc2; }
input:focus, textarea:focus { border-color: var(--green); outline: 0; box-shadow: 0 0 0 4px rgb(36 89 76 / 11%); }
form p { margin: 0 0 17px; }
form p label { margin-top: 0; }
form p .helptext { display: block; margin-top: 5px; color: var(--muted); font-size: .85rem; }
.errorlist { margin: 6px 0; padding-left: 20px; color: #a03e30; font-size: .9rem; }
.toast-stack { position: fixed; z-index: 15; top: 88px; right: max(18px, calc((100vw - 1040px) / 2)); display: grid; width: min(420px, calc(100vw - 36px)); gap: 10px; pointer-events: none; }
.toast-message { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px 14px 17px 16px; overflow: hidden; border: 1px solid #dfe9e1; border-radius: 13px; background: #fffefa; color: #285447; box-shadow: 0 12px 34px rgb(24 41 39 / 16%); pointer-events: auto; animation: toast-enter 180ms ease-out both; }
.toast-message::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #6b9b7c; content: ""; transform-origin: left center; animation: toast-countdown var(--toast-duration, 10s) linear forwards; }
.toast-message:hover::after, .toast-message:focus-within::after { animation-play-state: paused; }
.toast-message.is-error { border-color: #f1d8ce; background: #fffaf8; color: #873b30; }
.toast-message.is-error::after { background: #c56a57; }
.toast-message.is-success::before { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; border-radius: 50%; background: #e8f0ea; color: #24594c; content: "✓"; font-size: .78rem; font-weight: 800; line-height: 20px; text-align: center; }
.toast-message > span { flex: 1; padding-top: 1px; font-size: .94rem; font-weight: 560; line-height: 1.5; }
.toast-dismiss { display: grid; width: 28px; min-height: 28px; flex: 0 0 28px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: currentColor; font-size: 1.35rem; font-weight: 400; line-height: 1; opacity: .68; }
.toast-dismiss:hover { background: rgb(36 89 76 / 8%); color: currentColor; box-shadow: none; opacity: 1; }
.toast-message.is-leaving { animation: toast-leave 180ms ease-in forwards; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
@keyframes toast-leave { to { opacity: 0; transform: translateY(-5px); } }
@keyframes toast-countdown { to { transform: scaleX(0); } }
.form-card { width: min(100%, 560px); padding: clamp(24px, 5vw, 34px); }
.form-card h1 { margin: 15px 0 12px; }
.form-card > .muted { line-height: 1.65; }
.form-card > form { margin-top: 21px; }
.form-card > form > button { margin-top: 2px; }
.form-card > .badge + h1 { margin-top: 16px; }
.empty { padding: 18px 0; color: var(--muted); }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-intro h1 { margin: 12px 0 5px; }
.page-intro p { margin: 0; }
.page-section { margin-bottom: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.section-heading > a { font-weight: 650; }
.section-title { margin: 10px 0 3px; }
.section-description { margin: 0; }
.page-back { margin: 0 0 18px; }
.form-actions { margin-top: 20px; }
.form-footnote { margin: 18px 0 0; font-size: .9rem; }
@media (max-width: 600px) {
  .nav { min-height: 64px; }
  .brand img { width: 33px; height: 33px; }
  .nav-actions { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  main { margin-top: 28px; }
  .row, .page-intro { align-items: stretch; flex-direction: column; gap: 12px; }
  .page-intro { margin-bottom: 24px; }
  .page-intro > .actions { justify-content: flex-start; }
  .card { padding: 19px; }
  .form-card { padding: 23px; }
  .section-heading { align-items: flex-start; }
  .item .row { align-items: flex-start; }
  .toast-stack { top: 74px; right: 12px; width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .toast-message, .toast-message::after { animation-duration: .01ms !important; }
}
