:root {
  --ink: #0f100c;
  --paper: #f7f4ed;
  --paper-deep: #ece6d9;
  --stone: #d7d0c2;
  --moss: #66755b;
  --moss-deep: #4c5844;
  --persimmon: #bc6a3e;
  --persimmon-deep: #93502b;
  --mist: #faf8f3;
  --line: rgba(15, 16, 12, 0.12);
  --line-strong: rgba(15, 16, 12, 0.2);
  --text-soft: rgba(15, 16, 12, 0.72);
  --text-muted: rgba(15, 16, 12, 0.54);
  --shadow-soft: 0 1px 2px rgba(15, 16, 12, 0.04);
  --shadow-lift: 0 10px 24px rgba(15, 16, 12, 0.08);
  --radius-large: 30px;
  --radius-medium: 22px;
  --radius-small: 16px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 72px;
  --font-sans: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app-body {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(102, 117, 91, 0.35);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--moss-deep);
}

p,
li,
dd {
  color: var(--text-soft);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

.mono {
  overflow-wrap: anywhere;
}

code {
  border-radius: 999px;
  background: rgba(15, 16, 12, 0.06);
  padding: 0.15rem 0.45rem;
  color: var(--ink);
}

pre {
  margin: 0;
  overflow-x: auto;
  border-radius: var(--radius-medium);
  background: #171813;
  color: #f6f1e6;
  padding: 1.25rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--ink);
  padding: 0.82rem 0.95rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 0.8rem;
  background: #fafaf9;
  color: var(--text-soft);
  padding: 0.82rem 0.95rem;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--moss);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(102, 117, 91, 0.62);
  box-shadow: 0 0 0 4px rgba(102, 117, 91, 0.14);
  background: #fff;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  border-right: 1px solid #ecebe8;
  background: #f6f5f2;
  padding: 1.4rem 1rem 1rem;
}

