/* ==========================================================================
   PACTLET — design system
   Direction: calm civic infrastructure. A registry, not a SaaS.
   Type:   Newsreader (notices) · Public Sans (the civil service) · IBM Plex Mono (the ledger)
   Signature: the double rule — two parallel hairlines wherever the record speaks.
     One line per side, one shared record.
   ========================================================================== */

/* Web fonts: self-hosted @font-face lives in assets/fonts.css, linked from
   every page head (before this stylesheet on index.html). */

/* ---------- tokens ---------- */
:root {
  /* paper & ink — cool document white, blue-black registry ink */
  --paper: #f6f6f1;
  --paper-raised: #fdfdfa;
  --paper-tint: #eef0ea;
  --ink: #18283f;
  --ink-deep: #0d1828; /* display headings only — print-rich near-black */
  --ink-soft: #51607a;
  --ink-faint: #646e82;
  --line: #d9dcd2;
  --line-strong: #b9bfb1;

  /* the one strong color: registry ink used as action */
  --action: #1d3a5f;
  --action-hover: #16304f;
  --action-ink: #f6f6f1;
  --action-tint: #e8edf4; /* soft navy wash for action-stage surfaces */

  /* the seal — used only where something is recorded or certified */
  --seal: #b23a2c;

  /* the accent — confirmation, agreement confirmed, the tick */
  --accent: #0cb48a;
  --accent-ink: #0a7d61; /* darker teal for text on paper — passes AA (4.70:1 on --paper) */
  --accent-soft: #d0f4ea;
  --accent-tint: #e3f4ec; /* whole-row wash for completed milestones */

  /* states */
  --ok: #2e6b50;
  --ok-bg: #e7efe9;
  --due: #8a5a14;
  --due-bg: #f4ecdc;
  --due-border: #e4d6b8;
  /* Calm scheme: green = done, amber = your own to-dos; everything else neutral. */
  --mine-bg: #f8ecd0;  --mine-ring: #d7a23c;  --mine-ink: #7a4f12;  /* your to-dos — amber */
  --wait: #5a6a86;
  --wait-bg: #edf1f6;
  --wait-border: #d6dee9;
  --accent-border: #c9e4d7; /* teal hairline for completed / approved rows */
  --warn-tint: #fffbf0;     /* missing-field highlight in the cover sheet */

  /* light text & line-art on the one dark band — ratios verified on --ink */
  --on-ink: #f4f5ef;        /* headings — 13.5:1 */
  --on-ink-soft: #e8ebe4;   /* band default text / line art — 12.3:1 */
  --on-ink-muted: #b8c0cf;  /* body paragraphs — 8.1:1 */
  --on-ink-mono: #d6dbc9;   /* mono pricing line — 10.5:1 */
  --on-ink-hair: rgba(232, 235, 228, 0.25);

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(24, 40, 63, 0.05), 0 8px 28px rgba(24, 40, 63, 0.07);
  --shadow-soft: 0 1px 2px rgba(24, 40, 63, 0.05);

  /* engraved-register hero: warm laid stock + the dormant seal activated */
  --paper-deep: #efeee4;
  --seal-deep: #8f2c20;
  --seal-ink: #f7e9e4;
  --laid-line: rgba(24, 40, 63, 0.020);
  --grid-line: rgba(24, 40, 63, 0.016);

  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --measure: 64ch;
  --page: 1168px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Reserve space for the sticky topbar (~55px) so anchored sections
     (#home, #contact, #create…) don't tuck their heading under the header. */
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
/* Inherit color too, not just font: otherwise iOS Safari paints unstyled
   <button> text (e.g. the template-card titles) in its system blue, while
   desktop shows the dark inherited color. */
button { font-family: inherit; color: inherit; }
a { color: var(--action); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }

::selection { background: var(--action-tint); }

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Route focus ring — drawn with a class so it also shows when focus moves
   after a pointer click (e.g. switching language), where :focus-visible would
   not match. app.js removes it on blur. */
.route-focus {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.is-hidden { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  background: var(--ink); color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* SPA view switching — required by app.js routing */
.view { display: none; }
.view.is-active { display: block; }

/* display headings carry the deep ink — the "black" of the page */
h1, h2 { color: var(--ink-deep); }


/* eyebrow — small civic label */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
  margin: 0 0 12px;
}

/* ---------- buttons & links ---------- */
.primary-button,
.button.primary,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--action);
  color: var(--action-ink);
  border: 1px solid var(--action);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.primary-button:hover:not(:disabled), .button.primary:hover:not(:disabled), .primary-link:hover:not(:disabled) {
  background: var(--action-hover);
  color: var(--action-ink);
}
.primary-button:active:not(:disabled), .button.primary:active:not(:disabled), .primary-link:active:not(:disabled) { transform: translateY(1px); }
.primary-button:disabled, .button.primary:disabled, .primary-link:disabled,
.secondary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.button.primary.small { padding: 5px 14px; font-size: 14px; white-space: nowrap; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.secondary-button:hover { border-color: var(--ink-soft); background: var(--paper-raised); }

.small-button { padding: 7px 12px; font-size: 13px; }

.icon { display: inline-flex; }
.icon svg, .primary-button svg, .secondary-button svg, .primary-link svg {
  width: 17px; height: 17px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--paper-raised) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

/* flex-shrink:0 keeps the brand column from being squeezed in a tight header;
   max-width:none overrides the global `img { max-width:100% }`, which — paired
   with the fixed height — would otherwise distort the logo's aspect ratio. */
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; max-width: none; display: block; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-mode { display: flex; align-items: center; gap: 18px; }

.nav-login-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-login-link:hover, .nav-login-link.is-active { color: var(--ink); }

/* account menu */
.account-menu { position: relative; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
}
/* The initials chip is intentionally hidden — the signed-in pill shows just the
   name + chevron, which reads cleaner and frees space in the header. The element
   stays in the DOM (JS still sets its text) so nothing downstream breaks. */
.account-avatar { display: none; }
.account-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-chevron { color: var(--ink-faint); }
.account-popover {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 4px;
}
.account-popover strong { font-size: 14px; }
.account-popover span { font-size: 13px; color: var(--ink-soft); }
.account-popover button {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.account-popover button:hover { border-color: var(--ink-soft); }
.account-popover .account-settings-link {
  margin-top: 10px;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink);
}
.account-popover .account-settings-link:hover { border-color: var(--ink-soft); }
.account-popover .account-settings-link + button { margin-top: 4px; }

/* ==========================================================================
   SHARED UTILITIES (trust line)
   ========================================================================== */

.trust-line {
  margin: 14px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.trust-line::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  transform: translateY(-1px);
}
/* ==========================================================================
   SHARED FORM FIELDS (dashboard search, draft step editor, follow-up grid, …)
   ========================================================================== */
.followup-form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.followup-form-grid input, .followup-form-grid textarea, .followup-form-grid select,
.prefill-box textarea,
.dashboard-search input,
.link-output input {
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--ink);
}
.followup-form-grid input:hover, .followup-form-grid textarea:hover, .followup-form-grid select:hover,
.prefill-box textarea:hover,
.dashboard-search input:hover,
.link-output input:hover {
  border-color: var(--ink-soft);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.dashboard-shell {
  max-width: var(--page);
  margin: 0 auto;
  padding: 40px 22px 72px;
}
.dashboard-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.dashboard-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 6px;
}
.dashboard-heading h1 { font-size: 32px; margin-bottom: 4px; }
.dashboard-heading p { color: var(--ink-soft); margin: 0; font-size: 15px; }

.dashboard-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}
.dashboard-summary > div {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
}
.dashboard-summary strong { font-family: var(--font-mono); font-size: 15px; }
.summary-dot,
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.summary-dot.is-active, .status-dot.is-active { background: var(--ok); }
.summary-dot.is-waiting, .status-dot.is-waiting { background: var(--wait); }
.summary-dot.is-action, .status-dot.is-action { background: var(--due); } /* amber for routine attention; --seal reserved for certified/recorded moments */
.summary-dot.is-free { background: var(--accent); }

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.pactlet-table-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pactlet-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.pactlet-table-toolbar h2 { font-family: var(--font-ui); font-size: 16px; font-weight: 600; margin: 0; }
.pactlet-table-toolbar span { font-size: 12.5px; color: var(--ink-faint); font-family: var(--font-mono); }
.dashboard-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
}
.dashboard-search .icon { color: var(--ink-faint); }
.dashboard-search svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-search input { border: none; padding: 8px 0; width: 180px; background: none; }
.dashboard-search input:focus { outline: none; }
.dashboard-search:focus-within { outline: 2px solid var(--action); outline-offset: 0; border-color: var(--action); }

