:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-alt: #eef4ee;
  --ink: #18221f;
  --muted: #5f6f69;
  --line: #d9e2dd;
  --line-strong: #b8c7c0;
  --brand: #126a5a;
  --brand-strong: #0b4e43;
  --accent: #c64f3d;
  --gold: #e4aa3f;
  --focus: #1b7fff;
  --danger: #b42318;
  --success: #166534;
  --warning: #9a6700;
  --shadow: 0 18px 45px rgba(20, 36, 31, 0.12);
  --shadow-sm: 0 5px 16px rgba(20, 36, 31, 0.07);
  --radius: 8px;
  --space: 1rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* SEO control plane */
.seo-control-plane {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.seo-score-strip {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 7.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-inline-start: 5px solid #0f766e;
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.seo-score-strip.is-excellent,
.seo-score-strip.is-good {
  border-inline-start-color: #0f766e;
}

.seo-score-strip.is-warning {
  border-inline-start-color: #b7791f;
}

.seo-score-strip.is-critical {
  border-inline-start-color: #b42318;
}

.seo-score-strip h2,
.seo-score-strip p {
  margin: 0;
}

.seo-score-strip h2 {
  margin-block-end: 0.18rem;
  font-size: 1rem;
}

.seo-score-strip p,
.seo-score-strip small {
  color: var(--muted);
  font-size: 0.76rem;
}

.seo-score-value {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 5.3rem;
  border-inline-end: 1px solid var(--line);
}

.seo-score-value > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.seo-score-value strong {
  color: #143a37;
  font-size: 2rem;
  line-height: 1;
}

.seo-score-value strong small {
  margin-inline-start: 0.12rem;
  font-size: 0.72rem;
}

.seo-run-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.seo-run-form select {
  min-width: 8.5rem;
  min-height: 2.25rem;
}

.seo-kpi-grid,
.seo-schema-kpis {
  margin-block: 0;
}

.seo-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.7fr);
  gap: 0.9rem;
  min-width: 0;
}

.seo-priority-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-priority-list > li {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) 2.2rem;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.45rem;
  padding-block: 0.55rem;
  border-block-end: 1px solid #e7eeec;
}

.seo-priority-list > li:last-child {
  border-block-end: 0;
}

.seo-priority-list span:not(.seo-severity) {
  display: grid;
  min-width: 0;
}

.seo-priority-list strong,
.seo-priority-list small {
  overflow-wrap: anywhere;
}

.seo-priority-list strong {
  color: var(--ink);
  font-size: 0.79rem;
}

.seo-priority-list small {
  color: var(--muted);
  font-size: 0.7rem;
}

.seo-priority-empty {
  grid-template-columns: 2.2rem minmax(0, 1fr) !important;
  color: #0f766e;
}

.seo-category-panel nav {
  display: grid;
  gap: 0.18rem;
}

.seo-category-panel nav > a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 0.75rem;
  align-items: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.42rem 0.5rem;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
}

.seo-category-panel nav > a:hover {
  background: #f3f8f6;
  color: #0b685d;
}

.seo-category-panel nav > a > i:first-child {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #cbded9;
  border-radius: 5px;
  background: #edf7f4;
  color: #0f766e;
}

.seo-category-panel nav span {
  display: grid;
}

.seo-category-panel nav strong {
  font-size: 0.78rem;
}

.seo-category-panel nav small {
  color: var(--muted);
  font-size: 0.68rem;
}

.seo-output-band {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.72rem;
  border-block: 1px solid var(--line);
  background: #f8faf9;
}

.seo-output-band > div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  margin-inline-end: auto;
}

.seo-output-band > div > i {
  color: #27618a;
  text-align: center;
}

.seo-output-band span {
  display: grid;
}

.seo-output-band strong {
  font-size: 0.76rem;
}

.seo-output-band small {
  color: var(--muted);
  font-size: 0.68rem;
}

.seo-output-band > a,
.seo-reference-links > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #ccd9d6;
  border-radius: 5px;
  background: #fff;
  color: #31534e;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.seo-output-band > a:hover,
.seo-reference-links > a:hover {
  border-color: #8bb9ae;
  color: #0b685d;
}

.seo-severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: 7rem;
  min-height: 1.65rem;
  padding: 0.22rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.seo-severity-critical {
  border-color: #f1aaa4;
  background: #fff1f0;
  color: #9f261d;
}

.seo-severity-warning {
  border-color: #e8c88a;
  background: #fff8e8;
  color: #8a580b;
}

.seo-severity-notice {
  border-color: #a9c9df;
  background: #eef7fc;
  color: #225f86;
}

.seo-severity-passed {
  border-color: #9fcfbf;
  background: #edf8f4;
  color: #0b685d;
}

.seo-audit-command > header {
  align-items: center;
}

.seo-audit-command > header .seo-run-form {
  flex: 0 0 auto;
}

.seo-audit-scope {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding-block-start: 0.65rem;
  border-block-start: 1px solid var(--line);
}

.seo-audit-scope span {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  color: #50635f;
  font-size: 0.72rem;
  font-weight: 700;
}

.seo-audit-scope i {
  color: #0f766e;
}

.seo-filter-bar {
  display: grid;
  grid-template-columns: minmax(12rem, 1.6fr) repeat(3, minmax(8.5rem, 0.75fr)) auto 2.2rem;
  align-items: end;
  gap: 0.5rem;
  margin-block-end: 0.7rem;
  padding: 0.6rem;
  border: 1px solid #d8e3e0;
  border-radius: 5px;
  background: #f8faf9;
}

.seo-findings-panel .seo-filter-bar {
  grid-template-columns: minmax(12rem, 1.5fr) minmax(9rem, 0.7fr) minmax(9rem, 0.7fr) auto 2.2rem;
}

.seo-filter-bar label {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.seo-filter-bar label > span {
  color: #586a66;
  font-size: 0.66rem;
  font-weight: 750;
}

.seo-filter-bar input,
.seo-filter-bar select {
  width: 100%;
  min-height: 2.2rem;
}

.seo-findings-table {
  min-width: 68rem;
  table-layout: fixed;
}

.seo-findings-table th:nth-child(1) { width: 8rem; }
.seo-findings-table th:nth-child(2) { width: 13rem; }
.seo-findings-table th:nth-child(3) { width: 7rem; }
.seo-findings-table th:nth-child(4) { width: 20rem; }
.seo-findings-table th:nth-child(5) { width: 18rem; }
.seo-findings-table th:nth-child(6) { width: 3rem; }

.seo-findings-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.seo-score-chip {
  display: inline-grid;
  place-items: center;
  min-width: 4.2rem;
  min-height: 1.7rem;
  padding-inline: 0.35rem;
  border: 1px solid #bdd4cf;
  border-radius: 4px;
  background: #f2f8f6;
  color: #1c514a;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.seo-score-chip.is-warning {
  border-color: #e8c88a;
  background: #fff8e8;
  color: #8a580b;
}

.seo-score-chip.is-critical {
  border-color: #f1aaa4;
  background: #fff1f0;
  color: #9f261d;
}

.table-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-block-start: 0.7rem;
}

.table-pagination a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #ccd9d6;
  border-radius: 4px;
  background: #fff;
  color: #425b56;
  font-size: 0.72rem;
  text-decoration: none;
}

.table-pagination a.is-current,
.table-pagination a[aria-current="page"] {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.table-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5rem;
  color: var(--muted);
}

.seo-bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.65rem;
  padding: 0.48rem 0.58rem;
  border-block: 1px solid var(--line);
  background: #fbfcfc;
}

.seo-bulk-bar > span {
  margin-inline-end: auto;
  color: var(--muted);
  font-size: 0.72rem;
}

.seo-bulk-bar select {
  min-width: 12rem;
  min-height: 2.15rem;
}

.seo-content-table {
  min-width: 71rem;
}

.seo-content-table .selection-cell {
  width: 2.6rem;
  text-align: center;
}

.seo-technical-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.seo-technical-status > section {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 4.5rem;
  padding: 0.62rem;
  border-block: 1px solid var(--line);
  background: #fff;
}

.seo-technical-status > section > i {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 5px;
  background: #eaf5f1;
  color: #0f766e;
}

.seo-technical-status > section > span {
  display: grid;
  min-width: 0;
}

.seo-technical-status strong {
  font-size: 0.76rem;
}

.seo-technical-status small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-technical-status .seo-severity {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 1.4rem;
}

.seo-technical-layout,
.seo-structured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.75fr);
  gap: 0.9rem;
  min-width: 0;
}

.seo-output-preview pre,
.seo-schema-preview pre {
  max-height: 23rem;
  margin: 0;
  padding: 0.75rem;
  overflow: auto;
  border: 1px solid #d8e3e0;
  border-radius: 5px;
  background: #182321;
  color: #e8f2ef;
  font-size: 0.7rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.seo-technical-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0.65rem 0 0;
  border-block-start: 1px solid var(--line);
}

.seo-technical-facts > div {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem;
  border-inline-end: 1px solid var(--line);
}

.seo-technical-facts > div:last-child {
  border-inline-end: 0;
}

.seo-technical-facts dt {
  color: var(--muted);
  font-size: 0.65rem;
}

.seo-technical-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  font-weight: 750;
}

.seo-technical-actions ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-technical-actions li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.55rem;
  padding-block: 0.6rem;
  border-block-end: 1px solid var(--line);
}

.seo-technical-actions li > i {
  color: #27618a;
  text-align: center;
}

.seo-technical-actions li span {
  display: grid;
}

.seo-technical-actions li strong {
  font-size: 0.76rem;
}

.seo-technical-actions li small {
  color: var(--muted);
  font-size: 0.68rem;
}

.seo-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-block-start: 0.7rem;
}

.seo-sitemap-inventory .data-table {
  min-width: 48rem;
}

.seo-schema-inventory {
  min-width: 0;
}

.seo-schema-inventory .data-table {
  min-width: 54rem;
}

.kpi-text-value {
  max-width: 12rem;
  overflow: hidden;
  font-size: 0.9rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-schema-preview .form-help {
  margin-block: 0.65rem;
}

.seo-settings-form {
  padding-block-end: 0;
}

.seo-settings-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.65fr);
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 0;
  border: 0;
  border-block-start: 1px solid var(--line);
}

.seo-settings-section > legend {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  color: #234944;
  font-size: 0.8rem;
  font-weight: 800;
}

.seo-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  min-width: 0;
}

.seo-settings-fields label,
.seo-paths-field,
.seo-settings-footer label {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  min-width: 0;
  color: #405752;
  font-size: 0.72rem;
  font-weight: 700;
}

.seo-settings-fields label > small,
.seo-paths-field > small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.seo-settings-fields .span-2 {
  grid-column: 1 / -1;
}

.seo-settings-fields input,
.seo-settings-fields select,
.seo-settings-fields textarea,
.seo-paths-field textarea,
.seo-settings-footer input {
  width: 100%;
}

.field-counter {
  justify-self: end;
  margin-block-end: -1.45rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.seo-serp-preview {
  align-self: start;
  min-width: 0;
  padding: 0.8rem 0 0.8rem 1rem;
  border-inline-start: 3px solid #27618a;
}

.seo-serp-preview > span,
.seo-serp-preview > strong,
.seo-serp-preview > p,
.seo-serp-preview > small {
  display: block;
  overflow-wrap: anywhere;
}

.seo-serp-preview > span {
  color: #31534e;
  font-size: 0.68rem;
}

.seo-serp-preview > strong {
  margin-block: 0.25rem;
  color: #1a4c7a;
  font-size: 1rem;
  font-weight: 600;
}

.seo-serp-preview > p {
  margin: 0;
  color: #4f5d5a;
  font-size: 0.72rem;
  line-height: 1.5;
}

.seo-serp-preview > small {
  margin-block-start: 0.45rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.seo-toggle-grid {
  display: grid;
  gap: 0;
}

.seo-toggle {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding-block: 0.55rem;
  border-block-end: 1px solid var(--line);
  cursor: pointer;
}

.seo-toggle input {
  width: 1rem;
  height: 1rem;
  margin-block-start: 0.08rem;
  accent-color: #0f766e;
}

.seo-toggle span {
  display: grid;
}

.seo-toggle strong {
  font-size: 0.73rem;
}

.seo-toggle small {
  color: var(--muted);
  font-size: 0.65rem;
}

.seo-paths-field {
  align-self: start;
}

.seo-settings-section:has(.seo-toggle-grid) {
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
}

.seo-settings-section:has(.seo-toggle-grid) > legend {
  grid-column: 1 / -1;
}

.seo-settings-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  margin-inline: -1rem;
  padding: 0.7rem 1rem;
  border-block-start: 1px solid var(--line);
  background: #f8faf9;
}

.seo-setting-history form {
  display: inline;
}

@media (max-width: 1100px) {
  .seo-overview-layout,
  .seo-technical-layout,
  .seo-structured-layout {
    grid-template-columns: 1fr;
  }

  .seo-filter-bar,
  .seo-findings-panel .seo-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-filter-bar .btn,
  .seo-filter-bar > .icon-btn {
    align-self: end;
  }

  .seo-settings-section {
    grid-template-columns: 1fr;
  }

  .seo-settings-section:has(.seo-toggle-grid) {
    grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 780px) {
  .seo-score-strip {
    grid-template-columns: 6.2rem minmax(0, 1fr);
  }

  .seo-score-value {
    min-height: 4.6rem;
  }

  .seo-score-strip > .seo-run-form {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-block-start: 0.55rem;
    border-block-start: 1px solid var(--line);
  }

  .seo-audit-command > header {
    align-items: stretch;
  }

  .seo-audit-command > header .seo-run-form {
    width: 100%;
  }

  .seo-audit-command > header .seo-run-form label,
  .seo-audit-command > header .seo-run-form select {
    flex: 1 1 auto;
    width: 100%;
  }

  .seo-audit-scope,
  .seo-technical-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-priority-list > li {
    grid-template-columns: 6.5rem minmax(0, 1fr) 2.2rem;
  }

  .seo-severity {
    width: 6.3rem;
  }

  .seo-filter-bar,
  .seo-findings-panel .seo-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .seo-filter-bar > .icon-btn {
    justify-self: end;
  }

  .seo-output-band {
    flex-wrap: wrap;
  }

  .seo-output-band > div {
    flex: 1 0 100%;
  }

  .seo-settings-fields {
    grid-template-columns: 1fr;
  }

  .seo-settings-fields .span-2 {
    grid-column: auto;
  }

  .seo-settings-section:has(.seo-toggle-grid) {
    grid-template-columns: 1fr;
  }

  .seo-settings-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .seo-score-strip {
    grid-template-columns: 1fr;
  }

  .seo-score-value {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .seo-score-strip > .seo-run-form {
    grid-column: auto;
    display: grid;
    grid-template-columns: 1fr;
  }

  .seo-run-form select,
  .seo-run-form .btn {
    width: 100%;
  }

  .seo-audit-scope,
  .seo-technical-status {
    grid-template-columns: 1fr;
  }

  .seo-priority-list > li {
    grid-template-columns: minmax(0, 1fr) 2.2rem;
  }

  .seo-priority-list > li > .seo-severity {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .seo-bulk-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .seo-bulk-bar select,
  .seo-bulk-bar .btn {
    width: 100%;
  }

  .seo-technical-facts {
    grid-template-columns: 1fr;
  }

  .seo-technical-facts > div {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar,
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.85rem min(5vw, 4rem);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.site-nav,
.app-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.site-nav a,
.app-nav a {
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.app-nav a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.nav-actions,
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.user-chip {
  min-width: 0;
  color: var(--muted);
}

.user-chip strong,
.user-chip small {
  display: block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  color: var(--ink);
}

.user-chip a {
  font-weight: 700;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--brand-strong);
  font-weight: 800;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-large {
  width: 6rem;
  height: 6rem;
  font-size: 2rem;
}

.site-main,
.dashboard-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: 2rem;
  min-height: calc(100svh - 72px);
  padding: 4rem 0 3rem;
}

.hero h1,
.subhero h1,
.dashboard-hero h1,
.page-head h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
}

.hero h1 {
  font-size: 4.8rem;
}

.hero-lead {
  max-width: 45rem;
  color: var(--muted);
  font-size: 1.22rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero-actions,
.nav-actions,
.task-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-ghost {
  background: var(--surface);
  color: var(--brand-strong);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--surface-alt);
}

.product-shot {
  min-height: 520px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.35rem 0.25rem 1rem;
}

.shot-bar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--line);
}

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

.shot-grid article,
.shot-panel,
.metric-card,
.panel,
.form-card,
.feature-grid article,
.split-list article,
.narrow-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.shot-grid article {
  min-height: 8.8rem;
  padding: 1rem;
}

.shot-grid article strong,
.shot-grid article h2,
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.shot-grid article h2 {
  margin: 0;
  font-size: 1rem;
}

.shot-grid article b,
.metric-card strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--brand-strong);
  font-size: 1.85rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.shot-grid article small {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
}

.shot-panel {
  grid-column: 1 / -1;
  min-height: 17rem;
  padding: 1.25rem;
  background: var(--surface);
}

.shot-panel h2 {
  margin: 0 0 0.5rem;
}

.band,
.subhero,
.feature-grid,
.split-list,
.auth-panel,
.dashboard-hero,
.page-head,
.dashboard-grid,
.narrow-panel {
  margin: 2rem 0;
}

.metric-grid {
  margin: 0.85rem 0;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 1.2rem;
}

.section-head h2,
.subhero h1 {
  font-size: 2.4rem;
  line-height: 1.12;
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
}

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

.feature-grid article,
.split-list article,
.narrow-panel {
  padding: 1.25rem;
}

.feature-grid h2,
.feature-grid h3,
.split-list h2 {
  margin: 0 0 0.5rem;
}

.feature-grid p,
.split-list p,
.narrow-panel p {
  color: var(--muted);
}

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

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
  gap: 2rem;
  align-items: start;
  min-height: calc(100svh - 120px);
  padding-top: 4rem;
}

.form-card,
.panel {
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(20, 36, 31, 0.06);
}

.form-stack {
  display: grid;
  gap: 0.9rem;
}

label,
fieldset {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 800;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
}

legend {
  padding: 0 0.4rem;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(27, 127, 255, 0.2);
}

.form-note {
  margin: 0;
  color: var(--muted);
}

.dashboard-main {
  padding-bottom: 4rem;
}

.dashboard-hero,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
}

.dashboard-hero h1,
.page-head h1 {
  font-size: 2.3rem;
}

.metric-card {
  display: grid;
  min-height: 6.5rem;
  align-content: start;
  padding: 0.75rem 0.85rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.dashboard-grid.two {
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
}

.task-list a {
  display: block;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.activity-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.activity-list small,
td small {
  display: block;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 0.84rem;
}

.flash {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 800;
}

.flash-success {
  border-color: rgba(22, 101, 52, 0.35);
  color: var(--success);
}

.flash-error {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
}

.flash-warning {
  border-color: rgba(154, 103, 0, 0.35);
  color: var(--warning);
}

.profile-card {
  display: grid;
  justify-items: start;
  gap: 0.55rem;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card p {
  color: var(--muted);
}

@media (max-width: 960px) {
  .topbar,
  .app-header {
    position: static;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .site-nav,
  .app-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
  }

  .hero,
  .auth-panel,
  .dashboard-grid,
  .dashboard-grid.two {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 640px) {
  .site-main,
  .dashboard-main {
    width: min(100% - 1rem, 1180px);
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .product-shot {
    min-height: auto;
  }

  .shot-grid,
  .feature-grid,
  .feature-grid.wide {
    grid-template-columns: 1fr;
  }

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

  .dashboard-hero,
  .page-head {
    align-items: start;
    flex-direction: column;
  }

  .user-chip strong,
  .user-chip small {
    max-width: 8rem;
  }
}

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

@media (forced-colors: active) {
  .btn,
  .brand-mark,
  .badge,
  .app-nav-group-toggle,
  .app-nav-count {
    border: 1px solid ButtonText;
  }

  .app-nav .app-nav-link.is-active {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* Academic management workspace */
.academic-workspace {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding-block-end: 0.5rem;
}

.academic-workspace > .page-head {
  margin: 0;
  padding-block: 0.8rem 0.1rem;
}

.academic-workspace > .page-head h1 {
  font-size: clamp(1.45rem, 2rem, 2rem);
}

.academic-section-nav {
  display: flex;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  scrollbar-width: thin;
}

.academic-section-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
  padding: 0.42rem 0.68rem;
  border-radius: 5px;
  color: #465b55;
  font-size: 0.77rem;
  font-weight: 750;
  text-decoration: none;
}

.academic-section-nav a:hover {
  background: #f1f6f3;
  color: var(--brand-strong);
}

.academic-section-nav a[aria-current="page"] {
  background: #e7f3ee;
  color: #0d5f50;
  box-shadow: inset 0 0 0 1px #b8d9cd;
}

.academic-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
}

.academic-summary > div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 4.1rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.academic-summary > div:nth-child(2n) {
  border-block-start-color: #d4c79f;
}

.academic-summary > div:nth-child(3n) {
  border-block-start-color: #d6b9b1;
}

.academic-summary i {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 5px;
  background: #e9f4ef;
  color: #116453;
  font-size: 0.82rem;
}

.academic-summary span,
.academic-summary strong,
.academic-summary small {
  display: block;
  min-width: 0;
}

.academic-summary strong {
  color: #213b35;
  font-size: 1.05rem;
  line-height: 1.15;
}

.academic-summary small {
  margin-block-start: 0.12rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.25;
}

.academic-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfa;
}

.academic-filter label {
  flex: 1 1 10rem;
  max-width: 16rem;
  font-size: 0.7rem;
}

.academic-filter select {
  min-height: 2.2rem;
  padding: 0.4rem 0.55rem;
  border-radius: 5px;
  font-size: 0.78rem;
}

.academic-filter .btn,
.academic-filter .icon-btn {
  flex: 0 0 auto;
}

.academic-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
  min-width: 0;
}

.academic-primary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(15rem, 0.55fr);
  gap: 0.8rem;
  align-items: start;
  min-width: 0;
}

.academic-editor {
  gap: 0.65rem;
  padding: 0.85rem;
  scroll-margin-top: 4.5rem;
}

.academic-editor > header {
  grid-column: 1 / -1;
  margin-block-end: 0.05rem;
  padding-block-end: 0.55rem;
  border-block-end: 1px solid #e6ece9;
}

.academic-editor .eyebrow,
.academic-class-detail .eyebrow {
  margin: 0 0 0.12rem;
  font-size: 0.64rem;
}

.academic-editor label {
  min-width: 0;
  font-size: 0.72rem;
}

.academic-editor input,
.academic-editor select,
.academic-editor textarea {
  min-width: 0;
  min-height: 2.3rem;
  padding: 0.48rem 0.58rem;
  font-size: 0.8rem;
}

.academic-editor input[type="color"] {
  max-width: 5rem;
  padding: 0.2rem;
}

.academic-editor textarea {
  min-height: 4.8rem;
}

.academic-check {
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d9e5e0;
  border-radius: 5px;
  background: #f6faf8;
  cursor: pointer;
}

.academic-check input {
  width: 1rem;
  min-height: 1rem;
  margin-block-start: 0.1rem;
}

.academic-check span,
.academic-check strong,
.academic-check small {
  display: block;
  min-width: 0;
}

.academic-check small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 500;
}

.academic-guidance {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #d8cda9;
  border-radius: 6px;
  background: #fffaf0;
  color: #4e4732;
}

.academic-guidance > i {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 5px;
  background: #f4e5ba;
  color: #765812;
}

.academic-guidance strong,
.academic-guidance p {
  margin: 0;
}

.academic-guidance strong {
  font-size: 0.78rem;
}

.academic-guidance p {
  margin-block-start: 0.25rem;
  color: #6a6044;
  font-size: 0.72rem;
  line-height: 1.45;
}

.academic-table-surface {
  padding: 0.75rem;
  scroll-margin-top: 4.5rem;
}

.academic-table-surface > header {
  margin-block-end: 0.55rem;
}

.academic-table-surface .table-wrap,
.academic-class-detail .table-wrap {
  max-width: 100%;
  border: 1px solid #e2e9e6;
  border-radius: 5px;
}

.academic-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: max-content;
}

.academic-row-actions form {
  display: contents;
  margin: 0;
}

.academic-date-range,
.academic-status-stack,
.academic-subject-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.academic-date-range {
  color: #425550;
  white-space: nowrap;
}

.academic-date-range i {
  color: #93a39f;
  font-size: 0.65rem;
}

.academic-status-stack {
  flex-wrap: wrap;
}

.academic-subject-title {
  min-width: 10rem;
}

.academic-color-swatch {
  width: 0.65rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--subject-color, #126a5a), #000 18%);
  border-radius: 3px;
  background: var(--subject-color, #126a5a);
}

.academic-class-detail {
  padding: 0.8rem;
  scroll-margin-top: 4.5rem;
}

.academic-class-detail > header {
  align-items: center;
}

.academic-capacity {
  display: grid;
  justify-items: end;
  gap: 0.3rem;
  min-width: 10rem;
  color: #38534c;
  font-size: 0.75rem;
}

.academic-capacity progress {
  width: 10rem;
  height: 0.55rem;
  accent-color: var(--brand);
}

.academic-roster-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(14rem, 0.55fr);
  gap: 0.75rem;
  align-items: start;
  min-width: 0;
}

.academic-roster-form {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf9;
}

.academic-roster-form header,
.academic-roster-form h3,
.academic-roster-form p {
  margin: 0;
}

.academic-roster-form h3 {
  font-size: 0.82rem;
}

