/* Styles for the 2026 accessibility dashboard frontend. */
:root {
  color-scheme: dark;
  --demo-bg: #0e131a;
  --demo-bg-soft: #111821;
  --demo-surface: #161f29;
  --demo-surface-muted: #1b2531;
  --demo-border: #2d3b4b;
  --demo-text: #e5edf5;
  --demo-muted: #b5c2cf;
  --demo-accent: #2074aa;
  --demo-accent-strong: #2879b2;
  --demo-accent-soft: #1b3145;
  --demo-focus: #8bc9ff;
  --demo-error: #ff9f9f;
  --demo-tab-radius: 0.65rem;
  --demo-space-xs: 0.5rem;
  --demo-space-sm: 0.75rem;
  --demo-space-md: 1rem;
  --demo-space-lg: 1.25rem;
  --demo-space-xl: 1.5rem;
  --demo-space-2xl: 2rem;
}

body {
  background: linear-gradient(180deg, var(--demo-bg-soft) 0%, var(--demo-bg) 100%);
  color: var(--demo-text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: auto;
}

.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.header-back-link {
  margin-left: auto;
  margin-bottom: 0.12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #4d5f73;
  border-radius: 999px;
  background: transparent;
  color: #ecf1f9;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.header-back-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.header-back-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #18171c, 0 0 0 5px #7dd3fc;
}

.page-main {
  max-width: 74rem;
  padding: 1.75rem 1.15rem 3rem;
}

.card-surface {
  margin: 0;
  border: 1px solid var(--demo-border);
  border-radius: 0.8rem;
  background: var(--demo-surface);
}

.intro {
  margin-bottom: var(--demo-space-2xl);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.intro h1 {
  margin: 0 0 var(--demo-space-sm);
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
}

.intro p {
  margin: 0;
  color: var(--demo-muted);
}

.dashboard {
  padding: 0;
}

.tab-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: var(--demo-space-xs);
  margin: 0 0 -1px;
  overflow-x: auto;
  padding: 6px 6px 0;
  scrollbar-width: thin;
}

.tab-trigger {
  flex: 1 1 12.5rem;
  min-width: 11.5rem;
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-tab-radius) var(--demo-tab-radius) 0 0;
  padding: var(--demo-space-sm) var(--demo-space-md);
  background: #182432;
  color: var(--demo-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tab-trigger[aria-selected="true"] {
  border-color: var(--demo-border);
  border-bottom-color: var(--demo-surface-muted);
  background: var(--demo-surface-muted);
  box-shadow: inset 0 0.2rem 0 #5a84a7;
  color: #e4edf8;
  position: relative;
  z-index: 2;
}

.tab-trigger[aria-selected="false"]:hover {
  border-color: #4f647b;
}

.tab-trigger:focus-visible {
  outline: 3px solid var(--demo-focus);
  outline-offset: 2px;
  position: relative;
  z-index: 3;
}

.tab-panel {
  border: 1px solid var(--demo-border);
  border-radius: 0 0 var(--demo-tab-radius) var(--demo-tab-radius);
  padding: var(--demo-space-xl);
  background: var(--demo-surface-muted);
  position: relative;
  z-index: 1;
}

.tab-panel h3 {
  margin: 0;
  font-size: 1.16rem;
}

.tab-panel h3:focus,
.tab-panel h3:focus-visible,
.hc-a11y-proxy-container h4:focus,
.hc-a11y-proxy-container h4:focus-visible,
.hc-dialog h3:focus,
.hc-dialog h3:focus-visible {
  outline: none;
  box-shadow: none;
}

.tab-panel p {
  margin: var(--demo-space-sm) 0 var(--demo-space-lg);
  color: var(--demo-muted);
}

.chat-shell {
  margin: 0 0 var(--demo-space-lg);
  border: 1px solid #37506a;
  border-radius: 0.75rem;
  padding: var(--demo-space-md);
  background: #142233;
}

.chat-shell h4 {
  margin: 0 0 var(--demo-space-sm);
  font-size: 1rem;
}

.chat-form label {
  display: block;
  margin-bottom: var(--demo-space-xs);
  color: var(--demo-text);
  font-weight: 600;
}

.chat-help {
  margin: 0 0 var(--demo-space-xs);
  color: #9eb6ce;
  font-size: 0.9rem;
}

.chat-row {
  --chat-control-height: 2.85rem;
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
}

.chat-row textarea,
.chat-row input {
  flex: 1;
  min-width: 0;
  min-height: var(--chat-control-height);
  height: var(--chat-control-height);
  border: 1px solid #50647d;
  border-radius: 0.5rem;
  padding: var(--demo-space-sm) 0.85rem;
  background: #0f1722;
  color: var(--demo-text);
  font: inherit;
  box-sizing: border-box;
}

.chat-row textarea {
  line-height: 1.4;
  overflow-y: auto;
  resize: none;
}

.chat-row textarea:focus-visible,
.chat-row input:focus-visible {
  outline: none;
  border-color: var(--demo-focus);
  box-shadow: 0 0 0 2px var(--demo-bg), 0 0 0 4px var(--demo-focus);
}

.chat-row textarea[aria-invalid="true"],
.chat-row input[aria-invalid="true"] {
  border-color: var(--demo-error);
}

.chat-row button {
  min-height: var(--chat-control-height);
  height: var(--chat-control-height);
  border: 1px solid var(--demo-accent-strong);
  border-radius: 0.5rem;
  padding: 0 0.95rem;
  background: var(--demo-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.chat-row button:hover {
  background: var(--demo-accent-strong);
}

.chat-row button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--demo-bg), 0 0 0 5px var(--demo-focus);
}

.chat-row .chat-mic-button {
  min-width: var(--chat-control-height);
  width: var(--chat-control-height);
  padding: 0;
  border-color: #5a718a;
  background: #1f2f41;
  color: #edf6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-row .chat-mic-button:hover {
  background: #2a3f55;
}

.chat-row .chat-mic-button.is-listening {
  border-color: #c97a83;
  background: #8f2f3a;
}

.chat-row .chat-mic-button.is-listening:hover {
  background: #a63a46;
}

.chat-row .chat-mic-button:disabled {
  border-color: #546273;
  background: #223141;
  color: #8ea0b3;
  cursor: not-allowed;
  opacity: 0.8;
}

.chat-mic-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.chat-status {
  margin: 0.65rem 0 0;
  color: #9eb6ce;
  font-size: 0.95rem;
}

.chat-status[data-state="error"] {
  color: var(--demo-error);
}

.chat-log {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
  max-height: 16rem;
  padding-right: 0.2rem;
  overflow-y: auto;
}

.chat-log:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--demo-bg), 0 0 0 4px var(--demo-focus);
  border-radius: 0.5rem;
}

