/* Creative Agents client rooms: one stylesheet for the room, the records and the studio. */

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

:root {
  --paper: #fbfbfb;
  --raised: #ffffff;
  --sunk: #f3f3f4;
  --ink: #0b0b0c;
  --t1: rgba(11, 11, 12, .86);
  --t2: rgba(11, 11, 12, .64);
  --t3: rgba(11, 11, 12, .46);
  --rule: rgba(11, 11, 12, .1);
  --rule-strong: rgba(11, 11, 12, .2);
  --lit: #ffffff;
  --edge: rgba(11, 11, 12, 0);
  --glow: rgba(0, 113, 227, .06);
  --shadow: 0 1px 2px rgba(11, 11, 12, .04), 0 14px 32px -14px rgba(11, 11, 12, .12);
  --signal: #0071e3;
  --button: #0071e3;
  --button-hover: #0077ed;
  --tint: rgba(0, 113, 227, .06);
  --tint-edge: rgba(0, 113, 227, .2);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --script: "Mrs Saint Delafield", "Snell Roundhand", cursive;
  color-scheme: light;
}

html {
  background: var(--paper);
  color: var(--t1);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 340px at 100% 0%, var(--glow), transparent 70%) no-repeat, var(--paper);
}
main { width: min(100%, 680px); margin: 0 auto; padding: 26px 20px 64px; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.display { font-family: "Inter Tight", "Inter", sans-serif; font-weight: 500; color: var(--ink); }
.label, .eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--t3); }
.label.accent { color: var(--signal); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.blank { padding: 0 4px; border-radius: 3px; background: var(--tint); box-shadow: inset 0 -1px 0 var(--signal); color: var(--signal); font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── masthead ─────────────────────────────── */
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 11px; border-bottom: 1px solid var(--rule); }
.mark { display: inline-flex; align-items: center; gap: 7px; }
.mark::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--signal); }

/* ── hero ─────────────────────────────────── */
.hero { padding: 30px 0 4px; }
.hero h1 { margin: 0; font-size: clamp(33px, 8.6vw, 44px); line-height: 1.03; letter-spacing: -.04em; }
.hero h1 span { display: block; color: var(--t3); }
.lede { margin-top: 14px; max-width: 36em; font-size: 15.5px; line-height: 1.55; color: var(--t2); text-wrap: pretty; }

/* ── the three steps ─────────────────────── */
.steps { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.steps li { border-bottom: 1px solid var(--rule); }
.steps a { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; column-gap: 10px; padding: 14px 0; text-decoration: none; border-radius: 6px; }
.steps a:focus-visible { outline: none; background: var(--tint); }
.steps .n { align-self: start; padding-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .04em; color: var(--t3); font-variant-numeric: tabular-nums; }
.steps .what { font-size: 15px; font-weight: 550; letter-spacing: -.01em; color: var(--ink); }
.steps .what small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--t3); }
.steps .status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--t3); white-space: nowrap; }
.steps .later .what { color: var(--t2); }
.steps .now .n, .steps .now .status { color: var(--signal); }
.steps .now .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--tint); }
.steps .done .status { color: var(--t2); }
.steps .done .status::before { content: ""; width: 9px; height: 5px; margin-top: -3px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }

/* ── sections ─────────────────────────────── */
.section { margin-top: 52px; scroll-margin-top: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-strong); }
.section-head h2 { margin: 6px 0 0; font-size: 25px; line-height: 1.08; letter-spacing: -.032em; }
.section-head h2:focus { outline: none; }
.aside { flex: none; padding-bottom: 2px; font-size: 13px; font-weight: 500; color: var(--signal); text-decoration: none; }
.aside:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-lede { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--t2); text-wrap: pretty; }

