/* Covenant.
   A clearing-house statement rendered on a terminal, not a dashboard. The page is a ruled
   document: headings sit in the margin, content sits in the column, and hairlines do the
   separating that cards would otherwise do.

   Colour is a data type here, never decoration:
     --live     read from the network in this page load
     --scored   the service answered with a number
     --refused  the service declined, or the bond was lost
     --coin     a monetary quantity, or the account it settles to
   Nothing else is coloured. If a rule, a heading or a border is tinted, it is because one of
   those four facts is true at that spot. */

:root {
  --ink-0:   #0a0e13;   /* page */
  --ink-1:   #0e131a;   /* raised: forms, statements */
  --ink-2:   #06090d;   /* sunk: data wells */
  --ink-red: #130c0c;   /* the refusal band */

  --rule:    #1b232d;   /* hairline */
  --rule-2:  #2b3644;   /* structural rule */
  --rule-3:  #3a4756;   /* interactive edge */

  --text:    #e9eef4;
  --text-2:  #aeb9c4;
  --dim:     #7b8894;

  --live:    #4fa8ff;
  --scored:  #3ecf7a;
  --refused: #ff4d3f;
  --coin:    #d3a94f;

  --f-text: Newsreader, "Iowan Old Style", "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1560px;
  --pad: 48px;
  --gut: 264px;
  --gut-gap: 60px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}

.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

a { color: inherit; }
.link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule-3); }
.link:hover { border-bottom-color: var(--live); color: var(--live); }
.link:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }

.hl   { color: var(--text); border-bottom: 1px solid var(--rule-3); }
.gold { color: var(--coin); }
.ok   { color: var(--scored); }
.bad  { color: var(--refused); }
.muted, .void { color: var(--dim); }

::selection { background: rgba(79,168,255,.28); }

/* ================================================================ masthead */

.masthead {
  border-bottom: 1px solid var(--rule-2);
  box-shadow: 0 4px 0 -3px var(--rule);   /* the second rule of a statement header */
}
.masthead-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding-top: 38px;
  padding-bottom: 24px;
}
.wordmark {
  margin: 0;
  font-family: var(--f-text);
  font-size: 54px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--text);
}
.positioning {
  margin: 12px 0 0;
  font-size: 20px;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 52ch;
}

/* Standing facts, set as fields on a statement header rather than floating pills. */
.masthead-fields { display: flex; flex-direction: column; gap: 10px; }
.mfield, .status {
  display: grid;
  grid-template-columns: 86px auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 8px 0 8px 18px;
  border-left: 2px solid var(--rule-2);
  min-width: 400px;
}
.mfield { grid-template-columns: 86px minmax(0, 1fr); }
.mfield-v { font-size: 18px; color: var(--text); line-height: 1.25; }
.mfield-sub { font-size: 15px; color: var(--dim); line-height: 1.4; }
.status-key {
  font-family: var(--f-mono);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  align-self: center;
}
.status .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--dim);
}
.status[data-state="probing"] .dot { background: var(--dim); animation: pulse 1.1s ease-in-out infinite; }
.status[data-state="up"]      .dot { background: var(--scored);  box-shadow: 0 0 12px rgba(62,207,122,.7); }
.status[data-state="down"]    .dot { background: var(--refused); box-shadow: 0 0 12px rgba(255,77,63,.6); }
.status[data-state="up"]      { border-left-color: var(--scored); }
.status[data-state="down"]    { border-left-color: var(--refused); }

@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

.status-text { display: flex; flex-direction: column; min-width: 0; }
.status-label { font-family: var(--f-mono); font-size: 17px; font-weight: 500; line-height: 1.3; }
.status[data-state="up"]   .status-label { color: var(--scored); }
.status[data-state="down"] .status-label { color: var(--refused); }
.status-sub {
  font-size: 15px; color: var(--dim); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 460px;
}

/* ================================================================= section */

.sec { border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }

.sec-in {
  display: grid;
  grid-template-columns: var(--gut) minmax(0, 1fr);
  column-gap: var(--gut-gap);
  padding-top: 60px;
  padding-bottom: 68px;
}

