/* Brassline Operations — original editorial enterprise interface.
 * Plain CSS; all font files are bundled under the SIL Open Font License.
 * Sections: foundations · shell · dashboard · data · workflows · system · responsive.
 */

/* 01 — Foundations and theme tokens */
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-500.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f6f5f1;
  --surface: #fff;
  --ink: #242821;
  --muted: #6b6e64;
  --soft: #979b8f;
  --line: #e6e5de;
  --line-strong: #cecec3;
  --brass: #92733e;
  --brass-text: #7c5f30;
  --brass-hover: #785d2f;
  --brass-soft: #f3eee3;
  --moss: #50705c;
  --moss-soft: #eef3ed;
  --clay: #a6654e;
  --clay-text: #93503c;
  --clay-soft: #f9eeea;
  --slate: #657a86;
  --hover: #f8f7f3;
  --sidebar-bg: #f1f0e9;
  --sidebar-active: #e7e5d9;
  --on-accent: #fff;
  --focus: #92733e;
  --overlay: rgb(25 28 24 / 42%);
  --shadow: 0 14px 40px rgb(36 40 33 / 10%), 0 3px 8px rgb(36 40 33 / 4%);
  --radius: 8px;
  --rail-width: 236px;
  --header-height: 64px;
  --gutter: clamp(20px, 2.5vw, 40px);
  --font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--canvas);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #191c18;
  --surface: #22261f;
  --ink: #eeeee5;
  --muted: #afb2a5;
  --soft: #858a7b;
  --line: #373b31;
  --line-strong: #505647;
  --brass: #c5a66b;
  --brass-text: #c5a66b;
  --brass-hover: #d8bb85;
  --brass-soft: #343022;
  --moss: #a2b99b;
  --moss-soft: #293629;
  --clay: #dfa58d;
  --clay-text: #dfa58d;
  --clay-soft: #3c2b25;
  --slate: #a2b7c0;
  --hover: #292d25;
  --sidebar-bg: #1e221b;
  --sidebar-active: #34362a;
  --on-accent: #1b1e18;
  --focus: #d6b87f;
  --overlay: rgb(7 10 7 / 68%);
  --shadow: 0 16px 48px rgb(0 0 0 / 30%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--brass-soft);
  color: var(--ink);
}
[hidden],
dialog:not([open]) {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--brass-text);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
#main:focus {
  outline: none;
}
button {
  touch-action: manipulation;
}
img,
svg,
canvas {
  max-width: 100%;
}
img {
  display: block;
  height: auto;
}
svg {
  vertical-align: middle;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.3;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.35px;
}
h2 {
  font-size: 15px;
  letter-spacing: -0.24px;
}
h3 {
  font-size: 14px;
  letter-spacing: -0.12px;
}
strong,
b {
  font-weight: 600;
}
small {
  font-size: 12px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
code,
pre,
kbd,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
  font-variant-numeric: tabular-nums;
}
pre {
  overflow: auto;
  padding: 16px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.eyebrow,
.section-number {
  display: inline-block;
  color: var(--muted);
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 1.1px;
}
.muted,
.field-help,
.subtle-note {
  color: var(--muted);
}
.positive {
  color: var(--moss);
}
.required {
  color: var(--clay-text);
}
.large-copy {
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.4px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 200;
  left: 16px;
  top: -80px;
  background: var(--ink);
  color: var(--canvas);
  padding: 12px 20px;
  border-radius: 4px;
}
.skip-link:focus {
  top: 12px;
  color: var(--canvas);
}
.actions,
.heading-actions,
.demo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.padded {
  padding: 22px;
}
.two-col,
.goal-grid,
.project-grid,
.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.two-col > *,
.goal-grid > *,
.project-grid > *,
.integration-grid > * {
  min-width: 0;
}
.two-col > .panel,
.goal-grid > .panel,
.project-grid > .panel,
.integration-grid > .panel {
  margin-bottom: 0;
}
main > :is(.two-col, .goal-grid, .project-grid, .integration-grid) {
  margin-bottom: 22px;
}

/* 02 — Actions, native controls, and shared state */
.btn,
.icon-btn,
.key-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  padding: 8px 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  transition:
    background-color 0.16s,
    border-color 0.16s,
    color 0.16s;
}
.btn:hover,
.icon-btn:hover,
.key-button:hover {
  color: var(--ink);
  background: var(--hover);
  border-color: var(--soft);
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}
.btn.primary:hover {
  background: var(--brass-hover);
  border-color: var(--brass-hover);
  color: var(--on-accent);
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.quiet:hover {
  color: var(--ink);
  background: var(--sidebar-active);
}
.btn.danger {
  color: var(--clay-text);
  border-color: var(--clay-text);
}
.btn.danger:hover {
  background: var(--clay-soft);
}
.btn.small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 11px;
}
.btn .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.icon-btn {
  width: 38px;
  min-width: 38px;
  padding: 8px;
  border-color: transparent;
  background: transparent;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brass-text);
  font-size: 12px;
  font-weight: 500;
}
.text-link:hover {
  color: var(--brass-hover);
  text-decoration: underline;
}
.text-link .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}
label {
  font-size: 12px;
  font-weight: 500;
}
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='color']),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--soft);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brass-text);
  outline: 2px solid color-mix(in srgb, var(--brass) 23%, transparent);
  outline-offset: 1px;
}
select {
  padding-right: 28px;
  cursor: pointer;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
input[type='checkbox'],
input[type='radio'] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 16px;
  accent-color: var(--brass-text);
  cursor: pointer;
  vertical-align: middle;
}
input[type='range'] {
  width: 100%;
  margin: 10px 0;
  accent-color: var(--brass-text);
  cursor: pointer;
  min-height: 28px;
}
fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 16px;
  margin: 0;
}
legend {
  width: auto;
  padding: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
fieldset .check-label + .check-label {
  margin-top: 12px;
}
.check-label,
.switch-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  font-weight: 400;
  cursor: pointer;
}
.switch-label input[role='switch'] {
  appearance: none;
  width: 34px;
  height: 20px;
  flex-basis: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--line);
  position: relative;
  transition: background-color 0.16s;
}
.switch-label input[role='switch']::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 18%);
  transition: transform 0.16s;
}
.switch-label input[role='switch']:checked {
  background: var(--brass);
  border-color: var(--brass-text);
}
.switch-label input[role='switch']:checked::before {
  transform: translateX(14px);
}
.input-icon {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0;
}
.input-icon > .icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.input-icon > input:not([type='checkbox']) {
  padding-left: 37px;
}
.badge,
.tag,
.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--canvas);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.badge {
  border: 0;
  padding: 4px 7px;
}
.badge > span,
.status-dot,
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex: 0 0 5px;
}
.badge.good,
.alert.good {
  color: var(--moss);
  background: var(--moss-soft);
}
.badge.warm,
.alert.warm {
  color: var(--brass-text);
  background: var(--brass-soft);
}
.badge.bad,
.alert.bad {
  color: var(--clay-text);
  background: var(--clay-soft);
}
.tag {
  font-weight: 400;
}
button.tag,
a.tag {
  min-height: 32px;
  white-space: normal;
}
button.tag:hover,
a.tag:hover {
  border-color: var(--brass-text);
  color: var(--brass-text);
}
.count-pill {
  padding: 2px 6px;
  font: 10px/1.4 var(--mono);
}
.avatar,
.company-mark {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--moss) 12%, transparent);
  border-radius: 50%;
  background: #e9ede4;
  color: #55634d;
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 34px;
}
:root[data-theme='dark'] .avatar {
  background: #343e2e;
  color: #c0ceb6;
}
.avatar.clay {
  background: var(--clay-soft);
  color: var(--clay-text);
}
.avatar.small {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 10px;
}
.avatar.tiny {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 9px;
}
.avatar.large {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  font-size: 21px;
}
.company-mark {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 18px;
}
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--canvas);
}
.segmented button {
  min-height: 29px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 4px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.segmented button.active,
.segmented button[aria-selected='true'] {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(36 40 33 / 3%);
}
.segmented button:hover {
  color: var(--ink);
}

/* 03 — Navigation rail and workspace frame */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
}
.brand,
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  padding: 29px 13px 27px;
}
.brand > span:last-child,
.wordmark > span:nth-child(2) {
  font-size: 27px;
  line-height: 1;
  letter-spacing: -1.3px;
  font-weight: 600;
}
.brand-dot {
  color: var(--brass-text);
}
.brand small,
.wordmark small {
  display: block;
  margin-top: 7px;
  font: 9px/1 var(--mono);
  letter-spacing: 2.8px;
  color: var(--muted);
}
.brand-symbol {
  display: grid;
  width: 24px;
  height: 29px;
  grid-template-columns: 7px 13px;
  grid-template-rows: 10px 13px;
  gap: 5px 4px;
  flex: 0 0 24px;
  transform: skewY(-6deg);
}
.brand-symbol i {
  background: var(--brass);
  border-radius: 1px;
}
.brand-symbol i:first-child {
  grid-row: span 2;
}
.workspace-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 17px;
  font-size: 11px;
  font-weight: 600;
}
.workspace-switch > span:last-child {
  margin-left: auto;
  font-size: 16px;
  color: var(--muted);
}
.workspace-switch small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  margin-top: 1px;
}
.workspace-monogram {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
}
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  width: 100%;
  min-height: 35px;
  padding: 7px 10px;
  margin-bottom: 21px;
  font-size: 11px;
  color: var(--muted);
  text-align: left;
}
.sidebar-search .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.sidebar-search kbd {
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 9px;
}
.sidebar-search:hover {
  color: var(--ink);
  border-color: var(--soft);
}
.sidebar > nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.nav-section + .nav-section {
  margin-top: 23px;
}
.nav-label {
  display: block;
  margin: 0 11px 8px;
  color: var(--muted);
  font: 9px/1.4 var(--mono);
  letter-spacing: 1.35px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  padding: 8px 11px;
  border-radius: 4px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.nav-item .icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.nav-item:hover {
  background: var(--sidebar-active);
  color: var(--ink);
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--ink);
  font-weight: 600;
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 17px;
  left: 0;
  top: 10px;
  border-radius: 2px;
  background: var(--brass);
}
.nav-count,
.ai-label,
.page-total {
  margin-left: auto;
  font: 9px/1.5 var(--mono);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
}
.ai-label {
  background: var(--brass-soft);
  color: var(--brass-text);
  border-color: transparent;
  letter-spacing: 0.6px;
}
.nav-chevron {
  margin-left: auto;
  width: 12px !important;
  flex-basis: 12px !important;
  color: var(--soft);
}
.subnav {
  border-left: 1px solid var(--line-strong);
  margin: 6px 0 10px 19px;
  padding: 1px 0 1px 16px;
}
.subnav a {
  display: block;
  padding: 7px 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  border-radius: 3px;
}
.subnav a:hover,
.subnav a.current {
  color: var(--brass-text);
  background: var(--brass-soft);
}
.subnav a.current {
  font-weight: 600;
}
.sidebar-bottom {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  flex-shrink: 0;
}
.sidebar-bottom .nav-item {
  font-size: 11px;
  min-height: 33px;
}
.sidebar-account {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 11px;
  padding: 15px 0 17px;
}
.sidebar-account > a {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
}
.sidebar-account small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}
.sidebar-account .icon-btn {
  width: 29px;
  min-width: 29px;
  min-height: 32px;
  padding: 5px;
}
.workspace {
  margin-left: var(--rail-width);
  min-width: 0;
}
.topbar {
  min-height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  min-width: 0;
  font-size: 11px;
}
.breadcrumb strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb > span {
  color: var(--line-strong);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-actions .icon-btn {
  width: 31px;
  min-width: 31px;
  min-height: 32px;
}
.demo-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  font-size: 10px;
  color: var(--muted);
}
.demo-indicator i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--moss);
}
.topbar-divider {
  height: 21px;
  width: 1px;
  margin: 0 9px;
  background: var(--line);
}
.notification-bell {
  position: relative;
}
.notification-bell > i {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 4px;
  height: 4px;
  background: var(--brass);
  border-radius: 50%;
  outline: 2px solid var(--canvas);
}
.mobile-menu,
.nav-scrim {
  display: none;
}
main {
  padding: 31px var(--gutter) 0;
  max-width: 1820px;
  min-height: calc(100dvh - var(--header-height));
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.page-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.page-heading h1 {
  margin-bottom: 7px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
}
.heading-actions {
  flex-shrink: 0;
  padding-top: 21px;
}
.date-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding-left: 11px;
  border-radius: 5px;
}
.date-control > .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  color: var(--muted);
}
.date-control select {
  border: 0;
  min-height: 38px;
  font-size: 11px;
  background: transparent;
  padding: 8px 26px 8px 0;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  color: var(--muted);
  font-size: 10px;
}
.footer > span:first-child {
  font-size: 9px;
  letter-spacing: 0.55px;
}
.footer i {
  font-style: normal;
  color: var(--soft);
  padding: 0 5px;
}
.footer a:hover {
  text-decoration: underline;
}
.noscript {
  position: fixed;
  bottom: 0;
  left: var(--rail-width);
  right: 0;
  padding: 12px;
  background: var(--brass-soft);
  color: var(--ink);
  z-index: 50;
  font-size: 12px;
}