/* ── the agreement, as a document ────────── */
.doc { position: relative; margin-top: 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); box-shadow: inset 0 1px 0 var(--lit), var(--shadow); overflow: hidden; }
.doc::before { content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--edge), transparent); }
.doc-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--rule); }
.doc-head h3 { margin: 0; font-size: 20px; line-height: 1.1; letter-spacing: -.026em; }
.doc-head h3 span { display: block; color: var(--t3); }
.doc-head .intro { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--t2); text-wrap: pretty; }
.parties { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 20px; padding: 14px 20px; border-bottom: 1px solid var(--rule); }
.parties .label { display: block; margin-bottom: 5px; }
.parties p { font-size: 13.5px; line-height: 1.45; color: var(--t1); }
.parties strong { font-weight: 550; color: var(--ink); }
.glance { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); background: var(--sunk); }
.glance div { padding: 12px 14px 13px; border-left: 1px solid var(--rule); }
.glance div:first-child { border-left: 0; }
.glance .label { display: block; margin-bottom: 5px; }
.glance strong { display: block; font-family: "Inter Tight", "Inter", sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.glance small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.35; color: var(--t3); }
.terms { list-style: none; margin: 0; padding: 0 20px; counter-reset: term; }
.terms > li { counter-increment: term; display: grid; grid-template-columns: 172px 1fr; column-gap: 20px; padding: 15px 0 16px; border-bottom: 1px solid var(--rule); }
.terms h4 { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 14px; line-height: 1.4; font-weight: 550; letter-spacing: -.008em; color: var(--ink); }
.terms h4::before { content: counter(term, decimal-leading-zero); flex: none; width: 16px; font-size: 9.5px; font-weight: 500; letter-spacing: .04em; color: var(--signal); font-variant-numeric: tabular-nums; }
.terms p, .terms li { font-size: 14px; line-height: 1.6; color: var(--t1); text-wrap: pretty; }
.terms p + p, .terms p + ul, .terms ul + p { margin-top: 8px; }
.terms ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.terms ul li { position: relative; padding-left: 14px; }
.terms ul li::before { content: ""; position: absolute; left: 1px; top: .78em; width: 5px; height: 1px; background: var(--t3); }
.terms strong { font-weight: 550; color: var(--ink); }
.accept { padding: 16px 20px; font-size: 14px; line-height: 1.55; color: var(--t2); border-bottom: 1px solid var(--rule); }
.exhibit-tile { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 16px; padding: 14px 20px 16px; text-decoration: none; }
.exhibit-tile img { display: block; width: 92px; height: 74px; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 7px; background: var(--sunk); }
.exhibit-tile strong { display: block; font-size: 14px; font-weight: 550; color: var(--ink); }
.exhibit-tile small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--t3); }
.exhibit-tile .go { font-size: 13px; font-weight: 500; color: var(--signal); }
.exhibit-tile:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.exhibit-tile:focus-visible { outline: none; background: var(--tint); }

/* ── signatures ──────────────────────────── */
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.sig-card { position: relative; padding: 16px 18px 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); box-shadow: inset 0 1px 0 var(--lit), var(--shadow); }
.sig-card.signing { grid-column: 1 / -1; }
.sig-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sig-top .ok { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t2); }
.sig-top .ok::before { content: ""; width: 8px; height: 4.5px; margin-top: -3px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.linkish { padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 500; color: var(--signal); cursor: pointer; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkish:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }
.sig-strip { position: relative; height: 104px; margin-top: 12px; border-radius: 10px; background: var(--sunk); overflow: hidden; }
.sig-strip::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 26px; height: 1px; background: var(--rule-strong); pointer-events: none; }
.sig-strip .x { position: absolute; left: 17px; bottom: 31px; font-size: 13px; line-height: 1; color: var(--t3); pointer-events: none; }
.sig-script { position: absolute; left: 36px; right: 14px; bottom: 21px; overflow: hidden; font-family: var(--script); font-size: 44px; line-height: 1.25; color: var(--ink); white-space: nowrap; text-overflow: clip; pointer-events: none; }
.sig-script.empty { font-family: "Inter", sans-serif; bottom: 34px; font-size: 13px; color: var(--t3); }
.sig-strip img { position: absolute; inset: 6px 12px 10px 30px; width: calc(100% - 42px); height: calc(100% - 16px); object-fit: contain; object-position: left bottom; }
.sig-strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-strip .hint { position: absolute; top: 10px; left: 16px; font-size: 11.5px; color: var(--t3); pointer-events: none; transition: opacity .2s; }
.sig-strip.inked .hint { opacity: 0; }
.sig-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 11px; font-size: 13px; line-height: 1.4; color: var(--t2); }
.sig-meta strong { font-weight: 550; color: var(--ink); }
.sig-meta span:last-child { text-align: right; }

