:root {
    color-scheme: light;
    --ink: #1d1915;
    --muted: #6f675f;
    --paper: #f7f3ec;
    --surface: #fffdf9;
    --line: #ded5c9;
    --ember: #d95324;
    --ember-dark: #9f3517;
    --gold: #f0b84b;
    --green: #26735a;
    --red: #a83c32;
    --shadow: 0 20px 60px rgba(62, 40, 22, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, .button { min-height: 2.75rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: white; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 78rem; margin: 0 auto; padding: 1.1rem 1.5rem; }
.site-header { border-bottom: 1px solid rgba(75, 58, 43, .12); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: linear-gradient(145deg, var(--ember), #f07d3c); color: white; font: 800 1.25rem Georgia, serif; box-shadow: 0 8px 20px rgba(217, 83, 36, .24); }
.brand strong, .brand small { display: block; }
.brand strong { font: 800 1.15rem Georgia, serif; }
.brand small { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 1.2rem; }
nav a { color: var(--muted); font-weight: 700; font-size: .9rem; text-decoration: none; }
nav a:hover { color: var(--ember-dark); }

.page { max-width: 78rem; margin: 0 auto; padding: 4rem 1.5rem 6rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(19rem, .9fr); gap: 3rem; align-items: center; margin-bottom: 3rem; }
.eyebrow { margin: 0 0 .8rem; color: var(--ember-dark); font-size: .74rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { max-width: 13ch; margin-bottom: 1.15rem; font-size: clamp(2.8rem, 6.7vw, 5.7rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; }
h3 { margin-bottom: .55rem; font-size: 1.25rem; }
.lead { max-width: 42rem; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.hero-proof { position: relative; padding: 1.4rem; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--surface); box-shadow: var(--shadow); transform: rotate(1.3deg); }
.hero-proof::before { content: ""; position: absolute; inset: .65rem -.65rem -.65rem .65rem; z-index: -1; border-radius: 1.5rem; background: #2a241f; transform: rotate(-2.5deg); }
.chat-line { width: fit-content; max-width: 92%; margin: .6rem 0; padding: .75rem .9rem; border-radius: 1rem 1rem 1rem .25rem; background: #ece4da; }
.chat-line.mine { margin-left: auto; border-radius: 1rem 1rem .25rem 1rem; background: #daf0d6; }
.transformation { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 1.1rem; color: var(--muted); font-size: .85rem; font-weight: 800; }
.transformation strong { color: var(--ember-dark); }

.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(20rem, 1.08fr); gap: 1.5rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 1.25rem; background: var(--surface); box-shadow: 0 12px 35px rgba(62, 40, 22, .07); }
.panel-body { padding: clamp(1.25rem, 3vw, 2rem); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.panel-head p { margin: .35rem 0 0; color: var(--muted); }
.step { display: inline-grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: white; font-size: .85rem; font-weight: 800; }
.scenario-grid { display: grid; gap: .8rem; margin-bottom: 1.5rem; }
.scenario { display: block; cursor: pointer; }
.scenario input { position: absolute; opacity: 0; pointer-events: none; }
.scenario-content { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; transition: .18s ease; }
.scenario-content strong, .scenario-content small { display: block; }
.scenario-content small { margin-top: .2rem; color: var(--muted); }
.scenario input:checked + .scenario-content { border-color: var(--ember); background: #fff3eb; box-shadow: 0 0 0 2px rgba(217, 83, 36, .12); }
.scenario input:focus-visible + .scenario-content { outline: 3px solid var(--gold); outline-offset: 2px; }
.divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
label.field { display: block; margin-bottom: 1rem; color: var(--ink); font-size: .9rem; font-weight: 800; }
label.field span { display: block; margin-bottom: .4rem; }
textarea, input[type="file"] { width: 100%; border: 1px solid var(--line); border-radius: .75rem; background: white; color: var(--ink); }
textarea { min-height: 9rem; padding: .85rem; resize: vertical; }
input[type="file"] { padding: .7rem; }
.hint { display: block; margin-top: .35rem; color: var(--muted); font-size: .78rem; font-weight: 500; }
.privacy-note { display: flex; gap: .7rem; margin: 1rem 0; padding: .9rem; border-radius: .8rem; background: #f3efe9; color: var(--muted); font-size: .82rem; }
.privacy-note strong { color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1rem; border: 0; border-radius: .75rem; background: var(--ink); color: white; cursor: pointer; font-weight: 850; text-decoration: none; }
.button:hover { background: #000; }
.button.primary { width: 100%; background: linear-gradient(135deg, var(--ember), #eb7a3d); box-shadow: 0 10px 24px rgba(217, 83, 36, .22); }
.button.primary:hover { background: var(--ember-dark); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.ghost { background: transparent; color: var(--muted); }
.error-list { margin: 0 0 1rem; padding: .85rem 1rem .85rem 2rem; border-left: 4px solid var(--red); border-radius: .5rem; background: #fff0ed; color: #70271f; }

.preview-card { overflow: hidden; }
.preview-top { padding: 1.1rem 1.25rem; background: var(--ink); color: white; }
.preview-top span { color: #d8cfc4; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.preview-top h3 { margin: .4rem 0 0; font-size: 1.55rem; }
.preview-body { padding: 1.35rem; }
.signal { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; font-weight: 800; }
.ai-chip { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .35rem .6rem; border-radius: 999px; background: #fff0e7; color: var(--ember-dark); font-size: .75rem; font-weight: 850; }
.signal-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 .3rem rgba(240, 184, 75, .18); }
.preview-body ul { margin: .7rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.mini-output { margin-top: 1.2rem; padding: 1rem; border: 1px dashed #cbbdab; border-radius: .8rem; background: #fbf7f1; }
.mini-output strong { display: block; margin-bottom: .35rem; }

.result-page { max-width: 74rem; }
.result-header { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.result-header h1 { max-width: 18ch; margin-bottom: .5rem; font-size: clamp(2.2rem, 5vw, 4.5rem); }
.result-header p { margin: 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.status-banner { display: flex; align-items: start; gap: 1rem; margin-bottom: 1.5rem; padding: 1.2rem; border: 1px solid #e3c77e; border-radius: 1rem; background: #fff7db; }
.status-banner.ready { border-color: #9dcdbd; background: #eaf7f1; }
.status-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: var(--gold); font-weight: 900; }
.status-banner.ready .status-icon { background: var(--green); color: white; }
.status-banner h2 { margin: 0 0 .25rem; font-family: inherit; font-size: 1.1rem; letter-spacing: 0; }
.status-banner p { margin: 0; color: var(--muted); }
.result-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.25rem; }
.stack { display: grid; gap: 1.25rem; }
.data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.data-list div { padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.data-list dt { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.data-list dd { margin: .25rem 0 0; font-weight: 750; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: .65rem 0 .65rem 1.8rem; border-bottom: 1px solid #eee6dd; }
.check-list li:last-child { border: 0; }
.check-list li::before { content: "?"; position: absolute; left: 0; top: .65rem; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff0c6; color: #805d08; font-size: .72rem; font-weight: 900; }
.fact-list, .risk-list, .question-list, .scope-list { margin: 0; padding: 0; }
.fact-list, .risk-list, .scope-list { list-style: none; }
.fact-list { display: grid; gap: .7rem; }
.fact-list li { position: relative; padding: .75rem .85rem .75rem 2.4rem; border-radius: .75rem; background: #edf7f2; }
.fact-list li::before { content: "✓"; position: absolute; left: .85rem; color: var(--green); font-weight: 900; }
.scope-list { display: grid; gap: .7rem; }
.scope-list li { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: .8rem; background: #fbf8f3; }
.scope-list span { display: grid; place-items: center; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; border-radius: .55rem; background: var(--ink); color: white; font-size: .78rem; }
.risk-panel { border-color: #e3c77e; background: #fffaf0; }
.risk-list { display: grid; gap: .6rem; }
.risk-list li { position: relative; padding-left: 1.5rem; }
.risk-list li::before { content: "!"; position: absolute; left: 0; color: var(--ember-dark); font-weight: 900; }
.question-list { display: grid; gap: .7rem; padding-left: 1.3rem; }
.question-list li { padding-left: .35rem; }
.next-action { padding: 1.1rem; border-radius: .9rem; background: #2c2621; color: white; }
.next-action small { display: block; margin-bottom: .35rem; color: #d7ccc1; font-weight: 750; text-transform: uppercase; }
.message { padding: 1rem; border-radius: 1rem 1rem .25rem 1rem; background: #ddf4d8; color: #173414; }
.section-spaced { margin-top: 1.3rem; }
.line-items { width: 100%; border-collapse: collapse; }
.line-items th, .line-items td { padding: .75rem .45rem; border-bottom: 1px solid var(--line); text-align: left; }
.line-items th { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.line-items td:last-child, .line-items th:last-child { text-align: right; }
.total { display: flex; justify-content: space-between; margin-top: 1rem; font-size: 1.15rem; font-weight: 900; }
.confidence { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .55rem; border-radius: 999px; background: #eee8e0; font-size: .74rem; font-weight: 800; }
.architecture-note { margin-top: 2.5rem; padding: 1.2rem; border-left: 4px solid var(--ember); background: rgba(255,255,255,.48); color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

@media (max-width: 820px) {
    .hero, .workspace, .result-grid { grid-template-columns: 1fr; }
    .hero { gap: 2rem; }
    .hero-proof { max-width: 34rem; }
    .result-header { align-items: start; flex-direction: column; }
}

@media (max-width: 560px) {
    .site-header { align-items: flex-start; }
    nav { flex-direction: column; gap: .3rem; text-align: right; }
    .page { padding-top: 2.5rem; }
    h1 { font-size: 2.7rem; }
    .data-list { grid-template-columns: 1fr; }
    .actions, .actions .button { width: 100%; }
    .site-footer { align-items: flex-start; flex-direction: column; }
}