.sidebar-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 1.35rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-mark {
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.sidebar-brand__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sidebar-product {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-brand__caret {
  margin-left: auto;
  height: 0.55rem;
  width: 0.55rem;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg) translateY(-1px);
}

.sidebar-copy {
  max-width: 14rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.nav-primary,
.nav-group__items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nav-group__label {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group__items {
  position: relative;
  margin-left: 0.55rem;
  padding-left: 0.8rem;
}

.nav-group__items::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 1px;
  background: #ddd9d0;
}

.nav-link {
  position: relative;
  display: block;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.68rem 0.8rem;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.nav-link__icon {
  display: inline-flex;
  height: 1rem;
  width: 1rem;
  flex: none;
  align-items: center;
  justify-content: center;
  color: #6f726b;
}

.nav-link__icon svg {
  height: 100%;
  width: 100%;
}

.nav-link__label {
  min-width: 0;
}

.nav-link--primary {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  font-weight: 600;
}

.nav-link--branch {
  padding: 0.56rem 0.72rem;
  font-size: 0.9rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.nav-link--current {
  border-color: #e2e1de;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 2px 0 0 #5d6eea;
}

.nav-link--current .nav-link__icon {
  color: #3443a1;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid #e2dfd7;
  padding-top: 0.85rem;
}

.sidebar-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-main {
  padding: 0.75rem;
}

.app-frame,
.public-frame {
  margin: 0 auto;
  max-width: 1320px;
}

.app-frame {
  min-height: calc(100vh - 1.5rem);
  border: 1px solid #e7e5e2;
  border-radius: 1.1rem;
  background: #fff;
  overflow: hidden;
}

.frame-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  padding: 0.95rem 1.45rem 0;
  border-bottom: 1px solid #ecebe8;
}

.frame-tab {
  display: inline-flex;
  align-items: center;
  padding: 0 0 0.95rem;
  border-bottom: 2px solid transparent;
  color: #656762;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.frame-tab:hover {
  color: var(--ink);
}

.frame-tab--current {
  border-bottom-color: #5d6eea;
  color: #3443a1;
  font-weight: 700;
}

.frame-body {
  padding: 1.5rem 1.6rem 2rem;
}

.public-shell {
  min-height: 100vh;
  padding: 1rem;
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.flash {
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.95rem 1.1rem;
  font-size: 0.95rem;
}

.flash--notice {
  border-color: rgba(102, 117, 91, 0.22);
  background: rgba(102, 117, 91, 0.1);
  color: var(--moss-deep);
}

.flash--alert {
  border-color: rgba(188, 106, 62, 0.24);
  background: rgba(188, 106, 62, 0.1);
  color: var(--persimmon-deep);
}

.toast-stack {
  pointer-events: none;
  position: fixed;
  right: 1.25rem;
  top: 1.25rem;
  z-index: 50;
  display: flex;
  max-width: min(22rem, calc(100vw - 2.5rem));
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  border-radius: 0.9rem;
  border: 1px solid #deddd8;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-lift);
  color: var(--ink);
  font-size: 0.94rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  border-color: rgba(102, 117, 91, 0.24);
}

.toast--error {
  border-color: rgba(188, 106, 62, 0.26);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 1.25rem;
  align-items: start;
}

.page-hero--narrow {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.page-title {
  max-width: none;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  line-height: 1.02;
}

.page-title--wide {
  max-width: none;
}

.page-summary {
  max-width: 44rem;
  font-size: 0.96rem;
  line-height: 1.65;
}

.page-rail,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.rail-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.surface {
  border: 1px solid #ecebe8;
  border-radius: 0.95rem;
  background: #fff;
  padding: 1.1rem;
}

.surface--quiet {
  background: #fcfcfb;
}

.surface--accent {
  border-color: rgba(102, 117, 91, 0.24);
  background: rgba(102, 117, 91, 0.08);
}

.surface--warning {
  border-color: rgba(188, 106, 62, 0.22);
  background: rgba(188, 106, 62, 0.08);
}

.surface--danger {
  border-color: rgba(188, 106, 62, 0.28);
  background: rgba(188, 106, 62, 0.1);
}

.surface--success {
  border-color: rgba(102, 117, 91, 0.24);
  background: rgba(102, 117, 91, 0.08);
}

.surface-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.surface-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

.surface-copy {
  margin-top: 0.35rem;
  max-width: 38rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack--tight {
  gap: 0.65rem;
}

.stack--loose {
  gap: 1.5rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

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

.split-layout--wide {
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
}

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

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

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

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

.metric-card {
  display: flex;
  min-height: 11rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.metric-value {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric-note {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill--success {
  border-color: rgba(102, 117, 91, 0.22);
  background: rgba(102, 117, 91, 0.12);
  color: var(--moss-deep);
}

.status-pill--warning {
  border-color: rgba(188, 106, 62, 0.22);
  background: rgba(188, 106, 62, 0.12);
  color: var(--persimmon-deep);
}

.status-pill--danger {
  border-color: rgba(138, 70, 53, 0.2);
  background: rgba(138, 70, 53, 0.1);
  color: #8a4635;
}

.status-pill--neutral {
  border-color: rgba(15, 16, 12, 0.08);
  background: rgba(15, 16, 12, 0.05);
  color: var(--text-soft);
}

.status-pill--info {
  border-color: rgba(84, 108, 134, 0.22);
  background: rgba(84, 108, 134, 0.1);
  color: #4f677f;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.button-group--center {
  justify-content: center;
}

.button,
.button_to {
  margin: 0;
}

.button_to {
  display: inline-flex;
}

.button,
.button_to button,
.button_to input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.72rem 0.95rem;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.button:hover,
.button_to button:hover,
.button_to input[type="submit"]:hover {
  transform: none;
}

.button--small,
.button_to .button--small {
  padding: 0.6rem 0.82rem;
  font-size: 0.84rem;
}

.button--full,
.button_to .button--full {
  width: 100%;
}

.button--primary,
.button_to .button--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button--secondary,
.button_to .button--secondary {
  border-color: #deddd8;
  background: #fff;
  color: var(--ink);
}

.button--accent,
.button_to .button--accent {
  border-color: var(--moss);
  background: var(--moss);
  color: #fff;
}

.button--warm,
.button_to .button--warm {
  border-color: var(--persimmon);
  background: var(--persimmon);
  color: #fff;
}

.button--danger,
.button_to .button--danger {
  border-color: #8a4635;
  background: #8a4635;
  color: #fff;
}

.button--ghost,
.button_to .button--ghost {
  border-color: transparent;
  background: rgba(15, 16, 12, 0.04);
  color: var(--ink);
}

.quiet-link {
  color: var(--text-soft);
  font-weight: 600;
}

.text-success {
  color: var(--moss-deep);
}

.text-warning {
  color: var(--persimmon-deep);
}

.text-danger {
  color: #8a4635;
}

.muted {
  color: var(--text-muted);
}

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

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

.definition-grid dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.definition-grid dd {
  margin: 0.5rem 0 0;
  color: var(--ink);
  line-height: 1.65;
}

.key-values {
  display: grid;
  gap: 0.7rem;
}

.key-values li {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.key-values li:first-child {
  border-top: 0;
  padding-top: 0;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid #ecebe8;
  border-radius: 0.95rem;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.data-table thead th {
  border-bottom: 1px solid #ecebe8;
  background: #fafaf9;
  padding: 0.9rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.data-table tbody td {
  border-top: 1px solid #ecebe8;
  padding: 0.95rem 1rem;
  vertical-align: top;
  color: var(--text-soft);
}

.data-table tbody tr:first-child td {
  border-top: 0;
}

.data-table tbody tr:hover td {
  background: rgba(247, 244, 237, 0.56);
}

.table-title {
  color: var(--ink);
  font-weight: 700;
}

.table-meta {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.list-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.15rem 0;
}

.list-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.list-row:last-child {
  padding-bottom: 0;
}

.list-row__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.45rem;
}

.list-row__title {
  color: var(--ink);
  font-weight: 700;
}

.list-row__aside {
  min-width: 9rem;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.callout {
  border: 1px solid #ecebe8;
  border-radius: 0.9rem;
  background: #fcfcfb;
  padding: 1rem 1.1rem;
}

.callout--info {
  border-color: rgba(84, 108, 134, 0.2);
  background: rgba(84, 108, 134, 0.08);
}

.callout--success {
  border-color: rgba(102, 117, 91, 0.24);
  background: rgba(102, 117, 91, 0.1);
}

.callout--warning {
  border-color: rgba(188, 106, 62, 0.22);
  background: rgba(188, 106, 62, 0.1);
}

.callout--danger {
  border-color: rgba(138, 70, 53, 0.24);
  background: rgba(138, 70, 53, 0.1);
}

.callout-title {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.step-list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.step-index {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.form-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label,
.field .field-label {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.field-help {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

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

.choice-card {
  display: flex;
  gap: 0.9rem;
  border: 1px solid #ecebe8;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.9rem 0.95rem;
}

.choice-card input {
  margin-top: 0.2rem;
}

.choice-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.panel-list > * {
  margin: 0;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-panel {
  border-top: 1px solid #ecebe8;
  padding-top: 0.95rem;
}

.space-top-sm {
  margin-top: 0.9rem;
}

.space-top {
  margin-top: 1rem;
}

.space-bottom {
  margin-bottom: 1.25rem;
}

.header-flush {
  margin-bottom: 0;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.resource-card {
  border: 1px solid #ecebe8;
  border-radius: 0.85rem;
  background: #fafaf9;
  padding: 0.85rem 0.95rem;
}

.resource-card__meta {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.inline-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.json-block {
  background: #171813;
  color: #f6f1e6;
}

.center-card {
  margin: 0 auto;
  max-width: 34rem;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}

.hero-card strong {
  color: var(--ink);
}

.public-panel {
  margin: 0 auto;
  max-width: 38rem;
}

.workspace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-title {
  color: var(--ink);
  font-size: clamp(2rem, 2.7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.workspace-subtitle {
  margin-top: 0.45rem;
  max-width: 44rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.metric-pill {
  min-width: 9rem;
  border: 1px solid #ecebe8;
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.85rem 0.95rem;
}

.metric-pill__label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-pill__value {
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.search-shell {
  min-width: min(100%, 18rem);
}

.search-input {
  width: 100%;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.detail-main,
.detail-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.wizard-main,
.wizard-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-rail .definition-grid {
  grid-template-columns: 1fr;
}

.wizard-progress-card {
  position: sticky;
  top: 1.25rem;
}

.wizard-step {
  background:
    linear-gradient(180deg, rgba(247, 244, 237, 0.32), rgba(247, 244, 237, 0)) top / 100% 4.5rem no-repeat,
    #fff;
}

.wizard-step__header {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.wizard-step--complete {
  border-color: rgba(102, 117, 91, 0.2);
}

.wizard-step--current {
  border-color: rgba(84, 108, 134, 0.24);
  box-shadow: inset 0 0 0 1px rgba(84, 108, 134, 0.08);
}

.wizard-step--blocked {
  border-color: rgba(138, 70, 53, 0.24);
}

.wizard-step--upcoming {
  background:
    linear-gradient(180deg, rgba(15, 16, 12, 0.025), rgba(15, 16, 12, 0)) top / 100% 4.5rem no-repeat,
    #fff;
}

.wizard-step--complete .step-index {
  background: var(--moss);
}

.wizard-step--blocked .step-index {
  background: #8a4635;
}

.wizard-step--upcoming .step-index {
  border: 1px solid #deddd8;
  background: #fff;
  color: var(--text-soft);
}

.wizard-progress {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
}

.wizard-progress__item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.wizard-progress__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.wizard-progress__index {
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 16, 12, 0.06);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.wizard-progress__item strong {
  display: block;
  color: var(--ink);
  font-size: 0.93rem;
}

.wizard-progress__item p {
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.wizard-progress__item--complete .wizard-progress__index {
  background: rgba(102, 117, 91, 0.12);
  color: var(--moss-deep);
}

.wizard-progress__item--current .wizard-progress__index {
  background: rgba(84, 108, 134, 0.12);
  color: #4f677f;
}

.wizard-progress__item--blocked .wizard-progress__index {
  background: rgba(138, 70, 53, 0.12);
  color: #8a4635;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #ecebe8;
  }

  .sidebar-nav {
    overflow: visible;
  }

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

  .column-grid,
  .column-grid--four,
  .definition-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-main,
  .public-shell {
    padding: 1rem 1rem 4rem;
  }

  .frame-body {
    padding: 1.25rem;
  }

  .page-hero,
  .page-hero--narrow,
  .detail-shell,
  .wizard-layout,
  .split-layout,
  .split-layout--balanced,
  .split-layout--wide,
  .form-grid,
  .form-grid--three,
  .checkbox-grid,
  .definition-grid,
  .definition-grid--three,
  .column-grid,
  .column-grid--two,
  .column-grid--four {
    grid-template-columns: 1fr;
  }

  .page-title {
    max-width: none;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .list-row {
    flex-direction: column;
  }

  .list-row__aside {
    min-width: 0;
    text-align: left;
  }

  .surface {
    padding: 1rem;
    border-radius: 0.9rem;
  }

  .wizard-progress-card {
    position: static;
  }

  .wizard-step__header {
    grid-template-columns: 1fr;
  }
}