.academic-roster-form p {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.academic-roster-form label {
  font-size: 0.7rem;
}

.academic-roster-form input,
.academic-roster-form select {
  min-height: 2.25rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

.academic-roster-form select[multiple] {
  min-height: 12rem;
}

.academic-workspace .field-optional {
  color: #71817d;
  font-size: 0.64rem;
  font-weight: 500;
}

.academic-workspace option[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .academic-editor-grid,
  .academic-primary-layout,
  .academic-roster-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .academic-guidance {
    grid-row: 1;
  }
}

@media (max-width: 700px) {
  .academic-workspace {
    gap: 0.65rem;
  }

  .academic-workspace > .page-head {
    align-items: start;
    padding-block-start: 0.45rem;
  }

  .academic-workspace > .page-head h1 {
    font-size: 1.4rem;
  }

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

  .academic-filter label {
    max-width: none;
  }

  .academic-editor {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.7rem;
  }

  .academic-editor > header,
  .academic-editor .span-2,
  .academic-editor .form-actions {
    grid-column: 1;
  }

  .academic-class-detail > header {
    align-items: start;
  }

  .academic-capacity {
    justify-items: start;
  }
}

@media (max-width: 420px) {
  .academic-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .academic-summary > div {
    min-height: 3.65rem;
  }

  .academic-filter > * {
    width: 100%;
    max-width: none;
  }

  .academic-filter .icon-btn {
    width: 2.2rem;
  }

  .academic-section-nav a {
    padding-inline: 0.55rem;
  }

  .academic-class-detail > header,
  .academic-table-surface > header {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academic-workspace *,
  .academic-workspace *::before,
  .academic-workspace *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .academic-section-nav,
  .academic-summary > div,
  .academic-filter,
  .academic-guidance,
  .academic-check,
  .academic-roster-form {
    border: 1px solid CanvasText;
  }

  .academic-section-nav a[aria-current="page"] {
    outline: 2px solid Highlight;
  }

  .academic-color-swatch {
    background: CanvasText;
  }
}

@media print {
  .academic-section-nav,
  .academic-filter,
  .academic-editor-grid,
  .academic-primary-layout,
  .academic-row-actions,
  .academic-roster-form,
  .academic-workspace > .page-head .page-actions {
    display: none !important;
  }

  .academic-table-surface,
  .academic-class-detail,
  .academic-summary > div {
    border-color: #888;
    break-inside: avoid;
  }

  .academic-table-surface .table-wrap,
  .academic-class-detail .table-wrap {
    overflow: visible;
  }

  .academic-workspace table {
    min-width: 0;
    font-size: 8pt;
  }
}

/* Teaching workload and Indonesian academic compliance */
.workload-view-nav {
  display: flex;
  gap: 0.25rem;
  max-width: 100%;
  padding-block-end: 0.1rem;
  overflow-x: auto;
  border-block-end: 1px solid var(--line);
  scrollbar-width: thin;
}

.workload-view-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.62rem;
  border-block-end: 2px solid transparent;
  color: #52645f;
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.workload-view-nav a:hover,
.workload-view-nav a[aria-current="page"] {
  border-block-end-color: #14715f;
  color: #0d5f50;
}

.workload-context-filter label {
  flex-basis: 8.5rem;
}

.workload-policy-strip {
  display: grid;
  grid-template-columns: minmax(13rem, 1.15fr) minmax(20rem, 1.6fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid #c9ddd5;
  border-inline-start: 4px solid #14715f;
  border-radius: 6px;
  background: #f6faf8;
}

.workload-policy-strip > div:first-child,
.workload-policy-strip > div:first-child > span:last-child,
.workload-policy-strip strong,
.workload-policy-strip small {
  display: block;
  min-width: 0;
}

.workload-policy-strip > div:first-child {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.workload-policy-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 5px;
  background: #dcefe7;
  color: #0d5f50;
}

.workload-policy-strip strong {
  overflow-wrap: anywhere;
  color: #213b35;
  font-size: 0.76rem;
}

.workload-policy-strip small {
  margin-block-start: 0.12rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.64rem;
}

.workload-policy-strip dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.workload-policy-strip dl > div {
  min-width: 0;
  padding-inline-start: 0.5rem;
  border-inline-start: 1px solid #d8e5df;
}

.workload-policy-strip dt,
.workload-policy-strip dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.workload-policy-strip dt {
  color: #687b75;
  font-size: 0.61rem;
  font-weight: 700;
}

.workload-policy-strip dd {
  margin-block-start: 0.08rem;
  color: #283f39;
  font-size: 0.7rem;
  font-weight: 750;
}

.workload-policy-source a,
.workload-policy-source span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #315b51;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}

.workload-state {
  display: grid;
  gap: 0.08rem;
  min-width: 8.75rem;
  padding: 0.35rem 0.45rem;
  border-inline-start: 3px solid #899993;
  background: #f5f7f6;
}

.workload-state strong,
.workload-state small {
  display: block;
  line-height: 1.25;
}

.workload-state strong {
  color: #324640;
  font-size: 0.69rem;
}

.workload-state small {
  color: #697a75;
  font-size: 0.61rem;
}

.workload-state-compliant {
  border-color: #18805f;
  background: #edf8f3;
}

.workload-state-under,
.workload-state-over {
  border-color: #b44b3d;
  background: #fff4f1;
}

.workload-state-exception,
.workload-state-equivalent,
.workload-state-review {
  border-color: #a67417;
  background: #fff9e9;
}

.workload-state-unassigned {
  border-color: #687b75;
}

.workload-number {
  display: grid;
  min-width: 4.25rem;
}

.workload-number strong {
  color: #203d36;
  font-size: 0.88rem;
}

.workload-number small {
  color: var(--muted);
  font-size: 0.61rem;
}

.workload-selection {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid #cbdcd5;
  border-radius: 5px;
  background: #f4f9f7;
  color: #31564d;
  font-size: 0.67rem;
  font-weight: 700;
}

.workload-selection a {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  color: inherit;
}

.workload-editor output {
  display: flex;
  align-items: center;
  min-height: 2.3rem;
  margin-block-start: 0.28rem;
  padding: 0.48rem 0.58rem;
  border: 1px solid #d7e3de;
  border-radius: 5px;
  background: #f7faf9;
  color: #174d41;
  font-size: 0.78rem;
  font-weight: 750;
}

.workload-catalog-note,
.academic-phase-status {
  display: block;
  min-height: 1rem;
  margin-block-start: 0.18rem;
  color: #657873;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.35;
}

.workload-rulebook,
.workload-condition-summary {
  padding: 0.75rem;
}

.workload-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid #e1e8e5;
}

.workload-rule-grid article {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem;
}

.workload-rule-grid article:nth-child(odd) {
  border-inline-end: 1px solid #e1e8e5;
}

.workload-rule-grid article:nth-child(-n + 2) {
  border-block-end: 1px solid #e1e8e5;
}

.workload-rule-grid i {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: #176655;
}

.workload-rule-grid strong,
.workload-rule-grid p {
  margin: 0;
}

.workload-rule-grid strong {
  color: #2d453f;
  font-size: 0.72rem;
}

.workload-rule-grid p {
  margin-block-start: 0.16rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.workload-rulebook > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-block-start: 0.55rem;
}

.workload-rulebook > footer a {
  color: #225f51;
  font-size: 0.67rem;
  font-weight: 700;
}

.workload-condition-summary dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.workload-condition-summary dl > div {
  min-width: 0;
  padding: 0.45rem;
  border-block-start: 1px solid #e2e9e6;
}

.workload-condition-summary dt,
.workload-condition-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.workload-condition-summary dt {
  color: var(--muted);
  font-size: 0.62rem;
}

.workload-condition-summary dd {
  margin-block-start: 0.1rem;
  color: #2d453f;
  font-size: 0.7rem;
  font-weight: 700;
}

.workload-overview table,
.workload-workspace .academic-table-surface table {
  min-width: 58rem;
}

@media (max-width: 1100px) {
  .workload-policy-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workload-policy-strip dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 700px) {
  .workload-view-nav a {
    min-height: 2.75rem;
  }

  .workload-policy-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .workload-policy-strip dl,
  .workload-policy-source {
    grid-column: 1;
  }

  .workload-policy-strip dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workload-policy-source a,
  .workload-policy-source span {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .workload-policy-strip dl,
  .workload-rule-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workload-rule-grid article:nth-child(odd) {
    border-inline-end: 0;
  }

  .workload-rule-grid article {
    border-block-end: 1px solid #e1e8e5;
  }

  .workload-rule-grid article:last-child {
    border-block-end: 0;
  }
}

@media (forced-colors: active) {
  .workload-policy-strip,
  .workload-selection,
  .workload-editor output,
  .workload-state {
    border: 1px solid CanvasText;
  }

  .workload-view-nav a[aria-current="page"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

@media print {
  .workload-view-nav,
  .workload-context-filter,
  .workload-policy-editors,
  .workload-guidance,
  .workload-selection {
    display: none !important;
  }

  .workload-policy-strip {
    grid-template-columns: minmax(0, 1fr);
    border-color: #777;
  }
}

/* AI endpoint access and billing */
.ai-billing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-block-end: 0.75rem;
}

.ai-billing-metrics > article {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ai-billing-metrics span,
.ai-billing-metrics small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.72rem;
}

.ai-billing-metrics span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 750;
}

.ai-billing-metrics span i {
  color: var(--brand);
}

.ai-billing-metrics strong {
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  line-height: 1.25;
}

.ai-billing-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block-end: 0.75rem;
}

.ai-billing-control-grid > .surface {
  margin: 0;
}

.ai-chat-credit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.18rem 0.5rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--gold);
  border-radius: 6px;
  background: var(--surface-alt);
}

.ai-chat-credit > span {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.ai-chat-credit > strong {
  font-size: 0.82rem;
}

.ai-chat-credit > small,
.ai-chat-credit > a {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
  font-size: 0.69rem;
}

.ai-chat-credit > a {
  width: max-content;
  color: var(--brand-strong);
  font-weight: 750;
}

.ai-chat-endpoint-note {
  display: flex;
  gap: 0.42rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .ai-billing-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ai-billing-control-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .ai-billing-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Account email, mailbox, and support */
.auth-service-page {
  width: min(44rem, calc(100% - 2rem));
  margin: 2.5rem auto 4rem;
}

.auth-service-page > header {
  margin-bottom: 1rem;
}

.auth-service-page > header h1 {
  margin: 0.2rem 0 0.4rem;
  font-size: 2rem;
}

.auth-service-page > header > p:last-child,
.auth-service-footnote {
  color: var(--muted);
}

.auth-service-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(22, 42, 35, 0.08);
}

.auth-service-form label,
.mail-folder-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 750;
}

.auth-service-form input,
.auth-service-form select,
.auth-service-form textarea,
.mail-folder-form select {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.auth-service-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.auth-service-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: #e6f3ef;
  color: #0f766e;
  font-size: 1.35rem;
}

.auth-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.auth-service-footnote {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
}

.auth-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.auth-service-grid .span-2 {
  grid-column: 1 / -1;
}

.login-support {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-support p:last-child {
  text-align: end;
}

.mail-control-plane,
.support-control-plane {
  display: grid;
  gap: 0.85rem;
}

.mail-account-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.mail-account-tab {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.mail-account-tab > i {
  color: #486399;
  text-align: center;
}

.mail-account-tab span,
.mail-account-tab strong,
.mail-account-tab small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-account-tab strong {
  font-size: 0.76rem;
}

.mail-account-tab small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.mail-account-tab:hover,
.mail-account-tab.is-active {
  border-color: #5d7fb5;
  background: #eef3fb;
}

.mail-account-tab.is-active {
  box-shadow: inset 3px 0 #315f9c;
}

.mail-workspace {
  display: grid;
  grid-template-columns: minmax(12rem, 0.28fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.mail-folders,
.mail-list {
  min-width: 0;
}

.mail-folder-form {
  display: grid;
  gap: 0.55rem;
}

.mail-folder-form .btn {
  justify-content: center;
  width: 100%;
}

.mailbox-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding: 0.65rem;
  border: 1px solid #e4c877;
  border-radius: 6px;
  background: #fff9e8;
  color: #725410;
  font-size: 0.7rem;
  line-height: 1.45;
}

.mail-subject,
.support-control-plane .cell-title {
  display: grid;
  min-width: 12rem;
  color: var(--text);
  text-decoration: none;
}

.mail-subject strong {
  overflow-wrap: anywhere;
}

.mail-subject small {
  color: var(--muted);
  font-size: 0.65rem;
}

.mail-list tr.is-unread .mail-subject strong {
  color: #174f8c;
  font-weight: 850;
}

.mail-inline-actions {
  display: flex;
  gap: 0.25rem;
}

.mail-message-detail pre {
  max-height: 34rem;
  margin: 0.75rem 0 0;
  padding: 0.85rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mail-message-date {
  color: var(--muted);
}

.mail-attachments,
.mail-config-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.mail-attachments li,
.mail-config-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
}

.mail-config-list li > span:first-child,
.mail-config-list strong,
.mail-config-list small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-config-list small {
  color: var(--muted);
}

.support-ticket-detail {
  display: grid;
  gap: 0.8rem;
}

.support-thread {
  display: grid;
  gap: 0.55rem;
}

.support-message {
  max-width: 78%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9f8;
}

.support-message.is-superadmin {
  justify-self: end;
  border-color: #b8d9d0;
  background: #eaf6f2;
}

.support-message header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.67rem;
}

.support-message p {
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.support-reply-form {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .mail-account-tabs,
  .login-support {
    grid-template-columns: 1fr;
  }

  .login-support p,
  .login-support p:last-child {
    text-align: center;
  }

  .mail-workspace {
    grid-template-columns: 1fr;
  }

  .mail-folder-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .mail-folder-form .btn {
    width: auto;
  }
}

@media (max-width: 640px) {
  .auth-service-page {
    width: min(100% - 1rem, 44rem);
    margin-top: 1rem;
  }

  .auth-service-page > header h1 {
    font-size: 1.55rem;
  }

  .auth-service-form {
    padding: 0.85rem;
  }

  .auth-service-grid,
  .mail-folder-form {
    grid-template-columns: 1fr;
  }

  .auth-service-grid .span-2 {
    grid-column: auto;
  }

  .mail-folder-form .btn {
    width: 100%;
  }

  .support-message {
    max-width: 100%;
  }
}

@media (forced-colors: active) {
  .auth-service-form,
  .mail-account-tab,
  .mailbox-notice,
  .support-message {
    border: 2px solid CanvasText;
  }
}

/* Enterprise application shell */
:root {
  --bg: #f4f7f8;
  --surface-alt: #edf5f3;
  --ink: #172321;
  --muted: #60716d;
  --line: #d8e1df;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #b84735;
  --gold: #d79a22;
  --blue: #2563a8;
  --violet: #6b5aa6;
  --focus: #1769d2;
  --shadow: 0 8px 24px rgba(23, 35, 33, 0.08);
  --sidebar-width: 15.5rem;
  --topbar-height: 3.5rem;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 2000;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-width: 320px;
  background: var(--bg);
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(calc(100vh - var(--topbar-height)), auto);
  grid-template-rows: var(--topbar-height) minmax(calc(100dvh - var(--topbar-height)), auto);
  min-height: 100vh;
  min-height: 100dvh;
  transition: grid-template-columns 160ms ease;
}

.app-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 1035;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-inline-end: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  overflow: hidden;
  transition: width 160ms ease;
}

.app-sidebar .offcanvas-header {
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0.55rem 1rem;
  border-block-end: 1px solid var(--line);
}

.app-sidebar .btn-close {
  display: none;
  width: 2rem;
  height: 2rem;
  padding: 0.45rem;
  background-size: 0.75rem;
  margin-inline-start: auto;
}

.app-sidebar-body {
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  padding: 0.65rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.app-sidebar-tools {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.15rem;
  margin-block-end: 0.35rem;
  padding: 0 0.25rem 0.35rem 0.55rem;
  border-block-end: 1px solid #e7eeec;
  background: #fff;
}

.app-sidebar-tools > span {
  color: #71827e;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-sidebar-tools .icon-btn {
  width: 2rem;
  height: 2rem;
  border-color: transparent;
  background: transparent;
  font-size: 0.78rem;
  touch-action: manipulation;
}

.app-sidebar-tools .icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.app-nav {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.app-nav-group {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.app-nav-heading {
  margin: 0;
  font: inherit;
}

.app-nav-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 0.85rem;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #687a76;
  font: inherit;
  text-align: start;
  touch-action: manipulation;
  cursor: pointer;
}

.app-nav-group-toggle:hover {
  background: #f3f7f6;
  color: var(--ink);
}

.app-nav-group-toggle > i {
  font-size: 0.64rem;
  text-align: center;
  transition: transform 140ms ease;
}

.app-nav-group.is-nav-group-collapsed .app-nav-group-toggle > i {
  transform: rotate(-90deg);
}

.app-nav-label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0;
}

.app-nav-count {
  min-width: 1.25rem;
  padding: 0.05rem 0.3rem;
  border: 1px solid #dbe5e2;
  border-radius: 999px;
  background: #f8faf9;
  color: #71827e;
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.app-nav-group-items {
  display: grid;
  gap: 0.1rem;
}

.app-nav-group-items[hidden] {
  display: none;
}

.app-nav .app-nav-link {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  color: #52635f;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  touch-action: manipulation;
}

.app-nav .app-nav-link i {
  width: 1.2rem;
  color: #70817d;
  text-align: center;
}

.app-nav-link-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-nav .app-nav-link:hover {
  background: #f0f5f4;
  color: var(--ink);
}

.app-nav .app-nav-link.is-active {
  background: #dff1ed;
  color: var(--brand-strong);
}

.app-nav .app-nav-link.is-active i {
  color: var(--brand);
}

.app-topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 1020;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: var(--topbar-height);
  padding: 0.35rem clamp(0.65rem, 1.5vw, 1.25rem);
  border-block-end: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
}

.app-menu-button {
  display: inline-grid;
}

.app-context {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.app-context > i {
  color: var(--brand);
  text-align: center;
}

.app-context > span {
  display: grid;
  min-width: 0;
}

.app-context strong,
.app-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-context strong {
  font-size: 0.9rem;
}

.app-context small {
  color: var(--muted);
  font-size: 0.76rem;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-start: auto;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #42534f;
  text-decoration: none;
  cursor: pointer;
}

.app-topbar .icon-btn {
  width: 2.375rem;
  height: 2.375rem;
}

.icon-btn:hover {
  border-color: #b8c9c5;
  background: #f6f9f8;
  color: var(--brand-strong);
}

.notification-button > span {
  position: absolute;
  inset-block-start: -0.35rem;
  inset-inline-end: -0.35rem;
  display: grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding-inline: 0.2rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

.user-menu {
  position: relative;
}

.user-menu > summary {
  display: grid;
  grid-template-columns: 2.25rem;
  align-items: center;
  justify-items: center;
  min-width: 2.375rem;
  padding: 0.0625rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.user-menu > summary::-webkit-details-marker {
  display: none;
}

.user-menu-copy {
  display: none;
  min-width: 0;
}

.user-menu > summary > i {
  display: none;
}

.user-menu-copy strong,
.user-menu-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-copy strong {
  font-size: 0.82rem;
}

.user-menu-copy small {
  color: var(--muted);
  font-size: 0.7rem;
}

.user-menu-panel {
  position: absolute;
  inset-block-start: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 1050;
  display: grid;
  width: 13rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.user-menu-panel a,
.user-menu-panel button {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: var(--surface-alt);
}

.user-menu > summary:hover {
  border-color: #b8c9c5;
  background: #f6f9f8;
}

.app-workspace {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.dashboard-main {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1.25rem 0 2.5rem;
}

.dashboard-container {
  width: min(100% - 2rem, 1540px);
  margin-inline: auto;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  min-height: 2.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-block-start: auto;
  padding: 0.55rem max(0.75rem, 1.5vw);
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.app-footer span {
  overflow-wrap: anywhere;
}

.app-footer span:last-child {
  margin-inline-start: auto;
  text-align: end;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem min(5vw, 4rem);
  border-block-start: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.site-footer span {
  margin-inline-end: auto;
}

.site-nav-mobile {
  display: none;
}

.page-head,
.dashboard-hero {
  margin: 0 0 1rem;
  padding: 0;
}

.page-head h1,
.dashboard-hero h1 {
  font-size: 1.7rem;
  line-height: 1.2;
}

.page-head p,
.dashboard-hero p {
  margin-block-end: 0.3rem;
}

.page-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.toolbar {
  justify-content: space-between;
  margin-block-end: 0.85rem;
}

.toolbar form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.55rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.25rem, 1fr));
  gap: 0.6rem;
  margin-block: 0.75rem;
}

.kpi-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.15rem;
  gap: 0.45rem;
  min-width: 0;
  min-height: 6.15rem;
  align-content: start;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.kpi-card > span:first-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin-block-start: 0.35rem;
  font-size: 1.48rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.kpi-card small {
  display: block;
  margin-block-start: 0.32rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 6px;
  background: #dff1ed;
  color: var(--brand);
}

.kpi-card:nth-child(2) .kpi-icon {
  background: #e7f0fb;
  color: var(--blue);
}

.kpi-card:nth-child(3) .kpi-icon {
  background: #f8eed6;
  color: #90610d;
}

.kpi-card:nth-child(4) .kpi-icon {
  background: #f5e8e5;
  color: var(--accent);
}

.kpi-card:nth-child(5) .kpi-icon {
  background: #eeeaf8;
  color: var(--violet);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 0.9rem;
  align-items: start;
  margin-block: 1rem;
}

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

.content-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.surface,
.panel {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.surface > header,
.panel > header,
.surface-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.85rem;
}

.surface h2,
.panel h2,
.surface h3,
.panel h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.surface-head p,
.surface > header p,
.panel > header p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.data-table {
  min-width: 760px;
  margin: 0;
}

.data-table th {
  padding: 0.65rem 0.75rem;
  border-block-end: 1px solid var(--line);
  background: #f7f9f9;
  color: #5d6d69;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.data-table td {
  padding: 0.72rem 0.75rem;
  font-size: 0.82rem;
}

.data-table tbody tr:hover {
  background: #fafcfc;
}

.cell-title {
  display: grid;
  gap: 0.12rem;
}

.cell-title strong {
  font-size: 0.84rem;
}

.cell-title small,
.muted {
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.55rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid #cbd8d5;
  border-radius: 999px;
  background: #f7faf9;
  color: #53645f;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-active,
.status-published,
.status-passed,
.status-indexed,
.status-graded {
  border-color: #b9dacf;
  background: #edf8f3;
  color: #116b4d;
}

.status-draft,
.status-pending,
.status-unverified,
.status-planned {
  border-color: #ddd4b8;
  background: #fbf8eb;
  color: #80600e;
}

.status-disabled,
.status-inactive,
.status-failed,
.status-archived,
.status-closed {
  border-color: #e4c6c0;
  background: #fcf1ef;
  color: #a23e2e;
}

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-stack label,
.form-grid label {
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.form-stack input,
.form-stack select,
.form-stack textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 2.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 5px;
  font-size: 0.86rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  grid-column: 1 / -1;
  padding-block-start: 0.25rem;
}

.btn,
button.btn {
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 750;
}

.btn-sm {
  min-height: 2rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.74rem;
}

.btn-danger-soft {
  border-color: #e2c4be;
  background: #fff5f3;
  color: #a33d2c;
}

.btn-secondary-soft {
  border-color: #cbd8d5;
  background: #f7faf9;
  color: #42534f;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 6px;
  background: #fff;
  font-size: 0.82rem;
  box-shadow: none;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state i {
  color: #9aaba7;
  font-size: 1.6rem;
}

.empty-state p {
  max-width: 34rem;
  margin: 0;
}

.chart-frame {
  position: relative;
  width: 100%;
  min-height: 290px;
}

.chart-frame canvas {
  width: 100%;
  max-height: 320px;
}

.calendar-frame {
  min-height: 430px;
}

.question-card {
  margin-block: 0 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.question-card legend {
  width: 100%;
  margin-block-end: 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 750;
}

.question-options {
  display: grid;
  gap: 0.45rem;
}

.question-option {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 500;
}

.question-option input {
  width: 1rem;
  min-height: 1rem;
  margin-block-start: 0.15rem;
}

.exam-bar {
  position: sticky;
  inset-block-start: calc(var(--topbar-height) + 0.5rem);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.ql-container,
.ql-toolbar {
  border-color: var(--line) !important;
}

.ql-container {
  min-height: 180px;
  font-family: inherit;
  font-size: 0.9rem;
}

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

.dependency-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.dependency-item code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.7rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.metric-strip > div {
  padding-inline-end: 0.65rem;
  border-inline-end: 1px solid var(--line);
}

.metric-strip > div:last-child {
  border-inline-end: 0;
}

.metric-strip strong,
.metric-strip span {
  display: block;
}

.metric-strip strong {
  font-size: 1.2rem;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.72rem;
}

.notice-list {
  display: grid;
  gap: 0.65rem;
}

.notice-item {
  display: grid;
  gap: 0.2rem;
  padding-block-end: 0.65rem;
  border-block-end: 1px solid var(--line);
}

.notice-item:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

.notice-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.notice-item small,
.metric-status {
  color: var(--muted);
  font-size: 0.72rem;
}

.question-card legend {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.question-card legend small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
  min-height: 2.15rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

.dt-container .dt-layout-row {
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0;
}

@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg {
    position: fixed !important;
    visibility: visible !important;
    transform: none !important;
  }

  .app-layout.is-sidebar-collapsed {
    --sidebar-width: 4.75rem;
  }

  .app-layout.is-sidebar-collapsed .app-sidebar .offcanvas-header {
    justify-content: center;
    padding-inline: 0.5rem;
  }

  .app-layout.is-sidebar-collapsed .app-sidebar .brand-word,
  .app-layout.is-sidebar-collapsed .app-sidebar-tools,
  .app-layout.is-sidebar-collapsed .app-nav-heading,
  .app-layout.is-sidebar-collapsed .app-nav-link-label {
    display: none;
  }

  .app-layout.is-sidebar-collapsed .app-sidebar-body {
    padding-inline: 0.5rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav {
    gap: 0.3rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav-group {
    gap: 0.12rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav-group + .app-nav-group {
    padding-block-start: 0.3rem;
    border-block-start: 1px solid #e4ebe9;
  }

  .app-layout.is-sidebar-collapsed .app-nav-group-items {
    gap: 0.12rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav .app-nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    min-height: 2.5rem;
    padding-inline: 0.5rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav .app-nav-link i {
    width: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-layout,
  .app-sidebar,
  .app-nav-group-toggle > i {
    transition: none;
  }
}

@media (max-width: 1200px) {
  .content-grid.three,
  .dependency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-sidebar.offcanvas-lg {
    --bs-offcanvas-width: min(88vw, 19rem);
    z-index: var(--bs-offcanvas-zindex, 1045);
    width: var(--bs-offcanvas-width);
    max-width: var(--bs-offcanvas-width);
  }

  .app-sidebar .offcanvas-header {
    min-height: calc(var(--topbar-height) + env(safe-area-inset-top, 0px));
    padding-block-start: calc(0.55rem + env(safe-area-inset-top, 0px));
    padding-inline-start: calc(1rem + env(safe-area-inset-left, 0px));
    padding-inline-end: calc(1rem + env(safe-area-inset-right, 0px));
  }

  .app-sidebar-body {
    height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top, 0px));
    padding-inline-start: calc(0.65rem + env(safe-area-inset-left, 0px));
    padding-inline-end: calc(0.65rem + env(safe-area-inset-right, 0px));
    padding-block-end: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  }

  .app-sidebar .btn-close {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
  }

  .app-sidebar-tools .icon-btn,
  .app-nav-group-toggle,
  .app-nav .app-nav-link {
    min-height: 2.75rem;
  }

  .app-sidebar-tools .icon-btn {
    width: 2.75rem;
    height: 2.75rem;
  }

  .app-topbar,
  .app-workspace {
    grid-column: 1;
  }

  .app-menu-button {
    display: inline-grid;
  }

  .content-grid,
  .content-grid.equal {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .site-nav-mobile {
    display: block;
    margin-inline-start: auto;
  }

  .site-nav-mobile > summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
  }

  .site-nav-mobile nav {
    position: absolute;
    inset-block-start: 4.1rem;
    inset-inline: 0.5rem;
    z-index: 30;
    display: grid;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow);
  }
}

@media (any-pointer: coarse) {
  .app-topbar .app-menu-button,
  .app-sidebar .btn-close,
  .app-sidebar .brand,
  .app-sidebar-tools .icon-btn,
  .app-nav-group-toggle,
  .app-nav .app-nav-link {
    min-height: 2.75rem;
  }

  .app-topbar .app-menu-button,
  .app-sidebar .btn-close,
  .app-sidebar-tools .icon-btn {
    width: 2.75rem;
    height: 2.75rem;
  }

  .app-layout.is-sidebar-collapsed .app-nav .app-nav-link {
    min-height: 2.75rem;
  }
}

@media (max-width: 720px) {
  .dashboard-container {
    width: min(100% - 1rem, 1540px);
  }

  .app-context {
    max-width: 38vw;
  }

  .user-menu > summary {
    min-width: 0;
  }

  .user-menu-copy,
  .user-menu > summary > i {
    display: none;
  }

  .user-menu > summary {
    grid-template-columns: 2.25rem;
  }

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

  .content-grid.three,
  .dependency-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

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

  .metric-strip > div:nth-child(2) {
    border-inline-end: 0;
  }

  .page-head,
  .dashboard-hero,
  .surface-head,
  .surface > header,
  .panel > header,
  .exam-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-footer {
    align-items: center;
    flex-direction: row;
  }

  .site-footer span {
    margin-inline-end: 0;
  }
}

@media (max-width: 540px) {
  .app-context {
    display: none;
  }
}

/* Public experience */
.site-shell .site-main {
  width: 100%;
  max-width: none;
}

.site-main > .band,
.site-main > .subhero,
.site-main > .feature-grid,
.site-main > .split-list,
.site-main > .auth-panel,
.site-main > .narrow-panel,
.site-main > .flash {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-main > .hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 620px;
  height: calc(100svh - 150px);
  max-height: 800px;
  margin: 0;
  padding: 3.5rem max(1rem, calc((100% - 1180px) / 2));
  overflow: hidden;
  background: #edf3f0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(38rem, 54%);
}

.hero-copy .eyebrow {
  color: #a43a2d;
}

.hero h1 {
  font-size: 5rem;
}

.hero-lead {
  max-width: 36rem;
  color: #43534e;
}

.hero-actions .btn {
  gap: 0.55rem;
}

.product-shot {
  position: absolute;
  z-index: 1;
  inset-block: 2.5rem -2.5rem;
  inset-inline: max(44%, 32rem) -2rem;
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px 0 0 0;
  background: #fff;
  box-shadow: 0 20px 45px rgba(20, 36, 31, 0.14);
}

.shot-sidebar {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0.65rem;
  background: #173d36;
  color: #c9d9d4;
}

.shot-sidebar .brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.35rem;
  background: #fff;
  color: #126a5a;
  font-size: 0.82rem;
}

.shot-workspace {
  min-width: 0;
  padding: 0.85rem 1rem 1rem;
  background: #f7f9f8;
}

.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 0.25rem 0.75rem;
  border-bottom: 1px solid #d9e2dd;
}

.shot-bar strong {
  font-size: 0.92rem;
}

.shot-bar span {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #687771;
  font-size: 0.75rem;
}

.shot-grid {
  grid-template-columns: repeat(3, minmax(7rem, 1fr));
  gap: 0.75rem;
  padding-top: 1rem;
}

.shot-grid article {
  min-height: 7.5rem;
  padding: 0.9rem;
  border-color: #dfe7e3;
  box-shadow: 0 5px 15px rgba(20, 36, 31, 0.04);
}

.shot-grid article b {
  font-size: 2rem;
}

.shot-panel {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(12rem, 1.3fr);
  align-items: end;
  gap: 1.5rem;
  min-height: 15rem;
  padding: 1.25rem;
  background: #fff;
}

.shot-panel h2 {
  margin: 0.35rem 0 0.65rem;
  font-size: 2.4rem;
}

.shot-panel small {
  color: #687771;
  font-weight: 800;
}

.trend-up {
  color: #166534;
  font-size: 0.82rem;
  font-weight: 800;
}

.shot-chart {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  height: 10rem;
  padding: 0 0.5rem;
  border-bottom: 1px solid #cdd8d3;
}

.shot-chart span {
  flex: 1;
  min-width: 0.65rem;
  border-radius: 4px 4px 0 0;
  background: #2f8172;
}

.shot-chart span:nth-child(1) { height: 42%; }
.shot-chart span:nth-child(2) { height: 55%; }
.shot-chart span:nth-child(3) { height: 49%; }
.shot-chart span:nth-child(4) { height: 68%; }
.shot-chart span:nth-child(5) { height: 75%; }
.shot-chart span:nth-child(6) { height: 88%; background: #c64f3d; }

.band {
  padding-block: 2rem 4rem;
}

.feature-grid article > i {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  background: #e5f0ec;
  color: #126a5a;
}

.feature-grid article:nth-child(3) > i {
  background: #f9e8e4;
  color: #a43a2d;
}

.feature-grid article:nth-child(4) > i {
  background: #fff0cf;
  color: #795200;
}

.band-action {
  margin: 1.5rem 0 0;
  font-weight: 800;
}

.band-action a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .site-main > .hero {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    max-height: none;
    padding-block: 2.75rem 1.5rem;
  }

  .hero-copy {
    width: min(38rem, 100%);
  }

  .product-shot {
    position: relative;
    inset: auto;
    width: calc(100% + max(1rem, calc((100vw - 1180px) / 2)));
    height: 310px;
    margin: 2rem -1rem 0 12%;
    border-radius: 8px 0 0 0;
  }

  .shot-panel {
    min-height: 10rem;
  }
}

@media (max-width: 640px) {
  .site-main > .band,
  .site-main > .subhero,
  .site-main > .feature-grid,
  .site-main > .split-list,
  .site-main > .auth-panel,
  .site-main > .narrow-panel,
  .site-main > .flash {
    width: min(100% - 1rem, 1180px);
  }

  .site-main > .hero {
    min-height: calc(100svh - 110px);
    padding: 2rem 0.75rem 1rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-lead {
    font-size: 1.02rem;
  }

  .product-shot {
    grid-template-columns: 2.8rem minmax(0, 1fr);
    width: calc(100% + 0.75rem);
    height: 235px;
    margin: 1.5rem -0.75rem 0 5%;
  }

  .shot-sidebar {
    gap: 0.85rem;
    padding-inline: 0.35rem;
    font-size: 0.72rem;
  }

  .shot-sidebar .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .shot-workspace {
    padding: 0.55rem;
  }

  .shot-bar {
    min-height: 2.2rem;
  }

  .shot-bar span {
    display: none;
  }

  .shot-grid {
    gap: 0.4rem;
    padding-top: 0.55rem;
  }

  .shot-grid article {
    min-height: 5rem;
    padding: 0.5rem;
  }

  .shot-grid article strong,
  .shot-grid article h2,
  .shot-grid article small {
    font-size: 0.58rem;
  }

  .shot-grid article b {
    font-size: 1.15rem;
  }

  .shot-panel {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.5rem;
    min-height: 7rem;
    padding: 0.55rem;
  }

  .shot-panel h2 {
    font-size: 1.4rem;
  }

  .trend-up,
  .shot-panel small {
    font-size: 0.58rem;
  }

  .shot-chart {
    gap: 0.2rem;
    height: 4.5rem;
    padding-inline: 0.15rem;
  }

  .band {
    padding-block-start: 1.5rem;
  }
}

@media print {
  .app-sidebar,
  .app-topbar,
  .app-footer,
  .page-actions,
  .toolbar,
  .btn,
  .icon-btn,
  .flash {
    display: none !important;
  }

  .app-layout,
  .app-workspace,
  .dashboard-main {
    display: block;
    width: 100%;
    padding: 0;
    background: #fff;
  }

  .dashboard-container {
    width: 100%;
  }

  .surface,
  .panel,
  .kpi-card {
    break-inside: avoid;
    box-shadow: none;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}

/* Dashboard runtime configuration and control plane */
.dashboard-width-contained .dashboard-container {
  width: min(100% - 2rem, 1180px);
}

.dashboard-width-wide .dashboard-container {
  width: min(100% - 2rem, 1540px);
}

.dashboard-width-fluid .dashboard-container {
  width: calc(100% - 2rem);
  max-width: none;
}

.dashboard-topbar-comfortable {
  --topbar-height: 4.15rem;
}

.dashboard-topbar-comfortable .app-topbar {
  padding-block: 0.55rem;
}

.dashboard-topbar-static .app-topbar {
  position: relative;
}

.dashboard-nav-labels-hidden .app-sidebar-tools,
.dashboard-nav-labels-hidden .app-nav-heading {
  display: none;
}

.dashboard-nav-labels-hidden .app-nav {
  gap: 0.5rem;
}

.dashboard-nav-labels-hidden .app-nav-group + .app-nav-group {
  padding-block-start: 0.35rem;
  border-block-start: 1px solid #e4ebe9;
}

.dashboard-account-label-visible .user-menu > summary {
  grid-template-columns: 2.25rem minmax(0, 9rem) 0.75rem;
  gap: 0.35rem;
  min-width: 9.5rem;
  padding-inline-end: 0.55rem;
}

.dashboard-account-label-visible .user-menu-copy,
.dashboard-account-label-visible .user-menu > summary > i {
  display: grid;
}

.dashboard-account-label-visible .user-menu-copy {
  justify-items: start;
}

.dashboard-footer-full .app-footer {
  min-height: 3.35rem;
  padding-block: 0.85rem;
  font-size: 0.76rem;
}

.dashboard-table-comfortable .data-table th,
.dashboard-table-comfortable .data-table td {
  padding: 0.82rem 0.9rem;
}

.dashboard-chart-compact .chart-frame {
  min-height: 220px;
}

.dashboard-chart-compact .chart-frame canvas {
  max-height: 240px;
}

.dashboard-chart-large .chart-frame {
  min-height: 380px;
}

.dashboard-chart-large .chart-frame canvas {
  max-height: 420px;
}

.dashboard-widget-descriptions-hidden .dashboard-widget > header p {
  display: none;
}

.dashboard-density-comfortable .dashboard-main {
  padding-block-start: 1.6rem;
}

.dashboard-density-comfortable .dashboard-widget.surface {
  padding: 1.2rem;
}

.dashboard-density-comfortable .dashboard-widget-grid {
  gap: 1.15rem;
}

.dashboard-density-comfortable .kpi-card {
  min-height: 7.1rem;
  padding: 0.9rem;
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.dashboard-widget {
  min-width: 0;
  margin: 0;
}

.dashboard-widget.is-wide {
  grid-column: 1 / -1;
}

.dashboard-widget-kpis .kpi-grid {
  margin: 0;
}

.dashboard-widget .task-list {
  display: grid;
  gap: 0.45rem;
}

.dashboard-widget .task-list > a {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr) 0.75rem;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf9;
  color: #315852;
  font-size: 0.78rem;
  text-decoration: none;
}

.dashboard-widget .task-list > a:hover {
  border-color: #a8c9c1;
  background: #eef7f4;
}

.dashboard-widget .task-list > a > i:last-child {
  color: #82918d;
  font-size: 0.62rem;
}

.dashboard-chart-empty {
  min-height: 220px;
  align-content: center;
}

.app-layout[data-kpi-columns="2"] .dashboard-widget-kpis .kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-layout[data-kpi-columns="3"] .dashboard-widget-kpis .kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-layout[data-kpi-columns="4"] .dashboard-widget-kpis .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-layout[data-kpi-columns="5"] .dashboard-widget-kpis .kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-layout[data-kpi-columns="6"] .dashboard-widget-kpis .kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-management {
  min-width: 0;
}

.dashboard-status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #b9d8d0;
  border-inline-start: 4px solid var(--brand);
  background: #f4faf8;
}

.dashboard-status-band > div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.dashboard-status-band > div > i {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  background: #dcefeb;
  color: #0b6c61;
}

.dashboard-status-band span,
.dashboard-status-band strong,
.dashboard-status-band small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-status-band strong {
  color: #174d46;
  font-size: 0.82rem;
}

.dashboard-status-band small {
  margin-block-start: 0.12rem;
  color: #60746f;
  font-size: 0.68rem;
}

.dashboard-management-metrics {
  margin-block: 0.75rem;
}

.dashboard-management-metrics .metric-text-value {
  font-size: 1.05rem;
  line-height: 1.2;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(19rem, 0.6fr);
  gap: 0.8rem;
  align-items: start;
  min-width: 0;
}

.dashboard-overview-grid > * {
  min-width: 0;
  max-width: 100%;
}

.dashboard-role-inventory,
.dashboard-revision-history {
  overflow: hidden;
}

.dashboard-role-inventory .data-table {
  min-width: 670px;
}

.dashboard-role-inventory .table-wrap,
.dashboard-revision-history .table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.dashboard-control-map nav {
  display: grid;
  border-block-start: 1px solid var(--line);
}

.dashboard-control-map nav > a {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) 0.7rem;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 3.65rem;
  padding-block: 0.55rem;
  border-block-end: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.dashboard-control-map nav > a:hover {
  color: var(--brand-strong);
}

.dashboard-control-map nav > a > i:first-child {
  color: #376d66;
  text-align: center;
}

.dashboard-control-map nav > a > i:last-child {
  color: #8b9996;
  font-size: 0.62rem;
}

.dashboard-control-map nav span,
.dashboard-control-map nav strong,
.dashboard-control-map nav small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-control-map nav strong {
  font-size: 0.78rem;
}

.dashboard-control-map nav small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.dashboard-role-tabs {
  display: flex;
  gap: 0.25rem;
  margin-block-end: 0.75rem;
  padding-block-end: 0.35rem;
  border-block-end: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.dashboard-role-tabs a {
  flex: 0 0 auto;
  min-height: 2.15rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #566762;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-role-tabs a:hover {
  border-color: #cad7d4;
  background: #f8faf9;
}

.dashboard-role-tabs a.is-active {
  border-color: #9fc7bd;
  background: #eaf5f1;
  color: #0b685d;
}

.dashboard-layout-workspace,
.dashboard-settings-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  gap: 0.85rem;
  align-items: start;
}

.dashboard-layout-form,
.dashboard-settings-form {
  min-width: 0;
}

.dashboard-widget-order,
.dashboard-group-order {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--line);
  list-style: none;
}

.dashboard-widget-order > li {
  display: grid;
  grid-template-columns: 1rem minmax(13rem, 1fr) auto minmax(7rem, 0.32fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.55rem 0;
  border-block-end: 1px solid var(--line);
}

.dashboard-widget-grip {
  color: #9aa7a4;
  text-align: center;
}

.dashboard-widget-identity {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dashboard-widget-identity > i {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 5px;
  background: #e8f3f0;
  color: #17685e;
}

.dashboard-widget-identity span,
.dashboard-widget-identity strong,
.dashboard-widget-identity small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-widget-identity strong {
  font-size: 0.76rem;
}

.dashboard-widget-identity small {
  margin-block-start: 0.08rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-visibility-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafcfc;
  font-size: 0.68rem;
  white-space: nowrap;
}

.dashboard-visibility-toggle input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.dashboard-width-select {
  display: grid;
  grid-template-columns: auto minmax(5.5rem, 1fr);
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
}

.dashboard-width-select select {
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  border-radius: 5px;
  font-size: 0.72rem;
}

.dashboard-order-actions {
  display: flex;
  gap: 0.2rem;
}

.dashboard-order-actions .icon-btn {
  width: 2rem;
  height: 2rem;
}

.dashboard-order-actions .icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dashboard-layout-limits,
.dashboard-settings-sections > fieldset,
.dashboard-presets {
  margin-block-start: 0.8rem;
  border-color: var(--line);
  border-radius: 6px;
}

.dashboard-layout-limits legend,
.dashboard-settings-sections > fieldset > legend,
.dashboard-presets legend {
  color: #284e49;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-form-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  margin-block-start: 0.8rem;
  padding-block-start: 0.8rem;
  border-block-start: 1px solid var(--line);
}

.dashboard-form-footer label {
  min-width: 0;
  color: #344541;
  font-size: 0.74rem;
}

.dashboard-form-footer input {
  min-height: 2.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 5px;
  font-size: 0.8rem;
}

.dashboard-live-preview-panel {
  position: sticky;
  inset-block-start: calc(var(--topbar-height) + 0.65rem);
  min-width: 0;
}

.dashboard-preview-modes {
  margin-block-end: 0.65rem;
}

.dashboard-preview-modes .segmented-control span {
  display: flex;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
}

.dashboard-live-preview,
.dashboard-shell-preview,
.dashboard-experience-preview {
  width: 100%;
  margin-inline: auto;
  border: 1px solid #bfcbc8;
  background: #f2f5f5;
  overflow: hidden;
  transition: width 160ms ease;
}

.dashboard-live-preview.is-mobile,
.dashboard-shell-preview.is-mobile,
.dashboard-experience-preview.is-mobile {
  width: min(100%, 288px);
}

.dashboard-preview-topbar {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) 1.2rem;
  align-items: center;
  gap: 0.35rem;
  height: 1.8rem;
  padding-inline: 0.45rem;
  border-block-end: 1px solid #cbd5d3;
  background: #fff;
}

.dashboard-preview-topbar i,
.dashboard-preview-topbar b {
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
  background: #6b7e79;
}

.dashboard-preview-topbar span {
  display: block;
  width: 38%;
  height: 0.35rem;
  border-radius: 2px;
  background: #b8c6c3;
}

.dashboard-preview-topbar b {
  justify-self: end;
  border-radius: 50%;
  background: #b84735;
}

.dashboard-preview-frame {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  min-height: 21rem;
}

.dashboard-preview-frame > nav {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.55rem;
  padding-block: 0.7rem;
  border-inline-end: 1px solid #cbd5d3;
  background: #fff;
}

.dashboard-preview-frame > nav i {
  width: 1.6rem;
  height: 1.4rem;
  border-radius: 3px;
  background: #dce8e5;
}

.dashboard-preview-frame > main {
  min-width: 0;
  padding: 0.65rem;
}

.dashboard-preview-frame > main > header {
  display: grid;
  gap: 0.15rem;
  margin-block-end: 0.55rem;
}

.dashboard-preview-frame > main > header small {
  color: #b84735;
  font-size: 0.42rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-preview-frame > main > header strong {
  font-size: 0.72rem;
}

.dashboard-preview-frame > main > header span {
  color: #73827e;
  font-size: 0.46rem;
}

.dashboard-preview-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.dashboard-preview-widget {
  min-width: 0;
  min-height: 5rem;
  padding: 0.45rem;
  border: 1px solid #ced8d6;
  background: #fff;
}

.dashboard-preview-widget.is-wide {
  grid-column: 1 / -1;
}

.dashboard-preview-widget > span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #45615b;
  font-size: 0.48rem;
  font-weight: 800;
}

.dashboard-preview-widget > span i {
  color: #0f766e;
}

.dashboard-mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
  margin-block-start: 0.45rem;
}

.dashboard-mini-kpis i {
  height: 2.2rem;
  border-inline-start: 3px solid #0f766e;
  background: #edf3f2;
}

.dashboard-mini-kpis i:nth-child(2) { border-color: #2563a8; }
.dashboard-mini-kpis i:nth-child(3) { border-color: #d79a22; }
.dashboard-mini-kpis i:nth-child(4) { border-color: #b84735; }

.dashboard-mini-chart {
  display: flex;
  align-items: end;
  gap: 0.25rem;
  height: 3.2rem;
  margin-block-start: 0.45rem;
  padding-inline: 0.3rem;
  border-block-end: 1px solid #c7d2d0;
}

.dashboard-mini-chart i {
  flex: 1;
  height: 42%;
  background: #5b9188;
}

.dashboard-mini-chart i:nth-child(2) { height: 76%; background: #3976aa; }
.dashboard-mini-chart i:nth-child(3) { height: 58%; background: #c68f25; }
.dashboard-mini-chart i:nth-child(4) { height: 88%; background: #a84b3b; }
.dashboard-mini-chart i:nth-child(5) { height: 66%; background: #6b5aa6; }

.dashboard-mini-lines,
.dashboard-mini-copy {
  display: grid;
  gap: 0.3rem;
  margin-block-start: 0.5rem;
}

.dashboard-mini-lines i,
.dashboard-mini-copy i {
  display: block;
  width: 100%;
  height: 0.55rem;
  background: #dde6e4;
}

.dashboard-mini-lines i:nth-child(even),
.dashboard-mini-copy i:nth-child(even) {
  width: 70%;
}

.dashboard-live-preview.is-mobile .dashboard-preview-frame {
  grid-template-columns: 2.4rem minmax(0, 1fr);
  min-height: 28rem;
}

.dashboard-live-preview.is-mobile .dashboard-preview-widget-grid {
  grid-template-columns: 1fr;
}

.dashboard-live-preview.is-mobile .dashboard-preview-widget {
  grid-column: auto;
}

.dashboard-live-preview.is-mobile .dashboard-mini-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-layout-commands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-block-start: 0.8rem;
}

.dashboard-inline-command {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
}

.dashboard-inline-command label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
}

.dashboard-inline-command select {
  min-height: 2.2rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.76rem;
}

.dashboard-inline-command > span {
  display: grid;
  min-width: 0;
}

.dashboard-inline-command > span strong {
  font-size: 0.76rem;
}

.dashboard-inline-command > span small {
  color: var(--muted);
  font-size: 0.64rem;
}

.dashboard-settings-sections {
  display: grid;
  gap: 0.2rem;
}

.dashboard-group-order > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.7rem;
  padding-block: 0.35rem;
  border-block-end: 1px solid var(--line);
}

.dashboard-group-order > li > span:first-of-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: #385b55;
  font-size: 0.75rem;
}

.dashboard-group-order > li > span:first-of-type i {
  width: 1rem;
  color: #70827d;
  text-align: center;
}

.dashboard-shell-preview {
  min-height: 24rem;
  background: #f1f4f4;
}

.dashboard-shell-preview > header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.4rem;
  border-block-end: 1px solid #cad5d2;
  background: #fff;
}

.dashboard-shell-preview.topbar-comfortable > header {
  min-height: 2.8rem;
}

.dashboard-shell-preview-toggle {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid #c9d4d2;
  background: #fff;
  color: #52635f;
  font-size: 0.55rem;
}

.dashboard-shell-preview > header > span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #335c55;
  font-size: 0.5rem;
}

.dashboard-shell-preview > header nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
  color: #4d625d;
  font-size: 0.55rem;
}

.dashboard-shell-preview > div {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  min-height: 19rem;
}

.dashboard-shell-preview.is-sidebar-collapsed > div {
  grid-template-columns: 2.8rem minmax(0, 1fr);
}

.dashboard-shell-preview > div > aside {
  min-width: 0;
  padding: 0.45rem;
  border-inline-end: 1px solid #cad5d2;
  background: #fff;
}

.dashboard-shell-preview > div > aside > b {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-block-end: 0.45rem;
  border-radius: 4px;
  background: #0f766e;
  color: #fff;
  font-size: 0.52rem;
}

.dashboard-shell-preview > div ol {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-shell-preview > div li {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem;
}

.dashboard-shell-preview > div li small {
  grid-column: 1 / -1;
  color: #768783;
  font-size: 0.42rem;
  font-weight: 800;
}

.dashboard-shell-preview.labels-hidden > div li small,
.dashboard-shell-preview.is-sidebar-collapsed > div li small {
  display: none;
}

.dashboard-shell-preview > div li i {
  height: 0.75rem;
  border-radius: 2px;
  background: #dfe8e6;
}

.dashboard-shell-preview.is-sidebar-collapsed > div li {
  grid-template-columns: 1fr;
}

.dashboard-shell-preview.is-sidebar-collapsed > div li i:nth-of-type(2) {
  display: none;
}

.dashboard-shell-preview > div > main {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
}

.dashboard-shell-preview > div > main i {
  display: block;
  min-height: 4.5rem;
  border: 1px solid #d0d9d7;
  background: #fff;
}

.dashboard-shell-preview > div > main i:first-child {
  grid-column: 1 / -1;
  min-height: 3rem;
}

.dashboard-shell-preview > footer {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 1.8rem;
  padding: 0.35rem 0.45rem;
  border-block-start: 1px solid #cad5d2;
  color: #6e7e7a;
  font-size: 0.45rem;
}

.dashboard-shell-preview > footer.is-full {
  min-height: 2.5rem;
  align-items: center;
}

.dashboard-shell-preview.is-mobile > div {
  grid-template-columns: 3rem minmax(0, 1fr);
}

.dashboard-shell-preview.is-mobile > div li small,
.dashboard-shell-preview.is-mobile > div li i:nth-of-type(2) {
  display: none;
}

.dashboard-presets {
  margin-block-start: 0;
}

.dashboard-presets > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dashboard-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

.dashboard-placeholder-list code {
  padding: 0.25rem 0.4rem;
  border: 1px solid #d2dcda;
  border-radius: 4px;
  background: #f5f8f7;
  color: #315f58;
  font-size: 0.68rem;
}

.dashboard-experience-preview {
  min-height: 25rem;
  padding: 0.7rem;
}

.dashboard-experience-preview[data-density="comfortable"] {
  padding: 1rem;
}

.dashboard-experience-preview[data-width="contained"] > * {
  width: 82%;
  margin-inline: auto;
}

.dashboard-experience-preview[data-width="fluid"] > * {
  width: 100%;
}

.dashboard-experience-preview > header {
  display: grid;
  gap: 0.12rem;
  margin-block-end: 0.55rem;
}

.dashboard-experience-preview > header small {
  color: #b84735;
  font-size: 0.48rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-experience-preview > header strong {
  color: #213d38;
  font-size: 0.82rem;
}

.dashboard-experience-preview > header span {
  color: #6b7e79;
  font-size: 0.52rem;
}

.dashboard-experience-kpis {
  display: grid;
  grid-template-columns: repeat(var(--preview-kpi-columns, 5), minmax(0, 1fr));
  gap: 0.3rem;
  margin-block-end: 0.55rem;
}

.dashboard-experience-kpis i {
  display: block;
  min-height: 2.8rem;
  border: 1px solid #d0dad8;
  border-block-start: 3px solid #0f766e;
  background: #fff;
}

.dashboard-experience-kpis i:nth-child(2) { border-block-start-color: #2563a8; }
.dashboard-experience-kpis i:nth-child(3) { border-block-start-color: #d79a22; }
.dashboard-experience-kpis i:nth-child(4) { border-block-start-color: #b84735; }
.dashboard-experience-kpis i:nth-child(5) { border-block-start-color: #6b5aa6; }

.dashboard-experience-widgets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.dashboard-experience-widgets > section {
  min-height: 8rem;
  padding: 0.5rem;
  border: 1px solid #d0dad8;
  background: #fff;
}

.dashboard-experience-widgets b,
.dashboard-experience-widgets small {
  display: block;
}

.dashboard-experience-widgets b {
  color: #294b45;
  font-size: 0.55rem;
}

.dashboard-experience-widgets small {
  margin-block-start: 0.08rem;
  color: #778682;
  font-size: 0.42rem;
}

.dashboard-experience-widgets div {
  display: flex;
  align-items: end;
  gap: 0.2rem;
  height: 4.5rem;
  margin-block-start: 0.4rem;
  border-block-end: 1px solid #cad4d2;
}

.dashboard-experience-widgets div i {
  flex: 1;
  height: 55%;
  background: #4b887f;
}

.dashboard-experience-widgets div i:nth-child(2) { height: 82%; background: #3976aa; }
.dashboard-experience-widgets div i:nth-child(3) { height: 68%; background: #c18b24; }
.dashboard-experience-widgets div i:nth-child(4) { height: 45%; background: #a94b3a; }

.dashboard-experience-preview[data-chart="compact"] .dashboard-experience-widgets div {
  height: 3rem;
}

.dashboard-experience-preview[data-chart="large"] .dashboard-experience-widgets div {
  height: 6rem;
}

.dashboard-experience-widgets p {
  width: 100%;
  height: 0.65rem;
  margin: 0.45rem 0 0;
  background: #dfe7e5;
}

.dashboard-experience-widgets p:nth-of-type(2) { width: 78%; }
.dashboard-experience-widgets p:nth-of-type(3) { width: 62%; }

.dashboard-experience-preview.is-mobile .dashboard-experience-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-experience-preview.is-mobile .dashboard-experience-widgets {
  grid-template-columns: 1fr;
}

.dashboard-revision-history .data-table {
  min-width: 720px;
}

.dashboard-revision-history td:nth-child(2) small {
  margin-block-start: 0.2rem;
  font-size: 0.64rem;
}

.dashboard-revision-history form {
  margin: 0;
}

@media (max-width: 1180px) {
  .dashboard-overview-grid,
  .dashboard-layout-workspace,
  .dashboard-settings-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-live-preview-panel {
    position: static;
  }

  .dashboard-widget-order > li {
    grid-template-columns: 1rem minmax(12rem, 1fr) auto minmax(7rem, 0.25fr) auto;
  }
}

@media (max-width: 860px) {
  .dashboard-widget-order > li {
    grid-template-columns: 1rem minmax(0, 1fr) auto;
  }

  .dashboard-visibility-toggle,
  .dashboard-width-select {
    grid-column: 2 / -1;
  }

  .dashboard-visibility-toggle {
    justify-self: start;
  }

  .dashboard-width-select {
    justify-self: stretch;
  }

  .dashboard-order-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .dashboard-layout-commands {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-width-contained .dashboard-container,
  .dashboard-width-wide .dashboard-container,
  .dashboard-width-fluid .dashboard-container {
    width: calc(100% - 1rem);
  }

  .dashboard-account-label-visible .user-menu > summary {
    grid-template-columns: 2.25rem;
    min-width: 0;
    padding-inline-end: 0.0625rem;
  }

  .dashboard-account-label-visible .user-menu-copy,
  .dashboard-account-label-visible .user-menu > summary > i {
    display: none;
  }

  .dashboard-widget-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-widget,
  .dashboard-widget.is-wide {
    grid-column: auto;
  }

  .app-layout[data-kpi-columns] .dashboard-widget-kpis .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-status-band {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-status-band .btn {
    width: 100%;
  }

  .dashboard-management-tabs .management-tab span {
    display: none;
  }

  .dashboard-management-tabs .management-tab {
    width: 2.35rem;
    justify-content: center;
    padding-inline: 0;
  }

  .dashboard-form-footer {
    grid-template-columns: 1fr;
  }

  .dashboard-form-footer .btn {
    width: 100%;
  }

  .dashboard-inline-command {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-inline-command .btn {
    width: 100%;
  }

  .dashboard-shell-preview > header > span b,
  .dashboard-shell-preview > header nav strong {
    display: none;
  }

  .dashboard-role-inventory .data-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }

  .dashboard-role-inventory th,
  .dashboard-role-inventory td {
    padding: 0.5rem 0.4rem;
    overflow-wrap: anywhere;
  }

  .dashboard-role-inventory th:nth-child(3),
  .dashboard-role-inventory td:nth-child(3),
  .dashboard-role-inventory th:nth-child(4),
  .dashboard-role-inventory td:nth-child(4),
  .dashboard-role-inventory th:nth-child(5),
  .dashboard-role-inventory td:nth-child(5) {
    display: none;
  }

  .dashboard-role-inventory th:nth-child(2) {
    width: 4.6rem;
  }

  .dashboard-role-inventory th:nth-child(6) {
    width: 3.4rem;
  }
}

@media (max-width: 480px) {
  .dashboard-widget-order > li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-widget-grip {
    display: none;
  }

  .dashboard-widget-identity {
    grid-column: 1;
  }

  .dashboard-order-actions {
    grid-column: 2;
  }

  .dashboard-visibility-toggle,
  .dashboard-width-select {
    grid-column: 1 / -1;
  }

  .dashboard-width-select {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .dashboard-preview-frame {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .dashboard-preview-widget-grid,
  .dashboard-experience-widgets {
    grid-template-columns: 1fr;
  }

  .dashboard-preview-widget,
  .dashboard-preview-widget.is-wide {
    grid-column: auto;
  }
}

@media print {
  .dashboard-management-tabs,
  .dashboard-role-tabs,
  .dashboard-live-preview-panel,
  .dashboard-layout-commands,
  .dashboard-form-footer,
  .dashboard-revision-history form,
  .dashboard-presets {
    display: none !important;
  }
}

/* Superadmin AI chat workspace */
.ai-chat-shell {
  position: relative;
  display: grid;
  grid-template-columns: 14.5rem minmax(25rem, 1fr) 19rem;
  width: 100%;
  height: clamp(42rem, calc(100dvh - 18rem), 54rem);
  min-height: 42rem;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(31, 48, 43, 0.08);
  overflow: hidden;
}

.ai-chat-history,
.ai-chat-settings,
.ai-chat-workspace {
  min-width: 0;
  min-height: 0;
}

.ai-chat-history,
.ai-chat-settings {
  display: flex;
  flex-direction: column;
  background: #f7faf9;
}

.ai-chat-history {
  border-inline-end: 1px solid var(--line);
}

.ai-chat-settings {
  border-inline-start: 1px solid var(--line);
}

.ai-chat-history > header,
.ai-chat-settings > header,
.ai-chat-toolbar {
  display: flex;
  flex: 0 0 3.75rem;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-block-end: 1px solid var(--line);
  background: #fff;
}

.ai-chat-history > header > div,
.ai-chat-settings > header > div,
.ai-chat-heading {
  display: grid;
  min-width: 0;
}

.ai-chat-history > header strong,
.ai-chat-settings > header strong,
.ai-chat-heading strong {
  min-width: 0;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-kicker {
  color: #6a7b76;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-chat-search {
  position: relative;
  display: block;
  margin: 0.7rem;
}

.ai-chat-search > i {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0.7rem;
  color: #788984;
  font-size: 0.72rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.ai-chat-search input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem 0.5rem 2rem;
  border: 1px solid #ccd8d5;
  border-radius: 6px;
  background: #fff;
  font-size: 0.74rem;
}

.ai-chat-thread-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 0.45rem 0.7rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-chat-loading {
  margin: 0;
  padding: 1rem 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.ai-chat-thread {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.55rem;
  width: 100%;
  min-height: 3.25rem;
  align-items: center;
  margin-block-end: 0.18rem;
  padding: 0.48rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #30433e;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.ai-chat-thread:hover {
  border-color: #d7e1de;
  background: #fff;
}

.ai-chat-thread.is-active {
  border-color: #9fc7bd;
  background: #e8f4f0;
  color: #0d5f53;
}

.ai-chat-thread-icon {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 5px;
  background: #e9eff5;
  color: #32688f;
  font-size: 0.68rem;
}

.ai-chat-thread.is-active .ai-chat-thread-icon {
  background: #cfe8e1;
  color: #0b685d;
}

.ai-chat-thread > span:last-child,
.ai-chat-thread strong,
.ai-chat-thread small {
  display: block;
  min-width: 0;
}

.ai-chat-thread strong,
.ai-chat-thread small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-thread strong {
  font-size: 0.72rem;
}

.ai-chat-thread small {
  margin-block-start: 0.12rem;
  color: #73837e;
  font-size: 0.61rem;
}

.ai-chat-workspace {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.ai-chat-toolbar {
  flex-wrap: nowrap;
}

.ai-chat-heading {
  flex: 1 1 auto;
}

.ai-chat-heading span {
  color: #687a75;
  font-size: 0.64rem;
}

.ai-chat-heading span i {
  margin-inline-end: 0.3rem;
  color: #1f9d69;
  font-size: 0.48rem;
}

.ai-chat-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
}

.ai-chat-mobile-control {
  display: none;
}

.ai-chat-status {
  display: flex;
  flex: 0 0 2rem;
  min-height: 2rem;
  align-items: center;
  gap: 0.42rem;
  padding-inline: 0.85rem;
  border-block-end: 1px solid #e5ebe9;
  background: #fafcfb;
  color: #60716c;
  font-size: 0.65rem;
}

.ai-chat-status .status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2f9e69;
}

.ai-chat-status[data-state="running"] .status-dot,
.ai-chat-status[data-state="loading"] .status-dot {
  background: #3478b8;
  box-shadow: 0 0 0 3px rgba(52, 120, 184, 0.15);
}

.ai-chat-status[data-state="error"] .status-dot {
  background: var(--danger);
}

.ai-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.35rem max(1rem, 5%);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.ai-chat-empty {
  display: grid;
  width: min(35rem, 100%);
  min-height: 100%;
  align-content: center;
  justify-items: center;
  margin-inline: auto;
  padding-block: 2rem;
  text-align: center;
}

.ai-chat-mark {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid #91bdb1;
  border-radius: 8px;
  background: #e7f3ef;
  color: #0e6759;
  font-size: 1.15rem;
}

.ai-chat-empty h2,
.ai-chat-empty p {
  margin: 0;
}

.ai-chat-empty h2 {
  margin-block-start: 0.9rem;
  font-size: 1.15rem;
}

.ai-chat-empty p {
  margin-block-start: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.ai-chat-suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  margin-block-start: 1.25rem;
}

.ai-chat-suggestions button {
  min-height: 3rem;
  padding: 0.55rem;
  border: 1px solid #d2ddda;
  border-radius: 6px;
  background: #fff;
  color: #3e514c;
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.ai-chat-suggestions button:hover {
  border-color: #8eb9ae;
  background: #f2f8f6;
  color: #0d6255;
}

.ai-chat-message {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  width: min(48rem, 100%);
  margin: 0 auto 1.35rem;
}

.ai-chat-message.is-user {
  grid-template-columns: minmax(0, 1fr) 2rem;
  width: min(38rem, 90%);
  margin-inline-end: 0;
}

.ai-chat-message.is-user .ai-chat-avatar {
  grid-column: 2;
  grid-row: 1;
  background: #f7e8df;
  color: #98472d;
}

.ai-chat-message.is-user .ai-chat-message-body {
  grid-column: 1;
  grid-row: 1;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d8e4e0;
  border-radius: 8px 3px 8px 8px;
  background: #edf5f2;
}

.ai-chat-avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: #dfeaf4;
  color: #2b6998;
  font-size: 0.72rem;
}

.ai-chat-message-body {
  min-width: 0;
}

.ai-chat-message-content {
  color: #253833;
  font-size: 0.86rem;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-chat-message-content.is-rich {
  white-space: normal;
}

.ai-chat-message-content.is-rich > :first-child {
  margin-block-start: 0;
}

.ai-chat-message-content.is-rich > :last-child {
  margin-block-end: 0;
}

.ai-chat-message-content.is-rich :is(h1, h2, h3, h4, h5, h6) {
  margin: 1rem 0 0.45rem;
  color: #203d35;
  font-size: 1rem;
  line-height: 1.35;
}

.ai-chat-message-content.is-rich h1 {
  font-size: 1.15rem;
}

.ai-chat-message-content.is-rich h3,
.ai-chat-message-content.is-rich h4,
.ai-chat-message-content.is-rich h5,
.ai-chat-message-content.is-rich h6 {
  font-size: 0.9rem;
}

.ai-chat-message-content.is-rich p,
.ai-chat-message-content.is-rich ul,
.ai-chat-message-content.is-rich ol,
.ai-chat-message-content.is-rich blockquote,
.ai-chat-message-content.is-rich pre,
.ai-chat-message-content.is-rich table {
  margin: 0.7rem 0;
}

.ai-chat-message-content.is-rich ul,
.ai-chat-message-content.is-rich ol {
  padding-inline-start: 1.3rem;
}

.ai-chat-message-content.is-rich li + li {
  margin-block-start: 0.22rem;
}

.ai-chat-message-content.is-rich :not(pre) > code {
  padding: 0.08rem 0.28rem;
  border: 1px solid #d8e2df;
  border-radius: 3px;
  background: #f3f7f5;
  color: #285e53;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82em;
}

.ai-chat-message-content.is-rich pre {
  max-width: 100%;
  padding: 0.7rem 0.8rem;
  overflow: auto;
  border: 1px solid #d8e2df;
  border-radius: 5px;
  background: #f5f8f7;
  color: #29443d;
  line-height: 1.5;
  white-space: pre;
}

.ai-chat-message-content.is-rich pre code {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82em;
}

.ai-chat-message-content.is-rich blockquote {
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-inline-start: 3px solid #84b7a9;
  color: #527069;
}

.ai-chat-message-content.is-rich table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d9e3e0;
  border-radius: 5px;
  border-spacing: 0;
  font-size: 0.78rem;
}

.ai-chat-message-content.is-rich th,
.ai-chat-message-content.is-rich td {
  min-width: 6rem;
  padding: 0.38rem 0.5rem;
  border-block-end: 1px solid #e2e9e6;
  overflow-wrap: anywhere;
  text-align: start;
}

.ai-chat-message-content.is-rich th {
  background: #f1f6f4;
  color: #36564d;
  font-weight: 800;
}

.ai-chat-message-content.is-rich tr:last-child td {
  border-block-end: 0;
}

.ai-chat-message-content.is-rich a {
  color: #176b9c;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.ai-chat-message-content.is-rich input[type="checkbox"] {
  margin-inline: 0 0.45rem;
  accent-color: #19715f;
  pointer-events: none;
}

.ai-chat-message-content.is-rich mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.ai-chat-message-content.is-rich mjx-container[display="true"] {
  display: block;
  margin: 0.75rem 0;
  padding-block: 0.1rem;
}

.ai-chat-message.is-assistant .ai-chat-message-content:empty::after {
  display: inline-block;
  width: 0.48rem;
  height: 1rem;
  border-radius: 2px;
  background: #3478b8;
  content: "";
  animation: ai-chat-cursor 0.9s steps(2, jump-none) infinite;
  vertical-align: text-bottom;
}

@keyframes ai-chat-cursor {
  50% { opacity: 0.2; }
}

.ai-chat-message-meta,
.ai-chat-message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-block-start: 0.55rem;
}

.ai-chat-message-meta span {
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: #f0f4f3;
  color: #687974;
  font-size: 0.6rem;
  font-weight: 700;
}

.ai-chat-message-meta span.is-warning {
  background: #fff3d6;
  color: #805b08;
}

.ai-chat-message-actions .icon-btn {
  width: 1.8rem;
  height: 1.8rem;
  min-height: 1.8rem;
  color: #71817d;
  font-size: 0.68rem;
}

.ai-chat-message-actions .icon-btn:hover,
.ai-chat-message-actions .icon-btn.is-active {
  background: #e7f3ef;
  color: #0c6859;
}

.ai-chat-message-error {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  border-inline-start: 3px solid var(--danger);
  background: #fff3f1;
  color: #8e3428;
  font-size: 0.7rem;
}

.ai-chat-composer {
  flex: 0 0 auto;
  margin: 0 max(0.75rem, 4%) 0.8rem;
  border: 1px solid #bdcbc7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(30, 48, 42, 0.1);
}

.ai-chat-composer:focus-within {
  border-color: #478fc3;
  box-shadow: 0 0 0 3px rgba(41, 125, 184, 0.13);
}

.ai-chat-composer > label {
  display: block;
  margin: 0;
}

.ai-chat-composer textarea {
  display: block;
  width: 100%;
  min-height: 3.4rem;
  max-height: 10rem;
  padding: 0.8rem 0.85rem 0.3rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
  outline: 0;
  resize: none;
}

.ai-chat-composer-actions {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.25rem 0.4rem 0.4rem 0.8rem;
}

.ai-chat-composer-actions > span {
  margin-inline-end: auto;
  color: #83918d;
  font-size: 0.6rem;
}

.ai-chat-send {
  border-color: #0d6859;
  background: #0d6859;
  color: #fff;
}

.ai-chat-send:hover {
  background: #084f45;
  color: #fff;
}

.ai-chat-stop {
  border-color: #d3aaa3;
  background: #fff2f0;
  color: #a23e2e;
}

.ai-chat-settings-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.75rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-chat-settings-scroll > label,
.ai-chat-range {
  display: grid;
  gap: 0.32rem;
  margin-block-end: 0.7rem;
  color: #40534e;
  font-size: 0.68rem;
  font-weight: 800;
}

.ai-chat-settings select,
.ai-chat-settings input[type="url"] {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c4d0cd;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
}

.ai-chat-switches {
  display: grid;
  gap: 0;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.ai-chat-switches legend {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-block-end: 1px solid var(--line);
  background: #f3f7f6;
  color: #445650;
  font-size: 0.66rem;
  font-weight: 800;
}

.ai-chat-switches label {
  position: relative;
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr) 2rem;
  min-height: 3.2rem;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  padding: 0.48rem 0.62rem;
  border-block-end: 1px solid #edf1f0;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.ai-chat-switches label:last-child {
  border-block-end: 0;
}

.ai-chat-switch-copy,
.ai-chat-switches strong,
.ai-chat-switches small {
  display: block;
  min-width: 0;
}

.ai-chat-switches strong {
  color: #334641;
  font-size: 0.69rem;
}

.ai-chat-switches small {
  margin-block-start: 0.08rem;
  color: #7a8985;
  font-size: 0.58rem;
}

.ai-chat-switches input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.ai-chat-switch-icon {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid #d4e0dc;
  border-radius: 5px;
  background: #f3f7f6;
  color: #5a7169;
  font-size: 0.62rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.ai-chat-switch-control {
  position: absolute;
  inset-inline-end: 0.62rem;
  width: 2rem;
  height: 1.15rem;
  border: 1px solid #aab8b4;
  border-radius: 1rem;
  background: #dfe6e4;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ai-chat-switch-control::after {
  position: absolute;
  inset-block-start: 0.12rem;
  inset-inline-start: 0.13rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 140ms ease;
}

.ai-chat-switches label:hover {
  background: #f7faf9;
}

.ai-chat-switches input[type="checkbox"]:checked ~ .ai-chat-switch-control {
  border-color: #19715f;
  background: #19715f;
}

.ai-chat-switches input[type="checkbox"]:checked ~ .ai-chat-switch-control::after {
  transform: translateX(0.88rem);
}

.ai-chat-switches input[type="checkbox"]:checked ~ .ai-chat-switch-icon {
  border-color: #9bcdbf;
  background: #e4f3ed;
  color: #11684f;
}

.ai-chat-switches label:has(input[type="checkbox"]:checked) {
  background: #f0f8f5;
}

.ai-chat-switches input[type="checkbox"]:focus-visible ~ .ai-chat-switch-control {
  outline: 3px solid rgba(27, 127, 255, 0.24);
  outline-offset: 2px;
}

.ai-chat-switches input[type="checkbox"]:disabled ~ .ai-chat-switch-icon,
.ai-chat-switches input[type="checkbox"]:disabled ~ .ai-chat-switch-copy,
.ai-chat-switches input[type="checkbox"]:disabled ~ .ai-chat-switch-control {
  opacity: 0.48;
}

.ai-chat-switches label:has(input[type="checkbox"]:disabled) {
  cursor: not-allowed;
}

.ai-chat-range {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ai-chat-range output {
  color: #2b688f;
  font-size: 0.68rem;
}

.ai-chat-range input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #19715f;
}

.ai-chat-inspector {
  margin-block-start: 0.85rem;
  padding-block-start: 0.7rem;
  border-block-start: 1px solid var(--line);
}

.ai-chat-inspector > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.5rem;
}

.ai-chat-inspector > header strong {
  font-size: 0.72rem;
}

.ai-chat-inspector > header span {
  min-width: 1.5rem;
  padding: 0.1rem 0.32rem;
  border-radius: 4px;
  background: #e9eff5;
  color: #32688f;
  font-size: 0.6rem;
  font-weight: 800;
  text-align: center;
}

.ai-chat-inspector ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-chat-inspector ol li {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr);
  gap: 0.42rem;
  align-items: start;
  padding-block: 0.38rem;
}

.ai-chat-inspector ol li > span:first-child {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #e4f2ed;
  color: #11684f;
  font-size: 0.55rem;
}

.ai-chat-inspector ol li.stage-skipped > span:first-child {
  background: #f0f2f2;
  color: #71807c;
}

.ai-chat-inspector ol li.stage-failed > span:first-child {
  background: #fbe7e4;
  color: #a23e2e;
}

.ai-chat-inspector ol strong,
.ai-chat-inspector ol small {
  display: block;
}

.ai-chat-inspector ol strong {
  font-size: 0.64rem;
}

.ai-chat-inspector ol small {
  color: #778681;
  font-size: 0.56rem;
}

.ai-chat-inspector .is-empty {
  color: #7a8985;
  font-size: 0.64rem;
}

.ai-chat-evidence-item {
  padding-block: 0.55rem;
  border-block-end: 1px solid #e4ebe8;
}

.ai-chat-evidence-item header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: start;
}

.ai-chat-evidence-item header span {
  padding: 0.08rem 0.28rem;
  border-radius: 3px;
  background: #e8f0f7;
  color: #2f6893;
  font-size: 0.55rem;
  font-weight: 800;
}

.ai-chat-evidence-item header strong {
  font-size: 0.64rem;
  overflow-wrap: anywhere;
}

.ai-chat-evidence-item p {
  display: -webkit-box;
  margin: 0.35rem 0 0;
  color: #687873;
  font-size: 0.58rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.ai-chat-evidence-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-block-start: 0.35rem;
  font-size: 0.58rem;
  font-weight: 800;
}

.ai-chat-backdrop {
  display: none;
}

@media (max-width: 1240px) {
  .ai-chat-shell {
    grid-template-columns: 13.5rem minmax(24rem, 1fr);
  }

  .ai-chat-settings {
    position: absolute;
    z-index: 13;
    inset: 0 0 0 auto;
    width: min(20rem, calc(100% - 3rem));
    border-inline-start: 1px solid var(--line);
    box-shadow: -14px 0 35px rgba(23, 40, 34, 0.15);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .ai-chat-shell.show-settings .ai-chat-settings {
    transform: translateX(0);
  }

  .ai-chat-mobile-control {
    display: inline-grid;
  }

  .ai-chat-backdrop {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(24, 34, 31, 0.28);
  }
}

@media (max-width: 860px) {
  .ai-chat-shell {
    grid-template-columns: minmax(0, 1fr);
    height: clamp(42rem, calc(100dvh - 10rem), 52rem);
  }

  .ai-chat-history {
    position: absolute;
    z-index: 13;
    inset: 0 auto 0 0;
    width: min(17rem, calc(100% - 3rem));
    border-inline-end: 1px solid var(--line);
    box-shadow: 14px 0 35px rgba(23, 40, 34, 0.15);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .ai-chat-shell.show-history .ai-chat-history {
    transform: translateX(0);
  }

  .ai-chat-message {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .ai-chat-shell {
    height: calc(100dvh - 6rem);
    min-height: 38rem;
    border-inline: 0;
    border-radius: 0;
  }

  .ai-chat-toolbar {
    padding-inline: 0.5rem;
  }

  .ai-chat-toolbar-actions {
    gap: 0.08rem;
  }

  .ai-chat-toolbar-actions > .icon-btn:not(.ai-chat-mobile-control):not([data-chat-export]) {
    display: none;
  }

  .ai-chat-messages {
    padding: 1rem 0.65rem;
  }

  .ai-chat-message {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.5rem;
  }

  .ai-chat-message.is-user {
    grid-template-columns: minmax(0, 1fr) 1.75rem;
    width: 94%;
  }

  .ai-chat-avatar {
    width: 1.75rem;
    height: 1.75rem;
  }

  .ai-chat-message-content {
    font-size: 0.82rem;
  }

  .ai-chat-suggestions {
    grid-template-columns: 1fr;
    width: min(20rem, 100%);
  }

  .ai-chat-composer {
    margin-inline: 0.5rem;
  }
}

/* Governed self-development workspace */
.ai-selfdev {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.ai-selfdev > .metric-grid,
.selfdev-workflow .workflow-band {
  margin-block: 0;
}

.selfdev-engine-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.selfdev-engine-strip > div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem 0.75rem;
  border-inline-end: 1px solid var(--line);
}

.selfdev-engine-strip > div:last-child {
  border-inline-end: 0;
}

.selfdev-engine-strip i {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #0f6b5c;
  border: 1px solid #b9d8d0;
  border-radius: 5px;
  background: #eef8f5;
}

.selfdev-engine-strip span,
.selfdev-engine-strip strong,
.selfdev-engine-strip small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.selfdev-engine-strip strong {
  color: #243d36;
  font-size: 0.75rem;
}

.selfdev-engine-strip small {
  margin-block-start: 0.08rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.selfdev-workflow {
  padding-block-end: 0;
  overflow: hidden;
}

.selfdev-workflow .workflow-band {
  margin-inline: -1rem;
  padding: 0;
  list-style: none;
}

.selfdev-workflow .workflow-band > li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.08rem 0.5rem;
  min-width: 0;
  padding: 0.72rem;
  border-inline-end: 1px solid var(--line);
}

.selfdev-workflow .workflow-band > li:last-child {
  border-inline-end: 0;
}

.selfdev-workflow .workflow-band > li > div {
  display: grid;
  align-content: center;
  gap: 0.08rem;
  min-width: 0;
}

.selfdev-workflow .workflow-band strong,
.selfdev-workflow .workflow-band small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.selfdev-workflow .workflow-band strong {
  align-self: center;
  font-size: 0.76rem;
}

.selfdev-workflow .workflow-band small {
  grid-column: auto;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.selfdev-composer > header {
  grid-column: 1 / -1;
}

.selfdev-composer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.selfdev-composer .span-2 {
  grid-column: 1 / -1;
}

.selfdev-composer > label {
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.selfdev-composer > label small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.4;
}

.selfdev-composer [data-selfdev-readiness] {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  max-width: 18rem;
  padding: 0.28rem 0.52rem;
  border-inline-start: 3px solid #b58a28;
  background: #fbf8eb;
  color: #75580e;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selfdev-composer [data-selfdev-readiness][data-state="ready"] {
  border-inline-start-color: #16803d;
  background: #edf8f3;
  color: #116b4d;
}

.selfdev-composer [data-selfdev-readiness][data-state="blocked"] {
  border-inline-start-color: #b84735;
  background: #fcf1ef;
  color: #973a2c;
}

.segmented-control.selfdev-mode-control {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selfdev-mode-control span {
  grid-template-columns: 1.2rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  place-items: start;
  gap: 0.08rem 0.4rem;
  min-height: 3.7rem;
  text-align: start;
}

.selfdev-mode-control i {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--blue);
}

.selfdev-mode-control b,
.selfdev-mode-control small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.selfdev-mode-control b {
  font-size: 0.75rem;
}

.selfdev-mode-control small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}

.selfdev-toolset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.selfdev-toolset legend {
  margin-block-end: 0.35rem;
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.selfdev-toolset > p {
  margin: -0.18rem 0 0.42rem;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.selfdev-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.selfdev-tool-choice {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 0;
}

.selfdev-tool-choice input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.selfdev-tool-choice span {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.08rem 0.38rem;
  min-height: 4rem;
  padding: 0.55rem;
  background: #fff;
  cursor: pointer;
}

.selfdev-tool-choice i {
  grid-row: 1 / span 2;
  margin-block-start: 0.1rem;
  color: #536b79;
}

.selfdev-tool-choice b,
.selfdev-tool-choice small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.selfdev-tool-choice b {
  font-size: 0.71rem;
}

.selfdev-tool-choice small {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 600;
  line-height: 1.3;
}

.selfdev-tool-choice input:checked + span {
  background: #edf6f4;
  box-shadow: inset 0 -3px 0 var(--brand);
}

.selfdev-tool-choice input:focus-visible + span {
  outline: 3px solid rgba(23, 105, 210, 0.35);
  outline-offset: -3px;
}

.selfdev-budget {
  border-block: 1px solid var(--line);
  background: #fafcfc;
}

.selfdev-budget > summary,
.selfdev-diff > summary {
  padding: 0.6rem 0.7rem;
  color: #314a52;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.selfdev-budget > .form-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 0.7rem 0.7rem;
}

.selfdev-readiness-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.selfdev-readiness-list article {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) auto;
  gap: 0.48rem;
  align-items: start;
  min-width: 0;
  padding: 0.62rem;
  background: #fff;
}

.selfdev-readiness-list article > i {
  margin-block-start: 0.12rem;
  color: #657b76;
}

.selfdev-readiness-list article[data-status="pass"] > i {
  color: #16803d;
}

.selfdev-readiness-list article[data-status="fail"] > i,
.selfdev-readiness-list article[data-status="protected"] > i {
  color: #b84735;
}

.selfdev-readiness-list strong {
  display: block;
  color: #27444c;
  font-size: 0.73rem;
}

.selfdev-readiness-list p {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.selfdev-capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.selfdev-capability-list article {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  min-width: 0;
  padding: 0.65rem;
  border-block-end: 1px solid var(--line);
}

.selfdev-capability-list article:nth-child(odd) {
  border-inline-end: 1px solid var(--line);
}

.selfdev-capability-list article:nth-last-child(-n + 2) {
  border-block-end: 0;
}

.selfdev-capability-list article > div:last-child {
  display: grid;
  justify-items: end;
  gap: 0.28rem;
}

.selfdev-capability-list strong {
  font-size: 0.76rem;
}

.selfdev-capability-list p {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.42;
}

.selfdev-capability-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #c6d8e5;
  background: #eef5fa;
  color: var(--blue);
}

.selfdev-risk {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.18rem 0.42rem;
  border: 1px solid #cad6d3;
  border-radius: 999px;
  background: #f7faf9;
  color: #52635f;
  font-size: 0.64rem;
  font-weight: 850;
  white-space: nowrap;
}

.selfdev-risk-r0,
.selfdev-risk-r1 {
  border-color: #b9dacf;
  background: #edf8f3;
  color: #116b4d;
}

.selfdev-risk-r2 {
  border-color: #c6d8e5;
  background: #eef5fa;
  color: #245d86;
}

.selfdev-risk-r3 {
  border-color: #ddd4b8;
  background: #fbf8eb;
  color: #80600e;
}

.selfdev-risk-r4 {
  border-color: #e4c6c0;
  background: #fcf1ef;
  color: #a23e2e;
}

.ai-selfdev .status-queued,
.ai-selfdev .status-planning,
.ai-selfdev .status-building,
.ai-selfdev .status-verifying,
.ai-selfdev .status-packaging {
  border-color: #c6d8e5;
  background: #eef5fa;
  color: #245d86;
}

.ai-selfdev .status-waiting_plan_approval,
.ai-selfdev .status-waiting_release_approval,
.ai-selfdev .status-approval {
  border-color: #ddd4b8;
  background: #fbf8eb;
  color: #80600e;
}

.ai-selfdev .status-release_approved,
.ai-selfdev .status-release_ready,
.ai-selfdev .status-succeeded,
.ai-selfdev .status-pass {
  border-color: #b9dacf;
  background: #edf8f3;
  color: #116b4d;
}

.ai-selfdev .status-failed,
.ai-selfdev .status-cancelled,
.ai-selfdev .status-policy_denied,
.ai-selfdev .status-budget_exceeded,
.ai-selfdev .status-fail,
.ai-selfdev .status-protected {
  border-color: #e4c6c0;
  background: #fcf1ef;
  color: #a23e2e;
}

.ai-selfdev .status-not_run {
  border-color: #cad6d3;
  background: #f7faf9;
  color: #52635f;
}

.selfdev-detail {
  display: grid;
  gap: 0.9rem;
}

.selfdev-detail > header,
.selfdev-plan > header,
.selfdev-candidate > header,
.selfdev-tests > header,
.selfdev-release > header,
.selfdev-timeline > header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0;
}

.selfdev-intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 0.7fr);
  border-block: 1px solid var(--line);
}

.selfdev-intake-grid > article,
.selfdev-intake-grid > aside {
  min-width: 0;
  padding: 0.75rem;
}

.selfdev-intake-grid > article {
  border-inline-end: 1px solid var(--line);
}

.selfdev-intake-grid h3,
.selfdev-intake-grid h4,
.selfdev-plan h3,
.selfdev-plan h4,
.selfdev-candidate h3,
.selfdev-tests h3,
.selfdev-timeline h3 {
  margin: 0;
  color: #27444c;
  font-size: 0.82rem;
}

.selfdev-intake-grid h4,
.selfdev-plan h4 {
  margin-block-start: 0.65rem;
  font-size: 0.72rem;
}

.selfdev-intake-grid p,
.selfdev-intake-grid li,
.selfdev-intake-grid dd {
  color: #48605f;
  font-size: 0.72rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.selfdev-intake-grid ul,
.selfdev-intake-grid dl {
  margin: 0.35rem 0 0;
}

.selfdev-intake-grid dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.55rem;
}

.selfdev-intake-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.selfdev-intake-grid dd {
  margin: 0;
  text-align: end;
}

.selfdev-plan,
.selfdev-candidate,
.selfdev-tests,
.selfdev-release,
.selfdev-timeline,
.selfdev-approval-form,
.selfdev-cancel {
  min-width: 0;
  padding-block-start: 0.8rem;
  border-block-start: 1px solid var(--line);
}

.selfdev-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.selfdev-steps {
  display: grid;
  gap: 0;
  margin: 0.7rem 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.selfdev-plan-evidence {
  margin-block: 0.7rem;
  border-block: 1px solid var(--line);
  background: #f8faf9;
}

.selfdev-plan-evidence summary {
  padding: 0.55rem 0.65rem;
  color: #27444c;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.selfdev-plan-evidence summary i {
  margin-inline-end: 0.35rem;
  color: var(--blue);
}

.selfdev-plan-evidence ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--line);
  list-style: none;
}

.selfdev-plan-evidence li {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.selfdev-plan-evidence li:nth-child(2n) {
  border-inline-end: 0;
}

.selfdev-plan-evidence li:nth-last-child(-n + 2) {
  border-block-end: 0;
}

.selfdev-plan-evidence a {
  color: #1769a1;
  font-size: 0.69rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.selfdev-plan-evidence .selfdev-evidence-gaps {
  border-block-start: 1px solid #e4c6c0;
  background: #fcf1ef;
}

.selfdev-plan-evidence .selfdev-evidence-gaps code {
  color: #963c2e;
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}

.selfdev-plan-evidence span,
.selfdev-plan-evidence small,
.selfdev-plan-evidence > p {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.selfdev-plan-evidence > p {
  margin: 0;
  padding: 0.48rem 0.6rem;
  border-block-start: 1px solid var(--line);
}

.selfdev-engine-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.selfdev-engine-facts > span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-inline-end: 1px solid var(--line);
}

.selfdev-engine-facts > span:last-child {
  border-inline-end: 0;
}

.selfdev-engine-facts b {
  color: #415d56;
  font-size: 0.62rem;
}

.selfdev-engine-facts strong,
.selfdev-engine-facts code {
  color: #27444c;
  font-size: 0.67rem;
  overflow-wrap: anywhere;
}

.selfdev-steps li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem;
  border-block-end: 1px solid var(--line);
}

.selfdev-steps li:last-child {
  border-block-end: 0;
}

.selfdev-steps strong {
  font-size: 0.74rem;
}

.selfdev-steps p {
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.selfdev-path-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.selfdev-path-list code,
.hash-pair code,
.status-cluster code {
  padding: 0.12rem 0.28rem;
  background: #f1f5f4;
  color: #365752;
  font-size: 0.65rem;
  overflow-wrap: anywhere;
}

.hash-pair {
  display: grid;
  gap: 0.16rem;
}

.selfdev-diff {
  margin-block-start: 0.65rem;
  border-block: 1px solid var(--line);
  background: #f8faf9;
}

.selfdev-diff summary i {
  margin-inline-end: 0.4rem;
}

.selfdev-diff pre {
  max-height: 32rem;
  margin: 0;
  padding: 0.7rem;
  border-block-start: 1px solid var(--line);
  background: #172321;
  color: #e8f1ef;
  font-size: 0.68rem;
  line-height: 1.5;
  overflow: auto;
}

.selfdev-release-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 0.65rem;
  border: 1px solid var(--line);
}

.selfdev-release-facts > div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.6rem;
  border-inline-end: 1px solid var(--line);
}

.selfdev-release-facts > div:last-child {
  border-inline-end: 0;
}

.selfdev-release-facts span {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 750;
}

.selfdev-release-facts code,
.selfdev-release-facts strong {
  min-width: 0;
  color: #31524e;
  font-size: 0.69rem;
  overflow-wrap: anywhere;
}

.selfdev-approval-form {
  padding: 0.8rem 0 0;
}

.selfdev-approval-form > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.6rem;
}

.selfdev-approval-form .toggle-field.is-optional {
  opacity: 0.62;
}

.selfdev-approval-form[data-review-decision="rejected"] .toggle-field.is-optional {
  background: #f7f9f8;
}

.selfdev-timeline ol {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.selfdev-timeline li {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  padding: 0.45rem 0;
  border-block-end: 1px solid var(--line);
}

.selfdev-timeline li:last-child {
  border-block-end: 0;
}

.selfdev-timeline strong,
.selfdev-timeline small {
  display: block;
  overflow-wrap: anywhere;
}

.selfdev-timeline strong {
  font-size: 0.72rem;
}

.selfdev-timeline small,
.selfdev-timeline time {
  color: var(--muted);
  font-size: 0.64rem;
}

.selfdev-event-marker {
  width: 0.62rem;
  height: 0.62rem;
  border: 2px solid #8aa09a;
  border-radius: 50%;
  background: #fff;
}

.selfdev-event-marker[data-status="succeeded"],
.selfdev-event-marker[data-status="approved"] {
  border-color: #16803d;
  background: #bde5cf;
}

.selfdev-event-marker[data-status="failed"],
.selfdev-event-marker[data-status="rejected"] {
  border-color: #b84735;
  background: #f1c8c0;
}

.selfdev-cancel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.selfdev-handbook .selfdev-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.selfdev-guide-grid > details {
  min-width: 0;
  padding: 0.7rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.selfdev-guide-grid > details:nth-child(3n) {
  border-inline-end: 0;
}

.selfdev-guide-grid > details:nth-last-child(-n + 3) {
  border-block-end: 0;
}

.selfdev-guide-grid summary {
  color: #27444c;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.selfdev-guide-grid summary i {
  width: 1.1rem;
  margin-inline-end: 0.25rem;
  color: var(--blue);
}

.selfdev-guide-grid p,
.selfdev-guide-grid li {
  color: #48605f;
  font-size: 0.69rem;
  line-height: 1.48;
}

.selfdev-evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0.6rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.selfdev-evidence-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.48rem 0.55rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.selfdev-evidence-list li:nth-child(2n) {
  border-inline-end: 0;
}

.selfdev-evidence-list li:nth-last-child(-n + 2) {
  border-block-end: 0;
}

.selfdev-evidence-list a {
  color: #1769a1;
  font-size: 0.69rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.selfdev-evidence-list li > small {
  grid-column: 1 / -1;
}

.selfdev-evidence-list li > div > small {
  display: block;
  margin-block-start: 0.08rem;
}

.selfdev-evidence-list small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.selfdev-schema-gate {
  border-inline-start: 4px solid var(--gold);
}

@media (max-width: 1100px) {
  .selfdev-tool-grid,
  .selfdev-budget > .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .selfdev-engine-strip {
    grid-template-columns: 1fr 1fr;
  }

  .selfdev-engine-strip > div:nth-child(2) {
    border-inline-end: 0;
  }

  .selfdev-engine-strip > div:last-child {
    grid-column: 1 / -1;
    border-block-start: 1px solid var(--line);
  }

  .selfdev-workflow .workflow-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selfdev-workflow .workflow-band > li {
    border-block-end: 1px solid var(--line);
  }

  .selfdev-workflow .workflow-band > li:nth-child(2n) {
    border-inline-end: 0;
  }

  .segmented-control.selfdev-mode-control,
  .selfdev-readiness-list,
  .selfdev-capability-list,
  .selfdev-plan-grid,
  .selfdev-handbook .selfdev-guide-grid {
    grid-template-columns: 1fr 1fr;
  }

  .selfdev-release-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selfdev-release-facts > div:nth-child(2n) {
    border-inline-end: 0;
  }

  .selfdev-release-facts > div:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }

  .selfdev-capability-list article:nth-child(odd) {
    border-inline-end: 1px solid var(--line);
  }

  .selfdev-capability-list article:nth-last-child(-n + 2) {
    border-block-end: 0;
  }

  .selfdev-guide-grid > details {
    border-block-end: 1px solid var(--line);
  }

  .selfdev-guide-grid > details:nth-child(3n) {
    border-inline-end: 1px solid var(--line);
  }

  .selfdev-guide-grid > details:nth-child(2n) {
    border-inline-end: 0;
  }

  .selfdev-guide-grid > details:nth-last-child(-n + 2) {
    border-block-end: 0;
  }
}

@media (max-width: 620px) {
  .selfdev-engine-strip {
    grid-template-columns: 1fr;
  }

  .selfdev-engine-strip > div,
  .selfdev-engine-strip > div:nth-child(2),
  .selfdev-engine-strip > div:last-child {
    grid-column: auto;
    border-inline-end: 0;
    border-block-start: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-engine-strip > div:last-child {
    border-block-end: 0;
  }

  .selfdev-detail > header,
  .selfdev-plan > header,
  .selfdev-candidate > header,
  .selfdev-tests > header,
  .selfdev-release > header,
  .selfdev-timeline > header,
  .selfdev-approval-form > header {
    display: grid;
  }

  .selfdev-composer [data-selfdev-readiness] {
    max-width: none;
  }

  .segmented-control.selfdev-mode-control,
  .selfdev-composer,
  .selfdev-readiness-list,
  .selfdev-tool-grid,
  .selfdev-budget > .form-grid,
  .selfdev-capability-list,
  .selfdev-plan-grid,
  .selfdev-intake-grid,
  .selfdev-handbook .selfdev-guide-grid,
  .selfdev-evidence-list,
  .selfdev-plan-evidence ul {
    grid-template-columns: 1fr;
  }

  .selfdev-engine-facts {
    grid-template-columns: 1fr;
  }

  .selfdev-engine-facts > span,
  .selfdev-engine-facts > span:last-child {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-engine-facts > span:last-child {
    border-block-end: 0;
  }

  .selfdev-release-facts {
    grid-template-columns: 1fr;
  }

  .selfdev-release-facts > div,
  .selfdev-release-facts > div:nth-child(2n),
  .selfdev-release-facts > div:nth-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-release-facts > div:last-child {
    border-block-end: 0;
  }

  .selfdev-mode-control label + label,
  .selfdev-capability-list article,
  .selfdev-capability-list article:nth-child(odd),
  .selfdev-guide-grid > details,
  .selfdev-guide-grid > details:nth-child(2n),
  .selfdev-guide-grid > details:nth-child(3n) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-mode-control label + label {
    border-inline-start: 0;
  }

  .selfdev-capability-list article:last-child,
  .selfdev-guide-grid > details:last-child {
    border-block-end: 0;
  }

  .selfdev-evidence-list li,
  .selfdev-evidence-list li:nth-child(2n),
  .selfdev-evidence-list li:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-evidence-list li:last-child {
    border-block-end: 0;
  }

  .selfdev-plan-evidence li,
  .selfdev-plan-evidence li:nth-child(2n),
  .selfdev-plan-evidence li:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-plan-evidence li:last-child {
    border-block-end: 0;
  }

  .selfdev-intake-grid > article {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .selfdev-steps li {
    grid-template-columns: 1.8rem minmax(0, 1fr);
  }

  .selfdev-steps .selfdev-risk {
    grid-column: 2;
    justify-self: start;
  }

  .selfdev-timeline li {
    grid-template-columns: 0.8rem minmax(0, 1fr);
  }

  .selfdev-timeline time {
    grid-column: 2;
  }

  .selfdev-cancel {
    grid-template-columns: 1fr;
  }
}

/* AI Studio operational workspace */
.ai-studio {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.ai-studio > .metric-grid {
  margin-block: 0;
}

.studio-workflow .workflow-band {
  margin-block-end: 0;
  padding: 0;
  list-style: none;
}

.studio-workflow .workflow-band > li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.08rem 0.5rem;
  min-width: 0;
  padding: 0.72rem;
  border-inline-end: 1px solid var(--line);
}

.studio-workflow .workflow-band > li:last-child {
  border-inline-end: 0;
}

.studio-workflow .workflow-band > li:nth-child(2) .workflow-step {
  border-color: #a8bfd4;
  background: #edf4fa;
  color: #2e648f;
}

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

.studio-template {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 0.8rem;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
  min-height: 5rem;
  padding: 0.68rem;
  border: 1px solid #d5dfdc;
  border-radius: 6px;
  background: #fbfcfc;
  color: #344a44;
  text-align: start;
}

.studio-template:hover {
  border-color: #93b6ad;
  background: #f3f8f6;
}

.studio-template:focus-visible {
  outline: 3px solid rgba(23, 105, 210, 0.28);
  outline-offset: 2px;
}

.studio-template[aria-pressed="true"] {
  border-color: #4f9787;
  background: #eaf5f1;
  box-shadow: inset 3px 0 #19715f;
}

.studio-template > i:first-child {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  background: #e5eef7;
  color: #2c6895;
}

.studio-template:nth-child(3n + 2) > i:first-child {
  background: #e6f2ed;
  color: #247463;
}

.studio-template:nth-child(3n) > i:first-child {
  background: #f8eed5;
  color: #8b6712;
}

.studio-template > i:last-child {
  color: #8a9a96;
  font-size: 0.68rem;
}

.studio-template span,
.studio-template strong,
.studio-template small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.studio-template strong {
  color: #2b403a;
  font-size: 0.77rem;
}

.studio-template small {
  margin-block-start: 0.18rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.38;
}

.studio-composer {
  display: grid;
  gap: 0;
}

.studio-composer > header {
  align-items: center;
  padding-block-end: 0.85rem;
  border-block-end: 1px solid var(--line);
}

.studio-form-state {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 22rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid #cddbd7;
  border-radius: 5px;
  background: #f7faf9;
  color: #536761;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.35;
}

.studio-form-state[data-state="ready"] {
  border-color: #9bc9ba;
  background: #ebf7f2;
  color: #126a58;
}

.studio-form-state[data-state="blocked"] {
  border-color: #e1b9b1;
  background: #fff2ef;
  color: #9b3d2f;
}

.studio-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 21rem);
  min-width: 0;
}

.studio-composer-main {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.15rem 1rem 0 0;
}

.studio-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.studio-field-grid label,
.studio-query-field {
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.studio-field-grid label > small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.35;
}

.studio-mode-control span {
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.05rem 0.5rem;
  align-content: center;
  justify-items: start;
  text-align: start;
}

.studio-mode-control span > i {
  grid-row: 1 / span 2;
  align-self: center;
  color: #50706a;
}

.studio-mode-control span > b,
.studio-mode-control span > small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.studio-mode-control span > b {
  font-size: 0.75rem;
}

.studio-mode-control span > small {
  color: #6c7d79;
  font-size: 0.63rem;
  font-weight: 600;
}

.studio-query-field textarea {
  min-height: 14rem;
  padding: 0.75rem;
  border-radius: 5px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.studio-query-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-block-start: -0.55rem;
}

.studio-query-tools output {
  color: #657873;
  font-size: 0.68rem;
  font-weight: 700;
}

.studio-privacy-note {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.65rem;
  border-inline-start: 3px solid #c49a34;
  background: #fff9ec;
  color: #655329;
}

.studio-privacy-note > i {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 5px;
  background: #f5e6bd;
  color: #84610c;
}

.studio-privacy-note p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.48;
}

.studio-form-actions {
  justify-content: space-between;
  padding-block-start: 0;
}

.studio-form-actions .btn-primary:disabled {
  border-color: #cbd4d2;
  background: #dfe5e3;
  color: #71817d;
  cursor: not-allowed;
}

.studio-inspector {
  min-width: 0;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--line);
}

.studio-inspector > header h3,
.studio-inspector > header p {
  margin: 0;
}

.studio-inspector > header h3 {
  font-size: 0.88rem;
}

.studio-inspector > header p {
  margin-block-start: 0.18rem;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.studio-pipeline-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.75rem 0;
  border-block: 1px solid var(--line);
}

.studio-pipeline-facts > div {
  min-width: 0;
  padding: 0.55rem 0.35rem;
  border-block-end: 1px solid #edf1f0;
}

.studio-pipeline-facts > div:nth-child(odd) {
  border-inline-end: 1px solid #edf1f0;
}

.studio-pipeline-facts > div:nth-last-child(-n + 2) {
  border-block-end: 0;
}

.studio-pipeline-facts dt,
.studio-pipeline-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.studio-pipeline-facts dt {
  color: #74837f;
  font-size: 0.61rem;
  font-weight: 750;
  text-transform: uppercase;
}

.studio-pipeline-facts dd {
  margin-block-start: 0.15rem;
  color: #2d443e;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.35;
}

.studio-preflight-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.studio-preflight-list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  padding: 0.55rem 0;
  border-block-end: 1px solid #edf1f0;
}

.studio-preflight-list li:last-child {
  border-block-end: 0;
}

.studio-preflight-list li > i {
  margin-block-start: 0.13rem;
  color: #9aa8a4;
  font-size: 0.75rem;
}

.studio-preflight-list li[data-state="ready"] > i {
  color: #218065;
}

.studio-preflight-list li[data-state="warning"] > i {
  color: #a97810;
}

.studio-preflight-list li[data-state="blocked"] > i {
  color: #ae4637;
}

.studio-preflight-list strong,
.studio-preflight-list small {
  display: block;
  overflow-wrap: anywhere;
}

.studio-preflight-list strong {
  color: #344b45;
  font-size: 0.7rem;
}

.studio-preflight-list small {
  margin-block-start: 0.12rem;
  color: #6c7d78;
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.4;
}

.studio-inspector-footnote {
  margin: 0.65rem 0 0;
  padding-block-start: 0.6rem;
  border-block-start: 1px solid var(--line);
  color: #6a7b76;
  font-size: 0.62rem;
  line-height: 1.42;
}

.studio-readiness-cell {
  display: grid;
  gap: 0.25rem;
  min-width: 12rem;
}

.studio-readiness-cell > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.studio-readiness-cell progress {
  width: 100%;
  height: 0.38rem;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  accent-color: #247a68;
}

.studio-readiness-cell progress::-webkit-progress-bar {
  background: #e6ecea;
}

.studio-readiness-cell progress::-webkit-progress-value {
  background: #247a68;
}

.studio-readiness-cell small {
  max-width: 24rem;
  color: #687974;
  font-size: 0.63rem;
  line-height: 1.35;
  white-space: normal;
}

.studio-handbook .studio-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.studio-handbook details {
  min-width: 0;
  border-block-end: 1px solid var(--line);
}

.studio-handbook details:nth-child(odd) {
  border-inline-end: 1px solid var(--line);
}

.studio-handbook summary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.68rem;
  color: #304b44;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.studio-handbook summary > i {
  width: 1rem;
  color: #317564;
  text-align: center;
}

.studio-handbook details > div {
  padding: 0 0.8rem 0.8rem 2.2rem;
  color: #4e625d;
  font-size: 0.7rem;
  line-height: 1.5;
}

.studio-handbook details p {
  margin: 0 0 0.45rem;
}

.studio-handbook details ul {
  margin: 0;
  padding-inline-start: 1.05rem;
}

.studio-handbook details li + li {
  margin-block-start: 0.3rem;
}

.run-result-heading,
.run-evidence > header,
.run-stage-log > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
}

.run-result-heading {
  margin-block-end: 0.55rem;
}

.run-result-heading h3,
.run-result-heading p,
.run-evidence > header h3,
.run-evidence > header p,
.run-stage-log > header h3,
.run-stage-log > header p {
  margin: 0;
}

.run-result-heading p,
.run-evidence > header p,
.run-stage-log > header p {
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.run-result .rag-answer.ai-chat-message-content {
  font-size: 0.82rem;
}

.run-failure {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.75rem;
  border-inline-start: 3px solid #b64e3d;
  background: #fff2ef;
  color: #80392f;
}

.run-failure > i {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 5px;
  background: #f5d9d3;
}

.run-failure p {
  margin: 0.18rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.run-evidence,
.run-stage-log {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding-block-start: 0.85rem;
  border-block-start: 1px solid var(--line);
}

.run-stage-log > .table-wrap {
  margin: 0;
}

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

  .studio-composer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-composer-main {
    padding-inline-end: 0;
  }

  .studio-inspector {
    margin-block-start: 0.85rem;
    padding: 0.85rem 0 0;
    border-block-start: 1px solid var(--line);
    border-inline-start: 0;
  }

  .studio-pipeline-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .studio-pipeline-facts > div,
  .studio-pipeline-facts > div:nth-child(odd),
  .studio-pipeline-facts > div:nth-last-child(-n + 2) {
    border-inline-end: 1px solid #edf1f0;
    border-block-end: 1px solid #edf1f0;
  }

  .studio-pipeline-facts > div:nth-child(3n) {
    border-inline-end: 0;
  }

  .studio-pipeline-facts > div:nth-last-child(-n + 3) {
    border-block-end: 0;
  }

  .studio-preflight-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-preflight-list li:nth-child(odd) {
    padding-inline-end: 0.75rem;
    border-inline-end: 1px solid #edf1f0;
  }

  .studio-preflight-list li:nth-last-child(-n + 2) {
    border-block-end: 0;
  }
}

@media (max-width: 760px) {
  .studio-workflow .workflow-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-workflow .workflow-band > li {
    border-block-end: 1px solid var(--line);
  }

  .studio-workflow .workflow-band > li:nth-child(2n) {
    border-inline-end: 0;
  }

  .studio-workflow .workflow-band > li:last-child {
    grid-column: 1 / -1;
    border-block-end: 0;
  }

  .studio-handbook .studio-guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-handbook details:nth-child(odd) {
    border-inline-end: 0;
  }
}

@media (max-width: 620px) {
  .studio-template-grid,
  .studio-field-grid,
  .studio-pipeline-facts,
  .studio-preflight-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-composer > header,
  .run-result-heading,
  .run-evidence > header,
  .run-stage-log > header {
    align-items: stretch;
    flex-direction: column;
  }

  .studio-form-state {
    max-width: none;
  }

  .studio-mode-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-mode-control label + label {
    border-block-start: 1px solid #c8d4d1;
    border-inline-start: 0;
  }

  .studio-query-field textarea {
    min-height: 16rem;
  }

  .studio-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-form-actions .btn {
    width: 100%;
  }

  .studio-pipeline-facts > div,
  .studio-pipeline-facts > div:nth-child(odd),
  .studio-pipeline-facts > div:nth-child(3n),
  .studio-pipeline-facts > div:nth-last-child(-n + 3) {
    border-inline-end: 0;
    border-block-end: 1px solid #edf1f0;
  }

  .studio-pipeline-facts > div:last-child,
  .studio-preflight-list li:nth-child(odd),
  .studio-preflight-list li:nth-last-child(-n + 2) {
    padding-inline-end: 0;
    border-inline-end: 0;
    border-block-end: 1px solid #edf1f0;
  }

  .studio-preflight-list li:last-child {
    border-block-end: 0;
  }

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

  .run-metrics span:nth-child(2) {
    border-inline-end: 0;
  }

  .run-metrics span:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

.queue-workspace {
  align-items: start;
}

.queue-posture,
.queue-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 0.72rem;
  border: 1px solid var(--line);
  background: #f9fbfa;
}

.queue-posture > div,
.queue-facts > span {
  display: grid;
  align-content: start;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.58rem 0.7rem;
  border-inline-end: 1px solid var(--line);
}

.queue-posture > div:last-child,
.queue-facts > span:last-child {
  border-inline-end: 0;
}

.queue-posture span,
.queue-facts strong {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.queue-posture strong,
.queue-facts b {
  color: #244653;
  font-size: 1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.queue-posture small {
  color: var(--muted);
  font-size: 0.65rem;
  overflow-wrap: anywhere;
}

.queue-guide details {
  margin-top: 0.68rem;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.queue-guide summary {
  padding: 0.58rem 0.72rem;
  color: #244653;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
}

.queue-guide-list {
  display: grid;
  gap: 0.44rem;
  margin: 0;
  padding: 0.7rem 0.95rem 0.8rem 1.9rem;
  border-block-start: 1px solid var(--line);
  color: #47616a;
  font-size: 0.72rem;
  line-height: 1.48;
}

.queue-client-status {
  min-height: 1.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.queue-client-status[data-status="ready"] {
  color: #16803d;
}

.queue-client-status[data-status="blocked"] {
  color: #a34a32;
}

.queue-overdue {
  color: #b74b31;
  font-size: 0.7rem;
}

.queue-job-detail {
  margin-top: 0.72rem;
}

.queue-job-detail > .form-grid {
  margin-top: 0.72rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.queue-detail-grid {
  align-items: start;
  margin-top: 0.72rem;
}

.queue-detail-grid > .surface {
  min-width: 0;
}

.queue-event-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.queue-event-list li {
  display: grid;
  grid-template-columns: minmax(7.6rem, 0.8fr) minmax(0, 1.2fr);
  gap: 0.56rem;
  padding: 0.55rem 0.65rem;
  border-block-end: 1px solid var(--line);
}

.queue-event-list li:last-child {
  border-block-end: 0;
}

.queue-event-list time,
.queue-event-list small {
  color: var(--muted);
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}

.queue-event-list strong {
  display: block;
  color: #244653;
  font-size: 0.72rem;
  text-transform: capitalize;
}

.queue-dead-letter-actions {
  display: grid;
  gap: 0.42rem;
  min-width: 15rem;
}

.queue-dead-letter-actions form {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) 2rem;
  gap: 0.36rem;
  align-items: center;
}

.queue-dead-letter-actions textarea {
  min-height: 2.55rem;
  resize: vertical;
  font-size: 0.68rem;
}

@media (max-width: 1050px) {
  .queue-posture,
  .queue-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-posture > div:nth-child(2n),
  .queue-facts > span:nth-child(2n) {
    border-inline-end: 0;
  }

  .queue-posture > div:nth-child(-n + 2),
  .queue-facts > span:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .queue-posture,
  .queue-facts {
    grid-template-columns: 1fr;
  }

  .queue-posture > div,
  .queue-posture > div:nth-child(2n),
  .queue-posture > div:nth-child(-n + 2),
  .queue-facts > span,
  .queue-facts > span:nth-child(2n),
  .queue-facts > span:nth-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .queue-posture > div:last-child,
  .queue-facts > span:last-child {
    border-block-end: 0;
  }

  .queue-event-list li {
    grid-template-columns: 1fr;
    gap: 0.16rem;
  }

  .queue-dead-letter-actions {
    min-width: 12.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-chat-settings,
  .ai-chat-history,
  .ai-chat-switches label,
  .ai-chat-switch-icon,
  .ai-chat-switch-control,
  .ai-chat-switch-control::after {
    transition: none;
  }

  .ai-chat-message.is-assistant .ai-chat-message-content:empty::after {
    animation: none;
  }
}

@media print {
  .ai-chat-history,
  .ai-chat-settings,
  .ai-chat-toolbar-actions,
  .ai-chat-composer,
  .ai-chat-status {
    display: none !important;
  }

  .ai-chat-shell {
    display: block;
    height: auto;
    min-height: 0;
    border: 0;
    box-shadow: none;
  }

  .ai-chat-messages {
    overflow: visible;
  }
}

/* Teacher profession and editorial experience */
.content-container,
.guide-page > .breadcrumbs,
.guide-page > .guide-hero,
.guide-page > .guide-section,
.guide-page > .source-panel,
.guide-page > .subhero,
.guide-page > .feature-catalog,
.guide-page > .audience-workflows,
.guide-page > .security-controls,
.guide-page > .contact-paths,
.guide-page > .contact-support,
.guide-page > .content-cta {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-main > .hero-professional {
  min-height: 0;
  height: clamp(480px, calc(100svh - 150px), 700px);
  max-height: 700px;
  background: #173d36;
}

.hero-professional::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 0;
  width: 52%;
  background: #12352f;
  content: "";
}

.hero-background,
.hero-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-background {
  z-index: -2;
  object-fit: cover;
  object-position: center;
  transform: translateX(8vw);
}

.hero-tint {
  z-index: -1;
  background: rgba(14, 36, 32, 0.78);
}

.hero-professional .hero-copy {
  width: min(42rem, 72%);
}

.hero-professional h1,
.hero-professional .hero-lead {
  color: #fff;
}

.hero-professional h1 {
  font-size: 4.75rem;
}

.hero-professional .hero-lead {
  color: #e6efec;
}

.hero-professional .eyebrow {
  color: #f4c56b;
}

.btn-hero-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(17, 42, 37, 0.62);
  color: #fff;
}

.btn-hero-secondary:hover {
  border-color: #fff;
  background: #fff;
  color: #173d36;
}

.hero-context {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  margin: 1.5rem 0 0;
  color: #d5e5e0;
  font-size: 0.82rem;
  font-weight: 750;
}

.hero-context span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-context span::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #f4c56b;
  content: "";
}

.task-entry-band {
  padding: 2.25rem 0 2.75rem;
  border-block-end: 1px solid var(--line);
  background: #fff;
}

.section-heading {
  max-width: 45rem;
}

.section-heading.compact {
  margin-block-end: 1.2rem;
}

.section-heading h2,
.guide-section h2,
.content-band h2,
.content-cta h2,
.contact-support h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.18;
}

.section-heading p:not(.eyebrow),
.content-band p,
.content-cta p,
.contact-support p {
  color: var(--muted);
}

.task-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.task-entry {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) 1rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 5.4rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.task-entry:hover {
  border-color: #a9c5be;
  background: #f7faf9;
}

.task-entry > i:first-child {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 6px;
  background: #dff1ed;
  color: var(--brand-strong);
}

.task-entry:nth-child(2) > i:first-child,
.task-entry:nth-child(5) > i:first-child {
  background: #e7f0fb;
  color: #245f9d;
}

.task-entry:nth-child(3) > i:first-child,
.task-entry:nth-child(6) > i:first-child {
  background: #f8eed6;
  color: #835a0e;
}

.task-entry span {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.task-entry strong {
  font-size: 0.92rem;
}

.task-entry small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.task-entry > i:last-child {
  color: #84938f;
  font-size: 0.7rem;
}

.content-band {
  padding-block: 4.75rem;
}

.professional-platform {
  background: #f1f6f4;
}

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-block-start: 1.4rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
}

.profession-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block-start: 1px solid #c8d8d4;
  border-inline-start: 1px solid #c8d8d4;
  list-style: none;
}

.profession-map > li {
  display: grid;
  align-content: start;
  min-height: 9.5rem;
  padding: 1.1rem;
  border-block-end: 1px solid #c8d8d4;
  border-inline-end: 1px solid #c8d8d4;
  background: #fff;
}

.profession-map span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
}

.profession-map strong {
  margin-block-start: 1.5rem;
  font-size: 1.05rem;
}

.profession-map small {
  margin-block-start: 0.25rem;
  color: var(--muted);
}

.platform-capabilities {
  background: #fff;
}

.platform-capabilities .section-heading {
  margin-block-end: 2rem;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  border-block-start: 1px solid var(--line);
}

.capability-list article {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 1.4rem;
  border-block-end: 1px solid var(--line);
}

.capability-list article > i {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 6px;
  background: #edf5f3;
  color: var(--brand);
}

.capability-list article:nth-child(2) > i {
  background: #eaf1f8;
  color: #245f9d;
}

.capability-list article:nth-child(3) > i {
  background: #f8eed6;
  color: #835a0e;
}

.capability-list article:nth-child(4) > i {
  background: #f6e9e6;
  color: #a43a2d;
}

.capability-list h3,
.capability-list p {
  margin: 0;
}

.capability-list h3 {
  font-size: 1rem;
}

.capability-list p {
  margin-block-start: 0.35rem;
  font-size: 0.88rem;
}

.evidence-callout {
  padding-block: 3.25rem;
  background: #173d36;
  color: #fff;
}

.evidence-callout .content-container {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr) auto;
  align-items: center;
  gap: 2rem;
}

.evidence-callout h2,
.evidence-callout p {
  color: #fff;
}

.evidence-callout p {
  margin: 0;
  color: #dce9e5;
}

.evidence-callout .eyebrow {
  color: #f4c56b;
}

.evidence-callout .btn-secondary-soft {
  border-color: #fff;
  background: #fff;
  color: #173d36;
}

/* Public guides and supporting pages */
.guide-page {
  padding-block: 1.25rem 5rem;
  background: #fff;
}

.breadcrumbs {
  padding-block: 0.5rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumbs li:not(:last-child)::after {
  color: #9aaba7;
  content: "/";
}

.guide-hero,
.guide-page > .subhero {
  padding-block: 4rem 3rem;
  border-block-end: 1px solid var(--line);
}

.guide-hero > div,
.guide-page > .subhero {
  max-width: 56rem;
}

.guide-hero h1,
.guide-page > .subhero h1 {
  margin: 0;
  max-width: 54rem;
  font-size: 3.25rem;
  line-height: 1.08;
}

.guide-lead {
  max-width: 50rem;
  margin-block: 1.1rem 0;
  color: #50615c;
  font-size: 1.12rem;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.guide-section {
  padding-block: 3.75rem;
  border-block-end: 1px solid var(--line);
}

.guide-section > .section-heading {
  margin-block-end: 1.75rem;
}

.guide-section p,
.guide-section li {
  color: #50615c;
}

.resource-search {
  max-width: 48rem;
  margin-block-end: 1.2rem;
}

.resource-search > label {
  display: block;
  margin-block-end: 0.4rem;
  color: #344541;
  font-size: 0.78rem;
  font-weight: 800;
}

.resource-search > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.resource-search input {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bccbc7;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

.search-summary {
  font-size: 0.85rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.resource-card,
.domain-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 17rem;
}

.resource-icon,
.competency-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 6px;
  background: #e5f0ec;
  color: var(--brand);
}

.resource-category {
  margin: 1rem 0 0;
  color: var(--accent) !important;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.resource-card h2 {
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

.resource-card p:not(.resource-category) {
  margin-block: 0.6rem 1rem;
  font-size: 0.84rem;
}

.resource-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-block-start: auto;
  font-size: 0.8rem;
  font-weight: 800;
}

.public-empty {
  grid-column: 1 / -1;
  border-block: 1px solid var(--line);
}

.guide-page .principle-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: 3rem;
}

.guide-page .principle-band h2,
.guide-page .principle-band p {
  margin: 0;
}

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

.domain-card {
  position: relative;
  min-height: 13rem;
}

.domain-card > i {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-block-end: 1rem;
  border-radius: 6px;
  background: #edf5f3;
  color: var(--brand);
}

.domain-number {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  color: #8d9c98;
  font-size: 0.72rem;
  font-weight: 850;
}

.domain-card h3,
.domain-card p {
  margin: 0;
}

.domain-card h3 {
  padding-inline-end: 1.5rem;
  font-size: 0.98rem;
}

.domain-card p {
  margin-block-start: 0.55rem;
  font-size: 0.82rem;
}

.guide-page .content-split {
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1.28fr);
}

.level-track,
.practice-cycle,
.ai-workflow,
.review-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-track {
  border-block-start: 1px solid var(--line);
}

.level-track li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--line);
}

.level-track li > span {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 6px;
  background: #173d36;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

.level-track h3,
.level-track p {
  margin: 0;
}

.level-track h3 {
  font-size: 0.92rem;
}

.level-track p {
  margin-block-start: 0.25rem;
  font-size: 0.8rem;
}

.evidence-grid,
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.evidence-grid article,
.checklist-grid article {
  padding-block-start: 1rem;
  border-block-start: 3px solid #2f8172;
}

.evidence-grid article:nth-child(2n),
.checklist-grid article:nth-child(2) {
  border-block-start-color: #bd7f16;
}

.evidence-grid article:nth-child(3n),
.checklist-grid article:nth-child(3) {
  border-block-start-color: #a43a2d;
}

.evidence-grid h3,
.evidence-grid p,
.checklist-grid h3 {
  margin: 0;
}

.evidence-grid p {
  margin-block-start: 0.45rem;
  font-size: 0.84rem;
}

.source-panel {
  margin-block: 3rem 0;
  padding: 1.25rem 1.5rem;
  border-inline-start: 4px solid var(--brand);
  background: #f3f7f6;
}

.source-panel h2,
.source-panel p {
  margin: 0;
}

.source-panel h2 {
  font-size: 1rem;
}

.source-panel p,
.source-panel ul {
  color: var(--muted);
  font-size: 0.8rem;
}

.source-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-block: 0.65rem 0;
  padding-inline-start: 1.1rem;
}

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.85rem 1rem;
  border-block: 1px solid var(--line);
  background: #f8faf9;
  font-size: 0.8rem;
}

.guide-toc strong {
  color: var(--ink);
}

.practice-cycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.practice-cycle li {
  min-width: 0;
  padding: 1.2rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.practice-cycle li:first-child {
  border-inline-start: 1px solid var(--line);
}

.practice-cycle li > span,
.ai-workflow li > span {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-block-end: 1rem;
  border-radius: 50%;
  background: #173d36;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 850;
}

.practice-cycle h3,
.practice-cycle p {
  margin: 0;
}

.practice-cycle h3 {
  font-size: 0.95rem;
}

.practice-cycle p {
  margin-block-start: 0.4rem;
  font-size: 0.8rem;
}

.checklist-grid ul {
  margin-block-end: 0;
  padding-inline-start: 1.15rem;
  font-size: 0.84rem;
}

.principle-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.principle-list > div {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.principle-list > div:first-child {
  border-inline-start: 1px solid var(--line);
}

.principle-list strong {
  color: var(--ink);
}

.principle-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.content-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.content-table th,
.content-table td {
  padding: 0.8rem;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.content-table th {
  background: #f3f7f6;
  color: #40514d;
  font-size: 0.72rem;
}

.content-table td {
  color: #50615c;
  font-size: 0.84rem;
}

.ai-workflow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.ai-workflow li {
  min-width: 0;
  padding: 1rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.ai-workflow li:first-child {
  border-inline-start: 1px solid var(--line);
}

.ai-workflow h3,
.ai-workflow p {
  margin: 0;
}

.ai-workflow h3 {
  font-size: 0.86rem;
}

.ai-workflow p {
  margin-block-start: 0.4rem;
  font-size: 0.74rem;
}

.risk-label {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  padding-inline: 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.risk-low {
  background: #e7f3ed;
  color: #166247;
}

.risk-medium {
  background: #fbf1d8;
  color: #795200;
}

.risk-high {
  background: #f8e9e6;
  color: #963628;
}

.review-checklist {
  border-block-start: 1px solid var(--line);
}

.review-checklist li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.7rem;
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--line);
}

.review-checklist i {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #dff1ed;
  color: var(--brand-strong);
  font-size: 0.7rem;
}

.feature-catalog,
.audience-workflows,
.security-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  padding-block: 1rem 3.5rem;
}

.feature-catalog article,
.security-controls article {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.85rem;
  padding-block: 1.25rem;
  border-block-end: 1px solid var(--line);
}

.feature-catalog article > i,
.security-controls article > i {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 6px;
  background: #edf5f3;
  color: var(--brand);
}

.feature-catalog h2,
.feature-catalog p,
.security-controls h2,
.security-controls p {
  margin: 0;
}

.feature-catalog h2,
.security-controls h2 {
  font-size: 1rem;
}

.feature-catalog p,
.security-controls p {
  margin-block-start: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.audience-workflows {
  padding-block-start: 1.5rem;
}

.audience-workflows article {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.8rem;
  padding-block: 1.2rem;
  border-block-end: 1px solid var(--line);
}

.audience-workflows article > span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
}

.audience-workflows h2,
.audience-workflows p {
  margin: 0;
}

.audience-workflows h2 {
  font-size: 1rem;
}

.audience-workflows p {
  margin-block-start: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.content-cta,
.contact-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.5rem;
  border-block: 1px solid var(--line);
}

.content-cta > div,
.contact-support > div {
  max-width: 45rem;
}

.content-cta p,
.contact-support p {
  margin-block-end: 0;
}

.contact-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-block: 1.5rem 3.5rem;
}

.contact-paths article {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-paths article > i {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 6px;
  background: #edf5f3;
  color: var(--brand);
}

.contact-paths h2 {
  margin: 1rem 0 0;
  font-size: 1.08rem;
}

.contact-paths p {
  min-height: 4.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Professional growth dashboard */
.professional-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block: 1rem;
}

.professional-summary > div {
  display: grid;
  min-width: 0;
  min-height: 5.8rem;
  align-content: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.professional-summary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.professional-summary strong {
  margin-block-start: 0.4rem;
  font-size: 1.45rem;
  line-height: 1;
}

.competency-audit {
  margin-block: 1rem;
}

.competency-audit > header {
  align-items: center;
}

.audit-summary {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
  color: #42534f;
  font-size: 0.76rem;
  font-weight: 800;
}

.competency-audit-grid {
  border-block-start: 1px solid var(--line);
}

.competency-audit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  align-items: center;
  gap: 1rem;
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--line);
}

.competency-audit-copy {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
}

.competency-audit-copy h3,
.competency-audit-copy p,
.competency-audit-copy small {
  display: block;
  margin: 0;
}

.competency-audit-copy h3 {
  font-size: 0.9rem;
}

.competency-audit-copy p,
.competency-audit-copy small {
  color: var(--muted);
  font-size: 0.74rem;
}

.competency-audit-copy p {
  margin-block-start: 0.25rem;
}

.competency-audit-copy small {
  margin-block-start: 0.35rem;
}

.competency-level {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.45rem;
}

.competency-level label {
  grid-column: 1 / -1;
  color: #445550;
  font-size: 0.7rem;
  font-weight: 800;
}

.competency-level select {
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #bccbc7;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
}

.professional-list-body {
  border-block-start: 1px solid var(--line);
}

.professional-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
  border-block-end: 1px solid var(--line);
}

.professional-list-item > div {
  min-width: 0;
}

.professional-list-item h3,
.professional-list-item p,
.professional-list-item small {
  display: block;
  margin: 0;
}

.professional-list-item h3 {
  margin-block-start: 0.35rem;
  font-size: 0.9rem;
}

.professional-list-item p,
.professional-list-item small {
  color: var(--muted);
  font-size: 0.75rem;
}

.professional-list-item p {
  margin-block-start: 0.25rem;
}

.professional-list-item small {
  margin-block-start: 0.35rem;
}

.list-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  color: var(--brand-strong);
  font-size: 0.68rem;
  font-weight: 800;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-block: 1rem;
  color: var(--muted);
}

.empty-inline p {
  margin: 0;
  font-size: 0.78rem;
}

.empty-inline i {
  color: #8fa09b;
}

.status-paused,
.status-completed {
  border-color: #c9d4df;
  background: #f0f4f8;
  color: #46627e;
}

@media (max-width: 1100px) {
  .topbar .site-nav {
    display: none;
  }

  .topbar .site-nav-mobile {
    display: block;
    margin-inline-start: auto;
  }
}

@media (max-width: 960px) {
  .topbar {
    position: sticky;
    align-items: center;
    flex-wrap: nowrap;
  }

  .task-entry-grid,
  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .content-split,
  .guide-page .content-split,
  .evidence-callout .content-container {
    grid-template-columns: 1fr;
  }

  .practice-cycle,
  .ai-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .professional-platform .section-heading,
  .evidence-callout p {
    max-width: 46rem;
  }

  .hero-professional::before {
    width: 68%;
  }
}

@media (max-width: 720px) {
  .content-container,
  .guide-page > .breadcrumbs,
  .guide-page > .guide-hero,
  .guide-page > .guide-section,
  .guide-page > .source-panel,
  .guide-page > .subhero,
  .guide-page > .feature-catalog,
  .guide-page > .audience-workflows,
  .guide-page > .security-controls,
  .guide-page > .contact-paths,
  .guide-page > .contact-support,
  .guide-page > .content-cta,
  .guide-toc {
    width: min(100% - 1rem, 1180px);
  }

  .site-main > .hero-professional {
    height: clamp(430px, calc(100svh - 145px), 600px);
    padding-inline: 0.75rem;
  }

  .hero-professional .hero-copy {
    width: 100%;
  }

  .hero-professional::before {
    width: 100%;
    background: rgba(14, 48, 42, 0.94);
  }

  .hero-background {
    transform: none;
  }

  .hero-professional h1 {
    font-size: 3.25rem;
  }

  .hero-professional .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 22rem;
  }

  .hero-professional .hero-actions .btn {
    width: 100%;
  }

  .hero-context {
    gap: 0.4rem 0.75rem;
  }

  .task-entry-grid,
  .resource-grid,
  .domain-grid,
  .capability-list,
  .feature-catalog,
  .audience-workflows,
  .security-controls,
  .contact-paths,
  .professional-summary,
  .evidence-grid,
  .checklist-grid,
  .guide-page .principle-band,
  .principle-list {
    grid-template-columns: 1fr;
  }

  .task-entry-band {
    padding-block: 1.6rem 2rem;
  }

  .content-band {
    padding-block: 3rem;
  }

  .section-heading h2,
  .guide-section h2,
  .content-band h2,
  .content-cta h2,
  .contact-support h2 {
    font-size: 1.55rem;
  }

  .guide-hero,
  .guide-page > .subhero {
    padding-block: 2.5rem 2rem;
  }

  .guide-hero h1,
  .guide-page > .subhero h1 {
    font-size: 2.25rem;
  }

  .guide-section {
    padding-block: 2.75rem;
  }

  .content-cta,
  .contact-support,
  .professional-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-paths p {
    min-height: 0;
  }

  .practice-cycle,
  .ai-workflow {
    grid-template-columns: 1fr;
  }

  .practice-cycle li,
  .ai-workflow li,
  .principle-list > div {
    border-inline-start: 1px solid var(--line);
  }

  .resource-search > div {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 0;
  }

  .competency-audit-item {
    grid-template-columns: 1fr;
  }

  .competency-level {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline-start: 3.4rem;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 0.45rem;
    padding-inline: 0.55rem;
  }

  .topbar .brand > span:last-child,
  .site-nav-mobile summary span {
    display: none;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .nav-actions .btn {
    padding-inline: 0.6rem;
  }

  .hero-professional h1 {
    font-size: 2.8rem;
  }

  .task-entry {
    grid-template-columns: 2.4rem minmax(0, 1fr) 0.8rem;
    padding-inline: 0.7rem;
  }

  .profession-map {
    grid-template-columns: 1fr;
  }

  .competency-audit-copy {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .competency-level {
    padding-inline-start: 0;
  }
}

/* Website and AI control planes */
.management-tabs {
  display: flex;
  gap: 0.25rem;
  margin-block: 0.9rem 1rem;
  padding-block-end: 0.35rem;
  border-block-end: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.management-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.35rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #53645f;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.management-tab:hover {
  border-color: #cbd8d5;
  background: #f7faf9;
  color: var(--brand-strong);
}

.management-tab.is-active {
  border-color: #9fc7bd;
  background: #eaf5f1;
  color: #0b685d;
}

.management-tab i {
  width: 1rem;
  text-align: center;
}

.website-overview-grid {
  margin-block: 0.85rem;
}

.website-overview-grid > .surface,
.website-health-checks,
.website-content-inventory,
.editorial-form,
.website-settings-form {
  margin-block: 0.75rem;
}

.website-action-list,
.website-health-list,
.editorial-quality-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.website-action-list {
  border-block-start: 1px solid var(--line);
}

.website-action-list li {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr) 2rem;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  padding-block: 0.62rem;
  border-block-end: 1px solid var(--line);
}

.website-action-list li > i {
  text-align: center;
}

.website-action-list .is-warning > i {
  color: #9a6912;
}

.website-action-list .is-failed > i {
  color: #a33d31;
}

.website-action-list .is-passed > i {
  color: #16705f;
}

.website-action-list strong,
.website-action-list small,
.website-quick-links strong,
.website-quick-links small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.website-action-list strong,
.website-quick-links strong {
  color: #273d37;
  font-size: 0.76rem;
}

.website-action-list small,
.website-quick-links small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.4;
}

.website-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.website-quick-links a {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  min-height: 4rem;
  padding: 0.65rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
  color: #1d5c51;
  text-decoration: none;
}

.website-quick-links a:hover {
  background: #f4f9f7;
}

.website-quick-links a > i {
  width: 1.8rem;
  text-align: center;
}

.website-health-hero {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.website-health-score {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.28rem;
  min-width: 0;
  padding-inline-end: 1rem;
  border-inline-end: 1px solid var(--line);
}

.website-health-score > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
}

.website-health-score > strong {
  color: #25443d;
  font-size: 2rem;
  line-height: 1;
}

.website-health-score > strong small {
  color: var(--muted);
  font-size: 0.78rem;
}

.website-health-score.is-failed > strong {
  color: #9b3d31;
}

.website-health-score.is-warning > strong {
  color: #8b6218;
}

.website-health-score.is-passed > strong {
  color: #116858;
}

.website-health-hero h2,
.website-health-hero p {
  margin: 0;
}

.website-health-hero p {
  margin-block-start: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.website-health-hero > div:last-child > small {
  display: block;
  margin-block-start: 0.55rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.website-health-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0.7rem 0 0;
  border-block: 1px solid var(--line);
}

.website-health-facts > div {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-inline-end: 1px solid var(--line);
}

.website-health-facts > div:last-child {
  border-inline-end: 0;
}

.website-health-facts dt,
.website-health-facts dd {
  margin: 0;
}

.website-health-facts dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.website-health-facts dd {
  margin-block-start: 0.08rem;
  color: #263f38;
  font-size: 0.9rem;
  font-weight: 800;
}

.website-health-list {
  border-block-start: 1px solid var(--line);
}

.website-health-list li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr) auto 2rem;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding-block: 0.66rem;
  border-block-end: 1px solid var(--line);
}

.website-health-list li > i {
  text-align: center;
}

.website-health-list .is-passed > i {
  color: #16705f;
}

.website-health-list .is-warning > i {
  color: #9a6912;
}

.website-health-list .is-failed > i {
  color: #a33d31;
}

.website-health-list strong,
.website-health-list small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.website-health-list strong {
  font-size: 0.78rem;
}

.website-health-list small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.42;
}

.website-content-tools {
  display: grid;
  gap: 0.65rem;
  margin-block-end: 0.75rem;
  padding-block: 0.65rem;
  border-block: 1px solid var(--line);
}

.website-filter-form {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) repeat(4, minmax(7.5rem, 1fr)) 2.35rem 2.35rem;
  gap: 0.45rem;
  align-items: end;
  min-width: 0;
}

.website-filter-form label,
.website-bulk-form label {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
  color: #344541;
  font-size: 0.68rem;
  font-weight: 750;
}

.website-filter-form input,
.website-filter-form select,
.website-bulk-form select {
  min-width: 0;
  min-height: 2.35rem;
  font-size: 0.73rem;
}

.website-filter-form .icon-btn {
  width: 2.35rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
}

.website-bulk-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
}

.website-bulk-form label {
  width: min(14rem, 100%);
}

.website-bulk-form output {
  align-self: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.selection-cell {
  width: 2.2rem;
  min-width: 2.2rem;
  text-align: center;
}

.selection-cell input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.website-content-table .cell-title small {
  max-width: 22rem;
  overflow-wrap: anywhere;
}

.website-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
  margin-block-start: 0.7rem;
  color: var(--muted);
  font-size: 0.69rem;
}

.website-pagination > div {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.website-pagination a,
.website-pagination [aria-current="page"] {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #315b52;
  text-decoration: none;
}

.website-pagination [aria-current="page"] {
  border-color: #8bbbad;
  background: #e9f4f0;
  color: #0c6859;
  font-weight: 800;
}

.boundary-notice {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border: 1px solid #c5d5e5;
  border-inline-start: 4px solid #3975a9;
  border-radius: 5px;
  background: #f3f7fb;
  color: #274d6d;
}

.boundary-notice > i {
  padding-block-start: 0.18rem;
  font-size: 1.15rem;
  text-align: center;
}

.boundary-notice strong,
.boundary-notice p {
  margin: 0;
}

.boundary-notice p {
  margin-block-start: 0.18rem;
  color: #526c82;
  font-size: 0.76rem;
  line-height: 1.55;
}

.endpoint-template-picker,
.endpoint-stream-fields,
.endpoint-pricing-fields,
.endpoint-crawl4ai-fields,
.endpoint-advanced {
  min-width: 0;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
}

.endpoint-template-picker legend,
.endpoint-stream-fields legend,
.endpoint-pricing-fields legend,
.endpoint-crawl4ai-fields legend {
  width: auto;
  margin: 0;
  padding-inline: 0.3rem;
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.endpoint-template-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.45rem;
  gap: 0.55rem;
  align-items: end;
}

.endpoint-template-picker-row > label,
.endpoint-field-grid label,
.endpoint-advanced-grid label {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
}

.endpoint-template-picker-row .icon-btn {
  width: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.45rem;
}

.endpoint-template-guide {
  min-height: 4.7rem;
  margin-block-start: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-inline-start: 3px solid #2f8172;
  background: #f1f8f5;
  color: #27453d;
}

.endpoint-template-guide strong,
.endpoint-template-guide p,
.endpoint-template-guide small {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}

.endpoint-template-guide p,
.endpoint-template-guide small,
.endpoint-template-guide li {
  color: #516761;
  font-size: 0.72rem;
  line-height: 1.5;
}

.endpoint-template-guide p {
  margin-block-start: 0.16rem;
}

.endpoint-template-guide small {
  margin-block-start: 0.28rem;
  color: #0f6b59;
  font-weight: 750;
}

.endpoint-template-guide ul {
  display: grid;
  gap: 0.2rem;
  margin: 0.55rem 0 0;
  padding-inline-start: 1.1rem;
}

.endpoint-template-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.65rem 0 0;
}

.endpoint-template-details > div {
  min-width: 0;
  padding: 0.36rem 0.42rem;
  border: 1px solid #cee0d9;
  background: #fbfefc;
}

.endpoint-template-details dt,
.endpoint-template-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.endpoint-template-details dt {
  color: #5b7169;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.endpoint-template-details dd {
  margin-block-start: 0.12rem;
  color: #28473e;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.35;
}

.endpoint-field-grid,
.endpoint-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-block-start: 0.45rem;
}

.endpoint-field-note {
  margin: 0 0 0.25rem;
  color: #526c82;
  font-size: 0.72rem;
  line-height: 1.5;
}

.endpoint-advanced {
  background: #fff;
}

.endpoint-advanced > summary,
.endpoint-support-matrix > summary {
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.endpoint-advanced[open] > summary {
  margin-block-end: 0.7rem;
}

.endpoint-advanced small,
.endpoint-form label small {
  display: block;
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.endpoint-setup-guide {
  display: grid;
  gap: 0.9rem;
}

.endpoint-setup-guide > header {
  margin: 0;
}

.endpoint-setup-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line);
  background: #f8faf9;
  list-style: none;
}

.endpoint-setup-steps > li {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.08rem 0.5rem;
  min-width: 0;
  padding: 0.75rem;
  border-inline-end: 1px solid var(--line);
}

.endpoint-setup-steps > li:last-child {
  border-inline-end: 0;
}

.endpoint-setup-steps .workflow-step {
  grid-row: 1 / span 2;
}

.endpoint-setup-steps strong,
.endpoint-setup-steps small {
  overflow-wrap: anywhere;
}

.endpoint-setup-steps strong {
  align-self: center;
  font-size: 0.76rem;
}

.endpoint-setup-steps small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.endpoint-support-matrix {
  min-width: 0;
  padding-block: 0.2rem;
}

.endpoint-support-matrix[open] > summary {
  margin-block-end: 0.75rem;
}

.endpoint-support-matrix td small {
  display: block;
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.workflow-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-block: 1rem;
  border-block: 1px solid var(--line);
  background: #f8faf9;
}

.workflow-band > div {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.08rem 0.5rem;
  min-width: 0;
  padding: 0.8rem;
  border-inline-end: 1px solid var(--line);
}

.workflow-band > div:last-child {
  border-inline-end: 0;
}

.workflow-band strong {
  align-self: center;
  font-size: 0.76rem;
}

.workflow-band small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.workflow-step {
  display: inline-grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid #cbd8d5;
  border-radius: 50%;
  background: #fff;
  color: #53645f;
  font-size: 0.7rem;
  font-weight: 800;
}

.workflow-step.is-complete {
  border-color: #85b9aa;
  background: #e7f4ef;
  color: #0f6b59;
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.icon-btn.danger {
  color: #a23e2e;
}

.rag-studio-form > header {
  grid-column: 1 / -1;
}

.segmented-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  margin-block-end: 0.35rem;
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 2.55rem;
  border: 1px solid #c8d4d1;
  border-radius: 6px;
  overflow: hidden;
}

.segmented-control label {
  position: relative;
  min-width: 0;
  margin: 0;
}

.segmented-control label + label {
  border-inline-start: 1px solid #c8d4d1;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  place-items: center;
  min-height: 2.55rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #52635f;
  text-align: center;
  overflow-wrap: anywhere;
}

.studio-composer .studio-mode-control span {
  align-items: center;
  justify-items: start;
  text-align: start;
}

.segmented-control input:checked + span {
  background: #dff1ed;
  color: var(--brand-strong);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgba(23, 105, 210, 0.35);
  outline-offset: -3px;
}

.readiness-empty > header {
  margin-block-end: 0;
}

.run-detail {
  display: grid;
  gap: 1rem;
}

.run-detail > header,
.run-detail > .table-wrap {
  margin: 0;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.run-query,
.run-result {
  min-width: 0;
  padding-block: 0.85rem;
  border-block: 1px solid var(--line);
}

.run-query p,
.run-result h3,
.rag-answer {
  margin: 0;
}

.run-query p {
  margin-block-start: 0.35rem;
  color: #344541;
  overflow-wrap: anywhere;
}

.run-result h3 {
  margin-block-end: 0.55rem;
}

.rag-answer {
  padding: 0.85rem;
  border-inline-start: 3px solid #2f8172;
  background: #f3f8f6;
  color: #233934;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.run-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.run-metrics span {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.7rem;
  border-inline-end: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.run-metrics span:last-child {
  border-inline-end: 0;
}

.run-metrics strong {
  color: var(--ink);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.run-detail .evidence-grid {
  gap: 0.85rem;
}

.evidence-item header {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.evidence-item header > span {
  display: grid;
  place-items: center;
  width: 2.3rem;
  min-height: 2.3rem;
  border-radius: 5px;
  background: #e5f0ec;
  color: #126a5a;
  font-size: 0.72rem;
  font-weight: 800;
}

.evidence-item h3,
.evidence-item p {
  overflow-wrap: anywhere;
}

.evidence-item small {
  color: var(--muted);
  font-size: 0.68rem;
}

.evidence-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-block-start: 0.6rem;
  font-size: 0.74rem;
  font-weight: 750;
}

.run-review-form {
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

.quality-score,
.editorial-readiness {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.7rem;
  min-height: 1.7rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid #c8d6d2;
  border-radius: 5px;
  background: #f7faf9;
  color: #425650;
  font-size: 0.7rem;
  font-weight: 800;
}

.quality-score[data-score^="0"],
.editorial-readiness[data-score^="0"] {
  border-color: #e4c6c0;
  background: #fcf1ef;
  color: #9a3d30;
}

.quality-score.is-low,
.editorial-readiness.is-low {
  border-color: #e2bdb6;
  background: #fcf0ee;
  color: #973b30;
}

.quality-score.is-medium,
.editorial-readiness.is-medium {
  border-color: #dfc88f;
  background: #fff8e7;
  color: #805b13;
}

.quality-score.is-high,
.editorial-readiness.is-high {
  border-color: #9fc9bd;
  background: #edf7f3;
  color: #0d6959;
}

.editorial-form > header {
  margin-block-end: 0.8rem;
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 0.75fr);
  gap: 1rem;
  min-width: 0;
}

.editorial-main,
.editorial-sidebar {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-width: 0;
}

.editorial-sidebar {
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--line);
}

.editorial-main > label,
.editorial-sidebar > label,
.editorial-title-grid label,
.editorial-sidebar .form-grid label,
.editorial-section label {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
}

.editorial-main input,
.editorial-main select,
.editorial-main textarea,
.editorial-sidebar input,
.editorial-sidebar select,
.editorial-sidebar textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.editorial-title-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(12rem, 0.75fr);
}

.managed-url-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.managed-url-preview code {
  max-width: 100%;
  color: #285c52;
  overflow-wrap: anywhere;
}

.editorial-section {
  min-width: 0;
  padding-block: 0.7rem;
  border-block: 1px solid var(--line);
}

.editorial-section > summary {
  color: #30443f;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.editorial-section[open] > summary {
  margin-block-end: 0.7rem;
}

.editorial-quality-panel {
  min-width: 0;
  border-block: 1px solid var(--line);
}

.editorial-quality-panel > header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  padding-block: 0.5rem;
}

.editorial-quality-panel > header strong {
  color: #30443f;
  font-size: 0.76rem;
}

.editorial-quality-panel > header span {
  color: var(--muted);
  font-size: 0.64rem;
}

.editorial-quality-panel li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
  padding-block: 0.3rem;
  border-block-start: 1px solid #edf1f0;
  color: #53645f;
  font-size: 0.68rem;
}

.editorial-quality-panel li i {
  text-align: center;
}

.editorial-quality-panel li.is-ready {
  color: #176d5e;
}

.editorial-quality-panel li.is-blocked i {
  color: #9b7a39;
}

.editorial-form > .form-actions {
  margin-block-start: 0.9rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--line);
}

.editorial-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.website-settings-form > header {
  margin-block-end: 0.8rem;
}

.website-output-links {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.website-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.website-settings-section {
  min-width: 0;
  margin: 0;
  padding: 0.8rem;
  border: 0;
  border-radius: 0;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
  background: transparent;
}

.website-settings-section legend {
  width: auto;
  margin: 0;
  padding-inline: 0.25rem;
  color: #30443f;
  font-size: 0.76rem;
  font-weight: 800;
}

.website-settings-section label {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
}

.website-settings-form > .form-actions {
  margin-block-start: 0.8rem;
}

.editorial-form legend {
  width: auto;
  margin: 0;
  padding-inline: 0.3rem;
  color: #344541;
  font-size: 0.78rem;
  font-weight: 750;
}

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

.choice-chip {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.42rem;
  align-items: start;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.choice-chip:has(input:checked) {
  border-color: #8bbbab;
  background: #eef7f3;
}

.choice-chip input {
  width: 1rem;
  min-height: 1rem;
  margin-block-start: 0.08rem;
}

.choice-chip span,
.choice-chip small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice-chip span {
  font-size: 0.74rem;
}

.choice-chip small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.toggle-field {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafcfc;
}

.toggle-field input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.rich-editor {
  min-height: 15rem;
  border-radius: 5px;
  background: #fff;
}

.editorial-form .ql-toolbar {
  border-start-start-radius: 5px;
  border-start-end-radius: 5px;
}

.editorial-form .ql-toolbar button {
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
}

.rich-editor .ql-container {
  min-height: 12rem;
  border-end-start-radius: 5px;
  border-end-end-radius: 5px;
  font-family: inherit;
  font-size: 0.9rem;
}

.pipeline-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.pipeline-map li {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: 0.45rem;
  min-width: 0;
  padding: 0.7rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.pipeline-map li:nth-child(5n) {
  border-inline-end: 0;
}

.pipeline-map li:nth-last-child(-n + 5) {
  border-block-end: 0;
}

.pipeline-map li > span {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #eaf1f7;
  color: #2c648f;
  font-size: 0.68rem;
  font-weight: 800;
}

.pipeline-map strong,
.pipeline-map small {
  display: block;
  overflow-wrap: anywhere;
}

.pipeline-map strong {
  font-size: 0.74rem;
}

.pipeline-map small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.pipeline-lifecycle {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pipeline-lifecycle li:nth-child(5n) {
  border-inline-end: 1px solid var(--line);
}

.pipeline-lifecycle li:nth-child(6n) {
  border-inline-end: 0;
}

.pipeline-lifecycle li:nth-last-child(-n + 5) {
  border-block-end: 1px solid var(--line);
}

.pipeline-lifecycle li:nth-last-child(-n + 6) {
  border-block-end: 0;
}

.pipeline-guide-details {
  margin-block-start: 0.8rem;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.pipeline-guide-details summary {
  padding: 0.62rem 0.75rem;
  color: #1c4e49;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.pipeline-guide-copy {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
  border-block-start: 1px solid var(--line);
}

.pipeline-guide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.pipeline-metrics {
  margin-block: 0.8rem;
}

.table-note {
  display: block;
  max-width: 15rem;
  margin-block-start: 0.2rem;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pipeline-workspace {
  align-items: start;
}

.pipeline-workspace > .surface {
  min-width: 0;
}

.pipeline-form .form-section {
  display: grid;
  gap: 0.16rem;
  padding-block: 0.2rem;
  border-block-end: 1px solid var(--line);
}

.pipeline-form .form-section h3 {
  margin: 0;
  color: #1d4f49;
  font-size: 0.88rem;
}

.pipeline-form .form-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.pipeline-detail {
  display: grid;
  gap: 0.85rem;
}

.pipeline-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.pipeline-detail-facts > span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.65rem;
  border-inline-end: 1px solid var(--line);
}

.pipeline-detail-facts > span:last-child {
  border-inline-end: 0;
}

.pipeline-detail-facts strong,
.pipeline-detail-facts small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.pipeline-detail-facts b {
  min-width: 0;
  color: #214a45;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pipeline-detail-facts a {
  color: #176b60;
}

.pipeline-readiness-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.pipeline-readiness-list li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.42rem;
  min-width: 0;
  padding: 0.58rem 0.62rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.pipeline-readiness-list li:nth-child(3n) {
  border-inline-end: 0;
}

.pipeline-readiness-list li:nth-last-child(-n + 3) {
  border-block-end: 0;
}

.pipeline-readiness-list i {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.62rem;
}

.pipeline-readiness-list .is-ready i {
  background: #e1f4ec;
  color: #167058;
}

.pipeline-readiness-list .is-blocked i {
  background: #fff0ed;
  color: #b5493d;
}

.pipeline-readiness-list strong,
.pipeline-readiness-list small {
  display: block;
  overflow-wrap: anywhere;
}

.pipeline-readiness-list strong {
  color: #254a45;
  font-size: 0.72rem;
}

.pipeline-readiness-list small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.pipeline-review-form {
  padding-block: 0.7rem;
  border-block: 1px solid var(--line);
}

.check-list,
.version-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.5rem;
  color: #445852;
  font-size: 0.76rem;
}

.check-list i {
  color: #0f766e;
}

.maturity-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.maturity-list > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.6rem;
  padding-block: 0.55rem;
  border-block-end: 1px solid var(--line);
}

.maturity-list > div:last-child {
  border-block-end: 0;
}

.maturity-list dt {
  color: #244d46;
  font-size: 0.74rem;
  font-weight: 800;
}

.maturity-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.version-list li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.55rem;
  padding-block-end: 0.6rem;
  border-block-end: 1px solid var(--line);
}

.version-list li > span {
  color: #2d6d62;
  font-size: 0.72rem;
  font-weight: 800;
}

.version-list strong,
.version-list small {
  display: block;
  overflow-wrap: anywhere;
}

.version-list strong {
  font-size: 0.74rem;
}

.version-list small {
  margin-block-start: 0.16rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.status-review,
.status-scheduled,
.status-submitted,
.status-queued,
.status-reindexing,
.status-partial,
.status-never,
.status-stale {
  border-color: #d7c895;
  background: #fbf6df;
  color: #80600e;
}

.status-running,
.status-restored,
.status-reviewed,
.status-updated,
.status-moderate,
.status-not-required,
.status-not_required {
  border-color: #bed1e3;
  background: #eef5fb;
  color: #2c638f;
}

.status-created,
.status-saved,
.status-published,
.status-succeeded,
.status-low,
.status-approved,
.status-verified {
  border-color: #b9dacf;
  background: #edf8f3;
  color: #116b4d;
}

.status-high,
.status-critical,
.status-cancelled,
.status-tombstoned,
.status-rejected,
.status-abandoned {
  border-color: #e4c6c0;
  background: #fcf1ef;
  color: #a23e2e;
}

.preview-bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  padding: 0.65rem max(1rem, calc((100% - 1120px) / 2));
  border-block-end: 1px solid #d7c895;
  background: #fff8dc;
  color: #73560d;
  font-size: 0.75rem;
}

.preview-bar span {
  flex: 1 1 18rem;
}

.preview-bar a {
  color: inherit;
  font-weight: 800;
}

.managed-page .subhero,
.compact-subhero {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.managed-content {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding-block: 2.2rem 4rem;
  color: #263b36;
  font-size: 1rem;
  line-height: 1.75;
}

.managed-content h2,
.managed-content h3 {
  margin-block: 1.8rem 0.65rem;
  letter-spacing: 0;
  line-height: 1.3;
}

.managed-content h2 {
  font-size: 1.55rem;
}

.managed-content h3 {
  font-size: 1.2rem;
}

.managed-content p,
.managed-content ul,
.managed-content ol,
.managed-content blockquote,
.managed-content pre {
  margin-block: 0 1rem;
}

.managed-content blockquote {
  padding: 0.7rem 0.9rem;
  border-inline-start: 3px solid #508c7e;
  background: #f3f8f6;
}

.managed-content blockquote p {
  margin: 0;
}

.managed-content pre {
  max-width: 100%;
  padding: 0.8rem;
  border-radius: 5px;
  background: #1e2d29;
  color: #f3f7f5;
  overflow-x: auto;
}

.content-index {
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 1.5rem 4rem;
}

.content-search {
  display: grid;
  gap: 0.35rem;
  margin-block-end: 1.2rem;
}

.content-search > label {
  color: #334842;
  font-size: 0.75rem;
  font-weight: 800;
}

.content-search > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem;
  gap: 0.4rem;
}

.content-search input {
  min-width: 0;
  min-height: 2.5rem;
  border-radius: 5px;
}

.content-index-list {
  border-block-start: 1px solid var(--line);
}

.content-index-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding-block: 1rem;
  border-block-end: 1px solid var(--line);
}

.content-index-item h2,
.content-index-item p {
  margin: 0;
}

.content-index-item h2 {
  margin-block: 0.22rem;
  font-size: 1rem;
  letter-spacing: 0;
}

.content-index-item h2 a {
  color: #173f38;
  text-decoration: none;
}

.content-index-item p,
.content-index-item time {
  color: var(--muted);
  font-size: 0.73rem;
}

.content-type {
  color: #266d61;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 1050px) {
  .editorial-layout {
    grid-template-columns: 1fr;
  }

  .editorial-sidebar {
    padding-block-start: 0.85rem;
    padding-inline-start: 0;
    border-block-start: 1px solid var(--line);
    border-inline-start: 0;
  }

  .website-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 2.35rem 2.35rem;
  }

  .website-filter-form > label:first-of-type {
    grid-column: span 2;
  }

  .workflow-band,
  .pipeline-map,
  .endpoint-setup-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-band > div,
  .pipeline-map li,
  .pipeline-map li:nth-child(5n),
  .pipeline-map li:nth-last-child(-n + 5) {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
  }

  .workflow-band > div:nth-child(2n),
  .pipeline-map li:nth-child(2n) {
    border-inline-end: 0;
  }

  .workflow-band > div:last-child,
  .pipeline-map li:nth-last-child(-n + 2) {
    border-block-end: 0;
  }

  .endpoint-setup-steps > li,
  .endpoint-setup-steps > li:nth-child(5n) {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
  }

  .endpoint-setup-steps > li:nth-child(2n) {
    border-inline-end: 0;
  }

  .endpoint-setup-steps > li:last-child {
    border-block-end: 0;
  }

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

  .pipeline-detail-facts,
  .pipeline-readiness-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-detail-facts > span,
  .pipeline-readiness-list li,
  .pipeline-readiness-list li:nth-child(3n),
  .pipeline-readiness-list li:nth-last-child(-n + 3) {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
  }

  .pipeline-detail-facts > span:nth-child(2n),
  .pipeline-readiness-list li:nth-child(2n) {
    border-inline-end: 0;
  }

  .pipeline-detail-facts > span:nth-last-child(-n + 2),
  .pipeline-readiness-list li:nth-last-child(-n + 2) {
    border-block-end: 0;
  }
}

@media (max-width: 620px) {
  .management-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: visible;
  }

  .management-tab span {
    display: none;
  }

  .management-tab {
    justify-content: center;
    width: 100%;
    padding-inline: 0;
  }

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

  .website-quick-links,
  .website-health-hero,
  .website-settings-grid,
  .editorial-title-grid {
    grid-template-columns: 1fr;
  }

  .website-health-score {
    padding-block-end: 0.75rem;
    padding-inline-end: 0;
    border-block-end: 1px solid var(--line);
    border-inline-end: 0;
  }

  .website-health-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .website-health-facts > div,
  .website-health-facts > div:last-child {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
  }

  .website-health-facts > div:nth-child(2n) {
    border-inline-end: 0;
  }

  .website-health-facts > div:last-child {
    border-block-end: 0;
  }

  .website-health-list li {
    grid-template-columns: 1.6rem minmax(0, 1fr) 2rem;
    gap: 0.45rem;
  }

  .website-health-list .status-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .website-health-list li > i {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .website-health-list li > span {
    grid-column: 2;
    grid-row: 1;
  }

  .website-health-list .icon-btn {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .website-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .website-filter-form > label:first-of-type {
    grid-column: 1 / -1;
  }

  .website-filter-form .icon-btn {
    width: 100%;
  }

  .website-bulk-form label {
    flex: 1 1 100%;
    width: 100%;
  }

  .website-pagination {
    align-items: flex-start;
  }

  .website-pagination > div {
    flex-wrap: wrap;
  }

  .editorial-layout {
    gap: 0.75rem;
  }

  .website-settings-section {
    padding: 0.7rem;
  }

  .workflow-band,
  .pipeline-map,
  .choice-grid,
  .endpoint-setup-steps {
    grid-template-columns: 1fr;
  }

  .workflow-band > div,
  .workflow-band > div:nth-child(2n),
  .pipeline-map li,
  .pipeline-map li:nth-child(2n),
  .pipeline-map li:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .workflow-band > div:last-child,
  .pipeline-map li:last-child,
  .endpoint-setup-steps > li:last-child {
    border-block-end: 0;
  }

  .pipeline-detail-facts,
  .pipeline-readiness-list {
    grid-template-columns: 1fr;
  }

  .pipeline-detail-facts > span,
  .pipeline-detail-facts > span:nth-child(2n),
  .pipeline-detail-facts > span:nth-last-child(-n + 2),
  .pipeline-readiness-list li,
  .pipeline-readiness-list li:nth-child(2n),
  .pipeline-readiness-list li:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .pipeline-detail-facts > span:last-child,
  .pipeline-readiness-list li:last-child {
    border-block-end: 0;
  }

  .endpoint-setup-steps > li,
  .endpoint-setup-steps > li:nth-child(2n),
  .endpoint-setup-steps > li:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .endpoint-field-grid,
  .endpoint-advanced-grid,
  .endpoint-template-details {
    grid-template-columns: 1fr;
  }

  .content-index-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .maturity-list > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .segmented-control label + label {
    border-block-start: 1px solid #c8d4d1;
    border-inline-start: 0;
  }

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

  .run-metrics span:nth-child(2) {
    border-inline-end: 0;
  }

  .run-metrics span:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }

  .status-cluster {
    justify-content: flex-start;
  }
}

@media print {
  .topbar,
  .site-footer,
  .breadcrumbs,
  .guide-toc,
  .resource-search,
  .professional-forms,
  .competency-audit .form-actions {
    display: none !important;
  }

  .guide-page,
  .guide-section,
  .content-band {
    padding: 0;
    background: #fff;
  }

.guide-page > .guide-section,
.guide-page > .guide-hero,
.guide-page > .source-panel {
  width: 100%;
}
}

/* AI knowledge curation workspace */
.knowledge-metrics {
  margin-block: 0.7rem 0.9rem;
}

.knowledge-metric {
  min-height: 5.7rem;
}

.knowledge-metric > i {
  color: #126a61;
  font-size: 0.9rem;
}

.knowledge-lifecycle-guide,
.knowledge-curation-catalog,
.knowledge-source-detail,
.knowledge-source-form {
  scroll-margin-block-start: 5.5rem;
}

.knowledge-lifecycle-guide > header,
.knowledge-curation-catalog > header,
.knowledge-source-detail > header {
  align-items: start;
}

.knowledge-lifecycle-steps {
  margin-block: 0.8rem 0;
}

.knowledge-guide-details {
  border-block-start: 1px solid var(--line);
  margin-block-start: 0.9rem;
  padding-block-start: 0.85rem;
}

.knowledge-guide-details > summary {
  color: #1c3733;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.knowledge-guide-details > summary:focus-visible {
  border-radius: 3px;
  outline: 2px solid #167b70;
  outline-offset: 3px;
}

.knowledge-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
  margin-block-start: 0.9rem;
}

.knowledge-guide-grid > section {
  min-width: 0;
  border-inline-start: 3px solid #c9ddd5;
  padding-inline-start: 0.75rem;
}

.knowledge-guide-grid h3 {
  margin: 0;
  color: #1e3934;
  font-size: 0.84rem;
}

.knowledge-guide-grid p {
  margin: 0.3rem 0 0;
  color: #5a6b67;
  font-size: 0.78rem;
  line-height: 1.55;
}

.knowledge-source-form textarea[name="source_text"] {
  font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
  line-height: 1.5;
}

.knowledge-source-form small {
  display: block;
  margin-block-start: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
}

.knowledge-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-block: 0.8rem 1rem;
  border-block: 1px solid var(--line);
}

.knowledge-detail-facts > span {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
  padding: 0.7rem 0.8rem;
  border-inline-end: 1px solid var(--line);
  color: #53645f;
  font-size: 0.75rem;
}

.knowledge-detail-facts > span:last-child {
  border-inline-end: 0;
}

.knowledge-detail-facts strong {
  color: #243d38;
  font-size: 0.69rem;
}

.knowledge-source-detail code,
.knowledge-curation-catalog code {
  overflow-wrap: anywhere;
}

.status-overdue,
.status-due_soon,
.status-stale,
.status-changes_requested {
  border-color: #e2c889;
  background: #fff8e8;
  color: #8a5a08;
}

.status-unscheduled,
.status-queued,
.status-running,
.status-pending {
  border-color: #b9d1e1;
  background: #edf6fb;
  color: #235f80;
}

.status-rejected,
.status-retired {
  border-color: #e5c3bf;
  background: #fff2f0;
  color: #9b3b30;
}

@media (max-width: 900px) {
  .knowledge-guide-grid {
    grid-template-columns: 1fr;
  }

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

  .knowledge-detail-facts > span:nth-child(2) {
    border-inline-end: 0;
  }

  .knowledge-detail-facts > span:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .knowledge-detail-facts {
    grid-template-columns: 1fr;
  }

  .knowledge-detail-facts > span {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .knowledge-detail-facts > span:last-child {
    border-block-end: 0;
  }
}

/* AI prompt governance workspace */
.prompt-guide,
.prompt-catalog,
.prompt-form,
.prompt-detail {
  scroll-margin-block-start: 5.5rem;
}

.prompt-metrics {
  margin-block: 0.7rem 0.9rem;
}

.prompt-metric {
  min-height: 5.5rem;
}

.prompt-metric > i {
  color: #2c648f;
  font-size: 0.88rem;
}

.prompt-lifecycle-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0.85rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.prompt-lifecycle-steps li {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: 0.5rem;
  min-width: 0;
  padding: 0.68rem 0.72rem;
  border-inline-end: 1px solid var(--line);
}

.prompt-lifecycle-steps li:last-child {
  border-inline-end: 0;
}

.prompt-lifecycle-steps b {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #eef4fb;
  color: #2c648f;
  font-size: 0.7rem;
}

.prompt-lifecycle-steps strong,
.prompt-lifecycle-steps small {
  display: block;
  overflow-wrap: anywhere;
}

.prompt-lifecycle-steps strong {
  color: #244653;
  font-size: 0.75rem;
}

.prompt-lifecycle-steps small {
  margin-block-start: 0.16rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.38;
}

.prompt-guide-details {
  margin-block-start: 0.8rem;
  border-block-start: 1px solid var(--line);
  padding-block-start: 0.75rem;
}

.prompt-guide-details > summary {
  color: #244653;
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 800;
}

.prompt-guide-details > summary:focus-visible {
  border-radius: 3px;
  outline: 2px solid #2c648f;
  outline-offset: 3px;
}

.prompt-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
  margin-block-start: 0.75rem;
}

.prompt-guide-grid > section {
  min-width: 0;
  border-inline-start: 3px solid #a9c8de;
  padding-inline-start: 0.7rem;
}

.prompt-guide-grid h3 {
  margin: 0;
  color: #244653;
  font-size: 0.78rem;
}

.prompt-guide-grid p {
  margin: 0.25rem 0 0;
  color: #596c74;
  font-size: 0.72rem;
  line-height: 1.5;
}

.prompt-workspace,
.prompt-evidence-grid {
  align-items: start;
}

.prompt-workspace > .surface,
.prompt-evidence-grid > * {
  min-width: 0;
}

.prompt-form .form-section {
  display: grid;
  gap: 0.48rem;
  padding-block: 0.2rem 0.75rem;
  border-block-end: 1px solid var(--line);
}

.prompt-form .form-section h3 {
  margin: 0;
  color: #244653;
  font-size: 0.88rem;
}

.prompt-form .form-section small {
  display: block;
  margin-block-start: 0.22rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
}

.prompt-form textarea[name$="_json"],
.prompt-test-case-form textarea[name="expected_requirements_json"] {
  font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.76rem;
  line-height: 1.45;
}

.prompt-readiness {
  align-self: start;
  padding: 0.32rem 0.48rem;
  border: 1px solid #b7d1e4;
  background: #f1f7fc;
  color: #285f83;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.prompt-readiness[data-status="ready"] {
  border-color: #aad6c5;
  background: #edf8f3;
  color: #176a52;
}

.prompt-client-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.prompt-client-checks li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.38rem;
  min-width: 0;
  padding: 0.5rem 0.56rem;
  border-inline-end: 1px solid var(--line);
  color: #52636a;
  font-size: 0.67rem;
  line-height: 1.35;
}

.prompt-client-checks li:last-child {
  border-inline-end: 0;
}

.prompt-client-checks i {
  color: #7d8d94;
  font-size: 0.7rem;
}

.prompt-client-checks .is-ready i {
  color: #167058;
}

.prompt-client-checks .is-blocked i {
  color: #b5493d;
}

.prompt-detail {
  display: grid;
  gap: 0.85rem;
}

.prompt-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.prompt-detail-facts > span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.65rem;
  border-inline-end: 1px solid var(--line);
}

.prompt-detail-facts > span:last-child {
  border-inline-end: 0;
}

.prompt-detail-facts strong,
.prompt-detail-facts small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.prompt-detail-facts b {
  color: #244653;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.prompt-readiness-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.prompt-readiness-list li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.42rem;
  min-width: 0;
  padding: 0.56rem 0.6rem;
  border-inline-end: 1px solid var(--line);
}

.prompt-readiness-list li:last-child {
  border-inline-end: 0;
}

.prompt-readiness-list i {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #f0f4f5;
  color: #68797e;
  font-size: 0.62rem;
}

.prompt-readiness-list .is-ready i {
  background: #e1f4ec;
  color: #167058;
}

.prompt-readiness-list .is-blocked i {
  background: #fff0ed;
  color: #b5493d;
}

.prompt-readiness-list strong,
.prompt-readiness-list small {
  display: block;
  overflow-wrap: anywhere;
}

.prompt-readiness-list strong {
  color: #244653;
  font-size: 0.7rem;
}

.prompt-readiness-list small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.prompt-review-form,
.prompt-evidence-grid,
.prompt-version-history {
  padding-block: 0.75rem;
  border-block-start: 1px solid var(--line);
}

.prompt-version-history {
  border-block-end: 1px solid var(--line);
}

@media (max-width: 1050px) {
  .prompt-lifecycle-steps,
  .prompt-readiness-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-lifecycle-steps li,
  .prompt-readiness-list li {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
  }

  .prompt-lifecycle-steps li:nth-child(2n),
  .prompt-readiness-list li:nth-child(2n) {
    border-inline-end: 0;
  }

  .prompt-lifecycle-steps li:nth-last-child(-n + 2),
  .prompt-readiness-list li:nth-last-child(-n + 2) {
    border-block-end: 0;
  }

  .prompt-detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-detail-facts > span:nth-child(2n) {
    border-inline-end: 0;
  }

  .prompt-detail-facts > span:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .prompt-lifecycle-steps,
  .prompt-guide-grid,
  .prompt-client-checks,
  .prompt-readiness-list,
  .prompt-detail-facts {
    grid-template-columns: 1fr;
  }

  .prompt-lifecycle-steps li,
  .prompt-lifecycle-steps li:nth-child(2n),
  .prompt-lifecycle-steps li:nth-last-child(-n + 2),
  .prompt-client-checks li,
  .prompt-readiness-list li,
  .prompt-readiness-list li:nth-child(2n),
  .prompt-readiness-list li:nth-last-child(-n + 2),
  .prompt-detail-facts > span,
  .prompt-detail-facts > span:nth-child(2n),
  .prompt-detail-facts > span:nth-child(-n + 2) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .prompt-lifecycle-steps li:last-child,
  .prompt-client-checks li:last-child,
  .prompt-readiness-list li:last-child,
  .prompt-detail-facts > span:last-child {
    border-block-end: 0;
  }

  .prompt-readiness {
    white-space: normal;
  }
}

.evaluation-workspace,
.evaluation-evidence-grid {
  align-items: start;
}

.evaluation-workspace > .surface,
.evaluation-evidence-grid > * {
  min-width: 0;
}

.evaluation-guide,
.evaluation-detail {
  display: grid;
  gap: 0.82rem;
}

.evaluation-lifecycle,
.evaluation-client-checks,
.evaluation-readiness-list,
.evaluation-detail-facts {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.evaluation-lifecycle {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
}

.evaluation-lifecycle li,
.evaluation-client-checks li,
.evaluation-readiness-list li {
  min-width: 0;
  border-inline-end: 1px solid var(--line);
}

.evaluation-lifecycle li:last-child,
.evaluation-client-checks li:last-child,
.evaluation-readiness-list li:last-child {
  border-inline-end: 0;
}

.evaluation-lifecycle li {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: 0.4rem;
  padding: 0.56rem;
}

.evaluation-lifecycle strong,
.evaluation-lifecycle small,
.evaluation-client-checks span,
.evaluation-readiness-list strong,
.evaluation-readiness-list small,
.evaluation-detail-facts strong,
.evaluation-detail-facts small {
  display: block;
  overflow-wrap: anywhere;
}

.evaluation-lifecycle strong,
.evaluation-readiness-list strong {
  color: #244653;
  font-size: 0.7rem;
}

.evaluation-lifecycle small,
.evaluation-readiness-list small,
.evaluation-detail-facts small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.evaluation-guide-details {
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.evaluation-guide-details summary {
  padding: 0.58rem 0.7rem;
  color: #244653;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
}

.evaluation-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
}

.evaluation-guide-grid section {
  min-width: 0;
  padding: 0.62rem;
  border-inline-end: 1px solid var(--line);
}

.evaluation-guide-grid section:last-child {
  border-inline-end: 0;
}

.evaluation-guide-grid h3 {
  margin: 0;
  color: #244653;
  font-size: 0.72rem;
}

.evaluation-guide-grid p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.evaluation-readiness {
  align-self: start;
  padding: 0.32rem 0.48rem;
  border: 1px solid #b7d1e4;
  background: #f1f7fc;
  color: #285f83;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.evaluation-readiness[data-status="ready"] {
  border-color: #aad6c5;
  background: #edf8f3;
  color: #176a52;
}

.evaluation-client-checks {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
}

.evaluation-client-checks li,
.evaluation-readiness-list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.38rem;
  padding: 0.5rem 0.56rem;
  color: #52636a;
  font-size: 0.67rem;
  line-height: 1.35;
}

.evaluation-client-checks i,
.evaluation-readiness-list i {
  color: #7d8d94;
  font-size: 0.7rem;
}

.evaluation-client-checks .is-ready i,
.evaluation-readiness-list .is-ready i {
  color: #167058;
}

.evaluation-client-checks .is-blocked i,
.evaluation-readiness-list .is-blocked i {
  color: #b5493d;
}

.evaluation-detail-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evaluation-detail-facts > span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.64rem;
  border-inline-end: 1px solid var(--line);
}

.evaluation-detail-facts > span:last-child {
  border-inline-end: 0;
}

.evaluation-detail-facts strong {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.evaluation-detail-facts b {
  color: #244653;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.evaluation-readiness-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
}

.evaluation-review-form,
.evaluation-evidence-grid {
  padding-block: 0.72rem;
  border-block-start: 1px solid var(--line);
}

.evaluation-form textarea[name="required_metrics"],
.evaluation-form textarea[name="run_config_json"] {
  font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.76rem;
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .evaluation-lifecycle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evaluation-client-checks,
  .evaluation-readiness-list,
  .evaluation-detail-facts,
  .evaluation-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evaluation-lifecycle li:nth-child(3n),
  .evaluation-client-checks li:nth-child(2n),
  .evaluation-readiness-list li:nth-child(2n),
  .evaluation-detail-facts > span:nth-child(2n),
  .evaluation-guide-grid section:nth-child(2n) {
    border-inline-end: 0;
  }

  .evaluation-lifecycle li:nth-child(-n + 3),
  .evaluation-client-checks li:nth-child(-n + 2),
  .evaluation-readiness-list li:nth-child(-n + 4),
  .evaluation-detail-facts > span:nth-child(-n + 2),
  .evaluation-guide-grid section:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .evaluation-lifecycle,
  .evaluation-client-checks,
  .evaluation-readiness-list,
  .evaluation-detail-facts,
  .evaluation-guide-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-lifecycle li,
  .evaluation-lifecycle li:nth-child(3n),
  .evaluation-client-checks li,
  .evaluation-client-checks li:nth-child(2n),
  .evaluation-readiness-list li,
  .evaluation-readiness-list li:nth-child(2n),
  .evaluation-detail-facts > span,
  .evaluation-detail-facts > span:nth-child(2n),
  .evaluation-guide-grid section,
  .evaluation-guide-grid section:nth-child(2n) {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .evaluation-lifecycle li:last-child,
  .evaluation-client-checks li:last-child,
  .evaluation-readiness-list li:last-child,
  .evaluation-detail-facts > span:last-child,
  .evaluation-guide-grid section:last-child {
    border-block-end: 0;
  }

  .evaluation-readiness {
    white-space: normal;
  }
}

/* AI and RAG governance workspace */
.governance-guide,
.governance-policy-detail,
.governance-exception-detail {
  display: grid;
  gap: 0.78rem;
}

.governance-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.governance-workflow li {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  gap: 0.42rem;
  min-width: 0;
  padding: 0.58rem;
  border-inline-end: 1px solid var(--line);
}

.governance-workflow li:last-child {
  border-inline-end: 0;
}

.governance-workflow strong,
.governance-workflow small,
.governance-check-list strong,
.governance-check-list small,
.governance-detail-facts strong,
.governance-detail-facts small,
.governance-evidence strong {
  display: block;
  overflow-wrap: anywhere;
}

.governance-workflow strong,
.governance-check-list strong,
.governance-evidence strong {
  color: #244653;
  font-size: 0.71rem;
}

.governance-workflow small,
.governance-check-list small,
.governance-detail-facts small {
  margin-block-start: 0.14rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.governance-guide details {
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.governance-guide summary {
  padding: 0.58rem 0.72rem;
  color: #244653;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
}

.governance-guide-list {
  display: grid;
  gap: 0.44rem;
  margin: 0;
  padding: 0.68rem 0.85rem 0.78rem 1.9rem;
  border-block-start: 1px solid var(--line);
  color: #47616a;
  font-size: 0.72rem;
  line-height: 1.48;
}

.governance-posture {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #f9fbfa;
}

.governance-posture > div {
  display: grid;
  align-content: start;
  gap: 0.17rem;
  min-width: 0;
  padding: 0.6rem 0.72rem;
  border-inline-end: 1px solid var(--line);
}

.governance-posture > div:last-child {
  border-inline-end: 0;
}

.governance-posture span,
.governance-posture small {
  overflow-wrap: anywhere;
}

.governance-posture span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.governance-posture strong {
  color: #244653;
  font-size: 1rem;
  line-height: 1;
}

.governance-posture small {
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.32;
}

.governance-workspace {
  align-items: start;
}

.governance-workspace > .surface {
  min-width: 0;
}

.governance-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
}

.governance-detail-facts > span {
  display: grid;
  align-content: start;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.56rem 0.65rem;
  border-inline-end: 1px solid var(--line);
}

.governance-detail-facts > span:last-child {
  border-inline-end: 0;
}

.governance-detail-facts strong {
  color: var(--muted);
  font-size: 0.64rem;
}

.governance-detail-facts b {
  color: #244653;
  font-size: 0.78rem;
}

.governance-check-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.governance-check-list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.4rem;
  min-width: 0;
  padding: 0.56rem;
  border-inline-end: 1px solid var(--line);
}

.governance-check-list li:last-child {
  border-inline-end: 0;
}

.governance-check-list .is-ready i {
  color: #16803d;
}

.governance-check-list .is-blocked i {
  color: #b74b31;
}

.governance-review-form {
  border: 1px solid var(--line);
  padding: 0.72rem;
  background: #fbfcfb;
}

.governance-review-form header h3 {
  margin: 0;
  color: #244653;
  font-size: 0.82rem;
}

.governance-review-form header p {
  margin: 0.16rem 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.governance-client-status {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.governance-client-status[data-status="ready"] {
  color: #16803d;
}

.governance-client-status[data-status="blocked"] {
  color: #a34a32;
}

.governance-evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.governance-evidence > div {
  min-width: 0;
  padding: 0.68rem;
  border-inline-end: 1px solid var(--line);
}

.governance-evidence > div:last-child {
  border-inline-end: 0;
}

.governance-evidence p {
  margin: 0.24rem 0 0;
  color: #47616a;
  font-size: 0.72rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .governance-workflow,
  .governance-check-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .governance-workflow li:nth-child(2n),
  .governance-check-list li:nth-child(2n) {
    border-inline-end: 0;
  }

  .governance-workflow li:nth-last-child(-n + 2),
  .governance-check-list li:nth-last-child(-n + 2) {
    border-block-end: 0;
  }

  .governance-workflow li,
  .governance-check-list li {
    border-block-end: 1px solid var(--line);
  }

  .governance-detail-facts,
  .governance-posture {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .governance-detail-facts > span:nth-child(2n),
  .governance-posture > div:nth-child(2n) {
    border-inline-end: 0;
  }

  .governance-detail-facts > span:nth-child(-n + 2),
  .governance-posture > div:nth-child(-n + 2) {
    border-block-end: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .governance-workflow,
  .governance-check-list,
  .governance-detail-facts,
  .governance-posture,
  .governance-evidence {
    grid-template-columns: 1fr;
  }

  .governance-workflow li,
  .governance-workflow li:nth-child(2n),
  .governance-workflow li:nth-last-child(-n + 2),
  .governance-check-list li,
  .governance-check-list li:nth-child(2n),
  .governance-check-list li:nth-last-child(-n + 2),
  .governance-detail-facts > span,
  .governance-detail-facts > span:nth-child(2n),
  .governance-detail-facts > span:nth-child(-n + 2),
  .governance-posture > div,
  .governance-posture > div:nth-child(2n),
  .governance-posture > div:nth-child(-n + 2),
  .governance-evidence > div {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
  }

  .governance-workflow li:last-child,
  .governance-check-list li:last-child,
  .governance-detail-facts > span:last-child,
  .governance-posture > div:last-child,
  .governance-evidence > div:last-child {
    border-block-end: 0;
  }
}

/* Website appearance control plane */
.website-appearance-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
}

.website-appearance-form,
.website-appearance-preview-panel,
.website-appearance-revisions {
  min-width: 0;
  margin-block: 0 0.85rem;
}

.website-appearance-form > header,
.website-appearance-preview-panel > header,
.website-appearance-revisions > header {
  margin-block-end: 0.7rem;
}

.appearance-control-section {
  min-width: 0;
  margin: 0;
  padding: 0.72rem 0;
  border: 0;
  border-block-start: 1px solid var(--line);
}

.appearance-control-section legend {
  padding: 0 0.35rem 0 0;
  color: #30443f;
  font-size: 0.76rem;
  font-weight: 800;
}

.appearance-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.appearance-preset {
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  min-height: 4rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: start;
}

button.appearance-preset {
  cursor: pointer;
}

.appearance-preset:hover {
  border-color: #9ebeb6;
  background: #f8fbfa;
}

.appearance-preset.is-active {
  border-color: #6fa798;
  box-shadow: inset 0 0 0 1px #6fa798;
}

.appearance-preset-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 3.15rem;
  height: 2.25rem;
  overflow: hidden;
  border: 1px solid #c8d4d1;
  border-radius: 4px;
}

.appearance-preset-swatches i {
  min-width: 0;
}

.appearance-preset strong,
.appearance-preset small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.appearance-preset strong {
  font-size: 0.74rem;
}

.appearance-preset small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.35;
}

.appearance-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.appearance-color-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 0.8fr);
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  padding: 0.48rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.appearance-color-field strong,
.appearance-color-field small {
  display: block;
  min-width: 0;
}

.appearance-color-field strong {
  color: #314640;
  font-size: 0.7rem;
}

.appearance-color-field small {
  color: var(--muted);
  font-size: 0.61rem;
}

.appearance-color-control {
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.32rem;
  min-width: 0;
}

.appearance-color-control input[type="color"] {
  width: 2.3rem;
  min-width: 2.3rem;
  min-height: 2.3rem;
  padding: 0.16rem;
  cursor: pointer;
}

.appearance-color-control input[type="text"] {
  min-width: 0;
  min-height: 2.3rem;
  padding-inline: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-transform: lowercase;
}

.appearance-section-list,
.appearance-contrast-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.appearance-section-list {
  border-block-start: 1px solid var(--line);
}

.appearance-section-list > li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto 4.35rem;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  padding-block: 0.5rem;
  border-block-end: 1px solid var(--line);
}

.appearance-section-order {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid #c9d6d2;
  border-radius: 50%;
  color: #49615a;
  font-size: 0.66rem;
  font-weight: 800;
}

.appearance-section-list strong,
.appearance-section-list small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.appearance-section-list strong {
  font-size: 0.72rem;
}

.appearance-section-list small {
  margin-block-start: 0.08rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.compact-toggle {
  display: inline-flex;
  gap: 0.32rem;
  align-items: center;
  color: #415852;
  font-size: 0.65rem;
  font-weight: 750;
}

.compact-toggle input {
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.appearance-section-actions {
  display: grid;
  grid-template-columns: repeat(2, 2rem);
  gap: 0.25rem;
}

.appearance-section-actions .icon-btn {
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
}

.appearance-contrast-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
}

.appearance-contrast-list li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.38rem;
  align-items: center;
  min-width: 0;
  padding: 0.45rem;
  border-inline-end: 1px solid var(--line);
  border-block-end: 1px solid var(--line);
}

.appearance-contrast-list i {
  text-align: center;
}

.appearance-contrast-list .is-passed i {
  color: #14705c;
}

.appearance-contrast-list .is-failed i {
  color: #a33d31;
}

.appearance-contrast-list strong,
.appearance-contrast-list small {
  display: block;
  overflow-wrap: anywhere;
}

.appearance-contrast-list strong {
  font-size: 0.68rem;
}

.appearance-contrast-list small {
  color: var(--muted);
  font-size: 0.6rem;
}

.appearance-readiness {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  margin-block-start: 0.5rem;
  padding: 0.24rem 0.5rem;
  border: 1px solid #a8cfc3;
  border-radius: 5px;
  background: #edf8f4;
  color: #126b57;
  font-size: 0.67rem;
  font-weight: 800;
}

.appearance-readiness.is-blocked {
  border-color: #dfb8b0;
  background: #fcf0ee;
  color: #9b3d31;
}

.website-appearance-preview-panel {
  position: sticky;
  inset-block-start: calc(var(--topbar-height) + 0.65rem);
}

.website-live-preview {
  width: 100%;
  aspect-ratio: 16 / 12;
  min-height: 28rem;
  max-height: calc(100svh - 11rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--site-font-body);
  scrollbar-width: thin;
}

.website-live-preview h3,
.website-live-preview h4 {
  font-family: var(--site-font-heading);
}

.appearance-preview-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3.35rem;
  padding: 0.55rem 0.7rem;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}

.website-live-preview[data-header="compact"] .appearance-preview-header {
  min-height: 2.75rem;
  padding-block: 0.35rem;
}

.appearance-preview-brand {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  min-width: 0;
  font-size: 0.72rem;
}

.appearance-preview-brand i {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}

.appearance-preview-header nav {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  min-width: 0;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 750;
}

.appearance-preview-header button {
  min-height: 1.85rem;
  padding: 0.3rem 0.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  pointer-events: none;
}

.appearance-preview-hero {
  display: grid;
  align-content: center;
  min-height: 11rem;
  padding: 1.15rem 1.25rem;
  background: var(--brand-strong);
  color: #fff;
}

.website-live-preview[data-hero="center"] .appearance-preview-hero {
  justify-items: center;
  text-align: center;
}

.appearance-preview-hero p,
.appearance-preview-hero h3,
.appearance-preview-hero span {
  margin: 0;
}

.appearance-preview-hero p {
  color: #f2cf7f;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.appearance-preview-hero h3 {
  margin-block-start: 0.3rem;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.appearance-preview-hero span {
  max-width: 22rem;
  margin-block-start: 0.45rem;
  color: #e6efec;
  font-size: 0.65rem;
}

.appearance-preview-hero b {
  justify-self: start;
  margin-block-start: 0.7rem;
  padding: 0.38rem 0.55rem;
  border-radius: var(--radius);
  background: var(--brand);
  font-size: 0.58rem;
}

.website-live-preview[data-hero="center"] .appearance-preview-hero b {
  justify-self: center;
}

.appearance-preview-sections {
  background: var(--background, var(--bg));
}

.appearance-preview-sections > section {
  padding: 1rem 1.25rem;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}

.appearance-preview-sections > section:nth-child(even) {
  background: var(--surface-alt);
}

.website-live-preview[data-spacing="compact"] .appearance-preview-sections > section {
  padding-block: 0.68rem;
}

.website-live-preview[data-spacing="spacious"] .appearance-preview-sections > section {
  padding-block: 1.45rem;
}

.appearance-preview-sections small {
  color: var(--accent);
  font-size: 0.53rem;
  font-weight: 850;
  text-transform: uppercase;
}

.appearance-preview-sections h4,
.appearance-preview-sections p {
  margin: 0;
}

.appearance-preview-sections h4 {
  margin-block-start: 0.18rem;
  color: var(--ink);
  font-size: 0.83rem;
}

.appearance-preview-sections p {
  margin-block-start: 0.25rem;
  color: var(--muted);
  font-size: 0.6rem;
}

.appearance-preview-tasks,
.appearance-preview-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-block-start: 0.55rem;
}

.appearance-preview-tasks i,
.appearance-preview-index i {
  display: block;
  min-height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.appearance-preview-index {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appearance-preview-index i {
  min-height: 1.5rem;
}

.website-live-preview[data-index="list"] .appearance-preview-index {
  grid-template-columns: 1fr;
}

.website-live-preview[data-index="list"] .appearance-preview-index i {
  min-height: 0.8rem;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.website-live-preview[data-density="compact"] {
  font-size: 0.92em;
}

.website-live-preview[data-density="spacious"] {
  font-size: 1.06em;
}

.website-appearance-revisions .table-actions,
.website-appearance-revisions form {
  margin: 0;
}

/* Configurable public website tokens and layout */
.site-shell {
  min-width: 320px;
  background: var(--bg);
  font-family: var(--site-font-body);
}

.site-shell h1,
.site-shell h2,
.site-shell h3,
.site-shell h4,
.site-shell h5,
.site-shell h6 {
  font-family: var(--site-font-heading);
}

.site-width-reading { --site-content-max: 980px; }
.site-width-balanced { --site-content-max: 1180px; }
.site-width-wide { --site-content-max: 1400px; }
.site-page-reading { --site-reading-max: 760px; }
.site-page-standard { --site-reading-max: 920px; }
.site-page-wide { --site-reading-max: 1120px; }

.site-shell .content-container,
.site-shell .guide-page > .breadcrumbs,
.site-shell .guide-page > .guide-hero,
.site-shell .guide-page > .guide-section,
.site-shell .guide-page > .source-panel,
.site-shell .guide-page > .subhero,
.site-shell .guide-page > .feature-catalog,
.site-shell .guide-page > .audience-workflows,
.site-shell .guide-page > .security-controls,
.site-shell .guide-page > .contact-paths,
.site-shell .guide-page > .contact-support,
.site-shell .guide-page > .content-cta,
.site-shell .site-main > .band,
.site-shell .site-main > .subhero,
.site-shell .site-main > .feature-grid,
.site-shell .site-main > .split-list,
.site-shell .site-main > .auth-panel,
.site-shell .site-main > .narrow-panel,
.site-shell .site-main > .flash {
  width: min(var(--site-content-max), calc(100% - 2rem));
}

.site-shell .topbar {
  min-height: 72px;
  padding-inline: max(1rem, calc((100% - var(--site-content-max)) / 2));
  background: var(--surface);
}

.site-header-compact .topbar {
  min-height: 56px;
  padding-block: 0.45rem;
}

.site-header-static .topbar {
  position: relative;
}

.site-nav-center .site-nav {
  justify-content: center;
}

.site-breadcrumbs-hidden .breadcrumbs {
  display: none;
}

.site-shell .guide-page,
.site-shell .task-entry-band,
.site-shell .platform-capabilities {
  background: var(--surface);
}

.site-shell .professional-platform {
  background: var(--surface-alt);
}

.site-shell .site-main > .hero-professional,
.site-shell .hero-professional::before,
.site-shell .evidence-callout {
  background: var(--brand-strong);
}

.site-shell .hero-tint {
  background: color-mix(in srgb, var(--brand-strong) 82%, transparent);
}

.site-shell .task-entry,
.site-shell .profession-map > li,
.site-shell .resource-card,
.site-shell .domain-card {
  border-radius: var(--radius);
  background: var(--surface);
}

.site-shell .task-entry:hover {
  border-color: var(--brand);
  background: var(--surface-alt);
}

.site-shell .task-entry > i:first-child,
.site-shell .capability-list article > i,
.site-shell .feature-grid article > i {
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--brand-strong);
}

.site-shell .managed-content {
  width: min(var(--site-reading-max), calc(100% - 2rem));
  color: var(--ink);
}

.site-shell .managed-content blockquote {
  border-inline-start-color: var(--brand);
  background: var(--surface-alt);
}

.site-shell .content-index {
  width: min(var(--site-content-max), calc(100% - 2rem));
}

.site-shell .content-index-item h2 a,
.site-shell .content-type {
  color: var(--brand-strong);
}

.site-index-grid .content-index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  border-block-start: 0;
}

.site-index-grid .content-index-item {
  align-content: start;
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-hero-center .hero-professional .hero-copy {
  width: min(46rem, 90%);
  margin-inline: auto;
  text-align: center;
}

.site-hero-center .hero-professional::before {
  width: 100%;
}

.site-hero-center .hero-background {
  transform: none;
}

.site-hero-center .hero-actions,
.site-hero-center .hero-context {
  justify-content: center;
}

.site-sections-compact .content-band,
.site-sections-compact .guide-section {
  padding-block: 3rem;
}

.site-sections-compact .task-entry-band {
  padding-block: 1.5rem 1.8rem;
}

.site-sections-spacious .content-band,
.site-sections-spacious .guide-section {
  padding-block: 6rem;
}

.site-density-compact .task-entry {
  min-height: 4.6rem;
  padding: 0.65rem;
}

.site-density-compact .capability-list article {
  padding-block: 1rem;
}

.site-density-spacious .task-entry {
  min-height: 6.2rem;
  padding: 1rem;
}

.site-density-spacious .capability-list article {
  padding-block: 1.8rem;
}

@supports not (background: color-mix(in srgb, white, black)) {
  .site-shell .hero-tint {
    background: rgba(14, 36, 32, 0.82);
  }
}

@media (max-width: 1050px) {
  .website-appearance-workspace {
    grid-template-columns: 1fr;
  }

  .website-appearance-preview-panel {
    position: static;
  }

  .website-live-preview {
    min-height: 25rem;
    max-height: 42rem;
  }
}

@media (max-width: 700px) {
  .appearance-preset-grid,
  .appearance-color-grid,
  .appearance-contrast-list {
    grid-template-columns: 1fr;
  }

  .appearance-section-list > li {
    grid-template-columns: 1.6rem minmax(0, 1fr) 4.35rem;
  }

  .appearance-section-list .compact-toggle {
    grid-column: 2;
  }

  .appearance-section-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .site-index-grid .content-index-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .management-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .appearance-color-field {
    grid-template-columns: minmax(0, 1fr) minmax(7rem, 0.9fr);
  }

  .website-live-preview {
    min-height: 23rem;
  }

  .appearance-preview-header nav {
    display: none;
  }

  .appearance-preview-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-shell .content-container,
  .site-shell .guide-page > .breadcrumbs,
  .site-shell .guide-page > .guide-hero,
  .site-shell .guide-page > .guide-section,
  .site-shell .guide-page > .source-panel,
  .site-shell .guide-page > .subhero,
  .site-shell .guide-page > .feature-catalog,
  .site-shell .guide-page > .audience-workflows,
  .site-shell .guide-page > .security-controls,
  .site-shell .guide-page > .contact-paths,
  .site-shell .guide-page > .contact-support,
  .site-shell .guide-page > .content-cta,
  .site-shell .site-main > .band,
  .site-shell .site-main > .subhero,
  .site-shell .site-main > .feature-grid,
  .site-shell .site-main > .split-list,
  .site-shell .site-main > .auth-panel,
  .site-shell .site-main > .narrow-panel,
  .site-shell .site-main > .flash,
  .site-shell .managed-content,
  .site-shell .content-index {
    width: min(100% - 1rem, var(--site-content-max));
  }
}

@media print {
  .website-appearance-preview-panel,
  .appearance-section-actions,
  .website-appearance-form .form-actions {
    display: none;
  }
}

/* Keep SEO component rules above the shared utility cascade. */
.seo-control-plane .seo-settings-form {
  padding-block-end: 0;
}

.seo-control-plane .seo-audit-command > header {
  align-items: center;
}

.seo-control-plane .seo-findings-table {
  min-width: 68rem;
}

.seo-control-plane .seo-content-table {
  min-width: 71rem;
}

/* Keep wide SEO inventories scrollable without growing the dashboard canvas. */
.seo-control-plane,
.seo-control-plane > *,
.seo-control-plane .surface,
.seo-control-plane .surface-body,
.seo-content-inventory,
.seo-setting-history,
.seo-settings-form,
.seo-settings-section,
.seo-settings-fields {
  min-width: 0;
  max-width: 100%;
}

.seo-settings-section {
  min-inline-size: 0;
}

.seo-settings-section > .form-help {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.seo-settings-section > .form-help > i {
  flex: 0 0 auto;
  margin-block-start: 0.18rem;
  color: #27618a;
}

.seo-settings-section > .form-help > span {
  flex: 1 1 auto;
  min-width: 0;
}

.seo-control-plane .table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.seo-content-inventory,
.seo-setting-history,
.seo-findings-panel,
.seo-history-panel,
.seo-sitemap-inventory,
.seo-schema-inventory {
  overflow: hidden;
}

.seo-toggle.is-muted {
  color: #71807c;
  background: #fafbfb;
}

body.app-shell {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

@media (max-width: 780px) {
  .seo-control-plane .seo-audit-command > header {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .seo-control-plane .data-table {
    width: 100%;
    min-width: 100% !important;
    table-layout: fixed;
  }

  .seo-control-plane .data-table th,
  .seo-control-plane .data-table td {
    padding: 0.52rem 0.42rem;
    overflow-wrap: anywhere;
  }

  .seo-content-table th:nth-child(3),
  .seo-content-table td:nth-child(3),
  .seo-content-table th:nth-child(4),
  .seo-content-table td:nth-child(4),
  .seo-content-table th:nth-child(6),
  .seo-content-table td:nth-child(6),
  .seo-content-table th:nth-child(7),
  .seo-content-table td:nth-child(7) {
    display: none;
  }

  .seo-content-table th:nth-child(1) { width: 2.4rem; }
  .seo-content-table th:nth-child(5) { width: 3.8rem; }
  .seo-content-table th:nth-child(8) { width: 4.8rem; }

  .seo-content-table .table-actions {
    display: grid;
    grid-template-columns: repeat(2, 2rem);
    gap: 0.2rem;
  }

  .seo-findings-table th:nth-child(2),
  .seo-findings-table td:nth-child(2),
  .seo-findings-table th:nth-child(3),
  .seo-findings-table td:nth-child(3),
  .seo-findings-table th:nth-child(6),
  .seo-findings-table td:nth-child(6) {
    display: none;
  }

  .seo-findings-table th:nth-child(1) { width: 6.7rem; }

  .seo-history-panel .data-table th:nth-child(2),
  .seo-history-panel .data-table td:nth-child(2),
  .seo-history-panel .data-table th:nth-child(5),
  .seo-history-panel .data-table td:nth-child(5),
  .seo-history-panel .data-table th:nth-child(6),
  .seo-history-panel .data-table td:nth-child(6) {
    display: none;
  }

  .seo-history-panel .data-table th:nth-child(3) { width: 3.5rem; }
  .seo-history-panel .data-table th:nth-child(4) { width: 4.3rem; }

  .seo-setting-history .data-table th:nth-child(2),
  .seo-setting-history .data-table td:nth-child(2),
  .seo-setting-history .data-table th:nth-child(4),
  .seo-setting-history .data-table td:nth-child(4) {
    display: none;
  }

  .seo-setting-history .data-table th:nth-child(1) { width: 4.8rem; }
  .seo-setting-history .data-table th:nth-child(5) { width: 3.4rem; }

  .seo-schema-inventory .data-table th:nth-child(3),
  .seo-schema-inventory .data-table td:nth-child(3),
  .seo-schema-inventory .data-table th:nth-child(5),
  .seo-schema-inventory .data-table td:nth-child(5),
  .seo-schema-inventory .data-table th:nth-child(6),
  .seo-schema-inventory .data-table td:nth-child(6) {
    display: none;
  }

  .seo-schema-inventory .data-table th:nth-child(2),
  .seo-schema-inventory .data-table th:nth-child(4) {
    width: 5.2rem;
  }
}

@media print {
  .seo-tabs,
  .seo-run-form,
  .seo-filter-bar,
  .seo-bulk-bar,
  .seo-settings-footer,
  .seo-output-band,
  .seo-reference-links,
  .seo-control-plane .table-actions {
    display: none !important;
  }
}

/* Public registration */
.site-main > .registration-page {
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 2rem;
  width: min(var(--site-content-max, 1180px), calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.registration-intro {
  position: sticky;
  top: 5.5rem;
  min-width: 0;
  padding: 1.2rem 0;
}

.registration-intro h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.registration-lead {
  max-width: 34rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.registration-path-summary {
  display: grid;
  gap: 0;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.registration-path-summary li {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-block-start: 1px solid var(--line);
}

.registration-path-summary li > i {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 6px;
  background: #e4f1ed;
  color: #126a5a;
}

.registration-path-summary li:nth-child(2) > i {
  background: #e8eff8;
  color: #245f91;
}

.registration-path-summary strong,
.registration-path-summary small {
  display: block;
}

.registration-path-summary strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.registration-path-summary small {
  margin-block-start: 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
}

.registration-managed-note {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  margin-block-start: 1rem;
  padding: 0.8rem;
  border-inline-start: 3px solid #b57716;
  background: #fff8e8;
  color: #65480c;
}

.registration-managed-note > i {
  margin-block-start: 0.15rem;
  text-align: center;
}

.registration-managed-note p,
.registration-managed-note strong,
.registration-managed-note span {
  display: block;
  margin: 0;
}

.registration-managed-note strong {
  font-size: 0.78rem;
}

.registration-managed-note span {
  margin-block-start: 0.14rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
}

.registration-form {
  position: relative;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(20, 36, 31, 0.07);
}

.registration-form-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.2rem 1rem;
  padding-block-end: 0.9rem;
  border-block-end: 1px solid var(--line);
}

.registration-form-header h2 {
  grid-column: 1;
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.registration-form-header p {
  grid-column: 1;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.registration-step {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  padding: 0.28rem 0.52rem;
  border: 1px solid #b9d6ce;
  border-radius: 5px;
  background: #edf7f4;
  color: #126a5a;
  font-size: 0.68rem;
  font-weight: 800;
}

.registration-error-summary {
  margin-block-start: 0.9rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e6aaa1;
  border-inline-start: 4px solid #b84735;
  border-radius: 6px;
  background: #fff5f3;
  color: #7d2f24;
}

.registration-error-summary:focus {
  outline: 3px solid rgba(27, 127, 255, 0.24);
  outline-offset: 2px;
}

.registration-error-summary h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.84rem;
}

.registration-error-summary ul {
  display: grid;
  gap: 0.25rem;
  margin: 0.5rem 0 0;
  padding-inline-start: 1.15rem;
  font-size: 0.76rem;
  line-height: 1.45;
}

.registration-error-summary a {
  color: inherit;
}

.registration-type-fieldset,
.registration-section {
  min-inline-size: 0;
  margin: 0;
  padding: 1rem 0 0;
  border: 0;
  border-radius: 0;
}

.registration-type-fieldset > legend,
.registration-section > legend {
  float: left;
  width: 100%;
  margin: 0 0 0.58rem;
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.registration-section > legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.registration-section > legend i {
  color: #126a5a;
}

.registration-type-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.registration-type-option {
  display: grid;
  grid-template-columns: 1rem 2.15rem minmax(0, 1fr) 1rem;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
  min-height: 4.6rem;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.registration-type-option:hover {
  border-color: #89ada4;
  background: #f8fbfa;
}

.registration-type-option.is-selected,
.registration-type-option:has(input:checked) {
  border-color: #287b6c;
  background: #eef8f5;
  box-shadow: inset 0 0 0 1px #287b6c;
}

.registration-type-option input {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: #126a5a;
}

.registration-type-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 5px;
  background: #e8eff8;
  color: #245f91;
}

.registration-type-option strong,
.registration-type-option small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.registration-type-option strong {
  font-size: 0.8rem;
}

.registration-type-option small {
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
}

.registration-type-check {
  color: #287b6c;
  opacity: 0;
}

.registration-type-option.is-selected .registration-type-check,
.registration-type-option:has(input:checked) .registration-type-check {
  opacity: 1;
}

.registration-section {
  clear: both;
  margin-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

.registration-section-copy {
  clear: both;
  margin: -0.15rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
}

.registration-form-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem 0.8rem;
}

.registration-field {
  display: block;
  min-width: 0;
}

.registration-field.span-2,
.registration-password-status.span-2 {
  grid-column: 1 / -1;
}

.registration-field > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  margin-block-end: 0.3rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.registration-required,
.registration-optional {
  flex: 0 0 auto;
  font-size: 0.61rem;
  font-weight: 700;
}

.registration-required {
  color: #9a3428;
}

.registration-optional {
  color: #697873;
}

.registration-field input,
.registration-field select,
.registration-field textarea {
  min-height: 2.65rem;
  padding: 0.6rem 0.72rem;
  border-radius: 6px;
  font-size: 0.82rem;
}

.registration-field textarea {
  min-height: 5rem;
}

.registration-field input[aria-invalid="true"],
.registration-field select[aria-invalid="true"],
.registration-field textarea[aria-invalid="true"],
.registration-declaration-field input[aria-invalid="true"] {
  border-color: #b84735;
  background: #fffafa;
}

.registration-field-help,
.registration-field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.28rem;
  margin-block-start: 0.28rem;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.4;
}

.registration-field-help {
  color: var(--muted);
}

.registration-field-error {
  color: #9a3428;
}

.registration-field-error i {
  margin-block-start: 0.12rem;
}

.registration-password-control {
  position: relative;
}

.registration-password-control input {
  padding-inline-end: 3.1rem;
}

.registration-password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 100%;
  min-height: 2.65rem;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #f6f8f7;
  color: #52635d;
  cursor: pointer;
}

.registration-password-toggle:hover {
  background: #e9f0ed;
  color: #126a5a;
}

.registration-password-toggle:focus-visible,
.registration-type-option input:focus-visible,
.registration-declaration-field input:focus-visible {
  outline: 3px solid rgba(27, 127, 255, 0.28);
  outline-offset: 2px;
}

.registration-password-status {
  padding: 0.62rem 0.7rem;
  border-inline-start: 3px solid #b57716;
  background: #fbfaf5;
}

.registration-password-status > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.registration-password-status output {
  color: var(--ink);
  font-weight: 800;
}

.registration-password-status meter {
  display: block;
  width: 100%;
  height: 0.65rem;
  margin-block-start: 0.28rem;
  accent-color: #287b6c;
}

.registration-password-status ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.35rem 0 0;
  padding: 0;
  color: #78837f;
  font-size: 0.62rem;
  font-weight: 700;
  list-style: none;
}

.registration-password-status li {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.registration-password-status li i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #e5e9e7;
  color: transparent;
  font-size: 0.5rem;
}

.registration-password-status li.is-met {
  color: #176340;
}

.registration-password-status li.is-met i {
  background: #dcefe4;
  color: #176340;
}

.registration-declaration-field {
  margin-block-start: 1rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px solid var(--line);
}

.registration-declaration-field > label {
  display: grid;
  grid-template-columns: 1.05rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
  cursor: pointer;
}

.registration-declaration-field input {
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  min-height: 1.05rem;
  margin: 0.12rem 0 0;
  padding: 0;
  accent-color: #126a5a;
}

.registration-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block-start: 1rem;
}

.registration-form-actions .btn {
  gap: 0.48rem;
  min-width: 12rem;
}

.registration-form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-align: end;
}

.registration-form-actions a {
  font-weight: 800;
}

.registration-trap {
  position: absolute;
  inset: auto auto 0 -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.registration-form [hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .site-main > .registration-page {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-block-start: 0.75rem;
  }

  .registration-intro {
    position: static;
    padding-block-end: 0.5rem;
  }

  .registration-intro h1 {
    max-width: 22ch;
  }

  .registration-path-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-block-start: 0.9rem;
  }

  .registration-path-summary li {
    border-block-start: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-main > .registration-page {
    width: min(100% - 1rem, var(--site-content-max, 1180px));
    margin-block-end: 1.5rem;
  }

  .registration-intro {
    padding: 0.65rem 0 0.4rem;
  }

  .registration-intro h1 {
    max-width: none;
    font-size: 1.75rem;
  }

  .registration-lead {
    margin-block-start: 0.55rem;
    font-size: 0.88rem;
  }

  .registration-path-summary {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .registration-path-summary li {
    padding-block: 0.65rem;
  }

  .registration-managed-note {
    margin-block-start: 0.5rem;
  }

  .registration-form {
    padding: 0.9rem 0.75rem 1rem;
  }

  .registration-form-header {
    align-items: start;
  }

  .registration-form-header h2 {
    font-size: 1.18rem;
  }

  .registration-type-grid,
  .registration-form-grid {
    grid-template-columns: 1fr;
  }

  .registration-field.span-2,
  .registration-password-status.span-2 {
    grid-column: auto;
  }

  .registration-type-option {
    min-height: 4.25rem;
  }

  .registration-password-status ul {
    grid-template-columns: 1fr;
  }

  .registration-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .registration-form-actions .btn {
    width: 100%;
  }

  .registration-form-actions p {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .registration-type-option,
  .registration-password-toggle {
    transition: none;
  }
}

@media (forced-colors: active) {
  .registration-type-option.is-selected,
  .registration-type-option:has(input:checked),
  .registration-error-summary,
  .registration-managed-note,
  .registration-password-status {
    border: 2px solid CanvasText;
  }
}

/* Public login */
.site-main > .login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.82fr);
  align-items: center;
  gap: 3rem;
  width: min(1000px, calc(100% - 2rem));
  min-height: max(31rem, calc(100svh - 13.25rem));
  margin: 1.25rem auto 2rem;
}

.login-context {
  min-width: 0;
  padding-block: 1rem;
}

.login-context h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-lead {
  max-width: 34rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.login-role-list {
  display: grid;
  gap: 0;
  max-width: 35rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.login-role-list li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
  padding: 0.7rem 0;
  border-block-start: 1px solid var(--line);
}

.login-role-list li > i {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 6px;
  background: #e4f1ed;
  color: #126a5a;
}

.login-role-list li:nth-child(2) > i {
  background: #e8eff8;
  color: #245f91;
}

.login-role-list li:nth-child(3) > i {
  background: #fff0ce;
  color: #8a5b0d;
}

.login-role-list strong,
.login-role-list small {
  display: block;
  overflow-wrap: anywhere;
}

.login-role-list strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.login-role-list small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.login-context-note {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.48rem;
  max-width: 35rem;
  margin-block-start: 0.8rem;
  padding: 0.68rem 0.75rem;
  border-inline-start: 3px solid #287b6c;
  background: #f0f7f5;
  color: #315e54;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.45;
}

.login-context-note i {
  margin-block-start: 0.12rem;
  text-align: center;
}

.login-form {
  min-width: 0;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(20, 36, 31, 0.08);
}

.login-form-header {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding-block-end: 0.85rem;
  border-block-end: 1px solid var(--line);
}

.login-form-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  background: #e4f1ed;
  color: #126a5a;
  font-size: 0.92rem;
}

.login-form-header span:not(.login-form-mark) {
  display: block;
  color: #537068;
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-form-header h2 {
  margin: 0.05rem 0 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.login-form-header p {
  margin: 0.14rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.login-error-summary {
  margin-block-start: 0.8rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #e6aaa1;
  border-inline-start: 4px solid #b84735;
  border-radius: 6px;
  background: #fff5f3;
  color: #7d2f24;
}

.login-error-summary:focus {
  outline: 3px solid rgba(27, 127, 255, 0.24);
  outline-offset: 2px;
}

.login-error-summary h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.78rem;
}

.login-error-summary ul {
  display: grid;
  gap: 0.22rem;
  margin: 0.42rem 0 0;
  padding-inline-start: 1.1rem;
  font-size: 0.7rem;
  line-height: 1.4;
}

.login-error-summary a {
  color: inherit;
}

.login-fields {
  display: grid;
  gap: 0.8rem;
  margin-block-start: 0.9rem;
}

.login-field {
  min-width: 0;
}

.login-field > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-block-end: 0.3rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
}

.login-field > label small {
  flex: 0 0 auto;
  color: #9a3428;
  font-size: 0.61rem;
  font-weight: 700;
}

.login-input-control {
  position: relative;
  min-width: 0;
}

.login-input-control > i {
  position: absolute;
  z-index: 1;
  inset-block-start: 50%;
  inset-inline-start: 0.78rem;
  width: 1rem;
  color: #63766f;
  font-size: 0.8rem;
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input-control input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.62rem 0.75rem 0.62rem 2.35rem;
  border-radius: 6px;
  font-size: 0.84rem;
}

.login-input-control input[aria-invalid="true"] {
  border-color: #b84735;
  background: #fffafa;
}

.login-password-control input {
  padding-inline-end: 3.35rem;
}

.login-password-toggle {
  position: absolute;
  z-index: 2;
  inset-block: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 100%;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  background: #f6f8f7;
  color: #52635d;
  cursor: pointer;
}

.login-password-toggle:hover {
  background: #e9f0ed;
  color: #126a5a;
}

.login-password-toggle:focus-visible {
  outline: 3px solid rgba(27, 127, 255, 0.28);
  outline-offset: 2px;
}

.login-field-help,
.login-field-error,
.login-caps-lock {
  display: flex;
  align-items: flex-start;
  gap: 0.28rem;
  margin-block-start: 0.28rem;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.4;
}

.login-field-help {
  color: var(--muted);
}

.login-field-error {
  color: #9a3428;
}

.login-field-error i,
.login-caps-lock i {
  margin-block-start: 0.12rem;
}

.login-caps-lock {
  color: #7d550e;
}

.login-form [hidden] {
  display: none !important;
}

.login-submit.btn {
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  margin-block-start: 1rem;
}

.login-support {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-block-start: 0.9rem;
  padding-block-start: 0.8rem;
  border-block-start: 1px solid var(--line);
}

.login-support p {
  margin: 0;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.45;
}

.login-support p:last-child {
  text-align: end;
}

.login-support a {
  color: #126a5a;
  font-weight: 800;
}

@media (max-width: 850px) {
  .site-main > .login-page {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.6rem;
    width: min(42rem, calc(100% - 2rem));
    min-height: 0;
    margin-block-start: 0.75rem;
  }

  .login-context {
    padding-block-end: 0.3rem;
  }

  .login-context h1 {
    max-width: 22ch;
  }

  .login-role-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    gap: 0.7rem;
    margin-block-start: 0.8rem;
  }

  .login-role-list li {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    align-items: start;
  }

  .login-context-note {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-main > .login-page {
    width: min(100% - 1rem, 42rem);
    margin-block-end: 1.5rem;
  }

  .login-context {
    padding-block-start: 0.65rem;
  }

  .login-context h1 {
    max-width: none;
    font-size: 1.75rem;
  }

  .login-lead {
    margin-block-start: 0.5rem;
    font-size: 0.86rem;
  }

  .login-role-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .login-role-list li {
    align-items: center;
    padding-block: 0.55rem;
  }

  .login-context-note {
    margin-block-start: 0.55rem;
  }

  .login-form {
    padding: 0.9rem 0.75rem 1rem;
  }

  .login-support {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    text-align: center;
  }

  .login-support p:last-child {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-password-toggle {
    transition: none;
  }
}

@media (forced-colors: active) {
  .login-form,
  .login-error-summary,
  .login-context-note {
    border: 2px solid CanvasText;
  }
}

/* School management */
.school-management {
  min-width: 0;
}

.school-management-layout {
  display: grid;
  grid-template-columns: minmax(17.5rem, 20.5rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.school-management-layout.is-single-school {
  grid-template-columns: minmax(0, 1fr);
}

.school-workspace {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
}

.school-workspace-create {
  width: min(100%, 64rem);
}

.school-directory {
  position: sticky;
  inset-block-start: 4.4rem;
  max-height: calc(100dvh - 5.4rem);
  padding: 0.75rem;
  overflow: hidden;
}

.school-directory > header {
  margin-block-end: 0.65rem;
}

.school-directory-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.45rem;
  gap: 0.4rem;
  margin-block-end: 0.55rem;
}

.school-directory-search .input-with-icon {
  position: relative;
}

.school-directory-search .input-with-icon > i {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.school-directory-search input {
  width: 100%;
  min-height: 2.45rem;
  padding-inline-start: 2rem;
  border-radius: 5px;
  font-size: 0.78rem;
}

.school-directory-search .icon-btn {
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
}

.school-directory-list {
  display: grid;
  max-height: calc(100dvh - 12.4rem);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.school-directory-item {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 3.7rem;
  padding: 0.5rem 0.4rem;
  border-block-end: 1px solid #e4ebe9;
  color: var(--ink);
  text-decoration: none;
}

.school-directory-item::before {
  position: absolute;
  inset-block: 0.45rem;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.school-directory-item {
  position: relative;
}

.school-directory-item:hover {
  background: #f4f8f7;
}

.school-directory-item.is-active {
  background: #eaf5f2;
  color: #0b5d50;
}

.school-directory-item.is-active::before {
  background: #11806d;
}

.school-directory-item > span:nth-child(2) {
  min-width: 0;
}

.school-directory-item strong,
.school-directory-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-directory-item strong {
  font-size: 0.77rem;
  line-height: 1.35;
  white-space: nowrap;
}

.school-directory-item small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.35;
  white-space: nowrap;
}

.school-directory-logo {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #d7e2df;
  border-radius: 5px;
  background: #fff;
  color: #55736c;
  object-fit: contain;
}

.school-directory-meta {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.school-directory-meta small {
  color: #457067;
  font-weight: 800;
}

.school-directory-meta i {
  color: #81928e;
  font-size: 0.62rem;
}

.school-directory-limit,
.school-directory-no-match {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.45;
}

.school-directory-empty {
  padding: 1.4rem 0.6rem;
}

.school-identity-band {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) minmax(10.5rem, 14rem);
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #cddbd7;
  border-inline-start: 4px solid #157765;
  border-radius: 6px;
  background: #f8fbfa;
}

.school-logo {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border: 1px solid #d4dfdc;
  border-radius: 6px;
  background: #fff;
  color: #3d7167;
  object-fit: contain;
}

.school-image-placeholder {
  display: grid;
  place-items: center;
}

.school-identity-copy {
  min-width: 0;
}

.school-identity-copy h2 {
  margin: 0.08rem 0 0.25rem;
  font-size: 1.12rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.school-identity-copy > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.school-identity-status {
  display: grid;
  gap: 0.35rem;
  align-content: center;
}

.school-identity-status > .status-badge {
  justify-self: end;
}

.school-identity-status label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.school-identity-status label strong {
  color: var(--ink);
}

.school-identity-status progress {
  width: 100%;
  height: 0.5rem;
  accent-color: #157765;
}

.school-section-nav {
  display: flex;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.25rem;
  border-block-end: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.school-section-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.38rem;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.48rem 0.62rem;
  border-block-end: 2px solid transparent;
  color: #52645f;
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.school-section-nav a:hover {
  background: #f2f6f5;
  color: #155f53;
}

.school-section-nav a.is-active {
  border-block-end-color: #157765;
  color: #0b5d50;
}

.school-section-nav i {
  width: 1rem;
  color: #557a73;
  text-align: center;
}

.school-settings-form {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.school-settings-form > header {
  margin-block-end: 0;
  padding-block-end: 0.7rem;
  border-block-end: 1px solid var(--line);
}

.school-settings-form > header .status-badge {
  flex: 0 0 auto;
}

.school-form-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.school-form-group + .school-form-group {
  padding-block-start: 0.8rem;
  border-block-start: 1px solid #e4ebe9;
}

.school-form-group > legend {
  float: none;
  width: auto;
  margin: 0 0 0.65rem;
  color: #263c36;
  font-size: 0.79rem;
  font-weight: 800;
}

.school-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem 0.75rem;
}

.school-field {
  display: grid;
  min-width: 0;
  gap: 0.28rem;
  margin: 0;
}

.school-field.span-2,
.school-change-summary {
  grid-column: 1 / -1;
}

.school-field-label {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  color: #334943;
  font-size: 0.71rem;
  font-weight: 780;
}

.school-field-label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.school-field-label > small {
  flex: 0 0 auto;
  color: #778983;
  font-size: 0.58rem;
  font-weight: 650;
}

.school-field:has([required]) .school-field-label > small {
  color: #9a4a1c;
}

.school-field input,
.school-field select,
.school-field textarea,
.school-file-field input {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.5rem 0.62rem;
  border-radius: 5px;
  font-size: 0.79rem;
}

.school-field textarea {
  min-height: 5.2rem;
  line-height: 1.45;
  resize: vertical;
}

.school-field .field-help,
.school-file-field .field-help {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 550;
  line-height: 1.4;
}

.school-static-field {
  align-content: start;
}

.school-field.is-disabled {
  opacity: 0.62;
}

.school-static-field .status-badge {
  justify-self: start;
  margin-block-start: 0.25rem;
}

.school-form-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding-block-start: 0.8rem;
  border-block-start: 1px solid var(--line);
}

.school-form-footer .btn {
  min-width: 9.5rem;
  justify-content: center;
}

.school-create-footer > p {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.school-asset-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(18rem, 1.3fr);
  gap: 0.8rem;
}

.school-asset-control {
  display: grid;
  min-width: 0;
  gap: 0.5rem;
  align-content: start;
}

.school-asset-preview {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 8rem;
  padding: 0.55rem;
  border: 1px dashed #b9cbc6;
  border-radius: 5px;
  background: #f7faf9;
  overflow: hidden;
}

.school-asset-preview .school-image-placeholder {
  gap: 0.35rem;
  color: #72857f;
  font-size: 1.25rem;
}

.school-asset-preview .school-image-placeholder small {
  font-size: 0.63rem;
}

.school-logo-preview {
  width: min(8rem, 100%);
  max-height: 8rem;
  object-fit: contain;
}

.school-letterhead-preview {
  width: 100%;
  max-height: 10rem;
  object-fit: contain;
}

.school-file-field {
  display: grid;
  gap: 0.28rem;
}

.school-file-field input[type="file"] {
  padding: 0.35rem;
  border: 1px solid #c9d5d2;
  background: #fff;
}

.school-remove-asset {
  display: inline-grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: start;
  color: #8b3b30;
  font-size: 0.66rem;
  font-weight: 700;
}

.school-remove-asset input {
  width: 1rem;
  height: 1rem;
  margin: 0.06rem 0 0;
}

.school-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.75fr);
  gap: 0.75rem;
  align-items: start;
}

.school-overview-summary {
  grid-row: span 2;
}

.school-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-block: 0.2rem 0.85rem;
  border-block: 1px solid #e1e9e7;
}

.school-stat {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  padding: 0.65rem 0.35rem;
}

.school-stat > i {
  color: #307266;
  text-align: center;
}

.school-stat strong,
.school-stat small {
  display: block;
}

.school-stat strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.school-stat small {
  margin-block-start: 0.16rem;
  color: var(--muted);
  font-size: 0.61rem;
  overflow-wrap: anywhere;
}

.school-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-block-start: 1px solid #e2e9e7;
}

.school-readonly-grid > div {
  min-width: 0;
  padding: 0.62rem 0.35rem;
  border-block-end: 1px solid #e2e9e7;
}

.school-readonly-grid dt {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
}

.school-readonly-grid dd {
  margin: 0.18rem 0 0;
  color: #273c37;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.school-priorities ul,
.school-activity ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.school-priorities li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  gap: 0.42rem;
  align-items: center;
  min-height: 2.4rem;
  border-block-end: 1px solid #e4ebe9;
  color: #42554f;
  font-size: 0.69rem;
}

.school-priorities li > i {
  color: #b07815;
}

.school-priorities li.is-complete > i {
  color: #147058;
}

.school-priorities li a {
  font-weight: 800;
}

.school-activity ol {
  gap: 0.55rem;
}

.school-activity li {
  display: grid;
  grid-template-columns: 0.65rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
}

.school-activity .activity-dot {
  width: 0.48rem;
  height: 0.48rem;
  margin-block-start: 0.28rem;
  border-radius: 50%;
  background: #287b6d;
}

.school-activity strong,
.school-activity small {
  display: block;
}

.school-activity strong {
  color: #334943;
  font-size: 0.68rem;
  line-height: 1.4;
}

.school-activity small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.59rem;
}

.school-readonly-assets {
  display: grid;
  grid-template-columns: minmax(9rem, 0.45fr) minmax(16rem, 1.55fr);
  gap: 0.75rem;
  margin-block-end: 0.85rem;
}

.school-readonly-assets figure {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 8rem;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid #d8e2df;
  background: #fafcfc;
}

.school-readonly-assets figcaption {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.school-directory-item:focus-visible,
.school-section-nav a:focus-visible {
  outline: 3px solid rgba(27, 127, 255, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .school-management-layout {
    grid-template-columns: minmax(15.5rem, 17.5rem) minmax(0, 1fr);
  }

  .school-overview {
    grid-template-columns: 1fr;
  }

  .school-overview-summary {
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .school-management-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-directory {
    position: static;
    max-height: none;
  }

  .school-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 18rem;
  }

  .school-directory-item:nth-child(odd) {
    border-inline-end: 1px solid #e4ebe9;
  }

  .school-identity-band {
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }

  .school-identity-status {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(9rem, 1fr);
    align-items: center;
  }

  .school-identity-status > .status-badge {
    justify-self: start;
    grid-row: span 2;
  }
}

@media (max-width: 640px) {
  .school-directory-list,
  .school-form-grid,
  .school-asset-grid,
  .school-readonly-grid,
  .school-readonly-assets {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-directory-item:nth-child(odd) {
    border-inline-end: 0;
  }

  .school-identity-band {
    grid-template-columns: 3.65rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.7rem;
  }

  .school-logo {
    width: 3.65rem;
    height: 3.65rem;
  }

  .school-identity-copy h2 {
    font-size: 1rem;
  }

  .school-identity-status {
    grid-template-columns: 1fr;
  }

  .school-identity-status > .status-badge {
    grid-row: auto;
  }

  .school-section-nav a {
    min-height: 2.75rem;
  }

  .school-settings-form,
  .school-readonly,
  .school-overview > .surface {
    padding: 0.75rem;
  }

  .school-form-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-form-footer .btn {
    width: 100%;
  }

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

  .school-readonly-assets figure {
    min-height: 6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .school-directory-item,
  .school-section-nav a {
    scroll-behavior: auto;
    transition: none;
  }
}

@media (forced-colors: active) {
  .school-identity-band,
  .school-directory-item.is-active,
  .school-asset-preview,
  .school-readonly-assets figure {
    border: 2px solid CanvasText;
  }

  .school-directory-item.is-active::before {
    background: Highlight;
  }
}

/* School learning context */
.school-context-summary-band {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid #cddbd7;
  border-inline-start: 4px solid #1a6f61;
  border-radius: 6px;
  background: #f8fbfa;
}

.school-context-summary-band h2,
.school-context-summary-band p {
  margin: 0;
}

.school-context-summary-band h2 {
  margin-block: 0.08rem 0.2rem;
  font-size: 1rem;
  line-height: 1.3;
}

.school-context-summary-band > div:first-child > p:last-child {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.school-context-summary-band dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.4rem, auto));
  margin: 0;
  border-inline: 1px solid #d9e3e0;
}

.school-context-summary-band dl > div {
  min-width: 0;
  padding: 0.15rem 0.65rem;
  text-align: center;
}

.school-context-summary-band dt {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
}

.school-context-summary-band dd {
  margin: 0.12rem 0 0;
  color: #263e38;
  font-size: 0.86rem;
  font-weight: 850;
}

.school-context-summary-band > div:last-child {
  display: grid;
  gap: 0.3rem;
  justify-items: end;
}

.school-context-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: start;
  padding: 0.2rem;
  border: 1px solid #ccd8d5;
  border-radius: 5px;
  background: #eef3f2;
}

.school-context-mode-switch a {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.68rem;
  border-radius: 4px;
  color: #4d625d;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.school-context-mode-switch a:hover {
  color: #135e52;
}

.school-context-mode-switch a.is-active {
  border: 1px solid #c7d7d3;
  background: #fff;
  color: #0e6254;
  box-shadow: 0 1px 2px rgba(22, 54, 46, 0.08);
}

.school-context-settings {
  padding-block-end: 0.8rem;
  border-block-end: 1px solid #e1e9e7;
}

.school-context-policy {
  min-height: 3.8rem;
  margin: 0;
  padding: 0.55rem 0.62rem;
  border: 1px solid #d8e2df;
  border-radius: 5px;
  background: #fafcfc;
}

.school-context-policy strong,
.school-context-policy small {
  display: block;
}

.school-context-policy strong {
  color: #304a43;
  font-size: 0.7rem;
}

.school-context-policy small {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.35;
}

.school-context-scope-settings {
  min-width: 0;
  margin: 0;
  padding: 0 0 0.8rem;
  border: 0;
  border-block-end: 1px solid #e1e9e7;
}

.school-context-scope-settings legend {
  float: none;
  width: auto;
  margin-block-end: 0.55rem;
  color: #263c36;
  font-size: 0.73rem;
  font-weight: 800;
}

.school-context-scope-settings > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}

.school-context-scope-settings label {
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.school-context-scope-settings input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.school-context-scope-settings span {
  display: flex;
  gap: 0.32rem;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.35rem;
  border: 1px solid #d3dfdc;
  border-radius: 5px;
  background: #fff;
  color: #526761;
  font-size: 0.64rem;
  font-weight: 760;
  text-align: center;
}

.school-context-scope-settings input:checked + span {
  border-color: #22806e;
  background: #e9f5f1;
  color: #0f6254;
}

.school-context-scope-settings input:focus-visible + span {
  outline: 3px solid rgba(27, 127, 255, 0.28);
  outline-offset: 2px;
}

.school-context-layer-stack,
.school-context-readonly-stack {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.school-context-layer,
.school-context-readonly-layer {
  min-width: 0;
  border: 1px solid #d5dfdc;
  border-radius: 5px;
  background: #fff;
  overflow: clip;
}

.school-context-layer > summary,
.school-context-readonly-layer > summary {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.9rem;
  padding: 0.55rem 0.7rem;
  background: #f7faf9;
  color: #314941;
  cursor: pointer;
  list-style: none;
}

.school-context-layer > summary::-webkit-details-marker,
.school-context-readonly-layer > summary::-webkit-details-marker {
  display: none;
}

.school-context-layer > summary > span,
.school-context-readonly-layer > summary > span {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.school-context-layer > summary > span:first-child i,
.school-context-readonly-layer > summary > span:first-child i {
  width: 1rem;
  color: #246f63;
  text-align: center;
}

.school-context-layer > summary strong,
.school-context-readonly-layer > summary strong {
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.school-context-layer > summary small,
.school-context-readonly-layer > summary small {
  color: #557069;
  font-size: 0.64rem;
  font-weight: 800;
}

.school-context-layer > summary > span:last-child i,
.school-context-readonly-layer > summary > span:last-child i {
  color: #7a8d88;
  font-size: 0.58rem;
  transition: transform 150ms ease;
}

.school-context-layer[open] > summary,
.school-context-readonly-layer[open] > summary {
  border-block-end: 1px solid #dce5e2;
  background: #eef6f4;
}

.school-context-layer[open] > summary > span:last-child i,
.school-context-readonly-layer[open] > summary > span:last-child i {
  transform: rotate(180deg);
}

.school-context-layer-editor {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.75rem;
}

.school-context-layer-heading {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding-block-end: 0.65rem;
  border-block-end: 1px solid #e4ebe9;
}

.school-context-layer-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #bdd7d0;
  border-radius: 5px;
  background: #edf7f4;
  color: #126454;
}

.school-context-layer-heading h3,
.school-context-layer-heading p {
  margin: 0;
}

.school-context-layer-heading h3 {
  font-size: 0.8rem;
}

.school-context-layer-heading p {
  margin-block-start: 0.12rem;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.school-context-score {
  display: inline-grid;
  place-items: center;
  min-width: 2.8rem;
  min-height: 1.7rem;
  padding-inline: 0.4rem;
  border: 1px solid #c8d8d4;
  border-radius: 4px;
  background: #fff;
  color: #205f54;
  font-size: 0.65rem;
  font-weight: 850;
}

.school-context-verify {
  margin: 0;
  padding: 0.55rem 0.62rem;
  border: 1px solid #d6e0dd;
  border-radius: 5px;
  background: #fafcfc;
}

.school-context-ai {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem;
  border-block: 1px solid #cddde4;
  background: #f4f8fa;
}

.school-context-ai-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.school-context-ai-command label {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.school-context-ai-command label > span,
.school-context-current-sources > strong {
  color: #30474f;
  font-size: 0.67rem;
  font-weight: 800;
}

.school-context-ai-command input {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.48rem 0.6rem;
  border-radius: 5px;
  font-size: 0.76rem;
}

.school-context-ai-status {
  display: block;
  min-height: 1rem;
  color: #4c6470;
  font-size: 0.62rem;
  line-height: 1.4;
}

.school-context-ai-result {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid #bfcfd8;
  border-inline-start: 3px solid #2b6f91;
  border-radius: 5px;
  background: #fff;
}

.school-context-ai-result[hidden] {
  display: none;
}

.school-context-ai-result > div:first-child strong,
.school-context-ai-result > div:first-child span {
  display: block;
}

.school-context-ai-result > div:first-child strong {
  color: #274853;
  font-size: 0.71rem;
}

.school-context-ai-result > div:first-child span {
  margin-block-start: 0.18rem;
  color: #50666f;
  font-size: 0.65rem;
  line-height: 1.45;
}

.school-context-ai-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.school-context-ai-result ul,
.school-context-source-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.school-context-ai-result li,
.school-context-source-list li {
  display: grid;
  grid-template-columns: 0.9rem minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  min-width: 0;
  color: #4a615b;
  font-size: 0.62rem;
}

.school-context-ai-result li {
  grid-template-columns: minmax(0, 1fr);
}

.school-context-ai-result li a,
.school-context-ai-result li small,
.school-context-source-list a,
.school-context-source-list small {
  display: block;
  overflow-wrap: anywhere;
}

.school-context-ai-result li small,
.school-context-source-list small {
  margin-block-start: 0.08rem;
  color: var(--muted);
  font-size: 0.57rem;
}

.school-context-ai-result > p {
  margin: 0;
  padding-block-start: 0.45rem;
  border-block-start: 1px solid #e0e7ea;
  color: #785628;
  font-size: 0.61rem;
  line-height: 1.45;
}

.school-context-current-sources {
  display: grid;
  gap: 0.35rem;
  padding-block-start: 0.45rem;
  border-block-start: 1px solid #dce6ea;
}

.school-context-source-list .is-empty {
  color: var(--muted);
}

.school-context-wizard-note,
.school-context-readiness {
  display: flex;
  gap: 0.45rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d6e0dd;
  border-radius: 5px;
  background: #f8faf9;
  color: #4a5f59;
  font-size: 0.65rem;
  line-height: 1.4;
}

.school-context-readiness.is-warning {
  border-color: #dfc99c;
  background: #fff9ec;
  color: #74551d;
}

.school-context-wizard-progress {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-block: 1px solid #d9e3e0;
  background: #fafcfc;
  overflow-x: auto;
  scrollbar-width: thin;
}

.school-context-wizard-progress ol {
  display: grid;
  grid-template-columns: repeat(7, minmax(5rem, 1fr));
  min-width: 38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.school-context-wizard-progress li {
  position: relative;
  min-width: 0;
}

.school-context-wizard-progress li:not(:last-child)::after {
  position: absolute;
  inset-block-start: 0.8rem;
  inset-inline: calc(50% + 1rem) calc(-50% + 1rem);
  height: 1px;
  background: #cad7d3;
  content: "";
}

.school-context-wizard-progress li.is-past:not(:last-child)::after {
  background: #31917e;
}

.school-context-wizard-progress a {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  color: #667a74;
  font-size: 0.6rem;
  font-weight: 750;
  text-decoration: none;
}

.school-context-wizard-progress a > span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #c5d3cf;
  border-radius: 50%;
  background: #fff;
  color: #5b6f69;
  font-size: 0.61rem;
  font-weight: 850;
}

.school-context-wizard-progress .is-current a {
  color: #0f6355;
}

.school-context-wizard-progress .is-current a > span,
.school-context-wizard-progress .is-complete a > span {
  border-color: #247c6c;
  background: #e8f5f1;
  color: #0f6254;
}

.school-context-wizard-progress progress {
  width: 100%;
  height: 0.3rem;
  margin-block-start: 0.55rem;
  accent-color: #197765;
}

.school-context-wizard-actions {
  display: grid;
  grid-template-columns: auto minmax(14rem, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  padding-block-start: 0.7rem;
  border-block-start: 1px solid #e0e8e6;
}

.school-context-review {
  display: grid;
  gap: 0.7rem;
}

.school-context-review > ul,
.school-context-revisions ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.school-context-review > ul > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.45rem 0.2rem;
  border-block-end: 1px solid #e2e9e7;
}

.school-context-review li > span {
  display: flex;
  gap: 0.42rem;
  align-items: center;
  min-width: 0;
}

.school-context-review li > span:nth-child(2) {
  display: grid;
  justify-items: end;
}

.school-context-review li strong,
.school-context-review li b {
  font-size: 0.7rem;
}

.school-context-review li small {
  color: var(--muted);
  font-size: 0.58rem;
}

.school-context-review li a {
  font-size: 0.65rem;
  font-weight: 800;
}

.school-context-review > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.school-context-revisions {
  min-width: 0;
}

.school-context-revisions li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.8rem;
  border-block-end: 1px solid #e4ebe9;
}

.school-context-revisions li > div > strong,
.school-context-revisions li > div > small {
  display: block;
}

.school-context-revisions li > div > strong {
  color: #354b45;
  font-size: 0.67rem;
  line-height: 1.4;
}

.school-context-revisions li > div > small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.57rem;
}

.school-context-revision-number {
  color: #1d6d60;
  font-size: 0.64rem;
  font-weight: 850;
}

.school-context-readonly {
  display: grid;
  gap: 0.7rem;
}

.school-context-readonly-layer > div {
  display: grid;
  gap: 0.65rem;
  padding: 0.7rem;
}

.question-context-default {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  margin-block-end: 0.75rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid #c7d9d4;
  border-inline-start: 3px solid #1b7564;
  border-radius: 5px;
  background: #f4faf8;
}

.question-context-default > i {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: #176b5d;
}

.question-context-default strong,
.question-context-default small {
  display: block;
}

.question-context-default strong {
  color: #2e4942;
  font-size: 0.72rem;
}

.question-context-default small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.61rem;
}

.question-context-default > a {
  font-size: 0.65rem;
  font-weight: 800;
}

.question-context-preview {
  grid-column: 1 / -1;
  min-width: 0;
  padding-block-start: 0.45rem;
  border-block-start: 1px solid #d4e2de;
}

.question-context-preview > summary {
  color: #215e53;
  font-size: 0.64rem;
  font-weight: 800;
  cursor: pointer;
}

.question-context-preview > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-block-start: 0.45rem;
  border-block-start: 1px solid #dce7e4;
}

.question-context-preview section {
  min-width: 0;
  padding: 0.55rem;
  border-block-end: 1px solid #dce7e4;
}

.question-context-preview section:nth-child(odd) {
  border-inline-end: 1px solid #dce7e4;
}

.question-context-preview h3,
.question-context-preview p {
  margin: 0;
}

.question-context-preview h3 {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  color: #2f5148;
  font-size: 0.66rem;
}

.question-context-preview h3 i {
  width: 0.9rem;
  color: #247263;
  text-align: center;
}

.question-context-preview p,
.question-context-preview small {
  display: block;
  margin-block-start: 0.24rem;
  color: #50665f;
  font-size: 0.6rem;
  line-height: 1.45;
  white-space: pre-line;
}

.question-context-preview small {
  color: #6b5b37;
}

.question-context-default.is-warning {
  border-color: #dec895;
  border-inline-start-color: #b07a19;
  background: #fff9ec;
}

.question-context-default.is-muted {
  border-color: #d9e0de;
  border-inline-start-color: #84928e;
  background: #fafbfb;
}

.school-context-mode-switch a:focus-visible,
.school-context-layer > summary:focus-visible,
.school-context-readonly-layer > summary:focus-visible,
.school-context-wizard-progress a:focus-visible {
  outline: 3px solid rgba(27, 127, 255, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .school-context-summary-band {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .school-context-summary-band dl {
    grid-row: 2;
    grid-column: 1 / -1;
    border: 0;
    border-block-start: 1px solid #d9e3e0;
    padding-block-start: 0.55rem;
  }

  .school-context-scope-settings > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .school-context-summary-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-context-summary-band > div:last-child {
    grid-row: 2;
    justify-items: start;
    grid-template-columns: repeat(2, auto);
  }

  .school-context-summary-band dl {
    grid-row: 3;
  }

  .school-context-ai-command,
  .school-context-wizard-actions,
  .school-context-review > form {
    grid-template-columns: minmax(0, 1fr);
  }

  .school-context-ai-command .btn,
  .school-context-wizard-actions .btn,
  .school-context-review > form .btn {
    width: 100%;
    justify-content: center;
  }

  .school-context-wizard-actions > span:empty {
    display: none;
  }
}

@media (max-width: 520px) {
  .school-context-summary-band dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-context-summary-band dl > div {
    padding-block: 0.35rem;
  }

  .school-context-scope-settings > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-context-mode-switch {
    width: 100%;
  }

  .school-context-layer-editor,
  .school-context-readonly-layer > div {
    padding: 0.6rem;
  }

  .school-context-layer-heading {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .school-context-layer-heading .school-context-score {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .school-context-review > ul > li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .school-context-review li > a {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .question-context-default {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .question-context-default > a {
    grid-column: 2;
  }

  .question-context-preview > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .question-context-preview section:nth-child(odd) {
    border-inline-end: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .school-context-layer > summary > span:last-child i,
  .school-context-readonly-layer > summary > span:last-child i {
    transition: none;
  }
}

@media (forced-colors: active) {
  .school-context-summary-band,
  .school-context-mode-switch,
  .school-context-layer,
  .school-context-readonly-layer,
  .school-context-ai,
  .school-context-ai-result,
  .school-context-wizard-note,
  .school-context-readiness,
  .question-context-default {
    border: 2px solid CanvasText;
  }

  .school-context-scope-settings input:checked + span,
  .school-context-wizard-progress .is-current a > span,
  .school-context-wizard-progress .is-complete a > span {
    outline: 2px solid Highlight;
  }
}

/* Academic overflow containment must follow the DataTables base rules. */
.academic-workspace,
.academic-workspace > *,
.academic-table-surface,
.academic-class-detail {
  min-width: 0;
  max-width: 100%;
}

.academic-table-surface {
  overflow: hidden;
}

.academic-table-surface > .table-wrap,
.academic-class-detail .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  contain: inline-size;
}

.academic-table-surface .dt-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  contain: inline-size layout paint;
}

.academic-table-surface .dt-layout-table {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  overflow: hidden;
}

.academic-table-surface .dt-layout-table > .dt-layout-cell,
.academic-table-surface .dt-layout-table > div {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  contain: inline-size layout paint;
}

.academic-roster-result {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
}

@media (max-width: 700px), (any-pointer: coarse) {
  .academic-section-nav a {
    min-height: 2.75rem;
  }
}

/* Academic and people bulk operations */
.bulk-import-console,
.people-workspace,
.people-directory-layout,
.people-directory,
.people-editor {
  min-width: 0;
  max-width: 100%;
}

.bulk-import-console {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-inline-start: 4px solid #2563eb;
}

.bulk-import-console > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bulk-import-console > header h2,
.bulk-import-console > header p {
  margin: 0;
}

.bulk-import-console > header h2 {
  font-size: 1rem;
}

.bulk-import-console > header p:not(.eyebrow) {
  margin-block-start: 0.18rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.bulk-import-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.bulk-import-flow > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.4rem 0.65rem;
  color: #374151;
  font-size: 0.72rem;
  font-weight: 700;
}

.bulk-import-flow > span + span {
  border-inline-start: 1px solid var(--line);
}

.bulk-import-flow b {
  display: grid;
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1d4ed8;
  font-size: 0.68rem;
}

.bulk-import-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #f9fbfa;
}

.bulk-import-facts > span {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 0;
  padding: 0.48rem 0.65rem;
}

.bulk-import-facts > span + span {
  border-inline-start: 1px solid var(--line);
}

.bulk-import-facts i {
  grid-row: 1 / 3;
  color: #1d4ed8;
  font-size: 0.9rem;
}

.bulk-import-facts > span:nth-child(2) i {
  color: #a13f32;
}

.bulk-import-facts > span:nth-child(3) i {
  color: #0f766e;
}

.bulk-import-facts b,
.bulk-import-facts small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bulk-import-facts b {
  color: var(--ink);
  font-size: 0.75rem;
}

.bulk-import-facts small {
  color: var(--muted);
  font-size: 0.64rem;
}

.bulk-import-form {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
}

.bulk-import-form label {
  min-width: 0;
  margin: 0;
}

.bulk-import-form input[type="file"] {
  width: 100%;
  min-width: 0;
}

.bulk-import-form small {
  overflow-wrap: anywhere;
}

.bulk-import-form [data-file-name] {
  display: block;
  min-height: 1.1rem;
  margin-block-start: 0.18rem;
}

.bulk-import-form [data-file-name].is-ready {
  color: #116b4d;
}

.bulk-import-form [data-file-name].is-error {
  color: #a23e2e;
  font-weight: 700;
}

.bulk-import-submit-status {
  grid-column: 1 / -1;
  min-height: 1rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.bulk-import-guide {
  border-block-start: 1px solid var(--line);
}

.bulk-import-guide > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.bulk-import-guide > div {
  display: grid;
  gap: 0.4rem;
  padding-block: 0.15rem 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.bulk-import-guide p {
  margin: 0;
}

.bulk-import-guide code {
  color: #7c2d12;
  background: #fff7ed;
}

.bulk-job-panel {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border-inline-start: 4px solid #0f766e;
}

.bulk-job-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bulk-job-panel > header h2,
.bulk-job-panel > header p {
  margin: 0;
}

.bulk-job-panel > header h2 {
  max-width: 68ch;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.bulk-job-panel > header p:not(.eyebrow) {
  margin-block-start: 0.15rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.bulk-job-panel .status-processing {
  border-color: #bed1e3;
  background: #eef5fb;
  color: #2c638f;
}

.bulk-job-panel .status-expired {
  border-color: #d6dadd;
  background: #f3f5f6;
  color: #56616a;
}

.bulk-job-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.bulk-job-progress-track {
  height: 0.55rem;
  overflow: hidden;
  border: 1px solid #c9d8d4;
  border-radius: 999px;
  background: #edf2f1;
}

.bulk-job-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: #0f766e;
  transition: width 180ms ease;
}

.bulk-job-progress output {
  color: #41534e;
  font-size: 0.69rem;
  font-weight: 750;
  white-space: nowrap;
}

.bulk-job-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.bulk-job-counts > span {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  min-width: 0;
  padding: 0.42rem 0.6rem;
}

.bulk-job-counts > span + span {
  border-inline-start: 1px solid var(--line);
}

.bulk-job-counts b {
  color: var(--ink);
  font-size: 0.85rem;
}

.bulk-job-counts small {
  color: var(--muted);
  font-size: 0.65rem;
}

.bulk-job-panel > form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
}

.bulk-job-panel > form small,
.bulk-job-finished {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.bulk-job-finished {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.bulk-job-finished i {
  color: #116b4d;
}

.bulk-job-errors,
.bulk-job-history {
  border-block-start: 1px solid var(--line);
}

.bulk-job-errors > summary,
.bulk-job-history > summary {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.25rem;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 750;
}

.bulk-job-errors ul {
  display: grid;
  gap: 0.3rem;
  max-height: 13rem;
  margin: 0;
  padding: 0 0 0.35rem;
  overflow: auto;
  list-style: none;
}

.bulk-job-errors li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.38rem 0.5rem;
  border-inline-start: 3px solid #c64f3d;
  background: #fcf4f2;
  color: #6d352d;
  font-size: 0.69rem;
}

.bulk-job-history nav {
  display: grid;
  gap: 0.25rem;
  padding-block-end: 0.35rem;
}

.bulk-job-history a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.bulk-job-history a[aria-current="true"] {
  border-color: #8bb8ad;
  background: #f0f8f5;
}

.bulk-job-history a span,
.bulk-job-history a b,
.bulk-job-history a small {
  min-width: 0;
}

.bulk-job-history a b,
.bulk-job-history a small {
  display: block;
  overflow-wrap: anywhere;
}

.bulk-job-history a b {
  font-size: 0.7rem;
}

.bulk-job-history a small {
  margin-block-start: 0.1rem;
  color: var(--muted);
  font-size: 0.64rem;
}

.people-workspace {
  display: grid;
  gap: 0.85rem;
}

.people-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(19rem, 0.62fr);
  align-items: start;
  gap: 0.85rem;
}

.people-directory-layout > .people-directory:only-child {
  grid-column: 1 / -1;
}

.people-directory {
  overflow: hidden;
}

.people-directory-filter {
  display: grid;
  grid-template-columns: minmax(13rem, 1.6fr) repeat(3, minmax(7rem, 0.75fr)) repeat(2, 2.5rem);
  align-items: end;
  gap: 0.45rem;
  margin: 0 1rem 0.7rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.people-directory-filter label {
  display: grid;
  min-width: 0;
  gap: 0.24rem;
  color: #344541;
  font-size: 0.68rem;
  font-weight: 750;
}

.people-directory-filter input,
.people-directory-filter select {
  min-width: 0;
  min-height: 2.5rem;
  font-size: 0.75rem;
}

.people-directory-filter .icon-btn {
  width: 2.5rem;
  height: 2.5rem;
}

.people-directory > .table-wrap,
.people-directory .dt-container,
.people-directory .dt-layout-table > .dt-layout-cell,
.people-directory .dt-layout-table > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.people-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0.7rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.69rem;
}

.people-pagination > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.people-pagination a,
.people-pagination [aria-current="page"] {
  display: inline-grid;
  min-width: 2.25rem;
  min-height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #315b52;
  text-decoration: none;
}

.people-pagination [aria-current="page"] {
  border-color: #8bbbad;
  background: #e9f4f0;
  color: #0c6859;
  font-weight: 800;
}

.people-editor {
  position: sticky;
  top: 4.25rem;
  gap: 0.65rem;
}

.people-editor > header {
  align-items: flex-start;
}

.people-editor > header h2,
.people-editor > header p {
  margin: 0;
}

.people-editor > header h2 {
  font-size: 1rem;
}

.people-editor > header p:not(.eyebrow) {
  margin-block-start: 0.18rem;
  color: var(--muted);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .people-directory-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .people-editor {
    position: static;
  }
}

@media (max-width: 700px) {
  .bulk-import-console {
    padding: 0.8rem;
  }

  .bulk-import-console > header,
  .bulk-import-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .bulk-import-console > header {
    display: grid;
  }

  .bulk-import-console > header .btn,
  .bulk-import-form .btn {
    width: 100%;
  }

  .bulk-job-panel > header,
  .bulk-job-panel > form,
  .bulk-job-progress {
    grid-template-columns: minmax(0, 1fr);
  }

  .bulk-job-panel > header {
    display: grid;
  }

  .bulk-job-panel > header .status-badge {
    justify-self: start;
  }

  .bulk-job-panel > form .btn {
    width: 100%;
  }

  .bulk-job-progress output {
    white-space: normal;
  }

  .bulk-import-flow > span {
    align-items: flex-start;
    min-height: 3.2rem;
    padding-inline: 0.4rem;
  }

  .people-directory-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0.8rem;
  }

  .people-directory-filter > label:first-of-type {
    grid-column: 1 / -1;
  }

  .people-directory-filter .icon-btn {
    width: 100%;
  }

  .people-pagination {
    align-items: flex-start;
    margin-inline: 0.8rem;
  }
}

@media (max-width: 420px) {
  .bulk-import-facts,
  .bulk-job-counts {
    grid-template-columns: minmax(0, 1fr);
  }

  .bulk-import-facts > span + span,
  .bulk-job-counts > span + span {
    border-block-start: 1px solid var(--line);
    border-inline-start: 0;
  }

  .bulk-import-flow {
    grid-template-columns: minmax(0, 1fr);
    border-block-end: 0;
  }

  .bulk-import-flow > span + span {
    border-block-start: 1px solid var(--line);
    border-inline-start: 0;
  }

  .people-directory-filter > label {
    grid-column: 1 / -1;
  }
}

@media (forced-colors: active) {
  .bulk-import-console,
  .bulk-import-facts,
  .bulk-import-flow,
  .bulk-import-guide,
  .bulk-job-panel,
  .bulk-job-progress-track,
  .bulk-job-counts,
  .bulk-job-errors,
  .bulk-job-history {
    border-color: CanvasText;
  }

  .bulk-import-flow b {
    color: HighlightText;
    background: Highlight;
  }

  .bulk-job-progress-track > span {
    background: Highlight;
  }
}

@media print {
  .bulk-import-console,
  .bulk-job-panel > form,
  .people-directory-filter,
  .people-pagination,
  .people-editor .form-actions,
  .people-directory .icon-btn {
    display: none !important;
  }
}
