/* ══════════════════════════════════════════════════════
   I-485 Tracker — Editorial Theme
   Shared stylesheet for articles/ pages + index
   ══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────── */
:root {
  --paper:       #f9f7f2;
  --card:        #ffffff;
  --ink:         #1a1410;
  --ink-2:       #6b5c4a;
  --ink-3:       #a89070;
  --amber:       #b85c08;
  --amber-bg:    #fef0de;
  --navy:        #1c3d72;
  --navy-bg:     #edf2f9;
  --forest:      #155f3a;
  --forest-bg:   #edf7f2;
  --purple:      #48237a;
  --purple-bg:   #f3eef9;
  --crimson:     #8b1a1a;
  --crimson-bg:  #fef0f0;
  --border:      #e8dfd0;
  --border-dark: #d0c6b4;
  --sh-sm:       0 1px 3px rgba(26,20,16,.07),0 1px 2px rgba(26,20,16,.04);
  --sh-md:       0 4px 20px rgba(26,20,16,.10),0 2px 6px rgba(26,20,16,.05);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

/* ── Navigation ─────────────────────────────────────── */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(26,20,16,.04);
  position: sticky;
  top: 0;
  z-index: 200;
}
/* Footer nav must not inherit the header nav's white bg */
.site-footer nav, .site-footer-nav { background: transparent; border: none; box-shadow: none; position: static; }
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 1px; align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 7px 11px; border-radius: 6px;
  transition: color .12s, background .12s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: #f4f0ea; }
.nav-links a.active {
  color: var(--ink); font-weight: 600;
}
/* Amber underline on active link */
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 11px; right: 11px;
  height: 2px; background: var(--amber); border-radius: 1px;
}

/* Track Case CTA button — amber accent */
a[href*="casestatus/landing"] {
  color: var(--amber) !important;
  font-weight: 700 !important;
  border: 1.5px solid color-mix(in srgb, var(--amber) 45%, transparent) !important;
  border-radius: 7px !important;
  padding: 7px 13px !important;
  margin-left: 4px;
  letter-spacing: 0.1px;
  transition: background .12s, color .12s, border-color .12s !important;
}
a[href*="casestatus/landing"]:hover {
  background: var(--amber) !important;
  color: #fff !important;
  border-color: var(--amber) !important;
}
a[href*="casestatus/landing"]::after { display: none !important; }

.ham-bar { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 600px) {
  #navDesktop { display: none !important; }
  #navHam     { display: flex !important; }
  .nav-logo   { height: 38px !important; }
}
#navMobile {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 8px 12px; z-index: 199;
  box-shadow: 0 8px 16px rgba(26,20,16,.08);
}
#navMobile a {
  display: block; font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: 10px 12px; border-radius: 8px;
}
#navMobile a:hover { background: #f4f0ea; }
#navMobile .nav-track {
  color: var(--amber); font-weight: 700;
  border: 1.5px solid color-mix(in srgb, var(--amber) 45%, transparent);
  border-radius: 8px; margin-top: 4px;
}

