:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-strong: #eef3f4;
  --ink: #20242b;
  --muted: #626b76;
  --line: #d7dce2;
  --accent: #1e7f75;
  --accent-strong: #145f58;
  --amber: #b46212;
  --blue: #365fa8;
  --shadow: 0 18px 50px rgb(25 32 44 / 8%);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid rgb(215 220 226 / 84%);
  background: rgb(246 247 249 / 92%);
  padding: 0 32px;
  backdrop-filter: blur(16px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.topbar__brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.topbar__brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.83rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgb(25 32 44 / 7%);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar__link {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.62rem 0.78rem;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
  white-space: nowrap;
}

.topbar__link:hover,
.topbar__link:focus {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}

.auth-menu {
  position: relative;
}

.auth-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  padding: 0;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.auth-avatar:hover,
.auth-avatar:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 8px 22px rgb(25 32 44 / 12%);
  transform: translateY(-1px);
}

.auth-avatar img {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.auth-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  z-index: 30;
  display: grid;
  min-width: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgb(25 32 44 / 14%);
}

.auth-menu__panel[hidden] {
  display: none;
}

.auth-menu__identity {
  display: grid;
  gap: 0.1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
}

.auth-menu__identity strong {
  line-height: 1.25;
}

.auth-menu__identity span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-menu__panel a,
.auth-menu__panel button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.8rem 1rem;
  text-align: left;
  text-decoration: none;
}

.auth-menu__panel a:hover,
.auth-menu__panel a:focus,
.auth-menu__panel button:hover,
.auth-menu__panel button:focus {
  background: var(--surface-strong);
}

.account-panel {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.account-intro,
.account-bar,
.account-form,
.account-result,
.account-workspace,
.account-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgb(25 32 44 / 6%);
}

.account-intro,
.account-form,
.account-result,
.account-workspace,
.account-message {
  padding: 1.25rem;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.account-bar span,
.account-form label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-bar strong {
  display: block;
  margin-top: 0.1rem;
}

.account-primary,
.account-secondary {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  min-height: 42px;
  padding: 0.75rem 0.95rem;
  text-decoration: none;
}

.account-primary {
  background: var(--accent);
  color: #ffffff;
}

.account-primary:hover,
.account-primary:focus {
  background: var(--accent-strong);
}

.account-primary:disabled {
  cursor: progress;
  opacity: 0.72;
}

.account-primary--inline {
  margin-top: 1rem;
}

.account-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-strong);
}

.account-secondary:hover,
.account-secondary:focus {
  border-color: var(--accent);
  color: var(--ink);
}

.account-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.account-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
}

.account-form p,
.account-intro p,
.account-workspace p,
.account-message {
  color: var(--muted);
}

.account-result {
  border-color: rgb(30 127 117 / 32%);
  background: #f7fbfa;
}

.account-result h2,
.account-result h3,
.account-list h2,
.account-workspace h3 {
  margin: 0;
}

.account-result h3 {
  margin-top: 1.2rem;
  font-size: 0.95rem;
}

.account-result pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #20242b;
  color: #ffffff;
  margin: 0.5rem 0 0;
  padding: 1rem;
}

.account-list {
  display: grid;
  gap: 0.85rem;
}

.account-workspace dl {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.account-workspace dl div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.75rem;
}

.account-workspace dt {
  color: var(--muted);
  font-weight: 800;
}

.account-workspace dd {
  margin: 0;
}

.account-message--error {
  border-color: rgb(180 98 18 / 34%);
  background: #fff8ef;
  color: #6d3a08;
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 72px);
}

.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  border-right: 1px solid var(--line);
  padding: 32px 24px;
  overflow: auto;
}

.sidebar__eyebrow,
.section-kicker {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
}

.nav-link {
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.is-active {
  border-color: var(--accent);
  background: rgb(255 255 255 / 72%);
  color: var(--ink);
  transform: translateX(2px);
}

.content {
  max-width: 1040px;
  width: 100%;
  padding: 56px 56px 88px;
}

.doc-section {
  border-bottom: 1px solid var(--line);
  padding: 40px 0 56px;
}

.doc-section:first-child {
  padding-top: 0;
}

.doc-section--last {
  border-bottom: 0;
}

h1,
h2 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.15rem, 3.2vw, 3.6rem);
  font-weight: 760;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  font-weight: 740;
}