.pactlet-table-head,
.pactlet-dashboard-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.1fr 1fr 0.9fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 18px;
}
.pactlet-table-head {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.pactlet-dashboard-row + .pactlet-dashboard-row { border-top: 1px solid var(--line); }
.pactlet-dashboard-row:hover { background: var(--paper); }

.dashboard-cell strong { font-size: 14.5px; font-weight: 600; display: block; }
.dashboard-cell small { font-size: 12.5px; color: var(--ink-faint); font-family: var(--font-mono); }
.dashboard-cell span { font-size: 14px; color: var(--ink-soft); }

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.dashboard-updated-cell time { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); }

.dashboard-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-open-link {
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--ink);
}
.dashboard-open-link:hover { border-color: var(--action); color: var(--action); }
.dashboard-more-button {
  text-decoration: none;
  color: var(--ink-faint);
  font-size: 15px;
  padding: 4px 6px;
}
.dashboard-more-button:hover { color: var(--action); }
.dashboard-delete-button {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.dashboard-delete-button:hover { color: var(--seal); background: var(--seal-tint); border-color: var(--seal-tint); }
.dashboard-delete-button:disabled { opacity: 0.5; cursor: default; }
.dashboard-reuse-button {
  appearance: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--ink-soft);
  transition: color 0.15s, border-color 0.15s;
}
.dashboard-reuse-button:hover { border-color: var(--action); color: var(--action); }
.dashboard-reuse-button:disabled { opacity: 0.6; cursor: default; }

.attention-rail {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.attention-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.attention-heading h2 { font-family: var(--font-ui); font-size: 15px; font-weight: 600; margin: 0; }
.attention-heading span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}
.attention-empty { font-size: 13.5px; color: var(--ink-faint); margin: 0; }
.attention-item {
  display: grid;
  gap: 5px;
  padding: 13px 0;
}
.attention-item + .attention-item { border-top: 1px solid var(--line); }
.attention-item > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.attention-item strong { font-size: 14px; }
.attention-item p { font-size: 13px; color: var(--ink-soft); margin: 0; }
.attention-item a { font-size: 13.5px; font-weight: 600; color: var(--action); }

