:root {
  --gs-teal-900: #036563;
  --gs-teal-700: #049794;
  --gs-teal-500: #00a6a3;
  --gs-teal-800: #047e7b;
  --gs-blue-600: #1276ce;
  --gs-gray-900: #333333;
  --gs-gray-700: #666666;
  --gs-gray-100: #f2f2f2;
  --gs-white: #ffffff;
  --gs-black: #000000;

  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-hero: 0 18px 42px rgba(0, 0, 0, 0.12);
}

:root[data-bs-theme="light"] {
  --bg: #f6f9f9;
  --bg-gradient-a: rgba(0, 166, 163, 0.12);
  --bg-gradient-b: rgba(18, 118, 206, 0.1);
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --surface-3: #ecf7f7;
  --text: #333333;
  --muted: #666666;
  --line: rgba(3, 101, 99, 0.18);
  --primary: #036563;
  --primary-strong: #047e7b;
  --primary-soft: #00a6a3;
  --link: #047e7b;
  --chip-bg: #dff4f4;
  --status-bg: #d8f0ef;
  --status-text: #035856;
  --on-primary: #ffffff;
  --bs-primary-rgb: 3, 101, 99;
  --bs-link-color-rgb: 18, 118, 206;
}

:root[data-bs-theme="dark"] {
  --bg: #0d1214;
  --bg-gradient-a: rgba(0, 166, 163, 0.18);
  --bg-gradient-b: rgba(18, 118, 206, 0.22);
  --surface: #121a1d;
  --surface-2: #1a2327;
  --surface-3: #102528;
  --text: #edf5f4;
  --muted: #a9bbba;
  --line: rgba(0, 166, 163, 0.26);
  --primary: #00a6a3;
  --primary-strong: #049794;
  --primary-soft: #36c7c4;
  --link: #36c7c4;
  --chip-bg: #1b3135;
  --status-bg: #1c3b3a;
  --status-text: #9ee6e3;
  --on-primary: #052625;
  --bs-primary-rgb: 0, 166, 163;
  --bs-link-color-rgb: 91, 167, 237;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 12% -8%, var(--bg-gradient-a) 0%, transparent 36%), radial-gradient(circle at 95% 0%, var(--bg-gradient-b) 0%, transparent 30%);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link);
  text-decoration: underline;
}