.section-heading {
  margin-top: 2rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
}

p {
  max-width: 780px;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.lede {
  color: #3f4854;
  font-size: clamp(1.1rem, 2vw, 1.38rem);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.phase-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.decision-grid,
.stage-grid,
.workflow-groups {
  display: grid;
  gap: 1px;
  margin-top: 1.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

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

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

.decision-grid div,
.stage-grid div,
.workflow-groups div,
.mode-grid div {
  background: var(--surface);
  padding: 1.25rem;
}

.decision-grid span,
.stage-grid span,
.workflow-groups span {
  display: block;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.decision-grid strong,
.stage-grid strong,
.mode-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
  margin-top: 0.2rem;
}

.decision-grid p,
.stage-grid p,
.mode-grid p {
  margin-top: 0.45rem;
  font-size: 0.92rem;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.workflow-groups ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.workflow-groups li {
  color: #34404b;
  font-weight: 650;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.outcome-grid section {
  background: var(--surface);
  padding: 1.25rem;
}

.outcome-grid span,
.outcome-compare span {
  display: block;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 820;
  text-transform: uppercase;
}

.outcome-grid h3 {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
}

.outcome-grid p,
.outcome-compare p,
.outcome-list p {
  margin-top: 0.45rem;
  font-size: 0.94rem;
}

.outcome-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.outcome-compare div,
.outcome-list div {
  background: var(--surface);
  padding: 1.25rem;
}

.outcome-compare strong,
.outcome-list strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
  margin-top: 0.2rem;
}

.outcome-list {
  display: grid;
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.flow-diagram {
  display: grid;
  grid-template-columns:
    minmax(88px, 1fr) auto minmax(88px, 1fr) auto minmax(88px, 1fr) auto
    minmax(88px, 1fr) auto minmax(88px, 1fr) auto minmax(88px, 1fr) auto minmax(88px, 1fr);
  align-items: stretch;
  gap: 0.45rem;
  margin-top: 2rem;
}

.flow-node {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.flow-node span,
.flow-detail-grid span,
.record-groups section > span {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 820;
  text-transform: uppercase;
}

.flow-node strong,
.flow-detail-grid strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-size: 1.4rem;
  font-weight: 720;
}

.flow-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.flow-detail-grid > div {
  background: var(--surface);
  padding: 1.2rem;
}

.flow-detail-grid p {
  margin-top: 0.45rem;
  font-size: 0.94rem;
}

.flow-detail-grid ul {
  display: grid;
  gap: 0.25rem;
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.flow-detail-grid li {
  color: #34404b;
  font-size: 0.92rem;
  font-weight: 630;
}

.phase-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.phase-index a {
  display: grid;
  align-content: start;
  min-height: 150px;
  background: var(--surface);
  color: inherit;
  padding: 1.25rem;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.phase-index a:hover,
.phase-index a:focus {
  background: #f8fbfb;
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.phase-index span {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 820;
}

.phase-index strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 780;
  margin-top: 0.25rem;
}

.phase-index p {
  margin-top: 0.45rem;
  font-size: 0.94rem;
}

.lane-workflow {
  display: grid;
  gap: 1px;
  margin-top: 1.8rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.lane-workflow--three {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.lane-workflow--two {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.lane-workflow--four {
  grid-template-columns: repeat(4, minmax(185px, 1fr));
}

.lane-workflow--five {
  grid-template-columns: repeat(5, minmax(165px, 1fr));
}

.lane-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf4f3;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 820;
  padding: 0.75rem 0.9rem;
  text-transform: uppercase;
}

.lane-cell {
  min-height: 92px;
  background: var(--surface);
  padding: 0.75rem;
}

.work-step {
  min-height: 68px;
  border: 1px solid rgb(30 127 117 / 28%);
  border-radius: 8px;
  background: #f7fbfa;
  color: #2d3b3c;
  display: grid;
  align-content: center;
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.35;
  padding: 0.75rem;
}

.work-step--choice {
  border-color: rgb(180 98 18 / 36%);
  background: #fff8ef;
  color: #5d3f1d;
}

.phase-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.phase-summary section {
  background: var(--surface);
  padding: 1.25rem;
}

.phase-summary h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.phase-summary ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.phase-summary li {
  color: #34404b;
  font-size: 0.94rem;
  font-weight: 630;
}

.phase-summary p {
  margin-top: 0.8rem;
  font-size: 0.94rem;
}

.phase-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.phase-nav a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 760;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.phase-nav a:hover,
.phase-nav a:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.record-groups {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.8rem;
}

.record-groups section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.record-groups h2 {
  margin-top: 0.2rem;
  font-size: 1.28rem;
  line-height: 1.2;
}

.record-list {
  display: grid;
  gap: 1px;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.record-item {
  background: var(--surface);
}

.record-item summary {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 66px;
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1rem;
}

.record-item summary::-webkit-details-marker {
  display: none;
}

.record-item summary::after {
  content: "+";
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
  color: var(--accent-strong);
  font-weight: 820;
}

.record-item[open] summary::after {
  content: "-";
  background: var(--accent);
  color: white;
}

.record-item summary:hover,
.record-item summary:focus {
  background: #f8fbfb;
  outline: none;
}

.record-name {
  color: var(--ink);
  font-weight: 780;
}

.record-summary {
  color: var(--muted);
}

.record-fields {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.record-item:not([open]) .record-fields {
  display: none;
}

.record-fields div {
  display: grid;
  grid-template-columns: minmax(145px, 0.24fr) auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  background: #fbfcfd;
  padding: 0.82rem 1rem;
}

.record-fields span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
}

.record-fields b {
  min-width: 76px;
  border: 1px solid rgb(30 127 117 / 22%);
  border-radius: 999px;
  background: #eef6f4;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 780;
  line-height: 1.4;
  padding: 0.1rem 0.45rem;
  text-align: center;
}

.record-fields p {
  margin: 0;
  font-size: 0.9rem;
}

.record-groups dl {
  display: grid;
  gap: 1px;
  margin: 1rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.record-groups dl div {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  gap: 1rem;
  background: var(--surface);
  padding: 0.95rem 1rem;
}

.record-groups dt {
  color: var(--ink);
  font-weight: 780;
}

.record-groups dd {
  margin: 0;
  color: var(--muted);
}

.principles div,
.phase-map div,
.charter-field,
.system-flow div {
  background: var(--surface);
  padding: 1.25rem;
}

.principles span,
.phase-map span {
  display: block;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
}

.principles strong,
.phase-map strong,
.charter-field span,
.system-flow strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
}

.principles p,
.phase-map p,
.charter-field p,
.system-flow p {
  margin-top: 0.45rem;
  font-size: 0.92rem;
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.next-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 760;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.next-links a:hover,
.next-links a:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.charter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.note {
  max-width: 780px;
  margin-top: 1.4rem;
  border-left: 4px solid var(--accent);
  background: var(--surface-strong);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #39424d;
  padding: 1rem 1.15rem;
}

.note strong {
  color: var(--accent-strong);
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.role-list button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.role-list button:hover,
.role-list button:focus,
.role-list button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

.detail-panel {
  min-height: 82px;
  border-left: 4px solid var(--blue);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  color: #35404c;
  padding: 1rem 1.1rem;
}

.object-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.object-columns ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  background: var(--surface);
  list-style: none;
  padding: 1.15rem;
}

.object-columns li {
  color: #2f3741;
  font-weight: 680;
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.system-flow span {
  display: block;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 760;
  margin-top: 0.25rem;
}

.az-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.az-index a,
.az-index span {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
  text-decoration: none;
}

.az-index a:hover,
.az-index a:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.az-index span {
  background: #eef0f2;
  color: #9aa2ad;
  cursor: not-allowed;
}

.glossary-alpha {
  display: grid;
  gap: 2rem;
  margin-top: 2.2rem;
}

.glossary-letter {
  scroll-margin-top: 92px;
}

.glossary-letter h2 {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 1.25rem;
  font-weight: 820;
}

.glossary-list {
  display: grid;
  gap: 1px;
  margin: 1rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.glossary-list div {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  background: var(--surface);
  padding: 1rem 1.15rem;
}

.glossary-list dt {
  color: var(--ink);
  font-weight: 780;
}

.glossary-list dt span {
  display: inline-block;
  margin-left: 0.5rem;
  border: 1px solid rgb(30 127 117 / 24%);
  border-radius: 999px;
  background: #eef6f4;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.4;
  padding: 0.1rem 0.45rem;
  vertical-align: 0.08rem;
}

.glossary-list dd {
  margin: 0;
  color: var(--muted);
}

.glossary-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .topbar__actions {
    flex-wrap: wrap;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    padding: 18px 20px;
  }

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

  .content {
    padding: 34px 20px 64px;
  }

  .principles,
  .phase-map,
  .flow-diagram,
  .flow-detail-grid,
  .phase-index,
  .phase-summary,
  .outcome-grid,
  .outcome-compare,
  .system-flow,
  .decision-grid,
  .stage-grid,
  .workflow-groups,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    gap: 0.6rem;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .charter-grid,
  .object-columns,
  .record-groups dl div,
  .record-item summary,
  .record-fields div,
  .account-form__row,
  .account-workspace dl div,
  .glossary-list div {
    grid-template-columns: 1fr;
  }

  .account-bar {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (max-width: 520px) {
  .sidebar nav {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }
}

.dashboard-shell {
  min-height: 100vh;
  background: #f4f6f5;
  overflow-x: clip;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgb(244 246 245 / 94%);
  padding: 0 24px;
  backdrop-filter: blur(14px);
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dash-brand strong,
.dash-brand small {
  display: block;
}

.dash-brand small,
.dash-account,
.dash-muted {
  color: var(--muted);
}

.dash-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-account {
  font-size: 0.9rem;
  font-weight: 700;
}

.dash-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.dash-sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  height: calc(100vh - 68px);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 20px 14px;
}

.dash-workspace {
  display: grid;
  gap: 0.15rem;
  border-bottom: 1px solid var(--line);
  margin: 0 6px 14px;
  padding: 0 0 16px;
}

.dash-workspace span,
.dash-workspace small {
  color: var(--muted);
  font-size: 0.78rem;
}

.dash-workspace strong {
  line-height: 1.25;
}

.dash-sidebar nav {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.dash-nav-link {
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.68rem 0.75rem;
  text-decoration: none;
}

.dash-nav-link:hover,
.dash-nav-link:focus,
.dash-nav-link.is-active {
  background: var(--surface-strong);
  color: var(--accent-strong);
}

.dash-main {
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
  padding: 28px;
}

.dash-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.dash-header p {
  margin: 0 0 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}

.dash-header h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.05;
}

.dash-header small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.95rem;
}

.dash-readonly {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  padding: 0.52rem 0.68rem;
  text-transform: uppercase;
}

.dash-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dash-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.dash-strip-item {
  display: grid;
  min-height: 104px;
  align-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
  padding: 0.9rem;
  text-decoration: none;
}

.dash-strip-item:hover,
.dash-strip-item:focus {
  border-color: var(--accent);
}

.dash-strip-item span,
.dash-strip-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.2;
}

.dash-strip-item strong {
  font-size: 1.65rem;
  line-height: 1;
}

.dash-phase-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dash-phase-tab {
  display: grid;
  min-height: 92px;
  align-content: space-between;
  gap: 0.35rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-width: 0;
  padding: 0.78rem;
  text-align: left;
}

.dash-phase-tab:last-child {
  border-right: 0;
}

.dash-phase-tab span,
.dash-phase-tab small {
  overflow-wrap: anywhere;
}

.dash-phase-tab span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1.15;
}

.dash-phase-tab strong {
  font-size: 1.5rem;
  line-height: 1;
}

.dash-phase-tab small {
  color: #8a4a1f;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.15;
}

.dash-phase-tab.is-history {
  background: #f7faf9;
}

.dash-phase-tab.is-frontier {
  background: #edf7f3;
}

.dash-phase-tab.is-untouched {
  background: #ffffff;
}

.dash-phase-tab.is-active,
.dash-phase-tab:hover,
.dash-phase-tab:focus {
  box-shadow: inset 0 -4px 0 var(--accent);
  color: var(--accent-strong);
  outline: 0;
}

.dash-phase-tab.is-active span,
.dash-phase-tab.is-active strong {
  color: var(--accent-strong);
}

.dash-phase-panel {
  display: none;
  min-width: 0;
}

.dash-phase-panel.is-active {
  display: grid;
  gap: 16px;
}

.dash-phase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dash-phase-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.dash-phase-head p {
  max-width: 780px;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.dash-phase-head span {
  flex: 0 0 auto;
  border: 1px solid #efc18c;
  border-radius: 999px;
  background: #fff8ed;
  color: #744019;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  padding: 0.5rem 0.62rem;
  white-space: nowrap;
}

.dash-phase-sections {
  display: grid;
  gap: 12px;
}

.dash-tile,
.dash-record-head,
.dash-section,
.dash-centered,
.dash-select-list a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.dash-tile {
  display: grid;
  min-height: 124px;
  align-content: space-between;
  gap: 0.6rem;
  color: inherit;
  padding: 1rem;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.dash-tile:hover,
.dash-tile:focus {
  border-color: var(--accent);
  box-shadow: 0 16px 38px rgb(25 32 44 / 9%);
  transform: translateY(-2px);
}

.dash-tile span,
.dash-tile small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.dash-tile strong {
  font-size: 2.2rem;
  line-height: 1;
}

.dash-section,
.dash-record-head {
  min-width: 0;
  padding: 18px;
}

.dash-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 14px;
}

.dash-section h2,
.dash-section__head h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.dash-section__head h2 {
  margin: 0;
}

.dash-section__head a {
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

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

.dash-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

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

.dash-table td {
  font-size: 0.9rem;
}

.dash-table a {
  color: var(--accent-strong);
  font-weight: 780;
  text-decoration: none;
}

.dash-table small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.12rem;
}

.dash-record-head {
  display: grid;
  gap: 1rem;
}

.dash-record-head dl,
.dash-field-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.dash-record-head dl {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dash-record-head div,
.dash-field-list div {
  min-width: 0;
}

.dash-record-head dt,
.dash-field-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dash-record-head dd,
.dash-field-list dd {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

.dash-field-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dash-history {
  display: grid;
  gap: 0.75rem;
}

.dash-history article {
  border-left: 3px solid var(--accent);
  background: #f7faf9;
  padding: 0.8rem 0.9rem;
}

.dash-history strong,
.dash-history time {
  display: block;
}

.dash-history time {
  color: var(--muted);
  font-size: 0.78rem;
}

.dash-link-list,
.dash-select-list {
  display: grid;
  gap: 0.65rem;
}

.dash-link-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dash-link-list a,
.dash-select-list a {
  display: grid;
  gap: 0.15rem;
  color: inherit;
  padding: 0.85rem;
  text-decoration: none;
}

.dash-link-list a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.dash-link-list span,
.dash-link-list small,
.dash-select-list small {
  color: var(--muted);
  font-size: 0.78rem;
}

.dash-value-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1rem;
}

.dash-json {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  color: #263139;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.8rem;
}

.dash-json--compact {
  margin-top: 0.6rem;
}

.dash-empty,
.dash-loading {
  color: var(--muted);
  padding: 1rem 0;
}

.dash-centered {
  display: grid;
  gap: 1rem;
  margin: 12vh auto 0;
  max-width: 520px;
  padding: 2rem;
}

.dash-centered h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.08;
}

.dash-centered p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .dash-layout {
    display: block;
  }

  .dash-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dash-sidebar nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .dash-main {
    padding: 20px;
  }

  .dash-phase-tabs {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    overflow: hidden;
  }

  .dash-phase-tab {
    min-width: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .dash-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .dash-topbar__actions {
    width: 100%;
    justify-content: space-between;
  }

  .dash-header {
    grid-template-columns: 1fr;
  }

  .dash-readonly {
    justify-self: start;
  }

  .dash-main {
    padding: 16px;
  }

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

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

  .dash-strip-item {
    min-height: 96px;
  }

  .dash-phase-head {
    display: grid;
  }

  .dash-phase-head span {
    justify-self: start;
    white-space: normal;
  }
}
