/* CHRONOS . grand feu enamel, black print, heat-blued steel, one ruby. The page breaks are minute tracks. */
:root {
  --enamel: #f1ece1;
  --paper: #e8e1d1;
  --ink: #15130f;
  --ink2: #554f45;
  --rule: #c7bea9;
  --steel: #1d3fa6;
  --steel2: #132c78;
  --ruby: #a3142e;
  --good: #1f6b3a;
  --serif: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --gut: 24px;
}
* { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--enamel); color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-variant-numeric: tabular-nums lining-nums;
}
a { color: var(--steel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--steel2); }
.mono, code { font-family: var(--mono); font-size: 0.86em; overflow-wrap: anywhere; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; }
p { margin: 0 0 0.8em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut); }

/* the minute track: a long mark every fifth */
.track {
  height: 10px; width: 100%;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) left bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 50px) left bottom / 100% 10px no-repeat;
}

/* ------------------------------------------------------------------ header */
#top {
  max-width: 1180px; margin: 0 auto; padding: 18px var(--gut) 14px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  position: relative;
}
#top::after { content: ''; position: absolute; left: var(--gut); right: var(--gut); bottom: 0; height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) left bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 50px) left bottom / 100% 10px no-repeat; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand svg { width: 38px; height: 38px; }
.brand span { font-family: var(--serif); font-size: 24px; letter-spacing: 0.32em; }
nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 0; }
nav .grp { display: inline-flex; }
nav .grp + .grp::before { content: ''; width: 6px; height: 6px; margin: 0 18px; align-self: center; background: var(--rule); border-radius: 50%; }
nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 9px; }
nav a:hover { color: var(--steel); }
nav a[aria-current] { color: var(--steel); box-shadow: inset 0 -2px 0 var(--steel); }
.crown {
  position: relative; border: 1px solid var(--ink); background: var(--ink); color: var(--enamel);
  padding: 9px 14px 9px 24px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.crown::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: repeating-linear-gradient(0deg, var(--ink) 0 2px, #8a8170 2px 4px); }
.crown.on { background: var(--enamel); color: var(--ink); }

.notice { max-width: 1180px; margin: 12px auto 0; padding: 0 var(--gut); font-size: 14px; color: var(--ink2); }
.notice::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ruby); margin-right: 10px; vertical-align: 1px; }
.notice.preview::before { background: var(--steel); }

