:root {
  --ink: #20172a;
  --plum: #4e285e;
  --plum-deep: #24132d;
  --blue: #2769ff;
  --coral: #f16f59;
  --sand: #f4efe6;
  --paper: #fffdf8;
  --line: #d9d0c5;
  --muted: #746a78;
  --ok: #167a58;
  --shadow: 0 24px 70px rgba(45, 26, 53, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { min-height: 78px; padding: 14px clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,253,248,.94); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.identity { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.identity-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; background: var(--plum); color: white; border-radius: 50% 50% 50% 12px; font-family: Georgia, serif; font-size: 24px; }
.identity strong, .identity small { display: block; }
.identity strong { font-size: 14px; letter-spacing: .02em; }
.identity small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
nav { display: flex; gap: 26px; font-size: 12px; font-weight: 700; }
nav a { text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--blue); }
.build-marks { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.build-marks img { width: 28px; height: 28px; object-fit: contain; }
.hero { padding: clamp(64px, 10vw, 132px) clamp(22px, 7vw, 104px) clamp(62px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: clamp(50px, 8vw, 128px); align-items: end; background: radial-gradient(circle at 82% 12%, rgba(39,105,255,.1), transparent 26%), linear-gradient(135deg, var(--paper), #f7f0ea); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--plum); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 30px; height: 2px; background: var(--coral); }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.045em; line-height: .98; }
h1 { max-width: 920px; margin-top: 24px; font-size: clamp(52px, 7.6vw, 118px); }
h1 em { color: var(--plum); font-weight: 400; }
.lede { max-width: 760px; margin: 34px 0 0; color: #655b68; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { padding: 14px 20px; border: 1px solid var(--plum); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.button.primary { background: var(--plum); color: white; }
.button.secondary { background: transparent; }
.button:hover, .button:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(36,19,45,.15); }
.brief-card { padding: 28px; background: var(--plum-deep); color: white; box-shadow: 18px 18px 0 var(--coral); }
.brief-label { margin: 0 0 28px; color: #c9b8cf; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brief-stat { display: grid; grid-template-columns: 72px 1fr; align-items: baseline; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.15); }
.brief-stat strong { font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.brief-stat span { color: #d6cad9; font-size: 12px; }
.signal-line { display: flex; justify-content: space-between; margin-top: 22px; padding: 12px 14px; background: rgba(255,255,255,.08); font-size: 11px; }
.signal-line b { color: #7ee2b8; }
.proof-strip { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sand); }
.proof-strip span { padding: 18px 10px; border-right: 1px solid var(--line); text-align: center; color: var(--plum); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.section-heading { max-width: 760px; }
.section-heading h2 { margin-top: 22px; font-size: clamp(42px, 5vw, 74px); }
.section-heading > p:last-child { color: var(--muted); font-size: 16px; line-height: 1.7; }
.workbench { padding: clamp(72px, 9vw, 120px) clamp(20px, 6vw, 90px); background: var(--paper); }
.scenario-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 45px 0 20px; padding-bottom: 4px; }
.scenario { white-space: nowrap; padding: 11px 15px; border: 1px solid var(--line); background: white; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; }
.scenario.active, .scenario:hover, .scenario:focus-visible { border-color: var(--plum); background: var(--plum); color: white; }
.console-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1.08fr); border: 1px solid var(--line); box-shadow: var(--shadow); }
.input-panel, .output-panel { padding: clamp(22px, 3.5vw, 48px); }
.input-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; background: var(--sand); border-right: 1px solid var(--line); }
.output-panel { min-height: 720px; background: white; }
.panel-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-title span { display: grid; place-items: center; width: 30px; height: 30px; background: var(--coral); color: white; border-radius: 50%; font-size: 10px; font-weight: 800; }
.panel-title h3 { margin: 0; flex: 1; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.panel-title b { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
label { display: flex; flex-direction: column; gap: 7px; color: #605660; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
label.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 0; border-bottom: 1px solid #b9ad9f; border-radius: 0; padding: 10px 4px; background: transparent; color: var(--ink); outline: none; font-size: 14px; text-transform: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 2px 0 var(--blue); }
label.check { flex-direction: row; align-items: center; align-self: end; padding: 10px 0; }
label.check input { width: 16px; height: 16px; accent-color: var(--plum); }
.run-button { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 16px 18px; border: 0; background: var(--blue); color: white; cursor: pointer; font-weight: 800; }
.run-button:hover, .run-button:focus-visible { background: var(--plum); }
.run-button:disabled { opacity: .55; cursor: progress; }
.run-button b { font-size: 21px; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.empty-state { min-height: 580px; display: grid; place-content: center; text-align: center; }
.empty-state h3 { margin: 24px 0 8px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.radar { position: relative; display: block; width: 110px; height: 110px; margin: auto; border: 1px solid var(--line); border-radius: 50%; }
.radar i { position: absolute; inset: 16px; border: 1px solid var(--line); border-radius: 50%; }
.radar i:nth-child(2) { inset: 34px; background: var(--blue); border: 0; }
.radar i:nth-child(3) { inset: 0; border: 0; background: conic-gradient(from 40deg, transparent, rgba(39,105,255,.2)); animation: scan 3s linear infinite; }
@keyframes scan { to { transform: rotate(360deg); } }
.result-state { padding-top: 28px; }
.decision-head { display: flex; justify-content: space-between; gap: 20px; }
.decision-head small, .metric-grid small, .proposal-card small, .approval-card small, .trace-title small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.decision-head h3 { margin: 6px 0 0; color: var(--plum); font-family: Georgia, serif; font-size: 34px; font-weight: 500; text-transform: capitalize; }
.confidence { text-align: right; }
.confidence strong { display: block; margin-top: 4px; color: var(--blue); font-family: Georgia, serif; font-size: 30px; }
.summary { padding: 18px 0; border-bottom: 1px solid var(--line); color: #514852; font-size: 14px; line-height: 1.7; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.metric-grid div { min-height: 82px; padding: 12px; background: var(--sand); }
.metric-grid strong { display: block; margin-top: 8px; color: var(--plum); font-size: 15px; }
.proposal-card { padding: 18px; border-left: 4px solid var(--coral); background: #fff4ee; }
.proposal-card h4 { margin: 7px 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; text-transform: capitalize; }
.proposal-card p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.proposal-card span { display: inline-block; padding: 5px 8px; background: white; color: var(--coral); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.approval-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 16px; border: 1px solid var(--blue); }
.approval-card strong { display: block; margin-top: 4px; }
.approval-actions { display: flex; gap: 7px; }
.approval-actions button { padding: 9px 12px; border: 1px solid var(--plum); background: white; color: var(--plum); cursor: pointer; font-size: 10px; font-weight: 800; }
.approval-actions button:last-child { background: var(--plum); color: white; }
.trace-wrap { margin-top: 20px; }
.trace-title { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.trace-title b { color: var(--muted); font-size: 10px; }
#trace-list { max-height: 245px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
#trace-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee8df; font-size: 11px; }
#trace-list i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--plum); color: white; font-style: normal; font-size: 8px; }
#trace-list b { display: block; font-size: 11px; }
#trace-list small { color: var(--muted); }
.architecture { padding: clamp(76px, 10vw, 140px) clamp(20px, 6vw, 90px); background: var(--plum-deep); color: white; }
.inverse .eyebrow { color: #cdb8d5; }
.inverse > p:last-child { color: #c2b3c6; }
.architecture-frame { margin-top: 52px; padding: 18px; background: #fcfaf5; border: 1px solid rgba(255,255,255,.2); }
.architecture-frame img { display: block; width: 100%; height: auto; }
.decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 36px; background: rgba(255,255,255,.16); }
.decision-grid article { padding: 26px; background: var(--plum-deep); }
.decision-grid span { color: var(--coral); font-family: Georgia, serif; font-size: 28px; }
.decision-grid h3 { margin: 16px 0 10px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.decision-grid p { margin: 0; color: #bfb0c4; font-size: 12px; line-height: 1.65; }
.assurance { padding: clamp(76px, 10vw, 140px) clamp(20px, 6vw, 90px); background: var(--sand); }
.assurance-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 14px; margin-top: 48px; }
.assurance-grid article { min-height: 235px; padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.assurance-grid h3 { margin: 0 0 18px; color: var(--plum); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.assurance-grid p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.score-card { background: var(--blue) !important; color: white; border-color: var(--blue) !important; }
.score-card p, .score-card span { color: rgba(255,255,255,.75); }
.score-card strong { display: block; margin: 22px 0 6px; font-family: Georgia, serif; font-size: 54px; font-weight: 500; }
.score-card span { font-size: 11px; }
.meter { height: 7px; margin-top: 32px; background: rgba(255,255,255,.25); }
.meter i { display: block; width: 0; height: 100%; background: white; transition: width .6s ease; }
footer { padding: 42px clamp(20px, 6vw, 90px); display: flex; justify-content: space-between; gap: 40px; align-items: center; background: #19111e; color: white; }
footer strong { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
footer p { max-width: 720px; color: #aa9dae; font-size: 11px; line-height: 1.6; }
.footer-marks { display: flex; gap: 14px; }
.footer-marks img { width: 40px; height: 40px; object-fit: contain; filter: brightness(0) invert(1); }
@media (max-width: 1000px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .brief-card { max-width: 480px; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .console-grid { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .decision-grid, .assurance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .topbar { padding: 12px 16px; }
  .build-marks span { display: none; }
  .build-marks img { width: 24px; height: 24px; }
  h1 { font-size: 50px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .brief-card { box-shadow: 9px 9px 0 var(--coral); }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip span { border-right: 0; border-bottom: 1px solid var(--line); }
  .input-panel { grid-template-columns: 1fr; }
  label.wide, .panel-title, .run-button, .form-note { grid-column: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .decision-grid, .assurance-grid { grid-template-columns: 1fr; }
  .output-panel { min-height: 620px; }
  .approval-card { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.theme-switch { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.theme-switch:hover, .theme-switch:focus-visible { border-color: var(--blue); color: var(--blue); }
.theme-switch span { font-size: 15px; line-height: 1; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; --ink: #f2edf4; --plum: #d7a9e7; --plum-deep: #18101e; --blue: #78a0ff; --coral: #ff866f; --sand: #19161d; --paper: #0d1014; --line: #35313a; --muted: #aaa1ae; --ok: #73d7b2; --shadow: 0 24px 70px rgba(0,0,0,.35); }
html[data-theme="dark"] .topbar { background: rgba(13,16,20,.94); }
html[data-theme="dark"] .hero { background: radial-gradient(circle at 82% 12%, rgba(120,160,255,.13), transparent 26%), linear-gradient(135deg, #0d1014, #171219); }
html[data-theme="dark"] .lede, html[data-theme="dark"] label, html[data-theme="dark"] .summary { color: #b8afbb; }
html[data-theme="dark"] .scenario, html[data-theme="dark"] .output-panel, html[data-theme="dark"] .approval-actions button, html[data-theme="dark"] .proposal-card span { background: #12151a; }
html[data-theme="dark"] .proposal-card { background: #241713; }
html[data-theme="dark"] .architecture-frame { background: #f8f5ef; }
@media (max-width: 620px) { .theme-switch b { display: none; } }