/* ── form ────────────────────────────────── */
.fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 14px; }
.field { display: block; }
.field > span { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--t2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--t3); }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 10px;
  background: var(--paper); color: var(--ink); font: 400 16px/1 "Inter", sans-serif; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: var(--t3); }
.field input:focus, .field select:focus { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--t1); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; width: 20px; height: 20px; margin: 1px 0 0; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--paper); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.check input::after { content: ""; width: 10px; height: 5.5px; margin-top: -3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .12s ease; }
.check input:checked { border-color: var(--button); background: var(--button); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.form-error { margin-top: 10px; font-size: 13.5px; color: #d70015; }
.form-error:empty { display: none; }

/* ── buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 12px; font: 550 15.5px/1 "Inter", sans-serif; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.99); }
.btn-primary { width: 100%; margin-top: 18px; background: var(--button); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .08), 0 10px 22px -12px rgba(0, 113, 227, .6); }
.btn-primary:hover { background: var(--button-hover); }
.btn-primary:focus-visible { outline: none; border-color: rgba(255, 255, 255, .75); }
.btn-primary:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-quiet { background: var(--raised); color: var(--ink); border-color: var(--rule-strong); box-shadow: inset 0 1px 0 var(--lit); }
.btn-quiet:hover { border-color: var(--t3); }
.btn-quiet:focus-visible { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.btn-wide { width: 100%; }
.btn-small { height: 36px; padding: 0 13px; border-radius: 9px; font-size: 13.5px; }

/* ── invoice summary ─────────────────────── */
.bill { margin-top: 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--raised); box-shadow: inset 0 1px 0 var(--lit), var(--shadow); overflow: hidden; }
.bill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 18px 12px; border-bottom: 1px solid var(--rule); }
.bill-head span:last-child { font-size: 12.5px; color: var(--t3); }
.bill-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 18px 0; font-size: 14px; line-height: 1.45; color: var(--t2); }
.bill-row span:last-child { flex: none; color: var(--t1); font-variant-numeric: tabular-nums; }
.bill-row.item span:first-child { color: var(--ink); font-weight: 500; }
.bill-row.total { margin-top: 12px; padding: 13px 18px 15px; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 550; }
.bill-row.total span:last-child { font-family: "Inter Tight", "Inter", sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -.025em; color: var(--ink); }
.bill-row.total.paid span:last-child { color: var(--t2); }

/* ── paying ──────────────────────────────── */
.pay { margin-top: 22px; }
.pay > .label { display: block; margin-bottom: 10px; }
.methods { display: grid; gap: 10px; }
.method {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 12px 16px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--raised); color: inherit; text-align: left; text-decoration: none;
  box-shadow: inset 0 1px 0 var(--lit), 0 1px 2px rgba(11, 11, 12, .03); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.method:hover { border-color: var(--rule-strong); }
