@font-face { font-family: Inter; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f7f5f1; --card: #ffffff; --ink: #15171c; --muted: #4f5561; --line: #dcd8d0;
  --red: #b3261e; --red-ink: #ffffff; --green: #1d5c3c; --green-soft: #e3efe7; --warn: #8a4b00; --warn-soft: #fbefdc;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14161a; --card: #1d2026; --ink: #f2f2f0; --muted: #b9bec8; --line: #343944; --green-soft: #1f3528; --warn-soft: #3a2a14; --warn: #f0b660; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 Inter, system-ui, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: var(--green); }
.muted { color: var(--muted); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 24px 0 8px; font-weight: 700; }
h2 { font-size: 1.2rem; margin: 0 0 8px; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 16px 0 6px; font-weight: 700; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 8px; }
.brand { font-weight: 800; color: var(--red); text-decoration: none; font-size: 1.1rem; }
.act { max-width: 55%; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; }
.tabs a { white-space: nowrap; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.tabs a.on { background: var(--ink); color: var(--bg); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.card.hl { border: 2px solid var(--red); }
.card.ok { background: var(--green-soft); border-color: transparent; }
.card.warn { background: var(--warn-soft); border-color: transparent; }
.big { font-size: 1.5rem; font-weight: 800; margin: 4px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .95rem; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
input[type=text], input[type=email], input[type=url], input[type=date], input[type=number], input:not([type]), textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; }

button, .btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; background: var(--ink); color: var(--bg); text-decoration: none; display: inline-block; }
button.red { background: var(--red); color: var(--red-ink); }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.small { padding: 6px 12px; font-size: .9rem; }
button:disabled { opacity: .5; cursor: default; }

.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg); flex: none; }
.item .body { flex: 1; min-width: 0; }
.item .name { font-weight: 700; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: .82rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin-right: 4px; }
.tag.red { background: var(--red); color: #fff; border-color: transparent; }
.tag.green { background: var(--green); color: #fff; border-color: transparent; }

.thread { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.msg { padding: 8px 12px; border-radius: 10px; background: var(--bg); margin: 6px 0; max-width: 90%; }
.msg.mine { margin-left: auto; background: var(--green-soft); }
.msg .who { font-size: .82rem; font-weight: 700; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; }
.scroll { overflow-x: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--green); }
.dot.bad { background: var(--red); }

.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.subtabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .92rem; }
.subtabs a.on { background: var(--green); color: #fff; border-color: transparent; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }
.toast.err { background: var(--red); color: #fff; }
footer { padding: 32px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 2px 10px 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.on { color: var(--ink); }
.chip.bad { color: var(--red); border-color: var(--red); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; padding: 8px 14px; }
.pill.on { background: var(--green); color: #fff; border-color: transparent; }
button.armed { background: var(--red); color: #fff; border-color: transparent; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.step { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line); color: var(--ink); font-weight: 600; font-size: .92rem; }
.step.done { border-style: solid; background: var(--green-soft); }
details > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; }
details > summary::after { content: ' ›'; color: var(--muted); }
details[open] > summary { margin-bottom: 8px; }
a.linkrow { text-decoration: none; color: inherit; align-items: center; }
.chev { color: var(--muted); font-size: 1.4rem; }
/* thin bar while a page loads, instead of blanking it */
body::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--red); z-index: 20; transition: width .4s ease, opacity .3s; opacity: 0; }
body.busy::before { width: 70%; opacity: 1; }
#view { transition: opacity .15s; }
body.busy #view { opacity: .6; }
