:root{
  --bg:#f4f7fb;
  --bg-soft:#eef3f9;
  --surface:#ffffff;
  --surface-2:#f8fbff;
  --surface-3:#f1f5f9;
  --border:#dbe5f0;
  --border-strong:#cdd8e5;
  --text:#0f172a;
  --muted:#64748b;
  --muted-2:#475569;
  --primary:#163a6b;
  --primary-2:#24528f;
  --primary-3:#2f6db5;
  --primary-soft:#eaf2fb;
  --success:#15803d;
  --warning:#b45309;
  --danger:#dc2626;
  --shadow-xl:0 28px 70px rgba(15,23,42,.10);
  --shadow-lg:0 18px 40px rgba(15,23,42,.08);
  --shadow-md:0 10px 24px rgba(15,23,42,.05);
  --radius-xl:30px;
  --radius-lg:22px;
  --radius-md:18px;
  --radius-sm:14px;
  --maxw:1100px;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(255,255,255,0) 34%),
    linear-gradient(180deg, #f7fafe 0%, #eff4fa 52%, #f4f7fb 100%);
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  display:block;
  max-width:100%;
}

button,
input,
select,
textarea{
  font:inherit;
}

.hidden{
  display:none !important;
}

/* PAGE LAYOUT */
.page-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* TOP BAR */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(12px);
  background:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(219,229,240,.85);
}

.topbar-inner{
  width:min(var(--maxw), calc(100% - 32px));
  margin:0 auto;
  min-height:96px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand-link{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
}

.topbar-logo{
  width:150px;
  height:auto;
  max-height:60px;
  object-fit:contain;
  flex:0 0 auto;
}

.brand-copy{
  min-width:0;
}

.brand-name{
  font-size:15px;
  font-weight:800;
  letter-spacing:.18em;
  color:var(--primary);
}

.brand-tag{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar-chip{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.78);
  color:var(--muted-2);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
}

/* MAIN */
.main-wrap{
  flex:1 1 auto;
  padding:40px 16px 48px;
}

.app-shell{
  width:100%;
  display:flex;
  justify-content:center;
}

.app-card{
  width:min(980px, 100%);
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.9);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-xl);
  overflow:hidden;
  backdrop-filter:blur(10px);
}

/* HERO */
.hero{
  position:relative;
  overflow:hidden;
  border-bottom:1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,254,.96)),
    linear-gradient(135deg, rgba(36,82,143,.04), rgba(22,58,107,.02));
}

.hero::before{
  content:"";
  position:absolute;
  inset:auto -120px -120px auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(36,82,143,.09), rgba(36,82,143,0) 70%);
  pointer-events:none;
}

.hero::after{
  content:"";
  position:absolute;
  inset:-120px auto auto -100px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(15,23,42,.035), rgba(15,23,42,0) 72%);
  pointer-events:none;
}

.hero-frame{
  position:relative;
  z-index:1;
  padding:34px 34px 28px;
}

.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid #d8e4f3;
  background:rgba(255,255,255,.78);
  color:var(--primary-2);
  font-size:11px;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
  margin-bottom:16px;
}

.hero-meta{
  max-width:760px;
}

.hero-title{
  margin:0;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.08;
  letter-spacing:-.02em;
  font-weight:800;
  color:#0b1728;
}

.hero-desc{
  margin:14px 0 0;
  max-width:720px;
  font-size:15px;
  line-height:1.8;
  color:var(--muted);
}

/* STATUS BAR */
.status-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 34px;
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--border);
  flex-wrap:wrap;
}

.status-left,
.status-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:var(--surface-3);
  border:1px solid var(--border);
  color:var(--text);
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
}

.status-chip.muted{
  color:var(--muted);
}

.status-chip.error{
  color:#991b1b;
  background:#fff1f2;
  border-color:#fecdd3;
}

.progress-percent{
  font-size:13px;
  font-weight:800;
  color:var(--primary);
}

/* PROGRESS */
.progress-wrap{
  padding:18px 34px 16px;
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--border);
}