/* ── Nav Dropdown ───────────────────────────────────── */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 3px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 7px 11px; border-radius: 6px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color .12s, background .12s; position: relative;
}
.nav-dropdown-trigger:hover { color: var(--ink); background: #f4f0ea; }
.nav-dropdown-trigger.active { color: var(--ink); font-weight: 600; }
.nav-dropdown-trigger.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 11px; right: 11px;
  height: 2px; background: var(--amber); border-radius: 1px;
}
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 32px rgba(26,20,16,.14); min-width: 200px;
  padding: 6px; z-index: 300;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; font-size: 13px; font-weight: 500; color: var(--ink);
  padding: 8px 12px; border-radius: 6px; text-decoration: none; white-space: nowrap;
  transition: background .1s;
}
.nav-dropdown-menu a:hover { background: #f4f0ea; }
/* Category color accents in dropdown */
.nav-dropdown-menu a[href*="#bulletins"] { border-left: 2px solid var(--navy); padding-left: 10px; }
.nav-dropdown-menu a[href*="#process"]   { border-left: 2px solid var(--forest); padding-left: 10px; }
.nav-dropdown-menu a[href*="#strategy"]  { border-left: 2px solid var(--purple); padding-left: 10px; }
.nav-dropdown-menu a[href*="#policy"]    { border-left: 2px solid var(--crimson); padding-left: 10px; }
.nav-dropdown-menu .ddivider { height: 1px; background: var(--border); margin: 4px 2px; }

/* ── INDEX — Masthead Header ──────────────────────────
   Uses .header on the articles/index.html listing page */
.index-header {
  background: var(--ink);
  padding: 52px 24px 44px;
  position: relative;
  overflow: hidden;
}
.index-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.index-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--amber) 20%, var(--amber) 80%, transparent);
}
.index-header-inner { max-width: 600px; margin: 0 auto; text-align: center; position: relative; }
.index-header .eyebrow {
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700;
  letter-spacing: 3px; color: rgba(249,247,242,.4);
  text-transform: uppercase; margin-bottom: 14px;
}
.index-header h1 {
  font-family: 'Lora', Georgia, serif; font-size: 34px; font-weight: 700;
  color: #f9f7f2; line-height: 1.15; margin-bottom: 12px;
}
.index-header p {
  font-size: 14px; color: rgba(249,247,242,.6);
  max-width: 480px; margin: 0 auto; line-height: 1.7;
}

/* ── INDEX — Layout ─────────────────────────────────── */
.layout {
  max-width: 1140px; margin: 0 auto;
  padding: 40px 24px 100px;
  display: grid; grid-template-columns: 220px 1fr;
  gap: 52px; align-items: start;
}

/* ── INDEX — Sidebar ────────────────────────────────── */
.toc {
  position: sticky; top: 76px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 14px; box-shadow: var(--sh-sm);
}
.toc-label {
  font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--ink-3); margin-bottom: 10px; padding: 0 6px;
}
.toc a {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 7px 10px;
  border-radius: 7px; margin-bottom: 2px; transition: all .12s;
}
.toc a:hover { background: #f4f0ea; color: var(--ink); }
.toc a.active { background: var(--navy-bg); color: var(--navy); font-weight: 600; }

/* Category dots */
.toc a[href="#bulletins"]::before,
.toc a[href="#process"]::before,
.toc a[href="#strategy"]::before,
.toc a[href="#policy"]::before {
  content: ''; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0;
}
.toc a[href="#bulletins"]::before { background: var(--navy); }
.toc a[href="#process"]::before   { background: var(--forest); }
.toc a[href="#strategy"]::before  { background: var(--purple); }
.toc a[href="#policy"]::before    { background: var(--crimson); }

.toc-divider { height: 1px; background: var(--border); margin: 12px 0; }
.toc-cta {
  display: block; text-align: center;
  background: var(--amber); color: #fff !important;
  border-radius: 8px; padding: 10px 12px;
  font-size: 12px; font-weight: 700; margin-top: 4px;
  letter-spacing: 0.3px; transition: opacity .12s;
  box-shadow: 0 2px 8px rgba(184,92,8,.28);
}
.toc-cta:hover { opacity: .88; background: var(--amber) !important; }
.toc-cta::before { display: none !important; }

/* ── INDEX — Mobile Jump Chips ──────────────────────── */
.mobile-jump {
  display: none; overflow-x: auto; white-space: nowrap;
  padding: 12px 20px; gap: 8px;
  border-bottom: 1px solid var(--border);
  background: #fff; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mobile-jump::-webkit-scrollbar { display: none; }
.mobile-jump a {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--ink-2); text-decoration: none;
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border); background: #fff;
}
.mobile-jump a:hover { background: #f4f0ea; color: var(--ink); }

/* ── INDEX — Section Groups ─────────────────────────── */
.section-group { margin-bottom: 44px; scroll-margin-top: 84px; }
.section-heading {
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--navy); border-top: 3px solid var(--navy);
  padding-top: 12px; margin-bottom: 16px;
}
#process  .section-heading { color: var(--forest);  border-top-color: var(--forest); }
#strategy .section-heading { color: var(--purple);  border-top-color: var(--purple); }
#policy   .section-heading { color: var(--crimson); border-top-color: var(--crimson); }