.form-control::placeholder,
textarea.form-control::placeholder {
  color: var(--muted);
  opacity: 1;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: var(--on-primary);
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Higher-contrast hint text on the hero gradient to meet WCAG AA */
.hero-hint-text {
  color: rgba(255, 255, 255, 0.88);
}

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

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.06;
  background-image: radial-gradient(rgba(0, 0, 0, 0.25) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.portal-header {
  background-color: #f6f9f9;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at top left, rgba(0, 166, 163, 0.08), transparent 38%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(11, 31, 38, 0.05);
}

:root[data-bs-theme="dark"] .portal-header {
  background-color: #0e1315;
  background-image:
    linear-gradient(180deg, rgba(14, 19, 21, 0.9), rgba(14, 19, 21, 0.78)),
    radial-gradient(circle at top left, rgba(0, 166, 163, 0.16), transparent 42%);
}

.section-alert-banner {
  /* Container for one or more stacked alert banners */
}

.alert-banner {
  --alert-bg: #f5828d;
  --alert-color: #0a0001;
  --alert-size: 1rem;
  --alert-max-size: 1.5rem;
  background-color: var(--alert-bg);
  color: var(--alert-color);
  font-size: min(var(--alert-size), var(--alert-max-size));
  text-align: center;
  padding: 0.625rem 0;
  font-weight: 600;
  line-height: 1.4;
}

.alert-banner-content {
  padding-inline: 1rem;
}

.portal-nav .container {
  min-height: 5rem;
  padding-block: 0.65rem;
  gap: 1rem;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  flex: 0 0 auto;
  margin-right: clamp(0.75rem, 1.8vw, 1.5rem);
  max-width: min(236px, calc(100vw - 6rem));
}

.brand-logo {
  width: 100%;
  height: auto;
  max-height: 42px;
  max-width: 100%;
  display: block;
}

.brand-logo-dark-mode {
  display: none;
}

:root[data-bs-theme="dark"] .brand-logo-light-mode {
  display: none;
}

:root[data-bs-theme="dark"] .brand-logo-dark-mode {
  display: block;
}

.portal-nav .nav-link {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: -0.015em;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.portal-nav .nav-link:hover,
.portal-nav .nav-link:focus {
  color: var(--text);
  background: rgba(2, 60, 59, 0.08);
  transform: translateY(-1px);
}

.navbar-toggler {
  border-color: var(--line);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(0, 166, 163, 0.2);
}


.portal-nav-shell {
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}

.portal-nav-links {
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.portal-nav-actions,
.portal-nav-auth {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.portal-nav-actions {
  margin-left: auto;
}

.portal-nav-auth form {
  margin: 0;
}

.portal-nav-primary {
  min-height: 2.7rem;
  border-radius: 0.95rem;
}

.portal-nav-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 1;
  line-height: 1.1;
  padding-inline: 1.2rem !important;
  font-weight: 800;
  white-space: nowrap;
  min-width: 8.9rem;
  box-shadow: 0 10px 24px rgba(2, 93, 91, 0.14);
}

.portal-account-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  width: 2.7rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.portal-account-toggle:hover,
.portal-account-toggle:focus {
  background: rgba(2, 60, 59, 0.08);
  color: var(--text);
}

.portal-account-toggle::after {
  display: none;
}

.portal-account-avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(2, 60, 59, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.portal-account-dropdown {
  min-width: 18rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 24px 50px rgba(11, 31, 38, 0.14);
  background: color-mix(in srgb, var(--surface) 92%, white 8%);
}

.portal-account-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.45rem 0.5rem;
}

.portal-account-avatar-large {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 0.92rem;
}

.portal-account-summary-copy {
  min-width: 0;
}

.portal-account-heading {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-account-subtle {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.portal-account-dropdown .dropdown-item {
  border-radius: 0.8rem;
  padding: 0.72rem 0.82rem;
  font-weight: 700;
}

.portal-theme-panel {
  padding: 0.45rem;
}

.portal-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.portal-theme-choice {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.portal-theme-choice:hover,
.portal-theme-choice:focus {
  background: rgba(2, 60, 59, 0.08);
  color: var(--text);
}

.portal-theme-choice.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.portal-account-signout-form {
  margin: 0;
}

.portal-account-actions {
  display: grid;
  gap: 0.25rem;
  padding: 0.2rem 0;
}

.portal-account-signout {
  width: 100%;
  text-align: left;
}

@media (min-width: 992px) {
  .portal-nav-shell {
    display: flex !important;
    flex-wrap: nowrap;
  }

  .portal-nav-links,
  .portal-nav-actions,
  .portal-nav-auth {
    flex-wrap: nowrap;
  }

  .portal-nav-auth {
    margin-left: 0.1rem;
  }
}

/* ── Nav search icon + flyout ── */

.portal-nav-search {
  position: relative;
  display: flex;
  align-items: center;
}

.portal-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  width: 2.7rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.portal-search-toggle:hover,
.portal-search-toggle:focus {
  background: rgba(2, 60, 59, 0.08);
  color: var(--text);
}

.portal-search-toggle[aria-expanded="true"] {
  background: rgba(2, 60, 59, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}

.portal-search-icon {
  flex: 0 0 auto;
}

.portal-search-flyout {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.55rem;
  background: color-mix(in srgb, var(--surface) 92%, white 8%);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 24px 50px rgba(11, 31, 38, 0.14);
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
  z-index: 1050;
}

.portal-search-flyout.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.portal-search-flyout-form {
  display: flex;
  gap: 0.4rem;
}

.portal-search-flyout-input {
  flex: 1 1 auto;
  border-radius: 0.7rem;
  font-size: 0.92rem;
}

.portal-search-flyout-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(0, 166, 163, 0.2);
}

.portal-search-flyout-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  padding: 0.375rem 0.75rem;
}

:root[data-bs-theme="light"] .btn-primary,
:root[data-bs-theme="dark"] .btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-color: var(--on-primary);
  --bs-btn-hover-bg: var(--primary-strong);
  --bs-btn-hover-border-color: var(--primary-strong);
  --bs-btn-hover-color: var(--on-primary);
  --bs-btn-active-bg: var(--primary-strong);
  --bs-btn-active-border-color: var(--primary-strong);
  --bs-btn-active-color: var(--on-primary);
  text-decoration: none;
}

:root[data-bs-theme="light"] .btn-outline-primary,
:root[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-hover-color: var(--on-primary);
  --bs-btn-active-bg: var(--primary-strong);
  --bs-btn-active-border-color: var(--primary-strong);
  --bs-btn-active-color: var(--on-primary);
}

.portal-main {
  position: relative;
}

.portal-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin-top: 2rem;
  padding: 1rem 0;
  font-size: 0.9rem;
}

.hero-panel {
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: linear-gradient(130deg, var(--surface) 0%, var(--surface-3) 100%);
  box-shadow: var(--shadow-hero);
}

.hero-panel-alt {
  background: linear-gradient(120deg, #023c3b 0%, #036563 45%, #1276ce 100%);
  color: #f7fffe;
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-panel-alt .hero-copy,
.hero-panel-alt .eyebrow,
.hero-panel-alt .text-muted {
  color: rgba(237, 250, 250, 0.86) !important;
}

.industrial-hero {
  background: linear-gradient(140deg, var(--surface) 0%, var(--surface-2) 60%, rgba(18, 118, 206, 0.16) 100%);
}

.angled-hero {
  position: relative;
  overflow: hidden;
}

.angled-hero::after {
  content: "";
  position: absolute;
  right: -14%;
  top: -24%;
  width: 56%;
  height: 155%;
  transform: rotate(20deg);
  background: linear-gradient(180deg, rgba(0, 166, 163, 0.18), transparent);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.7vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-copy {
  color: var(--muted);
  max-width: 60ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--primary);
}

.surface-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

.surface-card-dark {
  background: rgba(2, 46, 45, 0.42);
  border-color: rgba(255, 255, 255, 0.2);
  color: #eafaf9;
}

.surface-card-frost {
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

:root[data-bs-theme="dark"] .surface-card-frost {
  background: rgba(12, 24, 28, 0.55);
}

.surface-card-grid {
  border-style: dashed;
}

.search-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--primary-soft);
  box-shadow: 0 0 0 0.16rem var(--bs-focus-ring-color);
}

@media (min-width: 992px) {
  .search-row {
    grid-template-columns: 1fr auto auto;
  }

  .search-row .form-select {
    max-width: 220px;
  }
}

.search-row-glow .form-control,
.search-row-glow .btn {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.article-search-panel {
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface-2) 74%, white 26%);
  overflow: hidden;
}

.article-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
}

.article-search-summary::-webkit-details-marker {
  display: none;
}

.article-search-summary-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.article-search-summary-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.article-search-summary-text {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-search-summary-icon {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.article-search-panel[open] .article-search-summary {
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
}

.article-search-panel[open] .article-search-summary-icon {
  transform: rotate(225deg);
}

.article-search-body {
  padding-top: 0.35rem;
}

.article-search-status {
  min-height: 1.5rem;
}

.article-top-actions {
  max-width: 100%;
}

#article-related,
#article-help {
  scroll-margin-top: 6rem;
}

.article-resolution-actions .btn {
  flex: 1 1 14rem;
}

.article-support-actions .btn {
  min-width: 100%;
}

.article-related-list > * + * {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.case-intake-shell {
  max-width: 980px;
  margin-inline: auto;
  background: #ffffff;
  border: 1px solid #e3e7ea;
  border-radius: 0.3rem;
  box-shadow: none;
}

.case-intake-breadcrumb {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.65rem;
  color: #537f80;
}

.case-intake-intro {
  max-width: 760px;
  font-size: 1rem;
  color: var(--text);
}

.required-label::after {
  content: " *";
  color: #e74c3c;
}

:root[data-bs-theme="dark"] .required-label::after {
  color: #f1948a;
}

.case-intake-form {
  gap: 1.5rem;
}

.case-intake-lookup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.case-intake-lookup .form-control {
  flex: 1 1 0%;
  min-width: 0;
  padding-right: 2.2rem;
}

.case-intake-lookup-clear {
  position: absolute;
  right: 4.2rem;
  width: 1.2rem;
  height: 1.2rem;
  opacity: 0.5;
}

.case-intake-lookup-clear:hover {
  opacity: 0.8;
}

.case-intake-lookup-find {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Lookup results: selection state (no Bootstrap equivalent) */
.lookup-results-container {
  scrollbar-color: var(--line) var(--surface);
}

.lookup-results-table td {
  white-space: nowrap;
}

@media (min-width: 992px) {
  .lookup-results-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
}

.lookup-results-table tbody tr:has(input:checked) {
  background: var(--surface-3);
}

.case-intake-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.case-intake-shell .form-control,
.case-intake-shell .form-select,
.case-intake-shell .input-group-text {
  background: #ffffff;
  color: #232c31;
  border-color: #c7d2da;
  border-radius: 0;
  min-height: 2rem;
  font-size: 0.86rem;
}

.case-intake-shell textarea.form-control {
  scrollbar-color: #9fb1bc #ffffff;
}

.case-intake-shell textarea.form-control::-webkit-scrollbar {
  width: 0.8rem;
}

.case-intake-shell textarea.form-control::-webkit-scrollbar-track {
  background: #ffffff;
}

.case-intake-shell textarea.form-control::-webkit-scrollbar-thumb {
  background: #90a3ae;
  border: 2px solid #ffffff;
  border-radius: 999px;
}

.case-intake-shell .form-control::placeholder,
.case-intake-shell textarea.form-control::placeholder {
  color: #8a949c;
}

.case-intake-shell .input-group-text {
  min-width: 2rem;
  justify-content: center;
  color: #4c606a;
  padding-inline: 0.45rem;
}

.case-intake-shell .case-intake-lookup .form-control[readonly] {
  background: var(--surface-2);
}

.case-intake-shell .btn-outline-secondary {
  border-color: var(--line);
  color: var(--muted);
}

.contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.profile-shell {
  max-width: 980px;
}

.profile-hero {
  background: linear-gradient(145deg, var(--surface), var(--surface-3));
}

.profile-hero-layout {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  grid-template-columns: auto 1fr;
}

.profile-avatar {
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: var(--on-primary);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-soft);
}

.profile-section {
  display: grid;
  gap: 1.2rem;
}

.profile-section + .profile-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.profile-section-heading p {
  max-width: 62ch;
}

.profile-preferences {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-preference-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border-left: 3px solid var(--primary-soft);
  border-radius: 0;
}

.profile-preference-card .form-check-input {
  margin-top: 0.2rem;
}

.profile-preference-card strong,
.profile-preference-card small {
  display: block;
}

.profile-preference-card small {
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.5;
}

.announcement-intro {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
}

.announcement-table-head {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border-bottom: 1px solid var(--line);
}

.announcement-table th {
  white-space: nowrap;
}

.announcement-sort-link {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.announcement-sort-link:hover,
.announcement-sort-link:focus,
.announcement-sort-link.active {
  color: var(--primary);
}

.announcement-table-action {
  min-width: 5rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0;
}

.meta-row > div {
  min-width: 0;
}

.meta-row dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.meta-row dd {
  margin: 0;
  font-weight: 700;
}

.case-intake-shell .form-text {
  color: #66757d;
  font-size: 0.78rem;
}

.case-intake-counter {
  text-align: right;
}

.portal-toast.toast {
  min-width: min(24rem, calc(100vw - 2rem));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--surface) 90%, var(--primary) 10%);
  color: var(--text);
}

.portal-toast-header {
  background: transparent;
  color: var(--text);
  border-bottom-color: color-mix(in srgb, var(--primary) 20%, var(--line));
}

:root[data-bs-theme="dark"] .case-intake-shell {
  background: #121a1d;
  border-color: rgba(255, 255, 255, 0.14);
}

:root[data-bs-theme="dark"] .case-intake-breadcrumb {
  color: var(--muted);
}

:root[data-bs-theme="dark"] .case-intake-intro,
:root[data-bs-theme="dark"] .case-intake-label,
:root[data-bs-theme="dark"] .case-intake-shell .form-text,
:root[data-bs-theme="dark"] .case-intake-shell .form-control,
:root[data-bs-theme="dark"] .case-intake-shell .form-select,
:root[data-bs-theme="dark"] .case-intake-shell .input-group-text {
  color: var(--text);
}

:root[data-bs-theme="dark"] .case-intake-shell .form-control,
:root[data-bs-theme="dark"] .case-intake-shell .form-select,
:root[data-bs-theme="dark"] .case-intake-shell .input-group-text {
  background: #172126;
  border-color: #33505b;
}

:root[data-bs-theme="dark"] .case-intake-shell textarea.form-control {
  scrollbar-color: #6d8792 #172126;
}

:root[data-bs-theme="dark"] .case-intake-shell textarea.form-control::-webkit-scrollbar-track {
  background: #172126;
}

:root[data-bs-theme="dark"] .case-intake-shell textarea.form-control::-webkit-scrollbar-thumb {
  background: #607983;
  border-color: #172126;
}

.case-intake-shell .case-intake-counter.is-over-limit,
:root[data-bs-theme="dark"] .case-intake-shell .case-intake-counter.is-over-limit {
  color: var(--bs-danger);
  font-weight: 700;
}

.suggestions-panel {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface-2);
  min-height: 2.35rem;
  overflow: hidden;
}

.suggestions-panel:empty {
  display: none;
}

.suggestions-preview-status {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--primary) 40%, var(--line));
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--primary) 12%);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.suggestions-preview-status.htmx-request {
  display: inline-flex;
}