/* 04 — Dashboard and reporting composition */
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 63px;
  padding: 18px 22px;
}
.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.panel-head h2:empty {
  display: none;
}
.panel-head:has(> h2:empty):not(:has(> :not(h2))) {
  display: none;
}
.panel-head > select {
  width: auto;
  min-height: 34px;
  padding: 6px 28px 6px 9px;
  font-size: 11px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 23px;
}
.kpi {
  min-width: 0;
  padding: 20px 23px 19px;
}
.kpi + .kpi {
  border-left: 1px solid var(--line);
}
.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.kpi-label .icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  color: var(--soft);
}
.kpi-number {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  font-size: clamp(27px, 2.55vw, 41px);
  font-weight: 500;
  letter-spacing: -1.7px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi-number > svg {
  width: 68px;
  height: 30px;
  align-self: center;
  flex-shrink: 1;
  min-width: 35px;
}
.kpi-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  font-size: 9px;
  color: var(--muted);
}
.kpi-foot .positive {
  display: inline-flex;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
}
.dashboard-top,
.dashboard-middle,
.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(270px, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}
:is(.dashboard-top, .dashboard-middle, .dashboard-bottom) > .panel {
  margin-bottom: 0;
}
.dashboard-bottom {
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
}
.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 2px 22px 20px;
}
.chart-meta > div:first-child > small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.chart-total {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1.1px;
  font-variant-numeric: tabular-nums;
}
.chart-total > span {
  color: var(--muted);
  font-size: 23px;
}
.legend {
  display: flex;
  gap: 17px;
  font-size: 10px;
  color: var(--muted);
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  display: inline-block;
  width: 13px;
  height: 2px;
  background: var(--brass);
}
.legend i.target {
  background: none;
  border-top: 2px dashed var(--soft);
}
.revenue-svg {
  display: block;
  width: calc(100% - 44px);
  height: auto;
  margin: 0 22px 20px;
  font-family: var(--mono);
  overflow: visible;
}
.chart-note {
  border-top: 1px solid var(--line);
  padding: 13px 22px;
  font-size: 10px;
  color: var(--muted);
}
.chart-note .positive {
  font-weight: 500;
  margin-right: 3px;
}
.performance {
  display: flex;
  flex-direction: column;
}
.performance .revenue-svg {
  flex: 1;
  min-height: 190px;
}
.performance .chart-note {
  margin-top: auto;
}
.goal-ring {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 9px;
}
.goal-ring > svg {
  width: 100%;
  height: 100%;
}
.goal-ring > div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.goal-ring strong {
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -1.4px;
  line-height: 1.2;
}
.goal-ring strong > span {
  font-size: 21px;
  color: var(--muted);
}
.goal-ring small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.goal-amount {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 4px 20px 16px;
  font-size: 12px;
  font-weight: 500;
}
.goal-amount > span + span {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.goal-amount small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
  font-weight: 400;
}
.insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  margin: 0 22px 17px;
  border: 1px solid color-mix(in srgb, var(--brass) 14%, var(--line));
  border-radius: 5px;
  background: var(--brass-soft);
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.insight strong {
  color: var(--ink);
}
.small-spark {
  color: var(--brass-text);
  font-size: 19px;
  line-height: 1;
}
.quarter-panel > .text-link {
  margin: 0 22px 20px;
}
.pipeline-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 17px;
}
.pipeline-summary > strong {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1px;
}
.pipeline-summary > strong > span {
  font-size: 24px;
}
.pipeline-summary > span {
  color: var(--muted);
  font-size: 10px;
}
.stacked-bar {
  display: flex;
  gap: 3px;
  height: 8px;
  margin: 0 22px 18px;
  border-radius: 2px;
  overflow: hidden;
}
.stacked-bar > i,
.stage-list > a > i,
.board-head h2 > i {
  background: var(--brass);
}
[style*='--stage:0'] {
  --stage-color: #b6aa8d;
}
[style*='--stage:1'] {
  --stage-color: #7d8a70;
}
[style*='--stage:2'] {
  --stage-color: #9a7a46;
}
[style*='--stage:3'] {
  --stage-color: #454f40;
}
:root[data-theme='dark'] [style*='--stage:0'] {
  --stage-color: #c4b28b;
}
:root[data-theme='dark'] [style*='--stage:1'] {
  --stage-color: #9aac8c;
}
:root[data-theme='dark'] [style*='--stage:2'] {
  --stage-color: #bf965c;
}
:root[data-theme='dark'] [style*='--stage:3'] {
  --stage-color: #6d8468;
}
.stacked-bar > i,
.stage-list > a > i,
.board-head h2 > i {
  background: var(--stage-color, var(--brass));
}
.stage-list {
  padding: 0 22px 13px;
}
.stage-list > a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.stage-list > a > i {
  height: 7px;
  width: 7px;
  border-radius: 2px;
}
.stage-list > a > span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stage-list small {
  margin-right: 20px;
  font-size: 9px;
  color: var(--muted);
}
.stage-list strong {
  min-width: 52px;
  font: 10px var(--mono);
  text-align: right;
}
.leader-list {
  padding: 0 22px 7px;
}
.leader-list > a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.leader-list > a > span:nth-child(2) {
  flex: 1;
}
.leader-list small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  margin-top: 3px;
  color: var(--muted);
}
.leader-list strong {
  font-size: 12px;
  text-align: right;
}
.check-list {
  padding: 0 22px 7px;
}
.check-list > label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  min-height: 63px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.check-list > label > span:not(.due-label) {
  min-width: 0;
  flex: 1;
}
.check-list small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.check-list input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}
.due-label {
  flex-shrink: 0;
  font-size: 9px;
  color: var(--muted);
}
.mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 22px;
}
.mini-kpis > div {
  display: flex;
  flex-direction: column;
  padding: 21px 24px;
  min-width: 0;
}
.mini-kpis > div + div {
  border-left: 1px solid var(--line);
}
.mini-kpis strong {
  margin: 9px 0 5px;
  font-size: clamp(22px, 2.25vw, 32px);
  font-weight: 500;
  letter-spacing: -0.8px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.mini-kpis small {
  color: var(--muted);
  font-size: 11px;
}
.mini-kpis .eyebrow {
  font-size: 9px;
  letter-spacing: 0.8px;
}
.panel > .mini-kpis {
  margin: 12px 22px 22px;
}
.panel > .mini-kpis:first-child {
  margin-top: 22px;
}
.chart-canvas {
  height: 290px;
  position: relative;
  margin: 0 22px 22px;
  min-width: 0;
}
.chart-canvas.tall {
  height: 380px;
}
.chart-canvas > canvas {
  width: 100% !important;
  height: 100% !important;
}
.heatmap {
  padding: 10px 22px 28px;
  overflow-x: auto;
}
.heatmap > div {
  display: grid;
  grid-template-columns: 34px repeat(10, minmax(24px, 1fr));
  gap: 7px;
  margin-bottom: 7px;
  min-width: 390px;
  align-items: center;
}
.heatmap > div > span {
  color: var(--muted);
  font: 10px var(--mono);
}
.heatmap i {
  display: block;
  aspect-ratio: 1.4;
  min-height: 24px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--brass) calc(var(--cell, 0.5) * 100%), var(--brass-soft));
}
.heatmap-labels {
  padding-top: 3px;
}
.heatmap-labels small {
  font: 8px var(--mono);
  color: var(--muted);
  text-align: center;
}

