[hidden] { display: none !important; }
img { max-width: 100%; }
/* Layout: app bar + tabs over a single working column; the log tab splits into form | day check. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --sunk: #eef1f6;
  --ink: #18202e;
  --muted: #5a6577;
  --line: #d9dee7;
  --accent: #2c56c9;
  --accent-soft: #e6edfc;
  --on-accent: #ffffff;
  --ok: #1d7448;
  --ok-bg: #e3f3ea;
  --warn: #9a5800;
  --warn-bg: #fcf0db;
  --bad: #b3261e;
  --bad-bg: #fce8e6;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151c; --surface: #191f29; --sunk: #141922; --ink: #e6eaf2; --muted: #98a2b4; --line: #2c3442;
    --accent: #7d9cf5; --accent-soft: #1f2a45; --on-accent: #0d1220;
    --ok: #6fd19b; --ok-bg: #16301f; --warn: #f0b45a; --warn-bg: #352812; --bad: #ff8a80; --bad-bg: #3a1a18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11151c; --surface: #191f29; --sunk: #141922; --ink: #e6eaf2; --muted: #98a2b4; --line: #2c3442;
  --accent: #7d9cf5; --accent-soft: #1f2a45; --on-accent: #0d1220;
  --ok: #6fd19b; --ok-bg: #16301f; --warn: #f0b45a; --warn-bg: #352812; --bad: #ff8a80; --bad-bg: #3a1a18;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 0 48px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mono, time, .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.appbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 18px 12px; }
.brand { display: flex; align-items: baseline; gap: 10px; flex: 1 1 auto; min-width: 0; }
.brand h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.brand .who { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monthnav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; }
.monthnav span { min-width: 9.5em; text-align: center; font-weight: 600; }
.iconbtn { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.1rem; width: 34px; height: 32px; border-radius: 6px; cursor: pointer; }
.iconbtn:hover { background: var(--sunk); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 500; padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--ink); }
.tabs .badge { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: .75rem; font-weight: 600; text-align: center; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > * { flex: 1 1 140px; min-width: 0; }
.log-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .log-grid { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 500; color: var(--muted); }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 64px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-weight: 400; }
.check input { width: auto; }
.btn { font: inherit; font-weight: 600; font-size: .9rem; border-radius: 6px; padding: 8px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: .8rem; padding: 3px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 12px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.off { background: var(--sunk); color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { background: var(--sunk); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fact .k { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.timeline { position: relative; height: 64px; background: var(--sunk); border-radius: 6px; margin-top: 22px; }
.timeline .tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.timeline .tick span { position: absolute; top: -20px; left: -12px; font-family: var(--font-data); font-size: .7rem; color: var(--muted); }
.timeline .blk { position: absolute; top: 8px; height: 22px; border-radius: 4px; background: var(--accent-soft); border: 1px solid var(--accent); font-size: .7rem; padding: 2px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.timeline .blk.cand { top: 34px; background: transparent; border-style: dashed; }
.timeline .blk.cand.clash { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.timeline .blk.cand.clean { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

.verdict { border-radius: 6px; padding: 12px 14px; font-size: .9rem; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); }
.verdict.idle { background: var(--sunk); color: var(--muted); }
.verdict ul { margin: 6px 0 0; padding-left: 18px; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sunk); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.void td { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
tr.void td:last-child, tr.void td .pill { text-decoration: none; }
.issue { display: block; font-size: .8rem; color: var(--bad); margin-top: 2px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: center; padding-bottom: 4px; }
.cal button { font: inherit; text-align: left; min-height: 78px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal button:hover { border-color: var(--accent); }
.cal button.closed { background: var(--sunk); color: var(--muted); }
.cal button.sel { outline: 2px solid var(--accent); }
.cal button .d { font-family: var(--font-data); font-weight: 500; }
.cal button .t { font-size: .7rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.cal button .t.bad { color: var(--bad); font-weight: 600; }
.cal .blank { min-height: 78px; }
@media (max-width: 560px) { .cal button, .cal .blank { min-height: 56px; padding: 4px; } .cal button .t { display: none; } .cal button .t.bad { display: block; } }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 14px 16px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: .9rem; max-width: calc(100% - 32px); z-index: 10; }
.empty { padding: 22px; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .btn, .chip, .cal button { transition: background .12s, border-color .12s; } }

/* standalone site additions */
body { margin: 0; }
.appbar .acct { display: flex; gap: 8px; align-items: center; }
.login { max-width: 420px; margin: 8vh auto 0; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 14px; }
.msbtn svg { width: 18px; height: 18px; }
.err { color: var(--bad); font-size: .88rem; margin: 0; }
.dialog { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.dialog .panel { width: 100%; max-width: 420px; }