.dashboard-empty {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 26px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.dashboard-empty strong { color: var(--ink); font-size: 15px; }
.dashboard-empty p { font-size: 13.5px; margin: 0; }

/* ==========================================================================
   DRAFT REVIEW
   ========================================================================== */
/* --- stepper bar --- */
.draft-stepper {
  max-width: var(--page);
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.draft-stepper-steps {
  display: flex;
  align-items: center;
  gap: 4px;
}
.draft-stepper-step {
  font-size: 13px;
  color: var(--ink-faint);
  padding: 4px 12px;
  border-radius: 999px;
}
.draft-stepper-step.is-current {
  background: var(--action);
  color: var(--action-ink);
  font-weight: 600;
}
.draft-stepper-step.is-complete {
  color: var(--accent-ink);
  font-weight: 600;
}
.draft-stepper-sep {
  font-size: 11px;
  color: var(--line-strong);
  padding: 0 2px;
}
.draft-status-chip {
  font-size: 12px;
  color: var(--due);
  background: var(--due-bg);
  border: 1px solid var(--due-border);
  border-radius: 999px;
  padding: 3px 12px;
  max-width: 100%;
  white-space: normal;
}

.prefill-box {
  max-width: var(--page);
  margin: 14px auto 0;
  padding: 16px 18px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
}
.prefill-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 14px;
}
.prefill-copy span { color: var(--ink-soft); font-size: 13.5px; }
.prefill-box textarea { min-height: 72px; }
.prefill-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.prefill-status { min-height: 1.2em; font-size: 13px; color: var(--ink-soft); margin: 0; }

.draft-grid {
  max-width: var(--page);
  margin: 4px auto 20px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.preview-panel { grid-column: 1 / -1; }
/* Review step is a single focused column; Preview uses the full width. */
#draftView[data-draft-step="edit"] .draft-grid { max-width: 840px; }

/* Requests-first header: title + counterparty are primary, inline-editable. */
.draft-header {
  max-width: 840px;
  margin: 18px auto 0;
  padding: 0 22px;
}
.draft-title-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink-deep);
  padding: 4px 8px;
  margin-left: -8px;
}
.draft-counterparty {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}
.draft-counterparty-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 3px 7px;
  margin-left: -3px;
}
.draft-title-input:hover, .draft-counterparty-input:hover {
  background: var(--paper-raised);
  border-color: var(--line);
}
.draft-title-input:focus, .draft-counterparty-input:focus {
  background: var(--paper-raised);
  border-color: var(--action);
  outline: none;
  box-shadow: 0 0 0 2px var(--action-tint);
}

/* Slim high-level header: kicker, title, parties + roles, total + gaps, summary. */
.draft-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 2px;
}
.draft-parties {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.draft-parties .draft-counterparty-input { font-size: 14px; font-weight: 500; flex: 0 1 auto; width: auto; min-width: 6ch; max-width: 100%; field-sizing: content; }
.draft-party-self { font-weight: 500; color: var(--ink); }
.draft-party-sep { color: var(--ink-faint); }
.draft-party-other { display: inline-flex; align-items: baseline; gap: 2px; min-width: 0; }
.draft-party-role { color: var(--ink-soft); white-space: nowrap; }
/* Inline-editable deal facts, fitted with the title (no separate panel). */
.draft-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.draft-field { display: inline-flex; align-items: baseline; gap: 6px; }
.draft-field-label { color: var(--ink-soft); }
.draft-meta-input {
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding: 2px 6px;
  margin-left: -2px;
  field-sizing: content;
  min-width: 7ch;
  max-width: 24ch;
}
.draft-meta-input::placeholder { color: var(--ink-faint); font-weight: 400; }
.draft-meta-input:hover { background: var(--paper-raised); border-color: var(--line); }
.draft-meta-input:focus { background: var(--paper-raised); border-color: var(--action); outline: none; box-shadow: 0 0 0 2px var(--action-tint); }
.draft-gaps { display: inline-flex; }
.draft-gap-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--action);
  background: var(--action-tint);
  border-radius: 999px;
  padding: 3px 10px;
}
.draft-summary-input {
  display: block;
  width: 100%;
  max-width: 64ch;
  margin: 10px 0 0 -8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  resize: none;
  field-sizing: content;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 4px 8px;
}
.draft-summary-input::placeholder { color: var(--ink-faint); }
.draft-summary-input:hover { background: var(--paper-raised); border-color: var(--line); }
.draft-summary-input:focus { background: var(--paper-raised); border-color: var(--action); color: var(--ink); outline: none; box-shadow: 0 0 0 2px var(--action-tint); }

@media (max-width: 560px) {
  .draft-title-input { font-size: 23px; }
  .draft-header, .draft-grid { padding: 0 16px; }
}

/* Two-step flow: edit (Review) → preview. */
#draftView[data-draft-step="edit"] .preview-panel { display: none; }
#draftView[data-draft-step="preview"] .steps-panel,
#draftView[data-draft-step="preview"] .draft-header,
#draftView[data-draft-step="preview"] .prefill-box { display: none; }

#draftView[data-draft-step="edit"] #draftBackButton,
#draftView[data-draft-step="edit"] #approveDraftButton { display: none; }
#draftView[data-draft-step="preview"] #draftNextButton { display: none; }

.draft-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.panel-heading h2 { font-family: var(--font-ui); font-size: 16px; font-weight: 700; margin: 0; }
.panel-heading p { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; }
.panel-heading-actions { display: flex; flex-wrap: wrap; gap: 4px; }

/* Quiet header for the requests list — a thin hint line + low-key actions, so
   the milestones themselves are the focus (no loud heading or button bar). */
.panel-heading-quiet { align-items: center; margin-bottom: 12px; }
.panel-heading-quiet .panel-hint { margin: 0; flex: 1 1 auto; }
.ghost-action {
  background: none;
  border: none;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.ghost-action:hover { color: var(--action); background: var(--action-tint); }
.ghost-action:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

.status-pill {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 10px;
  align-self: center;
}

/* steps — timeline */
.step-list {
  counter-reset: step-counter;
  padding-left: 46px;
  position: relative;
  display: grid;
  gap: 0;
}
/* vertical spine connecting the nodes — makes the chronological order obvious */
.step-list::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 22px;
  bottom: var(--spine-bottom, 22px);
  width: 2px;
  background: var(--line-strong);
  border-radius: 2px;
}
/* Milestones read as a flat list separated by divider lines (the insert rows),
   not individual boxes. Only the saved-reference card, the expanded row, and a
   row being dragged lift into a bordered card. */