/* 05 — Registers, table tools, and dense data */
.table-scroll {
  position: relative;
  overflow: auto;
  overscroll-behavior-inline: contain;
  max-width: 100%;
  scrollbar-width: thin;
}
table {
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
.simple-table,
.records-table,
.permission-table,
.cohort-table {
  width: 100%;
}
th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.simple-table th,
.records-table th,
.permission-table th {
  background: var(--hover);
  border-block: 1px solid var(--line);
  padding: 11px 15px;
}
.simple-table td,
.records-table td,
.permission-table td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.simple-table th:first-child,
.simple-table td:first-child {
  padding-left: 22px;
}
.simple-table th:last-child,
.simple-table td:last-child {
  padding-right: 22px;
}
.simple-table tbody tr:last-child td,
.records-table tbody tr:last-child td {
  border-bottom: 0;
}
.simple-table tbody tr:hover,
.records-table tbody tr:hover {
  background: var(--hover);
}
.simple-table td {
  white-space: nowrap;
  font-size: 11px;
}
.simple-table td strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.simple-table td small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}
.priority-panel .simple-table td:first-child {
  min-width: 175px;
}
.records-table {
  min-width: 850px;
}
.records-table td {
  white-space: nowrap;
  font-size: 12px;
}
.records-table td small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.records-table th button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--muted);
  font-size: inherit;
  text-align: left;
  min-height: 24px;
}
.records-table th button > span {
  color: var(--soft);
}
.records-table th button:hover {
  color: var(--ink);
}
.records-table tr[aria-selected='true'],
.records-table tr.selected {
  background: var(--brass-soft);
}
.records-table .check-cell {
  width: 44px;
  padding-left: 22px;
  padding-right: 6px;
}
.records-table td:first-child:has(input[type='checkbox']) {
  width: 44px;
  padding-left: 22px;
  padding-right: 6px;
}
.records-table td .actions {
  gap: 3px;
  flex-wrap: nowrap;
}
.records-table .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}
.records-table .icon-btn {
  min-height: 30px;
  width: 30px;
  min-width: 30px;
  padding: 5px;
}
.table-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 22px 18px;
}
.table-toolbar .input-icon {
  flex: 1 1 180px;
  max-width: 300px;
}
.table-toolbar > select {
  width: auto;
  max-width: 180px;
  font-size: 11px;
  min-height: 40px;
}
.table-toolbar input {
  font-size: 11px !important;
  min-height: 40px !important;
}
.toolbar-spacer {
  flex: 1;
}
.column-menu {
  position: relative;
}
.column-menu:not([open]) > .popover {
  display: none;
}
.column-menu summary {
  list-style: none;
}
.column-menu summary::-webkit-details-marker {
  display: none;
}
.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 25;
  min-width: 205px;
  max-width: min(280px, 80vw);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.popover label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  padding: 8px;
  border-radius: 3px;
  cursor: pointer;
}
.popover label:hover {
  background: var(--hover);
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: var(--brass-soft);
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.bulk-bar > span {
  font-weight: 600;
  margin-right: auto;
}
.bulk-bar .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
}
.table-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 15px 22px;
  color: var(--muted);
  font-size: 10px;
}
.table-bottom > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 400;
  margin-left: auto;
}
.table-bottom select {
  min-height: 32px;
  width: 62px;
  padding: 5px 18px 5px 8px;
  font-size: 10px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pagination .btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 10px;
}
.pagination > span {
  font: 10px var(--mono);
}
.subtle-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 22px;
  font-size: 11px;
  line-height: 1.6;
}
.subtle-note .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  margin-top: 2px;
}
.panel > .subtle-note {
  margin-inline: 22px;
}
.cohort-table {
  min-width: 670px;
  border-spacing: 7px;
  border-collapse: separate;
  padding: 0 15px 16px;
}
.cohort-table th {
  padding: 8px;
  font-size: 10px;
}
.cohort-table tbody th {
  font-weight: 500;
  color: var(--ink);
}
.cohort-table th small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
  font-weight: 400;
}
.cohort-table td {
  background: color-mix(in srgb, var(--brass) calc(var(--cell, 0.5) * 80%), var(--surface));
  color: #242821;
  padding: 20px 9px;
  border-radius: 4px;
  font: 11px var(--mono);
  text-align: center;
}
.cohort-table td.future {
  color: var(--muted);
  background: var(--canvas);
}
:root[data-theme='dark'] .cohort-table td:not(.future) {
  background: color-mix(in srgb, #c5a66b calc(var(--cell, 0.5) * 100%), #a29a7d);
  color: #191c18;
}
.permission-table {
  min-width: 740px;
}
.permission-table tbody th {
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  padding-left: 22px;
  border-top: 0;
}
.permission-table select {
  font-size: 11px;
  min-height: 36px;
  padding: 7px 25px 7px 9px;
  min-width: 110px;
}

/* 06 — Forms, multi-step flows, and file staging */
.form-layout,
.ai-layout,
.component-layout,
.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: start;
}
.business-form {
  padding: 2px 24px 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.form-grid > label,
.stack-form > label {
  display: block;
  min-width: 0;
}
.form-grid > label > :is(input, select, textarea),
.stack-form > label > :is(input, select, textarea),
.goal-card label > input {
  margin-top: 8px;
}
.form-grid > .full {
  grid-column: 1 / -1;
}
.form-grid .check-label {
  display: flex;
}
.form-grid .check-label > input {
  margin-top: 0;
}
.form-grid label > .muted {
  font-size: 11px;
  font-weight: 400;
}
.conditional-fields {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: 5px;
}
.tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-preview:empty {
  display: none;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11px;
}
.panel > form > .form-footer:only-child,
form[data-permissions] > .form-footer {
  padding: 18px 22px;
  margin: 0;
}
.business-form > p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 20px;
  margin-bottom: 18px;
  max-width: 720px;
}
.business-form > .identity {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
  padding: 2px 22px 22px;
}
.stack-form > .btn {
  align-self: flex-start;
}
.form-result,
[data-form-result]:not([hidden]),
[data-auth-result]:not([hidden]),
[data-wizard-result]:not([hidden]),
[data-compose-result]:not(:empty),
[data-import-summary]:not(:empty) {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--moss);
  border-radius: 4px;
  background: var(--moss-soft);
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}
[data-form-result].bad,
[data-auth-result].bad,
.form-result.error {
  border-left-color: var(--clay-text);
  background: var(--clay-soft);
}
.field-help {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
  margin-top: 8px;
}
.prose {
  padding: 0 22px 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.prose h3 {
  color: var(--ink);
  margin: 17px 0 10px;
  line-height: 1.5;
}
.prose h3:first-child {
  margin-top: 0;
}
.prose p + p {
  margin-top: 12px;
}
.prose p + .text-link,
.prose .text-link + .text-link {
  display: flex;
  width: fit-content;
  margin-top: 17px;
}
.prose .section-number {
  display: block;
  margin-bottom: 18px;
  color: var(--brass-text);
}
.prose ul {
  padding-left: 18px;
  margin: 14px 0;
}
.prose .detail-list {
  padding: 0;
}
.prose .actions {
  margin-top: 20px;
}
.wizard-shell {
  max-width: 920px;
  margin: 0 auto;
}
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
}
.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 2px solid transparent;
}
.wizard-steps li + li {
  border-left: 1px solid var(--line);
}
.wizard-steps li > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font: 10px var(--mono);
  flex-shrink: 0;
}
.wizard-steps li.active {
  color: var(--brass-text);
  background: var(--brass-soft);
  border-bottom-color: var(--brass-text);
}
.wizard-steps li.active > span {
  background: var(--brass);
  color: var(--on-accent);
  border-color: var(--brass-text);
}
.wizard-steps li.complete,
.wizard-steps li.completed {
  color: var(--moss);
}
.wizard-step {
  padding: 32px;
}
.wizard-step h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
  margin: 12px 0 8px;
}
.wizard-step > p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 28px;
}
.wizard-step .detail-list {
  padding: 0;
  margin-bottom: 24px;
}
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 32px;
  border-top: 1px solid var(--line);
}
.wizard-actions > span {
  font: 10px var(--mono);
  color: var(--muted);
}
.wizard-shell [data-wizard-result] {
  margin: 0 32px 24px;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
  padding: 35px 24px;
  margin: 0 22px 22px;
  background: var(--canvas);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}
.upload-zone > .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  color: var(--brass-text);
}
.upload-zone h3 {
  max-width: 240px;
  font-size: 16px;
}
.upload-zone p {
  margin: 9px 0 22px;
  color: var(--muted);
  font-size: 11px;
}
.upload-zone.dragover,
.upload-zone.is-dragging,
.upload-zone[data-dragover='true'] {
  border-color: var(--brass-text);
  background: var(--brass-soft);
}
.file-button {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.file-button input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-button:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.upload-list {
  padding: 0 22px;
}
.upload-list:empty {
  display: none;
}
.upload-list > div,
.upload-list > article,
.upload-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.upload-list small {
  color: var(--muted);
  font-size: 10px;
}
.guide-list {
  padding: 0 22px 20px 42px;
  font-size: 12px;
}
.guide-list li {
  padding: 8px 0 14px 6px;
}
.guide-list li::marker {
  font: 11px var(--mono);
  color: var(--brass-text);
}
.guide-list p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.saved-presets,
.scenario-list,
.notebook-list {
  padding: 0 22px 22px;
}
.saved-presets:empty,
.notebook-list:empty {
  padding-block: 0;
}
.saved-presets > article,
.scenario-list > article,
.notebook-list > article,
.preset-card,
.scenario-card,
.note-card {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.saved-presets h3,
.scenario-list h3,
.notebook-list h3 {
  margin-bottom: 6px;
}
.saved-presets p,
.scenario-list p,
.notebook-list p {
  color: var(--muted);
  font-size: 12px;
}
.notebook-list p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.saved-presets .actions,
.notebook-list .actions {
  margin-top: 12px;
}
.saved-presets .btn,
.notebook-list .btn {
  min-height: 32px;
  font-size: 11px;
}

/* 07 — Pipeline, tasks, relationship records, and planning */
.context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--muted);
}
.context-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.context-bar strong {
  font-size: 11px;
  color: var(--ink);
  font-weight: 500;
}
.context-bar .input-icon {
  min-width: 240px;
}
.live-dot {
  color: var(--moss);
}
.divider-v {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  margin: 0 4px;
}
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.board-column {
  background: var(--sidebar-bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 12px 0;
  min-width: 0;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.board-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.board-head h2 > i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.board-head h2 > span {
  font: 9px var(--mono);
  color: var(--muted);
  margin-left: 3px;
}
.board-head .icon-btn {
  min-height: 28px;
  width: 26px;
  min-width: 26px;
  font-size: 18px;
}
.board-total {
  font: 11px var(--mono);
  padding: 7px 0 16px 14px;
}
.board-total > span {
  color: var(--muted);
  font: 9px var(--font);
  margin-left: 3px;
}
.board-drop {
  min-height: 130px;
  padding-bottom: 12px;
  border-radius: 4px;
}
.board-drop.dragover,
.board-column.dragover,
.board-drop.is-over {
  background: var(--brass-soft);
  outline: 1px dashed var(--brass);
  outline-offset: 3px;
}
.deal-card {
  padding: 16px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  margin-bottom: 11px;
  cursor: grab;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
.deal-card:last-child {
  margin-bottom: 0;
}
.deal-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 3px 8px rgb(36 40 33 / 4%);
}
.deal-card:active {
  cursor: grabbing;
}
.deal-card.dragging,
.deal-card.is-dragging {
  opacity: 0.45;
}
.deal-card .eyebrow {
  font-size: 8px;
  letter-spacing: 0.6px;
}
.deal-card h3 {
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 11px;
}
.deal-card > strong {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 500;
}
.deal-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 11px;
  font-size: 9px;
}
.deal-card select {
  min-height: 40px;
  padding: 8px 26px 8px 10px;
  margin-top: 5px;
  font-size: 14px;
  background: var(--canvas);
  border-color: var(--line);
}
.deal-stage-label {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  padding: 0 22px 22px;
}
.identity h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
}
.identity p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.identity > .badge {
  margin-left: auto;
}
.identity-panel > .identity {
  padding-top: 24px;
  padding-bottom: 12px;
}
.identity-panel .mini-kpis {
  background: var(--canvas);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.8fr);
  gap: 22px;
}
.detail-grid > div {
  min-width: 0;
}
.detail-list {
  padding: 0 22px 22px;
  font-size: 12px;
}
.detail-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.detail-list > div:first-child {
  padding-top: 0;
}
.detail-list > div:last-child {
  border-bottom: 0;
}
.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
  font-weight: 400;
}
.detail-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.detail-list + .btn,
.detail-list + .text-link {
  margin: 0 22px 22px;
}
.timeline {
  padding: 0 24px 10px 36px;
}
.timeline > article {
  position: relative;
  border-left: 1px solid var(--line);
  padding: 0 0 28px 25px;
}
.timeline > article:last-child {
  border-left-color: transparent;
  padding-bottom: 15px;
}
.timeline-dot {
  width: 8px;
  height: 8px;
  position: absolute;
  left: -4.5px;
  top: 6px;
  background: var(--brass);
  border: 2px solid var(--surface);
  border-radius: 50%;
  outline: 1px solid var(--brass);
}
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 7px;
  color: var(--muted);
  font: 9px var(--mono);
}
.timeline-meta > span {
  font: 10px var(--font);
}
.timeline h3 {
  font-size: 13px;
  margin: 8px 0;
}
.timeline p,
.timeline li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.timeline ul {
  padding-left: 18px;
  margin: 12px 0;
}
.timeline .text-link {
  margin-top: 12px;
}
form[data-note-form] {
  padding: 0 22px 22px;
}
form[data-note-form] textarea {
  margin: 8px 0 12px;
}
[data-note-list]:not(:empty) {
  padding: 0 22px 22px;
}
[data-note-list] > div,
[data-note-list] > article {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 22px;
}
.resource-link {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.resource-link > strong,
.resource-link > .eyebrow {
  display: block;
}
.resource-link .eyebrow {
  font-size: 9px;
  margin-bottom: 9px;
}
.resource-link small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 5px;
}
a.resource-link:hover,
.resource-link.selected {
  background: var(--brass-soft);
  border-color: color-mix(in srgb, var(--brass) 35%, var(--line));
  color: var(--brass-text);
}
.panel > .resource-link {
  border-width: 1px 0 0;
  border-radius: 0;
  padding: 15px 22px;
}
.resource-list {
  padding: 0 22px 22px;
}
.resource-list > .resource-link + .resource-link {
  margin-top: 10px;
}
.project-card {
  padding: 0 22px 22px;
}
.project-card p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}
.project-card .between {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}
.project-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  font-size: 11px;
  color: var(--muted);
}
.project-footer > .text-link {
  margin-left: auto;
  font-size: 11px;
}
.meter {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  background: var(--brass);
  border-radius: inherit;
  max-width: 100%;
  transition: width 0.2s;
}
.task-list {
  padding: 0 22px 8px;
}
.task-row,
.task-list > article,
.task-list > label,
.task-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.task-row > div:first-of-type,
.task-item > div:first-of-type,
.task-list > article > div:first-of-type {
  flex: 1;
  min-width: 0;
}
.task-list h3,
.task-list strong {
  font-size: 12px;
  font-weight: 500;
}
.task-list p,
.task-list small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.task-list .completed h3,
.task-list .done strong,
.task-list input:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}
.task-list .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}
.approval-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px;
  border-top: 1px solid var(--line);
}
.approval-row > div:first-of-type {
  flex: 1;
  min-width: 220px;
}
.approval-row h3 {
  margin: 4px 0 5px;
  font-size: 13px;
}
.approval-row p {
  font-size: 11px;
  color: var(--muted);
}
.approval-row > strong {
  font: 13px var(--mono);
  margin-right: 12px;
}
.approval-row .eyebrow {
  font-size: 8px;
}
.forecast-control,
.forecast-bars {
  padding: 2px 24px 24px;
}
.forecast-control > label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.forecast-control > label > strong {
  color: var(--brass-text);
  font: 14px var(--mono);
}
.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 28px;
}
.forecast-result {
  padding: 23px;
  margin: 24px 0 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--brass-soft);
}
.forecast-result > strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -1.5px;
}
.forecast-result p {
  color: var(--muted);
  font-size: 11px;
}
.forecast-bars > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 27px;
  font-size: 12px;
}
.forecast-bars > div > strong {
  font: 12px var(--mono);
}
.forecast-bars .meter {
  grid-column: 1 / -1;
}
.goal-card {
  padding: 0 22px 24px;
}
.goal-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}
.goal-value strong {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -1px;
}
.goal-value > span {
  font-size: 12px;
  color: var(--muted);
}
.goal-card > p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 11px;
}
.goal-card > label {
  display: block;
  margin: 23px 0 14px;
}
.score-preview {
  padding: 15px 22px 28px;
  text-align: center;
}
.score-preview > strong {
  display: block;
  font-size: 86px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -4px;
  margin: 16px 0 10px;
  color: var(--brass-text);
}
.score-preview > strong > span {
  font-size: 22px;
  color: var(--muted);
  letter-spacing: -1px;
}
.score-preview p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  margin-top: 24px;
}
.funnel {
  padding: 6px 24px 24px;
}
.funnel > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 115px;
  align-items: center;
  column-gap: 20px;
  min-height: 69px;
  border-top: 1px solid var(--line);
}
.funnel > div > span {
  font-size: 12px;
}
.funnel > div > div {
  background: var(--brass-soft);
  border-left: 3px solid var(--brass);
  min-width: 56px;
  padding: 12px;
}
.funnel > div > div > strong {
  font: 13px var(--mono);
}
.funnel > div > small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
[data-report-title] {
  margin: 0 22px 20px;
}
.builder-grid > .panel > .btn {
  margin: 18px 22px 22px;
}

