:root { --accent: #e62528; --ink: #1d1d1f; --muted: #5f6368; --line: #e3e3e6; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fafafa; }
header { padding: 0.9rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); }
header strong { color: var(--accent); }
main { max-width: 64rem; margin: 2rem auto; padding: 0 1.5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-top: 0; }
h3 { font-size: 1rem; margin-top: 1.5rem; }
.button, button { display: inline-block; padding: 0.55rem 1rem; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
button.quiet { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 0.35rem 0.8rem; }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button:disabled { opacity: 0.5; cursor: default; }
.message { color: var(--accent); }
.muted { color: var(--muted); }
.who { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.who button { margin-left: auto; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1rem; }
label { display: inline-flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: var(--muted); }
label:has(> input[type="checkbox"]) { flex-direction: row; align-items: center; color: var(--ink); }
input, select { font: inherit; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); min-width: 12rem; }
input[type="checkbox"] { min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem; margin: 1rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem 1rem; }
.grid .wide { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 4px; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
table { width: 100%; border-collapse: collapse; background: #fff; margin: 0.5rem 0; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.copy input { width: 100%; max-width: 48rem; }
code { font-size: 1.2rem; letter-spacing: 0.1em; padding: 0.1rem 0.4rem; background: #f1f1f3; border-radius: 4px; }
.check { color: #1e7b34; font-size: 0.9rem; }
textarea { font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 4px; width: 100%; }
label:has(> textarea) { display: flex; }
/* The shell: header, collapsible menu on the left, content on the right */
header { display: flex; align-items: center; gap: 0.6rem; }
button.icon { padding: 0.2rem 0.6rem; font-size: 1.1rem; line-height: 1; }
.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 3.2rem); }
.layout main { flex: 1; min-width: 0; margin: 1.5rem auto; }
#menu { width: 15rem; flex: none; align-self: stretch; background: #fff; border-right: 1px solid var(--line); padding: 1rem 0.6rem; }
body.menu-collapsed #menu { display: none; }
.menu-group { margin-bottom: 1.1rem; }
.menu-category { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 0.6rem 0.3rem; }
.menu-module { font-weight: 600; padding: 0.3rem 0.6rem 0.1rem; }
#menu-nav a { display: block; padding: 0.3rem 0.6rem 0.3rem 1.2rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
#menu-nav a:hover { background: #f4f4f6; }
#menu-nav a.active { background: #fdecec; color: var(--accent); font-weight: 600; }
td.tick { text-align: center; color: #1e7b34; font-weight: 700; }
code.plain { font-size: 0.9rem; letter-spacing: 0; background: none; padding: 0; }
@media (max-width: 760px) { #menu { position: fixed; z-index: 5; top: 3.2rem; bottom: 0; box-shadow: 0 0 18px rgba(0,0,0,0.12); } }
ol.events { margin: 0.3rem 0; padding-left: 1.4rem; }
ol.events li { margin-bottom: 0.35rem; }
tr.history td { background: #fafafb; }
.badge { font-size: 0.75rem; padding: 0.05rem 0.4rem; border-radius: 4px; background: #eef2ff; color: #3949ab; }
.state-submitted { color: #b35c00; font-weight: 600; }
.state-sent { color: #1e7b34; }
.due-on-time { color: #1e7b34; font-weight: 600; }
.due-late { color: var(--accent); font-weight: 600; }
.due-waiting { color: var(--muted); }
tr.pick { cursor: pointer; }
tr.pick:hover td { background: #f5f7fa; }
.notice-line { margin-bottom: 0.4rem; }
pre.letter { white-space: pre-wrap; font: inherit; background: #fafafb; border: 1px solid var(--line); border-radius: 6px; padding: 0.8rem; }