.step-row {
  counter-increment: step-counter;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 12px 14px;
}
/* Status node on the spine — a real element (not ::before) so the actionable
   one can also toggle "done". Open = hollow grey ring; done/record = filled
   teal with a check. Tapping the hollow ring on the first open step fills it. */
.step-dot {
  position: absolute;
  left: -37px;
  top: 11px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 2px solid var(--line-strong);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.step-dot.is-done {
  background: var(--accent);
  border-color: var(--accent);
}
.step-dot-check {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* On an open node the check is hidden — it fades in on the actionable one when
   hovered/focused, a quiet hint that the circle can be ticked. */
.step-dot:not(.is-done) .step-dot-check { stroke: var(--accent); opacity: 0; transition: opacity 0.12s ease; }
button.step-dot { cursor: pointer; }
button.step-dot.is-actionable:not(.is-done):hover,
button.step-dot.is-actionable:not(.is-done):focus-visible { border-color: var(--accent); }
button.step-dot.is-actionable:not(.is-done):hover .step-dot-check,
button.step-dot.is-actionable:not(.is-done):focus-visible .step-dot-check { opacity: 0.5; }
button.step-dot.is-done.is-actionable:hover,
button.step-dot.is-done.is-actionable:focus-visible { background: var(--accent-ink); border-color: var(--accent-ink); }
.step-dot:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
/* The saved-reference row is flat too — only its green circle marks it done. */
.step-row.is-locked { background: transparent; }
/* The open/expanded row lifts out of the flat list into a card. */
.step-row.is-open {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Collapsed milestone — a thin row: chevron + title, who's asked, then actions.
   Press to expand the editor. */
.step-row.is-summary {
  flex-wrap: wrap;            /* keep the title intact; actions drop to a 2nd line if tight */
  align-items: center;
  gap: 6px 8px;
  padding: 12px 33px 12px 12px;  /* right padding reserves room for the edge ✕ */
}
.step-row.is-summary .step-dot { top: 50%; transform: translateY(-50%); }
.step-summary {
  flex: 1 1 160px;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-family: var(--font-ui);
  color: var(--ink);
  cursor: grab;
}
.step-summary-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 5px solid var(--ink-faint);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}
.step-chevron.is-open { transform: rotate(90deg); }
.step-summary-owner {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
  /* Other side / both = blue, matching the create-flow milestone pills; YOUR
     to-dos are re-tinted amber by the data-actor-kind="creator" rule below. */
  color: var(--action);
  background: var(--action-tint);
  border: 1px solid #c5d2e1;
  border-radius: 999px;
  padding: 4px 10px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-row.is-summary .step-controls { flex: 0 0 auto; }
.step-row.is-recorded .step-summary-title { color: var(--ink-soft); }

/* Title + optional amount/term sub-line stack inside the toggle. */
.step-summary-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.step-summary-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Owner chips are colour-coded to match the create-flow milestone pills: the
   other side / both stay blue (the base rule above), YOUR to-dos get the amber
   tint on the circle + chip so they still pop. Done always wins (green circle). */
.step-row[data-actor-kind="creator"] .step-dot:not(.is-done) { background: var(--mine-bg); border-color: var(--mine-ring); }
.step-row[data-actor-kind="creator"] .step-summary-owner { background: var(--mine-bg); border-color: var(--mine-ring); color: var(--mine-ink); }
.step-list-foot { margin: 14px 0 0; font-size: 12px; color: var(--ink-faint); }

/* Done (in editor) — quiet accent so the read/modify split reads clearly. */
.step-done-edit {
  color: var(--action) !important;
}
.step-done-edit:hover {
  background: var(--action-tint) !important;
  border-color: var(--action-tint) !important;
  color: var(--action-hover) !important;
}

/* Expanded editor — leading collapse chevron */
.step-chevron-btn {
  flex: 0 0 auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  margin: -2px 2px -2px -4px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}
.step-chevron-btn:hover { background: var(--paper-tint); }
.step-chevron-btn:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.step-row.is-editing {
  background: var(--paper-tint);
  border: 1px solid var(--action);
  border-left: 3px solid var(--action);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.step-main { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.step-main strong { font-size: 14.5px; }
.step-main span { font-size: 13px; color: var(--ink-soft); }
.step-main span:last-child { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); }

/* Inline-editable request card: title input + detail textarea + owner select.
   Fields read as text until hovered/focused (same pattern as the cover sheet). */
.step-row.is-inline .step-main { gap: 3px; }
.step-title-input, .step-detail-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font-family: var(--font-ui);
  padding: 3px 7px;
  margin-left: -7px;
}
.step-title-input { font-size: 14.5px; font-weight: 600; }
.step-detail-input {
  font-size: 13px;
  color: var(--ink-soft);
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  min-height: 1.45em;
}
.step-title-input::placeholder, .step-detail-input::placeholder { color: var(--ink-faint); }
.step-title-input:hover, .step-detail-input:hover { background: var(--paper); border-color: var(--line); }
.step-title-input:focus, .step-detail-input:focus {
  background: var(--paper-raised);
  border-color: var(--action);
  outline: none;
  box-shadow: 0 0 0 2px var(--action-tint);
}
.step-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}
.step-owner { display: inline-flex; align-items: center; gap: 5px; }
.step-owner-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-faint);
}
.step-owner-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
}
.step-owner-select:hover { border-color: var(--line-strong); }
.step-owner-select:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 2px var(--action-tint); }
.step-state-chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wait);
  background: var(--wait-bg);
  border: 1px solid var(--wait-border);
  border-radius: 999px;
  padding: 2px 9px;
}
.step-state-chip.is-done { color: var(--accent-ink); background: var(--accent-tint); border-color: var(--accent-border); }
.step-save-state {
  font-size: 11.5px;
  color: var(--ink-faint);
  min-height: 1em;
  transition: opacity 0.3s;
}
.step-save-state.is-saving { color: var(--ink-faint); }
.step-save-state.is-saved { color: var(--ok); }
.step-save-state.is-error { color: var(--seal); font-weight: 600; }

