:root {
  --blue: #0080c1;
  --blue-dark: #005a91;
  --orange: #fc9e4f;
  --green: #89b941;
  --red: #dd3e37;
  --gray: #666666;
  --text: #1f2933;
  --muted: #667085;
  --bg: #f4f8fb;
  --surface: #ffffff;
  --soft: #eef7ff;
  --border: #d9e7f2;
  --focus: #ffcc29;
  --scale: 1;
  --shadow: 0 18px 44px rgba(0, 90, 145, 0.12);
  --shadow-strong: 0 28px 70px rgba(0, 90, 145, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(0, 128, 193, 0.14), transparent 28rem),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: calc(16px * var(--scale));
  line-height: 1.5;
}

body.contrast-mode {
  --bg: #000000;
  --surface: #000000;
  --soft: #111111;
  --text: #ffffff;
  --muted: #ffffff;
  --blue: #ffcc29;
  --blue-dark: #ffffff;
  --orange: #ffcc29;
  --green: #ffcc29;
  --red: #ffcc29;
  --gray: #ffffff;
  --border: #ffffff;
  --shadow: none;
  --shadow-strong: none;
  background: #000000;
}

body.reading-mode .journey-card-v2 p,
body.reading-mode .journey-highlight-v2,
body.reading-mode .terms-section .section-title p,
body.reading-mode .service-tags {
  display: none;
}

body.relaxed-mode {
  line-height: 1.75;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 999;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--focus);
  color: #111827;
  padding: 10px 16px;
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
}

.gov-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(217, 231, 242, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

body.contrast-mode .gov-header {
  background: #000000;
}

.gov-header::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--blue), var(--orange), var(--green));
}

.gov-header-inner,
.page,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.gov-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gov-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.gov-brand-mark {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--blue), var(--blue-dark));
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(0, 128, 193, 0.22);
}

.gov-brand-mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 17px;
  height: 5px;
  border-radius: 999px;
  background: var(--red);
}

.gov-brand strong,
.gov-brand small,
.gov-brand em {
  display: block;
}

.gov-brand strong {
  color: var(--blue-dark);
  line-height: 1.1;
}

.gov-brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.gov-brand em {
  color: var(--red);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.gov-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gov-nav>a {
  border-radius: 999px;
  color: var(--blue-dark);
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 850;
}

.gov-nav>a:hover {
  background: var(--soft);
  color: var(--blue);
}

.gov-menu-button {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.accessibility-widget {
  position: relative;
}

.accessibility-toggle {
  min-height: 44px;
  border: 1px solid rgba(0, 128, 193, 0.28);
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue-dark);
  padding: 10px 15px;
  font-weight: 900;
}

.accessibility-toggle:hover {
  background: var(--blue);
  color: #ffffff;
}

.accessibility-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 310px;
  border: 1px solid var(--border);
  border-top: 5px solid var(--red);
  border-radius: 18px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-strong);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue-dark);
}

.panel-header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 1.3rem;
}

.accessibility-panel>button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--soft);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 850;
}

.accessibility-panel p {
  color: var(--muted);
  font-size: 0.9rem;
}

.page {
  padding: 28px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 28px;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 92% 8%, rgba(252, 158, 79, 0.24), transparent 18rem),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #ffffff;
  padding: 46px;
  box-shadow: var(--shadow-strong);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--green));
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border: 58px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.hero-main,
.assistant-card {
  position: relative;
  z-index: 1;
}

