@charset "UTF-8";
:root { --bg: #f2f6fb; --surface: #fff; --ink: #14263a; --muted: #5b6b7d; --line: #d9e2ec; --accent: #1d6fd1; --accent-deep: #1759a8; --accent-soft: #e6f0fc;
  --high: #b42318; --high-soft: #fdeceb; --med: #8a5a00; --med-soft: #fff3d6; --low: #1b6b4a; --low-soft: #e2f5ec;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (prefers-color-scheme: dark) { :root { --bg: #0e1722; --surface: #162333; --ink: #e8eef6; --muted: #98a8bb; --line: #263a50; --accent: #4c9bf0; --accent-deep: #7ab4f5; --accent-soft: #1a2f48;
  --high: #ff8a80; --high-soft: #3a1a1a; --med: #f2c262; --med-soft: #3a2f12; --low: #6fd3a5; --low-soft: #12342a; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); }
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 64px; } .wrap.wide { max-width: 920px; }
h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); margin: 8px 0 4px; letter-spacing: -.02em; } h2 { margin: 0 0 12px; font-size: 1.2rem; }
.muted, .hint { color: var(--muted); } .hint { font-size: .85rem; margin: 4px 0 0; } .center { text-align: center; }
a { color: var(--accent-deep); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; margin: 16px 0; box-shadow: 0 1px 2px rgba(20,38,58,.05); }
.field { margin-bottom: 16px; } .field.err input, .field.err textarea { border-color: var(--high); }
label, legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
input, textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.errtext { color: var(--high); font-size: .85rem; margin: 4px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button, .btn { font: 700 1rem/1 var(--font); background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 13px 20px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--accent-deep); } button:disabled { opacity: .55; cursor: default; }
button.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); } button.ghost:hover { background: var(--bg); }
button.small { padding: 8px 14px; font-size: .9rem; border-radius: 8px; }
button.link { background: none; color: var(--accent-deep); padding: 0; text-decoration: underline; font-weight: 600; }
.submit { width: 100%; padding: 15px; font-size: 1.05rem; }

/* radio cards: category and priority */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice input { position: absolute; opacity: 0; } .choice { position: relative; }
.choice span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.choice span b { display: block; } .choice span small { color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; margin-top: 2px; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice.p-high input:checked + span { border-color: var(--high); background: var(--high-soft); box-shadow: none; }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.urgent { border-left: 4px solid var(--high); padding-left: 14px; margin-bottom: 16px; }

.msg { border-radius: 10px; padding: 12px 14px; margin: 12px 0; } .msg.err { background: var(--high-soft); color: var(--high); } .msg.warn { background: var(--med-soft); color: var(--med); }
.done-card { text-align: center; } .ref { font: 800 1.6rem/1.2 ui-monospace, Menlo, monospace; letter-spacing: .04em; color: var(--accent-deep); margin: 8px 0; }
.spin { display: inline-block; width: 14px; height: 14px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* portal */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 20px; }
.top b { font-weight: 800; } .top .who { color: var(--muted); font-size: .9rem; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; align-items: center; }
.tabs button { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); padding: 8px 14px; font-size: .9rem; border-radius: 999px; }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.req { padding: 0; overflow: hidden; } .req.p-high { border-left: 5px solid var(--high); } .req.p-medium { border-left: 5px solid #e0a100; } .req.p-low { border-left: 5px solid #3aa676; } .req.p-whenever { border-left: 5px solid var(--line); }
.req > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; gap: 4px; } .req > summary::-webkit-details-marker { display: none; }
.req .line1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .req .title { font-weight: 700; }
.req .meta { color: var(--muted); font-size: .85rem; }
.req .body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.pill { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }
.pill.high { background: var(--high-soft); color: var(--high); } .pill.medium { background: var(--med-soft); color: var(--med); } .pill.low { background: var(--low-soft); color: var(--low); } .pill.whenever { background: var(--line); color: var(--muted); } .pill.grey { background: var(--line); color: var(--muted); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0; } dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.notes { list-style: none; padding: 0; margin: 8px 0; } .notes li { font-size: .9rem; padding: 6px 0; border-bottom: 1px dashed var(--line); } .notes time { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.noteform { display: flex; gap: 8px; margin-top: 12px; } .noteform input { flex: 1; }
.qr { display: block; margin: 12px auto; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; gap: 0; } dl.kv dd { margin-bottom: 8px; } }
