.brh-root {
  --brh-bg: #f4f6f8;
  --brh-surface: #ffffff;
  --brh-text: #15202b;
  --brh-muted: #647180;
  --brh-line: #dce2e7;
  --brh-accent: #417671;
  --brh-accent-dark: #315e5a;
  --brh-soft: #edf6f5;
  --brh-danger-bg: #fff1f0;
  --brh-danger: #8c241f;
  --brh-shadow: 0 14px 40px rgba(28, 38, 47, 0.08);
  width: 100%;
  max-width: 100%;
  margin: 18px auto 0;
  color: var(--brh-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}

.brh-root *,
.brh-root *::before,
.brh-root *::after {
  box-sizing: border-box;
}

.brh-root [hidden] {
  display: none !important;
}

.brh-hero {
  padding: 30px 34px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 25%),
    linear-gradient(135deg, #50152f, #8d345d);
  border-radius: 18px;
  box-shadow: var(--brh-shadow);
}

.brh-eyebrow {
  margin: 0 0 6px !important;
  color: inherit !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.8;
}

.brh-root .brh-hero h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.035em;
}

.brh-subtitle {
  max-width: 880px;
  margin: 10px 0 0 !important;
  color: inherit !important;
  font-size: 1rem;
  opacity: 0.92;
}

.brh-notice {
  padding: 13px 16px;
  margin: 16px 0;
  border: 1px solid;
  border-radius: 12px;
  font-size: 0.88rem;
}

.brh-danger {
  color: var(--brh-danger);
  background: var(--brh-danger-bg);
  border-color: #f1c4c0;
}

.brh-workspace {
  display: block;
}

.brh-input-pane,
.brh-results-pane {
  min-width: 0;
}

.brh-form {
  margin: 0;
}

.brh-panel,
.brh-result-card,
.brh-results-pane {
  background: var(--brh-surface);
  border: 1px solid var(--brh-line);
  border-radius: 16px;
  box-shadow: var(--brh-shadow);
}

.brh-panel {
  padding: 0;
  margin: 0 0 14px;
  overflow: clip;
}

.brh-section-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #fff;
}

.brh-section-summary::-webkit-details-marker {
  display: none;
}

.brh-section-summary:focus-visible {
  outline: 3px solid rgba(122, 40, 77, 0.18);
  outline-offset: -3px;
}

.brh-section-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--brh-accent);
  border-radius: 50%;
  font-weight: 800;
}

.brh-section-title {
  display: block;
  min-width: 0;
}

.brh-section-title strong {
  display: block;
  color: var(--brh-text);
  font-size: 1rem;
  line-height: 1.25;
}

.brh-section-title small {
  display: block;
  margin-top: 2px;
  color: var(--brh-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.brh-summary-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #75808a;
  border-bottom: 2px solid #75808a;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}

.brh-input-section[open] .brh-summary-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.brh-section-body {
  padding: 0 16px 18px;
  border-top: 1px solid #edf0f2;
}

.brh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 15px;
}

.brh-root label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: #34414d;
  font-size: 0.82rem;
  font-weight: 650;
}

.brh-root label.brh-check {
  justify-content: center;
  flex-direction: row;
  align-items: center;
  min-height: 46px;
  padding: 10px;
  background: #f8fafb;
  border: 1px solid var(--brh-line);
  border-radius: 10px;
}

.brh-root input,
.brh-root select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 10px;
  color: var(--brh-text);
  background: #fff;
  border: 1px solid #bdc7d0;
  border-radius: 9px;
  font: inherit;
  line-height: 1.3;
}

.brh-root input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: auto;
  padding: 0;
  accent-color: var(--brh-accent);
}

.brh-root input:focus,
.brh-root select:focus {
  outline: 3px solid rgba(122, 40, 77, 0.13);
  border-color: var(--brh-accent);
}

.brh-root input:disabled,
.brh-root select:disabled {
  color: #88929b;
  background: #edf0f2;
}

.brh-field-help {
  margin: 14px 0 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.76rem;
}

.brh-action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 14px 0 8px;
  background: linear-gradient(135deg, #f8edf2, #fff);
  border: 2px solid rgba(122, 40, 77, 0.24);
  border-radius: 15px;
  box-shadow: var(--brh-shadow);
}

.brh-action-panel strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.94rem;
}

.brh-action-panel p {
  margin: 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.78rem;
}

