/* XNIGHTSTARR.FM — Sync Desk. Visual language mirrors xnightstarr.com:
   void black, bone text, rust accents, Anton / Inter / JetBrains Mono. */
:root {
  --void: #0a0908; --char: #141210; --char-2: #1c1916; --char-3: #242019; --line: #332e28; --line-2: #453e35;
  --bone: #ece7dc; --bone-dim: #a29c8e; --bone-faint: #6f695e;
  --rust: #b23a2e; --rust-bright: #d4493a; --rust-glow: rgba(178,58,46,.18);
  --amber: #c98a3a; --amber-glow: rgba(201,138,58,.14);
  --ok: #6f9a6b; --ok-glow: rgba(111,154,107,.14);
  --info: #7d93b0; --info-glow: rgba(125,147,176,.14);
  --radius: 2px;
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --serif: 'Cinzel', serif;
  --ease: cubic-bezier(.16,.84,.44,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--void); color: var(--bone); font: 15px/1.55 var(--body); min-height: 100vh; overflow-x: hidden; }
a { color: var(--bone); text-decoration-color: var(--rust); text-underline-offset: 3px; }
a:hover { color: var(--rust-bright); }
::selection { background: var(--rust); color: var(--bone); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .98; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 20px; }
h4 { font-size: 15px; letter-spacing: .03em; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

/* atmosphere */
.grain, .scan { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.grain { opacity: .06; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.scan { background: repeating-linear-gradient(to bottom, rgba(255,255,255,.012) 0 1px, transparent 1px 3px); }
.glow { position: fixed; inset: -20vh -10vw auto auto; width: 60vw; height: 60vh; background: radial-gradient(closest-side, var(--rust-glow), transparent); filter: blur(30px); pointer-events: none; z-index: 0; }

/* layout */
.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
main { padding: 28px 0 80px; min-height: calc(100vh - 140px); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; } .sticky { position: sticky; top: 84px; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--bone-dim); }
.faint { color: var(--bone-faint); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
@media (max-width: 719.98px) { .hide-sm { display: none !important; } }

/* header */
header.top { position: sticky; top: 0; z-index: 50; background: rgba(10,9,8,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 21px; letter-spacing: .03em; text-decoration: none; color: var(--bone); white-space: nowrap; }
.logo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rust); animation: pulse 2.4s infinite; flex: none; }
.logo .fm-tag { font-family: var(--mono); font-size: 9px; color: var(--rust); letter-spacing: .14em; text-transform: uppercase; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(178,58,46,.6); } 50% { opacity: .5; box-shadow: 0 0 0 5px rgba(178,58,46,0); } }
nav.main { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-dim); text-decoration: none; padding: 8px 11px; border: 1px solid transparent; white-space: nowrap; }
nav.main a:hover { color: var(--bone); }
nav.main a.on { color: var(--bone); border-color: var(--line); background: var(--char); }
.subnav { border-bottom: 1px solid var(--line); background: var(--char); }
.subnav nav.main { padding: 6px 0; }
.who { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; background: none; border: 1px solid var(--line); color: var(--bone-dim); width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border-radius: var(--radius); }
.bell:hover { color: var(--bone); border-color: var(--bone-dim); }
.bell .count { position: absolute; top: -6px; right: -6px; background: var(--rust); color: var(--bone); font: 700 9.5px/1 var(--mono); padding: 3px 5px; border-radius: 9px; }
.test-banner { background: repeating-linear-gradient(-45deg, #3a2a10 0 12px, #2c200c 12px 24px); color: var(--amber); font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 7px 10px; border-bottom: 1px solid #5a4318; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--bone); background: transparent; border: 1px solid var(--bone); padding: 13px 20px; border-radius: var(--radius); cursor: pointer; text-decoration: none; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--bone); color: var(--void); }
.btn.solid { background: var(--rust); border-color: var(--rust); color: var(--bone); }
.btn.solid:hover { background: var(--rust-bright); border-color: var(--rust-bright); }
.btn.ghost { border-color: var(--line); color: var(--bone-dim); }
.btn.ghost:hover { border-color: var(--bone); color: var(--bone); background: transparent; }
.btn.ok { border-color: var(--ok); color: #cfe3cc; }
.btn.ok:hover { background: var(--ok); color: var(--void); }
.btn.warn { border-color: var(--amber); color: var(--amber); }
.btn.warn:hover { background: var(--amber); color: var(--void); }
.btn.danger { border-color: var(--rust); color: var(--rust-bright); }
.btn.danger:hover { background: var(--rust); color: var(--bone); }
.btn.small { padding: 9px 14px; font-size: 10px; }
.btn.block { width: 100%; }
.btn:disabled, .btn.busy { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; color: var(--bone-dim); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; padding: 0; }
.linkbtn:hover { color: var(--bone); }

/* cards & panels */
.card { background: linear-gradient(180deg, var(--char) 0%, rgba(20,18,16,.92) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.card.tight { padding: 14px 16px; }
.card.accent { border-left: 2px solid var(--rust); }
.card.amber { border-left: 2px solid var(--amber); }
.card.okline { border-left: 2px solid var(--ok); }
.card h3 + *, .card h4 + * { margin-top: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.eyebrow { font: 500 10.5px/1.2 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); }
.eyebrow.rust { color: var(--rust-bright); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head .eyebrow { margin-bottom: 10px; }

/* stat tiles */
.stat { background: var(--char); border: 1px solid var(--line); padding: 16px 18px; border-radius: var(--radius); }
.stat .label { font: 500 10px/1.2 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--bone-dim); }
.stat .value { font: 400 32px/1.05 var(--display); margin-top: 10px; letter-spacing: .01em; }
.stat .sub { font-size: 12px; color: var(--bone-faint); margin-top: 6px; }
.stat.hot { border-color: var(--rust); box-shadow: inset 0 0 0 1px var(--rust-glow); }
.stat.hot .value { color: var(--rust-bright); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 7px; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 20px; color: var(--bone-dim); background: var(--char-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.register { color: var(--bone-dim); }
.pill.approve { color: var(--amber); border-color: rgba(201,138,58,.45); background: var(--amber-glow); }
.pill.pay, .pill.license, .pill.payout { color: var(--info); border-color: rgba(125,147,176,.45); background: var(--info-glow); }
.pill.done { color: var(--ok); border-color: rgba(111,154,107,.5); background: var(--ok-glow); }
.pill.closed { color: var(--bone-faint); }
.pill.alert { color: var(--rust-bright); border-color: rgba(212,73,58,.5); background: var(--rust-glow); }
.tag { display: inline-block; font: 500 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--bone-dim); border: 1px solid var(--line); padding: 4px 7px; border-radius: var(--radius); }
.tag.rust { color: var(--rust-bright); border-color: rgba(212,73,58,.5); }
.tag.amber { color: var(--amber); border-color: rgba(201,138,58,.5); }
.tag.ok { color: var(--ok); border-color: rgba(111,154,107,.5); }

/* stepper */
.stepper { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 4px 0 24px; }
.step { position: relative; padding-top: 14px; }
.step .bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--line); }
.step.done .bar { background: var(--bone-dim); }
.step.now .bar { background: var(--rust); box-shadow: 0 0 12px var(--rust); }
.step .lbl { font: 500 9.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--bone-faint); }
.step.done .lbl { color: var(--bone-dim); }
.step.now .lbl { color: var(--bone); }
@media (max-width: 560px) { .step .lbl { font-size: 8px; letter-spacing: .06em; } }

/* money split bar */
.splitbar { display: flex; height: 14px; border-radius: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--char-2); }
.splitbar span { display: block; height: 100%; transition: width .5s var(--ease); }
.splitbar .s-art { background: var(--bone); }
.splitbar .s-sup { background: var(--rust); }
.splitbar .s-fee { background: repeating-linear-gradient(-45deg, var(--amber) 0 3px, #8a5f28 3px 6px); }
.legend { display: grid; gap: 8px; margin-top: 14px; }
.legend .li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.legend .sw { display: inline-block; width: 9px; height: 9px; margin-right: 8px; vertical-align: 0; }
.legend .amt { font-family: var(--mono); font-size: 13px; }
.bigmoney { font: 400 46px/1 var(--display); letter-spacing: .01em; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font: 500 9.5px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--char); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--char-2); }
table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
dl.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 0; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--bone-dim); font: 500 10px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
dl.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
dl.kv dd.changed { color: var(--amber); }
dl.kv dd .was { display: block; font-size: 12px; color: var(--bone-faint); text-decoration: line-through; }

/* forms */
form .section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; }
form .section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-title .n { font: 600 11px/1 var(--mono); color: var(--rust-bright); letter-spacing: .1em; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field label, .lbl { font: 500 10px/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); }
.field .hint { font-size: 12px; color: var(--bone-faint); }
.field .err { font-size: 12px; color: var(--rust-bright); }
input, select, textarea { width: 100%; background: var(--void); border: 1px solid var(--line); color: var(--bone); font: 15px/1.4 var(--body); padding: 11px 12px; border-radius: var(--radius); transition: border-color .2s; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, .chip:focus-within { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-glow); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%), linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--rust); flex: none; margin: 2px 0 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--rust-bright); }
.inline-input { position: relative; }
.inline-input .affix { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--bone-dim); font-size: 13px; pointer-events: none; }
.inline-input .affix.pre { left: 12px; }
.inline-input .affix.post { right: 12px; }
.inline-input .affix.pre + input { padding-left: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 8px 11px; font-size: 13px; cursor: pointer; border-radius: 20px; user-select: none; }
.chip:has(input:checked) { border-color: var(--rust); background: var(--rust-glow); color: var(--bone); }
.chip input { width: 14px; height: 14px; margin: 0; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 10px 0; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.track-picker { max-height: 290px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.track-picker .album { font: 500 9.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--rust-bright); padding: 12px 12px 6px; background: var(--char); position: sticky; top: 0; }
.track-picker label { display: flex; gap: 10px; align-items: center; padding: 9px 12px; cursor: pointer; font-size: 14px; border-top: 1px solid rgba(51,46,40,.5); }
.track-picker label:hover { background: var(--char-2); }
.track-picker label:has(input:checked) { background: var(--rust-glow); color: var(--bone); }
.track-picker input { width: 15px; height: 15px; accent-color: var(--rust); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 24px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--void); border: 2px solid var(--line-2); }
.timeline li.k-approval::before { border-color: var(--amber); }
.timeline li.k-payment::before, .timeline li.k-transfer::before { border-color: var(--info); }
.timeline li.k-good::before { border-color: var(--ok); background: var(--ok); }
.timeline li.k-bad::before { border-color: var(--rust); background: var(--rust); }
.timeline .when { display: block; font: 500 10px/1.4 var(--mono); color: var(--bone-faint); letter-spacing: .06em; }
.timeline .who { color: var(--bone-dim); }