.chat-entry {
  margin: 0;
  border: 1px solid #3f5063;
  border-radius: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: #111c29;
  color: var(--demo-text);
}

.chat-entry[data-role="user"] {
  border-color: #4f6b86;
  background: #173149;
}

.chat-entry[data-role="assistant"] {
  border-color: #3f5063;
}

.chat-entry strong {
  display: inline;
  margin-right: 0.35rem;
}

.chart-shell {
  border: 1px solid var(--demo-border);
  border-radius: 0.75rem;
  background: #111a24;
  padding: var(--demo-space-md);
}

.chart {
  width: 100%;
}

.chart-line {
  aspect-ratio: 2 / 1;
  min-height: 24rem;
}

.chart-bubble {
  aspect-ratio: 4 / 3;
  min-height: 24rem;
}

.chart-fallback {
  margin: 0;
  color: var(--demo-error);
}

.hc-a11y-proxy-container {
  position: relative;
  z-index: 20;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  white-space: nowrap;
  opacity: 0;
  border: 0;
}

.hc-a11y-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hc-a11y-application {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.hc-a11y-focus-indicator {
  position: absolute;
  display: none;
  z-index: 40;
  pointer-events: none;
  border: 2px solid #f5fbff;
  border-radius: 0.3rem;
  outline: 2px solid #0e131a;
}

.hc-a11y-kbd-hint {
  position: absolute;
  display: flex;
  align-items: center;
  z-index: 30;
  margin: 0.3rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #6389ad;
  border-radius: 0.45rem;
  background-color: rgba(13, 28, 43, 0.95);
  color: #eaf4ff;
  font-size: 0.76rem;
  box-shadow: 0 0.4rem 0.9rem rgba(7, 13, 20, 0.35);
  transition: opacity 0.3s;
  pointer-events: none;
}

.hc-a11y-kbd-key {
  border: 1px solid #7ca2c5;
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
  margin: 0 0.3rem;
  background: rgba(13, 30, 47, 0.85);
  color: #eaf5ff;
  font-weight: 700;
}

.hc-a11y-toast {
  position: absolute;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  background-color: rgba(15, 24, 35, 0.45);
}

.hc-a11y-toast p {
  margin: 0;
  max-width: 24rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid #6e8cad;
  border-radius: 0.5rem;
  background: rgba(13, 28, 43, 0.96);
  color: #eaf4ff;
  font-size: 0.8rem;
}

.hc-dialog {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 1px solid #4b6681;
  border-radius: 0.65rem;
  background: rgba(11, 23, 35, 0.97);
  color: #e4effa;
  box-shadow: 0 0.6rem 1.25rem rgba(0, 0, 0, 0.42);
  font-size: 0.9rem;
  overflow: hidden;
}

.hc-dialog::backdrop {
  background: rgba(1, 7, 14, 0.55);
}

.hc-dialog .content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  height: 100%;
}

.hc-dialog h3 {
  margin: 0;
}

.hc-dialog .inner-content {
  min-height: 0;
  overflow: auto;
}