.brh-root .brh-calculate-button {
  flex: 0 0 auto;
  min-width: 230px;
  min-height: 48px;
  padding: 12px 18px;
  color: #fff;
  background: var(--brh-accent);
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
  cursor: pointer;
}

.brh-root .brh-calculate-button:hover {
  color: #fff;
  background: var(--brh-accent-dark);
}

.brh-root .brh-calculate-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.brh-interface-status {
  margin: 9px 2px 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.78rem;
}

.brh-error {
  padding: 12px;
  margin-top: 9px !important;
  color: var(--brh-danger) !important;
  background: var(--brh-danger-bg);
  border-radius: 10px;
  font-size: 0.82rem;
}

.brh-results-pane {
  padding: 16px;
  min-height: 520px;
  background: #f8fafb;
}

.brh-results-placeholder {
  display: grid;
  min-height: 480px;
  place-content: center;
  padding: 34px;
  text-align: center;
  border: 2px dashed #cbd4dc;
  border-radius: 14px;
}

.brh-placeholder-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  place-items: center;
  color: var(--brh-accent);
  background: var(--brh-soft);
  border-radius: 18px;
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}

.brh-results-placeholder h3 {
  margin: 0 0 7px !important;
  color: var(--brh-text) !important;
  font-size: 1.22rem !important;
}

.brh-results-placeholder p {
  max-width: 560px;
  margin: 0 auto !important;
  color: var(--brh-muted) !important;
  font-size: 0.88rem;
}