.kicker,
.section-title span,
.search-top span {
  display: inline-flex;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 12px;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(2.4rem, 5.9vw, 4.35rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.hero p {
  max-width: 720px;
  color: #eaf6ff;
  font-size: 1.12rem;
}

.hero-search {
  margin-top: 28px;
}

.hero-search label {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 900;
}

.search-field,
.main-search {
  display: flex;
  gap: 10px;
  border-radius: 20px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

.search-field input,
.main-search input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  color: var(--text);
  padding: 0 14px;
  font-weight: 750;
}

.search-field button,
.main-search button {
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  background: var(--red);
  color: #ffffff;
  padding: 0 22px;
  font-weight: 950;
}

.search-field button:hover,
.main-search button:hover {
  background: #b92e29;
}

.quick-actions,
.assistant-card-actions,
.access-strip-actions,
.assistant-shortcuts,
.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-actions {
  margin-top: 20px;
}

.quick-actions button,
.assistant-card-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 9px 13px;
  font-weight: 850;
}

.quick-actions button:hover,
.assistant-card-actions button:hover {
  background: #ffffff;
  color: var(--blue-dark);
}

.assistant-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-self: stretch;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.13);
  padding: 24px;
  backdrop-filter: blur(14px);
}

.assistant-avatar-large {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.assistant-avatar-large img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.assistant-card span {
  display: inline-flex;
  border-radius: 999px;
  background: var(--orange);
  color: #111827;
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 950;
}

.assistant-card h2 {
  margin: 14px 0 0;
  font-size: 1.65rem;
  line-height: 1.1;
}

.access-strip,
.numbers-grid article,
.intent-section,
.journey-section,
.search-section,
.filters-section,
.terms-section {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.access-strip {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
}

.access-strip strong {
  display: block;
  color: var(--blue-dark);
}

.access-strip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.access-strip-actions {
  justify-content: flex-end;
}

.access-strip-actions button,
.filter-row button,
.active-filters button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-dark);
  padding: 8px 12px;
  font-weight: 900;
}

.access-strip-actions button:hover,
.filter-row button:hover,
.active-filters button:hover {
  border-color: var(--blue);
  background: var(--soft);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.numbers-grid article {
  padding: 20px;
}

.numbers-grid span {
  display: inline-flex;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue-dark);
  padding: 8px 11px;
  font-weight: 950;
}

.numbers-grid strong {
  display: block;
  margin-top: 14px;
  color: var(--blue-dark);
}

.numbers-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.intent-section,
.journey-section,
.search-section,
.filters-section,
.terms-section {
  margin-top: 24px;
  padding: 28px;
}

.section-title {
  max-width: 780px;
}

.section-title span,
.search-top span {
  color: var(--blue);
}

.section-title h2,
.search-top h2 {
  margin: 7px 0 0;
  color: var(--blue-dark);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.section-title p,
.search-top p {
  color: var(--muted);
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.intent-grid button,
.popular-grid button,
.service-card,
.terms-grid details {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 90, 145, 0.06);
}

.intent-grid button {
  min-height: 180px;
  padding: 18px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.intent-grid button:hover,
.popular-grid button:hover,
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 18px 42px rgba(0, 90, 145, 0.14);
}

.intent-grid button span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 950;
}

.intent-grid strong {
  display: block;
  margin-top: 14px;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.intent-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.journey-section-v2 {
  padding: 32px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.98));
}

.journey-title-v2 {
  max-width: 760px;
}

.journey-title-v2 h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.journey-title-v2 p {
  max-width: 620px;
}

.journey-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.journey-card-v2 {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 14px 36px rgba(0, 90, 145, 0.09);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.journey-card-v2::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--blue);
}

.journey-card-v2::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(0, 128, 193, 0.07);
}

.journey-card-v2:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 128, 193, 0.35);
  box-shadow: 0 24px 52px rgba(0, 90, 145, 0.14);
}

.journey-blue-v2::before {
  background: var(--blue);
}

.journey-green-v2::before {
  background: var(--green);
}

.journey-red-v2::before {
  background: var(--red);
}

.journey-orange-v2::before {
  background: var(--orange);
}

.journey-green-v2::after {
  background: rgba(137, 185, 65, 0.11);
}

.journey-red-v2::after {
  background: rgba(221, 62, 55, 0.09);
}

.journey-orange-v2::after {
  background: rgba(252, 158, 79, 0.12);
}

