/* Meridian — application styles. Direction reproduced from the approved
   mockup: quantities in mono, language in sans; 3 px radius; hairline
   1 px rules; bordered cards, no shadows, no gradients; domain pigments
   as dots/borders/markers only. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--time); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; background: var(--paper); }

.rail {
  width: 216px; flex: 0 0 216px;
  border-right: 1px solid var(--rule);
  padding: 18px 0 40px;
  background: var(--card-2);
}
.brand { padding: 0 18px 20px; display: flex; align-items: baseline; gap: 8px; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.brand span { font-size: 10px; letter-spacing: .1em; color: var(--ink-3); }

.rail-group { margin-bottom: 14px; }
.rail-label {
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 18px 6px;
  display: flex; align-items: center; gap: 8px;
}
.rail-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.rail-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 5px 18px; text-align: left; color: var(--ink-2); font-size: 13.5px;
}
.rail-item:hover { background: var(--hover); color: var(--ink); }
.rail-item.on { color: var(--ink); font-weight: 600; background: var(--active); box-shadow: inset 2px 0 0 var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; display: inline-block; }
.badge { margin-left: auto; font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }

main.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; border-bottom: 1px solid var(--rule);
  background: var(--card-2); position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.zoom { display: flex; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--card); }
.zoom button { padding: 4px 11px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); border-right: 1px solid var(--rule); }
.zoom button:last-child { border-right: none; }
.zoom button.on { background: var(--ink); color: var(--card); }
.capture-box {
  flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  padding: 5px 11px; color: var(--ink-3); font-size: 13px; cursor: text; text-align: left;
}
.capture-box .kbd { margin-left: auto; font-size: 10px; border: 1px solid var(--rule); border-radius: 2px; padding: 1px 5px; color: var(--ink-3); }
.tb-chip { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 4px 9px; background: var(--card); }
.tb-chip.warn { color: var(--signal); border-color: var(--signal); }
.tb-chip button { padding: 0; }

.view { padding: 24px; max-width: 1220px; width: 100%; }

/* ---------- generic building blocks ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.date-big { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.date-sub { font-size: 12px; color: var(--ink-2); letter-spacing: .04em; margin-top: 4px; }
.digest { margin-left: auto; display: flex; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--card); }
.digest > div { padding: 7px 14px; border-right: 1px solid var(--rule); text-align: center; }
.digest > div:last-child { border-right: none; }
.digest b { display: block; font-size: 17px; font-weight: 600; line-height: 1.1; }
.digest small { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.digest b.sig { color: var(--signal); }

.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); }
.card-h {
  padding: calc(9px * var(--density)) var(--pad-x); border-bottom: 1px solid var(--rule-2);
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.card-h.sig { color: var(--signal); }
.card-b { padding: calc(12px * var(--density)) var(--pad-x); }
.card-b.tight { padding: calc(4px * var(--density)) var(--pad-x); }

.cols { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.row { display: flex; align-items: flex-start; gap: 10px; padding: calc(7px * var(--density)) 0; border-bottom: 1px solid var(--rule-2); }
.row:last-child { border-bottom: none; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 13px; line-height: 1.3; }
.row .m { font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; margin-top: 1px; }
.row .r { font-size: 11px; color: var(--ink-3); white-space: nowrap; margin-top: 1px; }
.row .r.late { color: var(--signal); }
.row.clickable { cursor: pointer; }
.row.clickable:hover .t { text-decoration: underline; text-underline-offset: 2px; }
.strike { text-decoration: line-through; color: var(--ink-3); }

.box {
  width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; padding: 0;
  border: 1.5px solid var(--ink-3); border-radius: 2px; background: var(--card); cursor: pointer;
}
.box.done { background: var(--body); border-color: var(--body); position: relative; }
.box.done::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--card); border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }

.alert { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.alert:last-child { border-bottom: none; }
.alert .bar { width: 3px; flex: 0 0 3px; background: var(--signal); border-radius: 2px; }
.alert .bar.info { background: var(--rule); }
.alert .t { font-size: 13px; font-weight: 600; }
.alert .m { font-size: 11px; color: var(--ink-2); }
.alert .acts { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }

.chip { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; border: 1px solid var(--rule); color: var(--ink-2); background: var(--card-2); }
.chip.hot { border-color: var(--signal); color: var(--signal); }
.chip.ok { border-color: var(--body); color: var(--body); }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--ink-2); color: var(--ink); }

.btn { border: 1px solid var(--ink); border-radius: var(--r); padding: 5px 13px; font-size: 12px; letter-spacing: .04em; background: var(--card); cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--card); }
.btn.quiet { border-color: var(--rule); color: var(--ink-2); }
.btn.quiet:hover { background: var(--hover); color: var(--ink); }
.btn.sig { border-color: var(--signal); color: var(--signal); }
.btn.sig:hover { background: var(--signal); color: var(--card); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--card); color: inherit; }

.bar-track { height: 5px; background: var(--rule-2); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.bar-track i { display: block; height: 100%; background: var(--body); }
.bar-track i.low { background: var(--signal); }
.bar-track i.neutral { background: var(--ink-3); }

.note { font-size: 11.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.5; }
.empty { padding: 26px 18px; }
.empty .t { font-size: 13.5px; margin-bottom: 6px; }
.empty .eg { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.empty .btn { margin-top: 12px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.form .frow { display: grid; gap: 4px; }
.form label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.form input, .form select, .form textarea {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  padding: 6px 9px; font-size: 13px; width: 100%;
}
.form textarea { min-height: 84px; resize: vertical; }
.form .inline { display: flex; gap: 10px; flex-wrap: wrap; }
.form .inline .frow { flex: 1; min-width: 120px; }
.form .factions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.form .hint { font-size: 11px; color: var(--ink-3); }

/* ---------- modal / dialog ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; overflow: auto; }
.modal { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); width: 560px; max-width: 100%; }
.modal .card-h { position: sticky; top: 0; background: var(--card); z-index: 2; }
.modal .card-b { max-height: 70vh; overflow: auto; }
/* A backdrop click on a dialog with something typed in it does not discard;
   this says so without a message box. Brief, and silent under
   prefers-reduced-motion, where the border alone carries it. */
