:root {
  --navy-950: #0f172a;
  --navy-900: #111c33;
  --navy-800: #1e293b;
  --navy-700: #243653;
  --blue: #0b5bd3;
  --blue-dark: #084ba8;
  --red: #e63946;
  --red-dark: #bb2d3b;
  --green: #4caf50;
  --green-dark: #3d8b40;
  --orange: #e85d2a;
  --orange-dark: #c94e22;
  --amber: #ffb020;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --line: rgba(148, 163, 184, .2);
  --surface: rgba(30, 41, 59, .88);
  --radius: 16px;
  --max-width: 1280px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .24);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --focus-ring: 3px solid rgba(159, 197, 255, .85);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--navy-950);
  font-family: 'PT Sans', Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .65rem 1rem; background: #fff; color: var(--navy-950); border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 1rem; }
.container { width: min(var(--max-width), calc(100% - 2rem)); margin-inline: auto; }
.section { padding: 5.5rem 0; position: relative; }
.section--compact { padding: 3.5rem 0; }
.section--navy { background: var(--navy-950); }
.section--blue { background: var(--navy-900); }
.section--slate { background: #15243f; }
.section-heading { max-width: 880px; margin: 0 auto 2.75rem; text-align: center; }
.section-heading h1 { font-size: clamp(2.35rem, 4.4vw, 4rem); overflow-wrap: normal; word-break: normal; hyphens: auto; }
.section-action { margin-top: 1.7rem; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .85rem; color: #9fc5ff; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 1.75rem; height: 1px; background: currentColor; }
.text-center .eyebrow::after { content: ''; width: 1.75rem; height: 1px; background: currentColor; }
h1, h2, h3, h4 { margin: 0; font-family: 'PT Serif', Georgia, serif; line-height: 1.16; }
h1 { font-size: clamp(2.35rem, 5vw, 4.6rem); letter-spacing: -.03em; }
h2 { color: var(--text); font-size: clamp(2rem, 3.5vw, 2.8rem); }
h3 { color: var(--text); font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin: 0; }
.lede { color: var(--muted); font-size: 1.125rem; }
.muted { color: var(--muted-2); }
.text-center { text-align: center; }

.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: rgba(15, 23, 42, .985); box-shadow: 0 8px 24px rgba(2, 6, 23, .18); backdrop-filter: blur(14px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand-mark { display: none; }
.brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--muted); font-size: .95rem; transition: color .2s var(--ease); }
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: .65rem; }
.menu-toggle { display: none; width: 2.65rem; height: 2.65rem; border: 1px solid var(--line); border-radius: 10px; color: #fff; background: transparent; }
.menu-toggle svg { width: 1.35rem; height: 1.35rem; }
.mobile-nav { display: none; padding: .5rem 0 1rem; border-top: 1px solid var(--line); }
.mobile-nav a:not(.btn) { display: block; padding: .7rem 0; color: var(--muted); }
.mobile-nav a:not(.btn):hover { color: #fff; }
.mobile-nav .btn { margin-top: .4rem; }
.mobile-nav.is-open { display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: .72rem 1.1rem; border: 1px solid transparent; border-radius: 10px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .icon-btn:focus-visible, .menu-toggle:focus-visible, .faq-question:focus-visible,
.site-nav a:focus-visible, .mobile-nav a:focus-visible, .footer-links a:focus-visible, .city-option:focus-visible,
.story-play:focus-visible, .faq-filter:focus-visible, .back-link:focus-visible, .brand:focus-visible,
.case-card a:focus-visible, .mini-card a:focus-visible, .skip-link:focus-visible {
  outline: var(--focus-ring); outline-offset: 2px;
}
.btn--primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(11, 91, 211, .24); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { color: var(--text); border-color: rgba(248, 250, 252, .3); background: rgba(248, 250, 252, .04); }
.btn--outline:hover { border-color: #9fc5ff; background: rgba(248, 250, 252, .1); }
.btn--danger { color: #fff; background: var(--red); }
.btn--danger:hover { background: var(--red-dark); }
.btn--success { color: #fff; background: var(--green); }
.btn--success:hover { background: var(--green-dark); }
.btn--max { color: #fff; background: var(--orange); }
.btn--max:hover { background: var(--orange-dark); }
.btn--small { min-height: 2.4rem; padding: .55rem .85rem; font-size: .9rem; }
.btn--wide { width: 100%; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(248, 250, 252, .04); }
.icon-btn:hover { color: #fff; background: rgba(248, 250, 252, .1); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.notification-dot { position: absolute; top: .5rem; right: .5rem; width: .55rem; height: .55rem; border-radius: 999px; background: var(--red); }

.hero { position: relative; overflow: hidden; padding: 3rem 0 2rem; background: radial-gradient(circle at 90% 8%, rgba(11, 91, 211, .28), transparent 34%), linear-gradient(135deg, #101d36, #111c33 55%, #171d43); }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.hero__content { position: relative; z-index: 1; }
.hero__content h1 { margin-bottom: 1.1rem; }
.hero__content .lede { max-width: 720px; margin-bottom: 1.5rem; }
.text-center .lede { margin-left: auto; margin-right: auto; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); align-items: center; gap: 4rem; }
.hero-copy { max-width: 650px; }
.hero-copy h1 { margin-bottom: 1.35rem; }
.hero-copy h1 span { color: #9fc5ff; }
.hero-copy .lede { max-width: 590px; margin-bottom: 1.8rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.45rem; padding: .45rem .7rem; border: 1px solid rgba(159, 197, 255, .35); border-radius: 999px; color: #dbeafe; background: rgba(11, 91, 211, .16); font-size: .88rem; font-weight: 700; }
.hero-badge svg { color: #9fc5ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.15rem; }
.hero-actions--center { justify-content: center; }
.hero-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; max-width: 540px; }
.hero-feature { display: flex; align-items: center; gap: .65rem; min-height: 3.5rem; padding: .7rem .8rem; border-left: 2px solid rgba(159, 197, 255, .45); color: var(--muted); background: rgba(30, 41, 59, .45); }
.hero-feature svg { width: 1.2rem; color: #9fc5ff; flex-shrink: 0; }
.hero-feature strong { display: block; color: #fff; font-size: .9rem; }
.hero-visual { position: relative; min-height: 470px; }
.hero-panel { position: absolute; inset: 2.8rem .25rem -1rem 2.5rem; padding: 1.3rem; border: 1px solid rgba(159, 197, 255, .25); border-radius: 20px; background: rgba(15, 23, 42, .67); box-shadow: var(--shadow); }
.hero-panel::before { content: ''; position: absolute; top: -1px; left: 10%; right: 10%; height: 2px; background: var(--blue); }
.panel-kicker { color: var(--muted-2); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.panel-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1rem 0 1.35rem; }
.panel-main strong { display: block; font-size: clamp(2.2rem, 4vw, 3.35rem); line-height: 1; }
.panel-main span { color: var(--green); font-size: .85rem; font-weight: 700; }
.panel-status { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.status-dot { width: .55rem; height: .55rem; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(76, 175, 80, .12); }
.panel-bar { height: .48rem; margin: 1rem 0 1.25rem; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .2); }
.panel-bar span { display: block; width: 68%; height: 100%; border-radius: inherit; background: var(--blue); transform-origin: left; animation: grow-bar 1.2s var(--ease) both; }
.panel-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.panel-list li { display: flex; align-items: center; justify-content: space-between; padding: .75rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(30, 41, 59, .5); font-size: .88rem; }
.panel-list b { color: #fff; }
.hero-float { position: absolute; display: grid; gap: .2rem; min-width: 150px; padding: .95rem 1rem; border: 1px solid rgba(159, 197, 255, .28); border-radius: 14px; background: #172740; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); animation: drift 6s ease-in-out infinite; }
.hero-float--top { top: 0; right: -.25rem; }
.hero-float--bottom { bottom: 0; left: 0; animation-delay: -2.4s; }
.hero-float strong { font-size: 1.35rem; }
.hero-float span { color: var(--muted-2); font-size: .8rem; }
.hero-foot-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 3.7rem; }
.hero-foot-stat { padding: .95rem 1rem; border-top: 1px solid rgba(159, 197, 255, .32); color: var(--muted-2); }
.hero-foot-stat strong { display: block; color: #fff; font-size: 1.45rem; line-height: 1.2; }

.back-link { display: flex; width: fit-content; align-items: center; gap: .4rem; margin: 0 auto 1.2rem 0; color: #9fc5ff; font-size: .9rem; font-weight: 700; }
.back-link:hover { color: #fff; }
.stats-grid { margin-top: 2.2rem; }
.grid { display: grid; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cards-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-card { padding: 1.35rem; }
.stat-card__value { color: #9fc5ff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.1; }
.stat-card p { color: var(--muted); margin-top: .35rem; }
.metric { padding: 1.35rem; display: grid; gap: .35rem; }
.metric strong { color: #9fc5ff; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.metric span { color: var(--muted); }
.mini-card { padding: 1.25rem; display: grid; align-content: start; gap: .55rem; }
.mini-card h3 { font-size: 1.15rem; }
.mini-card p { color: var(--muted); }
.mini-card a, .case-link { color: #9fc5ff; font-size: .9rem; font-weight: 700; }
.mini-card a:hover, .case-link:hover { color: #fff; }
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.details div { padding: .75rem; border: 1px solid var(--line); border-radius: 10px; }
.details dt { color: var(--muted-2); font-size: .8rem; }
.details dd { margin: .15rem 0 0; }
.primary { color: #9fc5ff; }
.danger { color: #ff9ca5; }
.success { color: #b8e7bc; }
.warning { color: #ffd18a; }
.status { justify-self: start; display: inline-flex; align-items: center; padding: .25rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.status--success { color: #d5f5d7; background: rgba(76, 175, 80, .18); }
.status--info { color: #dbeafe; background: rgba(11, 91, 211, .2); }
.empty-state { padding: 2.5rem 0; color: var(--muted-2); text-align: center; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-list span { padding: .32rem .6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8rem; }
.stars { display: inline-flex; gap: .15rem; color: var(--amber); vertical-align: middle; }
.stars svg { width: .95rem; height: .95rem; }

.metric-card { padding: 1.5rem; }
.metric-card > div { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.metric-icon { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: 10px; color: #fff; background: var(--blue); }
.metric-icon svg { width: 1.3rem; }
.metric-card strong { display: block; color: #fff; font-size: 2.1rem; line-height: 1; }
.metric-card p { color: var(--muted); }
.metric-card small { display: block; margin-top: .45rem; color: var(--muted-2); font-size: .8rem; }
.metric-card--danger .metric-icon { background: var(--red); }
.metric-card--success .metric-icon { background: var(--green); }

.story-card { overflow: hidden; }
.story-cover { position: relative; min-height: 180px; padding: 1.1rem; display: flex; align-items: flex-end; background: linear-gradient(145deg, #172f55, #12203a); }
.story-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, .86), transparent 68%); }
.story-play { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: #fff; background: rgba(11, 91, 211, .86); transition: transform .25s var(--ease), background .25s; }
.story-card:hover .story-play { transform: translate(-50%, -50%) scale(1.08); background: var(--blue-dark); }
.story-cover strong, .story-cover span { position: relative; z-index: 1; }
.story-cover strong { font-size: 1.15rem; }
.story-cover span { margin-left: .45rem; color: #dbeafe; font-size: .84rem; }
.story-body { padding: 1.1rem; }
.story-body p { color: var(--muted); font-size: .94rem; }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .82rem; }
.story-meta a { color: #9fc5ff; font-weight: 700; }
.story-meta a:hover { color: #fff; }

.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.process-step { position: relative; padding: 1.25rem 1.1rem; border-top: 2px solid var(--blue); }
.process-step:not(:last-child)::after { content: ''; position: absolute; top: -2px; right: -1px; width: 2rem; height: 2px; background: rgba(159, 197, 255, .36); }
.process-number { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 700; }
.process-step h3 { margin-bottom: .45rem; font-family: 'PT Sans', Arial, sans-serif; font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; }
.process-step p { color: var(--muted-2); font-size: .88rem; }
.process-step:last-child { border-color: var(--green); }
.process-step:last-child .process-number { background: var(--green); }

.city-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; }
.city-box h3 { margin-bottom: .35rem; }
.city-box p { color: var(--muted); }
.case-card { position: relative; padding: 1.25rem; display: flex; flex-direction: column; gap: .1rem; }
.case-card > :last-child { margin-top: auto; }
.case-label { display: inline-flex; align-items: center; gap: .35rem; justify-self: start; margin-bottom: .9rem; padding: .3rem .55rem; border-radius: 999px; color: #b8e7bc; background: rgba(76, 175, 80, .13); font-size: .74rem; font-weight: 700; }
.case-card h3 { margin-bottom: .75rem; font-family: 'PT Sans', Arial, sans-serif; font-size: 1.65rem; }
.case-detail { display: flex; align-items: flex-start; gap: .5rem; margin: .45rem 0; color: var(--muted); font-size: .9rem; }
.case-detail svg { width: 1rem; color: var(--muted-2); flex-shrink: 0; margin-top: .2rem; }
.case-card a { display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem; color: #9fc5ff; font-size: .88rem; font-weight: 700; }
.case-card a:hover { color: #fff; }
.case-card time { color: var(--muted); font-size: .9rem; }
.case-note { margin-top: 1.15rem; color: var(--muted-2); font-size: .8rem; }

.case-full { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); overflow: hidden; }
.case-full__side { display: grid; align-content: start; gap: 1.1rem; padding: 1.35rem; border-right: 1px solid var(--line); }
.case-full__head { display: flex; align-items: center; gap: .8rem; }
.case-full__head h2 { font-size: 1.2rem; }
.case-facts { display: grid; gap: .55rem; margin: 0; }
.case-facts div { display: grid; gap: .1rem; }
.case-facts dt { color: var(--muted-2); font-size: .78rem; }
.case-facts dd { margin: 0; font-size: .92rem; }
.case-money { display: grid; gap: .55rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.case-money div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.case-money small { color: var(--muted-2); }
.case-full__body { display: grid; align-content: start; gap: .8rem; padding: 1.35rem; }
.case-full__body h3 { font-size: 1.2rem; }
.case-full__body h4 { margin-top: .4rem; color: var(--muted-2); font-family: 'PT Sans', Arial, sans-serif; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
.case-full__body p { color: var(--muted); }

.calculator { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 2rem; padding: 2rem; }
.calculator h2 { margin-bottom: .8rem; }
.calculator form { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.calculator form .btn { margin-top: .25rem; }
.field label { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .88rem; font-weight: 700; }
.field input { width: 100%; height: 2.85rem; padding: 0 .85rem; border: 1px solid rgba(148, 163, 184, .35); border-radius: 9px; color: #fff; background: rgba(15, 23, 42, .65); }
.field input::placeholder, .form-field input::placeholder, .message-form input::placeholder { color: #8ca0bb; }
.calc-result { align-self: stretch; padding: 1.4rem; border-left: 1px solid var(--line); }
.calc-result p { color: var(--muted); }
.calc-total { margin: .4rem 0 1rem; font-size: 2.7rem; font-weight: 700; line-height: 1; }
.calc-output { display: grid; gap: .55rem; }
.calc-output div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--muted); font-size: .9rem; }
.calc-output strong { color: #fff; }
.calc-output .good strong { color: #b8e7bc; }
.calc-hint { margin-top: .95rem; color: var(--muted-2); font-size: .78rem; }

.promo { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.35rem 1.5rem; border: 1px solid rgba(230, 57, 70, .3); border-radius: var(--radius); background: rgba(230, 57, 70, .1); }
.promo strong { display: block; font-size: 1.15rem; }
.promo p { color: var(--muted); }
.cta-card { display: grid; justify-items: center; gap: .8rem; padding: 2rem; text-align: center; }
.cta-card .hero-actions { justify-content: center; margin-bottom: 0; }
.court-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
.court-card { padding: 1.5rem; }
.court-card h3 { margin-bottom: .65rem; }
.court-card p { color: var(--muted); }
.court-status { display: flex; align-items: center; gap: .55rem; margin: 1rem 0 1.2rem; color: #b8e7bc; font-size: .9rem; font-weight: 700; }
.court-side { display: grid; align-content: center; gap: .75rem; padding: 1.5rem; }
.court-side strong { font-size: 2.4rem; line-height: 1; }
.court-side span { color: var(--muted-2); font-size: .88rem; }
.stat-band { background: var(--navy-900); }
.stat-showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stat-showcase .surface { padding: 1.5rem; }
.stat-showcase strong { display: block; margin-bottom: .5rem; color: #9fc5ff; font-size: 2.5rem; line-height: 1; }
.stat-showcase p { color: var(--muted); }
.stat-foot { margin-top: 1rem; color: var(--muted-2); text-align: center; font-size: .9rem; }

.tracker { padding: 1.5rem; }
.tracker-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.tracker-top strong { font-size: 1.2rem; }
.tracker-top span { color: #b8e7bc; font-weight: 700; }
.tracker-bar { height: .55rem; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .2); }
.tracker-bar span { display: block; width: 64%; height: 100%; border-radius: inherit; background: var(--blue); transform-origin: left; }
.tracker-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: .65rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.tracker-list li { padding-top: .7rem; border-top: 2px solid rgba(148, 163, 184, .28); color: var(--muted-2); font-size: .84rem; }
.tracker-list li.is-done { border-color: var(--green); color: #fff; }

.faq-search { position: relative; margin-bottom: 1rem; }
.faq-search svg { position: absolute; top: 50%; left: .85rem; width: 1.1rem; transform: translateY(-50%); color: var(--muted-2); }
.faq-search input { width: 100%; height: 3rem; padding: 0 1rem 0 2.75rem; border: 1px solid var(--line); border-radius: 10px; color: #fff; background: rgba(30, 41, 59, .65); }
.site-footer { padding: 3.4rem 0 2rem; border-top: 1px solid var(--line); background: #0b1224; }
.faq-categories { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.faq-filter { padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: .84rem; }
.faq-filter.is-active, .faq-filter:hover { color: #fff; border-color: #9fc5ff; background: rgba(11, 91, 211, .18); }
.faq-list { display: grid; gap: .55rem; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: rgba(30, 41, 59, .65); overflow: hidden; }
.faq-question { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem 1.1rem; border: 0; color: #fff; background: transparent; text-align: left; font-weight: 700; }
.faq-question svg { flex-shrink: 0; width: 1.15rem; color: var(--muted-2); transition: transform .25s var(--ease); }
.faq-item.is-open .faq-question svg { transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.faq-answer > div { overflow: hidden; }
.faq-answer p { padding: 0 1.1rem 1rem; color: var(--muted); font-size: .92rem; }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.25rem; }
.filter-bar__label { color: var(--muted); }
.filter-bar .btn.is-active, .tabs .btn.is-active { color: #fff; border-color: #9fc5ff; background: rgba(11, 91, 211, .18); }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tab-count { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px; color: #fff; background: var(--red); font-size: .72rem; font-weight: 700; }

.timeline { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: minmax(8.5rem, .32fr) minmax(0, 1fr); gap: 1rem; align-items: start; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.timeline__meta, .timeline__content { display: grid; align-content: start; gap: .4rem; min-width: 0; }
.timeline time { color: var(--muted-2); font-size: .82rem; line-height: 1.35; }
.timeline__content strong, .timeline__content small { overflow-wrap: anywhere; }
.timeline__content small { color: var(--muted); line-height: 1.5; }
.timeline li.is-complete { border-color: rgba(76, 175, 80, .35); }
.timeline li.is-complete time { color: #b8e7bc; }
.timeline li.is-current { border-color: rgba(159, 197, 255, .5); background: rgba(11, 91, 211, .1); }

.review-card { padding: 1.35rem; display: grid; gap: 1rem; align-content: start; }
.review-card__head { display: flex; align-items: center; gap: .8rem; }
.review-card__head h2 { font-size: 1.2rem; }
.review-card footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; color: var(--muted-2); font-size: .88rem; }
.avatar { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--blue); font-weight: 700; }
.avatar--large { width: 3.4rem; height: 3.4rem; }
.review-card__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.review-card__metrics div { padding: .6rem; border-radius: 10px; background: rgba(15, 23, 42, .55); }
.review-card__metrics small { color: var(--muted); }
.review-card__metrics strong { display: block; margin-top: .15rem; }
.review-card blockquote { margin: 0; color: var(--muted); }
.video-badge { margin-left: auto; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: 0 0 auto; border-radius: 999px; color: #fff; background: rgba(11, 91, 211, .85); }
.video-badge svg { width: .8rem; height: .8rem; }

.auth-layout { min-height: 100vh; padding: 3rem 0; background: radial-gradient(circle at 80% 10%, rgba(11, 91, 211, .25), transparent 35%), var(--navy-950); }
.auth-layout__container { max-width: 640px; }
.auth-card { margin-top: 1.25rem; overflow: hidden; }
.auth-card__header, .auth-card__body { padding: 1.4rem; }
.auth-card__header { border-bottom: 1px solid var(--line); }
.auth-card__header .brand { justify-content: center; margin-bottom: 0; }
.auth-card__header .brand + .tabs { margin-top: 1rem; }
.auth-card .tabs { justify-content: center; }
.auth-card__body section > h1, .auth-card__body section > h2, .auth-card__body section > p { text-align: center; }
.auth-card__body section > h1, .auth-card__body section > h2 { margin-bottom: .4rem; }
.auth-title { font-size: 1.45rem; }
.auth-card__body .btn--max { display: flex; width: 100%; margin: 1.2rem 0 0; justify-content: center; }
.form .btn { justify-self: stretch; width: 100%; justify-content: center; }
.form { display: grid; gap: .9rem; }
.form-field { display: grid; gap: .4rem; }
.form-field label { color: var(--muted); font-weight: 700; font-size: .92rem; }
.form-field input, .message-form input { width: 100%; min-height: 2.9rem; padding: .7rem .8rem; border: 1px solid rgba(148, 163, 184, .35); border-radius: 9px; color: #fff; background: rgba(15, 23, 42, .65); }
.form-field small { color: var(--muted-2); }
.form-divider { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; color: var(--muted-2); font-size: .88rem; text-align: center; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.dashboard-welcome { margin: 1.5rem 0; }
.status-hero { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--blue), #312e81); }
.status-hero h2 { margin: .3rem 0; }
.status-hero__debt { display: grid; align-content: center; text-align: right; }
.status-hero__debt strong { font-size: 1.8rem; }
.status-hero__debt small { color: rgba(255, 255, 255, .75); }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1rem; margin-top: 1rem; }
.dashboard-main, .dashboard-sidebar { display: grid; align-content: start; gap: 1rem; }
.dashboard-sidebar .surface { padding: 1.35rem; }
.tab-panel { padding: 1.35rem; }
.tab-panel h2, .dashboard-sidebar h2 { margin-bottom: 1rem; font-size: 1.35rem; }
.quick-stats { margin-top: 1rem; }
.quick-stats .stat-card { background: rgba(15, 23, 42, .45); }
.quick-stats .stat-card span { color: var(--muted); }
.document-list { display: grid; gap: .7rem; }
.document-list article { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; }
.document-list small { display: block; color: var(--muted-2); }
.document-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 9px; color: #9fc5ff; background: rgba(11, 91, 211, .14); }
.document-icon svg { width: 1.15rem; height: 1.15rem; }
.document-download { min-height: 2.45rem; padding: .55rem .75rem; }
.document-download svg { width: 1rem; height: 1rem; }
.message-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.message { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; }
.message p { color: var(--muted); font-size: .9rem; }
.message time { flex-shrink: 0; color: var(--muted-2); font-size: .82rem; }
.message--unread { border-color: rgba(159, 197, 255, .45); background: rgba(11, 91, 211, .07); }
.message-form { display: flex; gap: .65rem; margin-top: 1rem; }
.manager { display: flex; align-items: center; gap: .8rem; }
.manager p { color: var(--muted); }
.manager-card, .help-card { display: grid; align-content: start; gap: 1rem; }
.help-card p { color: var(--muted); }
.action-list { display: grid; gap: .65rem; }

.not-found { min-height: 72vh; display: grid; place-items: center; padding: 3rem 0; text-align: center; }
.not-found__code { color: #9fc5ff; font-size: clamp(6rem, 20vw, 13rem); font-weight: 700; line-height: .9; }
.not-found .lede { margin: 1rem 0 1.5rem; }

.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 1.75rem; padding-bottom: 2rem; }
.footer-grid h3 { margin-bottom: .75rem; font-family: 'PT Sans', Arial, sans-serif; font-size: .88rem; letter-spacing: .05em; text-transform: uppercase; }
.footer-grid p { max-width: 300px; margin-top: 1rem; color: var(--muted-2); font-size: .88rem; }
.footer-links { display: grid; gap: .45rem; }
.footer-links a { color: var(--muted-2); font-size: .88rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: #93a5bf; font-size: .8rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; background: rgba(2, 6, 23, .78); opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal { width: min(620px, 100%); max-height: min(720px, 92vh); overflow: auto; padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: #101c31; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); transform: translateY(10px); transition: transform .25s var(--ease); }
.modal-backdrop.is-open .modal { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.modal-head h2 { font-size: 1.7rem; }
.city-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.city-option { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(30, 41, 59, .62); text-align: left; }
.city-option:hover { color: #fff; border-color: #9fc5ff; }
.city-option[aria-current="page"] { color: #fff; border-color: #9fc5ff; background: rgba(11, 91, 211, .18); }
.city-option small { color: var(--muted-2); }
.ai-launcher { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50; display: inline-flex; align-items: center; gap: .55rem; padding: .72rem .9rem; border: 1px solid rgba(159, 197, 255, .42); border-radius: 999px; color: #fff; background: var(--blue); box-shadow: 0 12px 28px rgba(11, 91, 211, .3); font-weight: 700; }
.ai-launcher:hover { background: var(--blue-dark); transform: translateY(-2px); }
.ai-launcher svg { width: 1.1rem; }
.ai-launcher.is-panel-open { opacity: 0; pointer-events: none; transform: translateY(10px); }
.ai-backdrop { position: fixed; inset: 0; z-index: 54; background: rgba(2, 6, 23, .72); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.ai-panel { position: fixed; right: 1.1rem; bottom: 4.9rem; z-index: 55; width: min(390px, calc(100% - 2rem)); padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: var(--navy-900); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease); }
.ai-panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.ai-panel h2 { margin-bottom: .35rem; font-size: 1.45rem; }
.ai-panel p { color: var(--muted); font-size: .9rem; }
.ai-panel ul { display: grid; gap: .4rem; margin: 1rem 0; padding-left: 1.1rem; color: var(--muted); font-size: .86rem; }
.ai-panel .btn { width: 100%; }
.ai-chat { display: grid; gap: .75rem; margin-top: 1rem; }
.ai-chat__messages { display: grid; gap: .55rem; max-height: 18rem; overflow-y: auto; padding-right: .25rem; }
.ai-chat__message { width: fit-content; max-width: 92%; margin: 0; padding: .65rem .8rem; border-radius: 12px; background: rgba(159, 197, 255, .12); }
.ai-chat__message--user { justify-self: end; color: #fff !important; background: var(--blue); }
.ai-chat__form { display: grid; gap: .55rem; }
.ai-chat__form textarea { min-height: 5rem; resize: vertical; }
.ai-chat--cabinet .ai-chat__messages { min-height: 8rem; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-stagger] > * { transition-delay: calc(var(--stagger-index, 0) * 70ms); }
.count-up { font-variant-numeric: tabular-nums; }
@keyframes grow-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1100px) {
  .site-nav { gap: .85rem; }
  .hero-grid { gap: 2.5rem; }
  .hero-visual { min-height: 430px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-nav, .header-actions { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .hero-grid, .calculator, .court-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 610px; width: 100%; margin: 0 auto; }
  .calc-result { border-top: 1px solid var(--line); border-left: 0; padding: 1.35rem 0 0; }
  .cards-grid--4, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .process-step { border: 1px solid var(--line); border-top: 2px solid var(--blue); border-radius: var(--radius); }
  .process-step:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .tracker-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--3.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid[data-filter-items="cases"] { grid-template-columns: 1fr; }
  .case-full { grid-template-columns: 1fr; }
  .case-full__side { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .container { width: min(var(--max-width), calc(100% - 1.4rem)); }
  .section { padding: 4rem 0; }
  .hero { padding: 2.5rem 0 1.5rem; }
  .hero-actions, .hero-actions .btn { width: 100%; }
  .hero-actions .btn { min-height: 3.2rem; }
  .hero-features, .cards-grid, .cards-grid--4, .stat-showcase { grid-template-columns: 1fr; }
  .grid--2, .grid--3, .grid--4, .details, .review-card__metrics { grid-template-columns: 1fr; }
  .hero-visual { min-height: 390px; }
  .hero-panel { inset: 2.8rem 0 1rem 0; }
  .hero-float--top { right: -.1rem; }
  .hero-float--bottom { left: -.1rem; }
  .hero-foot-stats { grid-template-columns: repeat(2, 1fr); margin-top: 2.8rem; }
  .process-grid, .tracker-list { grid-template-columns: 1fr; }
  .process-step { padding: 1rem; }
  .city-box, .promo, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .city-box .btn, .promo .btn { width: 100%; }
  .city-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer-docs { justify-content: center; }
  .status-hero, .message-form { align-items: stretch; flex-direction: column; }
  .status-hero__debt { text-align: left; }
  .timeline li { grid-template-columns: 1fr; }
  .ai-launcher { right: .7rem; bottom: .7rem; }
  .ai-panel { right: .7rem; bottom: 4.4rem; }
}
@media (max-width: 640px) {
  .filter-bar {
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .filter-bar__label {
    flex: 0 0 100%;
  }
  .filter-bar .btn {
    flex: 1 1 calc(50% - .3rem);
    min-width: 0;
    white-space: normal;
  }
}

/* --- Added Responsive Fixes --- */
body { overflow-x: hidden; }
.text-center .eyebrow::after, .section-heading .eyebrow::after { content: ''; width: 1.75rem; height: 1px; background: currentColor; }
.process-step:last-child { border-color: var(--line); border-top-color: var(--green); }

@media (max-width: 1100px) {
  .site-nav { gap: .75rem; font-size: .88rem; }
  .header-actions .btn { padding: .5rem .75rem; font-size: .85rem; }
}

@media (max-width: 900px) {
  .hero-visual { min-height: auto; }
  .hero-panel { position: relative; inset: auto; margin-bottom: 1rem; }
  .hero-float { position: static; min-width: 0; width: 100%; margin-top: .65rem; transform: none !important; animation: none !important; }
  .hero-foot-stats { grid-template-columns: repeat(2, 1fr); margin-top: 2.5rem; }
}

@media (max-width: 640px) {
  .calculator { padding: 1.25rem 1rem; }
  .calc-total { font-size: clamp(1.8rem, 7vw, 2.7rem); }
  .timeline li { grid-template-columns: 1fr; gap: .75rem; }
  .timeline__meta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .timeline__meta .status { justify-self: end; }
  .court-side { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .auth-layout { padding: 1.75rem 0; }
  .auth-card__header, .auth-card__body { padding: 1rem; }
  .form-divider { margin: 1rem 0; }
}

/* --- Dashboard Fixes --- */
.stat-card strong { display: block; color: #9fc5ff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.1; }
.document-list + .btn, .tab-panel > .btn--wide { margin-top: 1rem; }
.manager-card h2, .help-card h2 { margin-bottom: 0; }
.status-hero h2 { display: inline-flex; align-items: center; gap: .5rem; margin: .3rem 0; }
.status-hero h2 svg { flex-shrink: 0; }
.dashboard-welcome h1 { overflow-wrap: break-word; }
.document-list article > div { min-width: 0; }

@media (max-width: 480px) {
  .dashboard-welcome h1 { font-size: clamp(1.65rem, 7vw, 2.35rem); }
}

/* --- Footer Document Links & Disclaimer --- */
.footer-docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
}
.footer-docs a {
  color: #93a5bf;
  font-size: .8rem;
  transition: color .2s;
}
.footer-docs a:hover { color: #fff; }
.footer-disclaimer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  padding-bottom: .5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #68799a;
  font-size: .75rem;
  line-height: 1.6;
}

/* --- Text Social Icons --- */
.social-icons {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .6rem;
  min-height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(248, 250, 252, .04);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.social-icons a:hover {
  color: #fff;
  border-color: #9fc5ff;
  background: rgba(11, 91, 211, .18);
  transform: translateY(-2px);
}

/* --- Calculator: Dynamic Debts --- */
.debt-row {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
}
.debt-row .field { flex: 1; }
.btn--remove-debt {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  border: 1px solid rgba(230, 57, 70, .35);
  border-radius: 9px;
  color: #ff9ca5;
  background: rgba(230, 57, 70, .1);
  transition: background .2s, color .2s;
}
.btn--remove-debt:hover {
  color: #fff;
  background: rgba(230, 57, 70, .25);
}
.btn--remove-debt svg { width: 1.1rem; height: 1.1rem; }
.btn--add-debt {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border: 1px dashed rgba(159, 197, 255, .4);
  border-radius: 9px;
  color: #9fc5ff;
  background: rgba(11, 91, 211, .08);
  font-size: .88rem;
  font-weight: 700;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn--add-debt:hover {
  border-color: #9fc5ff;
  background: rgba(11, 91, 211, .18);
  transform: translateY(-2px);
}
.btn--add-debt svg { width: .9rem; height: .9rem; }
.calc-disclaimer {
  margin-top: .75rem;
  color: var(--muted-2);
  font-size: .72rem;
  line-height: 1.5;
}

/* --- City Modal: Federal Districts --- */
.district-group {
  margin-bottom: .65rem;
}
.district-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #fff;
  background: rgba(11, 91, 211, .12);
  font-weight: 700;
  font-size: .92rem;
  transition: background .2s, border-color .2s;
}
.district-title:hover {
  border-color: #9fc5ff;
  background: rgba(11, 91, 211, .22);
}
.district-title svg {
  width: 1rem;
  height: 1rem;
  color: var(--muted-2);
  transition: transform .25s var(--ease);
}
.district-group.is-open .district-title svg {
  transform: rotate(180deg);
}
.district-cities {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.district-cities > div {
  overflow: hidden;
}
.district-group.is-open .district-cities {
  grid-template-rows: 1fr;
}
.district-cities .city-list {
  padding-top: .55rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --- Auth OTP Steps & Styling --- */
.auth-step {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}
.auth-step.is-active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}
.auth-step[hidden] {
  display: none !important;
}
.auth-steps-container {
  position: relative;
}

/* Glassmorphism auth card */
.auth-layout__container .auth-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-card input[type="email"], 
.auth-card input[type="text"] {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.15);
  transition: all 0.2s ease;
}
.auth-card input[type="email"]:focus, 
.auth-card input[type="text"]:focus {
  outline: none;
  box-shadow: none;
}

.btn-link {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-link:hover {
  color: var(--text-light);
}
.text-white { color: #fff; }

/* ===== SERVICES CARDS ===== */
.services-card { padding: 1.5rem; display: grid; align-content: start; gap: .75rem; transition: transform .25s var(--ease), box-shadow .25s; }
.services-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.services-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 12px; background: rgba(11, 91, 211, .18); color: #9fc5ff; }
.services-icon svg { width: 1.35rem; height: 1.35rem; }
.services-card h3 { font-size: 1.05rem; font-family: 'PT Sans', Arial, sans-serif; }
.services-card p { color: var(--muted); font-size: .9rem; flex: 1; }

/* ===== POST CARDS (BLOG) ===== */
.post-card { padding: 1.35rem; display: flex; flex-direction: column; gap: .65rem; transition: transform .25s var(--ease), box-shadow .25s; }
.post-card > :last-child { margin-top: auto; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.post-cat { display: inline-flex; align-self: start; padding: .28rem .55rem; border-radius: 999px; background: rgba(11, 91, 211, .18); color: #9fc5ff; font-size: .73rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.post-card h3 { font-size: 1rem; font-family: 'PT Sans', Arial, sans-serif; line-height: 1.4; }
.post-card h3 a { color: var(--text); transition: color .2s; }
.post-card h3 a:hover { color: #9fc5ff; }
.post-card p { color: var(--muted); font-size: .88rem; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .75rem; border-top: 1px solid var(--line); margin-top: auto; }
.post-meta time { color: var(--muted-2); font-size: .8rem; }
.post-meta a { color: #9fc5ff; font-size: .85rem; font-weight: 700; }
.post-meta a:hover { color: #fff; }

/* ===== NEWS CARDS ===== */
.news-card { padding: 1.35rem; display: flex; flex-direction: column; gap: .6rem; transition: transform .25s var(--ease), box-shadow .25s; }
.news-card > :last-child { margin-top: auto; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.news-date, .post-meta time { display: inline-flex; align-items: center; gap: 0.35rem; align-self: start; padding: .35rem .75rem; border: 1px solid rgba(159, 197, 255, 0.2); border-radius: 999px; background: rgba(159, 197, 255, 0.1); color: #9fc5ff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 4px 12px rgba(11, 91, 211, 0.1); }
.news-card h3 { font-size: 1rem; font-family: 'PT Sans', Arial, sans-serif; line-height: 1.4; }
.news-card h3 a { color: var(--text); transition: color .2s; }
.news-card h3 a:hover { color: #9fc5ff; }
.news-card p { color: var(--muted); font-size: .88rem; }
.news-link { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); color: #9fc5ff; font-size: .85rem; font-weight: 700; }
.news-link:hover { color: #fff; }

/* ===== ARTICLE / NEWS DETAIL PAGE ===== */
.article-hero { padding: 2.5rem 0 2rem; background: radial-gradient(circle at 80% 20%, rgba(11,91,211,.22), transparent 40%), var(--navy-900); }
.article-hero .eyebrow { margin-bottom: 1rem; }
.article-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); max-width: 820px; margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; color: var(--muted-2); font-size: .88rem; }
.article-meta span { display: flex; align-items: center; gap: .4rem; }
.article-body { max-width: 820px; margin: 0 auto; padding: 3.5rem 0 5rem; }
.article-body h2 { font-size: 1.55rem; margin: 2.5rem 0 1rem; }
.article-body h3 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
.article-body p { color: var(--muted); margin-bottom: 1.2rem; line-height: 1.75; }
.article-body ul, .article-body ol { padding-left: 1.5rem; color: var(--muted); margin-bottom: 1.2rem; line-height: 1.75; }
.article-body li { margin-bottom: .4rem; }
.article-body blockquote { border-left: 3px solid var(--blue); padding: .8rem 1.25rem; margin: 1.5rem 0; background: rgba(11,91,211,.1); border-radius: 0 10px 10px 0; color: var(--muted); font-style: italic; }
.article-cta { max-width: 820px; margin: 0 auto 4rem; padding: 2rem; border-radius: var(--radius); background: rgba(11,91,211,.14); border: 1px solid rgba(11,91,211,.3); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.article-cta p { color: var(--muted); margin: .35rem 0 0; }
.article-related { padding: 3.5rem 0; background: var(--navy-900); }

/* ===== SERVICES PAGE GROUPS ===== */
.service-group { margin-bottom: 3.5rem; }
.service-group h3 { font-size: 1.2rem; font-family: 'PT Sans', Arial, sans-serif; color: var(--muted-2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 1.2rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

/* ===== LISTING GRID (blog/news pages) ===== */
.listing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .cards-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-cta { flex-direction: column; }
}
@media (max-width: 400px) {
  .cards-grid--4 { grid-template-columns: 1fr; }
}

/* ===== COOKIE NOTICE ===== */
.cookie-notice { position: fixed; z-index: 80; right: 1rem; bottom: 1rem; display: flex; gap: 1rem; align-items: center; width: min(42rem, calc(100vw - 2rem)); padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; }
@media (max-width: 640px) { .cookie-notice { align-items: stretch; flex-direction: column; } }

/* ===== PORTAL FORMS ===== */
.auth-card--wide { width: min(52rem, 100%); }
.onboarding-layout { position: relative; overflow: hidden; padding-block: 2rem 3.5rem; background: radial-gradient(circle at 10% 5%, rgba(11, 91, 211, .22), transparent 28rem), radial-gradient(circle at 90% 85%, rgba(49, 46, 129, .2), transparent 30rem), var(--navy-950); }
.onboarding-layout::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .12; background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
.onboarding-layout .auth-layout__container { position: relative; z-index: 1; max-width: 900px; }
.onboarding-layout .auth-card { margin-top: 1rem; border-color: rgba(159, 197, 255, .18); box-shadow: 0 32px 70px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06); }
.onboarding-card__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-card__header.onboarding-card__header .brand { justify-content: flex-start; }
.onboarding-step { display: inline-flex; align-items: center; min-height: 2rem; padding: .3rem .75rem; border: 1px solid rgba(159, 197, 255, .2); border-radius: 999px; color: #bcd5fa; background: rgba(11, 91, 211, .1); font-size: .8rem; font-weight: 700; }
.onboarding-layout .auth-card__body { padding: 2rem 2.25rem 2.25rem; }
.onboarding-intro { max-width: 690px; margin-bottom: 1.75rem; }
.onboarding-intro .eyebrow { margin-bottom: .65rem; }
.onboarding-intro .auth-title { margin-bottom: .55rem; font-size: clamp(1.8rem, 4vw, 2.45rem); }
.onboarding-intro .muted { color: var(--muted); font-size: 1.02rem; }
.onboarding-form { gap: 1.35rem; }
.onboarding-section { min-width: 0; margin: 0; padding: 1.35rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(15, 23, 42, .34); }
.onboarding-section legend { padding: 0 .45rem; color: var(--text); font-family: 'PT Serif', Georgia, serif; font-size: 1.22rem; font-weight: 700; }
.onboarding-section > p { margin: -.15rem 0 1rem; color: var(--muted-2); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { color: #dce7f5; font-size: .9rem; }
.required-mark, .form-required-note span { color: #9fc5ff; }
.form-field input, .form-field textarea, .message-form input { width: 100%; min-height: 3.15rem; padding: .75rem .9rem; border: 1px solid rgba(148, 163, 184, .28); border-radius: 11px; color: #fff; background: rgba(9, 17, 32, .72); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.form-field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.form-field input:hover, .form-field textarea:hover { border-color: rgba(159, 197, 255, .46); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: #79adf8; background: rgba(9, 17, 32, .9); box-shadow: 0 0 0 3px rgba(11, 91, 211, .2); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #7589a4; opacity: 1; }
.form-field input[type="number"] { appearance: textfield; padding-right: 2.75rem; }
.form-field input[type="number"]::-webkit-inner-spin-button, .form-field input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.amount-field { position: relative; }
.amount-field span { position: absolute; top: 50%; right: 1rem; color: var(--muted-2); transform: translateY(-50%); pointer-events: none; }
.onboarding-section--consents { display: grid; gap: .75rem; }
.onboarding-section--consents > p { margin-bottom: .15rem; }
.consent-field { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border: 1px solid rgba(148, 163, 184, .2); border-radius: 12px; color: var(--muted); background: rgba(30, 41, 59, .46); font-size: .9rem; line-height: 1.5; cursor: pointer; transition: border-color .2s, background-color .2s; }
.consent-field:hover, .consent-field:focus-within { border-color: rgba(159, 197, 255, .52); background: rgba(30, 41, 59, .72); }
.consent-field input { position: relative; width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; flex: 0 0 auto; appearance: none; border: 1px solid rgba(203, 213, 225, .62); border-radius: 5px; background: rgba(9, 17, 32, .78); cursor: pointer; }
.consent-field input:checked { border-color: var(--blue); background: var(--blue); }
.consent-field input:checked::after { content: ''; position: absolute; left: .36rem; top: .12rem; width: .3rem; height: .58rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent-field input:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.consent-field a { color: #9fc5ff; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(159, 197, 255, .42); text-underline-offset: 3px; }
.consent-field a:hover { color: #fff; }
.consent-field .form-error { display: block; margin-top: .35rem; }
.form-required-note { color: var(--muted-2); font-size: .82rem; }
.onboarding-form > .btn { min-height: 3.25rem; font-size: 1rem; }
.form-notice { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(11, 91, 211, .12); }
.form-notice--error { border-color: rgba(220, 38, 38, .45); background: rgba(220, 38, 38, .12); }
.form-error { color: #fca5a5; }
.auth-resend-form { margin-top: 1.25rem; }
@media (max-width: 640px) {
  .onboarding-layout { padding-block: 1.25rem 2rem; }
  .onboarding-layout .container { width: min(100% - 1rem, 900px); }
  .onboarding-layout .auth-card__body { padding: 1.25rem 1rem 1.35rem; }
  .onboarding-card__header { padding: 1rem; }
  .onboarding-intro { margin-bottom: 1.35rem; }
  .onboarding-intro .auth-title { font-size: 1.75rem; }
  .onboarding-section { padding: 1rem .85rem; }
  .form-grid { grid-template-columns: 1fr; }
  .consent-field { padding: .85rem; font-size: .86rem; }
}
.panel-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.message-form textarea { min-height: 3rem; resize: vertical; }

/* --- Portal form controls and interaction polish --- */
.form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.message-form textarea,
.ai-chat__form textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 11px;
  color: var(--text);
  background-color: rgba(9, 17, 32, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  font: inherit;
  line-height: 1.45;
  caret-color: #9fc5ff;
  color-scheme: dark;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover,
.form-field select:hover,
.form-field textarea:hover,
.message-form textarea:hover,
.ai-chat__form textarea:hover {
  border-color: rgba(159, 197, 255, .52);
  background-color: rgba(9, 17, 32, .9);
}
.form-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus,
.form-field textarea:focus,
.message-form textarea:focus,
.ai-chat__form textarea:focus {
  outline: none;
  border-color: #79adf8;
  background-color: rgba(9, 17, 32, .96);
  box-shadow: 0 0 0 3px rgba(11, 91, 211, .22), inset 0 1px 0 rgba(255, 255, 255, .035);
}
.form-field input::placeholder,
.form-field textarea::placeholder,
.message-form textarea::placeholder,
.ai-chat__form textarea::placeholder {
  color: #8293ab;
  opacity: 1;
}
.form-field select {
  appearance: none;
  padding-right: 2.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m6 8 4 4 4-4' stroke='%239fc5ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 1.15rem;
}
.form-field select option { color: var(--text); background: var(--navy-900); }
.form-field input[type="file"] {
  min-height: 3.45rem;
  padding: .35rem .45rem;
  overflow: hidden;
  color: var(--muted);
  line-height: 2.65rem;
}
.form-field input[type="file"]::file-selector-button {
  min-height: 2.65rem;
  margin: 0 .75rem 0 0;
  padding: .55rem .9rem;
  border: 1px solid rgba(159, 197, 255, .3);
  border-radius: 8px;
  color: #fff;
  background: rgba(11, 91, 211, .86);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.form-field input[type="file"]::file-selector-button:hover {
  border-color: #9fc5ff;
  background: var(--blue-dark);
}
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}
.form-field:has([aria-invalid="true"]) input,
.form-field:has([aria-invalid="true"]) select,
.form-field:has([aria-invalid="true"]) textarea {
  border-color: rgba(252, 165, 165, .72);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.form-help { display: block; color: var(--muted-2) !important; font-size: .82rem; line-height: 1.45; }
.form-error { display: block; color: #fca5a5 !important; font-size: .82rem; line-height: 1.45; }
.documents-panel .form { margin-top: 1rem; }
.documents-panel .document-list + h3 { margin-top: 1.6rem; }
.documents-panel .form-field + .form-field { margin-top: .15rem; }
.dashboard-main > .tabs {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  padding: .2rem .2rem .55rem;
  margin-inline: -.2rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dashboard-main > .tabs::-webkit-scrollbar { display: none; }
.dashboard-main > .tabs .btn { flex: 0 0 auto; }
.message { align-items: flex-start; }
.message > div { min-width: 0; }
.message p {
  max-height: 16rem;
  overflow: auto;
  padding-right: .25rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  scrollbar-color: rgba(159, 197, 255, .45) transparent;
}
.document-list strong, .document-list small { overflow-wrap: anywhere; }
.message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .7rem;
}
.message-form textarea, .ai-chat__form textarea {
  min-height: 6.25rem;
  resize: vertical;
}
.message-form .btn { min-height: 3.15rem; }
.ai-chat__messages {
  padding: .75rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 13px;
  background: rgba(9, 17, 32, .42);
  scrollbar-color: rgba(159, 197, 255, .45) transparent;
}
.ai-panel {
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(159, 197, 255, .45) transparent;
}
.ai-panel > .modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: .65rem;
  background: var(--navy-900);
}
.ai-chat__form .btn { justify-self: end; min-width: 9rem; }
.ai-chat__message { overflow-wrap: anywhere; line-height: 1.5; }
.assistant-panel > p { color: var(--muted); }
.profile-panel > p, .profile-contact {
  margin-bottom: .9rem;
  padding: .8rem .9rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(9, 17, 32, .34);
  overflow-wrap: anywhere;
}
.profile-panel .form + p { margin-top: 1rem; }
.profile-panel h3 { margin: 1.35rem 0 .8rem; }
.profile-contact { display: grid; gap: .25rem; }
.profile-contact__label { color: var(--muted-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.profile-contact strong { color: var(--text); overflow-wrap: anywhere; }
.connection-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: .9rem; border: 1px solid rgba(148, 163, 184, .22); border-radius: 11px; background: rgba(9, 17, 32, .4); }
.connection-card > div { display: grid; gap: .25rem; min-width: 0; }
.connection-card small { color: var(--muted-2); line-height: 1.4; }
.document-list article.session-row { grid-template-columns: minmax(0, 1fr) auto; }
.session-row form { justify-self: end; }
.session-revoke { color: #fecaca; border-color: rgba(248, 113, 113, .34); background: rgba(127, 29, 29, .12); }
.session-revoke:hover { color: #fff; border-color: rgba(248, 113, 113, .62); background: rgba(127, 29, 29, .28); }
.field input, .faq-search input {
  font: inherit;
  caret-color: #9fc5ff;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field input:hover, .faq-search input:hover {
  border-color: rgba(159, 197, 255, .52);
  background-color: rgba(15, 23, 42, .82);
}
.field input:focus, .faq-search input:focus {
  outline: none;
  border-color: #79adf8;
  background-color: rgba(9, 17, 32, .92);
  box-shadow: 0 0 0 3px rgba(11, 91, 211, .22);
}
.field input[aria-invalid="true"] {
  border-color: rgba(252, 165, 165, .72);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

@media (max-width: 640px) {
  .section-heading h1 { font-size: clamp(1.55rem, 7.8vw, 2.35rem); overflow-wrap: normal; hyphens: none; }
  .ai-launcher { width: 3.25rem; height: 3.25rem; padding: 0; justify-content: center; font-size: 0; }
  .ai-launcher svg { width: 1rem; }
  .ai-panel { bottom: .7rem; max-height: calc(100dvh - 1.4rem); }
  .dashboard-main > .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0; margin-inline: 0; }
  .dashboard-main > .tabs .btn { width: 100%; min-width: 0; white-space: normal; }
  .dashboard-main > .tabs .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tab-panel, .dashboard-sidebar .surface { padding: 1.1rem; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: .4rem; }
  .message { flex-direction: column; }
  .message time { align-self: flex-start; }
  .message-form { grid-template-columns: 1fr; }
  .message-form .btn, .ai-chat__form .btn { width: 100%; justify-self: stretch; }
  .documents-panel .document-list + h3 { margin-top: 1.35rem; }
  .document-list article { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .document-list article > .document-download { grid-column: 2; justify-self: start; }
  .document-list article.session-row { grid-template-columns: 1fr; }
  .session-row form { grid-column: 1; justify-self: start; }
  .connection-card { align-items: flex-start; flex-direction: column; }
  .connection-card .btn { width: 100%; }
}

/* --- Unified Django layout and design corrections --- */
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
h2 { margin-bottom: 1.5rem; }
.calculator h2 { margin-bottom: 1.5rem; }
.section-heading h2 { margin-bottom: 1.5rem; }
.section-heading h1 { margin-bottom: 1rem; }
.modal-head h2, .status-hero h2, .case-full__head h2, .review-card__head h2 { margin-bottom: 0; }
.status, .case-label, .post-cat, .news-date, .service-card__badge, .service-group__count, .hero-badge, .eyebrow, .onboarding-step { width: fit-content; max-width: 100%; align-self: flex-start; justify-self: start; }

.modal-head > .icon-btn { width: 2rem; height: 2rem; min-width: 2rem; min-height: 2rem; padding: 0; aspect-ratio: 1; border-radius: 8px; font-size: 1.35rem; line-height: 1; }
.btn--remove-debt { width: 3rem; height: 3rem; min-width: 3rem; min-height: 3rem; aspect-ratio: 1; }
.btn--remove-debt svg { width: 1.75rem; height: 1.75rem; }

.menu-toggle { position: relative; width: 3rem; height: 3rem; min-width: 3rem; min-height: 3rem; padding: 0; aspect-ratio: 1; overflow: hidden; }
.menu-toggle__line { position: absolute; top: 50%; left: 50%; display: block; width: 1.4rem; height: 2px; border-radius: 999px; background: currentColor; transform-origin: center; transition: transform .3s var(--ease), opacity .18s ease; }
.menu-toggle__line:nth-child(1) { transform: translate(-50%, calc(-50% - 7px)); }
.menu-toggle__line:nth-child(2) { transform: translate(-50%, -50%); }
.menu-toggle__line:nth-child(3) { transform: translate(-50%, calc(-50% + 7px)); }
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) { opacity: 0; transform: translate(-50%, -50%) scaleX(.25); }
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }
.mobile-nav-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; border-top: 0 solid transparent; transition: grid-template-rows .34s var(--ease), opacity .22s ease, border-color .22s ease, visibility 0s linear .34s; }
.mobile-nav-wrap.is-open { grid-template-rows: 1fr; opacity: 1; visibility: visible; border-top-width: 1px; border-top-color: var(--line); transition-delay: 0s; }
.mobile-nav { display: block; min-height: 0; overflow: hidden; padding: 0; border: 0; opacity: 0; transform: translateY(-.45rem); transition: opacity .22s ease, transform .34s var(--ease), padding .34s var(--ease); }
.mobile-nav-wrap.is-open .mobile-nav { padding-bottom: 1rem; opacity: 1; transform: translateY(0); }

.footer-grid { grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(145px, 1fr)); gap: 1.35rem; }
.footer-grid > * { min-width: 0; }
.footer-links a, .footer-link-button { overflow-wrap: anywhere; }
.footer-link-button { width: fit-content; padding: 0; border: 0; color: var(--muted-2); background: transparent; font-size: .88rem; text-align: left; }
.footer-link-button:hover { color: #fff; }

.review-card > footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .85rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .82rem; }
.services-card { grid-template-rows: auto auto 1fr auto; height: 100%; }
.services-card .btn, .service-card .btn { margin-top: auto; }
.service-card::before { display: none !important; }
.post-meta, .news-link, .story-meta { padding-top: 1.15rem; }
.case-card > a { padding-top: .55rem; }
.case-full__head .status { margin-top: .4rem; }

.case-full { grid-template-columns: 1fr; }
.case-full__side { border-right: 0; border-bottom: 1px solid var(--line); }
.case-full__body { padding-top: 1.6rem; }
#debt-fields { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
.debt-row { gap: .75rem; }

.uslugi-cta__actions { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; min-width: 0; }
.uslugi-cta__actions .btn { width: auto; flex: 0 0 auto; }

.ai-launcher__mobile { display: none; }
.ai-launcher { min-width: 8.9rem; justify-content: center; overflow: hidden; transition: transform .25s var(--ease), background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.ai-launcher__closed, .ai-launcher__open { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: opacity .2s ease, transform .3s var(--ease); }
.ai-launcher__open { position: absolute; inset: 0; opacity: 0; transform: translateY(.55rem) rotate(-8deg); }
.ai-launcher__open svg { width: 1.15rem; height: 1.15rem; }
.ai-launcher.is-panel-open { opacity: 1; pointer-events: auto; transform: none; border-color: rgba(159, 197, 255, .6); background: #1b2a44; box-shadow: 0 12px 28px rgba(2, 6, 23, .38); }
.ai-launcher.is-panel-open .ai-launcher__closed { opacity: 0; transform: translateY(-.55rem) rotate(8deg); }
.ai-launcher.is-panel-open .ai-launcher__open { opacity: 1; transform: translateY(0) rotate(0); }
.ai-panel > .modal-head { position: sticky; top: 0; padding-bottom: .65rem; background: var(--navy-900); }
.ai-chat__form { display: grid; grid-template-columns: 1fr; gap: .55rem; }
.ai-chat__form textarea { min-height: 6.25rem; max-height: 12rem; }
.ai-send-button { position: static; width: 100% !important; min-height: 3.15rem !important; }

@media (min-width: 641px) {
  .ai-panel .js-ai-close { display: none; }
}

@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  .footer-grid p { max-width: 560px; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  h2, .section-heading h2 { margin-bottom: 1.25rem; }
  .calculator h2 { margin-bottom: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .review-card > footer { align-items: flex-start; flex-direction: column; }
  .grid--3.stats-grid { grid-template-columns: 1fr; }
  .case-money div { align-items: flex-start; flex-direction: column; gap: .15rem; padding: .65rem 0; }
  .hero-panel { padding: 1rem; border-radius: 15px; }
  .hero-panel .panel-kicker { display: none; }
  .hero-panel .panel-main strong { font-size: 1.5rem; }
  .hero-panel .panel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .hero-panel .panel-list li { align-items: flex-start; flex-direction: column; gap: .15rem; padding: .6rem; }
  .hero-float { display: none; }
  .ai-launcher { right: 1rem; bottom: 1rem; z-index: 60; width: auto; height: auto; min-width: 3.1rem; padding: .65rem .8rem; font-size: .9rem; transition: min-width .3s var(--ease), transform .25s var(--ease), background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
  .ai-launcher__desktop { display: none; }
  .ai-launcher__mobile { display: inline; }
  .ai-launcher.is-panel-open { min-width: 7.2rem; opacity: 1; pointer-events: auto; transform: none; }
  body.ai-panel-open { overflow: hidden; }
  .ai-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .ai-panel { top: .5rem; right: .5rem; bottom: auto; left: .5rem; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: auto; height: calc(100vh - 5.25rem); height: calc(100svh - 5.25rem); max-height: none; overflow: hidden; padding: .85rem; }
  .ai-panel > .modal-head { position: static; padding-bottom: 0; background: transparent; }
  .ai-panel h2 { font-size: 1.2rem; }
  .ai-panel p { font-size: .82rem; }
  .ai-chat { grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; gap: .55rem; margin-top: .65rem; }
  .ai-chat__messages { align-content: start; min-height: 0; max-height: none; padding: .55rem; }
  .ai-chat__message { padding: .5rem .65rem; font-size: .84rem; }
  .ai-chat__form textarea { min-height: 4.25rem; max-height: 4.25rem; padding: .65rem .75rem; resize: none; }
  .ai-send-button { min-height: 2.85rem !important; padding: .6rem .75rem; }
  .ai-chat > [data-ai-lawyer] { min-height: 2.85rem; padding: .6rem .75rem; font-size: .9rem; }
}

/* --- Auth, onboarding and cabinet redesign --- */
.header-logout-form { display: inline-flex; margin: 0; }
.mobile-nav .header-logout-form, .mobile-nav .header-logout-form .btn { width: 100%; }
.mobile-nav-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .55rem; }
.mobile-nav-actions > .btn { width: 100%; min-width: 0; margin: 0; }
.mobile-nav-actions .header-logout-form { grid-column: 1 / -1; }
.portal-shell { display: flex; min-height: 100vh; flex-direction: column; }
.portal-shell > main { width: 100%; flex: 1 0 auto; }
.portal-shell > .site-footer { margin-top: auto; }

.auth-step--code { text-align: center; }
.auth-code-intro { max-width: 30rem; margin: .55rem auto 1.35rem; color: var(--muted); line-height: 1.55; text-align: center; }
.auth-code-intro strong { display: block; margin-top: .2rem; color: var(--text); font-size: 1.02rem; overflow-wrap: anywhere; }
.auth-code-form { gap: 1.15rem; }
.otp-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.otp-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; max-width: 28rem; margin-inline: auto; }
.auth-card .otp-digit { width: 100%; min-width: 0; height: 4.25rem; padding: 0; border: 1px solid rgba(159, 197, 255, .32); border-radius: 12px; color: #fff; background: rgba(9, 17, 32, .78); font-family: 'PT Sans', Arial, sans-serif; font-size: 1.65rem; font-weight: 700; line-height: 1; text-align: center; caret-color: #9fc5ff; transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s; }
.auth-card .otp-digit:hover { border-color: rgba(159, 197, 255, .58); }
.auth-card .otp-digit:focus { outline: none; border-color: #79adf8; background: rgba(9, 17, 32, .96); box-shadow: 0 0 0 3px rgba(11, 91, 211, .24); transform: translateY(-2px); }
.auth-code-form.has-otp-error .otp-digit:placeholder-shown, .auth-code-form.has-otp-error .otp-digit:invalid { border-color: rgba(252, 165, 165, .72); }
.otp-error { display: block; margin-top: .65rem; text-align: center; }
.otp-countdown { margin: 1.15rem 0 0; color: #bcd5fa; font-size: .9rem; font-weight: 700; text-align: center; }
.otp-countdown.is-expired { color: #fca5a5; }
.auth-resend-form { margin-top: .55rem; }
.auth-resend-button { color: #c8dcfb; }
.auth-resend-button:disabled { color: var(--muted-2); cursor: not-allowed; opacity: .55; text-decoration: none; }

.max-wait-card { display: grid; gap: 1.25rem; padding: 2rem; }
.max-wait-card .auth-title, .max-wait-card__intro, .max-wait-card .form-notice { margin: 0; }
.max-wait-card .auth-title { text-align: center; }
.max-wait-card__intro { max-width: 34rem; margin-inline: auto; line-height: 1.55; }
.max-wait-card .btn--max { margin: .25rem 0 0; }
.max-wait-card [data-max-status] { padding: 1rem 1.1rem; }

.admin-login-card { width: min(36rem, 100%); margin-inline: auto; }
.admin-login-card__header { padding: 1.35rem 2rem; }
.admin-login-card__body { display: grid; gap: 1.25rem; padding: 2rem 2.25rem 2.25rem; }
.admin-login-card__intro { display: grid; gap: .4rem; }
.admin-login-card__intro .auth-title, .admin-login-card__intro p, .admin-login-card__body .form-notice { margin: 0; }
.admin-login-card__body .form-notice { padding: .85rem 1rem; line-height: 1.5; }
.admin-login-form { gap: 1rem; margin: 0; }

.onboarding-layout { min-height: auto; }
.onboarding-layout .auth-layout__container { display: grid; }
.onboarding-layout .auth-card { width: min(52rem, 100%); margin-inline: auto; }
.onboarding-progress { display: flex; justify-content: center; margin-bottom: 1rem; }
.onboarding-intro { margin-inline: auto; text-align: center; }
.onboarding-intro .eyebrow { margin-inline: auto; }
.consent-field:has(input:checked) { border-color: rgba(121, 173, 248, .62); background: rgba(11, 91, 211, .12); }
.consent-field input:checked { animation: consent-pop .28s var(--ease); }
.consent-field input:checked::after { animation: consent-check .28s ease-out both; }
.consent-field.is-invalid { border-color: rgba(252, 165, 165, .75); background: rgba(127, 29, 29, .14); animation: consent-error .34s ease-out; }
@keyframes consent-pop { 50% { transform: scale(1.14); } }
@keyframes consent-check { from { opacity: 0; transform: rotate(45deg) scale(.35); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes consent-error { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

.cabinet-page { padding-block: 2.25rem 4rem; background: radial-gradient(circle at 90% 0, rgba(11, 91, 211, .1), transparent 32rem), var(--navy-950); }
.cabinet-container { display: grid; gap: 1.5rem; }
.cabinet-container > .form-notice { margin-bottom: 0; }
.dashboard-welcome { display: grid; gap: .35rem; margin: 0; }
.dashboard-welcome .eyebrow { margin-bottom: .2rem; }
.dashboard-welcome h1 { margin: 0; font-size: clamp(1.9rem, 3.5vw, 2.65rem); }
.dashboard-welcome p { max-width: 42rem; margin: 0; color: var(--muted); font-size: 1rem; }
.status-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(10rem, .8fr) minmax(12rem, .9fr); gap: 0; padding: 0; overflow: hidden; border: 1px solid rgba(159, 197, 255, .2); border-radius: 16px; background: linear-gradient(135deg, rgba(30, 41, 59, .96), rgba(18, 38, 72, .92)); box-shadow: 0 18px 42px rgba(2, 6, 23, .24); }
.status-hero > div { display: grid; align-content: center; gap: .3rem; min-width: 0; padding: 1.35rem 1.5rem; }
.status-hero > div + div { border-left: 1px solid rgba(159, 197, 255, .14); }
.status-hero small { color: var(--muted-2); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-hero__state h2 { width: fit-content; margin: 0; padding: .35rem .7rem; border: 1px solid rgba(159, 197, 255, .3); border-radius: 999px; color: #dceaff; background: rgba(11, 91, 211, .16); font-family: 'PT Sans', Arial, sans-serif; font-size: 1rem; }
.status-hero__meta strong, .status-hero__debt strong { color: var(--text); font-size: 1.25rem; overflow-wrap: anywhere; }
.status-hero__meta span { color: var(--muted); font-size: .9rem; }
.status-hero__debt { text-align: left; }
.status-hero__debt strong { font-size: 1.65rem; }
.dashboard-layout { grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; margin-top: 0; }
.dashboard-main, .dashboard-sidebar { gap: 1.25rem; }
.dashboard-main > .tabs { padding: .35rem; border: 1px solid rgba(148, 163, 184, .18); border-radius: 13px; background: rgba(15, 23, 42, .5); }
.tab-panel, .dashboard-sidebar .surface { padding: 1.5rem; border-radius: 15px; }
.tab-panel h2, .dashboard-sidebar h2 { margin-bottom: 1.15rem; }
.lead-edit-link { margin-top: .75rem; }
.cabinet-container > .tab-panel { margin: 0; }
.cabinet-container > .tab-panel + .tab-panel { margin-top: 0; }

.profile-panel { display: grid; gap: 1.25rem; }
.profile-heading { display: grid; gap: .35rem; }
.profile-heading .eyebrow { margin-bottom: .15rem; }
.profile-heading h2 { margin: 0; }
.profile-heading p, .profile-section__heading p { margin: 0; color: var(--muted); }
.profile-section { display: grid; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid rgba(148, 163, 184, .18); }
.profile-section__heading { display: grid; gap: .25rem; }
.profile-section__heading h3 { margin: 0; font-size: 1.08rem; }
.profile-section__heading p { font-size: .9rem; }
.profile-form { gap: 1rem; }
.profile-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-form__actions { display: flex; justify-content: flex-start; }
.profile-form .profile-form__actions .btn { width: auto; min-width: 12rem; justify-self: auto; }
.profile-connections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.profile-connections .connection-card { height: 100%; margin: 0; padding: 1rem; }
.profile-connections .connection-card > div { align-content: start; }
.profile-connections strong { overflow-wrap: anywhere; }
.session-list { gap: .65rem; }
.profile-logout-all { margin-top: .15rem; }

@media (max-width: 980px) {
  .status-hero { grid-template-columns: 1fr 1fr; }
  .status-hero__state { grid-column: 1 / -1; border-bottom: 1px solid rgba(159, 197, 255, .14); }
  .status-hero > div:nth-child(2) { border-left: 0; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cabinet-page { padding-block: 1.35rem 2.5rem; }
  .cabinet-container { gap: 1rem; }
  .dashboard-welcome h1 { font-size: 1.85rem; }
  .status-hero { grid-template-columns: 1fr; }
  .status-hero__state { grid-column: auto; }
  .status-hero > div { padding: 1rem; }
  .status-hero > div + div { border-top: 1px solid rgba(159, 197, 255, .14); border-left: 0; }
  .dashboard-sidebar { grid-template-columns: 1fr; }
  .tab-panel, .dashboard-sidebar .surface { padding: 1rem; }
  .profile-form__grid, .profile-connections { grid-template-columns: 1fr; }
  .profile-form .profile-form__actions .btn { width: auto; min-width: 0; }
  .max-wait-card { gap: 1rem; padding: 1.35rem 1rem; }
  .admin-login-card { margin-top: 1rem; }
  .admin-login-card__header { padding: 1rem 1.1rem; }
  .admin-login-card__body { gap: 1rem; padding: 1.35rem 1rem 1.5rem; }
  .admin-login-card__body .form-notice { padding: .75rem .85rem; }
  .otp-inputs { gap: .35rem; }
  .auth-card .otp-digit { height: 3.4rem; border-radius: 10px; font-size: 1.35rem; }
}

@media (max-width: 360px) {
  .otp-inputs { gap: .25rem; }
  .auth-card .otp-digit { height: 3rem; font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-field input:checked, .consent-field input:checked::after, .consent-field.is-invalid { animation: none; }
  .auth-card .otp-digit { transition: border-color .2s, background-color .2s, box-shadow .2s; }
  .auth-card .otp-digit:focus { transform: none; }
}