/* Heading lives in the margin. The column carries the argument. The marginal rule is as tall
   as the heading it belongs to, not as tall as the section: a rule with nothing beside it for
   six hundred pixels reads as a mistake. */
.gut { position: relative; min-width: 0; align-self: start; }
.gut::after {
  content: "";
  position: absolute;
  top: 6px; height: calc(100% - 6px);
  right: calc(var(--gut-gap) / -2);
  width: 1px;
  background: var(--rule-2);
}
.gut h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.gut-sub {
  margin: 14px 0 0;
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 26ch;
}
.col { min-width: 0; }

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 78ch;
  margin: 0 0 32px;
}

/* ============================================================== 1 clauses */

.clauses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  border-top: 1px solid var(--rule-2);
  margin-bottom: 44px;
}
.clause { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); min-width: 0; }
.clause:nth-child(2n) { padding-left: 56px; border-left: 1px solid var(--rule); margin-left: -56px; }
.clause h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}
.clause p { margin: 0; color: var(--text-2); font-size: 17px; line-height: 1.55; }
.clause em { color: var(--text); font-style: italic; }

/* ======================================================== live data panel */

/* A panel is a well, not a card: no radius, no shadow, and a live-coloured spine that says
   the numbers inside were read from the network during this page load. */
.panel {
  background: var(--ink-2);
  border-top: 1px solid var(--rule-2);
  border-left: 2px solid var(--live);
}
.panel[data-state="error"] { border-left-color: var(--refused); }
.panel-head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
}
.panel-src { font-size: 15px; color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-body { padding: 2px 22px 16px; }

.tag {
  font-family: var(--f-mono);
  font-size: 15px; font-weight: 600; letter-spacing: .16em;
  padding: 2px 0; flex: none;
  border-bottom: 2px solid currentColor;
}
.tag-live   { color: var(--live); }
.tag-sample { color: var(--dim); border-bottom-style: dashed; }

/* key/value rows, written by app.js */
.kv {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 0 28px;
  border-top: 1px solid var(--rule);
  padding: 12px 0;
  align-items: baseline;
}
.kv:first-child { border-top: 0; }
.kv-k {
  font-family: var(--f-mono);
  color: var(--dim); font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
}
.kv-v { font-size: 19px; word-break: break-word; }

.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.chip {
  font-family: var(--f-mono); font-size: 15px;
  padding: 2px 9px; border: 1px solid var(--rule-2);
  color: var(--text-2); background: transparent;
}

/* ================================================================ controls */

/* The form is a filled-in field block on a statement: the subject line runs on its own rule,
   the modifiers and the action sit on the line beneath it. */
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 40px;
  row-gap: 26px;
  align-items: end;
  padding: 26px 0 30px;
  border-top: 2px solid var(--rule-2);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.controls > .field:first-child { grid-column: 1 / -1; }
.controls-tight {
  grid-template-columns: minmax(0, 620px) auto;
  justify-content: start;
  column-gap: 24px;
  margin-top: 44px;
}
.controls-tight > .field:first-child { grid-column: auto; }

.field { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.field .input { max-width: 620px; }
.field-shrink { justify-self: start; }
.controls > .field-shrink:last-child { justify-self: end; }

.label {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim);
  text-transform: uppercase; letter-spacing: .14em;
}
.label-sub { text-transform: none; letter-spacing: 0; color: #5d6874; margin-left: 10px; }

.input {
  font-family: var(--f-mono);
  font-size: 20px;
  color: var(--text);
  background: var(--ink-2);
  border: 1px solid var(--rule-2);
  border-bottom: 2px solid var(--rule-3);
  border-radius: 0;
  padding: 13px 15px;
  width: 100%;
  transition: border-color .12s, background .12s;
}
/* The borrower address is 42 characters and must never clip: it is the subject of the demo. */
#account { font-size: 19px; letter-spacing: -0.02em; }
.input:hover { border-color: var(--rule-3); }
.input:focus {
  outline: none;
  border-color: var(--rule-3);
  border-bottom-color: var(--live);
  background: #080d13;
  box-shadow: 0 0 0 2px rgba(79,168,255,.28);
}

.picks { display: flex; gap: 10px; }

.btn {
  position: relative;
  font-family: var(--f-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
  padding: 16px 28px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .07s ease, background .12s, border-color .12s, color .12s;
}
.btn:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: progress; opacity: .75; }

.btn-primary {
  background: var(--text); color: var(--ink-0); border-color: var(--text);
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.btn-primary:hover:not(:disabled) { background: #ffffff; border-color: #ffffff; }
.btn-primary:active:not(:disabled) { background: #b7c2cd; border-color: #b7c2cd; box-shadow: inset 0 2px 0 rgba(0,0,0,.25); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--rule-3); }
.btn-outline:hover { background: var(--ink-1); border-color: var(--text-2); }
.btn-outline:active { background: var(--ink-2); box-shadow: inset 0 2px 0 rgba(0,0,0,.35); }

.btn-ghost {
  background: transparent; color: var(--dim);
  border-color: var(--rule-2); font-size: 16px; padding: 14px 14px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--rule-3); background: var(--ink-1); }
.btn-ghost:active { background: var(--ink-2); box-shadow: inset 0 2px 0 rgba(0,0,0,.35); }
.btn-ghost.is-on { color: var(--text); border-color: var(--text-2); background: rgba(233,238,244,.07); }

/* checkbox */
.check { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; padding: 6px 0; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 26px; height: 26px; flex: none;
  border: 1px solid var(--rule-3);
  background: var(--ink-2);
  position: relative;
  transition: background .12s, border-color .12s;
}
.check:hover .box { border-color: var(--text-2); }
.check:active .box { background: #04070a; }
.check input:focus-visible + .box { outline: 2px solid var(--live); outline-offset: 2px; }
.check input:checked + .box { background: var(--text); border-color: var(--text); }
.check input:checked + .box::after {
  content: ""; position: absolute;
  left: 9px; top: 4px; width: 6px; height: 13px;
  border: solid var(--ink-0); border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.check-text { font-size: 17px; display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
.check-line { white-space: nowrap; }
.check-sub { font-family: var(--f-mono); font-size: 15px; color: var(--dim); white-space: nowrap; }

/* spinner */
.spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(123,136,148,.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-spin { display: none; }
.btn.is-loading .btn-spin { display: inline-block; }
.btn-primary .btn-spin { border-color: rgba(10,14,19,.3); border-top-color: var(--ink-0); }

.inline-load {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono); font-size: 16px; color: var(--dim); padding: 16px 0;
}

/* =================================================================== quote */

.quote-out:empty { display: none; }

.quote-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 28px;
}
.quote-grid.is-pair {
  grid-template-columns: minmax(0,1fr) 176px minmax(0,1fr);
  align-items: stretch;
}

/* A quote is a statement of charge: a rule on top, the amount, then the ruled terms. */
.qcard {
  border-top: 2px solid var(--rule-2);
  background: transparent;
  padding: 20px 0 0;
  min-width: 0;
  animation: rise .25s ease both;
}
.qcard-cheap { border-top-color: var(--coin); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.qcard-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 14px;
}
.qcard-name {
  font-family: var(--f-mono);
  font-size: 15px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim);
}
.qcard-cheap .qcard-name { color: var(--text); }
/* The 402 is the protocol answering, read off the wire in this page load. */
.qcard-402 {
  font-family: var(--f-mono); font-size: 15px; font-weight: 600; letter-spacing: .08em;
  color: var(--live); border-bottom: 1px solid rgba(79,168,255,.45); padding-bottom: 3px;
}

.price { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.price-num {
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 76px; line-height: .95; font-weight: 500;
  color: var(--coin); letter-spacing: -0.045em;
}
.price-unit {
  font-family: var(--f-mono);
  font-size: 20px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase;
}
.price-sub { font-family: var(--f-mono); font-size: 16px; color: var(--dim); margin-bottom: 22px; }

.delta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 8px 0;
}
.delta-arrow { font-family: var(--f-mono); font-size: 30px; color: var(--dim); line-height: 1; }
.delta-num {
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 40px; font-weight: 600; color: var(--scored); line-height: 1; letter-spacing: -0.03em;
}
.delta-label {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .14em;
}
.delta-abs { font-family: var(--f-mono); font-size: 16px; color: var(--dim); }

.qrow {
  display: grid; grid-template-columns: 160px minmax(0,1fr);
  gap: 0 20px; padding: 10px 0; align-items: baseline;
  border-top: 1px solid var(--rule);
}
.qrow-k {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em;
}
.qrow-v { font-family: var(--f-mono); font-size: 17px; word-break: break-all; }

.formula {
  margin-top: 26px; padding: 16px 22px;
  background: var(--ink-2);
  border-left: 2px solid var(--rule-3);
}
.formula-k {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .14em;
  display: block; margin-bottom: 6px;
}
.formula-v { font-family: var(--f-mono); font-size: 19px; color: var(--text); }

/* error */
.err {
  border-left: 3px solid var(--refused);
  background: rgba(255,77,63,.06);
  padding: 20px 24px;
  animation: rise .2s ease both;
}
.err-title { color: var(--refused); font-weight: 600; font-size: 20px; margin: 0 0 10px; }
.err-msg { font-family: var(--f-mono); font-size: 17px; margin: 0 0 12px; word-break: break-word; color: var(--text); }
.err-url { font-family: var(--f-mono); font-size: 15px; color: var(--dim); word-break: break-all; margin: 0; }
.err-hint { margin: 14px 0 0; font-size: 17px; color: var(--text-2); }
.err-hint code { font-family: var(--f-mono); font-size: 15px; color: var(--live); }

/* ================================================================ refusal */

/* The argument of the product. It breaks the margin grid on purpose: it is the only band on
   the page that runs the full measure, and the only one carrying a red spine. */
.sec-refusal {
  background: var(--ink-red);
  border-top: 4px solid var(--refused);
  border-bottom: 1px solid rgba(255,77,63,.28);
  padding: 64px 0 78px;
}

.refusal-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
  padding-bottom: 40px;
}
.refusal-title h2 {
  margin: 0 0 16px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.refusal-title .lede { margin: 0; max-width: 62ch; }

.sample-banner {
  border-top: 1px solid var(--rule-2);
  padding-top: 16px;
}
.sample-banner p { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--dim); }
.sample-banner strong { color: var(--text-2); font-weight: 600; }

.risk-list { display: flex; flex-direction: column; gap: 56px; }
.risk { min-width: 0; }

.risk-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: 0;
}
.risk-refused .risk-top { border-bottom-color: rgba(255,77,63,.45); }
.risk-scored  .risk-top { border-bottom-color: rgba(62,207,122,.35); }
.risk-id { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.risk-scope { font-size: 26px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.risk-kind {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase;
}
.risk-note { font-size: 16px; color: var(--dim); text-align: right; }

.badge {
  font-family: var(--f-mono); font-size: 16px; font-weight: 600;
  letter-spacing: .18em; padding: 7px 14px; flex: none;
  border: 1px solid currentColor;
}
.badge-refused    { color: var(--refused); background: rgba(255,77,63,.1); }
.badge-scored     { color: var(--scored);  background: rgba(62,207,122,.09); }
.badge-forfeited  { color: var(--refused); background: rgba(255,77,63,.1); }
.badge-discharged { color: var(--scored);  background: rgba(62,207,122,.09); }
.badge-open       { color: var(--live);    background: rgba(79,168,255,.09); }

/* the position under test: the money is the largest thing in the row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin: 0;
}
.stat {
  padding: 20px 28px 22px 0;
  min-width: 0;
  border-bottom: 1px solid var(--rule);
}
.stat + .stat { border-left: 1px solid var(--rule); padding-left: 28px; }
.stat dt {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 8px;
}
.stat dd { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.2; }
.stat dd.big { font-size: 42px; line-height: 1; letter-spacing: -0.035em; font-weight: 500; }
.stat dd.void { font-size: 20px; color: var(--dim); font-style: normal; }
.stat dd.lead { color: var(--text); }
.stats-lead .stat dd.big { font-size: 38px; }

/* the duel: what everyone else says, against what this service says */
.duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--rule);
}
.duel-side {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 30px 36px 32px 0;
  min-width: 0;
}
.duel-side + .duel-side { border-left: 1px solid var(--rule); padding-left: 36px; }
.naive-label {
  font-family: var(--f-mono);
  font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .14em;
  margin-bottom: 18px;
}
.naive-num {
  font-size: 124px;
  font-weight: 500;
  line-height: .9;
  letter-spacing: -0.05em;
  color: var(--refused);
  text-decoration: line-through;
  text-decoration-thickness: 5px;
  text-decoration-color: rgba(255,77,63,.9);
}
.naive-verdict { font-size: 20px; color: var(--refused); font-style: italic; margin-top: 14px; }
.naive-note { font-size: 16px; color: var(--dim); margin: 18px 0 0; max-width: 46ch; }

.duel-verdict { justify-content: flex-start; }
.duel-verdict .badge-refused {
  font-size: 30px; letter-spacing: .22em; padding: 18px 26px; border-width: 2px;
  margin-top: 22px;   /* sits on the optical centre of the 0.821 it answers */
}
.duel-sub { font-size: 18px; color: var(--text-2); margin-top: 20px; max-width: 40ch; }

.reason {
  margin: 30px 0 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  max-width: 104ch;
}
.reason-key {
  font-size: 15px; color: var(--refused); text-transform: uppercase; letter-spacing: .16em;
  border: 1px solid rgba(255,77,63,.55); padding: 3px 9px; margin-right: 12px;
  vertical-align: 2px;
}

.scored-note { font-size: 18px; color: var(--text-2); margin: 22px 0 0; max-width: 80ch; }

/* ==================================================================== bond */

.bond-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
  margin-bottom: 8px;
}

.mini-head {
  font-family: var(--f-mono);
  font-size: 15px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--dim);
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 2px solid var(--rule-2);
}
.mini-sub { text-transform: none; letter-spacing: .02em; color: #5d6874; margin-left: 10px; }

.bond-terms { min-width: 0; }
.deflist { margin: 0; }
.deflist > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.deflist dt { color: var(--dim); font-size: 17px; }
.deflist dd { margin: 0; font-size: 19px; text-align: right; }

.outcomes { min-width: 0; }
.outcome { padding: 20px 0 18px 22px; border-left: 3px solid var(--rule-2); margin-top: 20px; }
.outcome-bad  { border-left-color: var(--refused); }
.outcome-good { border-left-color: var(--scored); }
.outcome-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.outcome-amt { font-size: 19px; color: var(--text); }
.outcome-bad .outcome-amt { color: var(--coin); }
.outcome ul { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 17px; }
.outcome li { margin: 5px 0; }
.outcome-note { margin: 22px 0 0; font-size: 16px; color: var(--dim); }

.covenant-out:empty { display: none; }

.cov {
  border-top: 2px solid var(--rule-2);
  background: var(--ink-1);
  animation: rise .25s ease both;
}
.cov-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px;
  border-bottom: 1px solid var(--rule);
}
.cov-id { font-family: var(--f-mono); font-size: 20px; word-break: break-all; }
.cov-verdict { font-size: 17px; color: var(--text-2); max-width: 74ch; margin: 8px 0 0; }
.cov-body { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 48px; padding: 8px 26px 26px; }
.cov-body > section { min-width: 0; }
.cov-sec-title {
  font-family: var(--f-mono);
  font-size: 15px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim);
  margin: 22px 0 2px;
}