/* notices */
.notice { border: 1px solid var(--line); border-left: 2px solid var(--info); background: var(--char); padding: 13px 16px; font-size: 14px; border-radius: var(--radius); }
.notice.warn { border-left-color: var(--amber); }
.notice.bad { border-left-color: var(--rust); }
.notice.good { border-left-color: var(--ok); }
.notice b { color: var(--bone); }
.notice ul { margin: 8px 0 0; padding-left: 18px; }
.empty { text-align: center; padding: 50px 20px; color: var(--bone-dim); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { color: var(--bone); margin-bottom: 10px; }

/* landing */
.hero { padding: clamp(40px, 9vw, 110px) 0 40px; position: relative; }
.hero h1 { font-size: clamp(52px, 10.5vw, 132px); line-height: .9; }
.hero h1 .r { color: var(--rust); }
.hero .lede { max-width: 620px; font-size: clamp(16px, 1.9vw, 19px); color: var(--bone-dim); margin: 22px 0 30px; }
.hero-tag { font: 500 11px/1 var(--mono); letter-spacing: .25em; color: var(--bone-dim); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.hero-tag::before { content: ''; width: 28px; height: 1px; background: var(--rust); }
.blackletter { font-family: 'UnifrakturMaguntia', serif; text-transform: none; letter-spacing: 0; }
.flow { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.flow > div { background: var(--void); padding: 24px 22px; }
.flow .num { font: 400 46px/1 var(--display); color: var(--rust); }
.flow h4 { margin: 14px 0 8px; font-size: 18px; }
.flow p { color: var(--bone-dim); font-size: 14px; margin: 0; }
.modes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.flowline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 14px; }
.flowline .node { border: 1px solid var(--line-2); padding: 6px 9px; color: var(--bone); }
.flowline .arr { color: var(--rust); }
section.block { padding: 50px 0; border-top: 1px solid var(--line); }
section.block > .eyebrow { margin-bottom: 12px; }
section.block > h2 { margin-bottom: 26px; }
.calc { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: center; }
input[type=range] { padding: 0; border: 0; accent-color: var(--rust); background: transparent; }
footer.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; font: 500 10.5px/1.6 var(--mono); letter-spacing: .1em; color: var(--bone-faint); text-transform: uppercase; }

/* auth */
.auth { max-width: 460px; margin: 30px auto 0; }
.demo-accounts { display: grid; gap: 8px; }
.demo-accounts button { text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--void); border: 1px solid var(--line); color: var(--bone); padding: 12px 14px; cursor: pointer; font: inherit; border-radius: var(--radius); }
.demo-accounts button:hover { border-color: var(--rust); background: var(--char-2); }

