/* ── Massalaskuri drafting-table design system ─────────────────────────
   Canonical tokens & primitives for every page on api.massalaskuri.com.
   Concept: a dark drafting table. The drawing (paper) carries the light;
   amber is the plotter — reserved for action and live work.
   Fonts (load per page): Saira Semi Condensed 500/600/700 (display),
   Inter 400/500/600 (body), IBM Plex Mono 400/500 (data, ids, code).   */
:root {
  --table: #161412;        /* the dark drafting table */
  --table-2: #1d1a17;      /* raised surfaces */
  --table-3: #242019;      /* hover */
  --line: #2e2924;         /* hairlines */
  --paper: #fafaf7;        /* the drawing carries the light */
  --ink: #e9e6e0;          /* primary text on the table */
  --ink-2: #a39d92;        /* secondary */
  --ink-3: #6e6960;        /* tertiary */
  --amber: #e8a33d;        /* the plotter */
  --amber-2: #c9882a;
  --ok: #7fbf7f;
  --bad: #e07a6a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --disp: "Saira Semi Condensed", sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--table); color: var(--ink);
  font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--ink-2); text-decoration: none; }
a:hover { color: var(--ink); }
button { font-family: var(--body); cursor: pointer; }
::selection { background: rgba(232,163,61,.3); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

.eyebrow { font-family: var(--disp); font-weight: 600; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mono { font-family: var(--mono); }

/* ── Header ── */
header { display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 56px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .mark { font-family: var(--disp); font-weight: 700; font-size: 16px; letter-spacing: .02em; color: var(--paper); }
.brand .sub { font-family: var(--disp); font-weight: 500; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); }
.hdr-right { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.hdr-right a.on { color: var(--amber); }
@media (max-width: 640px) {
  header { padding: 0 16px; gap: 16px; }
  .brand .sub { display: none; }
  .hdr-right { gap: 12px; }
}

/* ── Live dot / plotter line ── */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.pulse { animation: pulse 2.4s ease-in-out infinite; }
.dot.err { background: var(--bad); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.edge { position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.edge.done { background: var(--ok); }
.edge.failed { background: var(--bad); }
.edge.awaiting_upload, .edge.expired { background: var(--ink-3); }
.edge.processing, .edge.queued { background: repeating-linear-gradient(
  to bottom, var(--amber) 0 6px, transparent 6px 12px); background-size: 100% 24px;
  animation: plot 1.1s linear infinite; }
@keyframes plot { to { background-position: 0 24px; } }

/* status words — plain colored text, never pills */
.st.done, .st.up { color: var(--ok); }
.st.failed, .st.down { color: var(--bad); }
.st.processing, .st.queued { color: var(--amber); }
.st.awaiting, .st.awaiting_upload, .st.expired { color: var(--ink-3); }

/* ── Buttons ── */
.btn-amber { background: var(--amber); color: #221a0d; border: 0; border-radius: 6px;
  font-weight: 600; font-size: 13.5px; padding: 8px 15px; white-space: nowrap; }
.btn-amber:hover { background: var(--amber-2); }
.btn-amber:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--ink-2); border-radius: 6px;
  padding: 6px 12px; font-size: 13px; }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }

/* ── Paper sheet card ── */
.sheet-card { background: var(--paper); color: #23201c; border-radius: 3px; padding: 34px 36px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); position: relative; }
.sheet-card::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(35,32,28,.14);
  pointer-events: none; }

/* ── Menu ── */
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--table-2);
  border: 1px solid var(--line); border-radius: 8px; min-width: 190px; padding: 4px; z-index: 40;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--ink-2); padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.menu button:hover { background: var(--table-3); color: var(--ink); }

/* ── Drafting title-block ── */
.tblock { border: 1px solid #46403a; }
.tblock .tb-hd { font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2); padding: 8px 12px; border-bottom: 1px solid #46403a; }
.tblock .tb-grid { display: grid; grid-template-columns: 1fr 1fr; }
.tblock .cell { padding: 9px 12px; border-top: 1px solid #2e2a25; }
.tblock .cell.wide { grid-column: 1 / 3; border-top: 0; }
.tblock .cell:nth-child(even) { border-left: 1px solid #2e2a25; }
.tblock .cell.wide + .cell { border-left: 0; }
.tblock .cl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  font-family: var(--disp); font-weight: 600; margin-bottom: 3px; }
.tblock .cv { font-family: var(--mono); font-size: 12px; color: var(--ink); word-break: break-all; }
.tblock .cv button { border: 0; background: none; color: var(--ink-3); font-size: 12px; padding: 0 4px; }
.tblock .cv button:hover { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .edge.processing, .edge.queued { animation: none; background: var(--amber); }
  .dot.pulse { animation: none; }
}