/* ── INDEX — Article Cards ──────────────────────────── */
.update-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 0 10px 10px 0;
  box-shadow: var(--sh-sm);
  padding: 18px 22px; margin-bottom: 8px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s, transform .1s;
}
.update-card:hover { box-shadow: var(--sh-md); transform: translateX(2px); }

#process  .update-card { border-left-color: var(--forest); }
#strategy .update-card { border-left-color: var(--purple); }
#policy   .update-card { border-left-color: var(--crimson); }

.update-card .month {
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--navy); margin-bottom: 5px;
}
#process  .update-card .month { color: var(--forest); }
#strategy .update-card .month { color: var(--purple); }
#policy   .update-card .month { color: var(--crimson); }

.update-card h2 {
  font-family: 'Lora', Georgia, serif; font-size: 16px; font-weight: 600;
  color: var(--ink); margin-bottom: 4px; line-height: 1.35;
}
.update-card p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.update-card .arrow {
  color: var(--ink-3); font-size: 22px; flex-shrink: 0;
  transition: transform .12s, color .12s;
}
.update-card:hover .arrow { transform: translateX(3px); color: var(--amber); }

.badge {
  display: inline-block; background: var(--amber); color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; font-family: "DM Mono", monospace;
  margin-left: 6px; letter-spacing: 0.5px; vertical-align: 1px;
}

/* ── ARTICLE — Page Header ──────────────────────────────
   .header is kept for backwards-compat with existing pages.
   The inline style per-article sets the background gradient. */
.header {
  padding: 44px 24px 36px;
  position: relative;
  background: linear-gradient(135deg, #1e3a5f 0%, #1c3d72 55%, #1a4a8a 100%);
}
.header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.18);
}
.header .eyebrow {
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: rgba(255,255,255,.45); margin-bottom: 14px; text-align: center;
}
.header h1 {
  font-family: 'Lora', Georgia, serif; font-size: 28px; font-weight: 700;
  color: #fff; max-width: 700px; margin: 0 auto;
  line-height: 1.2; text-align: center;
}
.header p {
  font-size: 14px; color: rgba(255,255,255,.65);
  max-width: 600px; margin: 10px auto 0;
  line-height: 1.7; text-align: center;
}

/* ── ARTICLE — Content Wrapper ──────────────────────── */
.content { max-width: 740px; margin: 0 auto; padding: 36px 24px 100px; }

/* ── ARTICLE — Section Cards ────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-dark);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px; margin-bottom: 16px;
  box-shadow: var(--sh-sm);
}
.card-label {
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--amber); margin-bottom: 10px;
}
.card h2 {
  font-family: 'Lora', Georgia, serif; font-size: 20px; font-weight: 700;
  color: var(--ink); margin-bottom: 14px; line-height: 1.25;
}
.card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 16px 0 8px; }
.card p { font-size: 14.5px; line-height: 1.85; color: #3a3028; margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { padding-left: 22px; margin: 10px 0 12px; }
.card ul li, .card ol li { font-size: 14.5px; line-height: 1.8; color: #3a3028; margin-bottom: 6px; }
.card strong { color: var(--ink); }

/* ── ARTICLE — Callout Boxes ────────────────────────── */
.highlight {
  background: var(--navy-bg); border-left: 3px solid var(--navy);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
  margin: 14px 0; font-size: 14px; color: #1a2d4f; line-height: 1.7;
}
.highlight strong { color: var(--navy); font-weight: 700; }

.warn {
  background: #fff8f0; border-left: 3px solid var(--amber);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
  margin: 14px 0; font-size: 14px; color: #5c3008; line-height: 1.7;
}
.warn strong { color: var(--amber); font-weight: 700; }

.alert {
  background: var(--crimson-bg); border-left: 3px solid var(--crimson);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
  margin: 14px 0; font-size: 14px; color: #5c1010; line-height: 1.7;
}
.alert strong { color: var(--crimson); font-weight: 700; }

