:root {
  --paper: #f3efe6;
  --paper-deep: #e9e2d5;
  --paper-light: #fbf8f2;
  --ink: #18231f;
  --ink-soft: #52615c;
  --ink-faint: #89928e;
  --pine: #173b33;
  --pine-deep: #0e2a24;
  --pine-soft: #31584e;
  --vermillion: #cc5033;
  --vermillion-soft: #f2d8cf;
  --gold: #b4894f;
  --gold-soft: #eadcc4;
  --blue: #456c7d;
  --blue-soft: #dce8ec;
  --green: #4c7a58;
  --green-soft: #dbe9dd;
  --line: rgba(24, 35, 31, 0.12);
  --line-strong: rgba(24, 35, 31, 0.22);
  --shadow: 0 24px 60px rgba(24, 42, 36, 0.1);
  --shadow-soft: 0 10px 30px rgba(24, 42, 36, 0.07);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC",
    "Source Han Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --radius: 18px;
  --radius-sm: 11px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(204, 80, 51, 0.08), transparent 26%),
    radial-gradient(circle at 16% 70%, rgba(23, 59, 51, 0.06), transparent 28%),
    var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.hidden {
  display: none !important;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--vermillion);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #d9c8a8;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #f8f2e7;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.primary-btn {
  color: #fff;
  background: var(--pine);
  box-shadow: 0 10px 20px rgba(23, 59, 51, 0.18);
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: var(--pine-deep);
  box-shadow: 0 14px 26px rgba(23, 59, 51, 0.24);
}

