:root { --orange:#e8590c; --ink:#1f2328; --muted:#6b7280; --line:#e5e7eb; --bg:#f7f7f5; --ok:#2f9e44; --warn:#e67700; --bad:#c92a2a; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); line-height:1.5; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header { background:#fff; border-bottom:3px solid var(--orange); }
header .wrap { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding-top:12px; padding-bottom:12px; }
.brand { font-weight:700; font-size:1.15rem; color:var(--ink); text-decoration:none; }
nav { display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
nav a { color:var(--ink); text-decoration:none; }
nav a:hover { color:var(--orange); }
main { padding-top:20px; padding-bottom:40px; }
h1 { font-size:1.6rem; margin:.4em 0 .6em; }
h2 { font-size:1.2rem; margin-top:1.6em; }
a { color:var(--orange); }
footer { color:var(--muted); font-size:.85rem; padding-bottom:32px; padding-top:16px; border-top:1px solid var(--line); }
footer .footer-contact { font-size:1rem; margin:0 0 8px; }

.card { display:flex; gap:16px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:12px; color:inherit; text-decoration:none; }
.card:hover { border-color:var(--orange); }
.card .when { min-width:120px; display:flex; flex-direction:column; border-right:1px solid var(--line); padding-right:14px; }
.card .when span { color:var(--muted); }
.card h2 { margin:0 0 4px; font-size:1.1rem; }
.card p { margin:2px 0; color:var(--muted); }

.tag { display:inline-block; font-size:.8rem; padding:1px 8px; border-radius:99px; background:#eee; color:var(--ink); }
.tag.ok { background:#ebfbee; color:var(--ok); }
.tag.warn { background:#fff4e6; color:var(--warn); }
.tag.bad { background:#fff5f5; color:var(--bad); }
.tag.mine { background:#fff0e6; color:var(--orange); }

.box { background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px; margin:16px 0; }
.narrow { max-width:440px; }
label { display:block; margin-bottom:12px; font-weight:500; }
input, textarea, select { display:block; width:100%; margin-top:4px; padding:10px; border:1px solid #cfd4da; border-radius:8px; font:inherit; background:#fff; }
input:disabled { background:#f1f3f5; color:var(--muted); }
label.check { display:flex; gap:8px; align-items:flex-start; font-weight:400; }
label.check input { width:auto; margin-top:5px; }
.row { display:flex; gap:12px; flex-wrap:wrap; }
.row > label { flex:1; min-width:160px; }
.actions { margin-top:16px; }

.btn { display:inline-block; background:var(--orange); color:#fff; border:0; border-radius:8px; padding:10px 18px; font:inherit; font-weight:600; cursor:pointer; text-decoration:none; }
.btn:hover { filter:brightness(.95); }
.btn.secondary { background:#fff; color:var(--ink); border:1px solid #cfd4da; }
.btn.danger { background:var(--bad); }
.btn.danger.secondary { background:#fff; color:var(--bad); border-color:var(--bad); }
button.link { background:none; border:0; padding:0; color:var(--orange); font:inherit; cursor:pointer; text-decoration:underline; }
button.link.danger { color:var(--bad); }
form.inline { display:inline; }

.flash { padding:10px 14px; border-radius:8px; margin-bottom:16px; background:#ebfbee; color:#1b5e20; border:1px solid #b2f2bb; }
.flash.bad { background:#fff5f5; color:var(--bad); border-color:#ffc9c9; }

.facts { display:grid; grid-template-columns:max-content 1fr; gap:4px 16px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.facts dt { color:var(--muted); }
.facts dd { margin:0; font-weight:500; }
.notes { white-space:pre-wrap; background:#fff; border-left:3px solid var(--orange); padding:8px 12px; }

.table-scroll { overflow-x:auto; }
table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; font-size:.95rem; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
th { background:#fafafa; font-weight:600; }
tr.waitlist td { color:var(--muted); }

.muted { color:var(--muted); }
.small { font-size:.85rem; }
.cta { margin-top:24px; }
.danger-zone { margin-top:32px; color:var(--muted); }
.danger-zone summary { cursor:pointer; }

@media (max-width:560px) {
  .card { flex-direction:column; gap:6px; }
  .card .when { border-right:0; padding-right:0; flex-direction:row; gap:8px; }
  table { font-size:.85rem; }
  th, td { padding:6px; }
}

/* tabs */
.tabs { display:flex; gap:4px; flex-wrap:wrap; border-bottom:2px solid var(--line); margin:8px 0 20px; }
.tabs a { padding:8px 14px; color:var(--ink); text-decoration:none; border-radius:8px 8px 0 0; margin-bottom:-2px; border-bottom:2px solid transparent; }
.tabs a:hover { background:#fff; }
.tabs a.active { border-bottom-color:var(--orange); color:var(--orange); font-weight:600; background:#fff; }
.count { display:inline-block; min-width:20px; padding:0 6px; font-size:.75rem; border-radius:99px; background:#eee; color:var(--ink); text-align:center; font-weight:600; }
.tabs a.active .count { background:var(--orange); color:#fff; }
fieldset { border:1px solid var(--line); border-radius:8px; padding:10px 12px 0; margin:0 0 12px; }
legend { font-weight:500; padding:0 4px; }
td.acts { white-space:nowrap; }
td.acts form + form { margin-left:10px; }
button.link.strong { font-weight:600; }
@media (max-width:560px) { td.acts { white-space:normal; } td.acts form + form { margin-left:0; display:block; } }

/* home page */
.hero { background:#fff; border:1px solid var(--line); border-top:4px solid var(--orange); border-radius:12px; padding:24px 20px; margin:4px 0 24px; }
.hero h1 { margin-top:0; font-size:clamp(1.6rem,4vw,2.2rem); }
.lead { font-size:1.1rem; max-width:60ch; }
ol.steps { list-style:none; counter-reset:s; padding:0; margin:0 0 16px; display:grid; gap:10px; }
ol.steps li { counter-increment:s; background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 14px 12px 56px; position:relative; }
ol.steps li::before { content:counter(s); position:absolute; left:14px; top:12px; width:28px; height:28px; border-radius:50%; background:var(--orange); color:#fff; font-weight:700; display:grid; place-items:center; }
ol.steps strong { display:block; }
ol.steps span { color:var(--muted); }
ul.kids { list-style:none; padding:0; margin:0 0 12px; }
ul.kids li { padding:8px 0; border-bottom:1px solid var(--line); }
ul.kids .kid-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
ul.kids details.kid-edit summary { cursor:pointer; font-size:.9em; margin-top:4px; }
ul.kids details.kid-edit form { margin-top:8px; }
form.addkid { margin-top:12px; }
label.check.muted { color:var(--muted); }
ul.mybks { list-style:none; padding:0; }
li.mybk { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 0; border-bottom:1px solid var(--line); }
li.mybk > span:first-child { flex:1 1 220px; }
.btn.small-btn { padding:6px 12px; font-size:.9rem; min-height:36px; }
button.link.small { font-size:.85rem; }
.code { font-size:1.6rem; letter-spacing:.3em; text-align:center; max-width:220px; }
.joincode { font-size:1.1rem; letter-spacing:.05em; background:#fff4e6; padding:2px 8px; border-radius:6px; }
.done-h { margin-top:2em; color:var(--muted); }
.card.past { background:#fafaf8; }
.card.past h2, .card.past strong { color:#4b5563; }