.modal.nudge { animation: modal-nudge .28s ease-in-out; border-color: var(--ink-2); }
@keyframes modal-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.modal.wide { width: 860px; }

/* ---------- palette ---------- */
.palette { width: 620px; max-width: 100%; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); }
.palette input { width: 100%; border: none; background: none; padding: 13px 16px; font-size: 15px; border-bottom: 1px solid var(--rule); }
.palette input:focus { outline: none; }
.palette .results { max-height: 50vh; overflow: auto; padding: 6px 0; }
.palette .p-item { display: flex; gap: 10px; align-items: baseline; padding: 7px 16px; cursor: pointer; width: 100%; text-align: left; }
.palette .p-item.sel, .palette .p-item:hover { background: var(--hover); }
.palette .p-item .k { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); width: 84px; flex: 0 0 84px; }
.palette .p-item .s { color: var(--ink-3); font-size: 11.5px; margin-left: auto; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--card); border-radius: var(--r); padding: 9px 14px; font-size: 13px; display: flex; gap: 14px; align-items: center; }
.toast button { color: var(--card); text-decoration: underline; text-underline-offset: 2px; font-size: 12.5px; }

/* ---------- day spine (Today) ---------- */
.spine-wrap { position: relative; padding: 14px 0 0 58px; }
.spine-line { position: absolute; left: 57px; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.hour-lbl { position: absolute; left: 0; width: 46px; text-align: right; font-size: 10.5px; color: var(--ink-3); transform: translateY(-6px); }
.hour-lbl::after { content: ""; position: absolute; right: -11px; top: 6px; width: 10px; height: 1px; background: var(--rule); }
.slot { position: absolute; left: 58px; right: 0; }
.ev {
  border-left: var(--bar) solid var(--ink); background: var(--card);
  border-top: 1px solid var(--rule-2); border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  border-radius: 0 var(--r) var(--r) 0; padding: 5px 10px; height: 100%; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; cursor: pointer;
}
.ev-t { font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.ev-m { font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; }
.ev.proposed { border-style: dashed; border-left-style: solid; opacity: .62; }
.ev.proposed .ev-t::after { content: " · proposed"; font-weight: 400; color: var(--ink-3); font-size: 10px; }
.mark { display: flex; align-items: center; gap: 9px; height: 100%; }
.mark .pin { width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); margin-left: -63px; flex: 0 0 9px; }
.mark .txt { font-size: 12px; color: var(--ink-2); }
.mark .txt b { font-weight: 600; color: var(--ink); }
.mark .txt .done { text-decoration: line-through; color: var(--ink-3); }
.now-line { position: absolute; left: 20px; right: 0; height: 1px; background: var(--signal); z-index: 5; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: 37px; top: -3.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.now-line .t { position: absolute; left: -20px; top: -8px; font-size: 10px; color: var(--signal); background: var(--paper); padding-right: 3px; }

/* ---------- calendar grids ---------- */
.calgrid { display: grid; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--card); }
.calgrid .wh { padding: 8px 6px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule-2); background: var(--card-2); }
.calgrid .wh:first-child { border-left: none; }
.calgrid .wh b { display: block; font-size: 16px; font-weight: 600; line-height: 1; }
.calgrid .wh small { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.calgrid .wh.today b { color: var(--signal); }
.wband { border-top: 1px solid var(--rule); background: var(--card-2); padding: 6px 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; }
.wcol { border-left: 1px solid var(--rule-2); min-height: 200px; padding: 5px 4px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.wev { border-left: var(--bar-sm) solid var(--ink); background: var(--card-2); border-radius: 0 2px 2px 0; padding: 3px 5px; font-size: 11px; line-height: 1.25; cursor: pointer; text-align: left; }
.wev small { display: block; font-size: 9.5px; color: var(--ink-3); }
.wev.proposed { border-style: dashed; opacity: .62; background: var(--card); }
.mcell { border-left: 1px solid var(--rule-2); border-top: 1px solid var(--rule-2); min-height: 92px; padding: 4px 5px; font-size: 11px; position: relative; }
.mcell .d { font-size: 11px; color: var(--ink-3); }
.mcell.today .d { color: var(--signal); font-weight: 600; }
.mcell.out { background: var(--card-2); }
.mcell .mev { display: block; width: 100%; text-align: left; padding: 1px 4px; border-left: var(--bar-sm) solid var(--ink); margin-top: 2px; font-size: 10.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.hstrip { border-left: 1px solid var(--rule-2); border-top: 1px solid var(--rule); padding: 6px; display: flex; gap: 3px; justify-content: center; }
.hstrip.lbl { border-left: none; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); justify-content: flex-end; align-items: center; padding-right: 6px; }
.hsq { width: 9px; height: 9px; border-radius: 2px; background: var(--rule-2); }
.hsq.f { background: var(--body); }
.hsq.p { background: var(--part); }

/* day view canvas */
.daycanvas { position: relative; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); }
.daycanvas .hline { position: absolute; left: 54px; right: 0; height: 1px; background: var(--rule-2); }
.daycanvas .hlbl { position: absolute; left: 0; width: 46px; text-align: right; font-size: 10px; color: var(--ink-3); transform: translateY(-6px); }
.daycanvas .dev { position: absolute; left: 60px; right: 8px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.kcol { background: var(--card-2); border: 1px solid var(--rule); border-radius: var(--r); min-height: 120px; }
.kcol .kh { padding: 7px 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule-2); display: flex; }
.kcol .kh .badge { margin-left: auto; }
.kcard { background: var(--card); border: 1px solid var(--rule-2); border-radius: var(--r); padding: 7px 9px; margin: 8px; cursor: grab; font-size: 12.5px; }
.kcard .m { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.kcard.dragging { opacity: .5; }
/* not yet actionable: its start date has not arrived. Shown, never hidden —
   dashed edge and a lighter face, the same language as proposed blocks. */
.kcard.pending { border-style: dashed; background: var(--card-2); }

/* colour picker: swatches, not a dropdown — you choose a colour by seeing it */
.swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatch { width: 22px; height: 22px; border-radius: var(--r); border: 1px solid var(--rule);
  cursor: pointer; padding: 0; position: relative; }
.swatch.none { background: var(--card); }
.swatch.none::after { content: ""; position: absolute; inset: 4px; border-top: 1px solid var(--ink-3);
  transform: rotate(-45deg); transform-origin: center; }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--ink); }
.swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- notifications panel (§4) ---------- */
.notif-sec { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.notif-sec::after { content: ""; flex: 1; height: 1px; background: var(--rule-2); }
.notif-when { display: grid; gap: 8px; }
.notif-when > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.notif-when label { font-size: 12.5px; flex: 1; min-width: 140px; }
.notif-when select { border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); padding: 4px 7px; font: inherit; }
.notif-when .hint { flex-basis: 100%; font-size: 11px; color: var(--ink-3); line-height: 1.45; }

.notif-ch { border: 1px solid var(--rule-2); border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px; }
.notif-ch.on { border-color: var(--rule); background: var(--card-2); }
.notif-ch .head { display: flex; align-items: center; gap: 10px; }
.notif-ch .head b { font-size: 13px; font-weight: 600; flex: 1; }
.notif-ch .cfg { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.notif-ch .cfg input[type=text] { border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); padding: 4px 7px; font: inherit; width: 150px; }
.notif-ch .state { font-size: 11px; color: var(--ink-3); flex-basis: 100%; line-height: 1.45; }

/* ---------- sign-in (E.8) ---------- */
/* #app is itself a flex row (.app), so this has to claim the width rather
   than sit at its natural size on the left. */
.si-wrap { flex: 1; width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--paper); }
.si-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px 24px 20px; }
.si-brand { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-2); }
.si-brand b { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.si-brand span { font-size: 10px; letter-spacing: .1em; color: var(--ink-3); }
.si-card .frow { margin-bottom: 12px; }
.si-card input { width: 100%; }
.si-hint { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; margin: 0 0 10px; }
.si-err { font-size: 12px; color: var(--signal); min-height: 16px; margin-bottom: 8px; }
.si-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
/* ---------- the signed-out landing page (E.8, amended) ----------
   A presentation of the program, never of the instance — see signin.js for
   why this exists at all. Every colour is a token: this page is rendered in
   whichever palette and theme the visitor's browser resolves before first
   paint, exactly like the app behind it. */

.lander {
  flex: 1; min-width: 0; background: var(--paper);
  padding: 40px 24px 56px; overflow-y: auto;
}
.lander > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

.lander-hero { display: grid; gap: 30px; align-items: start; margin-bottom: 56px; }
/* The card is first in the DOM so that tabbing reaches the password field
   before the prose; at desktop widths it is placed back on the right. */
@media (min-width: 900px) {
  .lander-hero { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; }
  .lander-hero > .lander-pitch { grid-column: 1; grid-row: 1; }
  .lander-hero > .si-card { grid-column: 2; grid-row: 1; }
}
.lander-hero > .si-card { max-width: 380px; justify-self: stretch; }

.lander-pitch h1 {
  font-size: 27px; line-height: 1.22; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); margin: 0 0 18px; max-width: 20ch;
}
.lander-lead { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 0 0 13px; max-width: 62ch; }

