:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #252d2d;
  background: #f3f5f4;
  --ink: #203735;
  --muted: #546561;
  --line: #d4ddda;
  --gold: #e3b96f;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.masthead { background: var(--ink); color: #fff; }
.brand { display: flex; gap: 16px; align-items: center; min-height: 68px; }
.brand span:first-child { color: var(--gold); font-weight: 800; letter-spacing: .12em; }
.brand-separator { height: 20px; border-left: 1px solid #819593; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 42px 0 24px; }
.company, .stage { font-size: .875rem; font-weight: 650; }
.company { color: var(--muted); margin: 0 0 7px; }
.stage { border: 1px solid #afbdba; border-radius: 30px; padding: 6px 12px; color: var(--ink); white-space: nowrap; }
h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.03em; }
h2 { font-size: 1.18rem; margin: 0 0 12px; }
.workbench { display: grid; grid-template-columns: minmax(245px, .65fr) minmax(0, 1.65fr); gap: 20px; align-items: start; padding-bottom: 42px; }
.panel { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 22px; }
.source p { line-height: 1.5; color: var(--muted); }
.file-label, label { display: block; font-weight: 650; font-size: .9rem; }
input[type=file] { margin-top: 8px; max-width: 100%; font-size: .89rem; }
.file-status { overflow-wrap: anywhere; font-size: .9rem; min-height: 42px; }
.note { font-size: .88rem; padding-top: 14px; border-top: 1px solid var(--line); }
.source .link-button { display: block; margin: 12px 0 4px; }
button { cursor: pointer; border-radius: 6px; padding: 10px 13px; font: inherit; font-size: .93rem; font-weight: 650; border: 1px solid transparent; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: #21504c; color: white; }
.secondary { color: var(--ink); background: white; border-color: #829490; }
.link-button { color: #21504c; text-decoration: underline; text-underline-offset: 3px; background: transparent; padding-inline: 0; }
fieldset { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; padding: 0; border: 0; margin: 17px 0 0; min-width: 0; }
legend { border-top: 1px solid var(--line); width: 100%; font-weight: 700; color: var(--ink); padding: 15px 0 11px; }
.wide { grid-column: 1 / -1; }
input[type=text], textarea { margin-top: 5px; display: block; width: 100%; min-width: 0; border: 1px solid #aebbb8; border-radius: 5px; background: #fff; color: inherit; padding: 9px; font: inherit; }
textarea { resize: vertical; min-height: 72px; }
:focus-visible { outline: 3px solid #b88334; outline-offset: 2px; }
.export { margin-top: 16px; }
.export p { margin: 0 0 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.error { color: #a32d20 !important; }
@media (max-width: 740px) { .workbench { grid-template-columns: 1fr; } .intro { margin-top: 24px; } }
@media (max-width: 440px) { fieldset { grid-template-columns: 1fr; } .intro { align-items: flex-start; } .panel { padding: 15px; } }
.draft-tools { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.draft-tools p { margin: 9px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.proposal { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.proposal dl { margin: 0 0 14px; }
.proposal dt { font-weight: 650; margin: 9px 0 2px; }
.proposal dd { margin: 0; line-height: 1.5; }
.scan-review { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.scan-review h3 { margin: 0 0 8px; font-size: 1rem; }
.scan-review p, .scan-review dd { font-size: .9rem; overflow-wrap: anywhere; }
.scan-review dd { margin: 0 0 9px; white-space: pre-line; }
.scan-review dt { font-size: .83rem; font-weight: 650; color: var(--ink); }
.scan-review summary { cursor: pointer; margin-top: 12px; color: var(--ink); font-weight: 650; }
.scan-review textarea { margin-top: 8px; }

.login-wrap { max-width: 520px; margin-top: 50px; }
.login-panel p { line-height: 1.5; }
.login-button { display: inline-block; padding: 11px 15px; border-radius: 6px; text-decoration: none; font-weight: 650; }
.work-session { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.work-session span { font-size: .82rem; color: #fff !important; letter-spacing: normal !important; }
.session-button { background: transparent; color: #fff; border-color: #afbdba; white-space: nowrap; }
@media (max-width: 640px) { .brand { padding-block: 12px; flex-wrap: wrap; gap: 9px; } .work-session { margin-left: 0; width: 100%; justify-content: space-between; } }