.method:active { transform: scale(.995); }
.method:focus-visible { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.method strong { display: block; font-size: 15.5px; font-weight: 550; letter-spacing: -.01em; color: var(--ink); }
.method small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--t3); }
.method .go { font-size: 13px; font-weight: 500; color: var(--signal); white-space: nowrap; }
.method[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }
.method[aria-expanded="true"] { border-color: var(--rule-strong); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.method-help { padding: 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--t2); }
.method-help:not(:empty) { margin-top: 9px; animation: help-in .25s ease both; }
.method-help a { font-weight: 500; color: var(--signal); text-decoration: none; }
.method-help a:hover, .method-help a:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }
@keyframes help-in { from { opacity: 0; transform: translateY(-3px); } }
.zelle { margin-top: -11px; padding: 14px 16px 16px; border: 1px solid var(--rule-strong); border-top: 1px dashed var(--rule); border-radius: 0 0 12px 12px; background: var(--sunk); }
.zelle p { font-size: 13.5px; color: var(--t2); }
.copyline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.copyline code { min-width: 0; overflow-wrap: anywhere; font-family: "Inter", sans-serif; font-size: 16px; font-weight: 550; color: var(--ink); }
/* On a computer: the three ways as codes to scan with a phone. Phones and tablets keep the tap list. */
.scan { display: none; }
@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
  .methods.has-scan { display: none; }
  .scan { display: block; }
  .scan-codes {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    border: 1px solid var(--rule); border-radius: 14px; background: var(--raised);
    box-shadow: inset 0 1px 0 var(--lit), 0 1px 2px rgba(11, 11, 12, .03);
  }
  .scan-way { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 24px 14px 16px; text-align: center; }
  .scan-way + .scan-way { border-left: 1px solid var(--rule); }
  .scan-way img { display: block; width: 150px; height: 150px; margin-bottom: 16px; }
  .scan-way strong { font-size: 15.5px; font-weight: 550; letter-spacing: -.01em; color: var(--ink); }
  .scan-way small { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--t3); overflow-wrap: anywhere; }
  .scan-go {
    margin-top: 10px; padding: 5px 8px; border: 0; border-radius: 7px; background: none;
    font: 500 13px/1.2 "Inter", sans-serif; color: var(--signal); text-decoration: none; cursor: pointer;
  }
  .scan-go:hover { background: var(--tint); }
  .scan-go:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--signal); }
  .scan-note { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--t2); }
}
.memo { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--t2); }
.memo strong { font-weight: 600; color: var(--ink); }
.locked { margin-top: 12px; font-size: 13.5px; color: var(--t3); }
.sent-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }
.sent-box > p { margin-bottom: 10px; font-size: 14px; color: var(--t2); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg .btn { height: 46px; padding: 0 8px; font-size: 14.5px; }

.notice { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--tint-edge); border-radius: 12px; background: var(--tint); font-size: 14px; line-height: 1.55; color: var(--t1); }
.notice strong { font-weight: 550; color: var(--ink); }
.notice .dot { width: 8px; height: 8px; margin: 6px 0 0 4px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--tint); }
.notice.done { border-color: var(--rule); background: var(--raised); box-shadow: inset 0 1px 0 var(--lit), var(--shadow); }
.notice.done .dot { width: 11px; height: 6px; margin: 6px 0 0 3px; border-radius: 0; background: none; box-shadow: none; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
details.again { margin-top: 12px; }
details.again summary { display: inline-block; font-size: 13px; font-weight: 500; color: var(--signal); cursor: pointer; list-style: none; }
details.again summary::-webkit-details-marker { display: none; }
details.again summary:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }
details.again[open] summary { margin-bottom: 12px; }

/* ── what happens next ───────────────────── */
.next { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: next; border-top: 1px solid var(--rule); }
.next li { counter-increment: next; display: grid; grid-template-columns: 26px 1fr; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.45; color: var(--t1); }
.next li::before { content: counter(next, decimal-leading-zero); padding-top: 4px; font-size: 9.5px; font-weight: 500; letter-spacing: .04em; color: var(--signal); font-variant-numeric: tabular-nums; }
.more { display: inline-block; margin-top: 16px; font-size: 13.5px; font-weight: 500; color: var(--signal); text-decoration: none; }
.more:hover, .more:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }

/* ── closing ─────────────────────────────── */
.closing { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); }
.closing p.display { font-size: 23px; line-height: 1.15; letter-spacing: -.028em; }
.closing p.display span { display: block; color: var(--t3); }
.closing small { display: block; margin-top: 10px; font-size: 13.5px; color: var(--t3); }
.fine { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 11.5px; line-height: 1.5; color: var(--t3); }

.preview-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: center; gap: 10px; padding: 9px 16px; background: var(--ink); color: var(--paper); font-size: 12.5px; text-align: center; }
.loading { padding: 80px 0; font-size: 14px; color: var(--t3); text-align: center; }
.problem { padding: 60px 0; }
.problem p { margin-top: 10px; font-size: 15px; color: var(--t2); }