/* An already-handled request reads as a recorded historical fact, not a request.
   The teal node + left border carry "done" now — no full-row wash, so the
   circle stays the signal (the record card keeps its wash via [data-type]). */
.step-row.is-recorded { border-left-color: var(--accent); }
.step-row.is-recorded .step-title-input { color: var(--ink-soft); }
.step-state {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.step-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
/* ✕ is hidden by default. It appears whenever the milestone is expanded/editing
   (this is the only way it shows on touch — "only when expanded on mobile"), and
   additionally on hover/focus on pointer devices (desktop). */
.step-row .step-remove-btn { opacity: 0; pointer-events: none; }
.step-row.is-editing .step-remove-btn { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .step-row:hover .step-remove-btn,
  .step-row:focus-within .step-remove-btn { opacity: 1; pointer-events: auto; }
}
.step-controls button {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.15s;
}
.step-controls button:hover { border-color: var(--line); background: var(--paper); color: var(--ink); }
/* Modern "Mark done": a clean outlined pill with a check that fills teal on hover. */
.step-controls .step-done-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 12px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.06s;
}
.step-controls .step-done-btn:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(12, 180, 138, 0.3);
}
.step-controls .step-done-btn:active { transform: scale(0.97); }
.step-controls .step-done-btn:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.step-done-ic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Remove is a small ✕, quiet until the row is hovered. Pinned to the far right,
   clear of the party chip and Mark done; its space is always reserved so showing
   it never shifts them. */
.step-remove-btn,
.step-controls .step-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--ink-faint);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.12s, color 0.12s, opacity 0.15s;
}
.step-remove-btn svg,
.step-controls .step-remove-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.step-remove-btn:hover,
.step-controls .step-remove-btn:hover { background: var(--paper-tint); color: var(--ink); }
/* ✕ floats just inside the row's right edge (out of flow, so showing it never
   shifts the chip/Mark done). The row reserves room for it (padding-right) so it
   never overlaps them. */
.step-row > .step-remove-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

/* Per-milestone date: a quiet sub-line value, or a dotted "to be set" prompt. */
.step-date-todo { color: var(--ink-faint); text-decoration: underline dotted; text-underline-offset: 2px; }
.step-date-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  padding: 4px 8px;
  min-width: 0;
}
.step-date-input:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 2px var(--action-tint); }

/* The separator between milestones IS the insert zone: a thin divider line that
   reveals a centered "+" on hover. No per-row boxes — just lines. */
.step-insert-row {
  position: relative;
  height: 11px;
  margin: 0;
}
.step-insert-row::before {
  content: "";
  position: absolute;
  left: -46px;          /* span the full width, across the rail gutter */
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}
.step-insert-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper-raised); /* masks the divider behind the "+" */
  border: 1px solid var(--line);
  padding: 0;
  width: 20px;
  height: 20px;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;            /* hidden until the divider is hovered/focused */
  transition: opacity 0.15s, color 0.15s, background 0.15s, border-color 0.15s;
}
.step-insert-row:hover .step-insert-btn,
.step-insert-btn:focus-visible { opacity: 1; }
.step-insert-btn:hover { color: var(--action); background: var(--action-tint); border-color: var(--action-tint); }

/* the whole box is grabbable; the page can still scroll past it on touch */
.step-row[data-reorderable="true"] { cursor: grab; touch-action: pan-y; }
.step-row[data-reorderable="true"] .step-controls button { cursor: pointer; }
body.is-step-dragging .step-row[data-reorderable="true"] { cursor: grabbing; }

/* the dragged row lifts off and follows the pointer */
.step-row.is-dragging {
  z-index: 6;
  background: var(--paper-raised);
  border: 1px solid var(--action);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px rgba(24, 40, 63, 0.24);
  cursor: grabbing;
  pointer-events: none;
}
/* The other rows slide to make room as you drag (the lifted row follows the
   pointer instantly, so it's excluded from the transition). */
body.is-step-dragging .step-row[data-reorderable="true"]:not(.is-dragging) {
  transition: transform 0.16s ease;
}
/* prominent insertion bar showing where it will drop */
.step-row.is-drop-before::after,
.step-row.is-drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--action);
  border-radius: 3px;
  box-shadow: 0 0 0 3px var(--action-tint);
}
.step-row.is-drop-before::after { top: -6px; }
.step-row.is-drop-after::after { bottom: -6px; }

body.is-step-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
body.is-step-dragging .step-controls { pointer-events: none; }
/* fade the inline "+" insert buttons during a drag (keeps layout, no jump) */
body.is-step-dragging .step-insert-row { opacity: 0; pointer-events: none; }