/* 08 — Calendar, mailbox, documents, and commercial sheets */
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  border-block: 1px solid var(--line);
  background: var(--hover);
}
.calendar-weekdays > span {
  text-align: center;
  padding: 12px 4px;
  font: 9px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.calendar-grid > div,
.calendar-cell,
.calendar-day {
  min-height: 114px;
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.calendar-grid > :nth-child(7n) {
  border-right: 0;
}
.calendar-grid > :nth-last-child(-n + 7) {
  border-bottom: 0;
}
.calendar-grid .outside,
.calendar-grid .other-month,
.calendar-grid .muted-day {
  background: var(--canvas);
  color: var(--soft);
}
.calendar-grid .today,
.calendar-grid [aria-current='date'] {
  background: var(--brass-soft);
}
.calendar-grid .day-number,
.calendar-grid time,
.calendar-grid > div > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 11px var(--mono);
  min-width: 22px;
  min-height: 22px;
}
.calendar-grid .today .day-number {
  background: var(--ink);
  color: var(--canvas);
  border-radius: 50%;
}
.calendar-event,
.calendar-grid [data-event],
.calendar-grid [data-event-id] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 5px 7px;
  border: 0;
  border-left: 2px solid var(--brass);
  border-radius: 3px;
  background: var(--brass-soft);
  font-size: 9px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}
.calendar-event:hover {
  background: var(--sidebar-active);
}
.mail-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.mail-folders {
  padding: 22px 14px;
}
.mail-folders > h2 {
  margin: 0 8px 18px;
  font-size: 13px;
}
.mail-folders > .btn {
  width: 100%;
  margin-top: 22px;
}
.folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  width: 100%;
  padding: 11px 10px;
  margin: 3px 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  border-radius: 4px;
  text-align: left;
}
.folder > span {
  font: 10px var(--mono);
}
.folder.active {
  background: var(--brass-soft);
  color: var(--brass-text);
  font-weight: 500;
}
.folder:hover {
  background: var(--hover);
  color: var(--ink);
}
.mail-layout > .panel > .panel-head .input-icon {
  max-width: 240px;
}
.mail-layout > .panel > .panel-head input {
  font-size: 11px;
  min-height: 36px;
}
.mail-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px 20px;
  border-top: 1px solid var(--line);
}
.mail-row:hover {
  background: var(--hover);
}
.mail-list {
  border-radius: 0 0 var(--radius) var(--radius);
}
.mail-row > a {
  min-width: 0;
  flex: 1;
}
.mail-row strong {
  font-size: 11px;
}
.mail-row h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 5px 0;
}
.mail-row p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--muted);
}
.mail-row > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  align-self: stretch;
}
.mail-row time {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.mail-row .tag {
  font-size: 8px;
}
.star-button {
  border: 0;
  background: none;
  color: var(--soft);
  width: 26px;
  min-width: 26px;
  height: 32px;
  padding: 2px;
  font-size: 23px;
  line-height: 1;
}
.star-button[aria-pressed='true'] {
  color: var(--brass-text);
}
.email-body {
  padding: 0 26px 26px;
}
.email-body > .identity {
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.email-body .identity p {
  font-size: 11px;
}
.email-body .identity > time {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.email-body .prose {
  padding: 26px 0;
  max-width: 740px;
  font-size: 14px;
  line-height: 1.9;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 5px;
  margin-bottom: 25px;
  background: var(--canvas);
}
.attachment > .icon {
  color: var(--brass-text);
  width: 23px;
  height: 23px;
  flex-basis: 23px;
}
.attachment > div {
  flex: 1;
  min-width: 150px;
}
.attachment strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.attachment small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.document-card {
  padding: 23px;
}
.document-icon {
  position: relative;
  color: var(--brass-text);
  width: fit-content;
  margin-bottom: 25px;
}
.document-icon > .icon {
  width: 36px;
  height: 36px;
}
.document-icon > span {
  display: block;
  font: 8px var(--mono);
  letter-spacing: 1px;
  margin-top: 8px;
}
.document-card h2 {
  font-size: 14px;
}
.document-card > p {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0 25px;
}
.document-card .between {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  flex-wrap: wrap;
}
.document-card small {
  color: var(--muted);
  font-size: 10px;
}
.document-card .btn {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 10px;
}
.invoice-sheet {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  border-radius: 6px;
  padding: 45px 40px;
}
.invoice-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 43px;
}
.invoice-heading .wordmark {
  flex-wrap: wrap;
  max-width: 300px;
}
.invoice-heading .wordmark > p {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  margin-top: 18px;
}
.invoice-heading > div:last-child {
  text-align: right;
}
.invoice-heading h2 {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: 9px 0 12px;
}
.invoice-address {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding: 26px 0 32px;
}
.invoice-address h3 {
  font-size: 15px;
  margin: 8px 0;
}
.invoice-address p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.invoice-address dl {
  min-width: 245px;
  padding-top: 6px;
}
.invoice-address dl > div,
.invoice-totals dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  padding: 7px 0;
}
.invoice-address dt,
.invoice-totals dt {
  color: var(--muted);
  font-weight: 400;
}
.invoice-address dd,
.invoice-totals dd {
  margin: 0;
  text-align: right;
}
.invoice-items {
  min-width: 580px;
}
.invoice-items th {
  background: var(--canvas);
  font-size: 9px;
  padding-block: 14px;
}
.invoice-items td {
  padding-block: 21px;
}
.invoice-items th:first-child,
.invoice-items td:first-child {
  padding-left: 14px;
}
.invoice-items th:last-child,
.invoice-items td:last-child {
  text-align: right;
  padding-right: 14px;
}
.invoice-items input[type='number'] {
  width: 85px;
  padding: 7px 9px;
  min-height: 36px;
  font-size: 11px;
}
.invoice-items td[data-line-total] {
  font: 11px var(--mono);
}
.invoice-totals {
  display: flex;
  justify-content: flex-end;
  padding: 27px 0 32px;
}
.invoice-totals dl {
  width: 310px;
}
.invoice-totals dd {
  font-family: var(--mono);
  font-size: 11px;
}
.invoice-totals .total {
  border-top: 1px solid var(--line-strong);
  margin-top: 10px;
  padding-top: 15px;
  font-size: 16px;
}
.invoice-totals .total dt {
  color: var(--ink);
  font-weight: 500;
}
.invoice-totals .total dd {
  font-size: 16px;
}
.invoice-terms {
  padding: 23px 0;
  border-top: 1px solid var(--line);
}
.invoice-terms h3 {
  font-size: 12px;
  margin-bottom: 8px;
}
.invoice-terms p {
  max-width: 550px;
  font-size: 11px;
  color: var(--muted);
}

/* 09 — Direct service panels and response states */
.ai-banner,
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 22px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.7;
}
.ai-banner {
  background: var(--brass-soft);
  border-color: color-mix(in srgb, var(--brass) 18%, var(--line));
}
.ai-banner > .icon,
.alert > .icon {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.ai-banner > .icon {
  color: var(--brass-text);
}
.ai-banner strong {
  color: var(--ink);
}
.alert p {
  font-size: 12px;
}
.alert strong {
  display: inline;
}
.alert > div > p {
  margin-top: 4px;
  font-size: 11px;
}
.alert.good {
  border-color: color-mix(in srgb, var(--moss) 22%, var(--line));
}
.alert.warm {
  border-color: color-mix(in srgb, var(--brass) 22%, var(--line));
}
.alert.bad {
  border-color: color-mix(in srgb, var(--clay) 22%, var(--line));
}
.ai-form-inner {
  padding: 0 24px 24px;
}
.ai-form-inner > label {
  display: block;
  margin-bottom: 10px;
}
.ai-form-inner > .actions {
  margin-top: 23px;
}
.ai-form-inner textarea {
  font-size: 13px;
  line-height: 1.85;
}
.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.prompt-suggestions .tag {
  font-size: 10px;
}
.ai-output {
  padding: 25px 24px;
  border-top: 1px solid var(--line);
  background: var(--hover);
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  min-height: 185px;
}
.ai-output h3 {
  margin: 13px 0 9px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.ai-output p {
  color: var(--muted);
  font-size: 12px;
}
.ai-output pre {
  font-size: 11px;
  max-height: 550px;
}
.ai-output ul,
.ai-output ol {
  padding-left: 20px;
  margin-block: 12px;
}
.ai-output a {
  color: var(--brass-text);
  text-decoration: underline;
}
.ai-output[aria-busy='true'],
.ai-output.loading {
  border-top-color: var(--brass-text);
}
.ai-output.error,
.ai-output[data-state='error'],
.ai-output[data-state='quota'],
.ai-output.quota {
  background: var(--clay-soft);
}
.ai-form button[aria-busy='true'] {
  cursor: wait;
}
.service-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--brass) 18%, var(--line));
  background: var(--brass-soft);
  color: var(--brass-text);
  border-radius: 8px;
  margin-bottom: 18px;
}
.service-glyph .icon {
  width: 21px;
  height: 21px;
}
.integration-state {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 19px 0;
  border-block: 1px solid var(--line);
  padding: 15px 0;
  font-size: 11px;
  color: var(--brass-text);
}
.integration-state small {
  flex: 0 0 100%;
  padding-left: 12px;
  color: var(--muted);
  font-size: 10px;
}
.integration-grid .actions .btn {
  font-size: 11px;
}
.usage-list {
  padding: 0 22px 8px;
}
.usage-list > a {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.usage-list .service-glyph {
  margin: 0;
  flex-shrink: 0;
}
.usage-list > a > div {
  flex: 1;
  min-width: 180px;
}
.usage-list h3 {
  font-size: 13px;
}
.usage-list p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.usage-list .tag {
  font-size: 9px;
}

/* 10 — Interface specimens, settings, and layered surfaces */
.component-specimen {
  padding: 0 24px 24px;
}
.component-specimen > .eyebrow {
  margin-bottom: 14px;
}
.component-specimen > .demo-row {
  margin-bottom: 30px;
}
.component-specimen > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.component-specimen > .stack-form {
  padding: 0;
}
.component-directory {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}
.demo-row {
  gap: 10px;
  margin: 17px 0;
}
.component-specimen .insight {
  margin: 20px 0 0;
  font-size: 12px;
}
.type-specimen > * + * {
  margin-top: 23px;
}
.type-specimen h1 {
  font-size: clamp(28px, 3vw, 43px);
  letter-spacing: -1.6px;
  max-width: 530px;
}
.type-specimen h2 {
  font-size: 27px;
  letter-spacing: -0.8px;
}
.type-specimen h3 {
  font-size: 18px;
  font-weight: 500;
}
.type-specimen p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 510px;
}
.type-specimen > .mono,
.type-specimen > small {
  display: block;
}
.type-specimen > small {
  color: var(--muted);
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.swatch {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 7px 12px;
  background: var(--surface);
  min-width: 0;
}
.swatch:hover {
  border-color: var(--brass-text);
}
.swatch > i {
  display: block;
  height: 82px;
  border: 1px solid rgb(0 0 0 / 6%);
  border-radius: 3px;
  margin-bottom: 12px;
}
.swatch > strong {
  display: block;
  font-size: 11px;
  margin: 0 5px 4px;
}
.swatch > span {
  font-size: 9px;
  color: var(--muted);
  margin: 0 5px;
}
.demo-cards {
  gap: 15px;
}
.demo-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.demo-card.tinted {
  background: var(--brass-soft);
}
.demo-card > h3 {
  margin: 14px 0 8px;
  font-size: 25px;
  letter-spacing: -0.6px;
  font-weight: 500;
}
.demo-card > p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
}
.demo-card > .positive {
  font-size: 11px;
}
.demo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 25px;
}
.demo-breadcrumb > span:last-child {
  color: var(--ink);
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs > button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 0;
  color: var(--muted);
  min-height: 42px;
  font-size: 12px;
  white-space: nowrap;
}
.tabs > button.active,
.tabs > button[aria-selected='true'] {
  color: var(--brass-text);
  border-bottom-color: var(--brass-text);
}
.tabs > button:hover {
  color: var(--ink);
}
.tab-content {
  padding: 24px 0 5px;
}
.tab-content > h3 {
  margin-bottom: 9px;
}
.tab-content p {
  color: var(--muted);
  font-size: 12px;
}
.tab-content .resource-link + .resource-link {
  margin-top: 10px;
}
.accordion {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 17px;
  margin-bottom: 12px;
}
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  list-style: none;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: '+';
  color: var(--brass-text);
  font-size: 18px;
  font-weight: 400;
}
.accordion[open] summary::after {
  content: '−';
}
.accordion[open] summary {
  border-bottom: 1px solid var(--line);
}
.accordion p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  padding: 17px 0;
}
.progress-examples > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progress-examples > .demo-row {
  color: var(--muted);
  font-size: 12px;
  margin-top: 30px;
}
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--brass-text);
  border-radius: 50%;
  animation: brassline-spin 0.85s linear infinite;
}
@keyframes brassline-spin {
  to {
    transform: rotate(360deg);
  }
}
.skeleton-block {
  display: grid;
  gap: 11px;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 5px;
  margin-top: 25px;
}
.skeleton-block > span {
  display: block;
  height: 10px;
  background: var(--line);
  border-radius: 2px;
}
.skeleton-block > span:first-child {
  width: 52%;
  height: 15px;
  margin-bottom: 7px;
}
.skeleton-block > span:last-child {
  width: 75%;
}
.empty-example {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 38px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}
.empty-example > .icon {
  width: 35px;
  height: 35px;
  color: var(--brass-text);
  margin-bottom: 20px;
}
.empty-example h3 {
  font-size: 18px;
  max-width: 280px;
}
.empty-example p {
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 22px;
}
.empty-inline,
.empty-state {
  text-align: center;
  padding: 30px 20px;
}
.empty-inline p,
.empty-state p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 0;
  border-top: 1px solid var(--line);
}
.preference-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.preference-row h3 {
  font-size: 13px;
}
.preference-row p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.preference-row > .switch-label {
  flex-shrink: 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.plan-grid > .panel {
  display: flex;
  flex-direction: column;
}
.plan-grid > .panel:has(.badge.good) {
  border-color: var(--brass-text);
}
.plan-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 24px 25px;
}
.plan-price {
  font-size: 39px;
  letter-spacing: -1.5px;
  font-weight: 500;
}
.plan-price > small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 5px;
}
.plan-card > p {
  font-size: 12px;
  color: var(--muted);
  margin: 22px 0 18px;
  min-height: 38px;
}
.plan-card > ul {
  list-style: none;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  flex: 1;
}
.plan-card li {
  position: relative;
  padding: 7px 0 7px 18px;
}
.plan-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brass-text);
}
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding: 0 22px 24px;
}
.security-grid .prose {
  padding: 0;
}
.security-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.security-status:first-child {
  padding-top: 0;
}
.security-grid .actions {
  margin-top: 24px;
}
.password-wrap {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 8px;
}
.password-wrap input {
  padding-right: 45px !important;
}
.password-wrap .icon-btn {
  position: absolute;
  right: 4px;
  top: 2px;
  color: var(--muted);
}
dialog {
  position: fixed;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: var(--overlay);
}
.app-dialog {
  width: 580px;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.dialog-head h2 {
  font-size: 16px;
}
[data-dialog-body] {
  padding: 24px;
}
[data-dialog-body] > .stack-form,
[data-dialog-body] > .business-form {
  padding: 0;
}
[data-dialog-body] p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
[data-dialog-body] > .actions,
[data-dialog-body] > form > .actions {
  margin-top: 23px;
  justify-content: flex-end;
}
[data-dialog-body] .table-scroll {
  max-height: 340px;
}
.app-dialog.drawer,
.app-dialog.is-drawer,
.app-dialog[data-drawer='true'] {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(480px, 100vw);
  border-radius: 0;
  border-width: 0 0 0 1px;
}
.command-dialog {
  width: 610px;
  margin: min(15vh, 125px) auto auto;
}
.command-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.command-input > .icon {
  color: var(--brass-text);
}
.command-input > input[type='search'] {
  background: transparent;
  border: 0;
  outline: 0;
  padding: 8px 0;
  min-height: 40px;
  font-size: 14px;
}
.command-input .key-button {
  min-height: 25px;
  padding: 3px 6px;
  color: var(--muted);
  font: 9px var(--mono);
}
.command-results {
  padding: 7px;
  max-height: min(55vh, 440px);
  overflow-y: auto;
}
.command-results:empty {
  padding: 0;
}
.command-results > a,
.command-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 4px;
  padding: 12px 13px;
  font-size: 13px;
}
.command-results > a:hover,
.command-results > a.active,
.command-results [aria-selected='true'],
.command-result.active {
  background: var(--brass-soft);
  color: var(--brass-text);
}
.command-results small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.command-results > p {
  padding: 20px 13px;
  color: var(--muted);
  font-size: 12px;
}
.command-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 9px var(--mono);
}
.toast-region {
  position: fixed;
  bottom: 23px;
  right: 25px;
  z-index: 150;
  width: min(370px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--moss);
  border-radius: 5px;
  padding: 15px 17px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.7;
}
.toast.warm,
.toast.warning {
  border-left-color: var(--brass-text);
}
.toast.bad,
.toast.error {
  border-left-color: var(--clay-text);
}
.toast > .icon {
  color: var(--moss);
  margin-top: 2px;
}
.toast button {
  margin-left: auto;
}

