:root {
  color-scheme: light;
  --font-body: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Manrope Variable", "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #09182e;
  --ink-soft: #244666;
  --muted: #60718a;
  --page: #f8fbff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-soft: #eef6ff;
  --line: rgba(75, 124, 178, 0.17);
  --line-strong: rgba(44, 112, 188, 0.28);
  --grid-line: rgba(54, 120, 190, 0.058);
  --blue: #135dff;
  --blue-deep: #0647df;
  --cyan: #16d6e7;
  --success: #14b995;
  --danger: #d84b62;
  --shadow-card: 0 24px 70px rgba(24, 93, 170, 0.11);
  --shadow-soft: 0 12px 32px rgba(24, 93, 170, 0.08);
  --radius-control: 12px;
  --radius-card: 24px;
  --radius-large: 32px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #edf7ff;
  --ink-soft: #c8ddf0;
  --muted: #8fa9c1;
  --page: #06101f;
  --surface: rgba(9, 28, 50, 0.9);
  --surface-solid: #0a1c32;
  --surface-soft: #0c2440;
  --line: rgba(126, 189, 255, 0.16);
  --line-strong: rgba(105, 184, 255, 0.3);
  --grid-line: rgba(96, 169, 235, 0.055);
  --blue: #4d8cff;
  --blue-deep: #246df7;
  --cyan: #25d6ea;
  --success: #25d6ad;
  --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 12% 0%, rgba(38, 216, 223, 0.1), transparent 30rem),
    radial-gradient(circle at 92% 4%, rgba(45, 105, 255, 0.11), transparent 32rem),
    var(--page);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: '';
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.82) 62%, transparent 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 100;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  clip: auto;
  color: #fff;
  background: var(--blue-deep);
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 48%, transparent);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

.brand-mark img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-family: var(--font-display);
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  gap: 8px;
  padding: 5px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.header-nav a {
  font-family: var(--font-display);
  padding: 6px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
}

.header-nav a:hover {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: 8px;
  align-items: center;
}

.language-toggle,
.theme-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

.language-toggle {
  width: auto;
  min-width: 48px;
  padding: 0 10px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.language-toggle:hover,
.theme-toggle:hover {
  color: var(--blue);
  border-color: var(--line-strong);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: end;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  max-width: 770px;
}

.overline {
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.overline > span {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--cyan) 12%, transparent);
}

