/* @cotherapist/unified-report */

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

.report-section {
  background: var(--app-surface, #fff);
  border: 1px solid var(--app-border, #e4e7ec);
  border-radius: var(--app-radius, 10px);
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
  color: var(--app-text, #1a1a1a);
}

.report-section__title { margin: 0 0 0.85rem; font-size: 1.15rem; }
.phase-title { margin: 1rem 0 0.5rem; font-size: 1rem; color: var(--app-text-muted); }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td {
  border-bottom: 1px solid var(--app-border);
  text-align: left;
  padding: 0.55rem 0.35rem;
  vertical-align: top;
}
.report-list { margin: 0; padding-left: 1.2rem; }
.report-list li { margin: 0.4rem 0; }
.raw-json {
  overflow: auto;
  background: var(--app-surface-muted);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  padding: 0.9rem;
  border-radius: var(--app-radius-sm);
  font-size: 0.8rem;
}
.swatch-order { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.5rem 0 0.75rem; }
.swatch-order__item {
  width: 2.4rem; height: 2.4rem; border-radius: var(--app-radius-sm);
  border: 1px solid var(--app-border);
  display: grid; place-items: center;
  position: relative;
}
.swatch-order__rank {
  background: rgba(255,255,255,0.92);
  color: var(--app-text);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
}
.swatch-order__item--on-dark .swatch-order__rank { background: rgba(255,255,255,0.95); }
.swatch-legend { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.25rem; }
.swatch-legend li { display: flex; align-items: center; gap: 0.5rem; color: var(--app-text-muted); font-size: 0.92rem; }
.swatch-dot { width: 0.85rem; height: 0.85rem; border-radius: 3px; border: 1px solid var(--app-border); display: inline-block; }

.luscher-result__phase { margin-bottom: 1.5rem; }
.luscher-result__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.luscher-result__cell {
  flex: 1 1 auto;
  min-width: 2.25rem;
  max-width: 3.5rem;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.2rem;
}
.luscher-result__rank {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(0, 0, 0, 0.78);
  text-shadow: 0 0 2px #fff, 0 0 4px #fff;
}
.luscher-result__cell--on-dark .luscher-result__rank {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.luscher-result__details summary {
  cursor: pointer;
  color: var(--app-accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  list-style: none;
}
.luscher-result__details summary::-webkit-details-marker { display: none; }
.luscher-result__interpretations {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.luscher-result__card {
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 0.75rem 0.9rem;
}
.luscher-result__card-meta {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--app-text-subtle);
  text-transform: none;
}
.luscher-result__card-body { margin: 0; color: var(--app-text); }
.luscher-result__shifts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.35rem 0 1.25rem;
}
.luscher-shift-tag {
  display: inline-block;
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.88rem;
  color: var(--app-text);
}
.interpretation-blocks {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--app-border);
}
.interpretation-blocks__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.interpretation-blocks__heading {
  margin: 1rem 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
}
.interpretation-blocks__warnings { color: #8a5a00; }
.interpretation-blocks__disclaimer { margin-top: 1.25rem; }
.tag {
  display: inline-block;
  background: var(--app-accent-soft);
  color: var(--app-accent);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.zone { font-weight: 600; }
.zone--high { color: #b42318; }
.zone--borderline_high, .zone--borderline_low { color: #b54708; }
.zone--norm { color: #027a48; }
.zone--low { color: #175cd3; }
.interp-meta { color: var(--app-text-muted); }
.hint { color: var(--app-text-muted); font-size: 0.9rem; }
.flash {
  background: var(--app-feedback-info-bg);
  border: 1px solid var(--app-feedback-info-border);
  padding: 0.75rem 1rem;
  border-radius: var(--app-radius-sm);
}
.notification {
  padding: 0.75rem 1rem;
  border-radius: var(--app-radius-sm);
  background: var(--app-feedback-info-bg);
}

/* Szondi result (composite_blocks) */
.muted { color: var(--app-text-muted); font-size: 0.9em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.75rem 0 1.25rem; }
.report-table--bordered th,
.report-table--bordered td {
  border: 1px solid var(--app-border);
  text-align: center;
}
.report-table--bordered th:first-child,
.report-table--bordered td:first-child,
.report-table--bordered th[scope="row"] {
  text-align: left;
}
.report-table--compact th,
.report-table--compact td {
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
}
.szondi-result .phase-title:first-child { margin-top: 0; }

/* Registration sheet: fixed columns so vector colspan + factor headers stay aligned */
.szondi-registration-sheet {
  margin: 1rem 0 1.5rem;
  max-width: 42.625rem;
}
.szondi-registration-sheet__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.szondi-registration-sheet__table.report-table--bordered th,
.szondi-registration-sheet__table.report-table--bordered td,
.szondi-registration-sheet__table.report-table--bordered th:first-child,
.szondi-registration-sheet__table.report-table--bordered td:first-child,
.szondi-registration-sheet__table.report-table--bordered th[scope="row"] {
  text-align: center;
  vertical-align: middle;
}
.szondi-registration-sheet__table thead th[rowspan],
.szondi-registration-sheet__table tbody th[scope="row"] {
  width: 3.25rem;
  font-weight: 600;
}
.szondi-mark-cell {
  min-width: 0;
  width: auto;
}

.szondi-plans { max-width: 42.625rem; margin: 1rem 0 1.5rem; }
.szondi-plan {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  padding: 0.75rem;
}
.szondi-plan__title { margin-top: 0; }
.szondi-plan__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.szondi-plan__grid {
  display: grid;
  grid-template-columns: minmax(3.25rem, auto) repeat(8, minmax(0, 1fr));
  min-width: 20rem;
  font-size: 0.85rem;
  line-height: 1.2;
}
.szondi-plan__grid > * {
  min-width: 0;
}
.szondi-plan__corner { min-height: 1.5rem; }
.szondi-plan__corner--factor { min-height: 1.25rem; }
.szondi-plan__vector,
.szondi-plan__factor,
.szondi-plan__row-label,
.szondi-plan__cell,
.szondi-plan__reaction {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  padding: 0.125rem;
  text-align: center;
  box-sizing: border-box;
}
.szondi-plan__vector {
  grid-column: span 2;
  font-weight: 600;
  border-bottom: 1px solid var(--app-border);
}
.szondi-plan__factor {
  font-weight: 600;
  border-bottom: 1px solid var(--app-border);
}
.szondi-plan__row-label {
  justify-content: flex-end;
  padding-right: 0.375rem;
  color: var(--app-text-muted);
  font-variant-numeric: tabular-nums;
}
.szondi-plan__row-label--reaction {
  font-size: 0.65rem;
  font-weight: 600;
  border-top: 1px solid var(--app-border);
  padding-top: 0.25rem;
  line-height: 1.1;
}
.szondi-plan__row-label--baseline,
.szondi-plan__cell--baseline {
  border-top: 2px solid var(--app-text);
  /* keep content below the axis line under border-box */
  padding-top: calc(0.125rem + 2px);
}
.szondi-plan__cell--positive {
  background: color-mix(in srgb, var(--app-surface) 92%, #4a7c8c 8%);
}
.szondi-plan__cell--negative {
  background: color-mix(in srgb, var(--app-surface) 92%, #c45c5c 8%);
}
.szondi-plan__mark { font-weight: 700; font-size: 0.95rem; }
.szondi-plan__mark--plus { color: #2e6b4f; }
.szondi-plan__mark--minus { color: #9b3d3d; }
.szondi-plan__reaction {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  border-top: 1px solid var(--app-border);
  padding-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.szondi-typology {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
  background: var(--app-surface-muted);
}
.szondi-summary {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}
.szondi-summary dt {
  font-size: 0.8rem;
  color: var(--app-text-muted);
  margin: 0 0 0.2rem;
}
.szondi-summary dd { margin: 0; }
.tag--ok { background: color-mix(in srgb, #2e6b4f 18%, var(--app-surface)); color: #2e6b4f; }
.tag--muted { background: var(--app-surface-muted); color: var(--app-text-muted); }

@media (max-width: 640px) {
  .szondi-plans,
  .szondi-registration-sheet { max-width: none; }
  .szondi-plan,
  .szondi-registration-sheet { padding: 0.65rem; }
  .szondi-plan__grid {
    grid-template-columns: minmax(2.75rem, auto) repeat(8, minmax(0, 1fr));
    min-width: 16rem;
  }
}

