/* Pico CSS base + shadcn/ui "zinc" theme tokens (light only) */
:root, :root[data-theme="light"] {
  --pico-font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pico-font-size: 100%;
  --pico-line-height: 1.5;
  --pico-border-radius: .5rem;
  --pico-background-color: #fafafa;
  --pico-color: #09090b;
  --pico-muted-color: #71717a;
  --pico-muted-border-color: #e4e4e7;
  --pico-primary: #18181b;
  --pico-primary-background: #18181b;
  --pico-primary-hover-background: #27272a;
  --pico-primary-border: #18181b;
  --pico-primary-hover-border: #27272a;
  --pico-primary-underline: transparent;
  --pico-primary-inverse: #fafafa;
  --pico-primary-focus: rgba(24,24,27,.15);
  --pico-secondary-background: #f4f4f5;
  --pico-secondary-hover-background: #e4e4e7;
  --pico-secondary-border: #e4e4e7;
  --pico-secondary-hover-border: #d4d4d8;
  --pico-secondary: #18181b;
  --pico-secondary-inverse: #18181b;
  --pico-form-element-background-color: #fff;
  --pico-form-element-border-color: #e4e4e7;
  --pico-form-element-color: #09090b;
  --pico-form-element-placeholder-color: #a1a1aa;
  --pico-form-element-active-background-color: #fff;
  --pico-form-element-active-border-color: #18181b;
  --pico-form-element-focus-color: #18181b;
  --pico-form-element-spacing-vertical: .5rem;
  --pico-form-element-spacing-horizontal: .75rem;
  --pico-spacing: .75rem;
  --pico-card-background-color: #fff;
  --pico-card-border-color: #e4e4e7;
  --pico-h1-color: #09090b; --pico-h2-color: #09090b; --pico-h3-color: #09090b;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
}
html { overflow-y: scroll; }
body > header { padding: 0; }
body.guest main { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
body > main { max-width: 42rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; width: 100%; }

/* top bar */
header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pico-muted-border-color); }
.topbar { max-width: 42rem; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: .75rem; }
.topbar form { margin: 0; }
.brand { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.links { display: flex; gap: .125rem; flex: 1; min-width: 0; }
.links a { padding: .375rem .75rem; border-radius: calc(var(--pico-border-radius) - 2px); font-size: .875rem; font-weight: 500; color: var(--pico-muted-color); white-space: nowrap; text-decoration: none; }
.links a:hover { background: #f4f4f5; color: var(--pico-color); }
.links a.on { background: #f4f4f5; color: var(--pico-color); }

/* type */
h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.025em; margin: .125rem 0 .5rem; }
h2 { font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--pico-muted-color); margin: 2rem 0 .5rem; }
h3 { font-size: .95rem; font-weight: 600; margin: 0 0 .4rem; display: flex; justify-content: space-between; align-items: baseline; }
a { text-decoration: none; } a:hover { text-decoration: underline; }
main a:not(.on) { color: var(--pico-color); }
small, .missing, .sub { color: var(--pico-muted-color); }
.eyebrow { margin: 0; font-size: .75rem; font-weight: 500; color: var(--pico-muted-color); text-transform: uppercase; letter-spacing: .05em; }
.edit { font-size: .8rem; color: var(--pico-muted-color); font-weight: 400; }

/* card */
.card { background: #fff; border: 1px solid var(--pico-muted-border-color); border-radius: .75rem; padding: 1.25rem; margin: .75rem 0; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.log { white-space: pre-wrap; margin: 0; word-break: break-word; font-size: .925rem; }
.missing { margin: 0; font-size: .925rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.row form { margin: 0; flex: none; }
.row .who { flex: 1; min-width: 0; }
.row .who > div { min-width: 0; overflow-wrap: anywhere; }

/* who / avatar / badge */
.who { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; font-weight: 500; }
.row .who { margin: 0; align-items: flex-start; }
.who .badge { margin-left: auto; }
.row .who .badge { margin-left: .35rem; }
.who.big { margin: .25rem 0 .75rem; } .who.big h1 { margin: 0; }
.avatar { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: inline-grid; place-items: center; background: #f4f4f5; color: #52525b; font-size: .75rem; font-weight: 500; }
.big .avatar { width: 3rem; height: 3rem; font-size: 1rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1.2; padding: .15rem .55rem; border-radius: .375rem; border: 1px solid var(--pico-muted-border-color); color: var(--pico-color); background: transparent; text-transform: capitalize; white-space: nowrap; }
.badge.ok { background: #18181b; border-color: #18181b; color: #fafafa; }
.badge.info { background: #f4f4f5; }
.badge.off { color: var(--pico-muted-color); }

/* form controls */
label { font-size: .875rem; font-weight: 500; margin-bottom: .75rem; }
input, select, textarea { margin-bottom: 0; margin-top: .375rem; font-size: .875rem; box-shadow: var(--shadow); }
input:focus, select:focus, textarea:focus { --pico-box-shadow: none; box-shadow: 0 0 0 1px #18181b; }
textarea { min-height: 9rem; resize: vertical; margin-bottom: 1rem; }
form.card label:last-of-type { margin-bottom: 1rem; }
button { --pico-form-element-spacing-vertical: .5rem; font-size: .875rem; font-weight: 500; padding: .5rem 1rem; width: auto; margin: 0; box-shadow: var(--shadow); }
button:focus { --pico-box-shadow: 0 0 0 2px rgba(24,24,27,.25); }
form.card > button { width: 100%; }
@media (min-width: 520px) { form.card > button { width: auto; } }
button.secondary { background: #f4f4f5; color: #18181b; border-color: #f4f4f5; padding: .35rem .8rem; box-shadow: none; }
button.secondary:hover { background: #e4e4e7; border-color: #e4e4e7; }
button.ghost { background: transparent; border-color: transparent; color: var(--pico-muted-color); box-shadow: none; padding: .375rem .625rem; }
button.ghost:hover { background: #f4f4f5; color: var(--pico-color); }

/* alert */
.flash { display: flex; gap: .55rem; align-items: flex-start; border: 1px solid #e4e4e7; background: #fff; color: var(--pico-color); border-radius: .5rem; padding: .7rem .9rem; font-size: .875rem; margin: .75rem 0; }
.flash::before { flex: none; width: 1.15rem; height: 1.15rem; line-height: 1.15rem; text-align: center; border-radius: 50%; font-size: .7rem; font-weight: 700; color: #fff; background: #71717a; content: "i"; }
.flash.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.flash.success::before { content: "\2713"; background: #16a34a; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.flash.error::before { content: "!"; background: #dc2626; }

/* weekly pager + progress */
.pager { display: grid; grid-template-columns: 2.25rem 1fr 2.25rem; align-items: center; text-align: center; gap: .5rem; margin-bottom: .5rem; }
.pager > a, .pager > span { height: 2.25rem; line-height: 2rem; font-size: 1.25rem; border: 1px solid var(--pico-muted-border-color); border-radius: .5rem; background: #fff; box-shadow: var(--shadow); text-decoration: none; }
.pager > span { visibility: hidden; }
.pager > a:hover { background: #f4f4f5; }
.bar { height: .5rem; background: #e4e4e7; border-radius: 999px; overflow: hidden; margin: .5rem auto .3rem; max-width: 220px; }
.bar i { display: block; height: 100%; background: #18181b; border-radius: 999px; }

/* login */
.login { width: 100%; max-width: 24rem; text-align: center; }
.login h1 { font-size: 1.75rem; }
.login .sub { margin: 0 0 1.25rem; font-size: .9rem; }
.login .card { text-align: left; }

/* small screens */
@media (max-width: 480px) {
  .brand { display: none; }
  .topbar { padding: .5rem .75rem; gap: .25rem; }
  .links a { padding: .375rem .6rem; }
  body > main { padding: 1.25rem .75rem 3rem; }
  .card { padding: 1rem; }
  .who { gap: .5rem; }
  .avatar { width: 2rem; height: 2rem; }
  .row { flex-wrap: wrap; }
  .row .who { flex-basis: 100%; }
  .row .who > div { overflow-wrap: normal; }
}

/* timeline */
.timeline { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1.5rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: .4rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--pico-muted-border-color); }
.timeline li { position: relative; margin: 0; padding: 0; }
.timeline li::before { content: ""; position: absolute; left: -1.5rem; top: 1.55rem; width: .85rem; height: .85rem; border-radius: 50%; background: #fff; border: 2px solid #a1a1aa; box-sizing: border-box; }
.timeline li:first-child::before { background: #18181b; border-color: #18181b; }
.timeline li.current .card { border-color: #18181b; }
.timeline time { display: block; font-size: .8rem; color: var(--pico-muted-color); margin-bottom: .5rem; }
.timeline h3 { margin-bottom: .1rem; }
.timeline .card { margin: 0 0 .75rem; }

/* google sign-in */
.gbtn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .65rem 1rem; background: #fff; color: var(--pico-color); border: 1px solid var(--pico-muted-border-color); border-radius: var(--pico-border-radius); box-shadow: var(--shadow); font-size: .9rem; font-weight: 500; text-decoration: none; }
.gbtn:hover { background: #f4f4f5; text-decoration: none; }
.alt { margin-top: 1.25rem; text-align: left; }
.alt summary { cursor: pointer; text-align: center; font-size: .85rem; color: var(--pico-muted-color); list-style: none; }
.alt summary::-webkit-details-marker { display: none; }
.alt summary:hover { color: var(--pico-color); }
.alt form { margin-top: .75rem; }
.hint { margin: 0 0 .5rem; font-size: .85rem; color: var(--pico-muted-color); }

/* admin dropdown */
.menu { position: relative; margin: 0; }
.menu summary { list-style: none; cursor: pointer; padding: .375rem .75rem; margin: 0; border: 0; border-radius: calc(var(--pico-border-radius) - 2px); font-size: .875rem; font-weight: 500; color: var(--pico-muted-color); line-height: 1.5; }
.menu summary::-webkit-details-marker, .menu summary::marker { display: none; content: ""; }
details.menu > summary::after { content: "\25BE"; width: auto; height: auto; margin: 0 0 0 .3rem; float: none; background: none; border: 0; transform: none; font-size: .7rem; }
details.menu[open] > summary::after { transform: none; }
details.menu > summary, details.menu[open] > summary:not([role]) { color: var(--pico-muted-color); }
details.menu > summary:hover, details.menu[open] > summary:not([role]), details.menu > summary.on { color: var(--pico-color); }
.menu summary:hover, .menu[open] summary, .menu summary.on { background: #f4f4f5; color: var(--pico-color); }
.menu .pop { position: absolute; right: 0; top: calc(100% + .35rem); min-width: 9rem; background: #fff; border: 1px solid var(--pico-muted-border-color); border-radius: .5rem; box-shadow: 0 4px 12px rgba(0,0,0,.08); padding: .25rem; z-index: 20; }
.menu .pop a { display: block; padding: .45rem .65rem; border-radius: .375rem; font-size: .875rem; color: var(--pico-color); text-decoration: none; }
.menu .pop a:hover { background: #f4f4f5; }
.menu .pop a.on { font-weight: 600; background: #f4f4f5; }
details.menu > summary { display: flex; align-items: center; }
details.menu[open] > summary { margin-bottom: 0; }
