/* Pledgedrop — a whiteprint pressure strip. Light drafting paper, navy linework, one redline accent. */
:root {
  --paper: #EEF3F8;
  --paper-2: #E3EBF4;
  --ink: #12305A;
  --ink-2: #4B6589;
  --rule: #B5C7DC;
  --rule-2: #D2DDEA;
  --red: #EE5A24;
  --red-wash: rgba(238, 90, 36, .10);
  --dock-h: 142px;
  --cap-gap: 150px;
  --f-disp: "Michroma", "Barlow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { background-color: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.45;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(18, 48, 90, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 48, 90, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "mast" "bull" "strip" "wire" "alm" "annex" "foot";
  gap: 14px; padding: 10px 16px calc(var(--cap-gap) + 86px);
  max-width: 100%; overflow-x: hidden;
}
a { color: inherit; }
b { font-weight: 700; }
code { font-family: var(--f-mono); }

/* ---------- mast (not fixed — the name rides with the page) ---------- */
.sta-mast { grid-area: mast; display: flex; align-items: center; gap: 10px; min-height: 40px; max-height: 48px;
  border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--ink-2); letter-spacing: .02em; }
.sta-mast-ic { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper-2); }
.sta-mast-nm { font-family: var(--f-disp); font-size: 12.5px; color: var(--ink); letter-spacing: .08em; text-transform: uppercase; }
.sta-mast-rd { margin-left: auto; font-family: var(--f-mono); }
.sta-mast-rd b, .sta-mast-ck b { color: var(--ink); font-weight: 600; }
.sta-mast-ck { font-family: var(--f-mono); padding: 3px 7px; border: 1px solid var(--rule); border-radius: 4px; background: rgba(255, 255, 255, .6); }
.sta-mast-ck.is-low { border-color: var(--red); color: var(--red); }
.sta-mast-ck.is-low b { color: var(--red); }

/* ---------- the bulletin: the live sentence, the first thing you read ---------- */
.bulletin { grid-area: bull; margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; color: var(--ink);
  padding: 12px 14px 13px; border-left: 3px solid var(--ink); background: rgba(255, 255, 255, .55); }
.bulletin b { font-family: var(--f-mono); font-weight: 600; font-size: .92em; }
.bulletin s { text-decoration: none; font-family: var(--f-mono); font-weight: 600; font-size: .92em; color: var(--red);
  background: var(--red-wash); padding: 0 3px; border-radius: 3px; }
.bulletin u { text-decoration: none; font-family: var(--f-mono); font-size: .92em; border-bottom: 1px dashed var(--ink-2); }

/* ---------- the strip ---------- */
.isobar { grid-area: strip; min-width: 0; border: 1px solid var(--ink); background: rgba(255, 255, 255, .7); position: relative; }
.isobar::before, .isobar::after { content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--ink); background: var(--paper); }
.isobar::before { top: -5px; left: -5px; } .isobar::after { bottom: -5px; right: -5px; }
.isobar-hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 10px; border-bottom: 1px solid var(--rule);
  font-size: 11px; color: var(--ink-2); font-family: var(--f-mono); text-transform: lowercase; }