/* 11 — Page directory, search, editorial, and alternate layouts */
.directory-intro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 12px 0 32px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 28px;
}
.directory-intro > strong {
  font-size: 77px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -5px;
  color: var(--brass-text);
}
.directory-intro > p {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.3px;
}
.directory-intro .input-icon {
  margin-left: auto;
  width: 310px;
  max-width: 100%;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.directory-section {
  margin: 0;
  overflow: hidden;
}
.directory-section:has(.directory-link):not(:has(.directory-link:not([hidden]))) {
  display: none;
}
.directory-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}
.directory-link > span {
  flex: 1;
  min-width: 0;
}
.directory-link strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.directory-link small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin-top: 5px;
}
.directory-link .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  color: var(--soft);
}
.directory-link:hover {
  background: var(--brass-soft);
}
.search-panel {
  padding: 28px;
}
.search-panel > label {
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: 0.7px;
}
.big-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
  margin-top: 15px;
  margin-bottom: 23px;
}
.big-search > .icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  color: var(--brass-text);
}
.big-search > input[type='search'] {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 23px;
  letter-spacing: -0.4px;
  min-height: 70px;
  padding-inline: 0;
}
.search-filters {
  margin-bottom: 20px;
}
[data-search-count] {
  font: 10px var(--mono);
  margin-bottom: 14px;
}
.search-results > a,
.search-result {
  display: block;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.search-results strong,
.search-result h3 {
  font-size: 14px;
  font-weight: 500;
}
.search-results small,
.search-results p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.help-hero {
  padding: 44px 38px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 6px;
  background: var(--brass-soft);
  margin-bottom: 25px;
}
.help-hero h2 {
  font-size: 38px;
  letter-spacing: -1.4px;
  margin-top: 15px;
  font-weight: 500;
}
.help-hero p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 25px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.help-grid > .panel {
  margin: 0;
}
.article-sheet {
  max-width: 900px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  padding: 46px 55px;
  margin: 0 auto;
}
.article-sheet h2 {
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -1.3px;
  margin: 18px 0 20px;
  max-width: 670px;
  font-weight: 500;
}
.article-sheet .article-lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 35px;
}
.article-sheet h3 {
  font-size: 17px;
  margin: 32px 0 13px;
}
.article-sheet p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}
.article-sheet p + p {
  margin-top: 16px;
}
.article-sheet blockquote {
  border-left: 2px solid var(--brass);
  padding: 4px 0 4px 23px;
  margin: 30px 0;
  font-size: 23px;
  line-height: 1.5;
  letter-spacing: -0.4px;
}
.article-sheet > .actions,
.article-sheet > .text-link {
  margin-top: 32px;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.auth-editorial {
  padding: 55px 40px;
  color: #eeeee5;
  background: #242821;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.auth-editorial .eyebrow {
  color: #c7b68f;
  font-size: 9px;
}
.auth-editorial h2 {
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -2px;
  margin-top: 49px;
}
.auth-editorial p {
  font-size: 13px;
  color: #b9bdae;
  max-width: 260px;
  margin: 24px 0 44px;
}
.editorial-rule {
  width: 45px;
  height: 2px;
  background: #c5a66b;
  margin-top: auto;
  margin-bottom: 22px;
}
.auth-editorial > .mono {
  font-size: 8px;
  letter-spacing: 1px;
  color: #b9bdae;
}
.auth-card {
  padding: 45px 38px;
}
.auth-card > h2 {
  font-size: 28px;
  letter-spacing: -0.9px;
  margin: 13px 0;
  font-weight: 500;
}
.auth-card > p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 26px;
  line-height: 1.8;
}
.auth-card .stack-form {
  padding: 0;
}
.auth-card .stack-form > .btn {
  width: 100%;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin: 24px 0 18px;
  color: var(--muted);
  font-size: 10px;
}
.error-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 55px 20px 70px;
  text-align: center;
}
.error-code {
  font-size: clamp(100px, 15vw, 185px);
  line-height: 1.1;
  letter-spacing: -12px;
  font-weight: 400;
  color: var(--brass-text);
  opacity: 0.7;
  padding-right: 12px;
  margin-bottom: 28px;
}
.error-layout h2 {
  font-size: 35px;
  letter-spacing: -1.3px;
  margin: 17px 0 12px;
  font-weight: 500;
}
.error-layout > p {
  font-size: 13px;
  color: var(--muted);
  max-width: 450px;
}
.error-layout .actions {
  justify-content: center;
  margin-top: 28px;
}
.error-layout .subtle-note {
  margin-top: 30px;
  font-size: 10px;
}
.focus-layout {
  max-width: 850px;
  padding: 48px 0 70px;
}
.focus-layout > .eyebrow {
  color: var(--brass-text);
}
.focus-layout h2 {
  font-size: clamp(37px, 4.5vw, 64px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -2.4px;
  margin: 25px 0;
}
.focus-layout > p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 530px;
}
.focus-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 46px;
  margin: 36px 0;
  padding: 28px 0;
  border-block: 1px solid var(--line-strong);
  max-width: 530px;
}
.focus-stats strong {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.9px;
}
.focus-stats span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 7px;
}
.split-layout,
.compact-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(0, 1.7fr);
  gap: 22px;
}
.split-layout .prose h3 {
  font-size: 24px;
  letter-spacing: -0.7px;
  font-weight: 500;
}
.split-layout .detail-list {
  margin: 22px 0;
}
.layout-focus .page-heading {
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line-strong);
}
.layout-split .split-layout > .panel:first-child {
  align-self: start;
}
.layout-horizontal .page-heading {
  margin-bottom: 18px;
}
.horizontal-nav {
  display: flex;
  gap: 27px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 25px;
}
.horizontal-nav a {
  padding: 9px 0 16px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  white-space: nowrap;
}
.horizontal-nav a.active {
  color: var(--brass-text);
  border-bottom-color: var(--brass-text);
}
.layout-wide {
  --rail-width: 212px;
  --gutter: 25px;
}
.layout-wide .workspace-switch {
  padding: 9px 7px;
  font-size: 10px;
}
.layout-wide .sidebar-account small {
  font-size: 8px;
}
.layout-compact main {
  --gutter: 24px;
}
.compact-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
  gap: 16px;
}
.compact-signals {
  padding: 0 22px 14px;
}
.compact-signals > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.compact-signals strong {
  font: 15px var(--mono);
}
.compact-signals small {
  grid-column: 2;
  text-align: right;
  color: var(--moss);
  font-size: 9px;
}
.compact-cadence {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 22px 22px;
}
.compact-cadence > div {
  border: 1px solid var(--line);
  border-right: 0;
  padding: 15px;
  min-width: 0;
}
.compact-cadence > div:last-child {
  border-right: 1px solid var(--line);
}
.compact-cadence .mono {
  font-size: 9px;
  color: var(--brass-text);
}
.compact-cadence strong {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0;
}
.compact-cadence small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