.overline > span[data-i18n] {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.portal-intro h1 {
  font-family: var(--font-display);
  max-width: 760px;
  margin: 18px 0 17px;
  font-size: clamp(2.5rem, 5.4vw, 4.8rem);
  font-weight: 740;
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.portal-intro p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.portal-summary {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  min-width: 248px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.portal-summary > div {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 0 16px;
}

.portal-summary > div + div {
  border-top: 0;
  border-left: 1px solid var(--line);
}

.portal-summary span:not(.status-dot) {
  font-family: var(--font-display);
  min-width: 32px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.portal-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--success) 13%, transparent);
}

.service-section,
.contact-section {
  padding: 96px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading > div {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.section-index {
  font-family: var(--font-display);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.section-heading h2,
.contact-aside h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 220px 1fr auto;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
}

.service-order {
  font-family: var(--font-display);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.service-status {
  font-family: var(--font-display);
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.service-status i {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
}

.service-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #0b3068, #0b5fd3 62%, #15bfd7);
  background-size: 28px 28px, 28px 28px, auto;
  border-radius: 18px;
  isolation: isolate;
}

.accent-cyan .service-visual {
  background:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(135deg, #073766, #087ea8 58%, #1bcfc9);
  background-size: 28px 28px, 28px 28px, auto;
}

.service-visual::before,
.service-visual::after {
  position: absolute;
  content: '';
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.service-visual::before {
  width: 230px;
  height: 230px;
}

.service-visual::after {
  width: 148px;
  height: 148px;
  border-style: dashed;
}

.service-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  box-shadow: 0 22px 40px rgba(1, 35, 89, 0.3), inset 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

.service-icon svg {
  width: 41px;
  height: 41px;
  stroke-width: 1.5;
}

.visual-line {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(-18deg);
}

.line-one {
  width: 180px;
  margin-top: -96px;
  margin-left: -270px;
}

.line-two {
  width: 220px;
  margin-top: 112px;
  margin-left: 240px;
}

.service-content {
  padding: 25px 2px 22px;
}

.service-type {
  font-family: var(--font-display);
  color: var(--blue);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.11em;
}

.accent-cyan .service-type {
  color: #067888;
}

.service-content h3 {
  font-family: var(--font-display);
  margin: 6px 0 8px;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.service-content > p {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
}

.service-features {
  font-family: var(--font-display);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.service-features li::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  vertical-align: 2px;
  content: '';
  background: var(--cyan);
  border-radius: 50%;
}

.service-card-footer {
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  color: var(--ink-soft);
  font-weight: 800;
  border-top: 1px solid var(--line);
}

.service-card-footer svg {
  width: 21px;
  height: 21px;
  color: var(--blue);
  transition: transform 180ms ease;
}

.service-card:hover .service-card-footer svg {
  transform: translateX(3px);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(520px, 1.15fr);
  gap: 72px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-aside {
  position: sticky;
  top: 32px;
}

.contact-title-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-title-row .section-index {
  padding-top: 31px;
}

.contact-title-row h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
}

.contact-aside .overline {
  margin: 0 0 8px;
}

.contact-aside > p {
  max-width: 440px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 16px;
}

.contact-channel {
  display: flex;
  gap: 13px;
  align-items: center;
}

.channel-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.channel-icon svg {
  width: 21px;
  height: 21px;
}

.contact-channel > div {
  display: grid;
}

.contact-channel small {
  color: var(--muted);
  font-size: 11px;
}

.contact-channel a {
  color: var(--ink-soft);
  font-weight: 750;
}

.contact-channel a:hover {
  color: var(--blue);
}

.contact-form {
  display: grid;
  gap: 19px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form label:not(.honeypot),
.contact-form .form-field {
  display: grid;
  gap: 7px;
}

.contact-form label > span,
.contact-form .form-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 760;
}

.contact-form input,
.contact-form textarea,
.aurora-select-trigger {
  font-family: var(--font-body);
  width: 100%;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-solid) 86%, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-form input,
.aurora-select-trigger {
  height: 47px;
  padding: 0 13px;
}

.contact-form textarea {
  min-height: 142px;
  padding: 12px 13px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.contact-form input:focus,
.contact-form textarea:focus,
.aurora-select-trigger:focus-visible,
.aurora-select.is-open .aurora-select-trigger {
  border-color: color-mix(in srgb, var(--blue) 62%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 10%, transparent);
}

.aurora-select {
  position: relative;
}

.aurora-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.aurora-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.aurora-select-trigger.is-placeholder {
  color: var(--muted);
}

.aurora-select-trigger svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 160ms ease, color 160ms ease;
}

.aurora-select.is-open .aurora-select-trigger svg {
  color: var(--blue);
  transform: rotate(180deg);
}

.aurora-select.is-invalid .aurora-select-trigger {
  border-color: color-mix(in srgb, var(--danger) 66%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 10%, transparent);
}

.aurora-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 6px;
  background: color-mix(in srgb, var(--surface-solid) 94%, var(--surface-soft));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(24, 93, 170, 0.16);
}

.aurora-select-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease;
}

.aurora-select-option:hover,
.aurora-select-option:focus-visible {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  outline: none;
}

.aurora-select-option[aria-selected='true'] {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 11%, transparent);
  font-weight: 720;
}

.aurora-select-option svg {
  width: 17px;
  height: 17px;
  opacity: 0;
}

.aurora-select-option[aria-selected='true'] svg {
  opacity: 1;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.form-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.form-footer p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-footer p.success {
  color: var(--success);
}

.form-footer p.error {
  color: var(--danger);
}

.primary-button {
  font-family: var(--font-display);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 19px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(115deg, #0647df, #1685fa 64%, #12bfda);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 13px 25px rgba(19, 93, 255, 0.2);
}

.primary-button:hover {
  filter: brightness(1.035);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button svg {
  width: 18px;
  height: 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.site-footer > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.site-footer img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.site-footer p {
  margin: 0;
}

.assistant-launcher {
  font-family: var(--font-display);
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 5px 16px 5px 6px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(20, 77, 145, 0.2);
}

.assistant-launcher:hover {
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
}

.assistant-launcher-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  border-radius: 12px;
}

.assistant-launcher-icon svg {
  width: 21px;
  height: 21px;
}

.assistant-launcher i {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--success);
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
}

.assistant-panel {
  position: fixed;
  z-index: 45;
  right: 24px;
  bottom: 86px;
  display: grid;
  grid-template-rows: auto minmax(210px, 1fr) auto auto auto;
  width: min(390px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(7, 45, 92, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease;
}

.assistant-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.assistant-panel[hidden] {
  display: none;
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--cyan) 15%, transparent), transparent 60%),
    var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.assistant-identity {
  display: flex;
  gap: 10px;
  align-items: center;
}

.assistant-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  border-radius: 13px;
  font-size: 12px;
  font-weight: 850;
}

.assistant-identity > div {
  display: grid;
  line-height: 1.35;
}

.assistant-identity strong {
  font-size: 14px;
}

.assistant-identity small {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.assistant-identity small span {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.assistant-identity small b {
  font-weight: 700;
}

.assistant-actions {
  display: flex;
  gap: 4px;
}

.assistant-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.assistant-actions button:hover {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.assistant-actions svg {
  width: 18px;
  height: 18px;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 92%;
}

.message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--blue);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 850;
}

.message-user .message-avatar {
  color: #fff;
  background: var(--blue);
  border-color: transparent;
}

.message-bubble {
  padding: 9px 11px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px 13px 13px;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.message-user .message-bubble {
  color: #fff;
  background: var(--blue-deep);
  border-color: transparent;
  border-radius: 13px 4px 13px 13px;
}

.message.is-loading .message-bubble {
  color: var(--muted);
}

.message.is-error .message-bubble {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--surface-solid));
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

.assistant-suggestions {
  display: flex;
  gap: 7px;
  padding: 0 16px 11px;
  overflow-x: auto;
}

.assistant-suggestions[hidden] {
  display: none;
}

.assistant-suggestions button {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
}

.assistant-suggestions button:hover {
  color: var(--blue);
  border-color: var(--line-strong);
}

.assistant-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin: 0 12px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.assistant-compose:focus-within {
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 9%, transparent);
}

.assistant-compose textarea {
  width: 100%;
  max-height: 112px;
  padding: 4px;
  color: var(--ink);
  resize: none;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
  line-height: 1.5;
}

.assistant-compose textarea::placeholder {
  color: var(--muted);
}

.assistant-compose button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  border: 0;
  border-radius: 10px;
}

.assistant-compose button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.assistant-compose svg {
  width: 18px;
  height: 18px;
}

.assistant-note {
  margin: 7px 13px 10px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

noscript {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 12px;
  color: #fff;
  text-align: center;
  background: #9f2f44;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .portal-intro {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 66px 0 54px;
  }

  .portal-summary {
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
  }

  .portal-summary > div + div {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-mark img {
    width: 26px;
    height: 26px;
  }

  .brand-copy small,
  .header-nav {
    display: none;
  }

  .portal-intro {
    padding: 54px 0 44px;
  }

  .portal-intro h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .portal-summary {
    grid-template-columns: 1fr;
  }

  .portal-summary > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .service-section,
  .contact-section {
    padding: 64px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
    text-align: left;
  }

  .service-card {
    grid-template-rows: auto 180px 1fr auto;
    padding: 16px;
    border-radius: 20px;
  }

  .service-content {
    padding-top: 20px;
  }

  .service-content > p {
    min-height: 0;
  }

  .contact-form {
    gap: 17px;
    padding: 20px;
    border-radius: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .assistant-launcher {
    right: 14px;
    bottom: 14px;
  }

  .assistant-launcher > span:nth-child(2) {
    display: none;
  }

  .assistant-launcher {
    width: 50px;
    padding: 5px;
  }

  .assistant-panel {
    right: 10px;
    bottom: 72px;
    width: calc(100vw - 20px);
    height: min(580px, calc(100dvh - 88px));
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
