:root {
  --red: #c8102e;
  --red-dark: #9e0c24;
  --gold: #f2b705;
  --ink: #1d1d1f;
  --muted: #6b6b73;
  --bg: #faf7f2;
  --card: #ffffff;
  --line: #e7e2d9;
  --ok: #1f8a4c;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: inherit; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--red); color: #fff; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark { background: var(--gold); color: var(--red-dark); border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; }
nav { margin-left: auto; display: flex; gap: 4px; }
nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; opacity: .9; }
nav a:hover { background: rgba(255,255,255,.12); }
nav a.active { background: rgba(255,255,255,.2); opacity: 1; font-weight: 600; }
.nav-cta { background: var(--gold); color: var(--ink); font-weight: 600; opacity: 1 !important; }
nav a.nav-cta:hover, nav a.nav-cta.active { background: var(--gold); filter: brightness(.95); }
.nav-btn { font: inherit; background: none; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.nav-btn:hover { background: rgba(255,255,255,.12); }
[hidden] { display: none !important; }

.auth { max-width: 420px; margin: 32px auto; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth-tabs { display: flex; gap: 4px; background: #f3efe8; border-radius: 10px; padding: 4px; margin-bottom: 8px; }
.auth-tabs button { flex: 1; font: inherit; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.auth-tabs button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.error { color: #b00020; font-size: .9rem; margin: 0; min-height: 1.2em; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
.view { display: none; }
.view.active { display: block; }
h2 { margin-top: 8px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; }
.lead { font-size: 1.1rem; }

.hero { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; border-radius: var(--radius); padding: 48px 32px; margin-bottom: 24px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.hero p { max-width: 640px; opacity: .95; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.cards .card { margin-bottom: 0; }
.card h3 { margin-top: 0; }
.link-card { text-decoration: none; transition: transform .15s, box-shadow .15s; }
.link-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }

.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--red); background: #fff; color: var(--red); font-weight: 600; cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.danger { color: #a00; border-color: #e3b5b5; }
.btn:hover { filter: brightness(.97); }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress div { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.progress.wide { flex: 1; margin: 0; }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.profile-grid .card { margin-bottom: 0; }
.photo-box, .video-box { background: #f3efe8; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); margin-bottom: 12px; overflow: hidden; }
.photo-box { width: 200px; height: 200px; border-radius: 50%; margin-inline: auto; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.video-box { aspect-ratio: 16/9; }
.video-box video { width: 100%; height: 100%; background: #000; }
#bioForm { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 500; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.form-actions { margin-top: 8px; min-height: 20px; }
.saved { color: var(--ok); font-size: .85rem; }

.notice { background: #fff7e0; border: 1px solid #f2dc9b; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.visa-summary { display: flex; align-items: center; gap: 16px; }
.visa-list { display: grid; gap: 12px; }
.visa-item { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.visa-item.done { border-left-color: var(--ok); }
.visa-head { display: flex; align-items: flex-start; gap: 12px; }
.visa-head input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ok); }
.visa-head h4 { margin: 0; }
.visa-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: #fde8eb; color: var(--red-dark); margin-left: 6px; vertical-align: middle; font-weight: 600; }
.tag.alt { background: #eef2ff; color: #3949ab; }
.visa-files { margin: 12px 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: #f3efe8; border-radius: 8px; padding: 4px 10px; font-size: .85rem; }
.file-chip button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0 2px; }
.file-chip .open { color: var(--ink); text-decoration: underline; }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters input { flex: 1; min-width: 200px; }
.check { flex-direction: row; align-items: center; gap: 6px; }
.job-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.job h4 { margin: 0; }
.job .meta { color: var(--muted); font-size: .88rem; }
.job .salary { font-weight: 700; color: var(--ok); }
.job .perks { display: flex; flex-wrap: wrap; gap: 6px; }
.job .perks span { font-size: .75rem; background: #f3efe8; padding: 2px 8px; border-radius: 99px; }
.job .actions { margin-top: auto; display: flex; gap: 8px; }
.empty { color: var(--muted); padding: 24px; text-align: center; grid-column: 1 / -1; }

.checklist { padding-left: 20px; }
.checklist li { margin-bottom: 6px; }
.timeline { padding-left: 20px; }
.timeline li { margin-bottom: 8px; }
.cta { text-align: center; margin-top: 24px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none; }
.modal-body { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }

/* ---------- Visa & Document Center ---------- */
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.callout { background: #f6f3ee; border-left: 4px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: .95rem; }
.callout.info { background: #eef5ff; border-left-color: #3b78d8; }
.callout.warn { background: #fff7e0; border-left-color: var(--gold); }
.callout.next { background: #eaf6ef; border-left-color: var(--ok); }
.callout.big { padding: 18px; }
.callout.big p { margin: 6px 0 12px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.fact-value { font-size: 1rem; }
.fact-meta { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.fact-meta.ok { color: var(--ok); }
.fact.unverified { background: #fff4f4; border-color: #f0c9c9; color: #7a1c1c; font-size: .92rem; }
.fact.stale { border-color: #f2dc9b; background: #fffbea; }
.progress-card .progress-head { display: flex; align-items: baseline; gap: 6px; }
.progress-card .pct { margin-left: auto; font-weight: 700; font-size: 1.3rem; }
.tasks { padding-left: 20px; margin: 0; }
.tasks li { margin: 8px 0; }
.tasks li.urgent a { color: #b00020; font-weight: 600; }
.group-title { margin: 24px 0 8px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.doc-list { display: grid; gap: 8px; }
.doc-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; min-height: 56px; }
.doc-row:hover { border-color: #d6cfc2; }
.doc-row.done { border-left: 5px solid var(--ok); }
.doc-row.later, .doc-row.na { opacity: .65; }
.doc-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; flex: none; font-size: .85rem; }
.doc-row.done .doc-check { background: var(--ok); border-color: var(--ok); }
.doc-main { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.chev { color: var(--muted); font-size: 1.4rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: .75rem; padding: 3px 9px; border-radius: 99px; background: #eee; color: #444; font-weight: 600; }
.pill.soft { background: #f3efe8; color: var(--muted); font-weight: 500; }
.pill.s-in_progress, .pill.s-submitted, .pill.s-waiting, .pill.s-apostille_submitted { background: #eef2ff; color: #3949ab; }
.pill.s-apostille_required { background: #fff3d6; color: #8a6100; }
.pill.s-received, .pill.s-apostilled, .pill.s-completed, .pill.e-accepted { background: #e3f4ea; color: #17663a; }
.pill.e-needs_correction { background: #fde8eb; color: #9e0c24; }
.pill.e-uploaded, .pill.e-reviewing { background: #f1e8ff; color: #5b2a9e; }
.doc-form select, .doc-form input, .onboard select, .onboard input { font-size: 16px; } /* avoids zoom on mobile */
.doc-form > label, .onboard .q { margin-bottom: 12px; }
.files-card summary, #historyBox summary { cursor: pointer; }
.files { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.guide { margin-top: 16px; }
.guide .lead { font-size: 1.1rem; }
.facts-grid { display: grid; gap: 12px; margin: 16px 0; }
.facts-grid h4 { margin: 0 0 4px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.step summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; list-style: none; }
.step summary::-webkit-details-marker { display: none; }
.step[open] summary { border-bottom: 1px solid var(--line); }
.step-n { background: var(--red); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; flex: none; }
.step-body { padding: 4px 16px 16px; font-size: 1rem; }
.step-body li { margin: 6px 0; }
.option { border-top: 1px dashed var(--line); padding-top: 8px; }
.mistakes li { margin: 6px 0; }
blockquote { margin: 8px 0; padding: 12px 14px; background: #f6f3ee; border-radius: 10px; font-style: italic; }
.ds-helper { display: grid; gap: 10px; margin: 12px 0; }
.ds-summary { background: #f6f3ee; border-radius: 10px; padding: 12px 14px; }
.ds-summary dl, .state-fields { display: grid; grid-template-columns: 1fr; gap: 2px 12px; margin: 0; }
.ds-summary dt, .state-fields dt { font-weight: 600; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.ds-summary dd, .state-fields dd { margin: 0; }
.route { border-radius: 12px; padding: 14px; margin-top: 12px; border: 2px solid var(--line); }
.route.federal { border-color: #3b78d8; background: #eef5ff; }
.route.state { border-color: var(--ok); background: #eaf6ef; }
.route-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: #fff; margin-right: 8px; }
.route p { margin: 6px 0 10px; }
.kind { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.kind legend { font-weight: 600; margin-bottom: 8px; }
.search { width: 100%; margin-bottom: 12px; font-size: 16px; }
.state-list { display: grid; gap: 6px; grid-template-columns: 1fr; }
.state-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; }
.state-card h3 { margin-top: 0; }
.badge.ok { color: var(--ok); font-weight: 600; }
.checks { display: grid; gap: 6px; }
/* Phase 4: employer + arrival */
.who { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-right: 6px; vertical-align: middle; }
.who.you { background: #eef5ff; color: #2456a6; }
.who.emp { background: #fff3d6; color: #8a6100; }
.who.both { background: #f1e8ff; color: #5b2a9e; }
.kinds li, .arrival li { margin: 10px 0; }
.arrival { padding-left: 20px; }
.arrival .check { align-items: flex-start; font-weight: 500; }
.arrival input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ok); }
.code-box { margin: 10px 0; padding: 12px; border: 2px dashed var(--gold); border-radius: 10px; display: grid; gap: 4px; }
.code-box .code { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .12em; font-weight: 700; }
.emp-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 160px; font-size: 16px; text-transform: uppercase; }
.emp-doc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.emp-doc .pills { margin-top: 6px; }
.emp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* Phase 5: files, admin */
.file-list { display: grid; gap: 10px; margin: 10px 0; }
.file-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.file-row .share { font-weight: 500; font-size: .9rem; }
.linklike { background: none; border: 0; padding: 0; color: #2456a6; text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
.access ul { margin: 4px 0 0; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.tabs a { text-decoration: none; padding: 8px 12px; border-radius: 8px; background: #f3efe8; font-weight: 500; }
.tabs a.active { background: var(--red); color: #fff; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td input, .tbl td select { width: 100%; min-width: 120px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.stack select, .inline-form select { max-width: 100%; min-width: 0; }
.stage-form { align-items: center; margin-bottom: 8px; }
.stage-form input { text-transform: none; }
/* Job board */
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; margin: 10px 0; }
.filters2 input[name=q] { width: 100%; font-size: 16px; }
.filters2 select, .filters2 input { font-size: 16px; min-width: 0; max-width: 100%; }
.sortby { flex-direction: row; align-items: center; gap: 8px; }
.job-list2 { display: grid; gap: 14px; }
.job2 { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.job2 h3 { margin: 0; font-size: 1.15rem; } .job2 h3 a { text-decoration: none; }
.job2 .school, .job-head .school { color: var(--muted); font-weight: 500; }
.job2 .meta { font-size: .9rem; }
.salary { font-weight: 700; color: var(--ok); font-size: 1.05rem; }
.facts2 { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: .92rem; }
.facts2 dt { color: var(--muted); } .facts2 dd { margin: 0; }
.job2 footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.job2 .actions, .job-head .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.job-head { margin-bottom: 12px; }
.pre { white-space: pre-line; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 10px 0; }
.photos figure { margin: 0; } .photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.photos figcaption { font-size: .8rem; color: var(--muted); }
.vrow { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.vrow.ok strong { color: var(--ok); }
.vform input { font-size: 14px; flex: 1; min-width: 140px; text-transform: none; }
.checks.inline { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.citysec { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 10px; }
.citysec textarea { width: 100%; }
@media (max-width: 500px) { .facts2 { grid-template-columns: 1fr; } .facts2 dt { margin-top: 6px; } }
/* Jobs Phase 2: teaching profile, apply steps, applications, resume */
.callout.ok { background: #eaf6ef; border-left-color: var(--ok); }
.callout ul { margin: 6px 0 0; padding-left: 20px; }
.rows { display: grid; gap: 10px; margin-bottom: 8px; }
.row-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; justify-items: start; }
.row-card .form-grid { width: 100%; }
.row-card .wide { grid-column: 1 / -1; }
.step h3 { display: flex; align-items: center; gap: 10px; }
.step .num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f3efe8; color: var(--muted); font-size: .9rem; flex: none; }
.step.done .num { background: #e3f4ea; color: var(--ok); }
.radio-list { display: grid; gap: 8px; }
.radio-list .check { overflow-wrap: anywhere; }
.timeline { padding-left: 20px; margin: 0; }
.timeline li { margin: 8px 0; }
.pill.app-submitted, .pill.app-under_review { background: #eef2ff; color: #3949ab; }
.pill.app-interview_requested, .pill.app-interview_completed, .pill.app-offer_pending { background: #f1e8ff; color: #5b2a9e; }
.pill.app-offer_received, .pill.app-offer_accepted { background: #e3f4ea; color: #17663a; }
.pill.app-not_selected, .pill.app-withdrawn { background: #eee; color: #555; }
.resume { font-family: Georgia, "Times New Roman", serif; line-height: 1.5; }
.resume h2 { margin: 0; }
.resume h3 { border-bottom: 1px solid var(--line); margin: 16px 0 6px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.resume .headline { margin: 2px 0; font-style: italic; }
.resume .contact { color: var(--muted); margin: 4px 0; }
.resume p { margin: 4px 0; }
/* Jobs Phase 3: review actions and message threads */
.rv-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
details > summary.btn { list-style: none; display: inline-block; cursor: pointer; }
details > summary.btn::-webkit-details-marker { display: none; }
details[open] > summary.btn { margin-bottom: 8px; }
.thread { display: grid; gap: 8px; margin-bottom: 12px; }
.msg { border-radius: 10px; padding: 8px 12px; max-width: 85%; background: #f3efe8; overflow-wrap: anywhere; }
.msg.us { justify-self: end; background: #eef5ff; }
.msg.internal { background: #fff7e0; border: 1px dashed var(--gold); }
.msg small { color: var(--muted); }
.msg p { margin: 4px 0 0; }
/* Jobs Phase 5: notifications, saved jobs, comparison */
.badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 700; text-align: center; }
.notif.unread { background: #fffaf0; }
.notif .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.notif small { display: block; }
.saved-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.saved-row .doc-main { flex: 1 1 220px; min-width: 0; color: inherit; text-decoration: none; }
.saved-row small { display: block; }
.saved-row.closed { opacity: .85; }
.soon { color: var(--red); }
.cmp { font-size: .85rem; }
.compare-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px; margin-top: 12px; }
.compare-bar .btn { margin: 0; }
.compare-bar[hidden] { display: none; }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-tbl { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .92rem; }
.compare-tbl th, .compare-tbl td { border-top: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.compare-tbl th[scope="row"] { color: var(--muted); font-weight: 600; width: 150px; }
/* Big City vs. Small City */
.small-hero { padding: 24px; border-radius: var(--radius); margin-bottom: 12px; }
.small-hero h2 { margin: 0 0 6px; color: #fff; }
.small-hero p { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.city-side.big { border-top: 4px solid var(--red); }
.city-side.small { border-top: 4px solid var(--gold); }
.city-side ul { padding-left: 20px; }
.cmp-life { width: 100%; border-collapse: collapse; }
.cmp-life th, .cmp-life td { padding: 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-life tbody th { color: var(--muted); font-weight: 600; }
.cmp-life .pos { color: var(--ok); }
.cmp-life .neg { color: var(--red); }
@media (max-width: 560px) {
  .cmp-life:not(.calc-table) thead { display: none; }
  .cmp-life:not(.calc-table) tr { display: block; border-top: 1px solid var(--line); padding: 6px 0; }
  .cmp-life:not(.calc-table) th, .cmp-life:not(.calc-table) td { display: block; border: 0; padding: 2px 0; }
  .cmp-life:not(.calc-table) td::before { content: attr(data-label) ": "; font-weight: 600; }
}
.quiz-q { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 8px 12px; display: grid; gap: 4px; }
.quiz-q legend { font-weight: 600; padding: 0 4px; }
.calc-offer h4 { margin-top: 0; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin-bottom: 8px; }
.city-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: inherit; text-decoration: none; background: var(--card); }
.city-card img, .city-card .city-ph { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.city-card .city-ph { display: grid; place-items: center; background: #f3efe8; font-size: 1.6rem; font-weight: 700; color: var(--muted); }
.city-card small { display: block; }
.city-photo { margin: 0 0 12px; }
.city-photo img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); }
.city-photo figcaption { font-size: .8rem; color: var(--muted); }

/* Membership */
.paywall { border: 2px solid var(--gold); background: #fffaf0; text-align: center; }
.paywall h3 { margin-top: 0; }
.paywall-price { font-size: 1.05rem; }
.price-card { text-align: center; }
.big-price { font-size: 2.6rem; font-weight: 800; margin: 0; color: var(--red); }
.btn.big { font-size: 1.05rem; padding: 12px 22px; }
.included { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px 18px; }
.included h4 { margin: 6px 0 2px; }
.included p { margin: 0; color: var(--muted); }
.support-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.support-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.support-card > div { flex: 1 1 220px; min-width: 0; }
.fact.locked { background: #fffaf0; border: 1px dashed var(--gold); border-radius: 8px; padding: 8px 10px; }
.legal h3 { margin-top: 18px; }
.legal-links { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer { text-align: center; padding: 24px 16px 32px; color: var(--muted); font-size: .9rem; }
.site-footer a { color: inherit; }

.btn.members-apply { background: #fff3d6; color: #8a6100; border: 1px solid var(--gold); }

/* Meet Your Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.team-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.team-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #f3efe8; }
.team-photo.ph { display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--muted); }
.team-body { padding: 16px 18px 18px; }
.team-body h3 { margin: 0; font-size: 1.35rem; }
.team-title { margin: 2px 0 10px; color: var(--red); font-weight: 700; }
.team-body ul { padding-left: 20px; margin: 4px 0 12px; }
.team-contact .btn { margin: 4px 6px 4px 0; }
@media (min-width: 900px) { .team-photo { aspect-ratio: 4 / 3; } }
.home-team-card h3 { margin-top: 0; }
.home-team { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 6px; }
.home-team-person { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.home-team-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); }
.home-team-person small { display: block; color: var(--muted); }

/* Brand: TeachChina (EnglishinChina.com) */
.brand-text { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; line-height: 1.15; }
.brand-sub { font-weight: 600; font-size: .78em; opacity: .9; }
@media (max-width: 480px) { .brand-text { flex-direction: column; column-gap: 0; } .brand-sub { font-size: .68em; } }

/* "Get the app" */
.install-btn { margin-left: auto; margin-right: 8px; background: var(--gold); color: var(--ink); border: 0; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.install-btn[hidden], .install-hero[hidden] { display: none; }
.install-steps { padding-left: 22px; line-height: 1.8; }

/* Sample listings (unverified, for demonstration) */
.job2.sample { border: 2px dashed var(--gold); }
.sample-tag { display: inline-block; background: #fff3d6; color: #8a6100; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-bottom: 6px; }
.reminders ul { padding-left: 20px; }
.reminders li { margin: 6px 0; }
@media (min-width: 700px) {
  .facts-grid { grid-template-columns: repeat(3, 1fr); }
  .state-list { grid-template-columns: repeat(2, 1fr); }
  .ds-summary dl, .state-fields { grid-template-columns: 220px 1fr; }
  .ds-summary dt, .state-fields dt { margin-top: 0; padding: 8px 0; border-top: 1px solid var(--line); }
  .state-fields dd { padding: 4px 0; border-top: 1px solid var(--line); }
}
@media (min-width: 1000px) { .state-list { grid-template-columns: repeat(3, 1fr); } }

/* Navigation collapses to a menu below 1500px (11 items) */
@media (max-width: 1499px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--red-dark); flex-direction: column; padding: 8px; }
  nav.open { display: flex; }
  nav a, .nav-btn { padding: 12px; }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .hero { padding: 32px 20px; }
  .visa-files { margin-left: 0; }
}