/* ── records (signed copy, invoice) ──────── */
.record-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.record-tools a { font-size: 13px; font-weight: 500; color: var(--signal); text-decoration: none; }
.record .doc { box-shadow: none; }
.audit { margin-top: 28px; border-top: 1px solid var(--rule-strong); }
.audit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0 10px; }
.audit-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.audit dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.5; }
.audit dt { color: var(--t3); }
.audit dd { margin: 0; color: var(--t1); overflow-wrap: anywhere; }
.audit dd.hash { font-family: var(--mono); font-size: 11.5px; letter-spacing: .01em; }
.audit .party { padding-top: 14px; font-size: 13px; font-weight: 550; color: var(--ink); }
.exhibit-full { margin-top: 32px; }
.exhibit-full .section-head { border-bottom-color: var(--rule); }
.exhibit-full img { display: block; width: 100%; max-width: 520px; margin: 18px auto 0; border: 1px solid var(--rule); border-radius: 10px; }

.invoice-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: 30px 0 22px; }
.invoice-head h1 { margin: 0; font-size: 36px; line-height: 1.03; letter-spacing: -.04em; }
.invoice-head h1 span { display: block; color: var(--t3); }
.due { text-align: right; }
.due .label { display: block; margin-bottom: 7px; }
.due strong { display: block; font-family: "Inter Tight", "Inter", sans-serif; font-size: 36px; line-height: 1; font-weight: 400; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stamp { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 4px 9px; border: 1px solid var(--rule-strong); border-radius: 99px; font-size: 11px; font-weight: 550; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.stamp::before { content: ""; width: 8px; height: 4.5px; margin-top: -3px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.meta .label, .who .label { display: block; margin-bottom: 5px; }
.meta p { font-size: 13px; font-weight: 500; color: var(--ink); }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 0 4px; }
.who p { font-size: 13px; line-height: 1.55; color: var(--t1); }
.who strong { font-weight: 550; color: var(--ink); }
.lines { width: 100%; margin-top: 18px; border-collapse: collapse; }
.lines th { padding: 0 0 8px; text-align: left; border-bottom: 1px solid var(--rule-strong); }
.lines th:last-child, .lines td:last-child { text-align: right; }
.lines td { padding: 14px 0; vertical-align: top; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--t1); }
.lines td strong { display: block; font-size: 14px; font-weight: 550; color: var(--ink); }
.lines td small { display: block; max-width: 440px; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--t2); }
.lines td.amt { font-size: 14px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: 1fr auto; width: 300px; margin: 10px 0 0 auto; font-variant-numeric: tabular-nums; }
.totals span { padding: 6px 0; font-size: 12.5px; color: var(--t2); }
.totals span:nth-child(even) { text-align: right; color: var(--t1); }
.totals .total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--rule-strong); font-size: 14px; font-weight: 550; color: var(--ink); }
.totals .total.amount { font-family: "Inter Tight", "Inter", sans-serif; font-size: 19px; font-weight: 500; letter-spacing: -.02em; }

/* ── studio ──────────────────────────────── */
.studio-room { margin-top: 26px; border: 1px solid var(--rule); border-radius: 16px; background: var(--raised); box-shadow: inset 0 1px 0 var(--lit), var(--shadow); overflow: hidden; }
.studio-room > header { padding: 18px 20px 16px; border-bottom: 1px solid var(--rule); }
.studio-room > header h2 { margin: 6px 0 0; font-size: 22px; line-height: 1.1; letter-spacing: -.028em; }
.studio-room > header h2 span { color: var(--t3); }
.studio-room > header p { margin-top: 6px; font-size: 13.5px; color: var(--t2); }
.block { padding: 16px 20px 18px; border-bottom: 1px solid var(--rule); }
.block:last-child { border-bottom: 0; }
.block > .label { display: block; margin-bottom: 12px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.todo > li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.todo .tick { width: 18px; height: 18px; margin-top: 1px; border: 1px solid var(--rule-strong); border-radius: 50%; }
.todo .is-done .tick { position: relative; border-color: var(--ink); background: var(--ink); }
.todo .is-done .tick::after { content: ""; position: absolute; left: 4.5px; top: 4.5px; width: 7px; height: 3.5px; border-left: 1.5px solid var(--paper); border-bottom: 1.5px solid var(--paper); transform: rotate(-45deg); }
.todo strong { display: block; font-size: 14.5px; font-weight: 550; color: var(--ink); }
.todo p { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--t2); }
.todo .inline-form { margin-top: 10px; }
.todo .inline-form .btn-primary { margin-top: 12px; }
.linkbox { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--paper); }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.text-draft { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--sunk); font-size: 13.5px; line-height: 1.5; color: var(--t1); white-space: pre-wrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.status-line { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; color: var(--t2); }
.status-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--t3); }
.status-line.live::before { background: var(--signal); box-shadow: 0 0 0 4px var(--tint); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.45; }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline time { color: var(--t3); font-variant-numeric: tabular-nums; }
.timeline strong { font-weight: 550; color: var(--ink); }
.timeline small { display: block; margin-top: 2px; font-size: 12px; color: var(--t3); }
.empty { font-size: 13.5px; color: var(--t3); }
.keygate { max-width: 400px; margin-top: 30px; }