.step-drag-bin {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(14px);
  z-index: 70;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.step-drag-bin.is-active { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.step-drag-bin.is-over {
  border-style: solid;
  border-color: var(--due-border);
  color: var(--due);
  background: var(--due-bg);
}
.step-drag-bin svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* choose-what-to-rewrite mode */
.panel-hint { margin: -6px 0 14px; font-size: 13px; color: var(--ink-soft); }
.revise-banner {
  border: 1px solid var(--mine-ring);
  border-radius: var(--radius-sm);
  background: var(--mine-bg);
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.revise-banner-title { font-size: 14px; color: var(--mine-ink); }
.revise-banner-hint { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.revise-note {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--mine-ring);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.regen-banner {
  border: 1px solid var(--action);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}
.regen-banner strong { font-size: 14px; }
.regen-banner p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.regen-instruction-field {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}
.regen-instruction-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.regen-instruction-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper-raised);
  resize: vertical;
  min-height: 64px;
  line-height: 1.5;
  box-sizing: border-box;
}
.regen-instruction-input:focus {
  border-color: var(--action);
  outline: none;
  box-shadow: 0 0 0 2px var(--action-tint);
}
.regen-instruction-input::placeholder { color: var(--ink-faint); }
.regen-banner-actions { display: flex; gap: 8px; margin-top: 10px; }
.regen-banner-actions button[disabled] { opacity: 0.5; cursor: default; }
.regen-reset-link {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  justify-self: start;
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.regen-reset-link:hover { color: var(--ink); }
.step-row.is-choosing { cursor: pointer; }
.step-row.is-choosing:hover { border-color: var(--ink-soft); }
.step-row.is-ticked { border-color: var(--action); border-left: 3px solid var(--action); background: var(--paper); }
.step-row.is-dimmed { opacity: 0.62; }
.regen-check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--action);
  cursor: pointer;
}
.step-state.is-rewrite { color: var(--action); }

.small-muted { font-size: 12.5px; color: var(--ink-faint); margin: 0; }

/* Optional details — amount, dates, payment stay tucked away until needed */
.optional-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: start;
  margin: 4px 0 2px;
  padding: 6px 4px;
  background: none;
  border: none;
  color: var(--action);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}
.optional-toggle:hover { color: var(--action-hover); }
.optional-toggle:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.optional-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}
/* Simulate response bar */
.simulate-bar {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
  display: grid;
  gap: 10px;
}
/* .simulate-bar.is-hidden handled by global .is-hidden utility */
.simulate-bar > strong { font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.simulate-options { display: flex; gap: 8px; }
.simulate-btn {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-ui);
}
.simulate-btn.is-selected { background: var(--action); color: var(--action-ink); border-color: transparent; }
.simulate-btn:hover:not(.is-selected) { border-color: var(--ink-soft); background: var(--paper-raised); }
.simulate-result { font-size: 12.5px; color: var(--ink-faint); margin: 0; }
/* .simulate-result.is-hidden handled by global .is-hidden utility */

/* preview */
.notification-preview-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}
.notification-step-list { display: grid; gap: 8px; align-content: start; }
.notification-step {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}
.notification-step:hover { border-color: var(--ink-soft); }
.notification-step.is-active { border-color: var(--action); box-shadow: inset 2px 0 0 var(--action); }
.notification-step-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.notification-step-copy { display: grid; }
.notification-step-copy strong { font-size: 13.5px; }
.notification-step-copy span { font-size: 12px; color: var(--ink-faint); }

/* Email preview tab */
.email-preview { display: grid; gap: 14px; }
.email-envelope {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.email-envelope div { display: flex; gap: 10px; align-items: baseline; }
.email-envelope span {
  flex: 0 0 56px;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.email-envelope strong { font-weight: 500; color: var(--ink); }
.email-body { display: grid; gap: 10px; font-size: 14px; line-height: 1.55; }
.email-body a { color: var(--action); font-weight: 600; }
.email-request {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--action);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
}
.email-request span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.email-request strong { font-size: 14.5px; }
.email-request p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

/* Message preview tab */
.notification-message { display: grid; gap: 12px; }
.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.notification-meta strong { font-weight: 500; color: var(--ink-soft); }
.message-bubble {
  display: grid;
  gap: 8px;
  max-width: 94%;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 3px;
  font-size: 14px;
  line-height: 1.5;
}
.message-bubble p { margin: 0; }
.message-bubble small { color: var(--ink-faint); font-size: 12px; }

.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab-button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tab-button:hover { color: var(--ink); }
}
.tab-button.is-active { color: var(--action); border-bottom-color: var(--action); }

