:root {
  --red: #ae0f0a;
  --plum: #370b28;
  --bg: #fff8f8;
  --card: #ffffff;
  --text: #2f2830;
  --muted: #756b73;
  --line: #eadfe5;
  --soft: #f8eef3;
  --shadow: 0 18px 55px rgba(55, 11, 40, .10);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 10% 0%, #fcebed 0, transparent 30%), var(--bg); color: var(--text); }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto 72px; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--plum); text-decoration: none; }
.brandmark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--plum); color: white; font-size: 20px; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { margin-top: 5px; color: var(--muted); }
.hero { padding: 60px 4px 38px; max-width: 850px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.045em; margin: 10px 0 20px; color: var(--plum); }
.hero p:not(.eyebrow) { font-size: 1.12rem; line-height: 1.65; color: var(--muted); max-width: 760px; }
.eyebrow { font-size: .74rem; letter-spacing: .14em; font-weight: 800; color: var(--red); margin: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 22px; align-items: start; }
.card { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); }
.card h2 { margin: 0 0 22px; color: var(--plum); }
.card h3 { color: var(--plum); margin-top: 28px; }
.stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-weight: 700; }
.optional { color: var(--muted); font-size: .8rem; font-weight: 500; }
input[type="text"], input[type="password"], textarea { width: 100%; border: 1px solid #d9cbd2; border-radius: 14px; padding: 13px 14px; font: inherit; color: inherit; background: white; outline: none; }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(174,15,10,.09); }
textarea { resize: vertical; }
.dropzone { border: 1.5px dashed #c9aab8; border-radius: 18px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--soft); cursor: pointer; }
.dropzone:hover { border-color: var(--red); }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone span { color: var(--muted); font-weight: 500; font-size: .9rem; }
.dropzone .drop-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: white; background: var(--red); font-size: 26px; margin-bottom: 10px; }
.dropzone .file-summary { margin-top: 10px; color: var(--red); font-weight: 800; }
.primary, .secondary, .ghost { border: 0; border-radius: 13px; font: inherit; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.primary { background: var(--red); color: white; padding: 15px 18px; }
.secondary { background: var(--plum); color: white; padding: 11px 14px; }
.ghost { background: transparent; color: var(--plum); padding: 10px 12px; }
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .58; cursor: wait; transform: none; }
.privacy-note { background: #fff5e9; border: 1px solid #f3dbc0; border-radius: 14px; padding: 14px 15px; font-size: .9rem; line-height: 1.5; color: #5d4632; }
.side-card { position: sticky; top: 18px; }
.side-card ul { padding-left: 20px; line-height: 1.8; color: var(--muted); }
.side-card p { line-height: 1.65; color: var(--muted); }
.result-card { margin-top: 24px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 15px; }
.result-head h2 { margin: 5px 0 4px; }
.result-text { width: 100%; min-height: 620px; border: 1px solid var(--line); border-radius: 16px; background: #fffcfd; padding: 18px; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #32242e; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.messages { display: grid; gap: 8px; margin: 0 0 8px; }
.message { border-radius: 12px; padding: 12px 14px; font-weight: 650; }
.message.error { background: #ffeceb; color: #8c1915; border: 1px solid #f5c7c4; }
.message.success { background: #edf8f0; color: #285c36; border: 1px solid #cce7d3; }
.login-wrap { min-height: calc(100vh - 130px); display: grid; place-items: center; }
.login-card { width: min(460px, 100%); }
.login-card h1 { font-size: 2.4rem; color: var(--plum); margin: 8px 0 10px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } .side-card { position: static; } .hero { padding-top: 36px; } .result-head { flex-direction: column; } }