/* ── small screens ───────────────────────── */
@media (max-width: 600px) {
  main { padding: 22px 18px 56px; }
  .masthead .eyebrow:last-child { max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .parties { grid-template-columns: 1fr 1fr; }
  .parties > div:last-child { grid-column: 1 / -1; }
  .glance { grid-template-columns: 1fr 1fr; }
  .glance div:nth-child(3) { border-left: 0; }
  .glance div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .terms { padding: 0 18px; }
  .terms > li { grid-template-columns: 1fr; row-gap: 8px; }
  .terms .body { padding-left: 26px; }
  .doc-head, .parties, .accept, .exhibit-tile { padding-left: 18px; padding-right: 18px; }
  .exhibit-tile { grid-template-columns: 72px 1fr; }
  .exhibit-tile img { width: 72px; height: 60px; }
  .exhibit-tile .go { display: none; }
  .signatures { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .invoice-head { grid-template-columns: 1fr; }
  .due { text-align: left; }
  .meta, .who { grid-template-columns: 1fr; gap: 10px; }
  .totals { width: 100%; }
  .audit dl { grid-template-columns: 1fr; gap: 2px; }
  .audit dd { margin-bottom: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

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

@media print {
  :root {
    --paper: #fff; --raised: #fff; --sunk: #f6f6f7; --ink: #0b0b0c;
    --t1: rgba(11, 11, 12, .86); --t2: rgba(11, 11, 12, .66); --t3: rgba(11, 11, 12, .46);
    --rule: rgba(11, 11, 12, .1); --rule-strong: rgba(11, 11, 12, .22);
    --lit: #fff; --edge: rgba(11, 11, 12, 0); --glow: transparent; --shadow: none;
    --signal: #0071e3; --tint: rgba(0, 113, 227, .06); --tint-edge: rgba(0, 113, 227, .2);
    color-scheme: light;
  }
  @page { size: Letter; margin: .6in .7in .7in; }
  html, body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main { width: 100%; padding: 0; }
  .no-print, .preview-bar { display: none !important; }
  .doc, .sig-card, .bill { box-shadow: none; }
  .terms > li, .sig-card, .audit dl { break-inside: avoid; }
  .exhibit-full { break-before: page; }
  .record .doc { border: 0; border-radius: 0; overflow: visible; }
  .record .doc::before { display: none; }
  .record .doc-head, .record .parties, .record .accept { padding-left: 0; padding-right: 0; }
  .record .terms { padding: 0; }
  .record .glance { border: 1px solid var(--rule); border-radius: 10px; }
  .exhibit-full img { width: auto; max-width: 100%; max-height: 8.3in; }
}

/* ── small additions ─────────────────────── */
.sig-actions { display: inline-flex; gap: 14px; }
.bill.how { margin-top: 28px; }
.bill-row.pay-row span:last-child { flex: 0 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.bill-row.last { padding-bottom: 14px; }
.problem h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; }
.btn.spaced { margin-top: 12px; }
.fine span:last-child { flex: none; white-space: nowrap; }
.fields.one { grid-template-columns: 1fr; }