/* license document */
.doc-frame { background: #f4f0e6; color: #1b1814; border-radius: var(--radius); padding: clamp(18px, 4vw, 44px); position: relative; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.license-doc { font: 14px/1.6 Georgia, 'Times New Roman', serif; position: relative; }
.license-doc header { text-align: center; margin-bottom: 20px; }
.license-doc h1 { font-family: var(--serif); font-size: 30px; letter-spacing: .1em; text-transform: uppercase; color: #1b1814; }
.license-doc h2 { font-family: Arial, sans-serif; font-size: 13px; letter-spacing: .08em; color: #8a2a20; margin-top: 8px; }
.license-doc h3 { font-family: Arial, sans-serif; font-size: 14px; text-transform: none; letter-spacing: 0; margin: 20px 0 6px; color: #1b1814; }
.license-doc .mono { font-size: 11px; color: #6b6255; overflow-wrap: anywhere; }
.license-doc table { width: 100%; border-collapse: collapse; font: 13px/1.45 Arial, sans-serif; margin: 10px 0; }
.license-doc th, .license-doc td { border: 1px solid #c9c0ae; padding: 7px 9px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.license-doc .license-summary th { width: 30%; background: #e8e1d2; }
.license-doc .license-approvals th { background: #e8e1d2; }
.license-watermark { position: absolute; top: 280px; left: 50%; transform: translateX(-50%) rotate(-24deg); font: 700 clamp(28px, 6vw, 58px)/1 Arial, sans-serif; color: rgba(178,58,46,.13); white-space: nowrap; pointer-events: none; letter-spacing: .06em; }
.license-banner { background: #fff1d6; border: 1px solid #e0b866; padding: 8px 12px; font: 12px/1.4 Arial, sans-serif; color: #6d4b0f; }

/* modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(5,4,4,.78); z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--char); border: 1px solid var(--line-2); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border-radius: var(--radius); box-shadow: 0 40px 80px -20px #000; }
.modal.wide { width: min(900px, 100%); }
.modal h3 { margin-bottom: 14px; }
.toasts { position: fixed; bottom: 18px; right: 18px; left: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 300; pointer-events: none; }
.toast { pointer-events: auto; background: var(--char-2); border: 1px solid var(--line-2); border-left: 2px solid var(--ok); padding: 12px 16px; font-size: 14px; max-width: 420px; box-shadow: 0 20px 40px -10px #000; animation: rise .3s var(--ease); }
.toast.bad { border-left-color: var(--rust); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.loading { display: flex; justify-content: center; padding: 70px 0; }
.spinner { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--rust); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 14px; background: linear-gradient(90deg, var(--char) 0%, var(--char-2) 50%, var(--char) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 1px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* sim checkout */
.sim-checkout { max-width: 480px; margin: 20px auto; background: #fbfaf7; color: #1a1a1a; border-radius: 8px; overflow: hidden; box-shadow: 0 40px 80px -30px #000; }
.sim-checkout .sim-head { background: #1a1a1a; color: #fff; padding: 18px 22px; font: 600 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; display: flex; justify-content: space-between; }
.sim-checkout .sim-body { padding: 24px 22px; }
.sim-checkout .sim-amt { font: 600 38px/1 var(--body); margin: 6px 0 18px; }
.sim-checkout input { background: #fff; color: #1a1a1a; border-color: #d7d3ca; }
.sim-checkout .btn { width: 100%; }
.sim-checkout .btn.ghost { color: #555; border-color: #ccc; }
.sim-checkout .btn.ghost:hover { color: #111; border-color: #111; }
.sim-checkout .muted { color: #6b665c; }

.notif { padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif.unread .subj::before { content: '●'; color: var(--rust); margin-right: 7px; font-size: 10px; }
.notif .subj { font-weight: 600; font-size: 14px; }
.notif .body { white-space: pre-wrap; font-size: 13.5px; color: var(--bone-dim); margin-top: 4px; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-old { color: var(--bone-faint); text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
@media print {
  header.top, .subnav, footer.foot, .grain, .scan, .glow, .test-banner, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .doc-frame { box-shadow: none; padding: 0; }
}
