:root {
  --primary: #7c3aed;
  --primary-dark: #4c1d95;
  --primary-soft: #f3e8ff;
  --accent: #ea580c;
  --background: #faf8ff;
  --surface: #ffffff;
  --text: #24153d;
  --muted: #5e526e;
  --border: #ddd6fe;
  --success: #087a55;
  --success-soft: #e7f8f1;
  --warning: #9a3412;
  --warning-soft: #fff7ed;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(76, 29, 149, .1);
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--font); line-height: 1.55; }
button, input, select { font: inherit; }
a { color: var(--primary-dark); }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--text); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(221,214,254,.8); backdrop-filter: blur(14px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: white; border-radius: 12px; background: var(--primary); transform: rotate(-3deg); }
.brand-mark svg { width: 24px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 8px; }
nav a { padding: 10px 14px; color: var(--muted); border-radius: 10px; font-size: .9rem; font-weight: 700; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--primary-dark); background: var(--primary-soft); }
.hero { overflow: hidden; background: radial-gradient(circle at 75% 20%, #a78bfa 0, transparent 24%), linear-gradient(120deg, #351060, #5b21b6 65%, #6d28d9); color: white; }
.compact-hero { padding: 68px 0 76px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: 56px; }
.eyebrow, .number-label { margin: 0 0 8px; color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow, .page-heading .eyebrow { color: #ddd6fe; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(2.15rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
.lead { max-width: 660px; margin-bottom: 0; color: #ede9fe; font-size: 1.08rem; }
.hero-stamp { justify-self: end; display: grid; place-items: center; width: 190px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.28); border-radius: 42% 58% 55% 45%; background: rgba(255,255,255,.1); transform: rotate(8deg); }
.hero-stamp svg { width: 92px; stroke-width: 1.3; }
.content-stack { display: grid; gap: 28px; padding-block: 32px 72px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 720px; margin: 0 auto; padding: 0; color: #766b84; list-style: none; counter-reset: step; }
.steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; font-weight: 700; }
.steps li:not(:last-child)::after { position: absolute; left: calc(50% + 54px); right: calc(-50% + 54px); top: 14px; height: 2px; background: var(--border); content: ''; }
.steps span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 50%; background: var(--surface); }
.steps .is-active { color: var(--primary-dark); }
.steps .is-active span { border-color: var(--primary); }
.steps .is-done span { color: white; border-color: var(--success); background: var(--success); }
.rules-panel, .card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.rules-panel { box-shadow: none; }
.section-heading { max-width: 680px; margin-bottom: 24px; }
.section-heading h2, .form-intro h2, .status-search h2 { margin-bottom: 6px; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.03em; }
.section-heading p { color: var(--muted); }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule-grid article { padding: 22px; border-radius: 14px; background: #faf8ff; }
.rule-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; color: var(--primary); border-radius: 12px; background: var(--primary-soft); }
.rule-icon svg { width: 23px; }
.rule-grid h3 { margin-bottom: 6px; font-size: 1rem; }
.rule-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.upload-card { max-width: 860px; width: 100%; margin-inline: auto; }
.compact-field { max-width: 420px; }
.drop-zone { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin: 22px 0; padding: 28px; text-align: center; border: 2px dashed #b8a6e8; border-radius: 16px; background: #fbfaff; cursor: pointer; transition: border-color .18s, background .18s; }
.drop-zone:hover, .drop-zone:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone span:last-child { color: var(--muted); font-size: .88rem; }
.upload-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 8px; color: var(--primary); border-radius: 50%; background: var(--primary-soft); }
.upload-icon svg { width: 28px; }
.preview { overflow: hidden; max-height: 320px; margin-bottom: 20px; border-radius: 14px; background: #eee; }
.preview img { display: block; width: 100%; height: 320px; object-fit: contain; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, opacity .15s; }
.button svg { width: 20px; }
.button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.button-primary { color: white; background: var(--primary); box-shadow: 0 8px 20px rgba(124,58,237,.22); }
.button-primary:hover { background: #6d28d9; }
.button-secondary { color: var(--primary-dark); border-color: var(--border); background: white; }
.button:disabled { opacity: .65; cursor: wait; }
.button-wide { width: 100%; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; color: var(--muted); font-size: .8rem; }
.privacy-note svg { width: 16px; }
.page-heading { padding: 48px 0; color: white; background: linear-gradient(120deg, #351060, #5b21b6); }
.page-heading h1 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.4rem); }
.page-heading p:last-child { max-width: 680px; margin-bottom: 0; color: #ede9fe; }
.alert { display: flex; gap: 14px; padding: 20px; border: 1px solid; border-radius: 14px; }
.alert > svg { flex: 0 0 25px; width: 25px; margin-top: 2px; }
.alert h2 { margin-bottom: 4px; font-size: 1.05rem; }
.alert p, .alert ul { margin: 0; }
.alert-warning { color: #7c2d12; border-color: #fed7aa; background: var(--warning-soft); }
.alert-warning a { color: #7c2d12; }
.verification-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px; }
.form-intro, .tracking-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.editable-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; color: var(--primary-dark); border-radius: 8px; background: var(--primary-soft); font-size: .76rem; font-weight: 800; }
.editable-badge svg { width: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { min-width: 0; }
.full-field { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; font-size: .87rem; font-weight: 800; }
.field label span, .field small { color: var(--muted); font-weight: 500; }
.field small { display: block; margin-top: 5px; font-size: .76rem; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--text); border: 1px solid #c9c1d5; border-radius: 10px; background: white; }
.field input:hover, .field select:hover { border-color: #8b7ba1; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.money-field { position: relative; }
.money-field .input-prefix { position: absolute; left: 13px; bottom: 12px; color: var(--muted); }
.money-field input { padding-left: 30px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #eee9f5; }
.evidence-card { position: sticky; top: 96px; padding: 26px; color: white; border-radius: var(--radius); background: #25123f; box-shadow: var(--shadow); }
.evidence-card h2 { margin-bottom: 20px; }
.evidence-card .eyebrow { color: #c4b5fd; }
.check-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.07); }
.check-list li > span { flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 900; }
.check-list .pass > span { color: #042f24; background: #6ee7b7; }
.check-list .fail > span { color: #450a0a; background: #fca5a5; }
.check-list .neutral > span { color: #1e1b4b; background: #c4b5fd; }
.check-list strong, .check-list small { display: block; }
.check-list small { margin-top: 2px; color: #d8d0e2; }
.evidence-note { margin: 18px 0 0; color: #d8d0e2; font-size: .8rem; }
.result-page { min-height: calc(100vh - 160px); display: grid; align-content: center; gap: 30px; padding-block: 48px 72px; }
.success-card, .error-card { max-width: 700px; width: 100%; margin-inline: auto; text-align: center; }
.success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; color: var(--success); border-radius: 50%; background: var(--success-soft); }
.success-icon svg { width: 38px; }
.success-card h1, .error-card h1 { margin-inline: auto; font-size: clamp(2rem, 5vw, 3rem); }
.success-card > p:not(.eyebrow) { color: var(--muted); }
.folio-box { margin: 28px 0 20px; padding: 22px; border: 1px dashed var(--primary); border-radius: 14px; background: var(--primary-soft); }
.folio-box span, .folio-box strong { display: block; }
.folio-box span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.folio-box strong { margin-top: 6px; color: var(--primary-dark); font-family: ui-monospace, monospace; font-size: clamp(1.35rem, 4vw, 2rem); letter-spacing: .04em; }
.result-details, .tracking-data { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; text-align: left; }
.result-details div, .tracking-data div { padding: 14px; border-bottom: 1px solid #eee9f5; }
dt { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
dd { margin: 4px 0 0; font-weight: 700; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.status-pending { color: #854d0e; background: #fef9c3; }
.status-approved { color: #065f46; background: #d1fae5; }
.status-rejected { color: #991b1b; background: #fee2e2; }
.centered-actions { justify-content: center; }
.status-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; gap: 24px; min-height: 470px; padding-block: 40px 72px; }
.status-search form { display: grid; gap: 18px; margin-top: 22px; }
.status-result { min-height: 100%; }
.empty-state { min-height: 390px; display: grid; place-items: center; align-content: center; padding: 32px; text-align: center; border: 1px dashed #b8a6e8; border-radius: var(--radius); }
.empty-state svg { width: 52px; color: #9b87be; }
.empty-state h2 { margin: 16px 0 6px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); }
.tracking-card { min-height: 300px; }
.tracking-header h2 { margin: 0; font-family: ui-monospace, monospace; font-size: 1.5rem; }
.error-code { display: block; color: var(--primary); font-size: 4.5rem; font-weight: 900; line-height: 1; }
.site-footer { padding: 24px 0; color: #d8d0e2; background: #25123f; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; font-size: .78rem; }

@media (max-width: 800px) {
  .hero-grid, .verification-grid, .status-layout { grid-template-columns: 1fr; }
  .hero-stamp { display: none; }
  .rule-grid { grid-template-columns: 1fr; }
  .evidence-card { position: static; grid-row: 1; }
  .status-layout { min-height: auto; }
  .empty-state { min-height: 260px; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1120px); }
  .header-inner { min-height: 64px; }
  .brand small { display: none; }
  nav a { padding: 9px; font-size: .76rem; }
  .compact-hero { padding: 48px 0 54px; }
  h1 { font-size: 2.35rem; }
  .rules-panel, .card { padding: 22px; }
  .steps li { gap: 5px; font-size: .68rem; }
  .steps li:not(:last-child)::after { left: calc(50% + 39px); right: calc(-50% + 39px); }
  .form-grid, .result-details, .tracking-data { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .form-actions, .footer-inner { flex-direction: column; }
  .form-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