.primary-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.secondary-btn {
  color: var(--pine);
  border: 1px solid rgba(23, 59, 51, 0.22);
  background: rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover {
  background: #fff;
}

.ghost-btn {
  color: var(--ink-soft);
  background: transparent;
}

.ghost-btn:hover {
  background: rgba(23, 59, 51, 0.06);
}

.danger-btn {
  color: #8f2d1e;
  background: var(--vermillion-soft);
}

.text-btn {
  min-height: 28px;
  padding: 0 3px;
  border-radius: 0;
  color: var(--vermillion);
  background: transparent;
}

.button-sm {
  min-height: 32px;
  padding: 0 13px;
  font-size: 12px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.icon-btn:hover {
  background: rgba(23, 59, 51, 0.06);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

/* Authentication */
.auth-screen {
  display: grid;
  grid-template-columns: minmax(440px, 1.18fr) minmax(420px, 0.82fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 48px clamp(40px, 6vw, 96px);
  overflow: hidden;
  color: #f6f0e4;
  background:
    linear-gradient(120deg, rgba(15, 43, 36, 0.98), rgba(27, 69, 58, 0.93)),
    var(--pine);
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  right: -18vw;
  bottom: -35vw;
  width: 62vw;
  height: 62vw;
  border: 1px solid rgba(230, 218, 195, 0.18);
}

.auth-visual::after {
  right: -13vw;
  bottom: -30vw;
  width: 52vw;
  height: 52vw;
  border: 1px solid rgba(230, 218, 195, 0.1);
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.auth-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 240, 228, 0.55);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.auth-editorial {
  position: relative;
  z-index: 3;
  width: min(600px, 78%);
  margin-top: 11vh;
}

.auth-editorial h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 82px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.auth-lead {
  max-width: 430px;
  margin: 28px 0 0;
  color: rgba(246, 240, 228, 0.7);
  font-size: 15px;
  line-height: 1.85;
}

.auth-proof {
  display: flex;
  gap: 36px;
  margin-top: 45px;
  padding-top: 25px;
  border-top: 1px solid rgba(246, 240, 228, 0.16);
}

.auth-proof div {
  min-width: 66px;
}

.auth-proof b {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.auth-proof span {
  color: rgba(246, 240, 228, 0.5);
  font-size: 11px;
}

.auth-art {
  position: absolute;
  right: 4.8vw;
  bottom: 4.5vh;
  z-index: 1;
  width: 245px;
  height: 240px;
}

.auth-art > span {
  position: absolute;
  top: 6px;
  right: 0;
  color: rgba(246, 240, 228, 0.45);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.art-sun {
  position: absolute;
  top: 34px;
  left: 24px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(210, 180, 136, 0.5);
  border-radius: 50%;
  background: rgba(190, 135, 76, 0.09);
}

.art-building {
  position: absolute;
  bottom: 0;
  border: 1px solid rgba(246, 240, 228, 0.2);
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 22px,
      rgba(246, 240, 228, 0.08) 22px 23px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(246, 240, 228, 0.08) 0 1px,
      transparent 1px 35px
    );
}

.building-one {
  left: 54px;
  width: 78px;
  height: 130px;
}

.building-two {
  left: 132px;
  width: 52px;
  height: 92px;
  background-color: rgba(246, 240, 228, 0.02);
}

.art-line {
  position: absolute;
  right: -22px;
  bottom: 22px;
  width: 194px;
  height: 1px;
  background: rgba(246, 240, 228, 0.22);
  transform: rotate(-18deg);
}

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 52px 48px 76px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 55%),
    var(--paper);
}

.auth-panel::after {
  position: absolute;
  top: 0;
  right: 9%;
  width: 1px;
  height: 100%;
  content: "";
  background: rgba(24, 35, 31, 0.06);
}

.auth-form-wrap {
  position: relative;
  z-index: 2;
  width: min(380px, 100%);
  animation: rise-in 700ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.auth-form-wrap h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.auth-hint {
  margin: 12px 0 28px;
  color: var(--ink-soft);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  position: relative;
  padding: 0 1px 12px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.auth-tab.active {
  color: var(--ink);
}

.auth-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--vermillion);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label,
.field label {
  display: grid;
  gap: 7px;
}

.auth-form label > span,
.field label > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-form input,
.field input,
.field select,
.field textarea,
.table-search,
.filter-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid rgba(24, 35, 31, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.auth-form input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.table-search:focus,
.filter-select:focus {
  border-color: var(--pine-soft);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 59, 51, 0.08);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 58px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 4px 7px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font-size: 11px;
  transform: translateY(-50%);
}

.auth-submit {
  justify-content: space-between;
  width: 100%;
  min-height: 49px;
  margin-top: 5px;
  padding: 0 20px;
  border-radius: 12px;
}

.form-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.default-password-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 14px 15px;
  border: 1px dashed rgba(180, 137, 79, 0.45);
  border-radius: 12px;
  color: var(--ink-soft);
  background: rgba(234, 220, 196, 0.22);
}

.default-password-note span {
  font-size: 11px;
}

.default-password-note b {
  color: var(--pine);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.07em;
}

.default-password-note small {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.auth-demo {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
}

.auth-demo code {
  color: var(--pine-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.auth-footnote {
  position: absolute;
  right: 48px;
  bottom: 30px;
  left: 48px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.auth-mobile-brand {
  display: none;
}

/* Application shell */
.app-shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 226px;
  min-height: 100vh;
  padding: 26px 14px 18px;
  color: rgba(247, 243, 233, 0.86);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.07), transparent 19%),
    linear-gradient(180deg, #1a4037, #102f28 72%, #0c2822);
  box-shadow: 10px 0 40px rgba(14, 42, 36, 0.12);
}

.sidebar::after {
  position: absolute;
  right: 0;
  bottom: 11%;
  width: 1px;
  height: 42%;
  content: "";
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.1), transparent);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 26px;
}

.side-brand .brand-seal {
  width: 37px;
  height: 37px;
  font-size: 19px;
}

.side-brand strong {
  display: block;
  color: #f9f4e8;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.11em;
}

.side-brand small {
  color: rgba(247, 243, 233, 0.42);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.main-nav {
  display: grid;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-section-label {
  margin: 16px 10px 5px;
  color: rgba(247, 243, 233, 0.28);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.nav-section-label:first-child {
  margin-top: 1px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 43px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: rgba(247, 243, 233, 0.58);
  background: transparent;
  font-size: 12px;
  text-align: left;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.nav-item:hover {
  color: rgba(247, 243, 233, 0.92);
  background: rgba(255, 255, 255, 0.045);
}

.nav-item.active {
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.095);
}

.nav-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  content: "";
  border-radius: 1px;
  background: #d8a566;
}

.nav-item em {
  color: rgba(247, 243, 233, 0.23);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.nav-icon {
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.nav-item:first-child .nav-icon svg {
  fill: currentColor;
  stroke: none;
}

.side-bottom {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-user {
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 12px 6px 3px;
}

.side-user .avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #e6d6b9;
  font-family: var(--serif);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.side-user strong {
  display: block;
  color: rgba(247, 243, 233, 0.9);
  font-size: 11px;
  font-weight: 500;
}

.side-user small {
  color: rgba(247, 243, 233, 0.38);
  font-size: 9px;
}

.side-user .icon-btn {
  color: rgba(247, 243, 233, 0.42);
}

.side-user .icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 clamp(22px, 3.4vw, 48px);
  border-bottom: 1px solid rgba(24, 35, 31, 0.08);
  background: rgba(243, 239, 230, 0.88);
  backdrop-filter: blur(18px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-size: 11px;
}

.breadcrumb i {
  font-style: normal;
  opacity: 0.4;
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-entry-btn {
  min-height: 34px;
  padding: 0 15px;
}

.year-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-switcher label {
  color: var(--ink-faint);
  font-size: 10px;
}

.year-switcher select {
  padding: 5px 24px 5px 7px;
  border: 0;
  color: var(--pine);
  background: transparent;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.top-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.notification-btn {
  position: relative;
  color: var(--ink-soft);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vermillion);
}

.top-date {
  min-width: 64px;
  text-align: right;
}

.top-date strong {
  display: block;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
}

.top-date small {
  color: var(--ink-faint);
  font-size: 9px;
}

.mobile-menu {
  display: none;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.mobile-menu span {
  display: block;
  width: 100%;
  height: 1px;
  margin: 4px 0;
  background: var(--ink);
}

.security-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px clamp(22px, 3.4vw, 48px) -4px;
  padding: 11px 15px;
  border: 1px solid rgba(180, 137, 79, 0.3);
  border-radius: 12px;
  background: rgba(234, 220, 196, 0.42);
  font-size: 11px;
}

.security-banner strong {
  margin-right: 10px;
  color: #714f28;
}

.security-banner span {
  color: var(--ink-soft);
}

.page-wrap {
  width: min(1510px, 100%);
  margin: 0 auto;
  padding: 37px clamp(22px, 3.4vw, 48px) 64px;
  animation: page-in 430ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page headings and shared blocks */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.page-heading p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(270px, 0.68fr);
  gap: 38px;
  min-height: 270px;
  margin-bottom: 22px;
  padding: clamp(28px, 3.3vw, 46px);
  overflow: hidden;
  border-radius: 24px;
  color: #f7f1e6;
  background:
    linear-gradient(110deg, rgba(15, 41, 35, 0.97), rgba(33, 81, 67, 0.94)),
    var(--pine);
  box-shadow: 0 22px 50px rgba(16, 45, 38, 0.14);
}

.command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(28px, 4vw, 64px);
  min-height: 340px;
  margin-bottom: 22px;
  padding: clamp(30px, 3.7vw, 52px);
  overflow: hidden;
  border-radius: 25px;
  color: #f7f1e6;
  background:
    radial-gradient(circle at 83% 18%, rgba(198, 154, 93, 0.18), transparent 22%),
    linear-gradient(120deg, #153a31, #254d42);
  box-shadow: 0 25px 60px rgba(16, 45, 38, 0.16);
}

.command-hero::after {
  position: absolute;
  right: -8%;
  bottom: -70%;
  width: 55%;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.command-heading,
.command-mosaic {
  position: relative;
  z-index: 1;
}

.command-heading {
  align-self: center;
}

.command-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.command-heading > p:not(.eyebrow) {
  max-width: 520px;
  margin: 20px 0 0;
  color: rgba(247, 241, 230, 0.63);
  font-size: 12px;
  line-height: 1.8;
}

.command-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.command-tile {
  min-height: 134px;
  padding: 18px;
  border: 0;
  color: #f7f1e6;
  background: rgba(11, 36, 29, 0.42);
  text-align: left;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.command-tile:hover {
  z-index: 1;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.command-tile > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(247, 241, 230, 0.55);
  font-size: 9px;
}

.command-tile em {
  color: rgba(247, 241, 230, 0.22);
  font-family: var(--serif);
  font-style: normal;
}

.command-tile b {
  display: block;
  margin-top: 17px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.command-tile small {
  display: block;
  margin-top: 8px;
  color: rgba(247, 241, 230, 0.42);
  font-size: 8px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.domain-card {
  min-height: 220px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(251, 248, 242, 0.75));
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.domain-card:hover {
  border-color: rgba(23, 59, 51, 0.24);
  box-shadow: 0 16px 36px rgba(24, 42, 36, 0.1);
  transform: translateY(-3px);
}

.domain-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.domain-card-head span {
  color: var(--vermillion);
  font-family: var(--serif);
  font-size: 12px;
}

.domain-card-head i {
  color: var(--ink-faint);
  font-style: normal;
}

.domain-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.domain-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

.domain-value b {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.domain-value small {
  color: var(--ink-faint);
  font-size: 9px;
}

.domain-card > p {
  min-height: 33px;
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.domain-card footer {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 8px;
}

.business-chain {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: stretch;
  gap: 8px;
}

.business-chain > div {
  flex: 1;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.business-chain > i {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--serif);
  font-style: normal;
}

.business-chain span {
  color: var(--vermillion);
  font-family: var(--serif);
  font-size: 10px;
}

.business-chain b {
  display: block;
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.business-chain small {
  color: var(--ink-faint);
  font-size: 8px;
}

.hero::before {
  position: absolute;
  top: -65%;
  right: -11%;
  width: 56%;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.hero::after {
  position: absolute;
  right: 4%;
  bottom: -47%;
  width: 40%;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.hero-copy,
.hero-performance {
  position: relative;
  z-index: 2;
}

.hero-copy {
  align-self: center;
}

.hero-copy .eyebrow {
  color: #d9b883;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.1vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.hero-copy > p {
  max-width: 590px;
  margin: 19px 0 0;
  color: rgba(247, 241, 230, 0.64);
  font-size: 12px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 23px;
}

.hero-tags span {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(247, 241, 230, 0.7);
  font-size: 9px;
}

.hero-performance {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-performance .label {
  color: rgba(247, 241, 230, 0.48);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero-performance .value {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(33px, 3.7vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-performance .delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: #d6e8d8;
  font-size: 10px;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.hero-mini-grid b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.hero-mini-grid span {
  color: rgba(247, 241, 230, 0.45);
  font-size: 9px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  position: relative;
  min-height: 132px;
  padding: 20px 21px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 242, 0.75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.kpi-card::after {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 70px;
  height: 70px;
  content: "";
  border: 1px solid rgba(24, 35, 31, 0.06);
  border-radius: 50%;
}

.kpi-card .caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 10px;
}

.kpi-card .caption i {
  color: rgba(24, 35, 31, 0.18);
  font-family: var(--serif);
  font-size: 14px;
  font-style: normal;
}

.kpi-card .value {
  margin-top: 17px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.kpi-card .note {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 9px;
}

.kpi-card .note strong {
  color: var(--green);
  font-weight: 600;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 248, 242, 0.8);
  box-shadow: var(--shadow-soft);
}

.panel.flat {
  box-shadow: none;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.panel-head .eyebrow {
  margin-bottom: 5px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid.thirds {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr) minmax(260px, 0.75fr);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--ink-faint);
  font-size: 9px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 13px;
  height: 3px;
  border-radius: 2px;
  background: var(--pine);
}

.chart-legend i.vermillion {
  background: var(--vermillion);
}

.chart-legend i.dashed {
  height: 0;
  border-top: 1px dashed var(--gold);
  background: transparent;
}

.line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.line-chart .grid-line {
  stroke: rgba(24, 35, 31, 0.08);
  stroke-dasharray: 2 5;
}

.line-chart .axis-label {
  fill: var(--ink-faint);
  font-family: var(--sans);
  font-size: 9px;
}

.line-chart .line-income {
  fill: none;
  stroke: var(--pine);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.line-chart .line-expense {
  fill: none;
  stroke: var(--vermillion);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.line-chart .area-fill {
  fill: url(#incomeGradient);
}

.line-chart .dot-income {
  fill: var(--paper-light);
  stroke: var(--pine);
  stroke-width: 1.8;
}

.line-chart .dot-expense {
  fill: var(--paper-light);
  stroke: var(--vermillion);
  stroke-width: 1.5;
}

.line-chart .incomplete {
  fill: var(--gold-soft);
}

.donut-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 22px;
  min-height: 168px;
}

.donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  inset: 22px;
  content: "";
  border-radius: 50%;
  background: var(--paper-light);
  box-shadow: 0 0 0 1px rgba(24, 35, 31, 0.04) inset;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.donut-center span {
  color: var(--ink-faint);
  font-size: 9px;
}

.legend-list {
  display: grid;
  gap: 11px;
}

.legend-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 9px;
}

.legend-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-row span {
  color: var(--ink-soft);
  font-size: 10px;
}

.legend-row b {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.insight-list {
  display: grid;
  gap: 0;
}

.insight-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.insight-item:first-child {
  padding-top: 1px;
}

.insight-item:last-child {
  border-bottom: 0;
}

.insight-index {
  color: var(--vermillion);
  font-family: var(--serif);
  font-size: 12px;
}

.insight-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
}

.insight-item p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.65;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 20px minmax(66px, 0.8fr) minmax(80px, 1.5fr) auto;
  align-items: center;
  gap: 10px;
}

.rank-row .rank {
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
}

.rank-row .name {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(23, 59, 51, 0.08);
}

.rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pine-soft), var(--pine));
}

.rank-row .amount {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 11px;
  text-align: right;
}

.data-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
}

.data-strip-item {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.data-strip-item:last-child {
  border-right: 0;
}

.data-strip-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.data-strip-item span {
  color: var(--ink-faint);
  font-size: 9px;
}

.data-strip-item .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--green);
  font-size: 9px;
}

.data-strip-item .status::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.data-strip-item .status.warn {
  color: #9d6727;
}

/* Tables, toolbars and filters */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.table-search {
  width: min(280px, 32vw);
  min-height: 38px;
  padding-left: 38px;
  background:
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2389928e' stroke-width='1.5' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E")
      12px center / 16px no-repeat,
    rgba(255, 255, 255, 0.45);
}

.filter-select {
  width: auto;
  min-width: 112px;
  min-height: 38px;
  padding: 7px 30px 7px 12px;
  background-color: rgba(255, 255, 255, 0.45);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(251, 248, 242, 0.5);
  font-size: 9px;
}

.stat-chip b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 242, 0.68);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 43px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  background: rgba(239, 234, 224, 0.96);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  height: 52px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(24, 35, 31, 0.075);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background-color 140ms ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.52);
}

.data-table .number {
  font-family: var(--serif);
  font-size: 12px;
  white-space: nowrap;
}

.data-table .muted {
  color: var(--ink-faint);
}

.data-table .strong-cell {
  font-weight: 600;
}

.address-cell {
  max-width: 250px;
}

.address-cell strong {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-cell small {
  color: var(--ink-faint);
  font-size: 9px;
}

.type-tag,
.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--pine);
  background: rgba(23, 59, 51, 0.08);
  font-size: 9px;
  white-space: nowrap;
}

.type-tag.new {
  color: #8b4e26;
  background: rgba(180, 137, 79, 0.13);
}

.type-tag.loan {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-tag.good {
  color: var(--green);
  background: var(--green-soft);
}

.status-tag.review {
  color: #906222;
  background: var(--gold-soft);
}

.row-action {
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--pine);
  background: transparent;
  font-size: 10px;
}

.row-action:hover {
  background: rgba(23, 59, 51, 0.07);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.pager-btns {
  display: flex;
  gap: 6px;
}

.pager-btns button {
  min-width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  font-size: 10px;
}

.pager-btns button.active {
  color: #fff;
  border-color: var(--pine);
  background: var(--pine);
}

.pager-btns button:disabled {
  cursor: default;
  opacity: 0.35;
}

.status-select {
  min-width: 72px;
  min-height: 24px;
  padding: 2px 20px 2px 8px;
  border: 0;
  border-radius: 999px;
  color: #8a5d21;
  background: var(--gold-soft);
  font-size: 9px;
  font-weight: 600;
}

.status-select.active {
  color: var(--green);
  background: var(--green-soft);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
}

.section-gap {
  margin-top: 18px;
}

/* Finance and analysis */
.finance-tabs,
.subtabs {
  display: flex;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  scrollbar-width: none;
}

.finance-tab,
.subtab {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  white-space: nowrap;
}

.finance-tab.active,
.subtab.active {
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 0 1px 6px rgba(24, 35, 31, 0.08);
}

.metric-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.metric-pair div {
  padding: 12px;
  border-radius: 11px;
  background: rgba(23, 59, 51, 0.04);
}

.metric-pair span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.metric-pair b {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.bar-list {
  display: grid;
  gap: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 74px;
  align-items: center;
  gap: 12px;
}

.bar-row span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row .bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(23, 59, 51, 0.07);
}

.bar-row .bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6b8f80, var(--pine));
}

.bar-row b {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
  text-align: right;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

.col-8 {
  grid-column: span 8;
}

.col-12 {
  grid-column: span 12;
}

.comparison-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.comparison-card {
  position: relative;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.27);
}

.comparison-card.current {
  border-color: rgba(23, 59, 51, 0.25);
  background: rgba(23, 59, 51, 0.055);
}

.comparison-card span {
  color: var(--ink-faint);
  font-size: 9px;
}

.comparison-card strong {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.comparison-card small {
  color: var(--ink-faint);
  font-size: 9px;
}

.resolution-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 36px;
  overflow: hidden;
  margin: 0 0 14px;
  padding: 34px 36px;
  color: #f5f0e6;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 84% 18%, rgba(198, 154, 93, 0.25), transparent 28%),
    linear-gradient(135deg, #102b25, #20473e);
  box-shadow: var(--shadow);
}

.resolution-hero::after {
  position: absolute;
  right: -90px;
  bottom: -160px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(234, 220, 196, 0.18);
  border-radius: 50%;
  content: "";
}

.resolution-hero h2 {
  margin: 4px 0 12px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 500;
  line-height: 1.14;
}

.resolution-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: rgba(245, 240, 230, 0.72);
}

.resolution-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 1px;
  align-self: end;
  border: 1px solid rgba(245, 240, 230, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.resolution-summary > div {
  padding: 17px 14px;
  text-align: center;
  border-right: 1px solid rgba(245, 240, 230, 0.12);
}

.resolution-summary > div:last-child {
  border-right: 0;
}

.resolution-summary span {
  display: block;
  min-height: 30px;
  color: rgba(245, 240, 230, 0.62);
  font-size: 9px;
}

.resolution-summary b {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.resolution-summary small {
  margin-left: 3px;
  color: var(--gold-soft);
  font-size: 9px;
}

.resolution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resolution-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 17px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(251, 248, 242, 0.72);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.resolution-card:hover,
.resolution-card.active {
  transform: translateY(-2px);
  border-color: rgba(23, 59, 51, 0.36);
  background: var(--paper-light);
  box-shadow: var(--shadow-soft);
}

.resolution-card > span,
.resolution-card > i {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.05em;
}

.resolution-card > strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.resolution-card > small {
  color: var(--ink-soft);
  font-size: 11px;
}

.resolution-card > i {
  margin-top: auto;
}

.resolution-card.ready {
  border-top: 3px solid var(--green);
}

.resolution-card.partial {
  border-top: 3px solid var(--gold);
}

.resolution-card.blocked {
  border-top: 3px solid var(--vermillion);
}

.resolution-detail {
  border-top: 1px solid var(--line-strong);
}

.resolution-reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.resolution-reason-grid article {
  padding: 17px;
  background: rgba(251, 248, 242, 0.92);
}

.resolution-reason-grid span {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.resolution-reason-grid p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.resolution-preview-table td:first-child {
  min-width: 210px;
}

.resolution-footnote {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(198, 154, 93, 0.08);
}

.resolution-footnote span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
}

.resolution-footnote p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.audit-summary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  align-items: center;
}

.audit-score {
  text-align: center;
}

.audit-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: conic-gradient(var(--pine) 0 78%, rgba(23, 59, 51, 0.08) 78%);
}

.audit-ring::after {
  position: absolute;
  inset: 15px;
  content: "";
  border-radius: 50%;
  background: var(--paper-light);
}

.audit-ring b {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.audit-score span {
  color: var(--ink-faint);
  font-size: 9px;
}

.audit-list {
  display: grid;
  gap: 9px;
}

.audit-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
}

.audit-item i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.audit-item.warning i {
  background: var(--vermillion);
}

.audit-item.notice i {
  background: var(--blue);
}

.audit-item strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.audit-item p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.audit-item b {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.audit-record-list {
  display: grid;
  gap: 8px;
}

.audit-record {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.audit-record:last-child {
  border-bottom: 0;
}

.audit-record .source {
  color: var(--ink-faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.audit-record .amount {
  font-family: var(--serif);
  font-size: 11px;
}

/* Team */
.team-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
}

.team-hero {
  color: #f7f1e7;
  background:
    linear-gradient(120deg, rgba(20, 54, 45, 0.98), rgba(50, 88, 76, 0.94)),
    var(--pine);
}

.team-hero .panel-head h2 {
  color: #f7f1e7;
}

.team-hero .panel-head p,
.team-hero .eyebrow {
  color: rgba(247, 241, 231, 0.5);
}

.team-hero .rank-row .name,
.team-hero .rank-row .rank,
.team-hero .rank-row .amount {
  color: rgba(247, 241, 231, 0.78);
}

.team-hero .rank-bar {
  background: rgba(255, 255, 255, 0.1);
}

.team-hero .rank-bar i {
  background: linear-gradient(90deg, #d1a56c, #efe1c8);
}

.target-card {
  display: grid;
  gap: 14px;
}

.target-row {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  gap: 10px;
}

.target-row span,
.target-row b {
  font-size: 9px;
}

.target-row span {
  color: var(--ink-soft);
}

.target-row b {
  font-family: var(--serif);
  font-weight: 500;
  text-align: right;
}

.target-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(23, 59, 51, 0.08);
}

.target-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--vermillion);
}

/* Forms and modals */
.modal-layer,
.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 26, 0.52);
  backdrop-filter: blur(5px);
}

.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 20px;
  background: var(--paper-light);
  box-shadow: 0 34px 90px rgba(7, 27, 22, 0.26);
  transform: translate(-50%, -50%);
  animation: modal-in 230ms ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
  backdrop-filter: blur(12px);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
}

.modal-body {
  padding: 24px 26px 28px;
}

.modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 26px;
  border-top: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
  backdrop-filter: blur(12px);
}

.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.quick-entry-card {
  min-height: 105px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(234, 228, 216, 0.38));
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.quick-entry-card:hover {
  border-color: rgba(23, 59, 51, 0.28);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.quick-entry-card span {
  display: block;
  color: var(--vermillion);
  font-family: var(--serif);
  font-size: 11px;
}

.quick-entry-card b {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.quick-entry-card small {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
}

.form-section {
  margin-bottom: 23px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section h3 {
  margin: 0 0 13px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-3 {
  grid-column: span 3;
}

.field-hint {
  color: var(--ink-faint);
  font-size: 9px;
}

.form-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #8f2d1e;
  background: var(--vermillion-soft);
  font-size: 10px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid rgba(204, 80, 51, 0.2);
  border-radius: 12px;
  background: rgba(242, 216, 207, 0.28);
}

.danger-zone strong {
  display: block;
  font-size: 11px;
}

.danger-zone span {
  color: var(--ink-faint);
  font-size: 9px;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(540px, 100vw);
  overflow: auto;
  background: var(--paper-light);
  box-shadow: -26px 0 70px rgba(7, 27, 22, 0.2);
  animation: drawer-in 260ms ease both;
}

@keyframes drawer-in {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 24px 25px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.96);
  backdrop-filter: blur(12px);
}

.drawer-head .drawer-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.drawer-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.drawer-head p {
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.drawer-body {
  padding: 22px 25px 36px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.detail-hero div {
  padding: 17px;
  background: var(--paper-light);
}

.detail-hero span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.detail-hero strong {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}

.detail-row {
  padding: 12px 14px;
  background: var(--paper-light);
}

.detail-row.wide {
  grid-column: 1 / -1;
}

.detail-row span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.detail-row strong {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  word-break: break-word;
}

.source-note {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(23, 59, 51, 0.05);
  font-size: 9px;
}

.source-note code {
  color: var(--pine);
  font-family: "SFMono-Regular", Consolas, monospace;
}

/* Accounts and settings */
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(251, 248, 242, 0.75);
}

.account-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #f4e8d5;
  background: var(--pine);
  font-family: var(--serif);
  font-size: 18px;
}

.account-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.account-card p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.account-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.account-config select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 9px;
}

.account-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
}

.account-actions .text-btn {
  font-size: 9px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.profile-card {
  color: #f7f1e6;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.11), transparent 36%),
    var(--pine);
}

.profile-card .profile-monogram {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 31px;
}

.profile-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.profile-card p {
  color: rgba(247, 241, 230, 0.54);
  font-size: 10px;
}

.profile-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-facts span {
  display: block;
  color: rgba(247, 241, 230, 0.4);
  font-size: 9px;
}

.profile-facts b {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form .primary-btn {
  width: fit-content;
  margin-top: 5px;
}

.system-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.system-fact {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.system-fact span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.system-fact b {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

/* Operating framework */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 242, 0.78);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.resource-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.resource-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.resource-card h3 {
  margin: 11px 0 4px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-card .subline {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-card .price {
  margin: 20px 0 15px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.resource-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.resource-specs div {
  min-width: 0;
  padding: 9px 8px;
  background: var(--paper-light);
}

.resource-specs span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
}

.resource-specs b {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 9px;
}

.resource-actions {
  display: flex;
  gap: 4px;
}

.empty-board {
  display: grid;
  place-items: center;
  min-height: 290px;
  padding: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--ink-faint);
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(23, 59, 51, 0.04), transparent 36%),
    rgba(251, 248, 242, 0.35);
}

.empty-board .empty-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 17px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 24px;
}

.empty-board strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.pipeline-stage {
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 248, 242, 0.55);
}

.pipeline-stage span {
  color: var(--ink-faint);
  font-size: 9px;
}

.pipeline-stage b {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.65fr);
  gap: 16px;
}

.progress-meter {
  height: 7px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 4px;
  background: rgba(23, 59, 51, 0.08);
}

.progress-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pine-soft), var(--pine));
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.timeline::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-left: 22px;
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  left: 2px;
  width: 7px;
  height: 7px;
  content: "";
  border: 2px solid var(--paper-light);
  border-radius: 50%;
  background: var(--pine);
}

.timeline-item strong {
  display: block;
  font-size: 10px;
}

.timeline-item p {
  margin: 3px 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.timeline-item small {
  color: var(--ink-faint);
  font-size: 8px;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.task-column {
  min-height: 320px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(251, 248, 242, 0.42);
}

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  padding: 0 3px 11px;
  border-bottom: 1px solid var(--line);
}

.task-column-head strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.task-column-head span {
  color: var(--ink-faint);
  font-size: 9px;
}

.task-card {
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-light);
}

.task-card.overdue {
  border-left: 3px solid var(--vermillion);
}

.task-card h3 {
  margin: 7px 0 5px;
  font-size: 11px;
  font-weight: 600;
}

.task-card p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 8px;
}

.priority-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 8px;
}

.priority-dot::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: var(--blue);
}

.priority-dot.high::before {
  background: var(--vermillion);
}

.approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.approval-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(251, 248, 242, 0.72);
}

.approval-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.approval-card h3 {
  margin: 8px 0 5px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.approval-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.approval-amount {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.download-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  text-align: left;
}

.download-item:hover {
  color: var(--pine);
  border-color: rgba(23, 59, 51, 0.22);
  background: rgba(255, 255, 255, 0.58);
}

.download-item b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
}

details.raw-panel {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
}

details.raw-panel > summary {
  padding: 17px 20px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

details.raw-panel > summary::-webkit-details-marker {
  display: none;
}

details.raw-panel > summary::after {
  float: right;
  color: var(--gold);
  content: "＋";
}

details.raw-panel[open] > summary::after {
  content: "－";
}

details.raw-panel > summary + * {
  border-top: 1px solid var(--line);
}

.table-shell.compact {
  max-height: 430px;
}

/* Functional-data integration */
.fusion-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  margin-bottom: 16px;
  padding: 28px;
  overflow: hidden;
  border-radius: 20px;
  color: #f5efe4;
  background:
    radial-gradient(circle at 85% 20%, rgba(204, 80, 51, 0.24), transparent 24%),
    linear-gradient(120deg, #173b33, #274b41);
}

.fusion-hero h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
}

.fusion-hero p {
  max-width: 620px;
  margin: 10px 0 0;
  color: rgba(245, 239, 228, 0.62);
  font-size: 11px;
}

.fusion-score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.11);
}