.suggestions-preview-hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.hero-panel-alt .suggestions-preview-status,
.hero-panel-alt .suggestions-preview-hint {
  color: rgba(247, 255, 254, 0.94);
  text-shadow: 0 1px 1px rgba(1, 22, 28, 0.28);
}

.suggestions-wrap {
  padding: 0.35rem;
}

.suggestions-head {
  padding: 0.55rem 0.65rem 0.25rem;
}

.suggestions-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.suggestions-caption {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.suggestions-title {
  margin: 0.45rem 0.65rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.6rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0.65rem;
}

.suggestion-item:hover {
  background: var(--surface-3);
}

.case-deflection-panel {
  border-radius: 0.9rem;
  margin-top: 0;
}

.case-deflection-head {
  padding: 0.9rem 1rem 0.35rem;
}

.case-deflection-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.case-deflection-list .case-deflection-item {
  display: block;
  background: transparent;
  border-left: 0;
  border-right: 0;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.case-deflection-list .case-deflection-item:first-child {
  border-top: 0;
}

.case-deflection-list .case-deflection-item:hover {
  background: var(--surface-3);
}

.case-deflection-item-title {
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.case-deflection-item-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.case-deflection-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.case-deflection-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem 0.9rem;
}

.suggestion-meta {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.suggestions-empty {
  padding: 0.65rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.article-card {
  border-left: 3px solid var(--primary-soft);
  border-radius: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  border-color: var(--primary);
}

@media (prefers-reduced-motion: no-preference) {
  .article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  }
}

.search-result-card mark {
  background: #fff0c1;
  color: #024544;
  padding-inline: 0.08rem;
  border-radius: 0.2rem;
}

:root[data-bs-theme="dark"] .search-result-card mark {
  background: #4b3f14;
  color: #fff4c8;
}

.article-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.article-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}


.metric-stack {
  display: grid;
  gap: 0.8rem;
}


.metric-row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.55rem;
  border-bottom: 1px dashed var(--line);
}

.metric-row:last-child {
  border-bottom: 0;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.76rem;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.chip-link:hover,
.chip-link.active {
  border-color: var(--primary-soft);
  background: rgba(0, 166, 163, 0.18);
  color: var(--text);
}

.chip-link svg {
  width: 0.9em;
  height: 0.9em;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.chip-link:hover svg {
  opacity: 0.85;
}

.knowledge-chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.knowledge-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.knowledge-exclusion-chip {
  border-style: dashed;
}

.knowledge-exclusion-options {
  display: grid;
  gap: 0.65rem;
}

.knowledge-exclusion-menu {
  width: min(24rem, calc(100vw - 3rem));
  max-height: min(24rem, 70vh);
  overflow-y: auto;
}

.knowledge-category-grid {
  display: grid;
  gap: 0.75rem;
}

.category-row,
.case-row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 0;
}

.category-row {
  font-weight: 600;
}

.category-row-title {
  min-width: 0;
}

.category-row-meta {
  flex: 0 0 auto;
}

.category-row:hover,
.case-row-link:hover {
  color: var(--primary);
}

.pill-soft {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--chip-bg);
  color: var(--primary);
}

.pagination .page-link {
  --bs-pagination-bg: var(--surface);
  --bs-pagination-color: var(--text);
  --bs-pagination-border-color: var(--line);
  --bs-pagination-active-bg: var(--primary);
  --bs-pagination-active-border-color: var(--primary);
  --bs-pagination-disabled-color: var(--muted);
  --bs-pagination-disabled-bg: var(--surface-2);
  --bs-pagination-disabled-border-color: var(--line);
  --bs-pagination-hover-bg: var(--surface-2);
  --bs-pagination-hover-color: var(--text);
  --bs-pagination-hover-border-color: var(--line);
  border-radius: 999px;
}

.pill-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--status-bg);
  color: var(--status-text);
}