.hc-dialog .close {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: rgba(37, 57, 78, 0.85);
  color: #eef6ff;
  font-size: 1.1rem;
  cursor: pointer;
}

.hc-dialog .hc-action {
  border: 1px solid #6e8fb0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: #1f4d73;
  color: #f0f7ff;
  font: inherit;
  cursor: pointer;
}

.hc-dialog .hc-warn {
  margin: 0;
  border: 1px solid #925767;
  border-radius: 0.45rem;
  background: rgba(63, 17, 26, 0.92);
  color: #ffdbe3;
  padding: 0.65rem;
}

.hc-a11y-kbd-hints-dialog ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.hc-a11y-kbd-hints-dialog li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.hc-a11y-kbd-hints-dialog .inner-content {
  height: 100%;
}

.hc-a11y-find-dialog {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(1, 7, 14, 0.42);
}

.hc-a11y-find-dialog::backdrop {
  background: transparent;
}

.hc-a11y-find-dialog .content {
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-start;
  height: auto;
  padding: 0.45rem 0.6rem;
}

.hc-a11y-find-dialog .inner-content {
  overflow: visible;
}

.hc-a11y-find-dialog h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.hc-a11y-find-dialog search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hc-a11y-find-dialog label {
  position: absolute;
  left: 0.25rem;
  top: 2rem;
  font-size: 0.75rem;
  color: #cae4ff;
}

.hc-a11y-find-dialog input {
  border: 1px solid #6e8dab;
  border-radius: 0.35rem;
  padding: 0.3rem 2rem 0.3rem 0.35rem;
  font: inherit;
  font-size: 0.82rem;
  width: 12rem;
  background: rgba(13, 28, 43, 0.95);
  color: #eef6ff;
}

.hc-a11y-find-dialog .hc-action {
  position: absolute;
  top: 50%;
  right: 0.15rem;
  width: 1.5rem;
  height: 1.4rem;
  border: 0;
  padding: 0;
  background: none;
  color: #d8ecff;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hc-a11y-find-dialog .hc-action svg path:last-child {
  fill: currentColor;
}

.hc-a11y-grid-host {
  min-height: 16rem;
}

.hc-a11y-table .hcg-container {
  min-width: 100%;
}

.hc-a11y-grid-theme {
  --hcg-font-family: "Avenir Next", "Segoe UI", "Noto Sans", Arial, sans-serif;
  --hcg-font-size: 0.94rem;
  --hcg-color: #e9f4ff;
  --hcg-header-color: #f8fbff;
  --hcg-link-color: #9fd7ff;
  --hcg-link-hovered-color: #d8eeff;
  --hcg-background: rgba(14, 28, 42, 0.92);
  --hcg-header-background: rgba(28, 54, 77, 0.98);
  --hcg-row-even-background: rgba(21, 38, 56, 0.96);
  --hcg-border-width: 1px;
  --hcg-border-style: solid;
  --hcg-border-color: #4f7694;
  --hcg-border-radius: 0.7rem;
  --hcg-padding: 0.7rem;
  --hcg-horizontal-padding: 0.9rem;
  --hcg-vertical-padding: 0.65rem;
  --hcg-header-vertical-padding: 0.75rem;
  --hcg-input-background: rgba(13, 27, 40, 0.98);
  --hcg-input-color: #e9f4ff;
  --hcg-input-border-radius: 0.45rem;
  --hcg-input-border-color: #4f7694;
  --hcg-input-hover-border-color: #75a9d4;
  --hcg-popup-background: #152636;
  --hcg-popup-border-color: #3d607d;
  --hcg-button-border-radius: 0.5rem;
  --hcg-button-border-color: #4a6f8c;
  --hcg-button-background: rgba(25, 47, 68, 0.9);
  --hcg-button-color: #d9ecff;
  --hcg-button-hover-background: rgba(44, 76, 106, 0.96);
  --hcg-button-hover-color: #ffffff;
  --hcg-header-button-background: rgba(14, 33, 49, 0.72);
  --hcg-header-button-hover-background: rgba(54, 88, 118, 0.95);
  --hcg-header-hovered-background: rgba(42, 73, 103, 0.98);
  --hcg-cell-hovered-row-background: rgba(38, 66, 93, 0.86);
  --hcg-cell-hovered-column-background: rgba(38, 66, 93, 0.86);
  --hcg-cell-hovered-border-color: #86c8fb;
  --hcg-focus-ring-color: #9cd8ff;
  --hcg-focus-ring-width: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

@media (max-width: 60rem) {
  .tab-list {
    gap: 0.35rem;
  }
}

@media (max-width: 44rem) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-back-link {
    margin: 0;
  }

  .page-main {
    padding: 1.25rem 0.9rem 2rem;
  }

  .tab-panel {
    padding: var(--demo-space-md);
  }

  .chat-row {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-row .chat-mic-button {
    width: 100%;
    min-width: 0;
  }

  .chat-shell {
    padding: 0.85rem;
  }
}
