/* Writmoot — duotone family (violet duotone mark), LIGHT paper ground, ONE violet accent. CA bar pinned at the
   BOTTOM as a dock above the thumb. No top nav at all: the wordmark lives inside the filing card itself. The
   hero under the chrome is the file-a-writ FORM (a split pane: the form on one side, the ten-seat docket on
   the other) — a wax-seal stamp is the page's one motion cue, not a counting number or a filling rail. */
:root {
  --bg: #F4EEE1; --paper: #FBF7EE; --ink: #221933; --accent: #6B3FD4; --accent-2: #B79BEA;
  --line: #DCD0B8; --muted: #6E6255; --danger: #A3372A;
  --disp: 'Petrona', Georgia, serif; --body: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
.a11yonly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html, body { margin: 0; padding: 0; }
body {
  background:
    repeating-linear-gradient(180deg, rgba(34,25,51,.025) 0 1px, transparent 1px 27px),
    var(--bg);
  color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5;
  min-height: 100vh; padding-bottom: 74px; /* room for the fixed bottom CA dock */
}
a { color: var(--accent); text-decoration: none; }
code { font-family: var(--body); }
button { font-family: var(--body); cursor: pointer; }

/* ---------- layout ---------- */
main#view { display: block; max-width: 1180px; margin: 0 auto; padding: 22px 16px 0; }
.moothall { display: grid; grid-template-columns: 1fr; gap: 20px; }
.docketwing { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- the filing card (hero: FORM, first big thing under the chrome — no header carried over) ---------- */
.filecard { background: var(--paper); border: 1px solid var(--line); box-shadow: 3px 3px 0 var(--line); padding: 24px 20px 22px; position: relative; }
.filecard-letterhead { display: flex; align-items: center; gap: 9px; font-family: var(--disp); font-weight: 600; font-size: 15px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.filecard-letterhead img { width: 22px; height: 22px; }
.filecard-letterhead .tickertag { font-family: var(--body); font-weight: 600; color: var(--accent); font-size: 11px; letter-spacing: .06em; margin-left: auto; text-transform: uppercase; }
.writhead { font-family: var(--disp); font-size: clamp(24px, 4.4vw, 33px); line-height: 1.14; margin: 0 0 8px; font-weight: 600; }
.writsub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; max-width: 56ch; }
.writfield { display: flex; gap: 8px; }
.writfield input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--ink); padding: 14px; font-family: var(--body); font-size: 15px; }
.writfield input:focus { outline: none; border-color: var(--accent); }
button#fileBtn, button#revealBtn {
  background: var(--accent); color: var(--paper); border: none; padding: 14px 20px; font-family: var(--disp);
  font-weight: 600; font-size: 15px; letter-spacing: .01em; white-space: nowrap; position: relative;
}
button#fileBtn:disabled, button#revealBtn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
/* the seal-stamp motion cue: the file button presses down like a wax seal on click */
button#fileBtn.stamping { animation: stampdown .38s ease; }
@keyframes stampdown { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(3px) scale(.96); } 100% { transform: translateY(0) scale(1); } }
.writhint { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }
.writhint b { color: var(--ink); }
.writflag { color: var(--danger); font-size: 12px; margin-top: 8px; }
.ruleslink { display: inline-block; margin-top: 14px; font-size: 11.5px; letter-spacing: .03em; color: var(--muted); border-bottom: 1px dashed var(--line); }
.yourwrits { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.yourwrits h4 { font-family: var(--disp); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; color: var(--accent); font-weight: 600; }
.wonseal { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--accent); color: var(--accent); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- the docket ledger: ten seats, a filing-in-progress ring of dots + the seat table ---------- */
.ledgerbox { background: var(--paper); border: 1px solid var(--line); box-shadow: 3px 3px 0 var(--line); overflow: hidden; }
.ledgerbox h2, .ledgerbox-h { font-family: var(--disp); font-weight: 600; font-size: 15px; margin: 0; padding: 16px 18px 14px; border-bottom: 1px dashed var(--line); }
.sealdots { display: flex; gap: 7px; padding: 14px 18px 4px; flex-wrap: wrap; }
.sealdot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--accent-2); background: transparent; }
.sealdot.on { background: var(--accent); border-color: var(--accent); }
.sealdot.mine { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.seatgrid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.seatgrid th { text-align: left; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .06em; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.seatgrid td { padding: 9px 14px; border-bottom: 1px dashed var(--line); }
.seatgrid tr.vacant td { color: var(--muted); }
.seatgrid tr.unsealed td { color: var(--muted); font-style: italic; }
.seatgrid tr.won td { background: rgba(107,63,212,.08); font-weight: 600; }
.seatn { font-family: var(--disp); font-weight: 600; color: var(--accent); }

/* ---------- stats side + settled ledger ---------- */
.docketside { display: grid; gap: 14px; }
.docketcard { background: var(--paper); border: 1px solid var(--line); box-shadow: 3px 3px 0 var(--line); padding: 16px; }
.docketcard h3 { font-family: var(--disp); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; color: var(--accent); }
.cardline { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.cardline:last-child { border-bottom: none; }
.cardline span { color: var(--muted); }
.cardline b { font-weight: 600; }
.docketcard.quietnote { color: var(--muted); }
.movewrap h2 { font-family: var(--disp); font-weight: 600; font-size: 14px; margin: 22px 0 10px; }
.movegrid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.movegrid th { text-align: left; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.movegrid td { padding: 9px 10px; border-bottom: 1px dashed var(--line); }
.quietnote { color: var(--muted); text-align: center; padding: 20px !important; }

/* ---------- how / lawbook ---------- */
.lawbook { max-width: 700px; margin: 0 auto; padding-bottom: 40px; }
.lawbook blockquote { font-family: var(--disp); font-weight: 600; font-size: 21px; border-left: 3px solid var(--accent); padding-left: 16px; margin: 20px 0; }
.lawbook h3 { font-family: var(--disp); font-weight: 600; font-size: 14px; margin: 24px 0 8px; color: var(--accent); }
.lawbook p { color: var(--muted); line-height: 1.6; }
.lawbook code { color: var(--ink); }

/* ---------- pane (rules sheet / file+reveal confirm) ---------- */
#tray[hidden] { display: none !important; }
#tray { position: fixed; inset: 0; background: rgba(34,25,51,.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheetcard { background: var(--paper); border: 1px solid var(--accent); border-bottom: none; width: 100%; max-width: 480px; padding: 20px; }
.sheethead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheethead span { font-family: var(--disp); font-weight: 600; font-size: 15px; }
.sheethead button { background: none; border: none; color: var(--ink); font-size: 22px; }
.pickerlist { display: grid; gap: 8px; }
.pickerlist button { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); padding: 12px; width: 100%; text-align: left; }
.pickerlist img { width: 22px; height: 22px; }
.ruleslist { margin: 0; padding-left: 0; list-style: none; color: var(--muted); font-size: 13px; line-height: 1.7; }
.ruleslist li { border-bottom: 1px dashed var(--line); padding: 9px 0; }
.ruleslist b { color: var(--ink); }

/* ---------- mootfoot (footer) ---------- */
.mootfoot { max-width: 1180px; margin: 0 auto; padding: 22px 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mootfoot-mark { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-weight: 600; color: var(--ink); font-size: 13px; }
.mootfoot-mark img { width: 18px; height: 18px; }
.mootfoot-nav { display: flex; gap: 12px; }
.mootfoot-nav a { text-decoration: none; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.mootfoot-kv code { color: var(--ink); }
.mootfoot-soc { display: flex; gap: 10px; }
.mootfoot-soc a { text-decoration: none; font-size: 11px; letter-spacing: .04em; }
.mootfoot-tag { width: 100%; margin-top: 6px; }

/* ---------- the CA dock: fixed at the BOTTOM, above the thumb, on screen at every width ---------- */
.dockbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); border-top: 2px solid var(--accent); }
.dockbar-inner { max-width: 1180px; margin: 0 auto; padding: 11px 16px; display: flex; align-items: center; gap: 12px; }
.dockbar-mark { display: flex; align-items: center; gap: 7px; font-family: var(--disp); font-weight: 600; color: var(--paper); font-size: 13px; flex-shrink: 0; }
.dockbar-mark img { width: 18px; height: 18px; }
.dockaddr { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13px; color: var(--paper); user-select: all; }
.dockcopy { background: var(--accent); color: var(--paper); border: none; padding: 8px 13px; font-weight: 700; font-size: 11px; text-transform: uppercase; flex-shrink: 0; }
.dockcopy.punched { background: var(--accent-2); color: var(--ink); }
.docklink { flex-shrink: 0; color: var(--accent-2); text-decoration: none; font-size: 11px; letter-spacing: .04em; border-left: 1px solid #40325c; padding-left: 12px; }

/* ---------- pingtoast (toast) ---------- */
.pingtoast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 13px; font-weight: 600; z-index: 80; }

/* ================= breakpoints ================= */
/* ≤ 520: single column, letterhead → filing form → docket ledger stacked, no horizontal scroll (base layout above). */

/* ~720–1000: same one column, wider measure, larger type. */
@media (min-width: 720px) {
  main#view { padding-top: 30px; }
  .writhead { font-size: 32px; }
  .dockbar-inner { padding: 13px 24px; }
}

/* ≥ 1000: the page recomposes into a genuine SPLIT PANE — the filing form and the docket ledger sit side by
   side as two even columns, not a wide primary column with a narrow rail. */
@media (min-width: 1000px) {
  .moothall { grid-template-columns: 1fr 1fr; align-items: start; gap: 22px; }
  .writhead { font-size: 34px; }
  .filecard { padding: 30px 26px 26px; }
  main#view { padding-top: 38px; }
}
