:root {
  --bg-canvas: #F5F7FA;
  --bg-card: #FFFFFF;
  --border: #E9EDF3;
  --primary: #2264E5;
  --primary-soft: #EDF3FE;
  --cta: #FFC400;
  --cta-dark: #E5AF00;
  --text-primary: #172B4D;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --positive: #1F9D55;
  --positive-soft: #E8F7EE;
  --negative: #E5484D;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }

a { color: var(--primary); }

/* top bar */
.topbar { background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; }
.brand-text { line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 800; display: block; }
.brand-text span { font-size: 11px; color: var(--text-secondary); }
.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn { border: 0; background: transparent; padding: 6px 12px; font: 600 12px 'Inter', sans-serif; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.lang-btn.active { background: var(--primary); color: #fff; }

/* cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card); padding: 20px; margin-top: 16px; }

/* hero */
.hero { text-align: left; }
.hero-badge { display: inline-block; background: var(--positive-soft); color: var(--positive); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.hero h1 { font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; text-wrap: balance; }
.hero-sub { color: var(--text-secondary); font-size: 14px; }

.progress-block { margin-top: 16px; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.progress-label { font-size: 13px; font-weight: 700; }
.progress-pct { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.progress-bar { height: 10px; background: var(--primary-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width .4s ease; }

.video-details { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.video-details summary { font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; list-style: none; }
.video-details summary::-webkit-details-marker { display: none; }
.video-frame { margin-top: 10px; position: relative; padding-top: 56.25%; border-radius: 8px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* identity */
.identity h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.fields-grid input { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: 400 15px 'Inter', sans-serif; color: var(--text-primary); width: 100%; }
.fields-grid input:focus { outline: 2px solid rgba(34, 100, 229, .4); border-color: var(--primary); }
.identity-known { display: flex; align-items: center; gap: 10px; font-size: 14px; }
[hidden] { display: none !important; }
.check-dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--positive); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* doc cards */
.doc-card { position: relative; }
.doc-card.done { border-color: #CBEBD6; background: #FBFEFC; }
.doc-head { display: flex; align-items: flex-start; gap: 12px; }
.doc-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.doc-card.done .doc-num, .doc-card.has-files .doc-num { background: var(--positive); color: #fff; }
.doc-title { font-size: 18px; font-weight: 700; }
.doc-why { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.doc-where { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.doc-done-note { font-size: 13px; color: var(--positive); font-weight: 600; margin-top: 8px; }

.drop-zone { margin-top: 12px; border: 2px dashed var(--primary); border-radius: 12px; background: #F7FAFF; padding: 22px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .05s; }
.drop-zone:hover, .drop-zone.drag { background: var(--primary-soft); }
.drop-zone:active { transform: scale(.995); }
.drop-zone .dz-main { display: inline-block; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--primary); padding: 11px 22px; border-radius: 8px; }
.drop-zone .dz-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 72px; }
.thumb .t-img { width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.thumb .t-name { font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin-top: 2px; }
.thumb .t-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-primary); color: #fff; border: 0; font-size: 11px; cursor: pointer; line-height: 1; }

.mistakes { margin-top: 12px; }
.mistakes summary { font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; list-style: none; }
.mistakes summary::before { content: '+ '; }
.mistakes[open] summary::before { content: '\2212  '; }
.mistakes summary::-webkit-details-marker { display: none; }
.mistakes ul { margin: 8px 0 0 4px; padding-left: 16px; font-size: 12.5px; color: var(--text-secondary); }
.mistakes li { margin-bottom: 4px; }
.mistakes li strong { color: var(--text-primary); }

/* submit */
.submit-card { text-align: center; }
.terms-row { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 14.5px; color: var(--text-primary); margin-bottom: 14px; cursor: pointer; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #FAFBFD; }
.terms-row:hover { background: var(--primary-soft); }
.terms-row input { flex: 0 0 auto; width: 24px; height: 24px; accent-color: var(--primary); cursor: pointer; }
.btn-primary { width: 100%; border: 0; border-radius: 10px; background: var(--cta); color: var(--text-primary); font: 800 16px 'Inter', sans-serif; padding: 15px 20px; cursor: pointer; box-shadow: 0 2px 0 var(--cta-dark); transition: transform .05s; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .7; cursor: wait; }
.trust-line { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }
.submit-hint { font-size: 13.5px; font-weight: 600; color: var(--negative); margin-top: 10px; min-height: 1em; }
.upload-progress { margin-top: 14px; }
.upload-status { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* success */
.success-card { text-align: center; border-color: #CBEBD6; }
.success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--positive); color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 4px auto 12px; }
.success-card h2 { font-size: 20px; font-weight: 800; }
.success-card p { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }
.missing-list { font-weight: 600; color: var(--text-primary) !important; }
.next-steps { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 14px !important; }

/* alt channels */
.alt-channels { text-align: center; }
.alt-line { font-size: 13.5px; color: var(--text-secondary); margin: 0; }
.alt-line a { text-decoration: none; }

/* footer */
.site-footer { margin-top: 28px; padding: 20px 0 32px; border-top: 1px solid var(--border); background: var(--bg-card); }
.site-footer p { font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; }

@media (min-width: 560px) {
  .hero h1 { font-size: 28px; }
}
@media (max-width: 420px) {
  .fields-grid { grid-template-columns: 1fr; }
}

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(23,43,77,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; max-width: 640px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(16,24,40,.2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-x { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 4px; }
.modal-body { padding: 16px 20px 24px; overflow-y: auto; font-size: 13.5px; color: var(--text-secondary); }
.modal-body h4 { font-size: 13.5px; font-weight: 700; color: var(--text-primary); margin: 14px 0 4px; }
.modal-body p { margin: 6px 0; }
.nudge-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.btn-ghost { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 12px 16px; font: 600 14px 'Inter', sans-serif; color: var(--text-secondary); cursor: pointer; }
.btn-ghost:hover { background: var(--bg-canvas); }