.fusion-score div {
  height: 100%;
  padding: 16px;
  background: rgba(12, 35, 29, 0.35);
}

.fusion-score span {
  display: block;
  color: rgba(245, 239, 228, 0.46);
  font-size: 8px;
}

.fusion-score b {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.fusion-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 6px;
}

.fusion-rail::before {
  position: absolute;
  top: 38px;
  right: 7%;
  left: 7%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.fusion-station {
  position: relative;
  z-index: 1;
  min-height: 200px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-light);
}

.station-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 19px;
  border: 1px solid rgba(23, 59, 51, 0.22);
  border-radius: 50%;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 14px;
  background: var(--paper-light);
}

.fusion-station h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.fusion-station p {
  min-height: 48px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.fusion-station ul {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--ink-soft);
  font-size: 9px;
}

.fusion-station li::before {
  margin-right: 6px;
  color: var(--vermillion);
  content: "·";
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.integration-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) 24px minmax(140px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.25);
}

.integration-item .source-name {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-item .relation-arrow {
  color: var(--gold);
  font-family: var(--serif);
  text-align: center;
}

.integration-item .target-name {
  color: var(--ink-soft);
  font-size: 9px;
}

.integration-item small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.source-coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.source-coverage-item {
  padding: 12px;
  border-radius: 10px;
  background: rgba(23, 59, 51, 0.04);
}

.source-coverage-item span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
}