.lander-sec { margin-bottom: 52px; }
.lander-sec h2 {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--rule);
}
.lander-note { font-size: 12px; line-height: 1.6; color: var(--ink-3); margin: 0 0 18px; max-width: 62ch; }

/* One screenshot per row rather than three across.
   Three columns fitted a 1316px capture into 343px, and a screenshot of an
   interface reduced to a quarter size is a grey rectangle: it takes up the
   room a picture takes without doing a picture's work. Shown whole and full
   width the interface is legible, which is the entire reason these are here —
   both for a reader and for the filter that has to tell what this site is. */
.shot-grid { display: grid; gap: 34px; grid-template-columns: 1fr; }

.shot { margin: 0; max-width: 900px; }
.shot-frame {
  overflow: hidden; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card); line-height: 0;
}
.shot-frame img { width: 100%; height: auto; display: block; }
.shot figcaption { display: block; margin-top: 11px; }
.shot figcaption b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.shot figcaption span { display: block; font-size: 12.5px; line-height: 1.62; color: var(--ink-2); max-width: 68ch; }

.lander-grid { display: grid; gap: 20px 30px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lander-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .lander-grid { grid-template-columns: repeat(3, 1fr); } }
.lander-cell b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.lander-cell p { font-size: 12.5px; line-height: 1.62; color: var(--ink-2); margin: 0; }