.mini-link {
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.featured-article-item {
  padding: 0.6rem 0.7rem;
}

.featured-article-item .h6 {
  font-size: 0.94rem;
}

.excerpt-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-entry-panel {
  position: relative;
  overflow: hidden;
}

.home-entry-grid {
  display: grid;
  gap: 0.9rem;
}

.home-entry-card {
  display: block;
  padding: 1rem;
  border-left: 3px solid var(--primary-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #eafaf9;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.home-entry-card:hover,
.home-entry-card:focus {
  color: inherit;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: no-preference) {
  .home-entry-card:hover,
  .home-entry-card:focus {
    transform: translateX(4px);
  }
}

.home-entry-card-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.home-entry-card:hover .home-entry-card-icon,
.home-entry-card:focus .home-entry-card-icon {
  opacity: 1;
}

.home-entry-card strong,
.home-home-link strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.home-entry-card span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(237, 250, 250, 0.8);
  font-size: 0.88rem;
  line-height: 1.45;
}

.home-article-list {
  display: grid;
  gap: 0.8rem;
}

.home-home-link {
  display: block;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.home-home-link strong {
  color: var(--link);
}

.home-home-link:hover strong {
  text-decoration: underline;
}

.home-home-link:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.home-home-link span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}


.portal-table th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}

.portal-table td,
.portal-table th {
  border-color: var(--line);
  background: transparent;
  color: inherit;
}

.case-grid-shell {
  border-color: var(--line);
}

.support-kb-form {
  align-items: stretch;
}

.support-search-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.support-search-actions .btn {
  flex: 1 1 0;
}

.support-guidance-panel {
  background: linear-gradient(145deg, var(--surface), var(--surface-3));
}

.support-guidance-list {
  display: grid;
  gap: 1rem;
}

.support-guidance-list li {
  display: grid;
  gap: 0.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.support-guidance-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.support-guidance-list strong {
  font-size: 0.95rem;
}

.support-guidance-list span {
  color: var(--muted);
  line-height: 1.55;
}

.support-guidance-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.case-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.case-grid-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.case-grid-scope {
  border-bottom: 0;
}

.case-grid-scope .nav-link {
  font-weight: 700;
  border-color: var(--line);
  color: var(--muted);
}

.case-grid-scope .nav-link:hover,
.case-grid-scope .nav-link:focus {
  color: var(--text);
  background: var(--surface-2);
}

.case-grid-scope .nav-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.case-grid-actions .input-group {
  min-width: min(100%, 320px);
}

.case-grid-actions .form-control,
.case-grid-actions .btn {
  border-color: var(--line);
}

.case-grid-helper {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 58%, transparent);
  color: var(--muted);
  font-size: 0.84rem;
}

.case-grid-table th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-grid-table td,
.case-grid-table th {
  border-color: var(--line);
  background: transparent;
  color: inherit;
  vertical-align: top;
}

.case-grid-sort {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.case-grid-sort:hover,
.case-grid-sort:focus {
  color: var(--text);
}

.case-grid-sort.active {
  color: var(--primary);
}

.case-grid-sort-indicator {
  width: 0.7rem;
  text-align: center;
  line-height: 1;
}

.case-grid-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}

.case-grid-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
}