main { max-width: 1180px; margin: 0 auto; padding: 28px var(--gut) 40px; }
section { margin: 0 0 44px; }
section > .track { margin: 0 0 22px; }
section h2 { font-size: 34px; margin: 0 0 14px; }
.lede { font-size: 18px; max-width: 62ch; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.num { text-align: right; white-space: nowrap; }
.ruby { color: var(--ruby); }
.steel { color: var(--steel); }

/* ------------------------------------------------------------------ buttons and fields */
.btn {
  display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: var(--enamel);
  padding: 12px 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { background: var(--steel2); border-color: var(--steel2); color: var(--enamel); }
.btn.steel { background: var(--steel); border-color: var(--steel); }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { color: var(--enamel); }
label.field { display: block; margin: 0 0 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
input[type=text], input[type=number] {
  width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 8px 2px;
  font: 400 30px/1.2 var(--serif); color: var(--ink); outline: none; font-variant-numeric: lining-nums;
}
input:focus { border-bottom-color: var(--steel); }
.unit { font-size: 13px; color: var(--ink2); margin-top: 4px; }

/* tolerance: a row of indices, not pills */
.indices { display: flex; flex-wrap: wrap; border-top: 1px solid var(--ink); }
.indices label { flex: 1 1 0; min-width: 56px; text-align: center; padding: 10px 2px 8px; font-size: 14px; cursor: pointer; position: relative; }
.indices label::before { content: ''; position: absolute; top: -1px; left: 50%; width: 1px; height: 8px; background: var(--ink); }
.indices input { position: absolute; opacity: 0; pointer-events: none; }
.indices label:has(input:checked) { color: var(--steel); font-weight: 600; }
.indices label:has(input:checked)::before { width: 3px; height: 14px; margin-left: -1px; background: var(--steel); }

/* ------------------------------------------------------------------ the dial */
.dial { width: 100%; height: auto; display: block; }
.dial .case { fill: var(--paper); }
.dial .bezel { fill: none; stroke: var(--ink); stroke-width: 2; }
.dial .enamel { fill: var(--enamel); stroke: var(--ink); stroke-width: 0.8; }
.dial .tick { stroke: var(--ink); stroke-width: 2; }
.dial .tick.long { stroke-width: 5; }
.dial .chapter { fill: none; stroke: var(--rule); stroke-width: 1; }
.dial .arc { fill: none; stroke-width: 5; }
.dial .arc.window { stroke: var(--steel); }
.dial .arc.cap { stroke: var(--ink); }
.dial .ord.buy { fill: var(--ink); }
.dial .ord.sell { fill: var(--enamel); stroke: var(--ink); stroke-width: 3; }
.dial .ord.first { fill: var(--ruby); stroke: var(--ruby); }
.dial .place { font-family: var(--serif); font-size: 30px; text-anchor: middle; fill: var(--ink); }
.dial .place.first { fill: var(--ruby); }
.dial .hand { fill: var(--steel); transition: transform 0.6s cubic-bezier(.3,1.4,.5,1); }
.dial .hand .hole { fill: var(--enamel); }
.dial .pivot-steel { fill: var(--steel); }
.dial .pivot-ruby { fill: var(--ruby); }
.dial .dial-label { font-family: var(--serif); font-size: 40px; text-anchor: middle; fill: var(--ink); }
.dial .dial-sub { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-anchor: middle; fill: var(--ink2); text-transform: uppercase; }

/* ------------------------------------------------------------------ the dial page */
.face { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 48px; align-items: center; }
.face h1 { font-size: 64px; letter-spacing: -0.01em; }
.face h1 em { font-style: italic; }
.face .lede { margin: 20px 0 26px; }
.face .acts { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; margin-bottom: 30px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; }
.stepper button { border: 0; background: none; font: 400 26px/1 var(--serif); color: var(--ink); padding: 4px 10px; }
.stepper button:hover:not(:disabled) { color: var(--steel); }
.key { max-width: 52ch; margin: 12px auto 0; text-align: center; }
.stepper span { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; min-width: 15ch; text-align: center; }

/* readings: label over value, hairline above each */
.readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 26px; }
.readings div { border-top: 1px solid var(--rule); padding: 9px 0 12px; }
.readings dt { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); }
.readings dd { margin: 2px 0 0; font: 400 26px/1.2 var(--serif); }
.readings dd small { display: block; font: 400 13px/1.35 var(--sans); color: var(--ink2); margin-top: 2px; }

/* the braid: arrival order above, execution order below */
.braid { width: 100%; height: auto; display: block; }
.braid .line { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.braid .line.first { stroke: var(--ruby); stroke-width: 2.6; }
.braid .dot { fill: var(--ink); }
.braid .dot.sell { fill: var(--enamel); stroke: var(--ink); stroke-width: 2; }
.braid .dot.first { fill: var(--ruby); stroke: var(--ruby); }
.braid text { font-family: var(--serif); font-size: 15px; text-anchor: middle; fill: var(--ink); }
.braid .axis { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-anchor: start; fill: var(--ink2); text-transform: uppercase; }

/* the chronograph scale */
.scale { position: relative; margin: 26px 0 18px; height: 100px; }
.scale .bar { position: absolute; left: 0; right: 0; top: 40px; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 2%) left top / 100% 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left 6px / 100% 1px no-repeat; }
.scale .mark { position: absolute; top: 0; transform: translateX(-1px); border-left: 2px solid var(--ink); height: 52px; padding-left: 6px; font-size: 12px; line-height: 1.25; white-space: nowrap; }
.scale .mark.low { top: 46px; height: 46px; padding-top: 18px; }
.scale .mark.end { transform: translateX(-100%); border-left: 0; border-right: 2px solid var(--ink); padding: 0 6px 0 0; text-align: right; }
.scale .mark b { display: block; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.scale .now { position: absolute; top: 34px; width: 3px; height: 26px; background: var(--steel); transition: left 1s linear; }
.scale .fill { position: absolute; top: 46px; left: 0; height: 6px; background: var(--steel); transition: width 1s linear; }

/* ------------------------------------------------------------------ ledger tables */
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink2); padding: 8px 10px 6px 0; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger th.num, .ledger td.num { text-align: right; }
.ledger tr.pick { cursor: pointer; }
.ledger tr.pick:hover td { background: var(--paper); }
.ledger tr.open-row td { background: var(--paper); }
.ledger .detail td { background: var(--paper); padding: 14px 12px 18px; }
.scroll { overflow-x: auto; }
.status { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.status.open { color: var(--steel); }
.status.closed { color: var(--ruby); }
.status.aborted { color: var(--ink2); text-decoration: line-through; }
.perm { font-family: var(--serif); font-size: 15px; letter-spacing: 0.06em; }

/* ------------------------------------------------------------------ order page */
.desk { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.desk > form { padding: 6px 30px 12px 0; }
.desk > form + form { padding: 6px 0 12px 30px; border-left: 1px solid var(--ink); }
.desk h2 { font-size: 40px; margin-bottom: 18px; }
.desk .est { margin: 16px 0 18px; font-size: 14px; }
.desk .est b { font: 400 22px var(--serif); }
.balance { font-size: 13px; color: var(--ink2); margin: 0 0 10px; }
.balance button { border: 0; background: none; color: var(--steel); padding: 0 4px; text-decoration: underline; }

/* ------------------------------------------------------------------ proof page */
.log { list-style: none; margin: 18px 0; padding: 0; border-top: 1px solid var(--ink); }
.log li { display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.log li .mk { font: 400 22px/1 var(--serif); }
.log li.ok .mk { color: var(--good); }
.log li.bad .mk { color: var(--ruby); }
.log li.run .mk { color: var(--steel); }
.log .val { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink2); overflow-wrap: anywhere; margin-top: 3px; }
.race { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 26px; margin: 18px 0; }
.race div { border-top: 3px double var(--ink); padding: 10px 0; }
.race b { display: block; font: 400 36px/1.1 var(--serif); }
.race span { font-size: 13px; color: var(--ink2); }

/* ------------------------------------------------------------------ calibre page: the rules in the contract's voice */
.rules { columns: 2 340px; column-gap: 46px; }
.rules p { break-inside: avoid; }
.rules p b:first-child { font-family: var(--serif); font-weight: 400; font-size: 19px; margin-right: 6px; }
.consts td:first-child { font-family: var(--mono); font-size: 12.5px; }

/* ------------------------------------------------------------------ footer and toasts */
#foot { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut) 36px; font-size: 13px; color: var(--ink2); }
#foot p { margin-top: 14px; }
#foot .sig { font-family: var(--serif); letter-spacing: 0.3em; color: var(--ink); margin-right: 8px; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--enamel); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: baseline; border-left: 6px solid var(--steel); }
.toast[data-kind=good] { border-left-color: #4fae6b; }
.toast[data-kind=bad] { border-left-color: var(--ruby); }
.toast span { flex: 1; }
.toast a { color: #b8c6ff; }
.toast button { border: 0; background: none; color: var(--enamel); padding: 0 2px; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 900px) {
  .face { grid-template-columns: 1fr; gap: 18px; }
  .face .copy { display: contents; }
  .face h1 { order: 1; }
  .face .dialbox { order: 2; }
  .face .lede { order: 3; margin: 6px 0 18px; }
  .face .acts { order: 4; }
  .face .readings { order: 5; }
  .face h1 { font-size: 46px; }
  .desk { grid-template-columns: 1fr; }
  .desk > form, .desk > form + form { padding: 8px 0 22px; border-left: 0; }
  .desk > form + form { border-top: 1px solid var(--ink); padding-top: 22px; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  #top { grid-template-columns: 1fr auto; gap: 12px; }
  #top nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  nav .grp { justify-content: center; border-left: 1px solid var(--rule); }
  nav .grp:first-child { border-left: 0; justify-content: flex-start; }
  nav .grp:last-child { justify-content: flex-end; }
  nav .grp + .grp::before { display: none; }
  nav a { padding: 6px 5px; font-size: 11.5px; letter-spacing: 0.06em; }
  .brand span { font-size: 20px; }
  section h2 { font-size: 28px; }
  .face h1 { font-size: 40px; }
  .ledger { font-size: 13px; }
  .ledger.stack thead { display: none; }
  .ledger.stack tr { display: block; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .ledger.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  .ledger.stack td::before { content: attr(data-l); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink2); text-align: left; }
  .scale .mark { font-size: 11px; }
}