.lander-foot { border-top: 1px solid var(--rule); padding-top: 18px; }
.lander-foot p { font-size: 12px; line-height: 1.6; color: var(--ink-3); margin: 0 0 6px; max-width: 62ch; }
.lander-foot p:last-child { font-size: 10.5px; letter-spacing: .1em; margin-bottom: 0; }

/* a registration request that is waiting to be approved (E.8, amended) */
.si-pending { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.si-pending p { margin: 0 0 10px; }
.si-pending p:last-child { margin-bottom: 0; color: var(--ink-3); }

/* a request to create an account, awaiting a decision (E.8, amended) */
.reg-row { border: 1px solid var(--rule); border-radius: var(--r); padding: 11px 13px; margin-bottom: 10px; }
.reg-who { display: flex; align-items: baseline; gap: 9px; }
.reg-who b { font-size: 13px; font-weight: 600; }
.reg-who .mono { font-size: 11.5px; color: var(--ink-3); }
.reg-when { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.reg-row .factions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* vault unusable because the page is not a secure context */
.vault-insecure { border: 1px solid var(--signal); border-left-width: 3px; border-radius: var(--r);
  background: var(--card); padding: 10px 13px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.5; }
.kcol.dragover { outline: 1px dashed var(--ink-3); outline-offset: -4px; }

/* ---------- habits heatmap ---------- */
.hm { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.hm:last-child { border-bottom: none; }
.hm .nm { width: 150px; flex: 0 0 150px; }
.hm .nm b { font-size: 13px; font-weight: 600; display: block; }
.hm .nm small { font-size: 10px; color: var(--ink-3); }
.heat { display: flex; gap: 2px; flex: 1; overflow: hidden; justify-content: flex-end; }
.heat i { width: 8px; height: 8px; border-radius: 1.5px; background: var(--rule-2); flex: 0 0 8px; }
/* one-tap strip: what is usually eaten at this hour */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }

/* catch-up grid: seven fillable days per habit */
.cu-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; }
.cu-row + .cu-row { border-top: 1px solid var(--rule-2); }
.cu-head { padding-bottom: 2px; }
.cu-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-day { flex: 0 0 26px; text-align: center; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cu-cell {
  flex: 0 0 26px; height: 26px; padding: 0;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card-2); cursor: pointer;
}
.cu-cell.on { background: var(--body); border-color: var(--body); }
.cu-cell.today { border-color: var(--ink-3); }
.cu-cell:disabled { opacity: .5; cursor: default; }
@media (max-width: 400px) {
  .cu-day, .cu-cell { flex-basis: 22px; }
  .cu-cell { height: 22px; }
}

.streak { width: 84px; flex: 0 0 84px; text-align: right; font-size: 12px; }
.streak b { font-size: 15px; font-weight: 600; }
.streak small { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- vault ---------- */
.vaultbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); margin-bottom: 16px; flex-wrap: wrap; }
.vaultbar .st { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.vaultbar .st.locked { color: var(--signal); }
.doc { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.doc:last-child { border-bottom: none; }
.doc .ic { width: 26px; height: 32px; flex: 0 0 26px; border: 1px solid var(--rule); border-radius: 2px; background: var(--card-2); position: relative; }
.doc .ic::after { content: ""; position: absolute; right: -1px; top: -1px; border-width: 0 8px 8px 0; border-style: solid; border-color: var(--paper) var(--paper) var(--rule) var(--rule); }
.doc .main { flex: 1; min-width: 0; }
.locked-list .doc .t, .locked-list .doc .m, .blur-when-locked { filter: blur(4.5px); user-select: none; }
.locked-list .doc .ic { background: repeating-linear-gradient(45deg, var(--card-2), var(--card-2) 3px, var(--rule-2) 3px, var(--rule-2) 6px); }
.reckey { font-family: var(--font-mono); font-size: 13px; letter-spacing: .12em; padding: 9px 11px; background: var(--card-2); border: 1px dashed var(--rule); border-radius: var(--r); text-align: center; }

/* ---------- review ---------- */
.prog { height: 3px; background: var(--rule-2); border-radius: 2px; overflow: hidden; margin: 10px 0 16px; }
.prog i { display: block; height: 100%; background: var(--ink); }
.step { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
.step:last-child { border-bottom: none; }
.step .n { font-size: 11px; color: var(--ink-3); width: 20px; flex: 0 0 20px; padding-top: 2px; }

/* 2x2 domain matrix (C.4) */
.matrix { position: relative; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); aspect-ratio: 1.4; }
.matrix .axis { position: absolute; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.matrix .qlabel { position: absolute; font-size: 10px; color: var(--ink-3); padding: 6px 8px; }
.matrix .mid-v { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--rule-2); }
.matrix .mid-h { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--rule-2); }
.matrix .pt { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, 50%); }
.matrix .pt span { position: absolute; left: 12px; top: -3px; font-size: 10px; color: var(--ink-2); white-space: nowrap; }

