:root {
  /* Elegant Consultants brand: logo red + charcoal */
  --brand: #D6171A;
  --brand-dark: #A91114;
  --brand-tint: #FDF0F0;
  --brand-line: #F2C4C5;
  --ink: #2B2B2B;       /* text */
  --ink-2: #1F1F1F;
  --charcoal: #3A3A3A;  /* logo grey, used for dark panels */
  --paper: #F7F7F7;
  --white: #FFFFFF;
  --stamp: #D6171A;
  --slate: #616161;
  --line: #DEDEDE;
  --line-soft: #EFEFEF;
  --tint: #F3F3F3;
  --ok: #2F6B4F;
  --ok-bg: #EDF5F0;
  --warn: #8A5A12;
  --warn-bg: #FBF3E6;
  --warn-line: #E8D3B0;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
.wrap { width: 100%; max-width: 840px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* Header */
.topbar { background: var(--white); color: var(--ink); border-bottom: 3px solid var(--brand); }
.topbar-inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.brand img { height: 46px; width: auto; }
.brand-sub { color: var(--slate); font-size: .9rem; padding-left: 16px; border-left: 1px solid var(--line); }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 32px 0 28px; }
.steps li { counter-increment: s; font-size: .875rem; color: var(--slate); border-top: 3px solid var(--line); padding-top: 8px; }
.steps li::before { content: counter(s) " "; font-weight: 700; }
.steps li.active { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.steps li.done { color: var(--ok); border-color: var(--ok); }

/* Type */
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4.5vw, 2.5rem); line-height: 1.2; margin: 0 0 12px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 0 0 14px; }
.kicker { color: var(--slate); font-size: .9rem; margin: 0 0 6px; }
.lead { font-size: 1.04rem; color: var(--slate); max-width: 64ch; margin: 0 0 24px; }
.muted { color: var(--slate); }
.small { font-size: .85rem; }
.small-h { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0 0 12px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
label small, .field-group small { font-weight: 400; color: var(--slate); font-size: .82rem; }
.label { font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px;
}
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #E8787A; outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.half { max-width: 400px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: .95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.field-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.grid { display: grid; gap: 14px 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.grid.two .span3 { grid-column: span 2; }

/* Visa cards */
.visa-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.visa-card { position: relative; display: block; font-weight: 400; cursor: pointer; }
.visa-card input { position: absolute; opacity: 0; inset: 0; }
.visa-card span {
  display: flex; flex-direction: column; gap: 3px; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px;
}
.visa-card strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.visa-card b { font-size: .95rem; }
.visa-card small { color: var(--slate); font-size: .82rem; }
.visa-card input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--tint); }
.visa-card input:focus-visible + span { outline: 3px solid #E8787A; outline-offset: 2px; }

/* Segmented pill choices */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  font: 600 .88rem var(--sans); color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; cursor: pointer; min-height: 44px;
}
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.card > h2 { margin: 0; }
.card.inline, .inline { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.inline { display: flex; }
.grow { flex: 1; min-width: 200px; }
.card.tint { background: var(--tint); border-color: var(--brand-line); }
.card.strong { border: 2px solid var(--ink); margin-bottom: 20px; }
.divider-top { border-top: 1px solid var(--line-soft); padding-top: 12px; margin: 0; }

/* Upload list */
.upload-list { background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.upload-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.upload-row:last-child { border-bottom: 0; }
.upload-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upload-row small { color: var(--slate); font-size: .82rem; }
.upload-row small.added { color: var(--ok); }
.upload-row input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Buttons */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.btn { font: 600 .95rem var(--sans); border-radius: 6px; padding: 13px 22px; cursor: pointer; border: 1px solid transparent; min-height: 44px; }
.btn.small { padding: 9px 16px; font-size: .88rem; }
.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary:hover { background: var(--ink-2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--slate); }
.btn.dashed { background: transparent; color: var(--ink); border: 1px dashed var(--slate); }
.btn.stamp { background: transparent; color: var(--stamp); border: 2px solid var(--stamp); }
.btn.stamp:hover { background: var(--stamp); color: var(--white); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--slate); font: inherit; font-size: .88rem; text-decoration: underline; cursor: pointer; padding: 8px 0; }
.privacy { display: flex; align-items: center; gap: 6px; }
.privacy svg { width: 16px; height: 16px; fill: none; stroke: var(--slate); stroke-width: 2; }

/* Notices */
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; }
.notice.ok { background: var(--ok-bg); border-color: #BFDCCB; }
.notice b { display: block; margin-bottom: 6px; }
.notice ul { margin: 0; padding-left: 18px; color: var(--slate); font-size: .92rem; }

/* Travel plan */
.plan-head { display: flex; justify-content: space-between; align-items: baseline; }
.plan-head legend { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 0; }
.review-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review-items li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.tag { flex: none; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.warn { color: var(--warn); background: var(--warn-bg); }

/* Interview window: the one bold element */
.window {
  background: var(--ink); color: var(--white); border-radius: 10px; padding: 22px 28px 26px; margin-bottom: 18px;
  display: flex; flex-direction: column; gap: 18px;
}
.window-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge { font-size: .8rem; color: #D0D0D0; border: 1px solid #5C5C5C; border-radius: 999px; padding: 4px 12px; }
.level { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: #D0D0D0; }
.level-bars { display: flex; gap: 4px; }
.level-bars i { width: 22px; height: 6px; border-radius: 3px; background: #5C5C5C; transition: background .3s; }
.level-bars i.on { background: var(--white); }
.question { font-family: var(--serif); font-size: clamp(1.35rem, 3.6vw, 1.85rem); line-height: 1.4; margin: 0; max-width: 36ch; }
.question[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", var(--serif); direction: rtl; text-align: right; max-width: none; line-height: 2; }
.link-light { align-self: flex-start; background: none; border: 0; color: #D0D0D0; font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; padding: 6px 0; }

.answer-box { display: flex; gap: 12px; align-items: flex-start; }
.mic {
  flex: none; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--white); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.mic svg { width: 26px; height: 26px; fill: currentColor; }
.mic[aria-pressed="true"] { background: var(--stamp); border-color: var(--stamp); color: var(--white); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(163,59,75,.18); } }
.text-form { flex: 1; display: flex; gap: 10px; }
.text-form textarea { min-height: 60px; }
.rec-status { color: var(--stamp); min-height: 1.3em; margin: 8px 0 16px; }

.help { padding: 14px 18px; gap: 10px; margin-bottom: 20px; }
.help summary { font-weight: 600; cursor: pointer; }
.help p { margin: 4px 0 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: .88rem var(--sans); color: var(--ink); background: var(--tint); border: 1px solid var(--brand-line); border-radius: 999px; padding: 9px 14px; cursor: pointer; min-height: 40px; }
.chip:hover { border-color: var(--ink); }

.transcript { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 20px; }
.transcript ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.transcript li { font-size: .95rem; padding-left: 12px; border-left: 3px solid var(--line); }
.transcript li.officer { border-color: var(--ink); }
.transcript li .who { display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--slate); }
.transcript li .who .tag { font-size: .7rem; padding: 1px 8px; }
.transcript li [lang="ur"] { direction: rtl; display: block; }
.transcript:has(ol:empty) { display: none; }
.end-row { justify-content: flex-end; }

/* Report */
.report { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 28px 32px; margin: 16px 0 24px; }
.score { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
.score h2 { font-size: 1.5rem; margin: 0 0 4px; }
.score p { margin: 0; }
.ring { width: 120px; height: 120px; flex: none; border: 3px solid var(--ink); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring span { font-family: var(--serif); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.ring small { font-size: .8rem; color: var(--slate); }
#report h2 { margin: 30px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: 1.3rem; }
#report p, #report li { max-width: 72ch; }
#report table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
#report th, #report td { text-align: left; border-bottom: 1px solid var(--line-soft); padding: 8px 12px 8px 0; vertical-align: top; }
#report th { color: var(--slate); font-weight: 600; border-bottom-color: var(--line); }

/* Alert + loader */
.alert { background: #FBEFF1; color: var(--stamp); border-left: 4px solid var(--stamp); padding: 12px 14px; border-radius: 4px; margin-bottom: 20px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.loader { position: fixed; inset: 0; background: rgba(245,247,250,.8); display: grid; place-items: center; z-index: 10; }
.loader span { background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 6px; }

@media (max-width: 640px) {
  .visa-choices, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .span2, .span3, .grid.two .span3 { grid-column: auto; }
  .steps li { font-size: .75rem; }
  .text-form { flex-direction: column; }
  .window { padding: 18px; }
  .card { padding: 18px; }
  .report { padding: 18px; }
  .score { flex-direction: column; align-items: flex-start; }
  .upload-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .mic[aria-pressed="true"] { animation: none; }
  .level-bars i { transition: none; }
}

/* ---------- Account, auth, plans ---------- */
.account { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .85rem; color: #D0D0D0; }
.auth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; padding-top: 24px; }
.auth-intro .lead { margin-bottom: 16px; }
.ticks { margin: 0; padding-left: 18px; line-height: 1.9; }
.auth-card { padding: 26px; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs button { font: 600 .95rem var(--sans); color: var(--slate); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 0; cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.form.tight { gap: 14px; margin: 0; }
.form.tight .link { align-self: flex-start; }
.form.tight h2 { margin: 0; }
input[type=password] { width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; }
input[type=file] { font: inherit; font-weight: 400; font-size: .88rem; }

.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.plan-card { font: inherit; text-align: left; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.plan-card[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan-card .name { font-weight: 600; }
.plan-card .price { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; }
.plan-card .price small { font-family: var(--sans); font-size: .85rem; font-weight: 400; color: var(--slate); }
.plan-card .desc { color: var(--slate); font-size: .95rem; }

.pay { gap: 18px; margin-bottom: 32px; }
.bank { background: var(--ink); color: var(--white); border-radius: 8px; padding: 18px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.bank > div { display: flex; flex-direction: column; gap: 2px; }
.bank .wide { grid-column: span 2; }
.bank span { font-size: .75rem; color: #D0D0D0; }
.bank b { font-weight: 500; }
.iban-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.iban { font-size: 1.2rem; letter-spacing: 1px; font-weight: 600 !important; word-break: break-all; }
.btn.light { background: var(--white); color: var(--ink); }
.pay-steps { margin: 0; padding-left: 20px; line-height: 1.8; }

.narrow { max-width: 640px; }
.tag.big { display: inline-block; font-size: .82rem; padding: 4px 12px; margin-bottom: 12px; }
.tag.bad { color: var(--stamp); background: #FBEFF1; }
.summary { margin: 0 0 24px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px 22px; display: grid; grid-template-columns: 140px minmax(0, 1fr); }
.summary dt, .summary dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.summary dt { color: var(--slate); }
.summary dt:nth-last-of-type(1), .summary dd:last-of-type { border-bottom: 0; }
.usage { background: var(--tint); border-radius: 6px; padding: 10px 14px; font-size: .92rem; margin: -8px 0 24px; }

@media (max-width: 640px) {
  .auth { grid-template-columns: 1fr; gap: 24px; }
  .bank { grid-template-columns: 1fr; }
  .bank .wide { grid-column: auto; }
  .account #account-plan { display: none; }
}


/* ---------- Brand accents (red) ---------- */
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.btn.primary { background: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.dashed { border-color: var(--brand); color: var(--brand); }
.btn.light { color: var(--ink); }
.steps li.active { border-color: var(--brand); color: var(--ink); }
.visa-card input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-tint); }
.seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.plan-card[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tabs button[aria-selected="true"] { border-bottom-color: var(--brand); }
.card.tint, .usage { background: var(--brand-tint); }
.card.tint { border-color: var(--brand-line); }
.chip { background: var(--brand-tint); }
.chip:hover { border-color: var(--brand); }
.check input { accent-color: var(--brand); }
.card.strong { border-color: var(--charcoal); }
.ring { border-color: var(--brand); }
.ring span { color: var(--brand); }
#report h2 { border-bottom-color: var(--brand-line); }

/* Dark panels use the logo charcoal, with a red edge */
.window, .bank { background: var(--charcoal); border-top: 4px solid var(--brand); }
.transcript li.officer { border-color: var(--brand); }
.mic { border-color: var(--charcoal); color: var(--charcoal); }
.mic[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }

/* Header account area on the white bar */
.account { color: var(--slate); }
.topbar .link-light { color: var(--slate); }
.topbar .link-light:hover { color: var(--brand); }

@media (max-width: 640px) {
  .brand img { height: 36px; }
  .brand-sub { display: none; }
}

/* Space below the header on every screen */
main.wrap { padding-top: 32px; }
.steps { margin-top: 0; }

/* Download button icon */
.btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: 6px; }

/* Print fallback: only the report */
@media print {
  .topbar, .steps, .row, #alert, #report-meta + .muted, .screen:not(#s-report) { display: none !important; }
  body { background: #fff; }
  .report { border: 0; padding: 0; }
}
