:root { --ink:#17202a; --muted:#55606b; --brand:#0b3d5c; --brand-2:#0f6a8a; --accent:#e8a33d; --bg:#fff; --alt:#f3f6f8; --line:#d9e0e6; --err:#a3271f; --ok:#1f6e43; }
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
a { color: var(--brand-2); }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin: 28px 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.small { font-size: 0.9rem; }
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--brand); text-decoration: none; font-size: 1.1rem; }
.brand span { font-weight: 400; color: var(--muted); }
nav a { margin-left: 18px; text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.hero { padding: 48px 0 40px; background: linear-gradient(180deg, #f7fafc 0%, #fff 100%); }
.lead { font-size: 1.15rem; max-width: 760px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.btn { display: inline-block; padding: 12px 18px; min-height: 48px; border: 1.5px solid var(--brand); border-radius: 8px; color: var(--brand); text-decoration: none; font-weight: 600; background: #fff; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 14px 24px; }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: default; }
.block { padding: 40px 0; }
.block.alt { background: var(--alt); }
form { margin-top: 20px; }
.startbox { max-width: 640px; }
.field { margin-bottom: 18px; position: relative; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], select { width: 100%; padding: 12px; min-height: 48px; font-size: 1rem; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font-family: inherit; color: var(--ink); }
input:focus, select:focus, button:focus, a:focus { outline: 3px solid #bfe0ee; outline-offset: 1px; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 6px 0 0; }
.hits { list-style: none; margin: 0; padding: 4px 0; position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); max-height: 280px; overflow: auto; }
.hits button { width: 100%; text-align: left; padding: 10px 12px; min-height: 44px; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer; }
.hits button:hover, .hits button:focus { background: var(--alt); }
.consent label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.consent input { margin-top: 5px; width: 20px; height: 20px; flex: 0 0 auto; }
.error { color: var(--err); font-weight: 600; margin-top: 12px; }
.done { border: 1.5px solid var(--ok); border-radius: 10px; padding: 18px 20px; margin-top: 20px; background: #f2faf5; }
ul.plain { padding-left: 20px; }
ul.plain li { margin-bottom: 8px; }
footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 0.95rem; }

/* Guide */
.guide { padding: 28px 0 48px; }
.progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.progress .bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--brand-2); transition: width 0.3s; }
.progress .bar i.w0{width:0}.progress .bar i.w10{width:10%}.progress .bar i.w20{width:20%}.progress .bar i.w30{width:30%}.progress .bar i.w40{width:40%}.progress .bar i.w50{width:50%}.progress .bar i.w60{width:60%}.progress .bar i.w70{width:70%}.progress .bar i.w80{width:80%}.progress .bar i.w90{width:90%}
.question h1 { font-size: 1.6rem; }
.question .hint { font-size: 1rem; margin-bottom: 16px; }
.options { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.option img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.option .label { font-weight: 600; }
.option .desc { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.option[aria-pressed=true], .option.selected { border-color: var(--brand); background: #eef6fa; }
.numeric { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.numeric input { max-width: 220px; font-size: 1.3rem; }
.numeric .unit { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.actions .spacer { flex: 1; }
.media details { margin: 8px 0 16px; }
.media video { max-width: 100%; border-radius: 8px; }
.card { border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; background: #fff; }
.card.accent { border-color: var(--accent); background: #fff9ef; }
.result h1 { font-size: 1.8rem; }
table.calc { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
table.calc th, table.calc td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.calc .num { text-align: right; white-space: nowrap; }
table.calc .total td { font-weight: 700; }
ul.notes { color: var(--muted); font-size: 0.92rem; padding-left: 20px; }
ol.homework li { margin-bottom: 10px; }
dl.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
dl.answers dt { color: var(--muted); }
dl.answers dd { margin: 0; }
details.advanced { margin: 12px 0; }
details.advanced summary { cursor: pointer; font-weight: 600; }
.assumption { display: grid; grid-template-columns: 1fr 140px; gap: 8px 12px; align-items: center; margin: 8px 0; }
.assumption .src { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; }
.prefill dl { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px 12px; align-items: center; }
.prefill dd { margin: 0; }
.prefill .edit { justify-self: end; }
.fade { animation: fade 0.25s ease-in; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } .progress .bar i { transition: none; } }
@media (max-width: 640px) {
  html { font-size: 17px; }
  h1 { font-size: 1.55rem; }
  .row, dl.answers, .assumption { grid-template-columns: 1fr; }
  nav a { margin-left: 12px; font-size: 0.9rem; }
  .brand span { display: none; }
  .options { grid-template-columns: 1fr; }
}