/* ---------- tables ---------- */
table.tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; padding: 6px 10px; border-bottom: 1px solid var(--rule); }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--rule-2); }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- charts ---------- */
.chart svg { display: block; width: 100%; }
.spark { vertical-align: middle; }

/* ---------- tabs (within views) ---------- */
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; overflow-x: auto; }
.subtabs button { padding: 8px 13px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.subtabs button:hover { color: var(--ink-2); }
.subtabs button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- mobile ---------- */
.bottombar { display: none; }
.menu-btn { display: none; }

@media (max-width: 940px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .two { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, 220px); }
}
/* folding phone / tablet: distinct two-column breakpoint (§8) */
@media (min-width: 721px) and (max-width: 940px) {
  .two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .rail { position: fixed; inset: 0 auto 0 0; z-index: 60; transform: translateX(-100%); transition: transform .15s; width: 240px; }
  .rail.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .view { padding: 14px; padding-bottom: 72px; }
  .topbar { padding: 10px 14px; }
  .zoom { display: none; }
  .date-big { font-size: 26px; }
  .digest { margin-left: 0; width: 100%; }
  .digest > div { flex: 1; padding: 6px 6px; }
  .bottombar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    border-top: 1px solid var(--rule); background: var(--card-2);
  }
  .bottombar button { flex: 1; text-align: center; padding: 9px 0 12px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .bottombar button.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 2px 0 var(--ink); }
  .bottombar .cap { font-size: 20px; line-height: 1; color: var(--ink); padding: 6px 0 9px; }
  .scrim { padding: 4vh 8px 8px; }
  .hm .nm { width: 90px; flex-basis: 90px; }
  .streak { width: 56px; flex-basis: 56px; }
}
@media (max-width: 400px) {
  .view { padding: 10px; padding-bottom: 72px; }
  .heat i { width: 6px; flex-basis: 6px; }
}

/* print (shopping list, emergency card, recovery key) */
@media print {
  .rail, .topbar, .bottombar, .toasts { display: none !important; }
  body { background: var(--card); }
  .view { padding: 0; }
}

/* the subscribable calendar link: long, and meant to be selected */
.feed-url { font-size: 11.5px; word-break: break-all; background: var(--card-2);
  border: 1px solid var(--rule-2); border-radius: var(--r); padding: 7px 9px;
  user-select: all; color: var(--ink-2); }

/* appearance chooser (§8 v2): a palette previews itself rather than being
   named, because thirteen names are harder to choose between than thirteen
   swatches. Each button carries data-palette, so it renders in the palette
   it offers. */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.palette-swatch {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card); padding: 7px 8px 6px; text-align: left; cursor: pointer;
}
.palette-swatch.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.palette-swatch:hover { border-color: var(--ink-2); }
.pal-bars { display: flex; gap: 2px; margin-bottom: 5px; }
.pal-bars i { flex: 1; height: 12px; border-radius: 1px; }
.pal-name { font-size: 11px; color: var(--ink-2); display: block; }

/* a calendar is a switch (§7): clicking one hides its events */
.cal-toggle {
  display: inline-flex; align-items: center; gap: 5px; margin-right: 12px;
  padding: 1px 4px; border-radius: var(--r); cursor: pointer; color: inherit;
}
.cal-toggle:hover { background: var(--hover); }
.cal-toggle.off { color: var(--ink-3); text-decoration: line-through; }