.source-coverage-item b {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.channel-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.channel-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
}

.channel-card span {
  color: var(--ink-faint);
  font-size: 8px;
}

.channel-card b {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.evidence-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-light);
}

.evidence-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  background: var(--paper-deep);
}

.evidence-card div {
  padding: 11px;
}

.evidence-card b {
  display: block;
  font-size: 10px;
}

.evidence-card span {
  color: var(--ink-faint);
  font-size: 8px;
}

/* Toasts */
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(350px, calc(100vw - 44px));
}

.toast {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f8f2e7;
  background: rgba(18, 49, 41, 0.96);
  box-shadow: 0 16px 40px rgba(8, 26, 22, 0.22);
  font-size: 11px;
  animation: toast-in 220ms ease both;
}

.toast::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: #9ccca7;
}

.toast.error::before {
  background: #e08369;
}

.toast button {
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Functional-first operating desk */
.ops-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: 430px;
  overflow: hidden;
  color: #f7f1e5;
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 14%, rgba(222, 194, 139, 0.2), transparent 25%),
    radial-gradient(circle at 8% 95%, rgba(111, 149, 126, 0.17), transparent 31%),
    linear-gradient(130deg, #102f28 0%, #1d493d 57%, #173b33 100%);
  box-shadow: 0 30px 70px rgba(22, 53, 44, 0.2);
}

.ops-hero::before {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(245, 233, 209, 0.13);
  border-radius: 50%;
}

.ops-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.2;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.24) 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  mask-image: linear-gradient(90deg, transparent 33%, #000 100%);
}

.ops-hero-copy,
.ops-pulse {
  position: relative;
  z-index: 1;
}

.ops-hero-copy {
  padding: 45px 44px 38px;
}