.journey-featured-v2 {
  background:
    radial-gradient(circle at top right, rgba(221, 62, 55, 0.08), transparent 14rem),
    #ffffff;
}

.journey-card-top-v2 {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
}

.journey-icon-v2 {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--soft);
}

.journey-icon-v2 img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.journey-card-top-v2 span {
  display: inline-flex;
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.journey-green-v2 .journey-card-top-v2 span {
  color: #5e8f25;
}

.journey-red-v2 .journey-card-top-v2 span {
  color: var(--red);
}

.journey-orange-v2 .journey-card-top-v2 span {
  color: #c96d1e;
}

.journey-card-top-v2 h3 {
  margin: 5px 0 0;
  color: var(--blue-dark);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.journey-card-top-v2 p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.journey-highlight-v2 {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 18px;
}

.journey-highlight-v2 div {
  border-radius: 18px;
  background: var(--soft);
  padding: 13px 14px;
}

.journey-highlight-v2 strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1rem;
  line-height: 1.1;
}

.journey-highlight-v2 small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.journey-links-v2 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.journey-links-v2 a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-dark);
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.journey-links-v2 a:hover {
  border-color: var(--blue);
  background: var(--soft);
}

.journey-links-featured-v2 a {
  min-width: calc(25% - 8px);
}

.search-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.search-top>button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  padding: 10px 15px;
  font-weight: 950;
}

.main-search {
  margin-top: 20px;
  border: 1px solid var(--border);
  box-shadow: none;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.popular-grid button {
  min-height: 92px;
  padding: 15px;
  text-align: left;
}

.popular-grid strong {
  display: block;
  color: var(--blue-dark);
}

.popular-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.filter-panel {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-row label {
  display: grid;
  gap: 7px;
}

.filter-row label span {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-row select {
  min-height: 42px;
  min-width: 150px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 12px;
  font-weight: 750;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.active-filters button {
  background: var(--soft);
  font-size: 0.86rem;
}

.results-info {
  margin: 22px 0 16px;
  color: var(--muted);
  font-weight: 850;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
}

.service-card {
  display: flex;
  min-height: 235px;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--blue);
}

.service-card[data-category="contratacoes"]::before {
  background: var(--red);
}

.service-card[data-category="pessoas"]::before {
  background: var(--green);
}

.service-card[data-category="fiscalizacao"]::before {
  background: var(--orange);
}

.service-card-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 950;
}

.service-card strong {
  display: block;
  margin-top: 14px;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.service-tags span {
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 850;
}

.service-card a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 900;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.terms-grid details {
  overflow: hidden;
}

.terms-grid summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  color: var(--blue-dark);
  padding: 14px 15px;
  font-weight: 950;
  cursor: pointer;
}

.terms-grid p {
  margin: 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 13px 15px;
}

.terms-grid button {
  margin: 0 15px 15px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-dark);
  padding: 7px 11px;
  font-weight: 850;
}

.virtual-assistant {
  position: fixed;
  left: 18px;
  bottom: 6px;
  z-index: 160;
}

.assistant-toggle {
  display: grid;
  width: 88px;
  height: 104px;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  filter: drop-shadow(0 18px 24px rgba(0, 45, 98, 0.24));
}

.assistant-toggle:hover {
  transform: translateY(-4px);
}

.assistant-mini {
  position: relative;
  display: grid;
  width: 82px;
  height: 96px;
  place-items: center;
}

.assistant-mini img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.assistant-mini span {
  position: absolute;
  right: -2px;
  top: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-weight: 950;
}

.assistant-panel {
  position: absolute;
  left: 0;
  bottom: 112px;
  width: min(410px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(252, 158, 79, 0.25), transparent 12rem),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #ffffff;
  padding: 20px;
}

.assistant-header span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.assistant-header h2 {
  margin: 10px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.assistant-header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.45rem;
}

.assistant-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.assistant-live {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
  color: var(--blue-dark);
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 850;
}

.assistant-messages {
  display: flex;
  max-height: 220px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fbff;
  padding: 12px;
}

.assistant-message {
  max-width: 88%;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.assistant-message.bot {
  align-self: flex-start;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.assistant-message.user {
  align-self: flex-end;
  background: var(--blue);
  color: #ffffff;
}

.assistant-shortcuts button,
.assistant-actions button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue-dark);
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 850;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.assistant-form input {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--text);
  padding: 10px 14px;
  font-weight: 750;
}

.assistant-form button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 950;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 950;
  box-shadow: var(--shadow-strong);
}

