/* Said analytics uses the existing Ai Direct palette and Golos Text. */
.ana-workspace {
  --ana-space: 20px;
  min-width: 0;
}
.ana-workspace p,
.ana-workspace li,
.ana-workspace pre {
  overflow-wrap: anywhere;
}
.ana-analysis-instructions {
  margin: 16px 0;
}
.ana-analysis-instructions textarea {
  min-height: 90px;
}
.ana-heading,
.ana-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.ana-heading h2 {
  margin-top: 8px;
}
.ana-heading p {
  max-width: 560px;
  margin: 10px 0 0;
}
.ana-heading > button,
.ana-detail-heading > button {
  flex: none;
  margin-top: 8px;
}
.ana-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.ana-sidebar,
.ana-detail,
.ana-section,
.ana-form,
.ana-field,
.ana-picker,
.ana-metadata {
  min-width: 0;
}
.ana-section {
  margin-bottom: 20px;
  padding: 22px;
}
.ana-section > h3 {
  font-size: 18px;
  margin: 0;
}
.ana-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.ana-section > p.ana-help {
  margin: 8px 0 16px;
}
.ana-page-status {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.ana-page-status:not(:empty) {
  margin: 12px 0 20px;
}
.ana-error {
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.ana-error:empty {
  display: none;
}
.ana-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 14px;
  min-height: 44px;
}
.ana-secondary:hover {
  background: var(--tint);
}
.ana-create {
  margin: 0 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}
.ana-create > summary {
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
}
.ana-create[open] > summary {
  margin-bottom: 12px;
}
.ana-create .ana-form > button.primary {
  font-size: 14px;
}
.ana-case-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ana-list-title {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-weight: 500;
}
.ana-case {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ana-case strong {
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.ana-case .ana-help {
  font-size: 12px;
}
.ana-case[aria-current="true"] {
  background: var(--tint);
  border-color: var(--accent);
}
.ana-case-account {
  font-size: 12px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.ana-list-empty {
  padding: 12px 0;
}
.ana-load-more {
  width: 100%;
  color: var(--accent);
  background: transparent;
  margin-top: 8px;
}
.ana-detail-heading {
  padding: 2px 0;
}
.ana-detail-heading h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.ana-detail-heading p {
  margin: 8px 0 0;
}
.ana-muted-badge {
  flex: none;
  padding: 8px 10px;
  background: var(--field);
  color: var(--muted);
  border-radius: 6px;
  font-size: 12px;
}
.ana-editor {
  margin: 0 0 20px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.ana-editor > summary {
  font-size: 15px;
  font-weight: 500;
}
.ana-editor[open] {
  padding-bottom: 20px;
}
.ana-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}
.ana-field-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.ana-field .ana-help {
  font-size: 12px;
  margin: 0;
}
.ana-field input,
.ana-field textarea {
  margin: 0;
  width: 100%;
  font-size: 16px;
  font-weight: 400;
  min-height: 46px;
  background: var(--surface);
}
.ana-field textarea {
  min-height: 100px;
  line-height: 1.6;
  resize: vertical;
}
.ana-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ana-field-grid,
.ana-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
}
.ana-picker {
  position: relative;
}
.ana-picker > button {
  width: 100%;
  min-height: 46px;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  overflow-wrap: anywhere;
  padding-right: 32px;
  position: relative;
  background: var(--surface);
}
.ana-picker > button::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--muted);
  font-size: 20px;
}
.ana-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 30px #17203314;
}
.ana-picker-menu > input {
  min-width: 0;
  width: 100%;
}
.ana-picker-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  overscroll-behavior: contain;
}
.ana-picker-option {
  width: 100%;
  border: 0;
  text-align: left;
  padding: 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
  min-height: 44px;
  background: transparent;
}
.ana-picker-option[aria-selected="true"] {
  color: var(--accent);
  background: var(--tint);
}
.ana-metadata,
.ana-extra-metrics,
.ana-retention-editor {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.ana-metadata > summary,
.ana-extra-metrics > summary,
.ana-retention-editor > summary {
  font-size: 14px;
  color: var(--muted);
}
.ana-metadata[open] > .ana-field-grid,
.ana-extra-metrics[open] > .ana-metrics-grid {
  padding-top: 12px;
}
.ana-create .ana-metadata .ana-field-grid {
  grid-template-columns: minmax(0, 1fr);
}
.ana-mode-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ana-mode-choices button {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  background: var(--surface);
}
.ana-mode-choices button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
  border-color: var(--accent);
}
.ana-retention-editor[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ana-retention-editor[open] > summary {
  display: list-item;
  list-style: none;
  display: flex;
}
.ana-retention-editor textarea {
  min-height: 120px;
  font-variant-numeric: tabular-nums;
}
.ana-retention {
  min-width: 0;
  background: var(--field);
  padding: 10px 8px 6px;
  border-radius: 10px;
  margin: 12px 0;
}
svg.ana-retention-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  color: var(--muted);
  stroke: none;
  fill: currentColor;
  overflow: visible;
}
.ana-retention-chart text {
  font-family: inherit;
  font-size: 15px;
  fill: var(--muted);
  stroke: none;
}
.ana-chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}
.ana-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ana-chart-point {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1.2;
}
.ana-retention > .ana-help {
  text-align: center;
  font-size: 12px;
  margin: 0;
}
.ana-retention > details {
  padding: 0 8px;
}
.ana-retention summary {
  color: var(--muted);
  font-size: 12px;
}
.ana-metric-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.5;
}
.ana-metric-list dt {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}
.ana-metric-list dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ana-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.ana-evidence {
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}
.ana-evidence-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.ana-evidence-heading > strong {
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ana-evidence-heading > .ana-help {
  font-size: 11px;
  white-space: nowrap;
  flex: none;
}
.ana-evidence-preview {
  margin-top: 8px;
}
.ana-evidence-preview > summary {
  font-size: 13px;
  color: var(--accent);
}
.ana-evidence-preview > img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  border-radius: 6px;
  margin: 8px auto 12px;
}
.ana-evidence-use {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  min-height: 44px;
  font-size: 12px;
}
.ana-evidence-use input,
.ana-ocr-candidate label input {
  margin: 0;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  flex: none;
  accent-color: var(--accent);
}
.ana-evidence > button {
  margin: 8px 0 0;
  font-size: 13px;
}
.ana-ocr-result:not(:empty) {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.ana-ocr-result summary {
  font-size: 13px;
}
.ana-ocr-text {
  margin: 10px 0;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 inherit;
  max-height: 260px;
  overflow: auto;
}
.ana-ocr-candidates {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.ana-ocr-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 110px);
  gap: 6px 10px;
  align-items: center;
}
.ana-ocr-candidate > label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 44px;
  font-size: 12px;
  color: var(--ink);
}
.ana-ocr-candidate > input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  padding: 8px 10px;
}
.ana-ocr-candidate > small {
  grid-column: 1/-1;
  font-size: 11px;
}
.ana-snapshot {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}
.ana-snapshot > h4 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}
.ana-snapshot > .ana-help {
  font-size: 12px;
  margin: 6px 0;
}
.ana-snapshot > details > summary {
  font-size: 13px;
  color: var(--accent);
}
.ana-snapshot-note {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.ana-rate-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.ana-rate-tabs > button {
  font-size: 11px;
  padding: 8px;
  flex: 1;
  min-width: 100px;
  min-height: 44px;
  line-height: 1.4;
  background: var(--surface);
}
.ana-rate-tabs > button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
  border-color: var(--accent);
}
.ana-job-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--accent);
  background: var(--tint);
  border-radius: 7px;
  font-size: 13px;
}
[data-ana="analysis-result"] > .primary {
  margin-top: 10px;
}
.ana-analysis-summary {
  font-size: 15px;
  line-height: 1.7;
  margin-top: 22px;
  white-space: pre-wrap;
}
.ana-observations,
.ana-findings {
  margin-top: 24px;
}
.ana-observations > h4,
.ana-findings > h4 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 12px;
}
.ana-observation {
  background: var(--field);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.ana-observation > p {
  font-size: 14px;
  line-height: 1.7;
  margin: 8px 0;
  white-space: pre-wrap;
}
.ana-timestamp {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  min-height: 44px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ana-findings ul,
.ana-limitations ul {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.75;
}
.ana-findings li + li,
.ana-limitations li + li {
  margin-top: 10px;
}
.ana-transcript,
.ana-limitations {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 20px;
}
.ana-transcript > summary,
.ana-limitations > summary {
  font-size: 14px;
}
.ana-transcript-segment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}
.ana-transcript-segment p {
  font-size: 13px;
  margin: 4px 0;
  line-height: 1.6;
}
.ana-preserve-lines {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
}
.ana-peer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.ana-peer-title {
  padding: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: left;
  font-size: 14px;
}
.ana-peer > .ana-help {
  margin: 0;
  font-size: 12px;
}
.ana-peer-comparable {
  font-size: 12px;
  color: var(--success);
}
.ana-peer > .ana-metric-list {
  align-self: stretch;
  margin-top: 8px;
}
.ana-steps {
  margin: 16px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.ana-steps li + li {
  margin-top: 10px;
}
.ana-detail-heading {
  scroll-margin-top: 24px;
}
.ana-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ana-job-actions > button {
  font-size: 13px;
}
.ana-refine {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.ana-refine form {
  margin-top: 10px;
}
.ana-frame-preview img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  margin: 10px auto;
  border-radius: 8px;
}
.ana-frame-preview summary {
  font-size: 12px;
  color: var(--accent);
}
.ana-frame-onscreen {
  font-size: 12px !important;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid var(--border);
}
.ana-coverage {
  font-size: 12px;
  color: var(--muted);
  background: var(--field);
  padding: 12px;
  line-height: 1.7;
  border-radius: 8px;
  margin: 18px 0;
}
.ana-draft-saved {
  color: var(--success);
  font-size: 12px;
}
@media (max-width: 859px) {
  .ana-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .ana-case-list {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }
  .ana-case {
    padding: 12px 14px;
  }
  .ana-sidebar .ana-create .ana-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ana-heading {
    margin-bottom: 20px;
  }
  .ana-create {
    margin-bottom: 18px;
  }
}
@media (max-width: 480px) {
  .ana-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .ana-heading > button {
    margin: 0;
    min-height: 44px;
  }
  .ana-heading h2 {
    font-size: 23px;
  }
  .ana-heading .ana-help {
    font-size: 13px;
  }
  .ana-section {
    padding: 18px;
  }
  .ana-section > h3 {
    font-size: 18px;
  }
  .ana-detail-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  .ana-detail-heading h3 {
    font-size: 21px;
  }
  .ana-detail-heading > button {
    margin: 0;
  }
  .ana-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ana-metrics-grid {
    gap: 14px 10px;
  }
  .ana-field-label {
    font-size: 12px;
  }
  .ana-field input {
    padding: 10px;
  }
  .ana-field .ana-help {
    font-size: 12px;
  }
  .ana-editor {
    padding: 10px 18px;
  }
  .ana-evidence {
    padding: 12px;
  }
  .ana-evidence-heading {
    flex-direction: column;
    gap: 2px;
  }
  .ana-sidebar .ana-create .ana-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ana-ocr-candidate {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 100px);
  }
  .ana-chart-line {
    stroke-width: 3;
  }
  .ana-metric-list {
    gap: 10px 12px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ana-workspace * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