.case-grid-link:hover,
.case-grid-link:focus {
  text-decoration: underline;
  color: var(--primary-strong);
}

.case-grid-no-results {
  padding: 1.6rem;
}

/* ── Case detail: overview grid ── */

.case-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 2rem;
}

.case-overview-field {
  min-width: 0;
}

.case-overview-field dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.case-overview-field dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.case-overview-field-wide {
  grid-column: 1 / -1;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

/* Separator between overview and timeline */
.case-detail-section-divider {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-soft), var(--line) 50%, transparent);
  margin-block: 0.5rem;
  opacity: 0.45;
}

@media (max-width: 991.98px) {
  .case-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .case-overview-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.timeline-list {
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.15rem;
  padding-left: 0.4rem;
}

.timeline-item-icon {
  position: absolute;
  left: -1.78rem;
  top: 0.12rem;
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--surface);
}

.timeline-item-icon svg {
  width: 100%;
  height: 100%;
}

.timeline-item-email .timeline-item-icon {
  color: #2f6ea6;
}

.timeline-item-appointment .timeline-item-icon {
  color: #2b7d68;
}

.timeline-item-portal-note .timeline-item-icon,
.timeline-item-portal-note-attachment .timeline-item-icon {
  color: #7a4fc2;
}

.timeline-item-audit .timeline-item-icon,
.timeline-item-status .timeline-item-icon {
  color: #8a6b2d;
}

.timeline-item-resolution .timeline-item-icon {
  color: #2d8a57;
}

.timeline-item-case-created .timeline-item-icon {
  color: #3f6f99;
}

.timeline-item-heading {
  margin: 0;
  font-size: 1rem;
}

.timeline-item-toggle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 1rem;
  width: 100%;
  padding: 0 1.75rem 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.timeline-item-toggle:hover .timeline-item-title,
.timeline-item-toggle:focus-visible .timeline-item-title {
  color: var(--primary);
}

.timeline-item-toggle:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 0.2rem;
}