.ops-hero-copy h1 {
  max-width: 620px;
  margin: 18px 0 20px;
  font-family: var(--serif);
  font-size: clamp(46px, 5.1vw, 72px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.ops-hero-copy > p:not(.eyebrow) {
  max-width: 580px;
  margin: 0;
  color: rgba(247, 241, 229, 0.7);
  font-size: 13px;
  line-height: 1.85;
}

.ops-hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 30px;
}

.ops-hero-actions button {
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 9px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  color: #f7f1e5;
  text-align: left;
  border: 1px solid rgba(245, 233, 209, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  transition: 180ms ease;
}

.ops-hero-actions button:hover {
  border-color: rgba(245, 233, 209, 0.36);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.ops-hero-actions button span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #e9d5ad;
  border: 1px solid rgba(233, 213, 173, 0.4);
  border-radius: 50%;
  font-size: 14px;
}

.ops-hero-actions button b {
  align-self: end;
  font-size: 12px;
  font-weight: 600;
}

.ops-hero-actions button small {
  align-self: start;
  color: rgba(247, 241, 229, 0.52);
  font-size: 9px;
}

.ops-pulse {
  display: flex;
  flex-direction: column;
  margin: 30px 30px 30px 0;
  padding: 24px;
  border: 1px solid rgba(245, 233, 209, 0.18);
  border-radius: 20px;
  background: rgba(8, 32, 26, 0.38);
  backdrop-filter: blur(14px);
}

.ops-pulse-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(245, 233, 209, 0.13);
}

.ops-pulse-head div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ops-pulse-head span {
  font-family: var(--serif);
  font-size: 18px;
}

.ops-pulse-head small {
  color: rgba(247, 241, 229, 0.46);
  font-size: 9px;
}

.ops-pulse-head i {
  color: #d8bd88;
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.16em;
}

.ops-pulse-grid {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 16px 0;
  background: rgba(245, 233, 209, 0.12);
}

.ops-pulse-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 115px;
  padding: 17px;
  color: #f7f1e5;
  text-align: left;
  border: 0;
  background: rgba(20, 57, 48, 0.76);
}

.ops-pulse-grid button:hover {
  background: rgba(35, 79, 67, 0.9);
}

.ops-pulse-grid span {
  color: rgba(247, 241, 229, 0.57);
  font-size: 10px;
}

.ops-pulse-grid b {
  margin: auto 0 1px;
  color: #f8f1e4;
  font-family: var(--serif);
  font-size: clamp(31px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.ops-pulse-grid small {
  color: #d3bd94;
  font-size: 8px;
}

.ops-pulse-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  color: rgba(247, 241, 229, 0.5);
  font-size: 8px;
  line-height: 1.6;
  border-top: 1px solid rgba(245, 233, 209, 0.13);
}

.ops-pulse-foot b {
  color: rgba(247, 241, 229, 0.82);
  font-weight: 500;
  text-align: right;
}

.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ops-kpi-grid article,
.ops-kpi-grid > button {
  position: relative;
  min-height: 136px;
  padding: 18px 17px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 242, 0.74);
  box-shadow: var(--shadow-soft);
}

.ops-kpi-grid article > span,
.ops-kpi-grid article > b,
.ops-kpi-grid article > small,
.ops-kpi-grid > button > span,
.ops-kpi-grid > button > b,
.ops-kpi-grid > button > small {
  position: relative;
  z-index: 1;
  display: block;
}

.ops-kpi-grid article > span,
.ops-kpi-grid > button > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.ops-kpi-grid article > b,
.ops-kpi-grid > button > b {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.ops-kpi-grid article > small,
.ops-kpi-grid > button > small {
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.ops-kpi-grid article > i,
.ops-kpi-grid > button > i {
  position: absolute;
  right: 10px;
  bottom: -14px;
  color: rgba(23, 59, 51, 0.055);
  font-family: var(--serif);
  font-size: 68px;
  font-style: normal;
  line-height: 1;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(300px, 0.72fr);
  gap: 14px;
}

.workbench-main {
  min-width: 0;
}

.workbench-table {
  max-height: 440px;
  overflow: auto;
}

.input-queue {
  background:
    linear-gradient(145deg, rgba(180, 137, 79, 0.09), transparent 50%),
    rgba(251, 248, 242, 0.82);
}

.queue-list {
  display: flex;
  flex-direction: column;
}

.queue-list button {
  padding: 12px 0;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.queue-list button > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
}

.queue-list button b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
}

.queue-track {
  height: 3px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(23, 59, 51, 0.09);
}

.queue-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pine-soft), var(--gold));
}

.queue-list button small {
  display: block;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 8px;
}

.queue-tip {
  margin-top: 16px;
  padding: 13px;
  border-radius: 11px;
  background: rgba(23, 59, 51, 0.055);
}

.queue-tip span {
  color: var(--vermillion);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.queue-tip p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.results-ribbon {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 20px;
  background: #193d34;
  box-shadow: var(--shadow-soft);
}

.results-intro {
  padding: 25px;
  color: #f7f1e5;
  background: linear-gradient(145deg, #102e27, #1d493d);
}

.results-intro h2 {
  margin: 7px 0 5px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.results-intro p:not(.eyebrow) {
  margin: 0;
  color: rgba(247, 241, 229, 0.54);
  font-size: 8px;
}

.results-ribbon > button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 145px;
  padding: 22px 18px;
  color: #f7f1e5;
  text-align: left;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.results-ribbon > button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.results-ribbon > button span {
  color: rgba(247, 241, 229, 0.52);
  font-size: 9px;
}

.results-ribbon > button b {
  margin: 13px 0 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.results-ribbon > button small {
  color: #cfb783;
  font-size: 8px;
}

.analysis-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(251, 248, 242, 0.7);
}

.analysis-filter-title {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  margin-right: auto;
}

.analysis-filter-title span {
  color: var(--ink-faint);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.analysis-filter-title b {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.analysis-filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 118px;
  min-width: 118px;
}

.analysis-filter-bar label > span {
  color: var(--ink-faint);
  font-size: 8px;
}

.analysis-filter-bar select {
  height: 32px;
  padding: 0 28px 0 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--paper-light);
}

.analysis-filter-caption {
  align-self: center;
  color: var(--ink-faint);
  font-size: 8px;
}

.analysis-view-ops {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 0;
}

.classification-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.check-chip {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  min-width: auto !important;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-light);
  color: var(--ink-soft);
  cursor: pointer;
}

.check-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--forest);
}

.check-chip:has(input:checked) {
  border-color: rgba(37, 79, 68, 0.45);
  background: rgba(37, 79, 68, 0.08);
  color: var(--forest);
}

.bulk-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink-faint);
  font-size: 11px;
}

.classification-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.classification-person {
  display: grid;
  grid-template-columns: 18px minmax(110px, 0.7fr) minmax(150px, 1.3fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
}

.classification-person:has(input:checked) {
  border-color: rgba(37, 79, 68, 0.42);
  background: rgba(37, 79, 68, 0.07);
}

.classification-person input {
  accent-color: var(--forest);
}

.classification-person span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.classification-person small,
.classification-person em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
}

.classification-person em {
  text-align: right;
}

.lead-conversion-context {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(198, 154, 93, 0.08);
}

.lead-conversion-context span,
.lead-conversion-context small {
  color: var(--ink-faint);
  font-size: 10px;
}

.lead-conversion-context strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .classification-people {
    grid-template-columns: 1fr;
  }

  .resolution-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 22px;
  }

  .resolution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resolution-reason-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .resolution-grid,
  .resolution-summary {
    grid-template-columns: 1fr;
  }

  .resolution-summary > div {
    border-right: 0;
    border-bottom: 1px solid rgba(245, 240, 230, 0.12);
  }

  .resolution-summary > div:last-child {
    border-bottom: 0;
  }

  .resolution-footnote {
    grid-template-columns: 1fr;
  }
}

.analysis-view-ops select {
  height: 32px;
  max-width: 190px;
  padding: 0 26px 0 9px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--paper-light);
  font-size: 9px;
}

.analysis-view-ops .button-sm {
  min-height: 32px;
}

.analysis-story {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  overflow: hidden;
  color: #f7f1e5;
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 20%, rgba(202, 166, 102, 0.16), transparent 27%),
    linear-gradient(130deg, #15372f, #254f44);
}

.analysis-story-main {
  padding: 29px;
}

.analysis-story-main h2 {
  margin: 9px 0 12px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 500;
  line-height: 1.15;
}

.analysis-story-main > p:not(.eyebrow) {
  max-width: 430px;
  margin: 0;
  color: rgba(247, 241, 229, 0.6);
  font-size: 9px;
  line-height: 1.7;
}

.analysis-flow {
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
  padding: 22px 26px 22px 10px;
}

.analysis-flow div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 75px;
}

.analysis-flow span {
  color: #ceb480;
  font-size: 7px;
  letter-spacing: 0.06em;
}

.analysis-flow b {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.analysis-flow small {
  color: rgba(247, 241, 229, 0.5);
  font-size: 8px;
}

.analysis-flow i {
  color: rgba(247, 241, 229, 0.32);
  font-size: 15px;
  font-style: normal;
}

.analysis-kpis article > b {
  font-size: 30px;
}

.analysis-caveats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 7px;
}

.analysis-caveats div {
  padding: 14px 8px;
  text-align: center;
  border-radius: 10px;
  background: rgba(23, 59, 51, 0.055);
}

.analysis-caveats b,
.analysis-caveats span {
  display: block;
}

.analysis-caveats b {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.analysis-caveats span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7px;
}

.supply-banner {
  display: grid;
  grid-template-columns: 1.45fr 0.55fr;
  min-height: 220px;
  overflow: hidden;
  color: #f7f1e5;
  border-radius: 21px;
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(255,255,255,.02) 17px 18px),
    linear-gradient(125deg, #183d34, #2b5a4d);
}

.supply-banner > div:first-child {
  padding: 31px;
}

