/* ═══════════════════════════════════════════════════════════════════════
   THE FAMILY — QuByte Systems. "We know a guy."
   A 1940s Chicago members' club, done modern: charcoal, antique gold, cream
   type, Art Deco lines, warm lamplight, soft raised (neumorphic) controls.
   Lead heat: The Heat Is On (gold shimmer + smoke), Warming Up (amber), On Ice (frost).

   All styling lives here. The pages and app.js use classes; a style=""
   attribute is only for a computed value (a bar width, a stagger delay).
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #171a19;  --bg-2: #121413;  --surface-2: #1d1f1c;
  --gold: #c9a96a;  --gold-hi: #e3c58c;  --gold-lo: #8d7445;  --gold-ink: #1b150b;
  --cream: #f3e8d3;  --text: #e2d8c4;  --mut: #c9c3b5;  --dim: #8b867b;  --faint: #5f5b53;
  --amber: #e0a45a;  --oxblood: #7d2b24;  --ice: #a9d8ef;  --frost: #e4f4fb;  --money: #7fb58a;
  --line: rgba(201,169,106,.18);  --line-soft: rgba(243,232,211,.06);
  --hi: rgba(243,232,211,.05);  --lo: rgba(0,0,0,.55);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --deco: 'Poiret One', 'Playfair Display', serif;
  --ui: Inter, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
  --r: 20px;
  /* the three neumorphic states, plus the big panel shadow */
  --knob: linear-gradient(150deg, #2b2d28, #1e201c);
  --raised: -3px -3px 8px var(--hi), 5px 6px 13px var(--lo);
  --pressed: inset 4px 4px 9px rgba(0,0,0,.65), inset -3px -3px 7px rgba(243,232,211,.04);
  --inset: inset 5px 5px 12px rgba(0,0,0,.6), inset -4px -4px 10px rgba(243,232,211,.035);
  --lift: -6px -6px 16px var(--hi), 12px 14px 30px var(--lo);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--gold-hi); text-decoration-color: rgba(227,197,140,.4); text-underline-offset: 3px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(201,169,106,.35); color: var(--cream); }

/* ── room: amber lamplight, film grain, slow smoke ───────────────────── */
.room { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 45vh at 50% -8%, rgba(224,164,90,.16), transparent 70%),
    radial-gradient(40vw 40vh at 0% 100%, rgba(125,43,36,.10), transparent 70%),
    radial-gradient(40vw 40vh at 100% 90%, rgba(201,169,106,.06), transparent 70%); }
.room::after { content: ''; position: absolute; inset: -50%; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(3) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 33% { transform: translate(-3%,2%); } 66% { transform: translate(2%,-3%); } }
.smoke { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.smoke i { position: absolute; bottom: -120px; width: 240px; height: 240px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(243,232,211,.07), transparent 65%); filter: blur(18px);
  animation: drift 22s ease-in infinite; }
@keyframes drift { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(80px,-110vh) scale(1.6); opacity: 0; } }
@keyframes in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sheen { 0% { background-position: 150% 0; } 60%,100% { background-position: -50% 0; } }