.brh-placeholder-models {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.brh-placeholder-models span {
  padding: 5px 9px;
  color: #58636e;
  background: #fff;
  border: 1px solid var(--brh-line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.brh-results {
  min-width: 0;
}

.brh-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.brh-results-kicker {
  margin: 0 0 2px !important;
  color: var(--brh-accent) !important;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brh-results-heading h3 {
  margin: 0 !important;
  color: var(--brh-text) !important;
  font-size: 1.2rem !important;
}

.brh-root .brh-results-top-button {
  padding: 7px 10px;
  color: var(--brh-accent);
  background: #fff;
  border: 1px solid rgba(122, 40, 77, 0.28);
  border-radius: 9px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  cursor: pointer;
}

.brh-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.brh-root .brh-summary-card {
  display: flex;
  min-width: 0;
  min-height: 94px;
  padding: 12px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--brh-text);
  background: #fff;
  border: 1px solid var(--brh-line);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(28, 38, 47, 0.045);
  font: inherit;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.brh-root .brh-summary-card:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 40, 77, 0.45);
}

.brh-root .brh-summary-card.is-active {
  border-color: var(--brh-accent);
  box-shadow: 0 0 0 2px rgba(122, 40, 77, 0.11);
}

.brh-root .brh-summary-card.is-unavailable {
  opacity: 0.67;
  background: #f2f4f5;
}

.brh-summary-card span {
  color: var(--brh-accent);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brh-summary-card strong {
  display: block;
  max-width: 100%;
  margin: 3px 0;
  overflow: hidden;
  color: var(--brh-text);
  font-size: 1.35rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brh-summary-card small {
  color: var(--brh-muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.brh-model-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 0 10px;
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  background: #f8fafb;
  border-bottom: 1px solid var(--brh-line);
}

.brh-root .brh-model-tab {
  flex: 0 0 auto;
  padding: 8px 13px;
  color: var(--brh-accent);
  background: #fff;
  border: 1px solid rgba(122, 40, 77, 0.28);
  border-radius: 999px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: none;
  cursor: pointer;
}

.brh-root .brh-model-tab.is-active {
  color: #fff;
  background: var(--brh-accent);
  border-color: var(--brh-accent);
}

.brh-root .brh-model-tab.is-unavailable {
  opacity: 0.55;
}

.brh-model-panels {
  padding-top: 12px;
}

.brh-model-panel {
  display: none;
}

.brh-model-panel.is-active {
  display: block;
}

.brh-result-card {
  padding: 18px;
  margin: 0;
  overflow: hidden;
  box-shadow: none;
}

.brh-root .brh-result-card h3 {
  margin: 0 !important;
  color: var(--brh-text) !important;
  font-size: 1.18rem !important;
}

.brh-root .brh-result-card h4 {
  color: var(--brh-text) !important;
}

.brh-badge {
  display: inline-block;
  padding: 4px 8px;
  margin: 7px 0;
  background: #e9eef2;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
}

.brh-success-badge {
  color: #315f3f;
  background: #e9f5ec;
}

.brh-not-applicable-badge {
  color: #7b4a0b;
  background: #fff3d6;
}

.brh-score {
  padding: 15px;
  margin: 13px 0;
  background: var(--brh-soft);
  border-radius: 12px;
}

.brh-score span {
  display: block;
  font-size: 0.76rem;
}

.brh-score strong {
  display: block;
  color: var(--brh-accent);
  font-size: 2rem;
  line-height: 1.15;
}

.brh-meta {
  margin: 7px 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.78rem;
}

.brh-root table {
  width: 100%;
  margin: 12px 0 0 !important;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.78rem;
}

.brh-root th,
.brh-root td {
  padding: 8px 7px;
  border-bottom: 1px solid var(--brh-line);
  text-align: left;
  vertical-align: top;
}

.brh-root th:last-child,
.brh-root td:last-child {
  text-align: right;
}

.brh-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.brh-warning-list {
  padding: 11px 14px 11px 28px;
  margin: 14px 0 0;
  color: #744e10;
  background: #fff8e8;
  border-radius: 10px;
  font-size: 0.76rem;
}

.brh-warning-list li + li {
  margin-top: 4px;
}

.brh-unavailable {
  padding: 15px;
  margin: 13px 0;
  background: #fffaf0;
  border: 1px solid #efd9a7;
  border-radius: 12px;
}

.brh-unavailable strong {
  display: block;
  color: #6d4712;
}

.brh-unavailable p {
  margin: 6px 0 0 !important;
  color: #6c6253 !important;
  font-size: 0.82rem;
}

.brh-horizon-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 13px 0;
}

.brh-root .brh-horizon-tab {
  padding: 7px 11px;
  color: var(--brh-accent);
  background: #fff;
  border: 1px solid rgba(122, 40, 77, 0.35);
  border-radius: 999px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: none;
  cursor: pointer;
}

.brh-root .brh-horizon-tab.is-active {
  color: #fff;
  background: var(--brh-accent);
}

.brh-horizon-panel {
  display: none;
}

.brh-horizon-panel.is-active {
  display: block;
}

.brh-exact-value {
  color: var(--brh-muted);
  font-size: 0.7rem;
  font-weight: 400;
}

.brh-input-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 13px;
  padding: 12px;
  margin-top: 12px;
  color: #46525d;
  background: #f7f9fa;
  border: 1px solid var(--brh-line);
  border-radius: 10px;
  font-size: 0.74rem;
}

.brh-input-summary strong {
  grid-column: 1 / -1;
  color: var(--brh-text);
  font-size: 0.8rem;
}

.brh-risk-classification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin: 12px 0;
  border: 1px solid;
  border-radius: 11px;
}

.brh-risk-classification span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

.brh-risk-classification strong {
  font-size: 0.92rem;
  text-align: right;
}

.brh-risk-low {
  color: #27663d;
  background: #edf8f0;
  border-color: #b9ddc3;
}

.brh-risk-intermediate {
  color: #77570c;
  background: #fff6d7;
  border-color: #ead58d;
}

.brh-risk-high {
  color: #892a28;
  background: #fff0ef;
  border-color: #edbbb8;
}

.brh-dfs-section {
  padding-top: 18px;
  margin-top: 22px;
  border-top: 2px solid var(--brh-line);
}

.brh-dfs-section h4 {
  margin: 0 0 10px !important;
  font-size: 0.98rem !important;
}

.brh-treatment-summary {
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #f5f8fa;
  border: 1px solid var(--brh-line);
  border-radius: 11px;
}

.brh-treatment-summary strong {
  display: block;
  color: var(--brh-accent-dark);
  font-size: 0.82rem;
}

.brh-treatment-summary p {
  margin: 5px 0 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.74rem;
}

.brh-dfs-table {
  min-width: 720px;
}

.brh-dfs-table th,
.brh-dfs-table td {
  text-align: center;
}

.brh-dfs-table th:first-child,
.brh-dfs-table td:first-child {
  text-align: left;
}

.brh-active-risk-row {
  background: #eef5c9;
}

.brh-best-dfs-cell {
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.brh-oncotype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.brh-oncotype-probability {
  padding: 17px;
  border: 1px solid var(--brh-line);
  border-radius: 13px;
  text-align: center;
}

.brh-oncotype-probability span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brh-oncotype-probability strong {
  display: block;
  margin: 6px 0;
  font-size: 2rem;
  line-height: 1.1;
}

.brh-oncotype-probability p {
  margin: 0 !important;
  color: var(--brh-muted) !important;
  font-size: 0.76rem;
}

.brh-low-score {
  background: #edf8f0;
  border-color: #b9ddc3;
}

.brh-low-score strong {
  color: #27663d;
}

.brh-high-score {
  background: #fff0ef;
  border-color: #edbbb8;
}

.brh-high-score strong {
  color: #892a28;
}

.brh-tennessee-mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 13px;
  padding: 13px;
  margin: 13px 0;
  background: #f7f9fa;
  border: 1px solid var(--brh-line);
  border-radius: 11px;
}

.brh-tennessee-mapping > strong {
  grid-column: 1 / -1;
  font-size: 0.8rem;
}

.brh-tennessee-mapping div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 0.75rem;
}

.brh-tennessee-mapping span {
  color: var(--brh-muted);
}

.brh-yamamoto-classification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  margin: 14px 0;
  border: 1px solid;
  border-radius: 11px;
}