.success {
  background: var(--forest-bg); border-left: 3px solid var(--forest);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
  margin: 14px 0; font-size: 14px; color: #0f3d24; line-height: 1.7;
}
.success strong { color: var(--forest); font-weight: 700; }

/* ── ARTICLE — Tables ───────────────────────────────── */
table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  margin: 14px 0; display: block; overflow-x: auto;
}
th {
  text-align: left; padding: 9px 14px;
  background: var(--ink); color: #f0ede8;
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--ink); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #faf8f4; }
.safe    { color: var(--forest);  font-weight: 600; }
.risk    { color: var(--crimson); font-weight: 600; }
.neutral-text { color: var(--ink-2); }

/* ── ARTICLE — CTA Block ────────────────────────────── */
.cta {
  background: var(--ink); border-radius: 12px;
  padding: 30px; text-align: center;
  margin-top: 8px; position: relative; overflow: hidden;
}
.cta::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--amber);
}
.cta h3 {
  font-family: 'Lora', Georgia, serif; font-size: 20px; font-weight: 700;
  color: #f9f7f2; margin-bottom: 8px;
}
.cta p { font-size: 13px; color: rgba(249,247,242,.65); margin-bottom: 18px; }
.cta a {
  display: inline-block; background: var(--amber); color: #fff;
  font-size: 14px; font-weight: 700; padding: 12px 24px;
  border-radius: 8px; text-decoration: none; letter-spacing: .2px;
  box-shadow: 0 2px 8px rgba(184,92,8,.3);
}
.cta a:hover { opacity: .9; }

/* ── ARTICLE — Breadcrumb ───────────────────────────── */
.breadcrumb { font-size: 12px; color: var(--ink-3); margin-bottom: 20px; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }

/* ── ARTICLE — Disclaimer Box ───────────────────────── */
.disc-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fffbf4; border: 1px solid #e8c878;
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin-top: 24px;
}
.disc-box svg { flex-shrink: 0; margin-top: 1px; }
.disc-box strong { display: block; font-size: 13px; font-weight: 700; color: #5c3008; margin-bottom: 4px; }
.disc-box p { font-size: 12px; color: #7a4010; line-height: 1.7; margin: 0; }

/* ── ARTICLE — Numbered Steps ───────────────────────── */
.steps { counter-reset: step; padding-left: 0; list-style: none; margin: 12px 0; }
.steps li {
  font-size: 14.5px; line-height: 1.8; color: #3a3028;
  margin-bottom: 14px; padding-left: 40px; position: relative;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px;
  background: var(--ink); color: #f9f7f2;
  border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: "DM Mono", monospace;
}

/* ── BULLETIN PAGES — Movement Indicators ───────────── */
/* Generated by build-updates.js for visa bulletin tables */
.up   { color: var(--forest);  font-weight: 600; }
.down { color: var(--crimson); font-weight: 600; }

.badge-up {
  display: inline-block; font-size: 11px; font-weight: 700;
  font-family: "DM Mono", monospace;
  background: var(--forest-bg); color: var(--forest);
  border-radius: 4px; padding: 1px 5px; margin-left: 3px;
}
.badge-down {
  display: inline-block; font-size: 11px; font-weight: 700;
  font-family: "DM Mono", monospace;
  background: var(--crimson-bg); color: var(--crimson);
  border-radius: 4px; padding: 1px 5px; margin-left: 3px;
}
.move { font-size: 11px; font-family: "DM Mono", monospace; }
.flat { color: var(--ink-3); }

/* Disclaimer text at bottom of bulletin pages */
.disclaimer {
  font-size: 12px; color: var(--ink-3);
  line-height: 1.7; margin-top: 20px; text-align: center;
}

/* ── Footer pulse animation ─────────────────────────── */
@keyframes siteFooterPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .toc    { display: none; }
  .mobile-jump { display: flex; }
}
@media (max-width: 480px) {
  .update-card { padding: 14px 16px; }
  .update-card h2 { font-size: 15px; }
  .index-header h1 { font-size: 26px; }
  .header h1 { font-size: 23px; }
  .content { padding: 24px 16px 80px; }
  .card { padding: 18px 20px; }
}