.isobar-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.isobar-pot { white-space: nowrap; }
.isobar-pot b { color: var(--ink); font-size: 12.5px; }
.isobar-run { overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.isobar-cells { list-style: none; margin: 0; padding: 12px 10px 8px; display: flex; gap: 8px; align-items: stretch; width: max-content; }
.isobar-cell { width: 112px; flex: 0 0 auto; display: grid; grid-template-rows: auto 118px 38px auto auto; gap: 4px; position: relative; }
.cell-n { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); display: flex; justify-content: space-between; }
.cell-n em { font-style: normal; font-family: var(--f-disp); font-size: 9px; letter-spacing: .08em; padding: 1px 4px; border-radius: 2px; }
.cell-bed { position: relative; display: flex; align-items: flex-end; border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(to top, transparent 0 21px, rgba(18, 48, 90, .09) 21px 22px); }
.cell-col { width: 100%; height: calc(var(--h, .4) * 100%); min-height: 26px; border: 1.5px solid var(--ink); border-bottom: 0;
  background: repeating-linear-gradient(135deg, rgba(18, 48, 90, .10) 0 4px, transparent 4px 8px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 5px; transition: height .5s ease; }
.cell-amt { font-family: var(--f-mono); font-weight: 600; font-size: 13px; color: var(--ink); background: rgba(255, 255, 255, .92); padding: 0 4px; border-radius: 2px; }
.cell-who { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-who a { text-decoration: none; }
.cell-tag { font-size: 11px; line-height: 1.25; color: var(--ink-2); min-height: 28px; }
.isobar-cell.is-topped .cell-col { opacity: .82; }
.cell-slot { display: flex; align-items: center; justify-content: center; }
.cell-seal { transform: rotate(-6deg); white-space: nowrap;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600; line-height: 1.15; text-align: center; text-transform: uppercase;
  color: var(--red); border: 1.5px solid var(--red); padding: 2px 5px; background: rgba(255, 255, 255, .9); border-radius: 3px; }
.cell-seal i { display: block; font-style: normal; font-size: 12px; }
.isobar-cell.is-top .cell-col { background: var(--ink); border-color: var(--ink); }
.isobar-cell.is-top .cell-amt { background: var(--paper); }
.isobar-cell.is-top .cell-n em { background: var(--ink); color: var(--paper); }
.isobar-cell.is-top .cell-tag { color: var(--ink); font-weight: 600; }
.isobar-cell.is-next .cell-col { border: 1.5px dashed var(--red); border-bottom: 0; background: var(--red-wash); }
.isobar-cell.is-next .cell-amt { color: var(--red); }
.isobar-cell.is-next .cell-n em { background: var(--red); color: #ffffff; }
.isobar-cell.is-next .cell-tag { color: var(--red); font-weight: 600; }
.isobar-cell.is-next .cell-bed { border-bottom-color: var(--red); }
.isobar-cell.is-next.is-first .cell-col { animation: breathe 1.8s ease-in-out infinite; }
.isobar-cell.is-ghost { opacity: .55; }
.isobar-cell.is-ghost .cell-col { border-style: dotted; background: transparent; }
.isobar-cell.is-landed { animation: land .9s ease-out; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 90, 36, .0); } 50% { box-shadow: 0 0 0 5px rgba(238, 90, 36, .18); } }
@keyframes land { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.isobar-scale { display: flex; justify-content: space-between; padding: 0 10px 8px; }
.isobar-scale i { width: 1px; height: 6px; background: var(--rule); }

/* ---------- the wire (tape) ---------- */
.wire { grid-area: wire; min-width: 0; border-top: 1px solid var(--ink); padding-top: 8px; }
.wire-hd { display: flex; align-items: center; gap: 8px; font-family: var(--f-disp); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.wire-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.wire-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13.5px; }
.wire-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--rule-2); }
.wire-list li > span:first-child { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); padding-top: 2px; }
.wire-list li.is-fresh { background: linear-gradient(90deg, var(--red-wash), transparent 70%); }
.wire-list a { text-decoration: none; font-family: var(--f-mono); font-size: 12px; border-bottom: 1px dotted var(--ink-2); }
.w-ref { color: var(--red); font-weight: 600; }
.w-drop { font-weight: 700; }
.w-calm { color: var(--ink-2); }
.wire-past { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.wire-past ol { margin: 4px 0 0; padding-left: 18px; }

/* ---------- almanac (rules) ---------- */
.almanac { grid-area: alm; border: 1px solid var(--rule); background: rgba(255, 255, 255, .5); padding: 14px; }
.almanac-h { margin: 0 0 8px; font-family: var(--f-disp); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 400; }
.almanac-dl { margin: 0; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px 12px; font-size: 14.5px; }
.almanac-dl dt { font-family: var(--f-mono); font-size: 12px; font-weight: 600; padding-top: 2px; }
.almanac-dl dd { margin: 0; color: var(--ink); }
.almanac-ex { margin-top: 12px; border: 1.5px dashed var(--red); padding: 10px 12px; background: rgba(255, 255, 255, .7); }
.almanac-ex-k { font-family: var(--f-mono); font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: .06em; }
.almanac-ex p { margin: 4px 0 0; font-size: 14.5px; }
.almanac-ex b { font-family: var(--f-mono); }

.annex { grid-area: annex; border: 1px solid var(--rule); background: rgba(255, 255, 255, .6); padding: 14px; font-size: 14px; overflow-wrap: anywhere; }
.annex h3 { margin: 0 0 6px; font-family: var(--f-mono); font-size: 13px; }

/* ---------- colophon ---------- */
.colophon { grid-area: foot; border-top: 1px solid var(--ink); padding-top: 10px; font-size: 12px; color: var(--ink-2); display: grid; gap: 5px; }
.colophon span { display: inline-block; min-width: 108px; }
.colophon code { font-size: 11.5px; color: var(--ink); overflow-wrap: anywhere; }
.colophon-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.colophon-nav a { font-family: var(--f-mono); }
.colophon-ln { font-family: var(--f-disp); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- the CA capsule: floats above the console, on screen at every width ---------- */
.capsule { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: var(--cap-gap);
  width: min(calc(100vw - 24px), 560px); padding: 6px 10px 7px; border-radius: 14px;
  background: var(--ink); color: var(--paper); box-shadow: 0 8px 24px rgba(18, 48, 90, .28); }
.capsule-row { display: flex; align-items: center; gap: 8px; }
.capsule-tk { font-family: var(--f-disp); font-size: 10px; letter-spacing: .08em; }
.capsule-tk i { font-style: normal; opacity: .65; margin-left: 4px; }
.capsule-gm { margin-left: auto; font-size: 11px; opacity: .7; font-family: var(--f-mono); }
.capsule-cp { font: 600 12px var(--f-mono); border: 0; border-radius: 8px; padding: 4px 12px; background: var(--red); color: #ffffff; cursor: pointer; }
.capsule-gm[hidden] + .capsule-cp { margin-left: auto; }
.capsule-cp:disabled { background: rgba(238, 90, 36, .35); cursor: default; }
.capsule-cp.is-ok { background: var(--paper); color: var(--ink); }
.capsule-ad { display: block; margin-top: 3px; font-size: 11.6px; letter-spacing: -.01em; white-space: nowrap; overflow-x: auto; user-select: all; -webkit-user-select: all; }
.capsule-ad.is-pending { opacity: .7; user-select: none; -webkit-user-select: none; white-space: normal; }

/* ---------- console: the pledge dock ---------- */
.console { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: var(--dock-h); margin: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper-2); border-top: 2px solid var(--ink);
  display: grid; grid-template-rows: 46px 28px 34px; gap: 6px; }
.console-in { display: flex; gap: 8px; min-width: 0; }
.console-fld { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: #ffffff; border: 1.5px solid var(--ink); border-radius: 8px; padding: 0 10px; }
.console-fld span { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.console-fld input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 18px var(--f-mono); color: var(--ink); text-align: right; }
.console-fld em { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); }
.console-go { flex: 0 0 auto; min-width: 128px; border: 0; border-radius: 8px; background: var(--red); color: #ffffff; font: 600 15px var(--f-body); padding: 0 14px; cursor: pointer; }
.console-go:disabled { background: var(--rule); color: var(--ink-2); cursor: default; }
.console-chips { display: flex; gap: 6px; align-items: center; overflow: hidden; }
.console-chips > button { border: 1px solid var(--rule); background: rgba(255, 255, 255, .7); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: 500 12px var(--f-body); cursor: pointer; white-space: nowrap; }
.console-chips > button.is-sel { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.console-due { margin-left: auto; font-size: 12px; white-space: nowrap; }
.console-due button { border: 0; background: var(--ink); color: var(--paper); border-radius: 6px; font: 600 11px var(--f-mono); padding: 2px 8px; margin-left: 4px; cursor: pointer; }
.console-sum { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.console-sum b { color: var(--ink); font-family: var(--f-mono); }

/* ---------- wallet chooser + note ---------- */
.chooser { position: fixed; inset: 0; z-index: 60; background: rgba(18, 48, 90, .35); display: grid; place-items: center; }
.chooser[hidden] { display: none; }
.chooser-card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px; width: min(320px, 90vw); display: grid; gap: 8px; }
.chooser-k { font-family: var(--f-disp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.chooser-card button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: #ffffff; border-radius: 8px; padding: 9px; font: 500 14px var(--f-body); cursor: pointer; color: var(--ink); }
.chooser-card img { width: 22px; height: 22px; }
.note { position: fixed; z-index: 70; top: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; font-size: 13px; max-width: 90vw; }
.note[hidden] { display: none; }
[hidden] { display: none !important; }

/* ---------- tablet: one column, wider measure, bigger strip ---------- */
@media (min-width: 640px) {
  body { max-width: 840px; margin: 0 auto; padding-left: 24px; padding-right: 24px; gap: 18px; }
  .bulletin { font-size: 19px; padding: 16px 18px; }
  .isobar-cell { width: 128px; grid-template-rows: auto 150px 40px auto auto; }
  .cell-amt { font-size: 14px; }
  .console { left: 50%; right: auto; transform: translateX(-50%); width: min(840px, 100vw); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); border-radius: 12px 12px 0 0; }
}

/* ---------- desktop: recompose — bulletin + strip + rules left, the wire as a column right ---------- */
@media (min-width: 1000px) {
  body { max-width: 1180px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); column-gap: 30px;
    grid-template-areas: "mast mast" "bull wire" "strip wire" "alm wire" "annex annex" "foot foot"; align-items: start; }
  .wire { align-self: stretch; border-top: 0; border-left: 1px solid var(--ink); padding: 0 0 0 18px; }
  .bulletin { font-size: 19px; }
  .isobar-cell { width: 140px; grid-template-rows: auto 190px 40px auto auto; }
  .cell-amt { font-size: 15px; }
  .sta-mast-nm { font-size: 14px; }
  .console { width: 1180px; max-width: calc(100vw - 32px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 46px 34px; column-gap: 18px; height: 112px; }
  .console-in { grid-column: 1; grid-row: 1; }
  .console-chips { grid-column: 1; grid-row: 2; }
  .console-sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13.5px; -webkit-line-clamp: 4; }
  .capsule { bottom: 126px; }
  body { padding-bottom: 240px; }
}
