/* The desktop: tokens, the side menu, the top bar and the view. Light or dark: the person's choice (data-theme on the
   page, set by theme.mjs), or the system's when they have made none. */
:root { --bg:#fff; --fg:#1d2330; --muted:#5d6677; --line:#dde1e8; --soft:#f5f6f9; --panel:#fff; --link:#14509e; --accent:#14509e; --on-accent:#fff; --ok:#1a7f4b; --bad:#b3261e; --warn:#8a5a00; color-scheme: light dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#14171d; --fg:#e4e7ed; --muted:#9aa3b3; --line:#2b313c; --soft:#1b1f27; --panel:#1b1f27; --link:#7db3f5; --accent:#7db3f5; --on-accent:#14171d; --ok:#5ccf94; --bad:#ff8a80; --warn:#e0b04a; } }
:root[data-theme="dark"] { --bg:#14171d; --fg:#e4e7ed; --muted:#9aa3b3; --line:#2b313c; --soft:#1b1f27; --panel:#1b1f27; --link:#7db3f5; --accent:#7db3f5; --on-accent:#14171d; --ok:#5ccf94; --bad:#ff8a80; --warn:#e0b04a; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; }
a { color: var(--link); }
.muted { color: var(--muted); }
pre { margin: .5rem 0; padding: .6rem .75rem; overflow: auto; max-width: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; font-size: .8rem; }
code { font-size: .85em; }
.problem { color: var(--bad); }
.desktop { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.side { display: flex; flex-direction: column; background: var(--soft); border-right: 1px solid var(--line); padding: 1rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.chip { display: inline-block; margin: .1rem .3rem .1rem 0; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 1rem; font-size: .8rem; color: var(--fg); }
.nav { flex: 1; }
.nav h4 { margin: 1rem 0 .3rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav a { display: block; padding: .35rem .6rem; border-radius: 6px; color: var(--fg); text-decoration: none; }
.nav a:hover { background: rgba(127,127,127,.12); }
.nav a[aria-current=page], .nav a[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.side-foot { font-size: .9rem; }
.col { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); }
.crumb { flex: 1; }
.who { display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
.avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 600; }
main { padding: 1.2rem; max-width: 72rem; }
@media (max-width: 760px) { .desktop { grid-template-columns: 1fr; } .side { border-right: 0; border-bottom: 1px solid var(--line); } main { padding: .75rem 16px; } }

/* Views: headings, forms, tables, buttons, chips and the setup steps. */
h2 { margin: .2rem 0 1rem; font-size: 1.2rem; }
h3 { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.eyebrow { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.toolbar { display: flex; gap: .6rem; margin: 0 0 .8rem; align-items: center; flex-wrap: wrap; }
input, select { font: inherit; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
input[type=checkbox] { padding: 0; }
input[type=color] { padding: 0 .2rem; height: 2.2rem; }
[hidden] { display: none !important; }
label { display: flex; flex-direction: column; gap: .25rem; margin: .5rem 0; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: .8rem 0; padding: .4rem .9rem .8rem; }
legend { padding: 0 .4rem; color: var(--muted); font-size: .85rem; }
button, .button { display: inline-block; padding: .5rem 1.1rem; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
button.quiet { background: none; color: var(--link); border-color: transparent; padding: .1rem .4rem; font-weight: 500; }
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: .6rem 1.1rem 1rem; margin: 1.4rem 0; max-width: 40rem; }
.reported { border: 1px dashed var(--line); border-radius: 8px; padding: .3rem .9rem .6rem; margin: .8rem 0; }
form.inline { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; margin: .8rem 0; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .4rem .6rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .8rem; font-weight: 600; }
.steps { list-style: none; padding: 0; max-width: 40rem; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: .6rem 1.1rem 1rem; margin: 0 0 1rem; }
.step.done { background: var(--soft); }
.badge { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: .5rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .8rem; }

/* The theme toggle in the top bar. */
.theme { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme button.quiet { border-radius: 0; padding: .25rem .5rem; color: var(--muted); display: inline-flex; }
.theme button.quiet[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.ic { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

table + .toolbar, .toolbar + table, h3 + .toolbar { margin-top: .9rem; }
