:root {
  color-scheme: light;
  --page: #f2f6f7;
  --white: #fff;
  --ink: #132d37;
  --muted: #4a606a;
  --border: #d7e3e6;
  --field-border: #8ea6ae;
  --soft: #e8f4f3;
  --accent: #006963;
  --accent-hover: #00554f;
  --focus: #007c76;
  --alert: #8c2525;
  font: 16px/1.5 system-ui, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--border); }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 72px; }
.identity { display: flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -.025em; }
.mark { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--white); font-size: .82rem; letter-spacing: .03em; }
.domain { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }

.intro { max-width: 720px; padding-block: clamp(32px, 6vw, 66px) 28px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -.055em; font-weight: 760; }
.intro p { color: var(--muted); max-width: 57ch; margin-top: 15px; font-size: 1.0625rem; }
.layout { display: grid; grid-template-columns: minmax(210px, 264px) minmax(0, 1fr); align-items: start; gap: 24px; padding-bottom: 60px; }
.layout.result-layout { grid-template-columns: minmax(0, 1fr); }
.sidebar, .card { border: 1px solid var(--border); border-radius: 16px; background: var(--white); }
.sidebar { position: sticky; top: 24px; padding: 18px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9375rem; }
.progress-heading span:first-child { font-weight: 680; }
#progress-count { color: var(--muted); white-space: nowrap; }
progress { display: block; width: 100%; height: 7px; margin-block: 10px 20px; appearance: none; overflow: hidden; border: 0; border-radius: 999px; background: var(--border); color: var(--accent); }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.steps { display: grid; gap: 4px; }
.step { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; text-align: left; padding: 7px 8px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .9375rem; }
.step:hover { background: var(--page); }
.step[aria-current='step'] { color: var(--accent); background: var(--soft); font-weight: 700; }
.step-index { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid var(--border); border-radius: 50%; background: var(--white); font-size: .8125rem; }
.step[aria-current='step'] .step-index { border-color: var(--accent); }
.draft-note { color: var(--muted); font-size: .875rem; padding: 15px 3px 1px; border-top: 1px solid var(--border); margin-top: 15px; }

.card { min-width: 0; padding: clamp(20px, 4vw, 38px); }
.panel { display: grid; gap: 22px; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.035em; scroll-margin-top: 16px; }
.question { display: grid; gap: 9px; }
.question label { display: flex; align-items: baseline; gap: 10px; font-weight: 620; line-height: 1.45; }
.question-number { flex: 0 0 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums; font-size: .875rem; font-weight: 700; }
textarea { display: block; width: 100%; min-height: 80px; resize: vertical; padding: 9px 12px; border: 1px solid var(--field-border); border-radius: 9px; color: var(--ink); background: var(--white); }
textarea::placeholder { color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; }
.attachment { display: grid; gap: 8px; padding: 15px; border: 1px dashed var(--field-border); border-radius: 10px; background: var(--page); }
.attachment > label { font-weight: 680; }
.attachment > input { width: 100%; }
input::file-selector-button { cursor: pointer; margin-right: 10px; padding: 7px 10px; color: var(--ink); background: var(--white); border: 1px solid var(--field-border); border-radius: 7px; font-size: .875rem; }
.file-list { display: grid; gap: 5px; list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; overflow-wrap: anywhere; font-size: .875rem; }
.file-remove { min-height: 33px; border: 0; background: transparent; color: var(--accent); padding-inline: 5px; text-decoration: underline; }
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--border); }
.controls-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.action { min-height: 44px; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--field-border); color: var(--ink); background: var(--white); font-weight: 680; }
.action:hover { background: var(--page); }
.primary { color: var(--white); background: var(--accent); border-color: var(--accent); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.action:disabled { opacity: .58; cursor: default; }
.text-action { background: transparent; border: 0; padding: 8px 0; color: var(--accent); text-decoration: underline; text-underline-offset: .15em; font-size: .9375rem; }
.status { color: var(--alert); font-weight: 640; margin-top: 15px; }
.notice { margin-top: 13px; }
.success { align-self: start; }
.success p { margin-top: 10px; color: var(--muted); }
.success button { margin-top: 20px; }
.no-script { margin-block: 12px; color: var(--alert); }

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { white-space: normal; }
}

@media (max-width: 440px) {
  .wrap { width: calc(100% - 28px); }
  .masthead { min-height: 60px; font-size: .9375rem; gap: 12px; }
  .domain { font-size: .8125rem; }
  .card { padding-inline: 15px; }
  .sidebar { padding: 13px; }
  .step { font-size: .875rem; }
  .controls-right { margin-left: 0; }
}