/* ================================================================= journal */

.journal-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 34px; }

#receipts-body { padding: 0; }

.rcpt {
  display: grid;
  grid-template-columns: 116px 198px minmax(0,1fr) 148px;
  gap: 0 18px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rule);
}
.rcpt-seq { font-family: var(--f-mono); font-size: 16px; color: var(--dim); }
.rcpt-kind { font-family: var(--f-mono); font-size: 17px; font-weight: 500; color: var(--text-2); }
.rcpt-kind.is-eval  { color: var(--coin); }
.rcpt-kind.is-watch { color: var(--coin); }
.rcpt-kind.is-open  { color: var(--live); }
.rcpt-kind.is-ok    { color: var(--scored); }
.rcpt-kind.is-bad   { color: var(--refused); }
.rcpt-detail { font-family: var(--f-mono); font-size: 16px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcpt-amt {
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 19px; text-align: right; color: var(--text);
}
.rcpt-amt.gold { color: var(--coin); }
.rcpt-amt .u { font-size: 15px; color: var(--dim); margin-left: 6px; letter-spacing: .06em; }
.rcpt-foot { padding: 16px 22px; font-size: 16px; color: var(--dim); }

/* ================================================================== footer */

.footer { border-top: 1px solid var(--rule-2); box-shadow: 0 -4px 0 -3px var(--rule); background: var(--ink-2); }
.footer-in {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 40px;
  padding-top: 38px; padding-bottom: 42px;
}
.foot-col { min-width: 0; }
.foot-key {
  font-family: var(--f-mono);
  font-size: 15px; text-transform: uppercase; letter-spacing: .16em; color: var(--dim);
  margin-bottom: 10px;
}
.foot-val { font-size: 18px; display: inline-block; word-break: break-all; }
.foot-sub { font-size: 15px; color: #5d6874; margin-top: 6px; }

/* ============================================================== responsive */

@media (max-width: 1440px) {
  :root { --pad: 36px; --gut: 220px; --gut-gap: 48px; }
  .wordmark { font-size: 46px; }
  .refusal-title h2 { font-size: 38px; }
  .naive-num { font-size: 104px; }
  .stat dd.big { font-size: 34px; }
  .stats-lead .stat dd.big { font-size: 32px; }
  .price-num { font-size: 62px; }
  .quote-grid.is-pair { grid-template-columns: minmax(0,1fr) 150px minmax(0,1fr); }
  .rcpt { grid-template-columns: 104px 190px minmax(0,1fr) 138px; gap: 0 14px; }
  .status { min-width: 320px; }
  .controls { column-gap: 32px; }
  .clauses { column-gap: 40px; }
  .clause:nth-child(2n) { padding-left: 40px; margin-left: -40px; }
}

@media (max-width: 1320px) {
  .stat dd.big { font-size: 30px; }
  .stats-lead .stat dd.big { font-size: 28px; }
  .naive-num { font-size: 92px; }
  .stat { padding-right: 20px; }
  .stat + .stat { padding-left: 20px; }
  .bond-layout { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); column-gap: 40px; }
}

@media (max-width: 1120px) {
  :root { --pad: 24px; }
  .masthead-in { grid-template-columns: minmax(0,1fr); gap: 26px; align-items: start; }
  .status { min-width: 0; width: 100%; }
  .sec-in { grid-template-columns: minmax(0,1fr); row-gap: 34px; padding-top: 52px; padding-bottom: 56px; }
  .gut::after { display: none; }
  .gut { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--rule-2); padding-bottom: 14px; }
  .gut-sub { margin: 0; max-width: none; }
  .clauses { grid-template-columns: minmax(0,1fr); }
  .clause:nth-child(2n) { padding-left: 0; border-left: 0; margin-left: 0; }
  .controls, .controls-tight { grid-template-columns: minmax(0,1fr); justify-content: stretch; }
  .controls > .field:first-child { grid-column: auto; }
  .controls > .field-shrink:last-child { justify-self: start; }
  .refusal-head { grid-template-columns: minmax(0,1fr); row-gap: 28px; }
  .quote-grid.is-pair { grid-template-columns: minmax(0,1fr); }
  .delta { flex-direction: row; gap: 18px; padding: 0; }
  .bond-layout { grid-template-columns: minmax(0,1fr); row-gap: 36px; }
  .cov-body { grid-template-columns: minmax(0,1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .duel { grid-template-columns: minmax(0,1fr); }
  .duel-side + .duel-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .footer-in { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rcpt { grid-template-columns: minmax(0,1fr) auto; gap: 6px 16px; }
  .rcpt-seq { grid-column: 1 / -1; }
  .rcpt-detail { grid-column: 1 / -1; white-space: normal; }
  .price-num { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