.recipient-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  padding: 20px;
}
.preview-content .eyebrow { color: var(--ink-faint); }
.preview-content h3 { font-size: 19px; }
.preview-content > p { font-size: 14px; color: var(--ink-soft); }
.fact-list {
  margin: 14px 0;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.fact-list dt {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.fact-list dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 500; }
.action-strip { display: flex; gap: 8px; }
.action-strip span {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* --- draft CTA row (replaces sticky bar) --- */
.draft-cta-row {
  max-width: var(--page);
  margin: 0 auto 48px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Desktop: the edit-step "Next" CTA becomes a right-aligned action bar that
   follows the scroll. It's an opaque bar with reserved space below the content,
   so it never floats over (and blocks) the request controls. */
@media (min-width: 700px) {
  #draftView[data-draft-step="edit"] .draft-grid { padding-bottom: 80px; }
  #draftView[data-draft-step="edit"] .draft-cta-row {
    position: sticky;
    bottom: 0;
    justify-content: flex-end;
    z-index: 30;
    margin-bottom: 0;
    padding-top: 14px;
    padding-bottom: 14px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 22px rgba(24, 40, 63, 0.07);
  }
}
.send-flow {
  max-width: var(--page);
  margin: 10px auto 64px;
  padding: 24px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section-intro { margin-bottom: 18px; }
.section-intro h2 { font-size: 22px; margin-bottom: 4px; }
.section-intro p { color: var(--ink-soft); margin: 0; font-size: 14.5px; }

.followup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}
.followup-message-field { grid-column: 1 / -1; }
.field-hint { font-size: 12px; font-weight: 400; color: var(--ink-faint); }

.channel-role-list { display: grid; gap: 8px; margin-bottom: 18px; }
.channel-role {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  padding: 11px 14px;
}
.channel-role.is-primary { border-color: var(--action); }
.channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  flex: none;
}
.channel-role div { flex: 1; }
.channel-role strong { font-size: 14px; display: block; }
.channel-role p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.channel-role > span:last-child {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.channel-role.is-primary > span:last-child { color: var(--action); }

.followup-start-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.followup-share-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.link-output { display: grid; gap: 6px; margin-top: 14px; font-size: 13.5px; font-weight: 600; }
.link-output input { font-family: var(--font-mono); font-size: 13px; }

/* ==========================================================================
   SHARED PACTLET PAGE — waiting-note inside the sl-decide action grid
   ========================================================================== */
.shared-action-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-workspace { grid-template-columns: 1fr; }
  .notification-preview-layout { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .draft-grid { grid-template-columns: 1fr; }
  .followup-form-grid { grid-template-columns: 1fr; }

  .pactlet-table-head { display: none; }
  .pactlet-dashboard-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    padding: 16px 18px;
  }
  .dashboard-row-actions { grid-column: 1 / -1; }

}

@media (max-width: 560px) {
  .nav-new-label { display: none; }
  .topbar { gap: 8px; padding: 12px; }
  .brand-logo { height: 28px; }
  .nav-actions { gap: 8px; }
  .guest-nav { gap: 10px; }
  .guest-nav .nav-login-link { font-size: 12px; }
  .guest-nav .button.primary.small { padding: 7px 8px; font-size: 11px; }
  /* signed-in: shrink the "+" to a tight icon button and pull the row together
     so the (now ratio-locked) logo never gets squeezed */
  .user-nav { gap: 10px; }
  .user-nav .button.primary.small { padding: 6px 8px; }
  .user-nav .button.primary.small svg { width: 16px; height: 16px; }
  /* The signed-in nav (Contact · Dashboard · New · account) overflowed narrow
     phones: its content is a fixed width and didn't compress. Make the account
     button avatar-only and drop the non-critical Contact link (still reachable
     at /contact.html); Dashboard + New + account remain. */
  .user-nav .account-name { display: none; }
  .user-nav .nav-login-link[href="/contact.html"] { display: none; }
}

/* ============================================================================
   Shared link page — "The Register" redesign (Direction A). All classes are
   sl- prefixed so they never collide with the rest of the app.
   ============================================================================ */
body.on-shared > header.topbar { display: none; }
#sharedView {
  background:
    repeating-linear-gradient(0deg, rgba(24,40,63,.018) 0 1px, transparent 1px 26px),
    var(--paper);
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  line-height: 1.6;
}
#sharedView h1, #sharedView h2, #sharedView h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.14; letter-spacing: -0.012em; color: var(--ink-deep); margin: 0; }

/* topline */
.sl-topline { max-width: 760px; margin: 0 auto; padding: 18px 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sl-brand img { height: 24px; width: auto; display: block; }
.sl-noaccount { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--accent-ink); background: var(--accent-tint); border: 1px solid var(--accent-border); border-radius: 999px; padding: 6px 12px; }
.sl-noaccount svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* document */
.sl-doc { max-width: 760px; margin: 16px auto 64px; background: var(--paper-raised); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(24,40,63,.05), 0 8px 28px rgba(24,40,63,.07); overflow: hidden; }

/* masthead */
.sl-mast { padding: 30px 40px 24px; position: relative; }
.sl-mast::after { content: ""; position: absolute; left: 40px; right: 40px; bottom: 0; height: 2px; background:
  linear-gradient(var(--line-strong), var(--line-strong)) left bottom/100% 1px no-repeat,
  linear-gradient(var(--accent), var(--accent)) left top/100% 1px no-repeat; }
.sl-mast-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.sl-serial { text-align: right; flex-shrink: 0; }
.sl-sk { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.sl-sv { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 3px; letter-spacing: .02em; }
.sl-kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin: 0; }
.sl-kicker b { color: var(--ink); font-weight: 600; }
.sl-mast h1 { font-size: clamp(27px, 4.4vw, 36px); margin: 13px 0 0; max-width: 18ch; }
.sl-sub { color: var(--ink-soft); font-size: 15px; margin: 11px 0 0; max-width: 54ch; }
.sl-status-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#sharedView #sharedStatusLabel { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid #e4d6b8; color: #8a5a14; background: #f4ecdc; }
#sharedView #sharedStatusLabel::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
#sharedView #sharedStatusLabel.complete { color: var(--accent-ink); background: var(--accent-tint); border-color: var(--accent-border); }
#sharedView #sharedStatusLabel.delayed { color: var(--seal-deep); background: var(--seal-tint); border-color: #e3c4bd; }
.sl-upd { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.sl-dot { display: none; } /* dot rendered via ::before; JS overwrites the span text */

/* the decision stage */
.sl-stage { padding: 26px 40px; background: linear-gradient(var(--action-tint), color-mix(in srgb, var(--action-tint) 55%, var(--paper-raised))); border-bottom: 1px solid var(--line); }
.sl-stage-lbl { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--action); margin: 0; }
.sl-stage h2 { font-size: 22px; margin: 9px 0 5px; color: var(--ink-deep); letter-spacing: -0.01em; }
.sl-stage > p { color: var(--ink-soft); font-size: 14.5px; max-width: 52ch; margin: 0; }
.sl-decide { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.sl-decide button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: var(--radius-sm); font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; border: 1.5px solid var(--line-strong); background: var(--paper-raised); color: var(--ink); transition: .15s; padding: 15px 24px; flex: 1; min-width: 180px; cursor: pointer; }
.sl-decide button:hover { border-color: var(--ink-soft); }
.sl-decide button:first-child { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; box-shadow: 0 1px 2px rgba(10,125,97,.25), 0 8px 20px -10px rgba(10,125,97,.5); }
.sl-decide button:first-child:hover { background: #0a6d55; }
.sl-decide button:active { transform: translateY(1px); }
.sl-decide .shared-action-note { flex: 1; margin: 0; font-size: 14px; color: var(--ink-soft); }
.sl-minor { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.sl-minor[hidden] { display: none; }
.sl-minor-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-right: 2px; }
.sl-minor button { background: none; border: none; font-size: 13.5px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); padding: 6px 4px; cursor: pointer; font-family: var(--font-ui); }
.sl-minor button:hover { color: var(--ink); text-decoration-color: var(--ink-soft); }
.sl-propose-date { display: inline-flex; gap: 8px; align-items: center; }
.sl-propose-date[hidden] { display: none; }
.sl-propose-date input[type="date"] { font-family: var(--font-ui); font-size: 13px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); }