/* 12 — Responsive navigation and page-family adaptation */
@media (min-width: 1600px) {
  :root {
    --rail-width: 252px;
    --gutter: 42px;
  }
  .kpi {
    padding: 24px 27px;
  }
  .dashboard-top,
  .dashboard-middle {
    grid-template-columns: minmax(0, 2.25fr) minmax(300px, 1fr);
  }
  .performance .revenue-svg {
    min-height: 240px;
  }
}

@media (max-width: 1250px) {
  :root {
    --rail-width: 218px;
    --gutter: 24px;
  }
  .sidebar {
    padding-inline: 13px;
  }
  .brand {
    padding-inline: 9px;
  }
  .workspace-switch {
    font-size: 10px;
    gap: 7px;
    padding: 9px 8px;
  }
  .workspace-switch small {
    font-size: 9px;
  }
  .nav-item {
    font-size: 11px;
    padding-inline: 9px;
  }
  .sidebar-account > a {
    font-size: 10px;
    gap: 7px;
  }
  .sidebar-account small {
    font-size: 8px;
  }
  .sidebar-account .avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .kpi {
    padding: 18px;
  }
  .kpi-number {
    font-size: 31px;
  }
  .kpi-number > svg {
    width: 48px;
  }
  .kpi-foot {
    flex-wrap: wrap;
    gap: 3px 6px;
  }
  .dashboard-top,
  .dashboard-middle {
    grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
    gap: 18px;
  }
  .dashboard-bottom {
    gap: 18px;
  }
  .panel-head {
    padding-inline: 18px;
  }
  .panel-head > .text-link {
    font-size: 10px;
  }
  .dashboard-top .panel-head {
    gap: 10px;
  }
  .chart-meta {
    padding-inline: 18px;
  }
  .chart-total {
    font-size: 27px;
  }
  .chart-total > span {
    font-size: 20px;
  }
  .legend {
    font-size: 9px;
    gap: 10px;
  }
  .board {
    gap: 12px;
  }
  .board-column {
    padding-inline: 9px;
  }
  .deal-card {
    padding-inline: 11px;
  }
  .deal-card > strong {
    font-size: 18px;
  }
  .form-layout,
  .ai-layout,
  .component-layout,
  .builder-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(235px, 1fr);
    gap: 18px;
  }
  .document-grid,
  .directory-grid,
  .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-grid {
    gap: 16px;
  }
  .plan-card {
    padding-inline: 18px;
  }
  .plan-card .btn {
    font-size: 11px;
    padding-inline: 9px;
  }
  .mail-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
  }
  .mail-row {
    padding-inline: 15px;
    gap: 10px;
  }
}

