:root {
  color-scheme: dark;
  --bg:#0b1014; --panel:#11181d; --panel2:#151d22; --stroke:#2a3439;
  --ink:#f0f2ed; --muted:#a6b1b3; --gold:#e8be80; --mint:#7ad8b9; --red:#e79a91;
  font-family:"Inter","Segoe UI",Arial,sans-serif; background:var(--bg); color:var(--ink);
}
* {box-sizing:border-box}
body {margin:0; min-height:100vh; background:radial-gradient(ellipse at 77% 7%,#28251d53 0,transparent 48%),var(--bg)}
button,input,select,textarea {font:inherit}
button,select {cursor:pointer}
button {color:inherit}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible {outline:2px solid var(--gold); outline-offset:3px}
button:disabled {opacity:.42;cursor:default}
button {touch-action:manipulation}
[hidden] {display:none!important}
.shell {width:min(1320px,94%);margin-inline:auto}
.topbar {background:#0b1014ed;border-bottom:1px solid var(--stroke)}
.topinner {min-height:69px;display:flex;align-items:center;gap:21px}
.brand {display:inline-flex;gap:13px;align-items:center;color:var(--ink);text-decoration:none;font-family:Georgia,serif;font-size:34px;letter-spacing:-1.9px;line-height:1}
.brandmark {background:#211e19;border:1px solid #594b32; width:34px;height:34px;border-radius:10px;display:flex;gap:3px;align-items:center;justify-content:center;transform:rotate(-3deg)}
.brandmark i {height:16px;width:3px;background:var(--gold);transform:skewY(-24deg);position:relative}.brandmark i:before{content:"";position:absolute;background:var(--gold);top:-3px;bottom:-3px;left:1px;width:1px}.brandmark i:nth-child(2){height:9px;margin-top:6px}.brandmark i:nth-child(3){height:14px;margin-top:-4px}
.brand-sub,.eyebrow {color:var(--gold);font-size:.75rem;font-weight:650;letter-spacing:.12em}.brand-sub {color:#a5a99f;border-left:1px solid #3a3e3b;padding-left:21px}
nav {margin-left:auto;display:flex;gap:6px;border:1px solid #2c3439;background:#0f1519;border-radius:32px;padding:4px}
nav button {border:0;background:transparent;color:var(--muted);padding:8px 17px;border-radius:24px;font-weight:600;font-size:.89rem}
nav button[aria-current] {color:#f3d7a1;background:#302b22}
.heading {display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:43px 0 25px}
.eyebrow {margin:0 0 10px;display:flex;align-items:center;gap:9px}.eyebrow.small{font-size:.72rem;margin-bottom:6px}
.session-dot {width:7px;height:7px;background:var(--gold);border-radius:50%}
h1,h2,h3,p {margin-top:0}
h1 {font-family:"Baskervville",Georgia,serif;font-weight:normal;letter-spacing:-.054em;font-size:clamp(2.75rem,4.5vw,4.5rem);line-height:1.01;margin-bottom:9px}
.intro {font-size:1rem;line-height:1.5;color:var(--muted);margin-bottom:0}
.scenario-label {display:grid;gap:6px;color:var(--muted);font-size:.81rem;font-weight:550;min-width:190px}
select {appearance:none;color:var(--ink);border:1px solid var(--stroke);border-radius:8px;padding:10px 39px 10px 13px;background:linear-gradient(45deg,transparent 50%,#b3b6ad 50%) right 17px top 55%/5px 5px no-repeat,linear-gradient(135deg,#b3b6ad 50%,transparent 50%) right 12px top 55%/5px 5px no-repeat,var(--panel2)}
.desk {display:grid;grid-template-columns:minmax(0,1fr) minmax(300px, .43fr);gap:16px;align-items:stretch}
.card {border:1px solid var(--stroke);border-radius:16px;background:var(--panel);overflow:hidden}
.chart-card {background:#10171c;display:flex;flex-direction:column}
.chart-top,.playbar,.journal-top,.panel-title,.row,.instrument,.play-controls {display:flex;align-items:center}
.chart-top {justify-content:space-between;padding:19px 23px 15px;border-bottom:1px solid #222d32}
.instrument {gap:13px}.metal {background:linear-gradient(145deg,#3c3529,#252520);color:#f0d49c;border:1px solid #5d5038;border-radius:10px;font-family:Georgia,serif;font-size:24px;font-weight:normal;padding:8px}
h2 {font-size:1.25rem;letter-spacing:-.035em;line-height:1.22;margin-bottom:0;font-weight:610}
.meta,.quote span {font-size:.81rem;color:var(--muted);display:block;margin-top:4px}.meta b,footer b{font-weight:400;color:#697578;margin-inline:4px}
.quote {text-align:right;font-variant-numeric:tabular-nums}.quote strong {font:1.55rem/1.1 "IBM Plex Mono",Consolas,monospace;letter-spacing:-.07em}
.quote span {color:var(--mint)}.quote span.negative{color:var(--red)}
.plot {position:relative;min-width:0;background:#10171c;flex:1;min-height:292px}.plot canvas {display:block;width:100%;height:100%;position:absolute;inset:0}
.playbar {padding:11px 20px;border-top:1px solid #263138;justify-content:space-between;background:#131b20}
.time {display:flex;align-items:center;gap:12px}.time small {color:var(--muted);font-size:.83rem}.time strong {font-family:Consolas,monospace;font-size:1.08rem;font-weight:500}
.play-controls,.row {gap:8px}.button {display:inline-flex;justify-content:center;align-items:center;min-height:40px;border:1px solid #3b454b;background:#202a30;border-radius:8px;padding:8px 14px;font-size:.92rem;font-weight:600}
.button:hover:enabled,nav button:hover {filter:brightness(1.18)}.primary {background:var(--gold);border-color:var(--gold);color:#231b10}.soft {color:#d8e1df;background:#1a2329}
.icon-button{width:42px;background:#28372f;border-color:#435a4d;color:var(--mint)}.play-shape {width:0;height:0;border-left:10px solid currentColor;border-top:6px solid transparent;border-bottom:6px solid transparent;margin-left:2px}
.icon-button.playing .play-shape {height:13px;width:10px;border:0;border-left:3px solid currentColor;border-right:3px solid currentColor;margin:0}
.decision {padding:21px;min-height:430px;background:linear-gradient(150deg,#1b2223 0,#12191e 53%);display:flex;flex-direction:column}
.panel-title {gap:10px;margin-bottom:17px}.section-icon {font-size:1.45rem;color:var(--gold);line-height:1}
.question {font-size:.92rem;color:#bcc7c8;line-height:1.5;margin-bottom:10px}
.side-choice {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:15px}
.side-choice button {min-height:41px;border-radius:8px;border:1px solid var(--stroke);background:#172024;color:#b7c3c1;font-weight:600}
.side-choice button.buy[aria-pressed=true] {background:#203c34;border-color:#5d9b89;color:#ace8d5}
.side-choice button.sell[aria-pressed=true] {background:#402c2c;border-color:#986b65;color:#f5b9b2}
.levels {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:11px}.level {min-width:0}
.level label, .note-label {display:block;color:var(--muted);font-size:.84rem;margin-bottom:6px}
.level input,.note-input {min-width:0;width:100%;background:#0e1519;color:var(--ink);border:1px solid #374249;border-radius:7px;padding:9px 10px;font-size:.94rem}
.level input {font-family:Consolas,monospace}
.pick {display:none}.level-line {display:flex;justify-content:space-between;gap:4px;align-items:baseline}.level-line label{margin-bottom:5px}
.level-line .pick {display:inline;background:transparent;border:0;padding:3px 1px;color:#c7b48d;font-size:.78rem}.pick[aria-pressed=true]{text-decoration:underline;color:var(--gold)}
.note-input{margin-bottom:13px;resize:vertical}.wide {width:100%}.decision .row>*{flex:1}.second-actions {margin-top:8px}
.text-button {background:transparent;border:0;color:var(--muted);font-size:.89rem;text-decoration:underline;text-decoration-color:#687474;text-underline-offset:4px;padding:8px 0}
#decisionMessage {color:var(--gold);font-size:.86rem;line-height:1.45;margin:8px 0 0}#decisionMessage:empty{display:none}
.facts {display:grid;gap:0;margin:0 0 17px}.facts div {display:flex;justify-content:space-between;gap:6px;align-items:baseline;border-bottom:1px solid #2c373b;padding:10px 0}.facts dt {color:var(--muted);font-size:.91rem}.facts dd {margin:0;font:1rem Consolas,monospace}
.journal {margin-top:16px;padding:21px 24px 8px}.journal-top {justify-content:space-between;gap:15px;align-items:flex-end}
#log {padding:0;list-style:none;margin:13px 0 6px;max-height:240px;overflow:auto}#log li {padding:10px 2px;border-top:1px solid #273137;display:flex;gap:15px;align-items:baseline;font-size:.92rem}#log time {color:var(--gold);font: .85rem Consolas,monospace}#log .log-note{color:var(--muted)}
.compare-grid {display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}.compare-grid>div{background:#162027;padding:12px;border-radius:8px}.compare-grid small{display:block;color:var(--muted)}.compare-grid strong{display:block;margin-top:6px}.compare-note {color:var(--muted);font-size:.82rem;line-height:1.45;margin:8px 0 0}
footer {display:flex;justify-content:space-between;gap:12px;padding:24px 2px 28px;color:#99a3a2;font-size:.82rem}
dialog {border:1px solid var(--stroke);border-radius:14px;background:var(--panel2);color:var(--ink);max-width:min(90vw,390px);padding:24px}dialog p{color:var(--muted);margin-block:12px 18px;line-height:1.5}dialog::backdrop{background:#0009}
@media(min-width:1450px){.heading{margin-top:52px}.plot{min-height:330px}}
@media(max-width:890px){.shell{width:94%}.desk{grid-template-columns:minmax(0,1fr) minmax(265px,.63fr);gap:11px}.decision {padding:16px}.quote strong{font-size:1.3rem}}
@media(max-width:720px){.shell{width:calc(100% - 28px)}.topinner{min-height:60px;gap:10px}.brand{font-size:29px;gap:9px}.brandmark{width:28px;height:28px}.brand-sub{display:none}nav button{padding:7px 11px}.heading{align-items:flex-start;margin:26px 0 17px;flex-wrap:wrap;gap:13px}.heading h1{font-size:2.7rem}.intro{font-size:.94rem}.scenario-label{display:flex;align-items:center;gap:10px;min-width:0}.scenario-label select{padding-block:7px;font-size:.85rem}.desk{grid-template-columns:1fr}.plot{min-height:245px}.decision{min-height:0}.chart-top{padding:13px 15px 10px}.metal{font-size:19px}.playbar{padding:8px 13px}.journal{padding:15px 16px 5px}.panel-title{margin-bottom:12px}.compare-grid{grid-template-columns:1fr 1fr}.decision input{font-size:16px}.eyebrow{font-size:.71rem}footer{padding-top:15px}}
@media(max-width:360px){.topinner{gap:3px}.brand{font-size:24px}nav{gap:1px}nav button {padding-inline:8px}.scenario-label{flex-wrap:wrap}.levels{gap:6px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.brand {white-space:nowrap}
.brand em, #photoPanel h1 em {color:var(--gold);font-weight:400}
#photoPanel .intro {max-width:640px}
@media(max-width:475px) {
  .brand {font-size:clamp(1.35rem,6vw,1.7rem);letter-spacing:-.055em;gap:7px}
  .topinner {gap:5px}
  .topinner nav {gap:0;white-space:nowrap}
  .topinner nav button {padding-inline:9px}
  #photoPanel h1 {max-width:12em;font-size:clamp(2.25rem,8.5vw,2.7rem)}
}
