/* India Law Simplified — modern, colorful, interactive theme */
:root {
  --blue: #1e6cb0;
  --blue-700: #0f5491;
  --blue-800: #084469;
  --blue-50: #ecf3fb;
  --blue-100: #d9e7f4;

  --orange: #c2410c; /* AA-contrast orange for text on white (was #ee7a26, ~2.6:1) */
  --orange-700: #9a3412;
  --orange-50: #fdeede;

  --indigo: #4f46e5;
  --indigo-50: #eef1ff;
  --indigo-100: #ddd9ff;

  --emerald: #047857; /* AA-contrast on white for bold/small accent text */
  --emerald-50: #d8f4e8;

  --teal: #0f766e;
  --teal-50: #ccfbf1;

  --amber: #b45309;
  --amber-50: #fef3c7;

  --rose: #e11d48;
  --rose-50: #ffe1e7;

  --purple: #7c3aed;
  --purple-50: #f3e8ff;

  --cyan: #06b6d4;
  --cyan-50: #cffafe;

  --red: #dc2626;

  --ink: #0b1a2e;
  --ink-2: #1c2b3d;
  --slate-50: #f6f8fb;
  --slate-100: #eef1f5;
  --slate-200: #e1e6ee;
  --slate-300: #c5cdd8;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Outfit", "Inter", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(11,26,46,.05), 0 0 0 1px rgba(11,26,46,.04);
  --shadow: 0 6px 18px -8px rgba(11,26,46,.15), 0 0 0 1px rgba(11,26,46,.04);
  --shadow-lg: 0 24px 60px -22px rgba(11,26,46,.25);
  --shadow-color: 0 14px 40px -16px rgba(30,108,176,.45);

  --page-bg: #f1f5fb;
  --page-bg-2: #ffffff;
  --card-bg: #ffffff;
  --border: #e1e6ee;
  --text: #0b1a2e;
  --text-muted: #5a6a7e;
  --text-soft: #8898ab;
}

[data-theme="dark"] {
  --page-bg: #0a1424;
  --page-bg-2: #0e1c33;
  --card-bg: #142640;
  --border: #1f3556;
  --text: #ebf2fa;
  --text-muted: #a3b3c8;
  --text-soft: #708199;
  --ink: #ebf2fa;
  --ink-2: #d0dae8;
  --slate-50: #142640;
  --slate-100: #19314f;
  --slate-200: #233f60;
  --slate-300: #2c4f74;
  --slate-500: #a3b3c8;
  --slate-600: #c0cde0;
  --slate-700: #dae2ef;
  --slate-800: #ebf2fa;
  --slate-900: #ffffff;
  --blue-50: #1a3a5e;
  --blue-100: #1f4170;
  --orange-50: #3b2515;
  --indigo-50: #1e2152;
  --indigo-100: #2a2d6e;
  --emerald-50: #0f3a2e;
  --teal-50: #0d3531;
  --amber-50: #3a2a10;
  --rose-50: #3a1620;
  --purple-50: #2c1f44;
  --cyan-50: #103840;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
noscript { display: none; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 1200px 600px at 10% -100px, rgba(30,108,176,.08), transparent 60%),
    radial-gradient(ellipse 800px 500px at 100% 0%, rgba(238,122,38,.06), transparent 60%),
    var(--page-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.55;
}
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 1200px 600px at 10% -100px, rgba(30,108,176,.18), transparent 60%),
    radial-gradient(ellipse 800px 500px at 100% 0%, rgba(238,122,38,.1), transparent 60%),
    var(--page-bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-700); }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ───────── TOP NAV ───────── */
.topbar {
  background: linear-gradient(180deg, #0f4d80 0%, #126aa8 100%);
  color: white;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 0 rgba(238,122,38,.45);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange) 0%, #c95f15 100%);
  display: grid; place-items: center;
  color: white; font-size: 22px;
  box-shadow: 0 2px 10px rgba(238,122,38,.5);
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .04em;
  color: white;
  line-height: 1.1;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,210,170,.95);
  margin-top: 2px;
}
.nav-links {
  display: flex; gap: 2px;
  margin: 0 6px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  color: rgba(255,255,255,.9);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 8px 11px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: 0;
  transition: all .15s ease;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.12); color: white; }