@media (max-width: 1023px) {
  :root {
    --rail-width: 236px;
    --gutter: 24px;
  }
  html {
    scrollbar-gutter: auto;
  }
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.2s ease,
      visibility 0.2s;
    box-shadow: var(--shadow);
    width: min(var(--rail-width), calc(100vw - 64px));
    padding-inline: 16px;
  }
  .brand {
    padding-top: 24px;
    padding-bottom: 23px;
  }
  .sidebar .nav-item {
    font-size: 12px;
    min-height: 40px;
  }
  .sidebar > nav {
    scrollbar-width: thin;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    gap: 10px;
  }
  .mobile-menu {
    display: inline-flex;
    min-width: 36px;
    width: 36px;
    min-height: 38px;
    margin-left: -7px;
    margin-right: 2px;
  }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    z-index: 39;
    transition:
      opacity 0.2s,
      visibility 0.2s;
    cursor: pointer;
  }
  body.nav-open,
  body.sidebar-open,
  body:has(.sidebar.open),
  body:has(.sidebar.is-open) {
    overflow: hidden;
  }
  body.nav-open .sidebar,
  body.sidebar-open .sidebar,
  .sidebar.open,
  .sidebar.is-open,
  .sidebar[data-open='true'] {
    transform: translateX(0);
    visibility: visible;
  }
  body.nav-open .nav-scrim,
  body.sidebar-open .nav-scrim,
  body:has(.sidebar.open) .nav-scrim,
  body:has(.sidebar.is-open) .nav-scrim,
  body:has(.sidebar[data-open='true']) .nav-scrim {
    opacity: 1;
    visibility: visible;
  }
  .sidebar .workspace-switch {
    font-size: 11px;
    padding: 10px;
  }
  .sidebar-account > a {
    font-size: 11px;
  }
  .sidebar-account small {
    font-size: 9px;
  }
  .noscript {
    left: 0;
  }
  .page-heading {
    margin-bottom: 26px;
  }
  .kpi-number {
    font-size: 34px;
  }
  .kpi-foot {
    flex-wrap: nowrap;
  }
  .form-layout,
  .component-layout,
  .ai-layout,
  .builder-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  }
  .board {
    gap: 14px;
  }
  .board-head h2 {
    font-size: 11px;
    gap: 5px;
  }
  .board-total {
    font-size: 10px;
  }
  .board-total > span {
    font-size: 8px;
  }
  .deal-card {
    padding: 14px 12px 12px;
  }
  .layout-wide {
    --rail-width: 236px;
  }
  .auth-layout {
    min-height: 550px;
  }
  .auth-editorial {
    padding: 40px 32px;
  }
  .auth-card {
    padding: 40px 30px;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 20px;
    --header-height: 60px;
  }
  .topbar {
    min-height: 60px;
    padding-block: 10px;
  }
  .breadcrumb {
    gap: 8px;
  }
  .breadcrumb > a,
  .breadcrumb > span {
    display: none;
  }
  .breadcrumb strong {
    max-width: 230px;
  }
  .demo-indicator {
    display: none;
  }
  .topbar-actions {
    gap: 4px;
  }
  .topbar-divider {
    margin-inline: 5px;
  }
  main {
    padding-top: 25px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }
  h1 {
    font-size: 30px;
    letter-spacing: -1.1px;
  }
  .page-heading p {
    font-size: 12px;
    line-height: 1.7;
  }
  .page-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .heading-actions {
    max-width: 100%;
    min-width: 0;
    padding-top: 0;
  }
  .heading-actions .btn {
    min-height: 36px;
    font-size: 11px;
  }
  .heading-actions .date-control select {
    min-height: 34px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 19px;
  }
  .kpi {
    padding: 19px 20px;
  }
  .kpi:nth-child(3) {
    border-left: 0;
  }
  .kpi:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .kpi-number {
    font-size: 35px;
  }
  .kpi-number > svg {
    width: 65px;
  }
  .kpi-foot {
    margin-top: 11px;
  }
  .dashboard-top,
  .dashboard-middle,
  .dashboard-bottom,
  .two-col,
  .form-layout,
  .component-layout,
  .ai-layout,
  .builder-grid,
  .detail-grid,
  .security-grid,
  .split-layout,
  .compact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .dashboard-top,
  .dashboard-middle,
  .dashboard-bottom {
    margin-bottom: 18px;
  }
  .dashboard-top .panel-head {
    padding-inline: 20px;
  }
  .performance .revenue-svg {
    min-height: 170px;
  }
  .quarter-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .quarter-panel .panel-head {
    grid-column: 1 / -1;
  }
  .quarter-panel .goal-ring {
    grid-row: span 2;
    margin: 0 auto 8px;
  }
  .quarter-panel .goal-amount {
    padding: 0 20px 20px 0;
    justify-content: flex-start;
    gap: 18px;
    align-self: end;
  }
  .quarter-panel .goal-amount > span + span {
    padding-left: 18px;
  }
  .quarter-panel .insight {
    margin: 0 20px 12px 0;
    align-self: start;
  }
  .quarter-panel > .text-link {
    grid-column: 1 / -1;
    margin: 6px 20px 19px;
  }
  .mini-kpis > div {
    padding: 18px 17px;
  }
  .mini-kpis .eyebrow {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .mini-kpis strong {
    font-size: 24px;
    margin-top: 9px;
  }
  .mini-kpis small {
    font-size: 9px;
  }
  .panel-head {
    padding: 16px 20px;
    min-height: 58px;
  }
  .panel-head h2 {
    font-size: 13px;
  }
  .data-panel .panel-head {
    align-items: flex-start;
  }
  .data-panel .panel-head .actions {
    gap: 7px;
  }
  .data-panel .panel-head .btn {
    min-height: 36px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .table-toolbar {
    padding-inline: 20px;
  }
  .table-toolbar .input-icon {
    max-width: none;
    flex-basis: calc(100% - 160px);
  }
  .table-toolbar .toolbar-spacer {
    display: none;
  }
  .table-toolbar > select {
    flex: 1 1 125px;
    max-width: none;
  }
  .table-toolbar > .btn,
  .column-menu .btn {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 11px;
  }
  .table-toolbar > .column-menu {
    margin-left: auto;
  }
  .table-bottom {
    padding-inline: 20px;
    gap: 13px;
  }
  .table-bottom > label {
    margin-left: 0;
  }
  .table-bottom > .pagination {
    margin-left: auto;
  }
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
  }
  .board-column {
    padding-inline: 12px;
  }
  .board-head h2 {
    font-size: 12px;
  }
  .board-total {
    font-size: 11px;
  }
  .deal-card {
    padding: 16px;
  }
  .deal-card h3 {
    font-size: 13px;
  }
  .detail-grid > div > .panel:last-child {
    margin-bottom: 0;
  }
  .form-layout > .panel,
  .component-layout > .panel,
  .ai-layout > .panel,
  .builder-grid > .panel {
    margin-bottom: 0;
  }
  .form-layout,
  .component-layout,
  .ai-layout,
  .builder-grid {
    margin-bottom: 22px;
  }
  .business-form {
    padding-inline: 20px;
  }
  .form-grid {
    column-gap: 16px;
  }
  .wizard-step {
    padding: 25px;
  }
  .wizard-steps li {
    padding: 14px;
    gap: 7px;
    font-size: 10px;
  }
  .wizard-steps li > span {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }
  .wizard-actions {
    padding: 18px 25px;
  }
  .wizard-step h2 {
    font-size: 22px;
  }
  .wizard-shell [data-wizard-result] {
    margin-inline: 25px;
  }
  .project-grid,
  .goal-grid,
  .integration-grid {
    gap: 16px;
  }
  .project-footer {
    flex-wrap: wrap;
  }
  .project-footer > .text-link {
    width: 100%;
    margin-left: 0;
  }
  .goal-value strong {
    font-size: 27px;
  }
  .goal-value > span {
    font-size: 10px;
  }
  .mail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .mail-folders {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px;
    margin: 0;
  }
  .mail-folders > h2 {
    display: none;
  }
  .mail-folders > .folder {
    width: auto;
    font-size: 11px;
    padding: 9px;
    gap: 9px;
    margin: 0;
  }
  .mail-folders > .btn {
    width: auto;
    margin: 0 0 0 auto;
    min-height: 34px;
    font-size: 11px;
    padding: 8px 11px;
  }
  .calendar-grid > div {
    min-height: 100px;
    padding: 6px;
  }
  .calendar-event,
  .calendar-grid [data-event],
  .calendar-grid [data-event-id] {
    font-size: 8px;
    padding: 4px;
  }
  .calendar-weekdays > span {
    font-size: 8px;
  }
  .invoice-sheet {
    padding: 30px 25px;
  }
  .invoice-address dl {
    min-width: 205px;
  }
  .invoice-address dl > div {
    gap: 15px;
    font-size: 11px;
  }
  .invoice-heading h2 {
    font-size: 20px;
  }
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .plan-grid > .panel {
    margin-bottom: 0;
  }
  .plan-grid {
    margin-bottom: 22px;
  }
  .plan-card > p {
    min-height: auto;
  }
  .article-sheet {
    padding: 33px;
  }
  .article-sheet h2 {
    font-size: 30px;
  }
  .article-sheet .article-lead {
    font-size: 16px;
  }
  .article-sheet blockquote {
    font-size: 21px;
  }
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-editorial {
    padding: 30px;
  }
  .auth-editorial h2 {
    font-size: 38px;
    margin-top: 22px;
  }
  .auth-editorial h2 br {
    display: none;
  }
  .auth-editorial p {
    max-width: none;
    margin: 17px 0 25px;
    font-size: 12px;
  }
  .auth-editorial .editorial-rule {
    margin-bottom: 16px;
  }
  .auth-card {
    padding: 32px 30px;
  }
  .directory-intro {
    gap: 20px;
  }
  .directory-intro > strong {
    font-size: 66px;
  }
  .directory-intro .input-icon {
    margin-left: 0;
    flex: 0 0 100%;
    width: 100%;
  }
  .directory-grid {
    gap: 16px;
  }
  .directory-link {
    padding-inline: 17px;
  }
  .help-hero {
    padding: 32px 28px;
  }
  .help-hero h2 {
    font-size: 32px;
  }
  .help-grid {
    gap: 16px;
  }
  .compact-cadence {
    grid-template-columns: minmax(0, 1fr);
  }
  .compact-cadence > div {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 0;
    border-top: 1px solid var(--line);
    padding-inline: 0;
  }
  .compact-cadence > div:last-child {
    border-right: 0;
  }
  .compact-cadence strong {
    margin: 0;
    flex: 1;
  }
  .horizontal-nav {
    gap: 23px;
  }
  .footer {
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
  }
  .focus-layout {
    padding-top: 24px;
  }
  .focus-layout h2 {
    letter-spacing: -1.7px;
  }
  .error-layout {
    padding-block: 35px 45px;
  }
  .toast-region {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 479px) {
  :root {
    --gutter: 16px;
  }
  .topbar-actions .topbar-divider {
    display: none;
  }
  .breadcrumb strong {
    max-width: 178px;
    font-size: 10px;
  }
  .topbar-actions {
    gap: 1px;
  }
  .topbar-actions .icon-btn {
    width: 30px;
    min-width: 30px;
    padding: 6px;
  }
  .topbar-actions .avatar {
    margin-left: 5px;
  }
  .page-heading {
    margin-bottom: 21px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading > div:first-child {
    width: 100%;
  }
  .kpi {
    padding: 17px 16px;
  }
  .kpi-label {
    font-size: 10px;
  }
  .kpi-number {
    font-size: 30px;
    gap: 7px;
    margin-top: 12px;
  }
  .kpi-number > svg {
    width: 43px;
    min-width: 28px;
    height: 24px;
  }
  .kpi-foot {
    font-size: 8px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .kpi-foot .positive {
    font-size: 9px;
  }
  .chart-total {
    font-size: 26px;
  }
  .chart-meta {
    align-items: flex-start;
    padding-inline: 18px;
  }
  .chart-meta .legend {
    margin-top: 8px;
    gap: 9px;
  }
  .chart-meta .legend i {
    width: 10px;
  }
  .revenue-svg {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }
  .performance .revenue-svg {
    min-height: 145px;
  }
  .revenue-svg text {
    font-size: 20px;
  }
  .performance .panel-head {
    flex-wrap: nowrap;
    gap: 8px;
    padding-inline: 16px;
  }
  .performance .panel-head h2 {
    font-size: 12px;
  }
  .performance .segmented {
    gap: 0;
    padding: 2px;
  }
  .performance .segmented button {
    font-size: 9px;
    padding: 4px 7px;
    min-height: 28px;
  }
  .chart-note {
    padding-inline: 18px;
    font-size: 9px;
    line-height: 1.7;
  }
  .quarter-panel .goal-ring {
    width: 146px;
    height: 146px;
  }
  .quarter-panel .goal-ring strong {
    font-size: 30px;
  }
  .quarter-panel .goal-ring small {
    font-size: 9px;
  }
  .quarter-panel .goal-amount {
    gap: 12px;
    font-size: 11px;
    padding-right: 14px;
    padding-bottom: 12px;
  }
  .quarter-panel .goal-amount > span + span {
    padding-left: 12px;
  }
  .quarter-panel .goal-amount small {
    font-size: 8px;
  }
  .quarter-panel .insight {
    margin-right: 14px;
    padding: 9px 10px;
    gap: 7px;
    font-size: 9px;
  }
  .quarter-panel .small-spark {
    font-size: 16px;
  }
  .mini-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
  .mini-kpis > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 4px 16px;
    padding: 15px 18px;
  }
  .mini-kpis > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .mini-kpis .eyebrow {
    align-self: center;
    font-size: 9px;
  }
  .mini-kpis strong {
    grid-column: 2;
    grid-row: span 2;
    align-self: center;
    text-align: right;
    font-size: 24px;
    margin: 0;
  }
  .mini-kpis small {
    font-size: 10px;
  }
  .table-toolbar .input-icon {
    flex-basis: 100%;
  }
  .table-toolbar > select {
    max-width: none;
    flex: 1 1 100%;
  }
  .table-toolbar > .column-menu {
    margin-left: 0;
  }
  .column-menu > .popover {
    left: 0;
    right: auto;
  }
  .table-bottom > [data-table-count] {
    width: 100%;
  }
  .table-bottom {
    padding-inline: 16px;
    font-size: 9px;
  }
  .pagination {
    gap: 7px;
  }
  .pagination .btn {
    padding-inline: 7px;
    font-size: 9px;
  }
  .table-bottom > label {
    gap: 5px;
    font-size: 9px;
  }
  .table-bottom select {
    width: 52px;
  }
  .board {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .board-column {
    padding: 14px 14px 0;
  }
  .board-drop {
    min-height: 80px;
  }
  .board-total {
    padding-bottom: 15px;
  }
  .board-head h2 {
    font-size: 13px;
  }
  .context-bar {
    gap: 14px;
    font-size: 11px;
  }
  .context-bar > .actions {
    width: 100%;
  }
  .context-bar .input-icon {
    min-width: 0;
    width: 100%;
  }
  .context-bar > div:first-child {
    gap: 8px;
  }
  .context-bar .divider-v {
    display: none;
  }
  .project-grid,
  .goal-grid,
  .integration-grid,
  .document-grid,
  .directory-grid,
  .help-grid,
  .demo-cards,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-grid {
    gap: 20px;
  }
  .form-grid > .full {
    grid-column: auto;
  }
  input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
  select,
  textarea {
    font-size: 16px;
  }
  .table-toolbar input {
    font-size: 16px !important;
  }
  .table-toolbar > select {
    font-size: 14px;
  }
  .business-form,
  .component-specimen,
  .ai-form-inner {
    padding-inline: 20px;
  }
  .form-footer {
    align-items: flex-start;
  }
  .form-footer > .btn,
  .form-footer > .actions {
    width: 100%;
  }
  .form-footer > .actions > .primary {
    margin-left: auto;
  }
  .wizard-steps li {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding: 12px;
    font-size: 9px;
  }
  .wizard-step {
    padding: 24px 20px;
  }
  .wizard-actions {
    padding: 18px 20px;
    gap: 7px;
  }
  .wizard-actions .btn {
    padding-inline: 11px;
    font-size: 11px;
  }
  .wizard-actions > span {
    font-size: 8px;
  }
  .wizard-shell [data-wizard-result] {
    margin-inline: 20px;
  }
  .identity {
    gap: 12px;
  }
  .identity h2 {
    font-size: 18px;
  }
  .identity p {
    font-size: 11px;
  }
  .identity > .badge {
    margin-left: 0;
  }
  .detail-list > div {
    gap: 15px;
  }
  .detail-list dt {
    font-size: 10px;
  }
  .detail-list dd {
    font-size: 11px;
  }
  .approval-row {
    padding: 20px;
    gap: 12px;
  }
  .approval-row > div:first-of-type {
    min-width: 0;
    flex-basis: calc(100% - 56px);
  }
  .approval-row .actions {
    margin-left: auto;
    gap: 7px;
  }
  .approval-row > strong {
    font-size: 12px;
  }
  .approval-row .btn {
    padding-inline: 11px;
    font-size: 11px;
  }
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .calendar-grid > div {
    min-height: 75px;
    padding: 4px 2px;
  }
  .calendar-grid .day-number,
  .calendar-grid time {
    font-size: 9px;
  }
  .calendar-event,
  .calendar-grid [data-event],
  .calendar-grid [data-event-id] {
    font-size: 7px;
    padding: 3px 2px;
    border-left-width: 1px;
    margin-top: 4px;
    line-height: 1.45;
  }
  .calendar-weekdays > span {
    font-size: 7px;
  }
  .calendar-weekdays {
    padding-block: 1px;
  }
  .mail-row {
    padding: 16px 12px;
    gap: 9px;
  }
  .mail-row > .avatar {
    display: none;
  }
  .mail-row > div:last-child {
    max-width: 62px;
  }
  .mail-row > div:last-child .tag {
    font-size: 7px;
    padding: 3px 5px;
  }
  .mail-folders {
    gap: 3px;
  }
  .mail-folders > .folder {
    font-size: 10px;
    padding: 8px;
    gap: 6px;
  }
  .mail-folders > .btn {
    margin-top: 5px;
    margin-right: 0;
  }
  .mail-layout > .panel > .panel-head .input-icon {
    max-width: none;
    width: 100%;
  }
  .mail-layout > .panel > .panel-head input {
    font-size: 16px;
  }
  .email-body {
    padding-inline: 20px;
  }
  .email-body .identity > time {
    flex-basis: 100%;
    padding-left: 46px;
  }
  .email-body .identity p {
    font-size: 10px;
    overflow-wrap: anywhere;
  }
  .invoice-sheet {
    padding: 27px 20px;
  }
  .invoice-heading {
    flex-direction: column;
    gap: 25px;
    margin-bottom: 26px;
  }
  .invoice-heading > div:last-child {
    text-align: left;
  }
  .invoice-heading .wordmark > p {
    font-size: 10px;
  }
  .invoice-address {
    flex-direction: column;
    gap: 25px;
  }
  .invoice-address dl {
    min-width: 0;
    width: 100%;
  }
  .invoice-totals dl {
    width: 100%;
  }
  .funnel {
    padding-inline: 20px;
  }
  .funnel > div {
    grid-template-columns: 91px minmax(0, 1fr) 60px;
    column-gap: 10px;
  }
  .funnel > div > span {
    font-size: 10px;
  }
  .funnel > div > small {
    font-size: 8px;
  }
  .funnel > div > div {
    padding: 9px 7px;
    min-width: 48px;
  }
  .funnel > div > div > strong {
    font-size: 10px;
  }
  .forecast-control {
    padding-inline: 20px;
  }
  .range-labels {
    font-size: 8px;
  }
  .swatch-grid {
    gap: 10px;
  }
  .swatch > strong {
    font-size: 9px;
    margin-inline: 1px;
  }
  .swatch > span {
    font-size: 8px;
    margin-inline: 1px;
  }
  .swatch > i {
    height: 68px;
  }
  .big-search > input[type='search'] {
    font-size: 16px;
    min-height: 60px;
  }
  .search-panel {
    padding: 23px 20px;
  }
  .article-sheet {
    padding: 28px 22px;
  }
  .article-sheet h2 {
    font-size: 27px;
    letter-spacing: -0.9px;
  }
  .article-sheet .article-lead {
    font-size: 15px;
  }
  .article-sheet p {
    font-size: 13px;
  }
  .article-sheet h3 {
    font-size: 16px;
  }
  .article-sheet blockquote {
    padding-left: 18px;
    font-size: 20px;
  }
  .auth-editorial {
    padding: 28px 25px;
  }
  .auth-editorial h2 {
    font-size: 35px;
  }
  .auth-card {
    padding: 30px 25px;
  }
  .help-hero {
    padding: 30px 23px;
  }
  .help-hero h2 {
    font-size: 30px;
  }
  .focus-layout h2 {
    font-size: 36px;
    letter-spacing: -1.4px;
  }
  .focus-layout > p {
    font-size: 14px;
  }
  .focus-stats {
    gap: 30px;
  }
  .focus-stats strong {
    font-size: 26px;
  }
  .error-layout h2 {
    font-size: 29px;
  }
  .error-code {
    font-size: 120px;
  }
  .footer {
    font-size: 9px;
    padding-block: 20px;
  }
  .footer > span:first-child {
    font-size: 8px;
  }
  [data-dialog-body] {
    padding: 20px;
  }
  .dialog-head {
    padding-inline: 20px;
  }
  .command-input {
    gap: 9px;
    padding-inline: 13px;
  }
  .command-input > input[type='search'] {
    font-size: 16px;
  }
  .command-footer {
    font-size: 8px;
  }
}

/* 13 — Motion, forced colors, and document printing */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .btn,
  .panel,
  input,
  select,
  textarea,
  .badge,
  .sidebar {
    border: 1px solid CanvasText;
  }
  .nav-item.active,
  .segmented button.active,
  .tabs > button.active {
    outline: 1px solid Highlight;
  }
  .meter > i,
  .stacked-bar > i,
  .brand-symbol i,
  .heatmap i {
    forced-color-adjust: none;
  }
}
@media print {
  :root,
  :root[data-theme='dark'] {
    color-scheme: light;
    --canvas: #fff;
    --surface: #fff;
    --ink: #242821;
    --muted: #61665b;
    --line: #d8d8ce;
    --brass: #795e30;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
  body {
    background: #fff;
    font-size: 11px;
  }
  .sidebar,
  .topbar,
  .nav-scrim,
  .skip-link,
  .heading-actions,
  .footer,
  .no-print,
  .toast-region,
  dialog,
  .noscript {
    display: none !important;
  }
  .workspace {
    margin-left: 0;
  }
  main {
    padding: 0;
    max-width: none;
    min-height: 0;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .invoice-sheet {
    max-width: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }
  body[data-family='invoice'] .page-heading,
  body[data-family='quote'] .page-heading {
    display: none;
  }
  .invoice-heading {
    flex-direction: row;
  }
  .invoice-heading > div:last-child {
    text-align: right;
  }
  .invoice-address {
    flex-direction: row;
  }
  .invoice-address dl {
    min-width: 240px;
    width: auto;
  }
  .invoice-totals dl {
    width: 300px;
  }
  .table-scroll {
    overflow: visible;
  }
  .invoice-items {
    min-width: 0;
  }
  .panel,
  .invoice-totals,
  .invoice-terms,
  tr {
    break-inside: avoid;
    box-shadow: none;
  }
  th {
    background: #f3f3ed !important;
    print-color-adjust: exact;
  }
  .badge,
  .stacked-bar,
  .meter,
  .heatmap {
    print-color-adjust: exact;
  }
  .records-table {
    min-width: 0;
    font-size: 9px;
  }
  .records-table th,
  .records-table td {
    padding: 8px;
    white-space: normal;
  }
}

/* Bootstrap foundation compatibility */
.breadcrumb {
  margin-bottom: 0;
  flex-wrap: nowrap;
}
.toast-region > .toast:not(.show) {
  display: flex;
}
.toast-region > .toast {
  width: 100%;
  max-width: 100%;
}
.btn {
  --bs-btn-focus-shadow-rgb: 146, 115, 62;
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: none;
}
.foundation-disclosure {
  margin-bottom: 22px;
}
.foundation-disclosure .panel-head {
  flex-wrap: wrap;
}
.foundation-disclosure .prose {
  border-top: 1px solid var(--line);
}

/* Review refinements: readable supporting text and consistent record controls. */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}
.dash-grid.wide-first {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
}
.dash-grid > .panel {
  margin-bottom: 0;
  min-width: 0;
}
.dash-period-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.dash-period-note strong {
  color: var(--ink);
}
.dash-period-note .btn {
  margin-left: auto;
}
.dash-bars,
.dash-memo,
.dash-target {
  padding: 6px 23px 24px;
}
.dash-bars > div + div {
  margin-top: 22px;
}
.dash-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 15px;
  margin-bottom: 8px;
  font-size: 14px;
}
.dash-bar-head strong {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.dash-bars .meter {
  height: 9px;
  margin-bottom: 6px;
}
.dash-bars small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: block;
}
.dash-memo > p,
.dash-target p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.dash-memo details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 13px;
}
.dash-memo summary {
  cursor: pointer;
  font-weight: 500;
  line-height: 1.6;
}
.dash-memo details p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.dash-memo > .text-link,
.dash-target > .text-link {
  margin-top: 15px;
  font-size: 13px;
}
.dash-chart {
  position: relative;
  height: 280px;
  padding: 0 20px 16px;
}
.dash-hero-number {
  display: block;
  font-size: clamp(42px, 4vw, 60px);
  line-height: 1.2;
  letter-spacing: -2px;
  color: var(--brass-text);
  margin: 20px 0;
  font-weight: 500;
}
.dash-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.dash-filter select {
  font-size: 13px;
  min-height: 38px;
  max-width: 210px;
}
.dash-table-count {
  margin: 0;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.dash-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.6;
  padding: 13px 0;
  font-size: 14px;
}
.special-dashboard .panel-head {
  flex-wrap: wrap;
}
.special-dashboard .kpi-number {
  font-size: clamp(26px, 2.4vw, 38px);
}
.special-dashboard .simple-table {
  font-size: 13px;
}
.special-dashboard .simple-table th {
  font-size: 12px;
}
@media (max-width: 1100px) {
  .dash-grid.wide-first {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
  }
  .dash-bars,
  .dash-memo,
  .dash-target {
    padding-inline: 18px;
  }
  .dash-chart {
    height: 250px;
    padding-inline: 12px;
  }
  .dash-period-note .btn {
    margin: 8px 0 0;
  }
  .dash-table-count {
    padding-inline: 18px;
  }
  .dash-filter {
    width: 100%;
  }
  .dash-filter select {
    flex: 1;
    max-width: 100%;
    min-width: 0;
  }
}
.records-table button.text-link,
.special-dashboard button.text-link {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 0;
  min-height: 32px;
  font: inherit;
  color: var(--brass-text);
  text-align: left;
  cursor: pointer;
}
.records-table button.text-link:hover,
.special-dashboard button.text-link:hover {
  text-decoration: underline;
}
.input-icon
  > input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not(
    [type='color']
  ) {
  padding-left: 40px;
}
.input-icon > .icon {
  z-index: 1;
}
.kpi-label {
  font-size: 12px;
}
.mini-kpis .eyebrow {
  font-size: 12px;
  letter-spacing: 0.5px;
}
.mini-kpis small {
  font-size: 12px;
}
.records-table {
  font-size: 13px;
}
.records-table th,
.records-table .badge,
.table-bottom,
.table-bottom label,
.table-bottom select {
  font-size: 12px;
}
.kpi-foot,
.kpi-foot .positive {
  font-size: 12px;
  flex-wrap: wrap;
}
.chart-meta > div:first-child > small,
.chart-note,
.legend,
.goal-ring small,
.goal-amount small {
  font-size: 12px;
}
.date-control select,
.performance .segmented button {
  font-size: 12px;
}
body[data-page='revenue-report'] .chart-canvas {
  height: 260px;
}
body[data-page='revenue-report'] .simple-table {
  font-size: 13px;
}
body[data-page='revenue-report'] .simple-table th {
  font-size: 12px;
}
.report-total-row {
  font-weight: 600;
  border-top: 2px solid var(--line);
}
@media (max-width: 767px) {
  .kpi-label,
  .kpi-foot,
  .kpi-foot .positive,
  .mini-kpis .eyebrow,
  .mini-kpis small,
  .chart-note,
  .chart-meta > div:first-child > small,
  .legend,
  .quarter-panel .goal-ring small,
  .quarter-panel .goal-amount small,
  .quarter-panel .insight,
  .date-control select,
  .heading-actions .date-control select,
  .performance .segmented button {
    font-size: 12px;
    line-height: 1.5;
  }
  .performance .panel-head {
    flex-wrap: wrap;
  }
  .performance .segmented button {
    min-height: 36px;
    padding: 6px 10px;
  }
  .kpi-number {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .kpi-number > svg {
    display: none;
  }
  .quarter-panel .goal-amount {
    font-size: 14px;
  }
  .quarter-panel .insight {
    margin-inline: 16px;
  }
  .performance .revenue-svg {
    min-height: 180px;
  }
  .performance .revenue-svg text {
    font-size: 12px;
  }
  body[data-page='revenue-report'] .chart-canvas {
    height: 240px;
  }
}

/* Focused accessibility repair: readable controls and a useful narrow calendar. */
.calendar-grid .day-number {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: 12px var(--mono);
  cursor: pointer;
}
.calendar-grid .outside .day-number {
  color: var(--muted);
}
.calendar-grid .day-number:hover {
  border-color: var(--line-strong);
  background: var(--sidebar-active);
  color: var(--ink);
}
.calendar-grid .today .day-number {
  background: var(--ink);
  color: var(--canvas);
  border-radius: 5px;
}
.calendar-grid .calendar-event {
  color: var(--brass-text);
  font-size: 12px;
  line-height: 1.5;
  padding: 7px;
}
.calendar-event-dot {
  display: none;
  width: 4px;
  height: 4px;
  margin: 3px auto 0;
  border-radius: 50%;
  background: var(--brass-text);
}
.calendar-weekdays > span {
  font-size: 12px;
}
.calendar-agenda {
  margin-top: 24px;
}
.agenda-event {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 24px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font: 14px/1.5 var(--font);
}
.agenda-event:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.agenda-event:hover {
  background: var(--hover);
}
.agenda-event time,
.agenda-event > span {
  font-size: 12px;
  color: var(--muted);
}
.agenda-event time {
  font-family: var(--mono);
}
.agenda-event strong {
  font-size: 14px;
  font-weight: 500;
}
.wizard-steps li,
.wizard-steps li > span {
  font-size: 12px;
}
@media (max-width: 767px) {
  /* Links inherit their heading/body scale, with a readable lower bound. */
  #main a,
  #main a span,
  #main button span,
  #main label {
    font-size: max(12px, 1em);
  }
  #main :is(.btn, .tag, .folder, .segmented button, button.text-link) {
    font-size: 12px;
    line-height: 1.5;
  }
  #main :is(.btn, .folder, .segmented button) {
    min-height: 38px;
  }
  #main th {
    font-size: 12px;
  }
  #main td {
    font-size: 14px;
  }
  #main :is(.date-control select, .table-bottom, .table-bottom label, .table-bottom select) {
    font-size: 12px;
  }
  #main :is([data-chart-range], [data-permissions] select) {
    font-size: 14px;
    min-height: 40px;
  }
  #main .table-bottom .btn {
    padding-inline: 12px;
  }
  #main .swatch > span {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  #main .wizard-steps li,
  #main .wizard-steps li > span,
  #main .wizard-actions > span {
    font-size: 12px;
    line-height: 1.5;
  }
  #main .wizard-actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  #main .deal-card .eyebrow,
  #main .deal-card > div,
  #main .board-total > span,
  #main .board-head h2 > span {
    font-size: 12px;
  }
  #main .deal-card h3 {
    font-size: 16px;
  }
  #main .deal-card select {
    font-size: 14px;
  }
  #main .deal-card .avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .calendar-grid > div {
    min-height: 55px;
    padding: 4px 0;
    text-align: center;
  }
  .calendar-grid .calendar-event {
    display: none;
  }
  .calendar-grid .calendar-event-dot {
    display: block;
  }
  .calendar-weekdays > span {
    padding: 10px 0;
    font-size: 12px;
    letter-spacing: 0;
  }
  .calendar-agenda .panel-head {
    flex-wrap: wrap;
    gap: 12px;
  }
  .agenda-event {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 20px;
    gap: 5px;
  }
}