.brh-yamamoto-classification span {
  font-size: 0.74rem;
  font-weight: 700;
}

.brh-yamamoto-classification strong {
  text-align: right;
}

.brh-yamamoto-negative {
  color: #27663d;
  background: #edf8f0;
  border-color: #b9ddc3;
}

.brh-yamamoto-positive {
  color: #892a28;
  background: #fff0ef;
  border-color: #edbbb8;
}

.brh-performance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0;
}

.brh-performance-grid > div {
  padding: 10px;
  text-align: center;
  background: #f7f9fa;
  border: 1px solid var(--brh-line);
  border-radius: 10px;
}

.brh-performance-grid span,
.brh-performance-grid small {
  display: block;
  color: var(--brh-muted);
  font-size: 0.68rem;
}

.brh-performance-grid strong {
  display: block;
  margin: 3px 0;
  color: var(--brh-accent-dark);
  font-size: 1rem;
}

.brh-method-limitations {
  padding: 13px 15px;
  margin-top: 15px;
  background: #fff8e8;
  border: 1px solid #ead49a;
  border-radius: 11px;
}

.brh-method-limitations > strong {
  display: block;
  color: #744e10;
  font-size: 0.82rem;
}

.brh-method-limitations ul {
  padding-left: 18px;
  margin: 7px 0 0;
  color: #66583c;
  font-size: 0.74rem;
}

.brh-method-limitations li + li {
  margin-top: 4px;
}

.brh-citation {
  margin-bottom: 0 !important;
  font-size: 0.7rem;
}

.brh-footer {
  padding: 22px 2px;
  margin-top: 22px;
  color: #6e7983;
  border-top: 1px solid var(--brh-line);
  font-size: 0.76rem;
}