.progress-track{
  width:100%;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(180deg, #ebf1f8, #e3ebf5);
  box-shadow:inset 0 1px 2px rgba(15,23,42,.05);
}

.progress-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--primary-3), var(--primary));
  transition:width .28s ease;
  box-shadow:0 8px 18px rgba(36,82,143,.20);
}

.progress-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

/* SCREEN */
.screen-area{
  padding:34px;
  background:transparent;
}

/* PANELS */
.panel{
  background:rgba(255,255,255,.96);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:26px;
  box-shadow:var(--shadow-md);
}

.panel + .panel{
  margin-top:16px;
}

.kicker{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary-2);
  border:1px solid #d7e6f8;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:14px;
}

.title{
  margin:0 0 10px;
  font-size:clamp(24px, 2.6vw, 32px);
  line-height:1.18;
  letter-spacing:-.02em;
  font-weight:800;
  color:#0f172a;
}

.desc{
  margin:0 0 18px;
  font-size:14px;
  line-height:1.8;
  color:var(--muted);
}

.note-box{
  padding:16px 18px;
  border-radius:18px;
  background:linear-gradient(180deg, #fbfdff, #f6f9fc);
  border:1px solid var(--border);
  color:#334155;
  font-size:13px;
  line-height:1.7;
}

/* FORMS */
.field{
  margin-bottom:14px;
}

.field > label:not(.check-row){
  display:block;
  margin-bottom:8px;
  font-size:13px;
  font-weight:700;
  color:#334155;
}

.field .hint{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}

input,
select,
textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  color:var(--text);
  padding:13px 15px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input::placeholder,
textarea::placeholder{
  color:#94a3b8;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#97b7dc;
  box-shadow:0 0 0 5px rgba(36,82,143,.08);
}

textarea{
  min-height:120px;
  resize:vertical;
}

.grid2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
}

.colspan2{
  grid-column:1 / -1;
}

/* OPTIONS */
.option-list{
  display:grid;
  gap:12px;
  margin-top:14px;
}

.option-btn{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(180deg, #ffffff, #fbfdff);
  padding:16px 17px;
  cursor:pointer;
  transition:all .18s ease;
  box-shadow:0 4px 10px rgba(15,23,42,.02);
}

.option-btn:hover{
  border-color:#bfd0e4;
  background:linear-gradient(180deg, #ffffff, #f6faff);
  transform:translateY(-1px);
  box-shadow:0 10px 18px rgba(15,23,42,.05);
}

.option-btn.selected{
  border-color:#9ab9db;
  background:linear-gradient(180deg, #fafdff, #f2f7fc);
  box-shadow:0 0 0 4px rgba(36,82,143,.06);
}

.option-title{
  font-size:15px;
  font-weight:700;
  color:var(--text);
}

.option-meta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

/* ACTIONS */
.actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:24px;
  flex-wrap:wrap;
}

.actions-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  min-height:46px;
  padding:0 18px;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
  transition:all .18s ease;
  box-shadow:0 4px 10px rgba(15,23,42,.02);
}

.btn:hover{
  background:#f9fbfd;
  border-color:var(--border-strong);
}

.btn-primary{
  border-color:transparent;
  background:linear-gradient(180deg, var(--primary-2), var(--primary));
  color:#fff;
  box-shadow:0 12px 24px rgba(22,58,107,.18);
}

.btn-primary:hover{
  filter:brightness(1.03);
  transform:translateY(-1px);
}

.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}

.small{
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}

/* CHECK ROW */
.check-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  margin-bottom:0;
}

.check-row input[type="checkbox"]{
  width:18px;
  height:18px;
  min-width:18px;
  max-width:18px;
  margin-top:2px;
  padding:0;
  flex:0 0 18px;
}

.check-row .text{
  flex:1 1 auto;
  min-width:0;
  font-size:13px;
  line-height:1.7;
  color:#334155;
}