.supply-banner h2 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 500;
  line-height: 1.2;
}

.supply-banner p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: rgba(247,241,229,.58);
  font-size: 9px;
}

.supply-score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border-left: 1px solid rgba(255,255,255,.13);
  background: rgba(8, 33, 27, .25);
}

.supply-score b {
  color: #f6eddd;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.supply-score span {
  margin-top: 8px;
  color: #d5bd8c;
  font-size: 11px;
}

.supply-score small {
  margin-top: 5px;
  color: rgba(247,241,229,.45);
  font-size: 8px;
}

.supply-matrix {
  min-width: max-content;
}

.danger-text {
  color: #a23e2a;
}

@media (max-width: 1180px) {
  .auth-screen {
    grid-template-columns: 1fr 1fr;
  }

  .auth-art {
    display: none;
  }

  .auth-editorial {
    width: 100%;
  }

  .app-shell {
    grid-template-columns: 204px minmax(0, 1fr);
  }

  .sidebar {
    width: 204px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .dashboard-grid.thirds,
  .team-summary {
    grid-template-columns: 1fr;
  }

  .col-4,
  .col-5,
  .col-7,
  .col-8 {
    grid-column: span 6;
  }

  .account-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .contract-layout {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fusion-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-coverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-hero {
    grid-template-columns: 1fr;
  }

  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-chain {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .business-chain > i {
    display: none;
  }
}

@media (max-width: 860px) {
  .auth-screen {
    display: block;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 42px 22px 70px;
    background:
      radial-gradient(circle at 100% 100%, rgba(23, 59, 51, 0.09), transparent 36%),
      var(--paper);
  }

  .auth-panel::after {
    display: none;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 38px;
    color: var(--pine);
  }

  .auth-mobile-brand .brand-seal {
    border-color: var(--pine);
    color: var(--pine);
  }

  .auth-mobile-brand strong {
    font-family: var(--serif);
    font-size: 17px;
    letter-spacing: 0.12em;
  }

  .auth-footnote {
    bottom: 22px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    width: min(290px, 84vw);
    transform: translateX(-105%);
    transition: transform 260ms cubic-bezier(0.2, 0.75, 0.2, 1);
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    min-width: 0;
  }

  .mobile-menu {
    display: block;
  }

  .topbar {
    height: 64px;
    padding: 0 16px;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .breadcrumb span,
  .breadcrumb i {
    display: none;
  }

  .year-switcher label,
  .top-divider,
  .notification-btn,
  .top-date {
    display: none;
  }

  .top-entry-btn {
    font-size: 0;
  }

  .top-entry-btn::first-letter {
    font-size: 15px;
  }

  .page-wrap {
    padding: 24px 16px 48px;
  }

  .security-banner {
    margin: 12px 16px -4px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 23px;
  }

  .hero-performance {
    padding: 23px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-left: 0;
  }

  .hero-performance .label {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .kpi-card {
    min-height: 121px;
    padding: 17px;
  }

  .kpi-card .value {
    margin-top: 13px;
    font-size: 25px;
  }

  .panel {
    padding: 19px 16px;
  }

  .dashboard-grid.equal {
    grid-template-columns: 1fr;
  }

  .donut-wrap {
    grid-template-columns: 124px 1fr;
  }

  .donut {
    width: 120px;
    height: 120px;
  }

  .data-strip {
    grid-template-columns: 1fr 1fr;
  }

  .data-strip-item:nth-child(2) {
    border-right: 0;
  }

  .data-strip-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group {
    width: 100%;
  }

  .table-search {
    width: 100%;
  }

  .filter-select {
    flex: 1;
  }

  .table-shell {
    border-radius: 13px;
  }

  .data-table {
    min-width: 760px;
  }

  .analysis-grid {
    display: block;
  }

  .analysis-grid > * {
    margin-bottom: 13px;
  }

  .audit-summary {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid,
  .task-board,
  .approval-grid {
    grid-template-columns: 1fr;
  }

  .fusion-hero,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-mosaic,
  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-chain {
    grid-template-columns: 1fr;
  }

  .task-column {
    min-height: auto;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid .span-3 {
    grid-column: span 2;
  }

  .system-facts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 110px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend-list {
    width: 100%;
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .fusion-rail,
  .source-coverage,
  .channel-strip,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .fusion-score {
    grid-template-columns: 1fr;
  }

  .command-hero {
    padding: 28px 20px;
  }

  .command-heading h1 {
    font-size: 38px;
  }

  .command-mosaic,
  .domain-grid {
    grid-template-columns: 1fr;
  }

  .command-tile {
    min-height: 110px;
  }

  .data-strip {
    grid-template-columns: 1fr;
  }

  .data-strip-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .data-strip-item:last-child {
    border-bottom: 0;
  }

  .bar-row {
    grid-template-columns: 70px 1fr 64px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2,
  .form-grid .span-3 {
    grid-column: span 1;
  }

  .form-two {
    grid-template-columns: 1fr;
  }

  .quick-entry-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-wrap h2 {
    font-size: 33px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .modal-panel {
    top: auto;
    bottom: 0;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateX(-50%);
  }

  @keyframes modal-in {
    from {
      opacity: 0;
      transform: translate(-50%, 20px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
}

@media (max-width: 1180px) {
  .ops-hero {
    grid-template-columns: 1fr;
  }

  .ops-pulse {
    margin: 0 28px 28px;
  }

  .ops-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .results-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-intro {
    grid-column: span 2;
  }

  .results-ribbon > button:nth-child(3),
  .results-ribbon > button:nth-child(5) {
    border-left: 0;
  }

  .results-ribbon > button {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .analysis-story {
    grid-template-columns: 1fr;
  }

  .analysis-flow {
    padding: 4px 28px 26px;
  }
}

@media (max-width: 860px) {
  .ops-hero-copy {
    padding: 31px 24px 26px;
  }

  .ops-hero-copy h1 {
    font-size: 48px;
  }

  .ops-pulse {
    margin: 0 16px 16px;
  }

  .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-kpi-grid article:last-child {
    grid-column: span 2;
  }

  .analysis-filter-bar {
    flex-wrap: wrap;
  }

  .analysis-filter-title {
    width: 100%;
  }

  .analysis-filter-bar label {
    flex: 1;
    min-width: 125px;
  }

  .analysis-filter-caption {
    width: 100%;
  }

  .analysis-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .analysis-flow i {
    display: none;
  }

  .supply-banner {
    grid-template-columns: 1fr;
  }

  .supply-score {
    border-top: 1px solid rgba(255,255,255,.13);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .ops-hero-copy h1 {
    font-size: 40px;
  }

  .ops-hero-actions {
    grid-template-columns: 1fr 1fr;
  }

  .ops-pulse {
    padding: 17px;
  }

  .ops-pulse-grid button {
    min-height: 105px;
    padding: 13px;
  }

  .ops-pulse-grid b {
    font-size: 32px;
  }

  .ops-pulse-foot {
    flex-direction: column;
  }

  .ops-pulse-foot b {
    text-align: left;
  }

  .ops-kpi-grid,
  .analysis-kpis {
    grid-template-columns: 1fr;
  }

  .ops-kpi-grid article:last-child {
    grid-column: auto;
  }

  .results-ribbon {
    grid-template-columns: 1fr;
  }

  .results-intro {
    grid-column: auto;
  }

  .results-ribbon > button {
    min-height: 115px;
    border-left: 0;
  }

  .analysis-filter-bar label {
    flex-basis: 100%;
  }

  .analysis-flow {
    grid-template-columns: 1fr 1fr;
    padding: 4px 22px 24px;
  }

  .analysis-story-main h2,
  .supply-banner h2 {
    font-size: 28px;
  }

  .supply-banner > div:first-child,
  .analysis-story-main {
    padding: 24px 20px;
  }
}

/* Data integration and mobile workbench */
.integration-hub {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 0;
  overflow: hidden;
  color: #f6f1e6;
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 18%, rgba(204, 80, 51, 0.24), transparent 25%),
    linear-gradient(125deg, #102f28, #275448);
  box-shadow: var(--shadow);
}

.integration-hub-copy {
  padding: 30px;
}

.integration-hub-copy h2 {
  margin: 9px 0 12px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.14;
}

.integration-hub-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: rgba(246, 241, 230, 0.62);
  font-size: 11px;
  line-height: 1.75;
}

.integration-hub-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
}

.integration-hub-status div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 118px;
  padding: 20px;
  background: rgba(12, 35, 29, 0.55);
}

.integration-hub-status span {
  color: rgba(246, 241, 230, 0.48);
  font-size: 9px;
}

.integration-hub-status b {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.integration-hub-status small {
  color: #d4bc8b;
  font-size: 8px;
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 14px;
}

.integration-stack {
  display: grid;
  gap: 14px;
}

.integration-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(251, 248, 242, 0.78);
  box-shadow: var(--shadow-soft);
}

.integration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.integration-card-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.integration-card-head p {
  max-width: 570px;
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.65;
}

.endpoint-block {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 59, 51, 0.045);
}

.endpoint-block + .endpoint-block {
  margin-top: 8px;
}

.endpoint-method {
  color: var(--pine);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.endpoint-block code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  min-height: 26px;
  padding: 0 10px;
  color: var(--pine);
  border: 1px solid rgba(23, 59, 51, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 9px;
}

.integration-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: integration-step;
}

.integration-steps li {
  position: relative;
  min-height: 62px;
  padding: 0 0 17px 42px;
  color: var(--ink-soft);
  font-size: 10px;
  counter-increment: integration-step;
}

.integration-steps li::before {
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--pine);
  border: 1px solid rgba(23, 59, 51, 0.2);
  border-radius: 50%;
  background: var(--paper-light);
  content: counter(integration-step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 10px;
}

.integration-steps li:not(:last-child)::after {
  position: absolute;
  top: 29px;
  bottom: 3px;
  left: 14px;
  width: 1px;
  content: "";
  background: var(--line);
}

.integration-steps b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 11px;
}

.integration-mapping {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.integration-mapping article {
  min-width: 0;
  padding: 15px;
  border-radius: 12px;
  background: rgba(23, 59, 51, 0.045);
}

.integration-mapping b {
  display: block;
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.integration-mapping code {
  display: block;
  padding: 3px 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-code-block {
  max-height: 260px;
  margin: 13px 0 0;
  padding: 14px;
  overflow: auto;
  color: #d8e1dc;
  border-radius: 12px;
  background: #142e27;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 9px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.integration-security {
  padding: 18px;
  color: #f7f1e6;
  border-radius: 15px;
  background: linear-gradient(140deg, #244c42, #173b33);
}

.integration-security span {
  color: #d3bb89;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.integration-security b {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.integration-security p {
  margin: 7px 0 15px;
  color: rgba(247, 241, 230, 0.56);
  font-size: 9px;
  line-height: 1.7;
}

.integration-security .secondary-btn {
  color: #f7f1e6;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.integration-logs {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.integration-log {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 78px;
  gap: 10px;
  padding: 11px 12px;
  background: var(--paper-light);
  font-size: 9px;
}

.integration-log span {
  color: var(--ink-faint);
}

.integration-log b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-log em {
  color: var(--green);
  font-style: normal;
  text-align: right;
}

.integration-empty {
  padding: 20px;
  color: var(--ink-faint);
  text-align: center;
  font-size: 10px;
  background: var(--paper-light);
}

.analysis-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.analysis-insight {
  position: relative;
  min-height: 132px;
  padding: 19px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(251, 248, 242, 0.76);
  box-shadow: var(--shadow-soft);
}

.analysis-insight > span {
  color: var(--vermillion);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.analysis-insight > b {
  display: block;
  margin: 10px 0 5px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.analysis-insight > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  .page-wrap {
    padding-bottom: 102px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 44;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 66px;
    padding: 6px;
    border: 1px solid rgba(24, 35, 31, 0.1);
    border-radius: 19px;
    background: rgba(251, 248, 242, 0.94);
    box-shadow: 0 18px 45px rgba(24, 42, 36, 0.2);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: var(--ink-faint);
    border: 0;
    border-radius: 14px;
    background: transparent;
    font-size: 9px;
  }

  .mobile-bottom-nav button.active {
    color: #f8f2e7;
    background: var(--pine);
  }

  .mobile-bottom-nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }

  .integration-hub,
  .integration-layout {
    grid-template-columns: 1fr;
  }

  .integration-hub-status div {
    min-height: 96px;
  }

  .analysis-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .integration-hub-copy,
  .integration-card {
    padding: 20px 16px;
  }

  .integration-hub-copy h2 {
    font-size: 30px;
  }

  .integration-mapping {
    grid-template-columns: 1fr;
  }

  .endpoint-block {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .endpoint-block .copy-btn {
    grid-column: 2;
    justify-self: start;
  }

  .integration-log {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .integration-log em {
    grid-column: 2;
    text-align: left;
  }

  .data-table.mobile-cards {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .data-table.mobile-cards thead {
    display: none;
  }

  .data-table.mobile-cards tbody,
  .data-table.mobile-cards tr,
  .data-table.mobile-cards td {
    display: block;
    width: 100%;
  }

  .data-table.mobile-cards tr {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.3);
  }

  .data-table.mobile-cards tr:last-child {
    margin-bottom: 0;
  }

  .data-table.mobile-cards td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(24, 35, 31, 0.07);
    text-align: left !important;
  }

  .data-table.mobile-cards td:last-child {
    border-bottom: 0;
  }

  .data-table.mobile-cards td::before {
    color: var(--ink-faint);
    content: attr(data-label);
    font-size: 8px;
    font-weight: 500;
  }

  .data-table.mobile-cards td.address-cell {
    display: block;
    padding: 12px;
    background: rgba(23, 59, 51, 0.035);
  }

  .data-table.mobile-cards td.address-cell::before {
    display: block;
    margin-bottom: 3px;
  }

  .data-table.mobile-cards .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Balanced six-domain overview */
.balance-hero {
  position: relative;
  overflow: hidden;
  padding: 38px;
  color: #f7f1e5;
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 9%, rgba(210, 177, 109, 0.2), transparent 24%),
    radial-gradient(circle at 8% 100%, rgba(111, 167, 135, 0.15), transparent 28%),
    linear-gradient(132deg, #102d26 0%, #1b463b 58%, #16372f 100%);
  box-shadow: 0 30px 70px rgba(22, 53, 44, 0.2);
}

.balance-hero::before {
  position: absolute;
  top: -210px;
  right: -120px;
  width: 560px;
  height: 560px;
  content: "";
  border: 1px solid rgba(245, 233, 209, 0.12);
  border-radius: 50%;
}

.balance-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}

.balance-hero-head,
.balance-domain-grid {
  position: relative;
  z-index: 1;
}

.balance-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 48px;
  align-items: end;
  padding-bottom: 29px;
}

.balance-hero h1 {
  margin: 13px 0 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.balance-hero-copy > p {
  margin: 0;
  color: rgba(247, 241, 229, 0.63);
  font-size: 11px;
  line-height: 1.8;
}

.balance-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 19px;
  background: rgba(245, 233, 209, 0.12);
}

.balance-summary span {
  display: flex;
  flex-direction: column;
  padding: 10px;
  color: rgba(247, 241, 229, 0.45);
  font-size: 8px;
  background: rgba(15, 47, 39, 0.72);
}

.balance-summary b {
  color: #f1e4cb;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.balance-domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(245, 233, 209, 0.14);
  border-radius: 18px;
  background: rgba(245, 233, 209, 0.13);
}

.balance-domain {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 206px;
  padding: 20px;
  color: #f7f1e5;
  text-align: left;
  border: 0;
  background: rgba(17, 50, 42, 0.84);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.balance-domain:hover {
  z-index: 2;
  background: rgba(39, 83, 71, 0.95);
}

.balance-domain > div {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #cfb57d;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.balance-domain > div i {
  font-style: normal;
  opacity: 0;
  transform: translateX(-5px);
  transition: 180ms ease;
}

.balance-domain:hover > div i {
  opacity: 1;
  transform: translateX(0);
}

.balance-domain h2 {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.balance-domain > b {
  margin-top: auto;
  color: #f9f0df;
  font-family: var(--serif);
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.balance-domain > small {
  margin-top: 5px;
  color: #d0b980;
  font-size: 8px;
}

.balance-domain > p {
  margin: 11px 0 0;
  color: rgba(247, 241, 229, 0.58);
  font-size: 9px;
}

.balance-domain footer {
  width: 100%;
  margin-top: 7px;
  padding-top: 7px;
  color: rgba(247, 241, 229, 0.39);
  font-size: 8px;
  border-top: 1px solid rgba(245, 233, 209, 0.1);
}

.balance-entry-section {
  display: grid;
  grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1.45fr);
  gap: 22px;
  align-items: center;
  padding: 21px 23px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(180, 137, 79, 0.09), transparent 38%),
    rgba(251, 248, 242, 0.78);
}

.balance-entry-copy h2 {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.balance-entry-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.balance-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.balance-entry-grid button {
  display: grid;
  grid-template-columns: 23px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 7px;
  align-items: center;
  min-height: 53px;
  padding: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.balance-entry-grid button:hover {
  border-color: rgba(23, 59, 51, 0.3);
  background: #fff;
}

.balance-entry-grid button span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: var(--gold);
  border: 1px solid rgba(180, 137, 79, 0.35);
  border-radius: 50%;
  font-size: 12px;
}

.balance-entry-grid button b {
  align-self: end;
  font-size: 10px;
  font-weight: 600;
}

.balance-entry-grid button small {
  align-self: start;
  color: var(--ink-faint);
  font-size: 7px;
}

.balance-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.lane-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(251, 248, 242, 0.76);
  box-shadow: var(--shadow-soft);
}

.lane-head {
  position: relative;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.lane-head > span {
  color: var(--vermillion);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.lane-head h2 {
  margin: 6px 0 3px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
}

.lane-head p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 8px;
}

.lane-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lane-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: end;
  min-height: 91px;
  padding: 15px 18px;
  text-align: left;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.lane-list button:nth-child(2n) {
  border-right: 0;
}

.lane-list button:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.lane-list button:hover {
  background: rgba(23, 59, 51, 0.045);
}

.lane-list button span {
  grid-column: 1;
  color: var(--ink-soft);
  font-size: 9px;
}

.lane-list button b {
  grid-column: 1;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.lane-list button small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  color: var(--ink-faint);
  font-size: 8px;
}

.data-quality-panel {
  background:
    linear-gradient(150deg, rgba(180, 137, 79, 0.1), transparent 52%),
    rgba(251, 248, 242, 0.84);
}

@media (max-width: 1180px) {
  .balance-hero-head {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .balance-hero-copy {
    max-width: 700px;
  }

  .balance-entry-section {
    grid-template-columns: 1fr;
  }

  .balance-entry-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .balance-lanes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .balance-hero {
    padding: 28px 21px;
  }

  .balance-hero h1 {
    font-size: 45px;
  }

  .balance-domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .balance-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .balance-hero h1 {
    font-size: 39px;
  }

  .balance-summary {
    grid-template-columns: 1fr 1fr;
  }

  .balance-domain-grid {
    grid-template-columns: 1fr;
  }

  .balance-domain {
    min-height: 180px;
  }

  .lane-list {
    grid-template-columns: 1fr;
  }

  .lane-list button {
    border-right: 0;
  }

  .lane-list button:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .lane-list button:last-child {
    border-bottom: 0;
  }
}

/* Multi-dimensional analytics board */
.dimension-board {
  overflow: hidden;
  margin-bottom: 14px;
  color: #f5eddf;
  border-radius: 20px;
  background:
    radial-gradient(circle at 86% 18%, rgba(205, 172, 104, 0.18), transparent 24%),
    linear-gradient(125deg, #15392f, #234f43);
  box-shadow: var(--shadow-soft);
}

.dimension-board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(245, 233, 209, 0.13);
}

.dimension-board-head h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.dimension-board-head > span {
  color: #d4ba86;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.dimension-board-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.dimension-board-grid > div,
.dimension-board-grid > button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 108px;
  padding: 15px 13px;
  color: inherit;
  text-align: left;
  border: 0;
  border-right: 1px solid rgba(245, 233, 209, 0.1);
  background: transparent;
}

.dimension-board-grid > div:last-child,
.dimension-board-grid > button:last-child {
  border-right: 0;
}

.dimension-board-grid > button:hover {
  background: rgba(255, 255, 255, 0.055);
}

.dimension-board-grid span {
  color: #cdb37f;
  font-size: 7px;
  letter-spacing: 0.06em;
}

.dimension-board-grid b {
  margin-top: auto;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.dimension-board-grid small {
  margin-top: 2px;
  color: rgba(245, 237, 223, 0.45);
  font-size: 7px;
}

.analytics-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 13px;
}

.donut-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.donut-triptych .donut-wrap {
  grid-template-columns: 118px 1fr;
  min-height: 160px;
}

.donut-triptych .donut {
  width: 112px;
  height: 112px;
}

.donut-triptych .donut-center strong {
  font-size: 21px;
}

.grouped-bar-chart,
.scatter-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid {
  stroke: rgba(24, 35, 31, 0.09);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.chart-axis {
  fill: var(--ink-faint);
  font-family: var(--sans);
  font-size: 8px;
}

.chart-axis-line {
  stroke: rgba(24, 35, 31, 0.18);
  stroke-width: 1;
}

.chart-legend.premium {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 4px 0 3px 54px;
}

.chart-legend.premium span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 8px;
}

.chart-legend.premium i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.bubble-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.bubble-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bubble-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a4a8a2;
}

.bubble-legend i.active {
  background: #2c6757;
}

.bubble-point circle {
  fill: rgba(117, 122, 116, 0.34);
  stroke: rgba(117, 122, 116, 0.65);
  stroke-width: 1;
  transition: 160ms ease;
}

.bubble-point.active circle {
  fill: rgba(44, 103, 87, 0.28);
  stroke: #2c6757;
}

.bubble-point:hover circle {
  fill: rgba(180, 137, 79, 0.35);
  stroke: var(--gold);
}

.bubble-point text {
  fill: var(--ink-soft);
  font-family: var(--sans);
  font-size: 7px;
  pointer-events: none;
}

.analysis-matrix-table tbody tr:nth-child(-n + 3) .address-cell {
  box-shadow: inset 3px 0 0 var(--gold);
}

.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 11px;
  color: var(--ink-faint);
  font-size: 8px;
}

.heat-legend i {
  width: 19px;
  height: 7px;
  border-radius: 2px;
  background: rgba(36, 79, 68, 0.12);
}

.heat-legend i:nth-of-type(2) {
  background: rgba(36, 79, 68, 0.2);
}

.heat-legend i:nth-of-type(3) {
  background: rgba(36, 79, 68, 0.28);
}

.heat-legend i:nth-of-type(4) {
  background: rgba(36, 79, 68, 0.36);
}

.heat-legend i:nth-of-type(5) {
  background: rgba(36, 79, 68, 0.46);
}

.heat-legend b {
  margin-left: 7px;
  color: var(--ink-soft);
  font-weight: 500;
}

.supply-matrix .heat-cell {
  min-width: 62px;
  transition: background-color 160ms ease;
}

.supply-matrix .heat-cell:hover {
  box-shadow: inset 0 0 0 1px rgba(36, 79, 68, 0.28);
}

/* Metric drilldown */
[data-drill] {
  cursor: pointer;
}

td[data-drill] {
  color: var(--pine);
  text-decoration: underline;
  text-decoration-color: rgba(23, 59, 51, 0.24);
  text-underline-offset: 3px;
}

td[data-drill]:hover {
  color: var(--vermillion);
  background: rgba(204, 80, 51, 0.045);
}

.drilldown-trigger {
  cursor: pointer;
}

.analysis-insight:hover,
.ops-kpi-grid > button:hover {
  border-color: rgba(23, 59, 51, 0.28);
  box-shadow: 0 16px 35px rgba(23, 59, 51, 0.12);
  transform: translateY(-1px);
}

.kpi-card.drilldown-trigger:hover {
  border-color: rgba(23, 59, 51, 0.28);
  box-shadow: 0 16px 35px rgba(23, 59, 51, 0.12);
}

.kpi-card.drilldown-trigger {
  width: 100%;
  color: inherit;
  text-align: left;
}

.kpi-card.drilldown-trigger::before {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--pine-soft);
  content: "↗";
  border: 1px solid rgba(23, 59, 51, 0.16);
  border-radius: 50%;
  font-size: 10px;
}

.analysis-insight::after {
  position: absolute;
  right: 15px;
  bottom: 13px;
  color: rgba(23, 59, 51, 0.38);
  content: "下钻 ↗";
  font-size: 7px;
  letter-spacing: 0.05em;
}

.drilldown-panel {
  width: min(1120px, calc(100vw - 30px));
}

.drilldown-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0 14px;
  padding: 10px 13px;
  color: var(--ink-soft);
  border: 1px solid rgba(180, 137, 79, 0.25);
  border-radius: 11px;
  background: rgba(234, 220, 196, 0.35);
  font-size: 9px;
}

.drilldown-guide b {
  flex: 0 0 auto;
  color: var(--vermillion);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.drilldown-head {
  background:
    radial-gradient(circle at 90% 10%, rgba(191, 155, 89, 0.16), transparent 30%),
    #15392f;
  color: #f8f1e5;
}

.drilldown-head p:not(.eyebrow) {
  color: rgba(247, 241, 229, 0.57);
}

.drilldown-head .modal-close {
  color: #f8f1e5;
  border-color: rgba(255, 255, 255, 0.18);
}

.drilldown-body {
  padding-top: 18px;
}

.drilldown-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.drilldown-kpi {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.drilldown-kpi span,
.drilldown-kpi b {
  display: block;
}

.drilldown-kpi span {
  color: var(--ink-faint);
  font-size: 8px;
}

.drilldown-kpi b {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.drilldown-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 14px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drilldown-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.drilldown-section-title span {
  font-family: var(--serif);
  font-size: 18px;
}

.drilldown-section-title small {
  color: var(--ink-faint);
  font-size: 8px;
}

.drilldown-detail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drilldown-table-wrap {
  max-height: 390px;
  overflow: auto;
}

.drilldown-table {
  min-width: 850px;
}

.drilldown-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #efe9dd;
}

.drilldown-more {
  padding: 10px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
  text-align: right;
}

.drilldown-source {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 17px;
  padding: 12px 14px;
  color: var(--ink-soft);
  border-radius: 10px;
  background: rgba(23, 59, 51, 0.055);
  font-size: 9px;
}

.drilldown-source b {
  flex: 0 0 auto;
  color: var(--vermillion);
  font-size: 8px;
  letter-spacing: 0.08em;
}

@media (max-width: 1180px) {
  .dimension-board-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dimension-board-grid > div:nth-child(4n),
  .dimension-board-grid > button:nth-child(4n) {
    border-right: 0;
  }

  .analytics-duo {
    grid-template-columns: 1fr;
  }

  .donut-triptych {
    grid-template-columns: 1fr;
  }

  .drilldown-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .dimension-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dimension-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .donut-triptych {
    grid-template-columns: 1fr;
  }

  .drilldown-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .dimension-board-grid > div:nth-child(2n),
  .dimension-board-grid > button:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  .dimension-board-head {
    padding: 20px 17px 16px;
  }

  .dimension-board-head h2 {
    font-size: 21px;
  }

  .dimension-board-grid > div,
  .dimension-board-grid > button {
    min-height: 95px;
    padding: 12px;
  }

  .dimension-board-grid b {
    font-size: 21px;
  }

  .chart-legend.premium {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