@media (min-width: 1000px) {
  .brh-root {
    width: min(1680px, calc(100vw - 44px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .brh-workspace {
    display: grid;
    grid-template-columns: minmax(420px, 0.84fr) minmax(0, 1.16fr);
    gap: 18px;
    align-items: start;
  }

  .brh-results-pane {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.admin-bar .brh-results-pane {
    top: 50px;
    max-height: calc(100vh - 68px);
  }

  .brh-model-tabs {
    position: sticky;
    top: -1px;
    z-index: 5;
  }
}

@media (min-width: 1380px) {
  .brh-workspace {
    grid-template-columns: minmax(500px, 0.82fr) minmax(0, 1.18fr);
    gap: 22px;
  }

  .brh-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brh-summary-card strong {
    font-size: 1.25rem;
  }
}

@media (max-width: 999px) {
  .brh-root {
    transform: none;
  }

  .brh-results-pane {
    margin-top: 18px;
    min-height: 0;
  }

  .brh-results-placeholder {
    min-height: 300px;
  }

  .brh-results-top-button {
    display: none;
  }
}

@media (max-width: 700px) {
  .brh-root {
    margin-top: 10px;
  }

  .brh-hero {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .brh-root .brh-hero h2 {
    font-size: 2rem !important;
  }

  .brh-subtitle {
    font-size: 0.88rem;
  }

  .brh-section-summary {
    min-height: 62px;
    padding: 11px 13px;
  }

  .brh-section-body {
    padding: 0 13px 15px;
  }

  .brh-action-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .brh-root .brh-calculate-button {
    width: 100%;
    min-width: 0;
  }

  .brh-results-pane {
    padding: 12px;
    border-radius: 14px;
  }

  .brh-results-placeholder {
    min-height: 260px;
    padding: 24px 16px;
  }

  .brh-result-card {
    padding: 14px;
  }

  .brh-performance-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brh-yamamoto-classification {
    align-items: flex-start;
    flex-direction: column;
  }

  .brh-yamamoto-classification strong {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .brh-grid,
  .brh-input-summary,
  .brh-tennessee-mapping,
  .brh-oncotype-grid {
    grid-template-columns: 1fr;
  }

  .brh-input-summary strong,
  .brh-tennessee-mapping > strong {
    grid-column: auto;
  }

  .brh-summary-grid {
    gap: 7px;
  }

  .brh-root .brh-summary-card {
    min-height: 88px;
    padding: 10px;
  }

  .brh-summary-card strong {
    font-size: 1.15rem;
  }

  .brh-summary-card small {
    font-size: 0.65rem;
  }

  .brh-model-tabs {
    margin-inline: -2px;
  }

  .brh-oncotype-probability strong {
    font-size: 1.7rem;
  }
}

@media (max-width: 390px) {
  .brh-summary-grid {
    grid-template-columns: 1fr;
  }

  .brh-performance-grid {
    grid-template-columns: 1fr;
  }
}


/* Live calculation interface — v0.4.0 */
.brh-live-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  margin-bottom: 5px;
  color: #315f3f;
  background: #e9f5ec;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brh-live-label > span {
  width: 7px;
  height: 7px;
  background: #3d8b57;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(61, 139, 87, 0.12);
}

.brh-interface-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}

.brh-interface-status::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: #8b96a0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(139, 150, 160, 0.12);
}

.brh-interface-status[data-state="current"]::before {
  background: #3d8b57;
  box-shadow: 0 0 0 3px rgba(61, 139, 87, 0.13);
}

.brh-interface-status[data-state="updating"]::before,
.brh-interface-status[data-state="loading"]::before {
  background: #c98a22;
  box-shadow: 0 0 0 3px rgba(201, 138, 34, 0.14);
  animation: brh-live-pulse 0.9s ease-in-out infinite alternate;
}

.brh-interface-status[data-state="waiting"]::before {
  background: #7b8791;
}

.brh-interface-status[data-state="error"]::before {
  background: var(--brh-danger);
  box-shadow: 0 0 0 3px rgba(140, 36, 31, 0.12);
}

.brh-results-pane .brh-results {
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.brh-results-pane.is-updating .brh-results {
  opacity: 0.68;
  filter: saturate(0.82);
}

.brh-results-pane.is-pending .brh-results {
  opacity: 0.84;
}

.brh-results-updated .brh-summary-card strong,
.brh-results-updated .brh-score strong,
.brh-results-updated .brh-oncotype-probability strong {
  animation: brh-result-flash 0.48s ease-out;
}

@keyframes brh-live-pulse {
  from { transform: scale(0.84); opacity: 0.72; }
  to { transform: scale(1.12); opacity: 1; }
}

@keyframes brh-result-flash {
  0% { background-color: rgba(122, 40, 77, 0.13); }
  100% { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .brh-interface-status::before,
  .brh-results-updated .brh-summary-card strong,
  .brh-results-updated .brh-score strong,
  .brh-results-updated .brh-oncotype-probability strong {
    animation: none !important;
  }

  .brh-results-pane .brh-results {
    transition: none;
  }
}


/* v0.5.0 — compact clinical workspace */
.brh-hero {
  padding: 4px 2px 13px;
  color: var(--brh-accent);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brh-subtitle {
  max-width: none;
  margin: 0 !important;
  color: #417671 !important;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 750;
  line-height: 1.3;
  opacity: 1;
}

.brh-eyebrow,
.brh-root .brh-hero h2,
.brh-notice,
.brh-footer,
.brh-results-heading,
.brh-live-label,
.brh-action-panel > div,
.brh-success-badge,
.brh-performance-grid,
.brh-yamamoto-classification {
  display: none !important;
}

.brh-action-panel.brh-action-compact {
  justify-content: flex-end;
  padding: 0;
  margin: 8px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brh-root .brh-calculate-button {
  min-width: 145px;
  min-height: 39px;
  padding: 8px 14px;
}

.brh-interface-status[hidden],
.brh-interface-status:empty {
  display: none !important;
}

.brh-panel {
  margin-bottom: 9px;
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(28, 38, 47, 0.055);
}

.brh-section-summary {
  grid-template-columns: 29px minmax(0, 1fr) 17px;
  min-height: 49px;
  padding: 8px 11px;
  gap: 8px;
}

.brh-section-number {
  width: 27px;
  height: 27px;
  font-size: .78rem;
}

.brh-section-title strong {
  font-size: .88rem;
}

.brh-section-title small {
  font-size: .68rem;
}

.brh-section-body {
  padding: 0 11px 11px;
}

.brh-grid {
  gap: 8px 9px;
  padding-top: 10px;
}

.brh-root label {
  gap: 4px;
  font-size: .72rem;
}

.brh-root input,
.brh-root select {
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: .78rem;
}

.brh-root label.brh-check {
  min-height: 36px;
  padding: 7px;
  border-radius: 8px;
}

.brh-field-help {
  margin-top: 9px !important;
  font-size: .68rem;
  line-height: 1.35;
}

.brh-results-pane {
  padding: 10px;
  min-height: 0;
  border-radius: 12px;
}

.brh-summary-grid {
  gap: 6px;
  margin-bottom: 7px;
}

.brh-root .brh-summary-card {
  min-height: 64px;
  padding: 7px 9px;
  border-radius: 9px;
}

.brh-summary-card span {
  font-size: .58rem;
}

.brh-summary-card strong {
  margin: 1px 0;
  font-size: 1.08rem;
}

.brh-summary-card small {
  font-size: .58rem;
  line-height: 1.2;
}

.brh-model-tabs {
  margin-bottom: 7px;
  padding: 4px;
  border-radius: 9px;
}

.brh-root .brh-model-tab {
  min-height: 31px;
  padding: 5px 8px;
  font-size: .68rem;
}

.brh-result-card {
  padding: 10px;
  border-radius: 10px;
  box-shadow: none;
}

.brh-result-card h3 {
  margin-bottom: 7px !important;
  font-size: 1rem !important;
}

.brh-score,
.brh-risk-classification,
.brh-treatment-summary,
.brh-input-summary,
.brh-tennessee-mapping,
.brh-method-limitations {
  margin: 7px 0;
  padding: 9px 10px;
  border-radius: 9px;
}

.brh-score strong {
  font-size: 1.55rem;
}

.brh-input-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 8px;
  font-size: .65rem;
}

.brh-input-summary strong {
  grid-column: 1 / -1;
  font-size: .69rem;
}

.brh-horizon-tabs {
  gap: 5px;
  margin: 7px 0;
}

.brh-root .brh-horizon-tab {
  padding: 5px 9px;
  font-size: .66rem;
}

.brh-result-card table {
  margin-top: 6px;
  font-size: .66rem;
}

.brh-result-card th,
.brh-result-card td {
  padding: 5px 6px;
}

.brh-oncotype-grid {
  gap: 8px;
  margin: 8px 0;
}

.brh-oncotype-probability {
  padding: 12px;
  border-radius: 10px;
}

.brh-oncotype-probability strong {
  margin: 3px 0;
  font-size: 1.7rem;
}

.brh-oncotype-probability p,
.brh-method-limitations,
.brh-warning-list,
.brh-meta {
  font-size: .66rem !important;
}

.brh-dfs-section {
  margin-top: 10px;
  padding-top: 9px;
}

.brh-dfs-section h4 {
  margin-bottom: 6px !important;
}

@media (min-width: 1000px) {
  .brh-root {
    width: min(1880px, calc(100vw - 20px));
    margin-top: 4px;
  }

  .brh-workspace {
    grid-template-columns: minmax(500px, .95fr) minmax(0, 1.05fr);
    gap: 10px;
  }

  .brh-results-pane {
    top: 8px;
    max-height: calc(100vh - 16px);
  }

  body.admin-bar .brh-results-pane {
    top: 38px;
    max-height: calc(100vh - 46px);
  }
}

@media (min-width: 1440px) {
  .brh-input-pane .brh-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brh-workspace {
    grid-template-columns: minmax(650px, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .brh-hero {
    padding: 3px 1px 10px;
  }

  .brh-subtitle {
    font-size: .98rem;
  }

  .brh-action-panel.brh-action-compact {
    display: flex;
    padding: 0;
  }

  .brh-root .brh-calculate-button {
    width: 100%;
  }
}
