:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #182230;
  --muted: #687385;
  --line: #e4e8ee;
  --accent: #00aaff;
  --accent-dark: #0089d4;
  --green: #16a56a;
  --shadow: 0 18px 60px rgba(28, 42, 58, .10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(0,170,255,.12), transparent 32rem),
    var(--bg);
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 34px auto; }
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.eyebrow { color: var(--accent-dark); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 10px 0 9px; font-size: clamp(30px, 4vw, 49px); line-height: 1.06; letter-spacing: -.035em; }
.hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: white;
  border-radius: 26px;
  background: linear-gradient(145deg, #00c6ff, #0077ff 62%, #7f52ff);
  box-shadow: 0 18px 35px rgba(0, 126, 255, .28);
  font-size: 30px;
  font-weight: 900;
  transform: rotate(4deg);
}

.workspace { display: grid; grid-template-columns: 250px 1fr; gap: 18px; }
.steps, .panel, .tip { border: 1px solid rgba(224, 229, 236, .85); background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.steps { padding: 14px; border-radius: 24px; align-self: start; }
.step {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 13px;
  text-align: left;
  color: var(--muted);
  border: 0;
  border-radius: 15px;
  background: transparent;
}
.step + .step { margin-top: 5px; }
.step span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #edf1f5; font-weight: 850; }
.step b { color: var(--text); font-size: 14px; }
.step small { margin-top: 2px; font-size: 12px; }
.step.active { background: #eaf7ff; }
.step.active span { color: white; background: var(--accent); }
.step.done span { color: white; background: var(--green); }

.panel { min-height: 590px; padding: 28px; border-radius: 24px; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.step-label { margin: 0 0 5px; color: var(--accent-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.reset { padding: 8px 12px; border: 0; color: var(--muted); background: #f2f4f7; border-radius: 10px; }
.step-content { flex: 1; padding: 24px 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  transition: .16s ease;
}
.choice-card:hover { transform: translateY(-2px); border-color: #a9dcf8; box-shadow: 0 10px 25px rgba(28, 42, 58, .08); }
.choice-card.selected { border: 2px solid var(--accent); background: #f4fbff; }
.choice-icon { display: grid; place-items: center; width: 52px; height: 52px; font-size: 27px; border-radius: 15px; background: #f1f4f8; }
.choice-card strong { display: block; margin-bottom: 4px; font-size: 16px; }
.choice-card small { color: var(--muted); line-height: 1.35; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 800; }
.field select, .field input {
  width: 100%; height: 48px; padding: 0 13px;
  border: 1px solid #dbe1e8; border-radius: 12px; outline: none; background: white;
}
.field select:focus, .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,170,255,.12); }
.field .hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

.desktop-intro { padding: 22px; border: 1px solid #bfe7fb; border-radius: 17px; background: #f2fbff; }
.desktop-intro strong { font-size: 18px; }
.desktop-intro p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.desktop-filters { display: grid; gap: 12px; }
.desktop-filter { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.desktop-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; cursor: pointer; font-weight: 850; }
.desktop-filter summary small { color: var(--accent-dark); font-size: 12px; white-space: nowrap; }
.desktop-filter[open] summary { border-bottom: 1px solid var(--line); background: #fbfcfd; }
.filter-search { padding: 14px 14px 10px; }
.filter-search input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #dbe1e8; border-radius: 11px; outline: none; }
.filter-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,170,255,.12); }
.filter-search span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 310px; overflow: auto; padding: 4px 14px 12px; gap: 2px 12px; }
.filter-option { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.filter-option:hover { background: #f1f8fc; }
.filter-option input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--accent); }
.filter-option span { overflow-wrap: anywhere; }
.filter-empty { padding: 12px 0; color: var(--muted); }
.show-more { margin: 0 14px 14px; padding: 9px 13px; color: var(--accent-dark); border: 0; border-radius: 10px; background: #eaf7ff; font-weight: 800; }
.desktop-words { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

.navigation { display: flex; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.btn { min-width: 132px; height: 48px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 800; }
.btn.primary { color: white; background: var(--accent); box-shadow: 0 10px 24px rgba(0,170,255,.24); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.secondary { color: var(--text); background: #edf1f5; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.result { display: grid; gap: 15px; }
.result-status { display: flex; align-items: center; gap: 12px; color: var(--green); font-weight: 850; }
.result-status span { display: grid; place-items: center; width: 38px; height: 38px; color: white; border-radius: 50%; background: var(--green); }
.summary { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fafbfc; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.summary-row + .summary-row { border-top: 1px solid var(--line); }
.summary-row span { color: var(--muted); }
.query-box { padding: 14px; border-radius: 13px; color: #20536e; background: #eaf7ff; font-weight: 750; word-break: break-word; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-actions a { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.copy-note { min-height: 22px; color: var(--green); font-size: 13px; }
.tip { margin-top: 18px; padding: 18px 22px; color: #485568; border-radius: 18px; line-height: 1.55; }
.tip strong { color: var(--text); }

@media (max-width: 820px) {
  .hero-badge { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; }
  .step { display: flex; align-items: center; justify-content: center; padding: 8px; }
  .step span { width: 34px; height: 34px; }
  .step b, .step small { display: none; }
  .panel { min-height: 620px; padding: 20px; }
}
@media (max-width: 580px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    margin: max(12px, env(safe-area-inset-top)) auto max(18px, env(safe-area-inset-bottom));
  }
  h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .card-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .panel { padding: 16px; }
  .summary-row { display: grid; gap: 3px; }
  .navigation { position: sticky; bottom: 0; padding-bottom: max(0px, env(safe-area-inset-bottom)); background: var(--card); }
  .btn { flex: 1; min-width: 0; }
  .choice-card { min-height: 82px; }
  .filter-options { grid-template-columns: 1fr; max-height: 340px; }
  .desktop-filter summary { align-items: flex-start; }
}