/* LINKS */
.links-row{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

.links-row a{
  color:var(--primary-2);
  text-decoration:none;
  font-weight:600;
}

.links-row a:hover{
  text-decoration:underline;
}

/* ALERTS */
.alert{
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  font-size:13px;
  line-height:1.6;
}

.alert.info{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}

.alert.success{
  background:#f0fdf4;
  color:#166534;
  border:1px solid #bbf7d0;
}

.alert.error{
  background:#fef2f2;
  color:#991b1b;
  border:1px solid #fecaca;
}

/* RESULTS */
.result-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.result-score{
  font-size:38px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.03em;
}

.result-badge{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
}

.result-badge.good{
  background:rgba(21,128,61,.10);
  color:#166534;
}

.result-badge.mid{
  background:rgba(217,119,6,.10);
  color:#92400e;
}

.result-badge.bad{
  background:rgba(220,38,38,.10);
  color:#991b1b;
}

.result-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
  margin-top:18px;
}

.metric{
  border:1px solid var(--border);
  background:linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius:18px;
  padding:15px;
}

.metric-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.metric-value{
  font-size:15px;
  font-weight:800;
  color:var(--text);
  word-break:break-word;
}

.summary-box{
  margin-top:18px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, #fbfdff, #f6f9fc);
  border-radius:20px;
  padding:17px;
}

.summary-title{
  font-size:16px;
  font-weight:800;
  margin-bottom:8px;
}

.summary-text{
  font-size:14px;
  line-height:1.8;
  color:#334155;
}

/* FOOTER */
.footer{
  border-top:1px solid rgba(219,229,240,.9);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
}

.footer-inner{
  width:min(var(--maxw), calc(100% - 32px));
  margin:0 auto;
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.footer-left,
.footer-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.footer-brand{
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--primary);
  text-transform:uppercase;
}

.footer-sep{
  color:#94a3b8;
}

.footer-text,
.footer-muted{
  font-size:12px;
  color:var(--muted);
}

/* RESPONSIVE */
@media (max-width: 760px){
  .topbar-inner,
  .footer-inner{
    width:min(var(--maxw), calc(100% - 24px));
  }

  .main-wrap{
    padding:20px 12px 28px;
  }

  .hero-frame,
  .status-bar,
  .progress-wrap,
  .screen-area{
    padding-left:18px;
    padding-right:18px;
  }

  .hero-frame{
    padding-top:24px;
    padding-bottom:22px;
  }

  .grid2,
  .result-grid{
    grid-template-columns:1fr;
  }

  .title{
    font-size:24px;
  }

  .hero-title{
    font-size:28px;
  }

  .actions{
    flex-direction:column;
    align-items:stretch;
  }

  .actions-right{
    width:100%;
  }

  .actions-right .btn,
  .actions > .btn,
  .btn{
    width:100%;
  }

  .topbar-chip{
    display:none;
  }

  .brand-tag{
    white-space:normal;
  }

  .footer-inner{
    padding:10px 0;
  }
}

@media (max-width: 480px){
  .topbar-inner{
    min-height:82px;
  }

  .topbar-logo{
    width:92px;
    height:auto;
    max-height:44px;
    flex-basis:auto;
  }

  .brand-name{
    font-size:13px;
  }

  .brand-tag{
    font-size:11px;
  }

  .app-card{
    border-radius:24px;
  }

  .panel{
    padding:20px;
    border-radius:20px;
  }

  .hero-title{
    font-size:25px;
    line-height:1.12;
  }

  .hero-desc{
    font-size:14px;
  }

  .result-score{
    font-size:32px;
  }
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.lang-switch{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px;
  border:1px solid rgba(15, 23, 42, 0.08);
  border-radius:999px;
  background:#fff;
}

.lang-btn{
  border:none;
  background:transparent;
  color:#334155;
  font-size:13px;
  font-weight:700;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  transition:all .2s ease;
}

.lang-btn:hover{
  background:rgba(15, 23, 42, 0.06);
}

.lang-btn.active{
  background:#0f172a;
  color:#fff;
}