/* body sections */
.sl-sec { padding: 24px 40px; border-bottom: 1px solid var(--line); }
.sl-sec.is-hidden { display: none; }
.sl-sec-h { font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; padding-bottom: 7px; background:
  linear-gradient(var(--line), var(--line)) left bottom/44px 1px no-repeat,
  linear-gradient(var(--accent), var(--accent)) left calc(100% - 2px)/44px 1px no-repeat; }

/* ledger */
.sl-lrow { display: grid; grid-template-columns: 150px 1fr; gap: 0 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sl-lrow:last-child { border-bottom: none; }
.sl-lk { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.sl-lv { font-size: 15px; color: var(--ink); font-weight: 500; }

/* steps */
.sl-step { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: start; }
.sl-step:last-child { border-bottom: none; }
.sl-node { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper-raised); margin-top: 3px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sl-node svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sl-step.is-done .sl-node { background: var(--accent); border-color: var(--accent); }
.sl-step.is-mine .sl-node { border-color: #e4d6b8; background: #f4ecdc; box-shadow: 0 0 0 3px #f4ecdc; }
.sl-step-t { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.sl-step.is-done .sl-step-t { color: var(--ink-soft); }
.sl-step-d { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.sl-step-due { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.sl-step-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.sl-actor { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.sl-sstate { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-faint); white-space: nowrap; }
.sl-step.is-done .sl-sstate { color: var(--accent-ink); background: var(--accent-tint); border-color: var(--accent-border); }
.sl-step.is-mine .sl-sstate { color: #8a5a14; background: #f4ecdc; border-color: #e4d6b8; }
.sl-markdone { font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; color: var(--action); background: var(--paper-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 5px 10px; cursor: pointer; }
.sl-markdone:hover { border-color: var(--action); }

/* respond */
.sl-respond { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.sl-respond label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.sl-respond textarea { width: 100%; min-height: 78px; resize: vertical; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper-raised); font-family: inherit; font-size: 14.5px; color: var(--ink); }
.sl-respond textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--action-tint); }
.sl-respond-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; flex-wrap: wrap; }
.sl-respond-actions { display: inline-flex; gap: 14px; align-items: center; }
.sl-attach { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--action); background: none; border: none; cursor: pointer; font-family: var(--font-ui); }
.sl-attach.is-hidden { display: none; }
.sl-attach-hint { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-faint); }
.sl-attach svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.sl-recnote { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.sl-rd { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* file rows reuse the legacy markup */
.sl-doc .shared-step-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sl-doc .shared-step-row:last-child { border-bottom: none; }
.sl-doc .shared-step-row strong { font-size: 14.5px; color: var(--ink); display: block; }
.sl-doc .shared-step-row span { font-size: 12.5px; color: var(--ink-soft); }
.sl-doc .shared-step-row a { font-size: 13px; font-weight: 600; color: var(--action); }

/* activity */
.sl-act { list-style: none; margin: 0; padding: 0; }
.sl-act li { font-size: 13.5px; color: var(--ink-soft); padding: 9px 0 9px 20px; position: relative; border-bottom: 1px solid var(--line); }
.sl-act li:last-child { border-bottom: none; }
.sl-act li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.sl-act li strong { color: var(--ink); font-weight: 600; }
.sl-act .small-muted { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }

/* colophon */
.sl-colophon { padding: 20px 40px; background: var(--paper-deep); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sl-seal-line { display: flex; align-items: center; gap: 10px; }
.sl-seal-mark { width: 34px; height: 34px; border-radius: 50%; border: 1.5px dashed var(--seal); display: flex; align-items: center; justify-content: center; color: var(--seal); flex-shrink: 0; }
.sl-seal-mark svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.sl-seal-txt { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.sl-seal-txt b { color: var(--ink); font-weight: 600; }
.sl-hash { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: .02em; }

@media (max-width: 600px) {
  .sl-topline { padding: 14px 16px 0; }
  .sl-doc { margin: 12px; }
  .sl-mast { padding: 22px 20px 18px; }
  .sl-mast::after { left: 20px; right: 20px; }
  .sl-mast-row { flex-direction: column; gap: 14px; }
  .sl-serial { text-align: left; }
  .sl-stage { padding: 22px 20px; }
  .sl-sec { padding: 20px; }
  .sl-lrow { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
  .sl-decide { flex-direction: column; }
  .sl-decide button { min-width: 0; width: 100%; flex: none; }
  .sl-colophon { padding: 18px 20px; }
}

/* shared page — creator controls (header back link + order description) */
.sl-topright { display: inline-flex; align-items: center; gap: 12px; }
.sl-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; }
.sl-back:hover { color: var(--ink); border-color: var(--ink-soft); }
.sl-rec-desc { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