.back-to-top.visible {
  display: grid;
  place-items: center;
}

.site-footer {
  display: flex;
  padding: 34px 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.site-footer strong {
  color: var(--blue-dark);
  font-weight: 950;
}

.site-footer span {
  color: var(--red);
  font-weight: 950;
}

.site-footer small {
  color: var(--muted);
  font-weight: 700;
}

body.contrast-mode .gov-header,
body.contrast-mode .accessibility-panel,
body.contrast-mode .access-strip,
body.contrast-mode .numbers-grid article,
body.contrast-mode .intent-section,
body.contrast-mode .journey-section-v2,
body.contrast-mode .search-section,
body.contrast-mode .filters-section,
body.contrast-mode .terms-section,
body.contrast-mode .journey-card-v2,
body.contrast-mode .intent-grid button,
body.contrast-mode .popular-grid button,
body.contrast-mode .service-card,
body.contrast-mode .terms-grid details,
body.contrast-mode .assistant-panel,
body.contrast-mode .assistant-message.bot,
body.contrast-mode .assistant-shortcuts button,
body.contrast-mode .assistant-actions button,
body.contrast-mode .assistant-form input {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
}

body.contrast-mode .gov-brand strong,
body.contrast-mode .section-title h2,
body.contrast-mode .search-top h2,
body.contrast-mode .journey-card-top-v2 h3,
body.contrast-mode .intent-grid strong,
body.contrast-mode .popular-grid strong,
body.contrast-mode .service-card strong,
body.contrast-mode .terms-grid summary,
body.contrast-mode .site-footer strong,
body.contrast-mode .journey-highlight-v2 strong,
body.contrast-mode .journey-links-v2 a {
  color: #ffffff;
}

body.contrast-mode .gov-brand small,
body.contrast-mode .numbers-grid small,
body.contrast-mode .intent-grid small,
body.contrast-mode .popular-grid span,
body.contrast-mode .service-card p,
body.contrast-mode .terms-grid p,
body.contrast-mode .site-footer small,
body.contrast-mode .journey-card-top-v2 p,
body.contrast-mode .journey-highlight-v2 small {
  color: #ffffff;
}

body.contrast-mode .journey-links-v2 a,
body.contrast-mode .journey-highlight-v2 div {
  border-color: #ffffff;
  background: #000000;
}

@media (max-width: 1100px) {

  .hero,
  .popular-grid,
  .terms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .numbers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-strip,
  .search-top {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .journey-grid-v2 {
    grid-template-columns: 1fr;
  }

  .journey-card-v2 {
    min-height: auto;
  }

  .journey-links-featured-v2 a {
    min-width: auto;
  }
}

@media (max-width: 900px) {
  .gov-menu-button {
    display: inline-grid;
    place-items: center;
  }

  .gov-nav {
    display: none;
    position: absolute;
    top: 83px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 16px;
  }

  .gov-nav.open {
    display: flex;
  }

  .accessibility-panel {
    position: static;
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 620px) {

  .gov-header-inner,
  .page,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .gov-brand small {
    display: none;
  }

  .hero,
  .intent-section,
  .journey-section-v2,
  .search-section,
  .filters-section,
  .terms-section {
    border-radius: 22px;
    padding: 20px;
  }

  .hero,
  .popular-grid,
  .terms-grid,
  .intent-grid,
  .numbers-grid {
    grid-template-columns: 1fr;
  }

  .assistant-card {
    grid-template-columns: 1fr;
  }

  .search-field,
  .main-search,
  .assistant-form {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-field button,
  .main-search button,
  .assistant-form button {
    width: 100%;
  }

  .journey-card-v2 {
    border-radius: 22px;
    padding: 18px;
  }

  .journey-card-top-v2 {
    grid-template-columns: 1fr;
  }

  .journey-highlight-v2 {
    grid-template-columns: 1fr;
  }

  .journey-links-v2 {
    display: grid;
    grid-template-columns: 1fr;
  }

  .journey-links-v2 a {
    justify-content: flex-start;
  }

  .virtual-assistant {
    left: 8px;
    bottom: 4px;
  }

  .assistant-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 98px;
    width: auto;
    max-height: calc(100vh - 112px);
  }
}

.assistant-v2 {
  left: 18px;
  bottom: 0;
}

.assistant-toggle-v2 {
  width: 96px;
  height: 112px;
}

.assistant-mini-v2 {
  width: 90px;
  height: 104px;
}

.assistant-mini-v2 img {
  width: 84px;
  height: 84px;
  border: 4px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 16px 26px rgba(0, 45, 98, 0.22);
}

.assistant-mini-v2 span {
  right: 0;
  top: 16px;
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.assistant-panel-v2 {
  width: min(440px, calc(100vw - 32px));
  bottom: 118px;
  border-radius: 28px;
}

.assistant-header-v2 {
  padding: 18px;
}

.assistant-profile {
  display: flex;
  gap: 12px;
  align-items: center;
}

.assistant-profile-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.assistant-profile-avatar img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.assistant-header-v2 h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.assistant-header-v2 p {
  margin: 3px 0 0;
  color: #eaf6ff;
  font-size: 0.88rem;
}

.assistant-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-bottom: 1px solid var(--border);
  background: #f8fbff;
  padding: 10px;
}

.assistant-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 900;
}

.assistant-tabs button.is-active {
  border-color: var(--blue);
  background: #ffffff;
  color: var(--blue-dark);
  box-shadow: 0 8px 20px rgba(0, 90, 145, 0.1);
}

.assistant-body-v2 {
  padding: 14px;
}

.assistant-section-label {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assistant-shortcuts-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.assistant-shortcuts-v2 button {
  min-height: 42px;
  justify-content: flex-start;
  border-radius: 14px;
  padding: 9px 11px;
  text-align: left;
}

.assistant-shortcuts-v2 button:hover {
  border-color: var(--blue);
  background: var(--soft);
}

.assistant-form-v2 {
  grid-template-columns: 1fr auto;
  margin-top: 2px;
}

.assistant-actions-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assistant-actions-v2 button {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.8rem;
}

body.contrast-mode .assistant-tabs,
body.contrast-mode .assistant-profile-avatar,
body.contrast-mode .assistant-tabs button,
body.contrast-mode .assistant-tabs button.is-active,
body.contrast-mode .assistant-shortcuts-v2 button {
  border-color: #ffffff;
  background: #000000;
  color: #ffffff;
}

body.contrast-mode .assistant-header-v2 p,
body.contrast-mode .assistant-section-label {
  color: #ffffff;
}

@media (max-width: 620px) {
  .assistant-v2 {
    left: 6px;
    bottom: 0;
  }

  .assistant-toggle-v2 {
    width: 82px;
    height: 98px;
  }

  .assistant-mini-v2 img {
    width: 72px;
    height: 72px;
  }

  .assistant-panel-v2 {
    left: 8px;
    right: 8px;
    bottom: 92px;
    width: auto;
    max-height: calc(100vh - 108px);
  }

  .assistant-shortcuts-v2 {
    grid-template-columns: 1fr;
  }

  .assistant-actions-v2 {
    grid-template-columns: 1fr;
  }
}