:root { --primary:#244d3e; --on-primary:#fff; --outline:#d2d5c6; --card:#fffef9; --foreground:#252d27; }
@media (prefers-color-scheme:dark) { :root { --primary:#cde59a; --on-primary:#203929; --outline:#465246; --card:#202822; --foreground:#eaede1; } }
:root { font-family: system-ui, sans-serif; color: #252d27; background: #f7f5ee; accent-color: #244d3e; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
header, main, footer { width: min(100% - 2rem, 56rem); margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; padding-block: 1.5rem; }
.brand { font-size: 1.5rem; font-weight: 750; text-decoration: none; }
main { min-height: 65vh; padding-block: 1rem 3rem; }
#login { max-width: 30rem; margin: 2rem auto; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
form { display: grid; gap: .75rem; max-width: 32rem; }
label { font-weight: 600; }
input, button { font: inherit; border-radius: .5rem; min-height: 2.75rem; padding: .65rem .9rem; border: 1px solid #67746a; }
input { width: 100%; background: #fffef9; color: inherit; }
button { cursor: pointer; background: #244d3e; color: white; }
button:disabled { opacity: .65; cursor: wait; }
.choice { display: flex; gap: .75rem; align-items: center; font-weight: normal; }
.choice input { width: 1.25rem; min-height: 1.25rem; flex-shrink: 0; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #a84712; outline-offset: 4px; }
.actions, #groups, footer { display: flex; gap: .75rem; flex-wrap: wrap; margin-block: 1.5rem; }
#groups button[aria-current] { outline: 3px solid #a84712; outline-offset: 2px; }
.activity-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
#activities li { border: 1px solid #d2d5c6; border-radius: 1rem; padding: 1.25rem; background: #fffef9; }
#error { color: #a51e19; border-left: 4px solid currentColor; padding: .75rem; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .75rem; background: white; z-index: 2; }
.skip:focus { top: 1rem; }
@media (prefers-color-scheme: dark) {
 :root { color: #eaede1; background: #171e1a; }
 input, #activities li { background: #202822; }
 button { background: #cde59a; color: #203929; }
 #error { color: #ffaaa5; }
 :focus-visible { outline-color: #ffc58c; }
}

#progress-card { background: #dcec9b; color: #203929; border-radius: 20px; padding: 20px; }
progress { width: 100%; accent-color: #244d3e; }
@media (prefers-color-scheme: dark) { #progress-card { background: #365543; color: #e5f2bc; } }
#app-navigation { display:flex; gap:.5rem; flex-wrap:wrap; margin:1.5rem 0; }
#app-navigation [aria-current] { background:var(--primary); color:var(--on-primary, white); }
#management { display:flex; flex-direction:column; gap:1rem; }
#management[hidden] { display:none; }
#management article { padding:1.25rem; border:1px solid var(--outline); border-radius:20px; }
dialog { width:min(38rem, calc(100% - 2rem)); max-height:90dvh; overflow:auto; border:1px solid var(--outline); border-radius:24px; padding:1.5rem; background:var(--card); color:var(--foreground); }
dialog::backdrop { background:rgb(0 0 0 / .45); }
dialog label { display:block; margin:1rem 0; }
dialog input:not([type=checkbox]), dialog select, dialog textarea { display:block; width:100%; box-sizing:border-box; padding:.75rem; font:inherit; }
dialog button { margin:.4rem; }
dialog fieldset[hidden], dialog label[hidden] { display:none; }

#household > .actions { display:none; }
#app-navigation button, #groups button { background:transparent; color:var(--foreground); border-color:var(--outline); }
#app-navigation button[aria-current] { background:var(--primary); color:var(--on-primary); }
.activity-title { background:transparent; color:inherit; border:0; padding:0; text-align:start; font:inherit; min-height:0; }
.activity-title:hover { text-decoration:underline; }
.actions button:not(:first-child) { background:transparent; color:var(--foreground); border-color:var(--outline); }
select, textarea { color:var(--foreground); background:var(--card); border:1px solid var(--outline); border-radius:8px; }

.text-button { background:transparent; color:inherit; border:0; text-decoration:underline; }
.profile-row { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
