:root {
  color-scheme: light;
  --ink: #152b28;
  --muted: #5b6d68;
  --paper: #f4f7f3;
  --card: #ffffff;
  --green: #1e6b56;
  --green-dark: #154c3e;
  --line: #dce5df;
  --error: #8d2e27;
  --success: #1f6546;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green-dark); }
.topbar { min-height: 68px; padding: 0 max(24px, calc((100vw - 1080px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.15rem; font-weight: 750; text-decoration: none; letter-spacing: -.03em; }
nav { display: flex; align-items: center; gap: 22px; }
nav a, .link-button { color: var(--muted); text-decoration: none; font: inherit; }
nav a:hover, .link-button:hover { color: var(--green); }
.inline { display: inline; margin: 0; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.container { width: min(100% - 40px, 1080px); min-height: calc(100vh - 132px); margin: 0 auto; padding: 54px 0 72px; }
.hero { max-width: 760px; margin: 42px auto 64px; text-align: center; }
.eyebrow { color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
h1 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { margin: 0 0 12px; font-size: 1.25rem; letter-spacing: -.02em; }
p { color: var(--muted); }
.hero > p:not(.eyebrow) { max-width: 600px; margin: 0 auto 28px; font-size: 1.12rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 1px solid var(--green); border-radius: 9px; background: var(--green); color: #fff; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button-secondary { margin-left: 8px; background: transparent; color: var(--green-dark); }
.button-secondary:hover { color: #fff; }
.button-small { min-height: 34px; padding: 5px 10px; font-size: .88rem; }
.button-danger { border-color: #a84338; background: #a84338; }
.button-danger:hover { border-color: #7e2e27; background: #7e2e27; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid article, .panel, .form-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 8px 28px rgb(26 63 51 / 4%); }
.feature-grid p { margin-bottom: 0; }
.form-card { width: min(100%, 520px); margin: 20px 0; display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 600; }
input, select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #b9c9c0; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #9dd4c2; outline-offset: 2px; }
input[readonly] { color: var(--muted); background: #f4f7f5; }
.form-card .button { justify-self: start; }
.form-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.form-row label { width: 100%; }
.form-row input { flex: 1 1 210px; }
.form-row select { width: auto; }
.panel { margin: 28px 0; }
.panel p { margin-top: 0; }
.household-list, .member-list { max-width: 740px; padding: 0; list-style: none; }
.household-list li, .member-list li { margin: 8px 0; padding: 16px 18px; display: flex; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.household-list a { font-weight: 700; text-decoration: none; }
.tag { color: var(--muted); font-size: .9rem; }
.role-list { margin: 0 0 24px; padding: 0; list-style: none; }
.role-list li { margin: 8px 0; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 9px; }
.role-list li span { display: grid; }
.role-list small { color: var(--muted); }
.email-list { max-width: 900px; padding: 0; list-style: none; }
.email-list li { margin: 10px 0; padding: 16px; display: grid; grid-template-columns: minmax(180px, 1fr) repeat(auto-fit, minmax(190px, auto)); align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.email-list li > span { display: grid; overflow-wrap: anywhere; }
.email-list small { color: var(--muted); }
.email-list form { display: grid; gap: 8px; }
.email-list form label { font-size: .85rem; }
.role-form { max-width: 720px; }
.permission-grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 9px 16px; }
.permission-grid > strong { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.permission-label, .delegate-label { display: flex; align-items: center; gap: 9px; font-weight: 450; }
.permission-grid input[type="checkbox"] { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.delegate-label { justify-content: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.notice { margin: 0 0 18px; padding: 13px 16px; border-radius: 9px; background: #e7f1ec; color: var(--green-dark); }
.notice-error { background: #f9e9e6; color: var(--error); }
.notice-success { background: #e5f2e9; color: var(--success); }
.site-footer { padding: 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .9rem; }

@media (max-width: 680px) {
  .topbar { padding: 14px 20px; align-items: flex-start; flex-direction: column; }
  nav { width: 100%; justify-content: space-between; gap: 12px; }
  .container { padding-top: 34px; }
  .hero { margin: 22px auto 44px; }
  .feature-grid { grid-template-columns: 1fr; }
  .form-row { align-items: stretch; flex-direction: column; }
  .form-row input, .form-row select { width: 100%; }
  .household-list li, .member-list li { align-items: flex-start; flex-direction: column; }
  .role-list li { align-items: flex-start; flex-direction: column; }
  .email-list li { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: minmax(0, 1fr) 100px; font-size: .92rem; }
}