/* ── type and small helpers ──────────────────────────────────────────── */
.eyebrow { font: 600 10.5px/1 var(--ui); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.eyebrow::before, .eyebrow.both::after { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow.both::after { background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow.center { justify-content: center; }
.h1 { font: 600 clamp(30px,4vw,44px)/1.08 var(--serif); letter-spacing: -.01em; margin: 0 0 8px; color: var(--cream); }
.h1 em, .h2 em { font-style: italic; color: var(--gold-hi); }
.h2 { font: 600 24px/1.15 var(--serif); color: var(--cream); margin: 0 0 6px; }
.lede { color: var(--mut); font-size: 15px; margin: 0; max-width: 640px; }
.sub { margin: 0 0 18px; }
.quote { font: italic 400 19px/1.5 var(--serif); color: var(--cream); margin: 0 0 10px; }
.quote b { font-style: normal; color: var(--gold-hi); font-weight: 600; }
.tiny { font-size: 12px; } .sm { font-size: 13px; } .muted { color: var(--mut); } .dim { color: var(--dim); } .faint { color: var(--faint); }
.center { text-align: center; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 22px; }
.block { margin-bottom: 22px; } .stack > * + * { margin-top: 20px; } .grow { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); color: var(--cream); }
.gold-text { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── surfaces ────────────────────────────────────────────────────────── */
.panel { position: relative; border-radius: var(--r); padding: 22px 24px;
  background: linear-gradient(150deg, #282a25, #1f211d 60%, #1b1d1a);
  box-shadow: var(--lift), inset 0 1px 0 rgba(243,232,211,.05); }
.panel.pad { padding: 30px; } .panel.slim { padding: 18px; }
.panel.deco::before { content: ''; position: absolute; inset: 7px; border-radius: calc(var(--r) - 6px); pointer-events: none; border: 1px solid var(--line); }
.panel.deco::after { content: ''; position: absolute; top: 7px; left: 50%; width: 46px; height: 7px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); clip-path: polygon(0 0,100% 0,60% 100%,40% 100%); opacity: .7; }
.well { border-radius: 14px; background: var(--bg-2); box-shadow: var(--inset); }
.rule { height: 1px; border: 0; margin: 18px 0; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: 1.25fr 1fr; }

/* buttons */
.btn { appearance: none; border: 0; cursor: pointer; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 13px; font-weight: 600; font-size: 13px; letter-spacing: .01em;
  background: var(--knob); box-shadow: var(--raised);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), color .15s; }
.btn:hover { color: var(--cream); }
.btn:active, .btn.sel { color: var(--gold-hi); transform: translateY(1px); box-shadow: var(--pressed); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-gold { color: var(--gold-ink); background: linear-gradient(160deg, var(--gold-hi), var(--gold) 50%, #a98a52);
  box-shadow: -3px -3px 8px var(--hi), 6px 8px 18px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-gold:hover { color: #000; filter: brightness(1.05); }
.btn-gold:active { color: var(--gold-ink); box-shadow: inset 3px 3px 8px rgba(0,0,0,.35); }
.btn-call { color: #0c170e; background: linear-gradient(160deg, #a7d4ad, var(--money)); box-shadow: -3px -3px 8px var(--hi), 6px 8px 18px rgba(0,0,0,.5); }
.wide { width: 100%; padding: 14px; font-size: 15px; }

/* fields */
.field { margin-bottom: 16px; position: relative; }
.field label { display: block; font: 600 10.5px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.field label.toggle { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--mut); }
.input, .select, .textarea { width: 100%; border: 0; outline: none; color: var(--cream); padding: 13px 15px; border-radius: 13px; background: var(--bg-2); box-shadow: var(--inset); }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--inset), 0 0 0 1px rgba(201,169,106,.55); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; }
.check span { display: inline-block; padding: 9px 14px; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--mut); background: var(--knob); box-shadow: var(--raised); }
.check input:checked + span { color: var(--gold-hi); box-shadow: var(--pressed); }
.check input:focus-visible + span { outline: 1px solid var(--gold); }
.toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); cursor: pointer; }
.filters { display: flex; gap: 10px; align-items: center; }

/* messages: shown whenever they hold text (see showErr / showOk) */
.err { background: rgba(125,43,36,.18); border-left: 3px solid var(--oxblood); color: #f0c9bd; border-radius: 10px; padding: 10px 13px; font-size: 13px; margin: 0 0 16px; }
.ok-note { background: rgba(127,181,138,.1); border-left: 3px solid var(--money); color: #cfe7d3; border-radius: 10px; padding: 10px 13px; font-size: 13px; margin: 0 0 16px; }
.err:empty, .ok-note:empty { display: none; }
.empty { text-align: center; padding: 50px 0; color: var(--dim); font: italic 400 18px var(--serif); }

/* pills */
.chip, .st, .demo-flag { display: inline-block; font: 700 9.5px/1 var(--ui); text-transform: uppercase; border-radius: 999px; }
.chip { letter-spacing: .1em; padding: 4px 8px; background: var(--bg-2); color: var(--dim); }
.chip.house { color: #cfcac0; } .chip.new { color: var(--gold-hi); }
.st { letter-spacing: .12em; padding: 5px 9px; background: var(--bg-2); color: var(--mut); }
.st.in_review, .st.approved { color: var(--gold-hi); } .st.sent { color: var(--money); } .st.needs_info, .st.error { color: #e3a090; } .st.declined { color: var(--dim); }
.demo-flag { letter-spacing: .14em; padding: 4px 8px; color: var(--amber); border: 1px solid rgba(224,164,90,.45); vertical-align: 3px; margin-left: 8px; }

/* ── sign-in pages ───────────────────────────────────────────────────── */
.door { display: grid; place-items: center; min-height: 100vh; padding: 28px; position: relative; overflow: hidden; }
.door .box { width: 100%; max-width: 430px; position: relative; z-index: 1; animation: in .8s var(--ease) both; }
.door .panel { padding: 34px 32px 28px; }
.door .sub { margin-bottom: 22px; }
.crest { text-align: center; margin-bottom: 26px; }
.crest .mark { width: 74px; height: 74px; margin: 0 auto 14px; display: block; }
.crest .name { font: 400 30px/1 var(--deco); letter-spacing: .34em; color: var(--cream); padding-left: .34em; }
.crest .tag { margin-top: 10px; font: italic 400 14px var(--serif); color: var(--gold); }
.qr { background: var(--cream); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.qr svg, .qr img { width: 100%; height: auto; display: block; }
.secret { display: block; text-align: center; word-break: break-all; margin-bottom: 16px; color: var(--gold-hi); }

/* ── app shell ───────────────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 26px; padding: 12px 28px;
  background: rgba(18,20,19,.84); backdrop-filter: blur(18px) saturate(1.2); border-bottom: 1px solid var(--line-soft); }
.bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo svg { width: 34px; height: 34px; }
.logo b { font: 400 17px/1 var(--deco); letter-spacing: .28em; color: var(--cream); }
.logo small { display: block; margin-top: 4px; font: italic 400 11px var(--serif); color: var(--gold); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--dim); text-decoration: none; padding: 8px 13px; border-radius: 11px; font-size: 13.5px; font-weight: 600; transition: color .15s; }
.nav a:hover { color: var(--cream); }
.nav a.on { color: var(--gold-hi); box-shadow: inset 3px 3px 8px rgba(0,0,0,.6), inset -2px -2px 6px rgba(243,232,211,.04); }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mut); white-space: nowrap; }
.me .who b { color: var(--cream); font-weight: 600; } .me .who i { color: var(--gold-hi); font-style: italic; font-family: var(--serif); }
.me a { color: var(--dim); }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 34px 28px 70px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }

/* avatar and rank insignia */
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 15px var(--serif); color: var(--gold-hi);
  background: radial-gradient(circle at 35% 30%, #34302a, #191714); box-shadow: 0 0 0 1px var(--line), 3px 4px 10px var(--lo); overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.insig { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.insig.lg { width: 96px; height: 96px; }
.insig.sm { width: 34px; height: 34px; }

/* Dough bar: gold = new business, silver = house */
.track { position: relative; height: 12px; border-radius: 999px; margin: 14px 0 8px; overflow: hidden; background: var(--bg-2);
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.7), inset -2px -2px 5px rgba(243,232,211,.03); }
.track .fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; transition: width 1.2s var(--ease); }
.track .fill.new { background: linear-gradient(90deg, var(--gold-lo), var(--gold), var(--gold-hi)); box-shadow: 0 0 12px rgba(227,197,140,.35); }
.track .fill.house { background: linear-gradient(90deg, #6c6a64, #b9b6ad); }
.track .fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%); background-size: 220% 100%; animation: sheen 3.4s ease-in-out infinite; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--dim); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend .n { background: var(--gold); } .legend .h { background: #b9b6ad; }

/* the book (Dough ledger tables) */
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger td { padding: 9px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ledger .pts { text-align: right; font-weight: 700; white-space: nowrap; }
.ledger .pts.neg { color: #e3a090; } .ledger .pts.pos { color: var(--gold-hi); }
.ledger .input { padding: 8px 11px; }
#ranks td:first-child { width: 44px; } #ranks td:last-child { width: 140px; }

/* ── Headquarters ────────────────────────────────────────────────────── */
.welcome { padding: 34px 36px; overflow: hidden; }
.welcome .quote:first-of-type { margin-top: 6px; }
.welcome .sign { margin-top: 14px; font: italic 600 15px var(--serif); color: var(--gold); }
.today { margin: 0; }
.today .eyebrow { display: inline-flex; margin: 0 10px 0 0; }
#simon-says { font-family: var(--serif); font-style: italic; color: var(--cream); }
.standing { display: flex; gap: 20px; align-items: center; }
.standing .eyebrow { margin-bottom: 8px; }
.standing .rank-name { font: 600 30px/1.05 var(--serif); }
.standing .rank-name + p { margin: 6px 0 0; }
.standing .place { text-align: right; } .standing .place .h1 { margin: 0; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0; }
.meter.well { padding: 18px 20px; }
.meter .k { font: 600 10.5px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.meter .v { font: 600 34px/1 var(--serif); color: var(--cream); margin: 12px 0 6px; }
.meter .v .dim { font-size: 16px; }
.meter .s { font-size: 12.5px; color: var(--mut); }
.meter.pending .v { font-size: 22px; color: var(--dim); font-style: italic; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.quick a { text-decoration: none; padding: 18px; border-radius: 16px; color: var(--text);
  background: var(--knob); box-shadow: -4px -4px 10px var(--hi), 7px 8px 18px var(--lo); transition: transform .2s var(--ease); }
.quick a:hover { transform: translateY(-3px); }
.quick b { display: block; font: 600 16px var(--serif); color: var(--cream); margin-bottom: 4px; }
.quick span { font-size: 12.5px; color: var(--dim); }
.feed { display: grid; gap: 14px; }
.ann { display: flex; gap: 14px; padding: 16px 18px; }
.ann .seal { width: 38px; height: 38px; flex: none; }
.ann h4 { margin: 0 0 4px; font: 600 15.5px var(--serif); color: var(--cream); }
.ann p { margin: 0; font-size: 13.5px; color: var(--mut); }
.ann time { display: block; margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.ann.promotion { box-shadow: -4px -4px 10px var(--hi), 8px 10px 22px var(--lo), 0 0 0 1px rgba(201,169,106,.35), 0 0 30px -10px rgba(227,197,140,.35); }
#mybook .quote { font-size: 16px; }

/* ── The Family (cards and the member file) ──────────────────────────── */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.member { text-align: center; padding: 28px 20px 22px; cursor: pointer; transition: transform .25s var(--ease); }
.member:hover { transform: translateY(-4px); }
.member .insig { margin: 0 auto 14px; display: block; width: 84px; height: 84px; }
.member .nm { font: 600 19px var(--serif); color: var(--cream); }
.member .ak { font: italic 400 14px var(--serif); color: var(--gold-hi); margin-top: 2px; min-height: 20px; }
.member .rk { margin-top: 10px; font: 600 10.5px var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.member .dp { margin-top: 10px; font: 600 22px var(--serif); color: var(--cream); }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8,9,8,.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: in .25s ease both; }
.drawer { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.file-head { display: flex; gap: 16px; align-items: center; }
.file-head .eyebrow { margin-bottom: 6px; } .file-head .h2 { margin: 0; } .file-head .gold-text { font: 600 18px var(--serif); }
.drawer .meters { grid-template-columns: repeat(3, 1fr); }
.drawer .meter .v { font-size: 24px; } .drawer .meter .v .dim { font-size: 15px; }
.ladder { display: grid; gap: 10px; }
.rung { display: flex; align-items: center; gap: 10px; } .rung.off { opacity: .35; }

/* ── The Table (leaderboard) ─────────────────────────────────────────── */
.board { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.board th { text-align: left; font: 600 10.5px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); padding: 0 16px 4px; }
.board th:last-child { text-align: right; }
.board td { padding: 14px 16px; background: linear-gradient(150deg, #262823, #1e201c); vertical-align: middle; }
.board tr td:first-child { border-radius: 16px 0 0 16px; } .board tr td:last-child { border-radius: 0 16px 16px 0; }
.board .pos { font: 600 22px var(--serif); width: 54px; color: var(--dim); }
.board tr.p1 .pos { color: var(--gold-hi); } .board tr.p2 .pos { color: #cfcac0; } .board tr.p3 .pos { color: #b88a5a; }
.board .person { display: flex; align-items: center; gap: 12px; }
.board .person b { color: var(--cream); font-weight: 600; } .board .person i { display: block; font: italic 13px var(--serif); color: var(--gold-hi); }
.board .rank { display: flex; align-items: center; gap: 8px; }
.board .dp { font: 600 19px var(--serif); color: var(--cream); text-align: right; white-space: nowrap; }
.board .bar-cell { width: 26%; }
.board .track { margin: 0; height: 8px; }
.board tr.mine td { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }

/* ── The Wire (lead heat) ────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.stat { padding: 18px 20px; cursor: pointer; transition: transform .2s var(--ease); }
.stat:hover { transform: translateY(-2px); }
.stat.sel { box-shadow: var(--inset); }
.stat .k { font: 600 10.5px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.stat .n { font: 600 36px/1 var(--serif); margin-top: 10px; }
.stat.hot .n { color: var(--gold-hi); } .stat.warm .n { color: var(--amber); } .stat.cold .n { color: var(--ice); }
.list { display: grid; gap: 18px; }
.reply { padding: 22px 24px; overflow: hidden; animation: in .5s var(--ease) both; }
.r-top, .r-body, .r-files, .r-actions, .simon-aside { position: relative; z-index: 1; }
.r-top { display: flex; justify-content: space-between; gap: 14px; }
.r-biz { font: 600 20px/1.2 var(--serif); color: var(--cream); }
.r-biz .chip { margin-left: 8px; }
.r-meta { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.r-when { font-size: 12px; color: var(--faint); white-space: nowrap; text-align: right; }
.r-when div { margin-top: 8px; }
.r-body { margin: 14px 0; padding: 14px 16px; white-space: pre-wrap; font-size: 14.5px; max-height: 240px; overflow: auto; }
.simon-aside { margin: -4px 0 14px; font: italic 400 13.5px var(--serif); color: var(--gold); }
.r-files { font-size: 12.5px; margin: -4px 0 12px; }
.r-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.r-status { font-size: 12px; color: var(--faint); margin-left: auto; }
.heat { display: inline-flex; align-items: center; gap: 6px; font: 700 10px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; }
.heat.hot { color: var(--gold-ink); background: linear-gradient(160deg, var(--gold-hi), var(--gold)); }
.heat.warm { color: #2a1a08; background: linear-gradient(160deg, #eec08a, var(--amber)); }
.heat.cold { color: #0d2633; background: linear-gradient(160deg, var(--frost), var(--ice)); }
/* The Heat Is On: gold-leaf edge, slow shimmer, a wisp of cigar smoke */
.reply.hot { box-shadow: var(--lift), 0 0 0 1px rgba(201,169,106,.55); }
.reply.hot::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(227,197,140,.10) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 5s ease-in-out infinite; }
.reply .wisp { position: absolute; right: 26px; top: 40px; width: 90px; height: 140px; pointer-events: none; opacity: .5; }
.reply .wisp path { fill: none; stroke: rgba(243,232,211,.18); stroke-width: 6; stroke-linecap: round; filter: blur(3px); stroke-dasharray: 260; animation: wisp 6s ease-in-out infinite; }
@keyframes wisp { 0% { stroke-dashoffset: 260; opacity: 0; } 30% { opacity: 1; } 100% { stroke-dashoffset: -260; opacity: 0; } }
/* Warming Up: amber edge */
.reply.warm { box-shadow: var(--lift), inset 3px 0 0 var(--amber); }
/* On Ice: frost */
.reply.cold { filter: saturate(.7);
  background: repeating-linear-gradient(60deg, rgba(228,244,251,.025) 0 2px, transparent 2px 14px),
              repeating-linear-gradient(-60deg, rgba(228,244,251,.02) 0 1px, transparent 1px 18px),
              linear-gradient(150deg, #1d2428, #161c1f);
  box-shadow: -6px -6px 16px rgba(228,244,251,.03), 12px 14px 30px var(--lo), 0 0 0 1px rgba(169,216,239,.22), inset 0 0 40px rgba(169,216,239,.05); }
.reply.cold::after { content: '❄'; position: absolute; right: 22px; bottom: 8px; font-size: 64px; line-height: 1; color: rgba(228,244,251,.05); pointer-events: none; }
.reply.cold .r-body { background: rgba(10,18,24,.7); }

/* ── Make a Deal ─────────────────────────────────────────────────────── */
.ask { min-height: 170px; font-size: 15px; line-height: 1.6; }
.hits { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin-top: 6px; border-radius: 14px; overflow: hidden;
  background: #1f211d; box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.hits button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.hits button:hover, .hits button:focus { background: #2a2c27; outline: none; }
.hits b { color: var(--cream); } .hits small { display: block; color: var(--dim); font-size: 12px; }
.drop { display: block; text-align: center; padding: 26px 16px; border-radius: 16px; cursor: pointer; color: var(--mut); font-size: 13px;
  background: var(--bg-2); box-shadow: var(--inset); border: 1px dashed rgba(201,169,106,.35); }
.drop b { color: var(--gold-hi); font-family: var(--serif); font-size: 16px; display: block; margin-bottom: 4px; }
.drop.over { border-color: var(--gold-hi); }
.filelist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.filelist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.filelist button { background: none; border: 0; color: var(--dim); cursor: pointer; }
.deal { padding: 16px 18px; cursor: pointer; }
.deal .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.deal h4 { margin: 0; font: 600 16px var(--serif); color: var(--cream); }
.deal .meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
.parts h5 { margin: 16px 0 6px; font: 600 11px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.parts li { font-size: 13.5px; margin: 4px 0; } .parts .q { color: var(--gold-hi); font-weight: 700; margin-right: 6px; }
.quote-frame { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #fff; }   /* white, like an email client */

/* ── Talk to Simon ───────────────────────────────────────────────────── */
.simon-card { display: flex; gap: 20px; align-items: flex-start; }
.simon-card .portrait { width: 110px; height: 110px; flex: none; }
.lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lines li { padding: 12px 14px; font-size: 13.5px; }
.lines b { color: var(--gold-hi); font-family: var(--serif); }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.story h4 { margin: 0 0 8px; font: 600 17px var(--serif); color: var(--cream); }
.story p { margin: 0; font-size: 13.5px; color: var(--mut); }
.story .lesson { margin-top: 10px; font: italic 600 13.5px var(--serif); color: var(--gold-hi); }

/* ── smaller screens ─────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .g2, .meters, .quick { grid-template-columns: 1fr 1fr; }
  .g2 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .nav { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .me { margin-left: auto; }
  .wrap { padding: 22px 16px 50px; }
  .g2, .meters, .quick, .stats, .form-grid { grid-template-columns: 1fr; }
  .welcome { padding: 26px 22px; }
  .board .bar-cell, .board th:nth-child(4) { display: none; }
  .r-status { margin-left: 0; width: 100%; }
  .simon-card { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