.nav-link.active {
  background: var(--orange);
  color: white;
  box-shadow: 0 2px 8px rgba(238,122,38,.55);
}
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: white; border: 0; cursor: pointer;
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.22); }
.login-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #d96514 100%);
  color: white; border: 0;
  padding: 9px 20px; border-radius: 999px;
  font-family: var(--display); font-weight: 800;
  font-size: 13px; letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(238,122,38,.45);
  flex-shrink: 0;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(238,122,38,.55); }

@media (max-width: 1320px) { .nav-link { padding: 8px 9px; font-size: 11.5px; } }
@media (max-width: 1180px) { .brand-name { font-size: 13px; } .brand-sub { display: none; } .nav-link { padding: 7px 7px; font-size: 11px; } }
@media (max-width: 980px) { .brand-name { display: none; } .nav-link { padding: 6px 6px; font-size: 10.5px; letter-spacing: 0; } }
@media (max-width: 820px) { .topbar-inner { flex-wrap: wrap; min-height: 0; padding: 8px 12px; gap: 4px; } .nav-links { order: 5; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; } .nav-link { flex-shrink: 0; } }
.hamburger { display: none; }
/* keep hamburger hidden always now */

/* ───────── PAGE SHELL ───────── */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

/* ───────── PAGE HERO — gradient & varied per page ───────── */
.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 36px 40px 36px;
  color: white;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.page-hero.theme-home    { background: linear-gradient(135deg, #0f4d80 0%, #1e6cb0 50%, #2a8bd4 100%); }
.page-hero.theme-learn   { background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0d9488 100%); }
.page-hero.theme-tax     { background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #3b82f6 100%); }
.page-hero.theme-filing  { background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 50%, #8b5cf6 100%); }
.page-hero.theme-advocate{ background: linear-gradient(135deg, #1c1917 0%, #44403c 50%, #78716c 100%); }
.page-hero.theme-templates{ background: linear-gradient(135deg, #831843 0%, #be185d 50%, #ec4899 100%); }
.page-hero.theme-tools   { background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #06b6d4 100%); }
.page-hero.theme-faq     { background: linear-gradient(135deg, #78350f 0%, #c2410c 50%, #ea580c 100%); }
.page-hero::before {
  content: ""; position: absolute; right: -120px; top: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15), transparent 65%);
  pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; left: -60px; bottom: -100px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.18), transparent 65%);
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -.018em;
  margin: 8px 0 8px;
  line-height: 1.1;
  text-wrap: balance;
}
.page-hero p {
  color: rgba(255,255,255,.85);
  font-size: 15px;
  max-width: 880px;
  margin: 0;
  line-height: 1.55;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 24px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
.hero-stat {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 14px 16px;
}
.hero-stat .v { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; color: white; }
.hero-stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-top: 6px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -.01em;
  margin: 0;
}
.section-sub { color: var(--text-muted); font-size: 14px; margin: 4px 0 0; }

/* ───────── CARD ───────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card.lift:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-pad-sm { padding: 16px; }
.card-pad-lg { padding: 32px; }
.card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  color: var(--blue);
  margin: 0;
  letter-spacing: -.005em;
  display: flex; align-items: center; gap: 10px;
}
.card-sub {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 4px 0 0;
  line-height: 1.5;
}
.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }
.card-accent { position: relative; overflow: hidden; }
.card-accent::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.card-accent.a-blue::before    { background: linear-gradient(90deg, var(--blue), #3b82f6); }
.card-accent.a-orange::before  { background: linear-gradient(90deg, var(--orange), #fbbf24); }
.card-accent.a-emerald::before { background: linear-gradient(90deg, var(--emerald), #10b981); }
.card-accent.a-purple::before  { background: linear-gradient(90deg, var(--purple), #c084fc); }
.card-accent.a-rose::before    { background: linear-gradient(90deg, var(--rose), #fb7185); }
.card-accent.a-cyan::before    { background: linear-gradient(90deg, var(--cyan), #67e8f9); }

/* ───────── LAYOUT ───────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-sidebar { grid-template-columns: 380px 1fr; }
.grid-sidebar-sm { grid-template-columns: 320px 1fr; }
@media (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-sidebar, .grid-sidebar-sm { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .page-hero { padding: 24px; }
}
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ───────── BUTTONS ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  background: transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #2a8bd4 100%);
  color: white;
  box-shadow: 0 4px 12px -4px rgba(30,108,176,.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -4px rgba(30,108,176,.55); color: white; }
.btn-orange {
  background: linear-gradient(135deg, var(--orange) 0%, #d96514 100%);
  color: white;
  box-shadow: 0 4px 12px -4px rgba(238,122,38,.5);
}
.btn-orange:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -4px rgba(238,122,38,.55); color: white; }
.btn-ghost { background: var(--card-bg); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--slate-100); border-color: var(--blue); color: var(--blue); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ───────── TAGS / PILLS ───────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pill.blue { background: var(--blue-50); color: var(--blue); }
.pill.orange { background: var(--orange-50); color: var(--orange); }
.pill.green { background: var(--emerald-50); color: var(--emerald); }
.pill.teal { background: var(--teal-50); color: var(--teal); }
.pill.amber { background: var(--amber-50); color: var(--amber); }
.pill.purple { background: var(--purple-50); color: var(--purple); }
.pill.indigo { background: var(--indigo-50); color: var(--indigo); }
.pill.rose { background: var(--rose-50); color: var(--rose); }
.pill.cyan { background: var(--cyan-50); color: var(--cyan); }
.pill.outline { background: transparent; border: 1px solid var(--blue); color: var(--blue); }
.pill.hero { background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }

/* ───────── INPUTS ───────── */
.input, .select, .textarea {
  width: 100%;
  background: var(--card-bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(30,108,176,.14);
}
.textarea { resize: vertical; min-height: 80px; }
.input-label, label.lbl {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .input-row { grid-template-columns: 1fr; } }

/* ───────── FLOATING AI AGENT ───────── */
.ai-agent-launcher {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  z-index: 40;
}
.ai-agent-tag {
  background: linear-gradient(135deg, var(--orange) 0%, #d96514 100%);
  color: white;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(238,122,38,.5);
}
.ai-agent-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, #2a8bd4 100%);
  border: 0;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 12px 28px -6px rgba(30,108,176,.55);
  display: grid; place-items: center;
  transition: transform .2s ease;
}
.ai-agent-btn:hover { transform: scale(1.05); }

/* ───────── FOOTER ───────── */
.footer {
  background: linear-gradient(180deg, var(--ink) 0%, #050d1a 100%);
  color: rgba(255,255,255,.7);
  margin-top: 56px;
  padding: 56px 0 28px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.footer h4 {
  color: white;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  margin: 0 0 14px;
  letter-spacing: .04em;
}
.footer a { display: block; color: rgba(255,255,255,.65); padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.footer a:hover { color: var(--orange); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .1em;
  flex-wrap: wrap; gap: 12px;
}

/* ───────── DUE DATES (home) ───────── */
.due-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--card-bg);
  transition: all .15s ease;
}
.due-row:hover { border-color: var(--blue-100); }
.due-row.warn { border-color: #f59e0b; background: linear-gradient(135deg, #fff7e6 0%, #fff 100%); }
[data-theme="dark"] .due-row.warn { background: linear-gradient(135deg, #3a2a10 0%, var(--card-bg) 100%); }
.due-row-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.due-row-title { font-weight: 700; font-size: 13.5px; color: var(--text); }
.due-row-date { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.due-tag {
  font-family: var(--mono); font-size: 10px;
  padding: 3px 8px; border-radius: 4px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.due-tag.gst { background: var(--orange-50); color: var(--orange); }
.due-tag.income { background: var(--amber-50); color: var(--amber); }
.due-tag.tds { background: var(--purple-50); color: var(--purple); }
.days-left { font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--blue); }
.days-left.warn { color: #b45309; }

/* chips */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--slate-100); color: var(--text-muted);
  border: 0; cursor: pointer;
  font-family: inherit;
  letter-spacing: .03em;
  text-transform: capitalize;
  transition: all .15s ease;
}
.chip.active { background: linear-gradient(135deg, var(--blue), #2a8bd4); color: white; box-shadow: 0 2px 8px rgba(30,108,176,.4); }
.chip:hover:not(.active) { background: var(--slate-200); color: var(--text); }

/* trivia */
.trivia-option {
  display: block; width: 100%; text-align: left;
  padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg); color: var(--text);
  margin-bottom: 8px; cursor: pointer; font-size: 13.5px;
  font-weight: 500;
  transition: all .15s ease;
}
.trivia-option:hover { border-color: var(--blue); background: var(--blue-50); }
.trivia-option.correct { background: var(--emerald-50); border-color: var(--emerald); color: var(--emerald); font-weight: 700; }
.trivia-option.wrong { background: #fee2e2; border-color: var(--red); color: var(--red); font-weight: 700; }

/* Q&A wall */
.qa-item {
  padding: 12px 6px;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.qa-item:last-child { border-bottom: 0; }
.qa-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--mono); }

/* ───────── GUIDE CARDS (learning + home features) ───────── */
.guide-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all .22s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 100%;
}
.guide-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--blue);
  opacity: 0;
  transition: opacity .2s ease;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
}
.guide-card:hover::before { opacity: 1; }
.guide-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.guide-icon.gst { background: var(--orange-50); color: var(--orange); }
.guide-icon.fam { background: #fce7f3; color: #be185d; }
[data-theme="dark"] .guide-icon.fam { background: #3a1a2a; color: #f9a8d4; }
.guide-icon.cyber { background: var(--indigo-50); color: var(--indigo); }
.guide-icon.corp { background: var(--blue-50); color: var(--blue); }
.guide-icon.prop { background: var(--amber-50); color: var(--amber); }
.guide-icon.const { background: var(--emerald-50); color: var(--emerald); }
.guide-icon.tax { background: var(--teal-50); color: var(--teal); }
.guide-icon.crim { background: #fee2e2; color: var(--red); }
[data-theme="dark"] .guide-icon.crim { background: #3a1820; color: #fca5a5; }
.guide-icon.civil { background: var(--purple-50); color: var(--purple); }
.guide-card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 16px; margin: 0 0 8px; color: var(--text);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.guide-card p {
  font-size: 13.5px; color: var(--text-muted); line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}
.guide-cta {
  font-family: var(--display); font-weight: 700;
  color: var(--blue); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
  display: inline-flex; gap: 6px; align-items: center;
  transition: gap .2s ease;
}
.guide-card:hover .guide-cta { gap: 10px; }

/* category section in learning */
.cat-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 16px;
}
.cat-header .cat-h {
  display: flex; align-items: center; gap: 12px;
}
.cat-header .cat-h .ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 18px;
}
.cat-header h3 {
  font-family: var(--display); font-weight: 800;
  font-size: 18px; margin: 0; color: var(--text);
}
.cat-header .ct { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

/* ───────── FILING DESK ───────── */
.stepper { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step .num {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--slate-100); color: var(--text-muted);
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  border: 2px solid var(--border);
  transition: all .25s ease;
}
.step.active .num { background: linear-gradient(135deg, var(--blue), #2a8bd4); color: white; border-color: var(--blue); transform: scale(1.1); box-shadow: 0 4px 12px rgba(30,108,176,.4); }
.step.done .num { background: linear-gradient(135deg, var(--emerald), #10b981); color: white; border-color: var(--emerald); }
.step .label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700; margin-top: 8px; text-align: center;
}
.step.active .label { color: var(--blue); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 18px; left: 60%; right: -40%;
  height: 2px; background: var(--border); z-index: -1;
}

.filing-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  margin-bottom: 8px; cursor: pointer;
  transition: all .15s ease;
}
.filing-item:hover { border-color: var(--blue); transform: translateX(2px); }
.filing-item.active { background: linear-gradient(90deg, var(--blue-50), transparent); border-color: var(--blue); }
.filing-item .ft { font-weight: 700; font-size: 13.5px; color: var(--text); }
.filing-item .fd { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.filing-cat {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-soft); font-weight: 700;
  padding: 12px 4px 8px; margin-top: 8px;
  border-top: 1px solid var(--border);
}
.filing-cat:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }

.doc-req {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--card-bg);
  display: flex; flex-direction: column; gap: 6px;
  transition: all .2s ease;
}
.doc-req.uploaded { border-color: var(--emerald); background: linear-gradient(135deg, var(--emerald-50), transparent); }
.doc-req.invalid { border-color: var(--red); background: linear-gradient(135deg, #fee2e2, transparent); }
[data-theme="dark"] .doc-req.invalid { background: linear-gradient(135deg, #3a1820, transparent); }
.doc-req .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.doc-req .name { font-weight: 700; font-size: 12.5px; color: var(--text); letter-spacing: .04em; text-transform: uppercase; }
.doc-req .sub { font-size: 12px; color: var(--text-muted); }
.required-pill { font-family: var(--mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--orange-50); color: var(--orange); font-weight: 700; flex-shrink: 0; }
.doc-req .upload-btn {
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; font-weight: 600;
  color: var(--blue); background: var(--card-bg); cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
  transition: all .15s ease;
}
.doc-req .upload-btn:hover { border-color: var(--blue); background: var(--blue-50); }
.doc-req .file-info {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 8px;
  font-size: 12px; margin-top: 4px;
}
.doc-req .file-info.ok { background: var(--emerald-50); color: var(--emerald); }
.doc-req .file-info.err { background: #fee2e2; color: var(--red); }
[data-theme="dark"] .doc-req .file-info.err { background: #3a1820; color: #fca5a5; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, var(--blue-50), transparent 70%),
    var(--card-bg);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
}
.dropzone:hover { border-color: var(--blue); transform: scale(1.005); }

/* ───────── CHAT ───────── */
.chat-shell {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 640px;
  box-shadow: var(--shadow-sm);
}
.chat-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--card-bg), var(--slate-50));
}
.chat-head .icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--blue-50); color: var(--blue);
  display: grid; place-items: center;
  font-size: 14px;
}
.chat-head .title {
  font-family: var(--display);
  font-weight: 800; font-size: 14px;
  letter-spacing: .03em; color: var(--text);
  text-transform: uppercase;
}
.chat-body {
  flex: 1; padding: 18px; overflow-y: auto;
  background:
    linear-gradient(180deg, transparent, var(--slate-50) 100%),
    var(--card-bg);
}
.bubble {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: var(--card-bg);
  font-size: 13.5px; line-height: 1.6;
  max-width: 88%;
  box-shadow: var(--shadow-sm);
}
.bubble.user {
  background: linear-gradient(135deg, var(--blue), #2a8bd4);
  color: white;
  border-color: var(--blue);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bubble.bot { background: var(--card-bg); border-bottom-left-radius: 4px; }
.bubble strong { color: var(--blue); }
.bubble.user strong { color: white; }
.chat-foot {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center;
  background: var(--card-bg);
}
.chat-input {
  flex: 1; border: 1.5px solid var(--border);
  background: var(--card-bg); color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px; outline: 0;
}
.chat-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,108,176,.14); }
.chat-mic, .chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  color: white;
  transition: transform .15s ease;
}
.chat-mic { background: var(--slate-200); color: var(--text); }
.chat-mic:hover { background: var(--slate-300); }
.chat-send { background: linear-gradient(135deg, var(--blue), #2a8bd4); }
.chat-send:hover { transform: scale(1.08); }
.chat-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chat-chip {
  font-family: var(--mono); font-size: 10.5px;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 8px;
  background: var(--blue-50); color: var(--blue);
  border: 0; cursor: pointer;
  transition: all .15s ease;
}
.chat-chip:hover { background: var(--blue); color: white; transform: translateY(-1px); }

/* ───────── FAQ ───────── */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all .2s ease;
}
.faq-item:hover { border-color: var(--blue-100); }
.faq-item.open { border-color: var(--blue); box-shadow: var(--shadow); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--display); font-weight: 700;
  font-size: 14px; color: var(--text);
  letter-spacing: .01em;
}
.faq-q .qmark {
  color: var(--orange);
  font-family: var(--display); font-weight: 800;
  margin-right: 4px;
}
.faq-a {
  padding: 0 22px 20px;
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

/* ───────── TABS ───────── */
.tab-row {
  display: flex; gap: 28px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  background: transparent; border: 0; cursor: pointer;
  padding: 14px 0;
  font-family: var(--display); font-weight: 700;
  font-size: 13.5px; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s ease;
}
.tab-btn:hover { color: var(--blue); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Segmented control */
.segment {
  display: inline-flex; background: var(--slate-100);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px;
}
.segment-btn {
  padding: 7px 16px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted);
  transition: all .2s ease;
}
.segment-btn.active {
  background: var(--card-bg);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(11,26,46,.08);
}

/* ───────── PREVIEW ───────── */
.preview-shell {
  background: var(--slate-50);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 460px;
  display: flex; flex-direction: column;
}
.preview-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}
.preview-empty .ico {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 26px;
  color: var(--text-muted);
}

/* ───────── CITIZEN TOOLS ───────── */
.tool-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  margin-bottom: 8px;
  transition: all .15s ease;
}
.tool-item:hover { border-color: var(--blue); transform: translateX(2px); }
.tool-item.active { background: linear-gradient(90deg, var(--blue-50), transparent); border-color: var(--blue); }
.tool-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--slate-100); font-size: 18px;
  flex-shrink: 0;
}
.tool-item .tt { font-weight: 700; font-size: 13.5px; color: var(--text); }
.tool-item .td { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tool-arrow { color: var(--text-muted); font-size: 18px; margin-left: auto; }
.tool-item.active .tool-arrow { color: var(--blue); }

/* Result row */
.calc-result {
  background: linear-gradient(135deg, var(--blue-50), transparent);
  border: 1px solid var(--blue-100);
  border-radius: 14px;
  padding: 20px;
  margin-top: 18px;
}
.calc-result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  font-size: 14px;
}
.calc-result-row .k { color: var(--text-muted); }
.calc-result-row .v { font-family: var(--mono); font-weight: 700; color: var(--text); }
.calc-result-row.big { padding-top: 14px; border-top: 1px solid var(--blue-100); margin-top: 8px; }
.calc-result-row.big .k { color: var(--blue); font-weight: 700; }
.calc-result-row.big .v { font-size: 24px; color: var(--blue); }

/* ───────── DARK STRIP (for some headers) ───────── */
.dark-strip {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #06b6d4 100%);
  color: white;
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.dark-strip h2 {
  font-family: var(--display); font-weight: 800;
  margin: 0 0 4px; font-size: 18px;
  letter-spacing: .04em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.dark-strip p { margin: 0; color: rgba(255,255,255,.85); font-size: 13.5px; }

.alert-info {
  background: linear-gradient(90deg, var(--blue-50), transparent);
  border-left: 3px solid var(--blue);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.alert-warn {
  background: linear-gradient(90deg, #fef3c7, transparent);
  border-left: 3px solid var(--amber);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.alert-error {
  background: linear-gradient(90deg, #fee2e2, transparent);
  border-left: 3px solid var(--red);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
[data-theme="dark"] .alert-warn { background: linear-gradient(90deg, var(--amber-50), transparent); }
[data-theme="dark"] .alert-error { background: linear-gradient(90deg, #3a1820, transparent); }
.alert-success {
  background: linear-gradient(90deg, var(--emerald-50), transparent);
  border-left: 3px solid var(--emerald);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}

/* scrollbars */
.scroll-y { overflow-y: auto; }
.scroll-y::-webkit-scrollbar { width: 8px; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }

/* typing dots */
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--slate-400);
  animation: typingDot 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(-3px); opacity: 1; }
}

/* count-up animation helper */
.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ───────── MARKDOWN in chat bubbles ───────── */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md-h3 { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--blue); margin: 12px 0 6px; letter-spacing: -.01em; }
.md-h4 { font-family: var(--display); font-weight: 700; font-size: 13.5px; color: var(--text); margin: 10px 0 4px; letter-spacing: .02em; text-transform: uppercase; }
.md-p { margin: 6px 0; }
.md-ul { margin: 6px 0 8px; padding-left: 22px; }
.md-ul li { margin: 3px 0; }
.md-hr { border: 0; border-top: 1px dashed var(--border); margin: 12px 0; }
.md-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md-table th { background: var(--blue-50); color: var(--blue); font-weight: 700; }
.md strong { color: var(--blue); }
.bubble.user .md strong { color: white; }
.bubble.user .md-h3, .bubble.user .md-h4 { color: white; }
.bubble.user .md-hr { border-top-color: rgba(255,255,255,.4); }

/* ───────── chat maximize ───────── */
.chat-shell.maximized {
  position: fixed; inset: 24px;
  z-index: 60;
  height: auto;
  box-shadow: 0 30px 80px -20px rgba(11,26,46,.5);
}
.chat-icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--slate-100); color: var(--text-muted);
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px;
  transition: all .15s ease;
}
.chat-icon-btn:hover { background: var(--blue-50); color: var(--blue); }

/* ───────── AI Agent (floating) — multi-mode + maximize ───────── */
.aia-window {
  position: fixed; bottom: 100px; right: 24px;
  width: min(440px, 92vw); height: min(600px, 78vh);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(11,26,46,.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 50;
}
.aia-window.maximized {
  inset: 24px;
  width: auto; height: auto;
  right: 24px; left: 24px; top: 24px; bottom: 24px;
}
.aia-head {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--blue), #2a8bd4);
  color: white;
  display: flex; align-items: center; gap: 10px;
}
.aia-head .icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-size: 16px;
}
.aia-head .title { font-family: var(--display); font-weight: 800; font-size: 14px; }
.aia-head .sub { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.8); margin-top: 1px; }
.aia-head button {
  background: rgba(255,255,255,.12); border: 0; color: white;
  width: 30px; height: 30px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
  display: grid; place-items: center;
  margin-left: 4px;
}
.aia-head button:hover { background: rgba(255,255,255,.22); }
.aia-modes {
  display: flex; gap: 4px;
  padding: 10px 12px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--border);
}
.aia-mode {
  flex: 1;
  padding: 7px 6px; border-radius: 8px;
  font-family: var(--display); font-weight: 700; font-size: 11px;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--card-bg); color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: all .15s ease;
}
.aia-mode:hover { border-color: var(--blue); color: var(--blue); }
.aia-mode.active { background: linear-gradient(135deg, var(--blue), #2a8bd4); color: white; border-color: var(--blue); box-shadow: 0 2px 6px rgba(30,108,176,.4); }
.aia-mode .em { font-size: 16px; }
.aia-body {
  flex: 1; padding: 14px;
  overflow-y: auto;
  background: var(--page-bg);
}
.aia-foot {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center;
  background: var(--card-bg);
}

/* link-style btn */
.link-btn {
  background: transparent; border: 0; cursor: pointer;
  color: var(--blue); font-weight: 600; font-size: 13px;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }
.link-btn {
  background: transparent; border: 0; cursor: pointer;
  color: var(--blue); font-weight: 600; font-size: 13px;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* feature tile (home) */
.feature-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
}
.feature-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-tile .ft-glow {
  position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  opacity: .15; filter: blur(20px);
  transition: opacity .25s ease;
}
.feature-tile:hover .ft-glow { opacity: .35; }
.feature-tile .ft-ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 26px;
  position: relative; z-index: 1;
}
.feature-tile h3 {
  font-family: var(--display); font-weight: 800; font-size: 18px;
  margin: 0; color: var(--text);
  position: relative; z-index: 1;
}
.feature-tile p {
  margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.55;
  position: relative; z-index: 1; flex: 1;
}
.feature-tile .ft-cta {
  font-family: var(--display); font-weight: 700; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue); position: relative; z-index: 1;
  display: inline-flex; gap: 6px; transition: gap .2s ease;
}
.feature-tile:hover .ft-cta { gap: 10px; }

/* ── Mobile polish (responsive-audit fixes) ── */
@media (max-width: 760px) {
  /* Wide data/markdown tables scroll instead of overflowing the page */
  .md-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Force sidebar layouts to stack even when set inline (e.g. AI Advocate "1fr 320px") */
  .grid-sidebar, .grid-sidebar-sm { grid-template-columns: 1fr !important; }
}
@media (max-width: 600px) {
  /* Footer + multi-column grids stack to a single column on phones */
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .page { padding: 14px; }
  .nav-link { padding: 5px 8px; font-size: 11px; }
  /* Floating AI agent window + launcher: clear of screen edges, easy to reach */
  .aia-window { width: 95vw; right: 2.5vw; }
  .ai-agent-launcher { right: 12px; bottom: 12px; }
  .ai-agent-btn { width: 50px; height: 50px; font-size: 20px; }
}

/* ── Accessibility & UX polish ── */
/* Visible keyboard focus ring (mouse clicks stay clean via :focus-visible) */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Skip-to-content link — hidden until keyboard-focused */
.skip-link {
  position: fixed; left: 10px; top: -52px; z-index: 9999;
  background: var(--blue); color: #fff; padding: 9px 16px; border-radius: 0 0 10px 10px;
  font-weight: 700; font-size: 13px; text-decoration: none; transition: top .16s ease;
}
.skip-link:focus { top: 0; }
/* Comfortable touch targets on phones (WCAG 2.5.5) */
@media (max-width: 760px) {
  .nav-link, .chip, .segment-btn, .pill[role="button"] {
    min-height: 38px; display: inline-flex; align-items: center;
  }
  .chat-icon-btn, .theme-toggle, .ai-agent-btn, .chat-mic, .chat-send { min-width: 40px; min-height: 40px; }
  .tool-item { min-height: 44px; }
}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .feature-tile:hover, .guide-card:hover { transform: none; }
}
