/* Opportunity Pi v2 — look C (Newton's choice, 21 Oct 2026): A's calm list and violet ink, B's countdown;
   marigold only for "fewer than 7 days left". The phone's own fonts: nothing to download. */
:root {
  --bg: #f3f4f8; --sf: #ffffff; --sf2: #eef0f6; --fg: #1b2238; --mut: #5e6680; --line: #e0e3ec;
  --acc: #5b3fa6; --accw: #ece6f8; --acc-fg: #ffffff;
  --urg: #a85f00; --urgw: #fdf0d8;
  --ok: #1c7a4b; --okw: #e2f3e9; --wa: #915c00; --waw: #fbefd6; --no: #ad2a20; --now: #fae3e0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121521; --sf: #1a1e2e; --sf2: #232840; --fg: #e6e8f2; --mut: #9ca3ba; --line: #2a3046;
  --acc: #b7a2f2; --accw: #2a2448; --acc-fg: #121521; --urg: #f2a93b; --urgw: #3a2a0e;
  --ok: #63d197; --okw: #173326; --wa: #f0bb57; --waw: #3a2c10; --no: #ff8d83; --now: #3e1c1a; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #121521; --sf: #1a1e2e; --sf2: #232840; --fg: #e6e8f2; --mut: #9ca3ba; --line: #2a3046;
  --acc: #b7a2f2; --accw: #2a2448; --acc-fg: #121521; --urg: #f2a93b; --urgw: #3a2a0e;
  --ok: #63d197; --okw: #173326; --wa: #f0bb57; --waw: #3a2c10; --no: #ff8d83; --now: #3e1c1a; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.45;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
a { color: var(--acc); }
.wrap { max-width: 720px; margin: 0 auto; padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px)); }
.top { background: var(--sf); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 10px; padding-block: 10px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; margin-right: auto; }
.hello { color: var(--mut); font-size: 13px; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--mut); font-size: 14px; }
.topnav a.on { background: var(--accw); color: var(--acc); font-weight: 600; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--sf); border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px max(8px, env(safe-area-inset-right, 0px))
  calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); z-index: 5; }
.nav a { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--mut); text-decoration: none;
  padding: 4px 0; border-radius: 12px; }
.nav a.on { color: var(--acc); background: var(--accw); font-weight: 600; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .nav { display: none; } .topnav { display: flex; } body { padding-bottom: 24px; } }

main { padding-block: 12px 24px; display: grid; gap: 12px; }
h1 { font-size: 20px; margin: 4px 0; line-height: 1.25; text-wrap: balance; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); margin: 10px 0 2px; font-weight: 600; }
.muted { color: var(--mut); font-size: 13px; }
.flash { background: var(--okw); color: var(--ok); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.flash.err { background: var(--now); color: var(--no); }

/* feed */
.chips { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: thin; }
@media (min-width: 700px) { .chips { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; } }
.chip { flex: none; border-radius: 999px; padding: 6px 12px; white-space: nowrap; font-size: 13px; background: var(--sf2);
  color: var(--mut); text-decoration: none; }
.chip.on { background: var(--acc); color: var(--acc-fg); font-weight: 600; }
.searchbar { display: flex; gap: 6px; }
.searchbar input { flex: 1; min-width: 0; }
.list { background: var(--sf); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row1 { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; border-top: 1px solid var(--line);
  color: var(--fg); text-decoration: none; }
.row1:first-child { border-top: 0; }
.row1:hover { background: var(--sf2); }
.cd { border-radius: 10px; background: var(--sf2); display: grid; align-content: center; justify-items: center;
  padding: 6px 0; text-align: center; min-height: 56px; }
.cd b { font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd small { font-size: 10.5px; color: var(--mut); line-height: 1.25; }
.cd.urg { background: var(--urgw); } .cd.urg b, .cd.urg small { color: var(--urg); }
.row1 .t { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.meta { color: var(--mut); font-size: 13px; overflow-wrap: anywhere; }
.line2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 13px; }
.fit { font-size: 12.5px; font-weight: 600; border-radius: 5px; padding: 1px 7px; }
.fit.yes { color: var(--ok); background: var(--okw); } .fit.maybe { color: var(--wa); background: var(--waw); }
.fit.no { color: var(--no); background: var(--now); } .fit.unknown { color: var(--mut); background: var(--sf2); }
.fee { font-variant-numeric: tabular-nums; }

/* notice page */
.card { background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.stats div { background: var(--sf); padding: 10px 12px; display: grid; }
.stats small { color: var(--mut); font-size: 12px; } .stats b { font-size: 19px; font-variant-numeric: tabular-nums; }
.stats .urg b { color: var(--urg); }
.rule { display: grid; grid-template-columns: 22px 1fr; gap: 6px; font-size: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--mut); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: grid; gap: 8px; }
.row-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--sf); color: var(--fg); border-radius: 12px;
  min-height: 44px; padding: 8px 14px; cursor: pointer; text-align: center; text-decoration: none; display: inline-grid;
  place-items: center; }
button.pri, .btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); font-weight: 700; min-height: 48px; }
button.on { border-color: var(--acc); background: var(--accw); color: var(--acc); font-weight: 600; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
form.inline { display: contents; }

/* forms */
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.why { font-weight: 400; color: var(--mut); font-size: 12.5px; }
input[type=text], input[type=search], input[type=date], input[type=number], input[type=time], input[type=password], select, textarea {
  font: inherit; color: var(--fg); background: var(--sf); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; width: 100%; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; background: var(--sf); border: 1.5px solid var(--line);
  border-radius: 12px; min-height: 46px; padding: 8px 14px; font-weight: 400; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--acc); background: var(--accw); font-weight: 600; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.steps i { height: 4px; border-radius: 2px; background: var(--line); } .steps i.on { background: var(--acc); }
.note { font-size: 13px; color: var(--mut); border-left: 3px solid var(--acc); padding-left: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* board, admin */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line);
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.tile { background: var(--sf); padding: 10px 12px; display: grid; gap: 4px; }
.tile small { color: var(--mut); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: var(--sf2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 4%; background: var(--acc); }
.pad { padding: 12px; }
.ok-t { color: var(--ok); } .wa-t { color: var(--wa); } .no-t { color: var(--no); }
.tablewrap { overflow-x: auto; background: var(--sf); border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mut); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
pre.log { white-space: pre-wrap; font-size: 12px; background: var(--sf); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; overflow-x: auto; max-height: 60vh; }
.prefs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (prefers-reduced-motion: no-preference) { .row1, button { transition: background .12s; } }