.timeline-item .timeline-item-title {
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.timeline-item .timeline-item-meta {
  align-self: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.timeline-item .timeline-item-chevron {
  position: absolute;
  top: 0.35rem;
  right: 0.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(225deg);
  transition: transform 0.2s ease;
}

.timeline-item-toggle.collapsed .timeline-item-chevron {
  transform: rotate(45deg);
}

.timeline-item-details {
  padding-top: 0.2rem;
}

.timeline-item p {
  margin: 0.22rem 0;
  color: var(--muted);
}

.timeline-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.crm-rich-text {
  color: var(--muted);
  line-height: 1.6;
}

.crm-rich-text * {
  max-width: 100%;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

.crm-rich-text :is(p, ul, ol, blockquote, table) {
  margin: 0.35rem 0 0.6rem !important;
}

.crm-rich-text :is(h1, h2, h3, h4, h5, h6) {
  margin: 0.45rem 0 0.4rem !important;
  font-size: 1rem !important;
  line-height: 1.35;
}

.crm-rich-text :is(ul, ol) {
  padding-left: 1.2rem;
}

.crm-rich-text a,
.crm-rich-text a * {
  color: var(--link) !important;
  text-decoration: underline;
}

.crm-rich-text strong,
.crm-rich-text b {
  color: var(--text) !important;
  font-weight: 800;
}

.crm-rich-text iframe,
.crm-rich-text video {
  display: block;
  width: 100% !important;
  height: auto !important;
  border-radius: 0.85rem;
}

.crm-rich-text img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.85rem;
}

.crm-rich-text :first-child {
  margin-top: 0 !important;
}

.crm-rich-text :last-child {
  margin-bottom: 0 !important;
}

.timeline-rich-text {
  margin: 0.24rem 0 0.3rem;
}

.article-body p {
  line-height: 1.8;
}

.article-body :is(p, li, td, blockquote, div, span) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* CRM "Heading N" styles arrive as h1-h6 with their pinned inline sizes stripped by the
   formatter; give article headings a compact scale subordinate to the page title. */
.article-body :is(h1, h2, h3, h4, h5, h6) {
  margin: 1.1rem 0 0.5rem;
  line-height: 1.3;
  font-weight: 700;
}

.article-body h1 {
  font-size: 1.3rem;
}

.article-body h2 {
  font-size: 1.2rem;
}

.article-body h3 {
  font-size: 1.1rem;
}

.article-body :is(h4, h5, h6) {
  font-size: 1rem;
}

/* CRM-authored tables carry no margin of their own; authored inline margins still win. */
.article-body table {
  margin: 0.75rem 0 1rem;
}

.article-body,
.article-body * {
  color: var(--article-color, var(--article-fg, var(--text))) !important;
  font-family: inherit !important;
}

/* Colors preserved from article markup carry a server-computed dark-theme variant. */
:root[data-bs-theme="dark"] .article-body,
:root[data-bs-theme="dark"] .article-body * {
  color: var(--article-color-dark, var(--article-fg, var(--text))) !important;
}

.article-body [style*="background-color"],
.article-body [style*="background:"] {
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
}

/* Light "paper" backgrounds authored for a white page carry a server-computed dark-theme shade. */
:root[data-bs-theme="dark"] .article-body [style*="--article-bg-dark"] {
  background-color: var(--article-bg-dark) !important;
}

.article-body a,
.article-body a *,
:root[data-bs-theme="dark"] .article-body a,
:root[data-bs-theme="dark"] .article-body a * {
  color: var(--link) !important;
}

.article-body [style*="background-color"] a,
.article-body [style*="background-color"] a *,
.article-body [style*="background:"] a,
.article-body [style*="background:"] a * {
  color: var(--article-fg, var(--text)) !important;
}

:root[data-bs-theme="dark"] .article-body [style*="background-color"] a,
:root[data-bs-theme="dark"] .article-body [style*="background-color"] a *,
:root[data-bs-theme="dark"] .article-body [style*="background:"] a,
:root[data-bs-theme="dark"] .article-body [style*="background:"] a * {
  color: var(--article-fg-dark, var(--article-fg, var(--text))) !important;
}

.article-body iframe,
.article-body video,
.article-body object,
.article-body embed {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
}

.article-body img {
  max-width: 100% !important;
  height: auto !important;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-body .article-command-block {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-left: 4px solid var(--primary);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface-2) 82%, white 18%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.article-body .article-command-block code {
  display: block;
  font-family: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace !important;
  font-size: 0.92rem !important;
  line-height: 1.7;
  color: var(--text) !important;
  background: transparent;
}

.article-body :is(code, kbd, samp) {
  font-family: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace !important;
  font-size: 0.92em;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-body [id],
.article-body [name] {
  scroll-margin-top: 6rem;
}

/* Legacy Power Pages collapsible panels: the authored chevron is a black data-URI SVG set via
   inline `content`, invisible on the dark theme; replace it with a currentColor chevron and align
   it to the title with flexbox. The body keeps its authored 24px indent (16px icon + 8px gap). */
.article-body .collapsible_panel_head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.article-body .collapsible_panel_icon {
  content: none !important;
  float: none !important;
  flex: 0 0 auto;
  position: relative;
  width: 16px !important;
  height: 16px !important;
  overflow: hidden;
}

.article-body .collapsible_panel_icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-65%, -50%) rotate(-45deg);
  transition: transform 0.15s ease;
}

.article-body .collapsible_panel.is-open .collapsible_panel_icon::before {
  transform: translate(-50%, -70%) rotate(45deg);
}

.article-body .collapsible_panel_title {
  flex: 1 1 auto;
  margin-left: 0 !important;
}

.article-body .collapsible_panel_title p {
  line-height: 1.4;
}

.article-search-hit {
  padding: 0 0.14rem;
  border-radius: 0.2rem;
  background: color-mix(in srgb, #fff1a8 72%, white 28%);
  box-shadow: inset 0 -1px 0 rgba(148, 114, 18, 0.28);
  color: #1d1d1d !important;
}

.article-search-hit.is-active {
  background: color-mix(in srgb, #ffd869 82%, white 18%);
  box-shadow: 0 0 0 1px rgba(148, 114, 18, 0.28);
  color: #111111 !important;
}

:root[data-bs-theme="dark"] .article-search-panel {
  background: color-mix(in srgb, var(--surface-2) 86%, #10181d 14%);
}

:root[data-bs-theme="dark"] .article-search-hit {
  background: color-mix(in srgb, #ffe27a 88%, white 12%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  color: #161616 !important;
}

:root[data-bs-theme="dark"] .article-search-hit.is-active {
  background: #ffcf4d;
  box-shadow: 0 0 0 1px rgba(255, 228, 152, 0.35);
  color: #0f0f0f !important;
}

.minimalist-hero {
  background: linear-gradient(145deg, var(--surface), var(--surface-2) 64%, rgba(0, 166, 163, 0.1));
}

/* ── Decorative section divider ── */

.section-divider {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-soft), transparent);
  margin-block: 0.5rem;
  opacity: 0.35;
}

/* ── Homepage CTA banner ── */

.cta-banner {
  background: linear-gradient(145deg, var(--surface-3) 0%, var(--surface) 60%);
}

:root[data-bs-theme="dark"] .cta-banner {
  background: linear-gradient(145deg, var(--surface-3) 0%, var(--surface-2) 60%);
}

/* ── Enhanced focus-visible ring for interactive cards ── */

.portal-nav .nav-link:focus-visible,
.portal-nav-primary:focus-visible,
.portal-account-toggle:focus-visible,
.portal-account-dropdown .dropdown-item:focus-visible,
.portal-theme-choice:focus-visible,
.portal-search-toggle:focus-visible,
.announcement-sort-link:focus-visible,
.case-grid-scope .btn:focus-visible,
.case-grid-sort:focus-visible,
.case-grid-link:focus-visible,
.category-row:focus-visible,
.home-entry-card:focus-visible,
.article-card:focus-visible,
.chip-link:focus-visible,
.home-home-link:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--primary-soft) 20%, transparent);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.theme-r1 {
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

.theme-r2 {
  --font-display: "Chivo", "Segoe UI", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

.theme-r2-fonts {
  --font-display: "Chivo", "Segoe UI", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

.theme-r3 {
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

.theme-r4,
.theme-r5 {
  --font-display: "Chivo", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

.empty-state {
  border: 1px dashed var(--line);
  background: linear-gradient(145deg, var(--surface), var(--surface-3));
}

.empty-state-graphic {
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--chip-bg);
  color: var(--primary);
}

.empty-state-graphic svg {
  width: 68px;
  height: 68px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 991.98px) {
  .container,
  .row,
  .row > *,
  .portal-nav .container,
  .portal-nav-shell,
  .portal-nav-links,
  .portal-nav-actions,
  .portal-nav-auth,
  .section-alert-banner,
  .alert-banner-content,
  .support-search-actions,
  .support-guidance-actions,
  .case-grid-toolbar,
  .case-grid-actions,
  .announcement-table-head,
  .article-row,
  .article-row > *,
  .knowledge-category-grid,
  .knowledge-category-grid > * {
    min-width: 0;
  }

  /* Cap alert banner font on tablet/mobile so admin-set sizes stay readable */
  .alert-banner {
    --alert-max-size: 1rem;
    padding: 0.5rem 0;
  }

  .portal-nav .container {
    padding-inline: 0.8rem;
  }

  .portal-nav-shell {
    margin-top: 0.65rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--line);
  }

  .portal-nav-links {
    gap: 0.25rem;
  }

  .portal-nav .nav-link {
    padding: 0.72rem 0.85rem;
    border-radius: 1rem;
  }

  .portal-nav-actions {
    width: 100%;
    align-items: stretch;
    gap: 0.65rem;
  }

  .portal-nav-actions .theme-menu {
    margin-inline-end: auto;
  }

  .portal-nav-auth {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .portal-account-toggle,
  .portal-nav-primary {
    width: 100%;
    max-width: none;
  }

  .portal-account-toggle {
    justify-content: center;
  }

  .portal-nav-auth .btn,
  .portal-nav-cta {
    width: 100%;
  }

  .portal-account-dropdown {
    width: min(100%, 22rem);
  }

  .hero-panel,
  .surface-card {
    border-radius: 0.95rem;
  }

  .hero-title {
    font-size: clamp(1.7rem, 8vw, 2.5rem);
  }

  .article-row {
    flex-direction: column;
    gap: 0.35rem;
  }

  .portal-footer .container {
    text-align: center;
    justify-content: center !important;
  }

  .support-search-actions,
  .support-guidance-actions,
  .case-grid-actions,
  .profile-hero-layout {
    width: 100%;
  }

  .profile-hero-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .support-search-actions .btn,
  .support-guidance-actions .btn,
  .case-grid-actions .btn,
  .case-grid-actions .input-group {
    width: 100%;
  }

  .case-grid-scope {
    width: 100%;
  }

  .case-grid-scope .nav-link {
    flex: 1 1 0;
  }

  /* --- Cases grid: card layout on mobile --- */
  .case-grid-table thead {
    display: none;
  }

  .case-grid-table,
  .case-grid-table tbody,
  .case-grid-table tr,
  .case-grid-table td {
    display: block;
    width: 100%;
  }

  .case-grid-table tbody {
    padding: 1rem;
  }

  .case-grid-table tr {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
  }

  .case-grid-table tr + tr {
    margin-top: 0.9rem;
  }

  .case-grid-table td {
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .case-title-cell {
    margin-bottom: 0.35rem;
  }

  .case-title-cell .case-grid-link {
    font-size: 1rem;
    line-height: 1.35;
  }

  .case-number-cell {
    margin-bottom: 0.25rem;
  }

  .case-number-cell .case-grid-link {
    font-size: 0.82rem;
    color: var(--muted);
  }

  /* Hide secondary fields on mobile - visible in case detail */
  .case-contact-cell,
  .case-type-cell,
  .case-impact-cell {
    display: none;
  }

  .case-owner-cell,
  .case-status-cell,
  .case-created-cell {
    display: inline;
    font-size: 0.84rem;
    color: var(--muted);
  }

  .case-owner-cell::before,
  .case-status-cell::before,
  .case-created-cell::before {
    display: none;
  }

  .case-status-cell::after,
  .case-owner-cell::after {
    content: " · ";
  }

  .case-grid-link {
    overflow-wrap: anywhere;
  }

  /* --- Announcement table: compact card layout --- */
  .announcement-table-head {
    align-items: flex-start !important;
  }

  .announcement-table thead {
    display: none;
  }

  .announcement-table,
  .announcement-table tbody {
    display: block;
    width: 100%;
  }

  .announcement-table tbody {
    padding: 1rem;
  }

  .announcement-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
  }

  .announcement-table tr + tr {
    margin-top: 0.9rem;
  }

  .announcement-table td {
    padding: 0;
    border: 0;
  }

  /* Title first, full width */
  .announcement-title-cell {
    order: 1;
    width: 100%;
    margin-bottom: 0.55rem;
  }

  .announcement-title-cell::before {
    display: none;
  }

  .announcement-title-cell a {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
  }

  /* Inline meta row: status pill + product + start date */
  .announcement-status-cell {
    order: 2;
    margin-right: 0.5rem;
  }

  .announcement-product-cell {
    order: 3;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .announcement-start-cell {
    order: 4;
    color: var(--muted);
    font-size: 0.82rem;
    margin-left: auto;
  }

  .announcement-status-cell::before,
  .announcement-product-cell::before,
  .announcement-start-cell::before {
    display: none;
  }

  /* Hide Date Resolved on mobile - available in Details */
  .announcement-resolved-cell {
    display: none;
  }

  /* Details as a text link, not a big button */
  .announcement-action-cell {
    order: 5;
    width: 100%;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
    text-align: center !important;
  }

  .announcement-action-cell::before {
    display: none;
  }

  .announcement-action-cell .btn {
    width: 100%;
    padding-block: 0.4rem;
    font-size: 0.84rem;
  }

  /* --- Events table: card layout on mobile --- */
  .event-table thead {
    display: none;
  }

  .event-table,
  .event-table tbody,
  .event-table tr,
  .event-table td {
    display: block;
    width: 100%;
  }

  .event-table tbody {
    padding: 1rem;
  }

  .event-table tr {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
  }

  .event-table tr + tr {
    margin-top: 0.9rem;
  }

  .event-table td {
    padding: 0;
    border: 0;
  }

  .event-name-cell {
    margin-bottom: 0.65rem;
  }

  .event-name-cell::before,
  .event-action-cell::before {
    display: none;
  }

  .event-name-cell a {
    font-size: 1rem;
    line-height: 1.35;
  }

  .event-location-cell,
  .event-type-cell,
  .event-start-cell,
  .event-end-cell,
  .event-status-cell,
  .event-recording-cell {
    display: grid;
    gap: 0.18rem;
    margin-bottom: 0.55rem;
  }

  .event-location-cell::before,
  .event-type-cell::before,
  .event-start-cell::before,
  .event-end-cell::before,
  .event-status-cell::before,
  .event-recording-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .event-action-cell {
    margin-top: 0.35rem;
    text-align: left !important;
  }

  .event-action-cell .btn {
    width: 100%;
  }

  /* --- Search form: stack all 3 elements on mobile --- */
  .search-row .form-select {
    width: 100%;
  }

  .knowledge-chip-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .knowledge-chip-strip::-webkit-scrollbar {
    display: none;
  }

  .knowledge-chip-strip .chip-link {
    flex: 0 0 auto;
  }

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

  .category-row {
    min-height: 100%;
  }

  .category-row-meta {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-inline: 1rem;
  }

  .search-row .btn,
  .search-row .form-control,
  .search-row .form-select {
    width: 100%;
  }

  .hero-panel,
  .surface-card {
    padding: 1rem !important;
  }


  .brand-logo {
    max-height: 34px;
  }

  .case-row-link,
  .category-row {
    align-items: flex-start;
  }

  .case-grid-toolbar,
  .case-grid-helper {
    padding-inline: 0.9rem;
  }

  /* Tighter cap for alert banner on small phones */
  .alert-banner {
    --alert-max-size: 0.875rem;
    padding: 0.4rem 0;
  }

  /* Tighter card spacing on small phones */
  .case-grid-table tr,
  .announcement-table tr,
  .event-table tr {
    padding: 0.85rem;
  }

  .knowledge-category-grid {
    grid-template-columns: 1fr;
  }

  .profile-preferences {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 576px) {
  .home-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.is-portal-busy {
  cursor: progress;
}

.portal-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  background: rgba(244, 248, 251, 0.72);
  backdrop-filter: blur(8px);
}

.portal-busy-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.portal-busy-card {
  --busy-accent: var(--primary);
  width: min(100%, 30rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.25rem 1.2rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--busy-accent) 28%, #d3dee6);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.18);
}

.portal-busy-overlay[data-busy-variant="case"] .portal-busy-card {
  --busy-accent: #cb7a35;
}

.portal-busy-overlay[data-busy-variant="comment"] .portal-busy-card {
  --busy-accent: #4a78b0;
}

.portal-busy-overlay[data-busy-variant="contact"] .portal-busy-card {
  --busy-accent: #1f8f6a;
}

.portal-busy-overlay[data-busy-variant="profile"] .portal-busy-card {
  --busy-accent: #7a57b8;
}

.portal-busy-overlay[data-busy-variant="search"] .portal-busy-card {
  --busy-accent: #0b7a78;
}

.portal-busy-overlay[data-busy-variant="signin"] .portal-busy-card,
.portal-busy-overlay[data-busy-variant="signout"] .portal-busy-card {
  --busy-accent: #3b82f6;
}

.portal-busy-spinner {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 0.3rem solid color-mix(in srgb, var(--busy-accent) 28%, #edf3f7);
  border-top-color: var(--busy-accent);
  animation: portal-busy-spin 0.85s linear infinite;
}

.portal-busy-copy {
  min-width: 0;
}

.portal-busy-eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--busy-accent);
}

.portal-busy-title {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
  color: #1f2b33;
  font-weight: 700;
}

.portal-busy-message {
  color: #43515c;
}

:root[data-bs-theme="dark"] .portal-busy-overlay {
  background: rgba(17, 24, 39, 0.56);
}

:root[data-bs-theme="dark"] .portal-busy-card {
  border-color: color-mix(in srgb, var(--busy-accent) 24%, rgba(255, 255, 255, 0.28));
  background: color-mix(in srgb, var(--surface-1) 92%, white 8%);
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.28);
}

:root[data-bs-theme="dark"] .portal-busy-spinner {
  border-color: color-mix(in srgb, var(--busy-accent) 18%, transparent);
  border-top-color: var(--busy-accent);
}

:root[data-bs-theme="dark"] .portal-busy-title {
  color: var(--text);
}

:root[data-bs-theme="dark"] .portal-busy-message {
  color: var(--text-soft);
}

form.is-submitting {
  opacity: 0.88;
}

.search-row.is-submitting-inline {
  opacity: 1;
}

.search-row.is-submitting-inline .form-control,
.search-row.is-submitting-inline .form-select {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border-color));
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 12%, transparent);
}

.search-row .btn.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 11rem;
}

.search-row .btn.is-busy::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 0.16rem solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  animation: portal-busy-spin 0.8s linear infinite;
}

@keyframes portal-busy-spin {
  to {
    transform: rotate(360deg);
  }
}

@media print {
  body {
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: #000000;
    --muted: #4f4f4f;
    --line: #d9d9d9;
    --link: #000000;
    --article-fg: #000000;
    background: #ffffff;
    color: #000000;
  }

  .skip-link,
  .portal-header,
  .portal-footer,
  .article-search-panel,
  .article-quick-link,
  .article-print-trigger,
  .article-related-card,
  .article-support-section {
    display: none;
  }

  .portal-main,
  .container,
  .row,
  .col-lg-8,
  .col-lg-4 {
    display: block;
    width: 100%;
    max-width: none;
  }

  .surface-card {
    border-color: transparent;
    background: #ffffff;
    box-shadow: none;
  }

  .article-body [style*="background-color"],
  .article-body [style*="background:"] {
    border: 1px solid #d9d9d9;
    background: transparent;
  }

  .article-body a,
  .article-body a *,
  :root[data-bs-theme="dark"] .article-body a,
  :root[data-bs-theme="dark"] .article-body a * {
    color: #000000 !important;
    text-decoration: underline;
  }
}
