/* CloserSmith — The Tempered Deal */

:root {
  --forge-plum: #4A163A;
  --iron-black: #171216;
  --contract-ivory: #F7E9D5;
  --hot-metal: #F45B3C;
  --closing-teal: #42D6C7;
  --deal-blue: #7382FF;
  --decision-yellow: #F4E86A;
  --ai: #B283FF;
  --success: #3CCB8D;
  --waiting: #EBAE3D;
  --risk: #E64C67;

  --card-dark: #5B2449;
  --card-light: #FFFCF6;
  --border-dark: #7A4166;
  --border-light: #DCC7AA;
  --title-dark: #FFF8EF;
  --title-light: #261C23;
  --body-dark: #F0DCE8;
  --body-light: #3A3438;
  --muted-light: #53484E;
  --kicker-light: #B83D24;
  --kicker-dark: #F4E86A;

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --container: min(1180px, calc(100% - 40px));
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-soft: 0 1px 2px rgba(38, 28, 35, 0.06), 0 8px 24px rgba(38, 28, 35, 0.08);
  --shadow-deal: 0 2px 0 rgba(38, 28, 35, 0.04), 0 14px 36px rgba(38, 28, 35, 0.12);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  --shadow-emboss: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 4px rgba(23, 18, 22, 0.35);

  --announce-h: 34px;
  --header-h: 62px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));

  --ease-temper: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-forge: cubic-bezier(0.34, 1.15, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--title-light);
  background: var(--contract-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-page="home"] {
  background: var(--forge-plum);
  color: var(--title-light);
}

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

a {
  color: var(--deal-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

/* ── Layout ── */

.container {
  width: var(--container);
  max-width: var(--container);
  margin-inline: auto;
}

.site-shell {
  min-height: 100vh;
  padding-top: var(--site-top-h);
}

main {
  display: block;
}

.is-hidden {
  display: none !important;
}

.is-flash {
  animation: deal-flash 0.7s var(--ease-temper);
}

.is-resolved {
  animation: surface-resolve 0.85s var(--ease-forge);
}

.mt-m {
  margin-top: 1.5rem;
}

@keyframes deal-flash {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 3px rgba(244, 91, 60, 0.4); }
}

@keyframes surface-resolve {
  0% { filter: blur(1px); transform: scale(0.985); opacity: 0.85; }
  60% { filter: blur(0); transform: scale(1.01); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes dial-rotate {
  from { transform: rotate(var(--dial-from, 0deg)); }
  to { transform: rotate(var(--dial-to, 120deg)); }
}

@keyframes zipper-close {
  from { transform: translateY(var(--zip-from, 0)); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(66, 214, 199, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(66, 214, 199, 0); }
}

@keyframes mesh-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ── Typography ── */

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kicker-light);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body-light);
  max-width: 62ch;
}

.mono-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body-light);
  margin-bottom: 0.5rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--title-light);
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--title-light);
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--title-light);
}

h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--title-light);
}

.sec-head {
  margin-bottom: 2rem;
  max-width: 720px;
}

.sec-head .lead {
  margin-top: 0.5rem;
}

.brand-signal {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 0.5rem;
  color: var(--title-dark);
}

.position-line {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--closing-teal);
}

.tagline-exact {
  margin: 0.5rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  font-style: italic;
  color: var(--hot-metal);
  line-height: 1.35;
  max-width: 36rem;
}

.hero-hint {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 0.875rem;
  color: var(--body-dark);
  opacity: 0.9;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s var(--ease-temper), border-color 0.18s, color 0.18s, transform 0.15s var(--ease-forge);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--hot-metal);
  color: #fff;
  border-color: var(--hot-metal);
  box-shadow: var(--shadow-emboss);
}

.btn-primary:hover {
  background: #e34f32;
  border-color: #e34f32;
  color: #fff;
}

.btn-teal {
  background: var(--closing-teal);
  color: var(--iron-black);
  border-color: #38c4b6;
}

.btn-teal:hover {
  background: #3bc9bb;
  color: var(--iron-black);
}

.btn-blue {
  background: var(--deal-blue);
  color: #fff;
  border-color: var(--deal-blue);
}

.btn-blue:hover {
  background: #5f6ef0;
  border-color: #5f6ef0;
  color: #fff;
}

.btn-yellow {
  background: var(--decision-yellow);
  color: var(--title-light);
  border-color: #e6dc5e;
}

.btn-yellow:hover {
  background: #ede46a;
  color: var(--title-light);
}

.btn-ghost {
  background: rgba(255, 252, 246, 0.9);
  color: var(--title-light);
  border-color: var(--border-light);
}

.btn-ghost:hover {
  background: var(--card-light);
  border-color: #cbb89a;
  color: var(--title-light);
}

.btn-line {
  background: transparent;
  color: var(--title-light);
  border-color: #a89278;
}

.btn-line:hover {
  background: rgba(38, 28, 35, 0.06);
  border-color: var(--deal-blue);
  color: var(--deal-blue);
}

/* High-contrast buttons on dark surfaces */
.tempered-hero .btn-ghost,
.section--plum .btn-ghost,
.section--iron .btn-ghost,
.page-hero--iron .btn-ghost,
.page-hero--plum .btn-ghost {
  background: rgba(91, 36, 73, 0.65);
  color: var(--title-dark);
  border-color: #9a5f84;
}

.tempered-hero .btn-ghost:hover,
.section--plum .btn-ghost:hover,
.section--iron .btn-ghost:hover,
.page-hero--iron .btn-ghost:hover,
.page-hero--plum .btn-ghost:hover {
  background: rgba(91, 36, 73, 0.9);
  border-color: var(--hot-metal);
  color: #fff;
}

.tempered-hero .btn-line,
.section--plum .btn-line,
.section--iron .btn-line,
.page-hero--iron .btn-line,
.page-hero--plum .btn-line {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 248, 239, 0.55);
}

.tempered-hero .btn-line:hover,
.section--plum .btn-line:hover,
.section--iron .btn-line:hover,
.page-hero--iron .btn-line:hover,
.page-hero--plum .btn-line:hover {
  background: rgba(255, 248, 239, 0.12);
  border-color: var(--decision-yellow);
  color: var(--decision-yellow);
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

/* ── Forms ── */

label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--title-light);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--deal-blue);
  box-shadow: 0 0 0 3px rgba(115, 130, 255, 0.18);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.form-ok {
  font-size: 0.875rem;
  color: var(--success);
  margin-top: 0.75rem;
}

.form-error {
  font-size: 0.875rem;
  color: var(--risk);
  margin-bottom: 0.75rem;
}

.file-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--body-light);
}

/* ── Announce bar ── */

.site-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
}

.announce-bar {
  min-height: var(--announce-h);
  background: var(--iron-black);
  border-bottom: 1px solid #2a2228;
}

.announce-bar-inner {
  width: var(--container);
  max-width: var(--container);
  margin-inline: auto;
  min-height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 6px;
}

.announce-text {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--body-dark);
  text-align: center;
}

.announce-cta {
  color: var(--closing-teal);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.25rem;
}

.announce-cta:hover {
  color: #5ee8db;
  text-decoration: underline;
}

/* ── Site header ── */

.site-header {
  background: var(--contract-ivory);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(255, 252, 246, 0.65);
}

.header-inner {
  width: var(--container);
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--title-light);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--title-light);
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--body-light);
  letter-spacing: 0.02em;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--body-light);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--title-light);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--title-light);
  font-weight: 700;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.25rem;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot-metal);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(244, 91, 60, 0.45);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--title-light);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1rem;
  background: var(--contract-ivory);
  border-top: 1px solid var(--border-light);
}

.mobile-nav a {
  padding: 0.625rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--title-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 199, 170, 0.55);
}

.mobile-nav a:hover {
  color: var(--hot-metal);
}

.mobile-nav.is-open {
  display: flex;
}

/* User menu */

.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-light);
  background: var(--forge-plum);
  color: var(--title-dark);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s var(--ease-forge);
}

.user-avatar:hover {
  transform: scale(1.04);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 0.5rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s var(--ease-temper), visibility 0.18s;
  z-index: 300;
}

.user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-workspace-label {
  display: block;
  padding: 0.5rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--body-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.25rem;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--title-light);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--contract-ivory);
  text-decoration: none;
}

/* ── Footer ── */

.site-footer {
  background: var(--iron-black);
  color: var(--body-dark);
  margin-top: 0;
}

.footer-grid {
  width: var(--container);
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--title-dark);
  margin-bottom: 0.875rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.8125rem;
  color: var(--body-dark);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--closing-teal);
  text-decoration: none;
}

.footer-bar {
  border-top: 1px solid #2a2228;
  padding: 1.25rem 0 1.75rem;
}

.footer-tag {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--body-dark);
  margin-bottom: 1rem;
  max-width: 56rem;
}

.footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(224, 200, 215, 0.65);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal a {
  color: rgba(224, 200, 215, 0.75);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--closing-teal);
}

/* ── Sections ── */

.section {
  padding: 4rem 0;
}

.section.tight {
  padding: 2.5rem 0;
}

.section.alt {
  background: rgba(255, 252, 246, 0.45);
}

.section--ivory {
  background: var(--contract-ivory);
  color: var(--title-light);
}

.section--ivory .kicker {
  color: var(--kicker-light);
}

.section--ivory h1,
.section--ivory h2,
.section--ivory h3,
.section--ivory h4 {
  color: var(--title-light);
}

.section--ivory .lead,
.section--ivory .mono-label,
.section--ivory p,
.section--ivory .sec-head .lead {
  color: var(--body-light);
}

.section--plum {
  background: var(--forge-plum);
  color: var(--body-dark);
}

.section--plum .kicker {
  color: var(--kicker-dark);
}

.section--plum h1,
.section--plum h2,
.section--plum h3,
.section--plum h4 {
  color: var(--title-dark);
}

.section--plum > .container > .sec-head .lead,
.section--plum > .container > .lead,
.section--plum .team-blurb {
  color: var(--body-dark);
}

.section--plum .mono-label {
  color: rgba(240, 220, 232, 0.85);
}

.section--iron {
  background: var(--iron-black);
  color: var(--body-dark);
}

.section--iron .kicker {
  color: var(--closing-teal);
}

.section--iron h1,
.section--iron h2,
.section--iron h3,
.section--iron h4 {
  color: var(--title-dark);
}

.section--iron > .container > .sec-head .lead,
.section--iron > .container > .lead {
  color: var(--body-dark);
}

.section--iron .mono-label {
  color: rgba(240, 220, 232, 0.85);
}

.section--paper {
  background: var(--card-light);
  color: var(--title-light);
}

/* ── Page hero ── */

.page-hero {
  padding: 3rem 0 3.5rem;
  background: var(--contract-ivory);
  border-bottom: 1px solid var(--border-light);
  color: var(--title-light);
}

.page-hero .kicker {
  color: var(--kicker-light);
}

.page-hero h1 {
  color: var(--title-light);
}

.page-hero .lead {
  color: var(--body-light);
}

.page-hero-inner {
  max-width: 780px;
}

.page-hero--center .page-hero-inner {
  margin-inline: auto;
  text-align: center;
}

.page-hero--center .lead {
  margin-inline: auto;
}

.page-hero--center .page-hero-actions {
  justify-content: center;
}

.page-hero--iron {
  background: var(--iron-black);
  border-bottom-color: #2a2228;
  color: var(--body-dark);
}

.page-hero--iron .kicker {
  color: var(--closing-teal);
}

.page-hero--iron h1 {
  color: var(--title-dark);
}

.page-hero--iron .lead {
  color: var(--body-dark);
}

.page-hero--plum {
  background: var(--forge-plum);
  border-bottom-color: var(--border-dark);
  color: var(--body-dark);
}

.page-hero--plum .kicker {
  color: var(--kicker-dark);
}

.page-hero--plum h1 {
  color: var(--title-dark);
}

.page-hero--plum .lead {
  color: var(--body-dark);
}

/* ══════════════════════════════ HOME — TEMPERED HERO ══════════════════════════════ */

.tempered-hero {
  background: var(--forge-plum);
  padding-bottom: 0;
  color: var(--body-dark);
}

.tempered-hero .kicker {
  color: var(--kicker-dark);
}

.tempered-hero h1,
.tempered-hero .brand-signal {
  color: var(--title-dark);
}

.tempered-hero .lead,
.tempered-hero .surface-caption,
.tempered-hero .hero-hint {
  color: var(--body-dark);
}

.tempered-hero .mono-label {
  color: rgba(240, 220, 232, 0.8);
}

.tempered-hero .position-line {
  color: var(--closing-teal);
}

.tempered-hero .tagline-exact {
  color: var(--hot-metal);
}

.tempered-hero-rail {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid rgba(122, 65, 102, 0.55);
}

.tempered-hero-top {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.tempered-hero-top .brand-signal,
.tempered-hero-top .kicker,
.tempered-hero-top .position-line,
.tempered-hero-top .tagline-exact,
.tempered-hero-top .lead {
  margin-left: auto;
  margin-right: auto;
}

.tempered-hero-top .tagline-exact {
  max-width: 34rem;
}

.tempered-hero-top .lead {
  max-width: 40rem;
}

.tempered-hero-actions,
.tempered-hero-top .page-hero-actions {
  justify-content: center;
}

/* Deal surface */

.deal-surface-wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.deal-surface {
  position: relative;
  min-height: 520px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-dark);
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(91, 36, 73, 0.65) 0%, transparent 70%),
    linear-gradient(145deg, rgba(74, 22, 58, 0.95) 0%, rgba(91, 36, 73, 0.85) 100%);
  box-shadow: var(--shadow-deal), inset 0 1px 0 rgba(255, 248, 239, 0.08);
  overflow: hidden;
}

.surface-mesh {
  position: absolute;
  inset: 12% 10%;
  border-radius: var(--radius-lg);
  background-image:
    linear-gradient(rgba(122, 65, 102, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 65, 102, 0.35) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
  animation: mesh-shimmer 18s linear infinite alternate;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 75%);
}

.deal-surface.is-resolved .surface-mesh {
  opacity: 0.35;
}

.surface-dent {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(23, 18, 22, 0.15), rgba(23, 18, 22, 0.45) 70%);
  box-shadow: inset 0 4px 12px rgba(23, 18, 22, 0.35);
  transform: scale(1);
  transition: opacity 0.5s var(--ease-temper), transform 0.5s var(--ease-forge);
  pointer-events: none;
}

.surface-dent.is-healed {
  opacity: 0;
  transform: scale(0.6);
}

.signature-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(240px, 42%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(66, 214, 199, 0.35);
  display: grid;
  place-items: center;
  opacity: 0.35;
  transition: opacity 0.6s var(--ease-temper), border-color 0.6s;
}

.signature-ring span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(66, 214, 199, 0.65);
}

.deal-surface.is-resolved .signature-ring {
  opacity: 1;
  border-color: var(--closing-teal);
  border-style: solid;
  animation: ring-pulse 2.4s ease-in-out infinite;
}

.deal-surface.is-resolved .signature-ring span {
  color: var(--closing-teal);
}

.pressure-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pressure-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s var(--ease-temper), transform 0.4s var(--ease-forge);
}

.pressure-pin::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hot-metal);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 0 4px rgba(244, 91, 60, 0.2),
    0 4px 12px rgba(23, 18, 22, 0.35);
}

.pressure-pin::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: var(--pin-depth, 48px);
  background: linear-gradient(180deg, var(--hot-metal), transparent);
  transform-origin: top center;
  transform: translate(-50%, 0) rotate(var(--pin-angle, 180deg));
  opacity: 0.65;
  pointer-events: none;
}

.pressure-pin b {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--title-dark);
  background: rgba(23, 18, 22, 0.72);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.pressure-pin.is-released {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  pointer-events: none;
}

.pressure-pin.is-released::after {
  height: 0;
}

.surface-status {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(23, 18, 22, 0.72);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}

.surface-status p {
  font-size: 0.8125rem;
  color: var(--body-dark);
  max-width: 36rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  background: rgba(91, 36, 73, 0.65);
  color: var(--title-dark);
}

.status-pill.is-wait {
  border-color: rgba(235, 174, 61, 0.45);
  color: var(--waiting);
}

.status-pill.is-risk {
  border-color: rgba(230, 76, 103, 0.45);
  color: var(--risk);
}

.status-pill.is-ok {
  border-color: rgba(60, 203, 141, 0.45);
  color: var(--success);
}

.status-pill.is-ai {
  border-color: rgba(178, 131, 255, 0.45);
  color: var(--ai);
}

/* Evidence rail (home) */

.evidence-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.evidence-cell {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 0.85rem 0.75rem;
  min-height: 5.5rem;
}

.evidence-cell .mono-label {
  color: rgba(224, 200, 215, 0.65);
  margin-bottom: 0.4rem;
}

.evidence-cell b {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--title-dark);
  line-height: 1.35;
}

.evidence-cell b.is-miss {
  color: var(--risk);
}

.evidence-cell b.is-ok {
  color: var(--success);
}

/* Pain / keyword rails */

.pain-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-dark);
}

.pain-cell {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border-dark);
}

.pain-cell:last-child {
  border-right: none;
}

.pain-cell > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--hot-metal);
  margin-bottom: 0.625rem;
}

.pain-cell h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  color: var(--title-dark);
}

.pain-cell p {
  font-size: 0.8125rem;
  color: var(--body-dark);
  line-height: 1.55;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.keyword-row li {
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(115, 130, 255, 0.1);
  border: 1px solid rgba(115, 130, 255, 0.25);
  border-radius: var(--radius-sm);
  color: var(--deal-blue);
}

body[data-page="home"] .keyword-row li {
  background: rgba(66, 214, 199, 0.1);
  border-color: rgba(66, 214, 199, 0.28);
  color: var(--closing-teal);
}

/* Cap cards */

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

.cap-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  min-height: 100%;
}

.cap-card h3 {
  margin-bottom: 0.5rem;
}

.cap-card p {
  font-size: 0.875rem;
  color: var(--body-light);
  line-height: 1.55;
  flex: 1;
}

.section--plum .cap-card,
.section--iron .cap-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.section--plum .cap-card p,
.section--iron .cap-card p {
  color: var(--body-dark);
}

.section--plum .cap-card h3,
.section--iron .cap-card h3 {
  color: var(--title-dark);
}

.sub-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sub-cta p {
  font-size: 0.9375rem;
  color: var(--body-light);
  max-width: 36rem;
}

.section--plum .sub-cta,
.section--iron .sub-cta {
  background: rgba(23, 18, 22, 0.45);
  border-color: var(--border-dark);
}

.section--plum .sub-cta p,
.section--iron .sub-cta p {
  color: var(--body-dark);
}

/* ══════════════════════════════ CLOSE BOOK (Platform) ══════════════════════════════ */

.close-book {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  min-height: 420px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.book-spine {
  width: 52px;
  background: linear-gradient(180deg, var(--forge-plum) 0%, #3a1230 100%);
  border-right: 2px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.book-spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--title-dark);
}

.book-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.book-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--contract-ivory);
}

.book-tab {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--body-light);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.book-tab.is-active {
  background: var(--card-light);
  border-color: var(--border-light);
  color: var(--title-light);
  box-shadow: var(--shadow-soft);
}

.book-tab.is-hidden-tab {
  opacity: 0.45;
  text-decoration: line-through;
}

.book-spread {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 320px;
}

.book-page {
  padding: 1.25rem;
  border-right: 1px solid var(--border-light);
  position: relative;
  transition: opacity 0.35s var(--ease-temper), transform 0.45s var(--ease-forge);
  transform-origin: left center;
}

.book-page:last-child {
  border-right: none;
  background: rgba(247, 233, 213, 0.35);
}

.book-page.is-turned {
  opacity: 0.35;
  transform: perspective(800px) rotateY(-8deg);
}

.book-page h3 {
  margin-bottom: 0.75rem;
}

.book-facts {
  display: grid;
  gap: 0.5rem;
}

.book-fact {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border-light);
}

.book-fact span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--body-light);
}

.book-fact b {
  color: var(--title-light);
  font-weight: 600;
}

.book-fact b.is-gap {
  color: var(--risk);
}

.book-fact b.is-trace {
  color: var(--deal-blue);
  cursor: pointer;
}

.book-confidence {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(244, 232, 106, 0.18);
  border: 1px solid rgba(244, 232, 106, 0.45);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--title-light);
}

/* ══════════════════════════════ DOSSIER (Deal Briefs) ══════════════════════════════ */

.deal-dossier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) minmax(280px, 340px);
  gap: 0;
  min-height: 480px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.dossier-narrative {
  padding: 1.5rem;
  border-right: 1px solid var(--border-light);
  background:
    linear-gradient(180deg, rgba(247, 233, 213, 0.35) 0%, transparent 12%),
    var(--card-light);
}

.dossier-narrative h3 {
  margin-bottom: 0.75rem;
}

.dossier-narrative p {
  font-size: 0.9375rem;
  color: var(--body-light);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.dossier-margin {
  padding: 1rem;
  border-right: 1px solid var(--border-light);
  background: #faf6ef;
  overflow-y: auto;
}

.dossier-margin:last-child {
  border-right: none;
}

.margin-note {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  border-left: 3px solid var(--deal-blue);
  background: var(--card-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--body-light);
}

.margin-note b {
  display: block;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--title-light);
  margin-bottom: 0.25rem;
}

.margin-note.is-contradiction {
  border-left-color: var(--risk);
  background: rgba(230, 76, 103, 0.06);
}

.margin-note.is-assumption {
  border-left-color: var(--waiting);
  background: rgba(235, 174, 61, 0.08);
}

.margin-note.is-assumption b::after {
  content: " · assumption";
  color: var(--waiting);
}

/* ══════════════════════════════ DECISION THEATER (Stakeholders) ══════════════════════════════ */

.decision-theater {
  position: relative;
  min-height: 480px;
  padding: 1.5rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 60% 45% at 50% 55%, rgba(115, 130, 255, 0.08) 0%, transparent 70%),
    var(--card-light);
  box-shadow: var(--shadow-deal);
}

.theater-stage {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: min(340px, 55%);
  padding: 1.25rem;
  text-align: center;
  background: var(--contract-ivory);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  z-index: 2;
}

.theater-stage h3 {
  margin-bottom: 0.35rem;
}

.theater-stage p {
  font-size: 0.8125rem;
  color: var(--body-light);
}

.theater-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.theater-seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s var(--ease-forge);
}

.theater-seat:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.seat-back {
  width: 44px;
  height: 36px;
  border-radius: var(--radius-sm) var(--radius-sm) 2px 2px;
  background: linear-gradient(180deg, #e8ddd0 0%, #d4c4b0 100%);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-inset);
}

.theater-seat.is-filled .seat-back {
  background: linear-gradient(180deg, var(--deal-blue) 0%, #5f6ef0 100%);
  border-color: #5f6ef0;
}

.theater-seat.is-empty .seat-back {
  background: repeating-linear-gradient(
    -45deg,
    rgba(230, 76, 103, 0.06),
    rgba(230, 76, 103, 0.06) 4px,
    transparent 4px,
    transparent 8px
  );
  border-style: dashed;
  border-color: rgba(230, 76, 103, 0.35);
}

.theater-seat.is-blocker .seat-back {
  background: linear-gradient(180deg, var(--risk) 0%, #c93d56 100%);
  border-color: var(--risk);
}

.theater-seat span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--body-light);
  max-width: 88px;
  text-align: center;
  line-height: 1.25;
}

.tension-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--risk), transparent);
  transform-origin: left center;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 1;
}

.tension-line.is-live {
  opacity: 0.85;
  animation: deal-flash 1.2s var(--ease-temper) infinite;
}

/* ══════════════════════════════ COMBO DIALS (Close Conditions) ══════════════════════════════ */

.closing-combo {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.combo-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.dial-face {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0%, #e8ddd0 45%, #c9b8a4 100%);
  border: 3px solid var(--border-light);
  box-shadow:
    inset 0 2px 6px rgba(38, 28, 35, 0.15),
    0 4px 12px rgba(38, 28, 35, 0.12);
  transition: transform 0.65s var(--ease-forge);
}

.combo-dial.is-set .dial-face {
  --dial-to: var(--dial-deg, 120deg);
  animation: dial-rotate 0.85s var(--ease-forge) forwards;
}

.combo-dial.is-at-risk .dial-face {
  border-color: var(--risk);
  box-shadow:
    inset 0 2px 6px rgba(230, 76, 103, 0.15),
    0 0 0 3px rgba(230, 76, 103, 0.15);
}

.dial-notch {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(103, 91, 96, 0.35);
}

.dial-pointer {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 4px;
  height: 36%;
  margin-left: -2px;
  background: var(--hot-metal);
  border-radius: 2px;
  transform-origin: bottom center;
  box-shadow: 0 1px 2px rgba(38, 28, 35, 0.25);
}

.combo-dial b {
  font-size: 0.8125rem;
  color: var(--title-light);
}

.combo-dial span {
  font-size: 0.75rem;
  color: var(--body-light);
}

.combo-dial .status-pill {
  background: var(--contract-ivory);
  color: var(--body-light);
  border-color: var(--border-light);
}

/* ══════════════════════════════ ZIPPER (Close Plans) ══════════════════════════════ */

.deal-zipper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  min-height: 420px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.zipper-side {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zipper-side--buyer {
  background: rgba(247, 233, 213, 0.35);
  border-right: 1px solid var(--border-light);
}

.zipper-side--seller {
  background: rgba(115, 130, 255, 0.06);
  border-left: 1px solid var(--border-light);
}

.zipper-side h4 {
  font-size: 0.6875rem;
  margin-bottom: 0.35rem;
  color: var(--body-light);
}

.zipper-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8125rem;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, transform 0.35s var(--ease-forge);
}

.zipper-row.is-interlocked {
  border-color: var(--closing-teal);
  animation: zipper-close 0.45s var(--ease-forge);
}

.zipper-row.is-mismatch {
  border-color: var(--risk);
  background: rgba(230, 76, 103, 0.05);
}

.zipper-track {
  width: 28px;
  background: linear-gradient(180deg, #d4c4b0, #b8a690);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0;
  gap: 4px;
}

.zipper-tooth {
  width: 18px;
  height: 10px;
  background: var(--contract-ivory);
  border: 1px solid var(--border-light);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  opacity: 0.45;
  transition: opacity 0.3s, background 0.3s;
}

.zipper-tooth.is-closed {
  opacity: 1;
  background: var(--closing-teal);
  border-color: #38c4b6;
}

.zipper-pull {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--hot-metal);
  box-shadow: var(--shadow-emboss);
  margin: 0.35rem 0;
}

/* ══════════════════════════════ TERM FABRIC (Commercial Review) ══════════════════════════════ */

.term-fabric {
  position: relative;
  min-height: 420px;
  padding: 1.5rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(220, 199, 170, 0.15) 0px,
      rgba(220, 199, 170, 0.15) 2px,
      transparent 2px,
      transparent 10px
    ),
    var(--card-light);
  box-shadow: var(--shadow-deal);
  overflow: hidden;
}

.fabric-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.fabric-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.35s var(--ease-forge), border-color 0.2s;
  z-index: 2;
}

.fabric-node.is-pulled {
  border-color: var(--hot-metal);
  transform: translate(-50%, -50%) scale(1.06);
}

.fabric-node.is-tense {
  border-color: var(--risk);
  background: rgba(230, 76, 103, 0.06);
}

.fabric-thread {
  position: absolute;
  height: 2px;
  background: var(--border-light);
  transform-origin: left center;
  transition: background 0.3s, transform 0.45s var(--ease-forge);
  z-index: 1;
}

.fabric-thread.is-stretched {
  background: linear-gradient(90deg, var(--hot-metal), var(--risk));
  height: 3px;
}

.fabric-readout {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--contract-ivory);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--body-light);
}

/* ══════════════════════════════ DEAL TABLE (Deal Room) ══════════════════════════════ */

.deal-table {
  position: relative;
  min-height: 480px;
  padding: 3.5rem 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(247, 233, 213, 0.55) 0%, rgba(255, 252, 246, 0.95) 18%, rgba(255, 252, 246, 0.95) 82%, rgba(115, 130, 255, 0.08) 100%);
  box-shadow: var(--shadow-deal);
  overflow-x: auto;
}

.deal-table::before {
  content: "";
  position: absolute;
  inset: 18% 8%;
  border: 2px solid rgba(220, 199, 170, 0.65);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.table-edge {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-edge--customer {
  top: 0.75rem;
}

.table-edge--internal {
  bottom: 0.75rem;
}

.table-task {
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--title-light);
}

.table-artifact {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.5rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s var(--ease-forge), border-color 0.2s;
  z-index: 2;
}

.table-artifact:hover {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: var(--deal-blue);
}

.table-artifact.is-linked {
  border-left: 3px solid var(--closing-teal);
}

.table-artifact.is-pending {
  border-left: 3px solid var(--waiting);
}

/* ══════════════════════════════ FORECAST SHADOW ══════════════════════════════ */

.forecast-shadow {
  padding: 1.5rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.forecast-rail {
  position: relative;
  height: 72px;
  margin: 1.5rem 0 1rem;
  background: var(--contract-ivory);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.forecast-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--body-light);
  opacity: 0.35;
}

.forecast-marker span {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--body-light);
  white-space: nowrap;
}

.forecast-date {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--deal-blue);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(38, 28, 35, 0.2);
  cursor: grab;
  z-index: 3;
}

.shadow-bar {
  position: absolute;
  top: 50%;
  height: 28px;
  margin-top: -14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(90deg, rgba(115, 130, 255, 0.45), rgba(38, 28, 35, 0.08));
  transition: width 0.55s var(--ease-temper);
  z-index: 1;
}

.shadow-bar.is-long {
  background: linear-gradient(90deg, rgba(230, 76, 103, 0.35), rgba(38, 28, 35, 0.06));
}

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

.forecast-step {
  padding: 0.75rem;
  font-size: 0.8125rem;
  background: var(--contract-ivory);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--body-light);
}

.forecast-step b {
  display: block;
  font-size: 0.75rem;
  color: var(--title-light);
  margin-bottom: 0.25rem;
}

.forecast-step.is-open {
  border-color: var(--waiting);
}

.forecast-step.is-done {
  border-color: var(--success);
}

/* ══════════════════════════════ STATE MACHINE (Developers) ══════════════════════════════ */

.state-machine {
  padding: 1.5rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  background: var(--iron-black);
  box-shadow: var(--shadow-deal);
  overflow-x: auto;
}

.state-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 0.5rem 0;
}

.state-node {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  min-width: 120px;
  text-align: center;
  background: var(--card-dark);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-forge);
}

.state-node b {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--title-dark);
  margin-bottom: 0.2rem;
}

.state-node span {
  font-size: 0.625rem;
  color: var(--body-dark);
}

.state-node.is-active {
  border-color: var(--closing-teal);
  background: rgba(66, 214, 199, 0.12);
  transform: scale(1.03);
}

.state-node.is-done {
  border-color: var(--success);
}

.state-node.is-wait {
  border-color: var(--waiting);
}

.state-link {
  flex-shrink: 0;
  width: 32px;
  height: 2px;
  background: var(--border-dark);
  position: relative;
}

.state-link::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: var(--border-dark);
}

.state-link.is-live {
  background: var(--closing-teal);
}

.state-link.is-live::after {
  border-left-color: var(--closing-teal);
}

.api-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(23, 18, 22, 0.65);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--body-dark);
  overflow-x: auto;
}

.api-panel code {
  color: var(--closing-teal);
}

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

.integration-card {
  padding: 1.25rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.integration-card h3 {
  margin-bottom: 0.5rem;
}

.integration-card p {
  font-size: 0.8125rem;
  color: var(--body-light);
  line-height: 1.55;
}

.section--iron .integration-card {
  background: var(--card-dark);
  border-color: var(--border-dark);
}

.section--iron .integration-card p {
  color: var(--body-dark);
}

.section--iron .integration-card h3 {
  color: var(--title-dark);
}

/* ══════════════════════════════ PORTFOLIO SHEET (Pricing) ══════════════════════════════ */

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

.portfolio-inputs {
  padding: 1.5rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.portfolio-inputs h3 {
  margin-bottom: 1rem;
}

.portfolio-field {
  margin-bottom: 1rem;
}

.portfolio-field label {
  margin-bottom: 0.35rem;
}

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

.tier-panel {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.tier-panel.is-recommended {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.25), var(--shadow-deal);
}

.tier-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.tier-panel .kicker {
  margin-bottom: 0.5rem;
}

.tier-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--title-light);
  letter-spacing: -0.03em;
  margin: 0.5rem 0 1rem;
}

.tier-price span {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--body-light);
}

.tier-panel ul li {
  font-size: 0.8125rem;
  color: var(--body-light);
  padding: 0.375rem 0;
  padding-left: 1rem;
  position: relative;
}

.tier-panel ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  background: var(--closing-teal);
  border-radius: 1px;
}

.tier-note {
  font-size: 0.8125rem;
  color: var(--body-light);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.tier-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--contract-ivory);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.tier-compare div {
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: var(--body-light);
}

.tier-compare h4 {
  margin-bottom: 0.375rem;
}

/* ══════════════════════════════ AUTH ══════════════════════════════ */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--iron-black);
  color: var(--title-dark);
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: var(--title-dark);
}

.auth-brand:hover {
  color: var(--title-dark);
  text-decoration: none;
}

.auth-card {
  padding: 2rem;
  background: var(--card-dark);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-deal);
}

.auth-card h1 {
  color: var(--title-dark);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-card .lead {
  color: var(--body-dark);
  margin-bottom: 1.5rem;
}

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

.auth-form label {
  color: var(--title-dark);
}

.auth-form input {
  background: #120e11;
  border-color: var(--border-dark);
  color: var(--title-dark);
}

.auth-form input:focus {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 3px rgba(244, 91, 60, 0.25);
}

.auth-form input::placeholder {
  color: #6a5a62;
}

.auth-alt {
  font-size: 0.8125rem;
  color: var(--body-dark);
  margin-top: 1.25rem;
  text-align: center;
}

.auth-alt a {
  color: var(--closing-teal);
  font-weight: 600;
}

/* ══════════════════════════════ CONTENT PAGES ══════════════════════════════ */

.about-block p {
  font-size: 0.9375rem;
  color: var(--body-light);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.anatomy {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.anatomy li {
  font-size: 0.9375rem;
  color: var(--body-light);
  padding: 0.5rem 0;
  line-height: 1.55;
}

.anatomy li b {
  color: var(--title-light);
}

.legal-prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-prose p,
.legal-prose li {
  font-size: 0.9375rem;
  color: var(--body-light);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.legal-prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

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

.contact-grid aside p {
  font-size: 0.875rem;
  color: var(--body-light);
  margin-bottom: 0.75rem;
}

.contact-grid aside strong {
  color: var(--title-light);
}

.help-list li,
.status-list li,
.changelog-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.help-list li b,
.status-list li b,
.changelog-list li b {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--title-light);
}

.help-list li span,
.status-list li span,
.changelog-list li span {
  color: var(--body-light);
}

.status-list li.st-operational span {
  color: var(--success);
  font-weight: 600;
}

.status-list li.st-degraded span {
  color: var(--waiting);
  font-weight: 600;
}

.ui-alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1.5px solid var(--border-light);
  background: var(--card-light);
  margin-top: 1rem;
}

.ui-alert-ok {
  border-color: rgba(60, 203, 141, 0.45);
  background: rgba(60, 203, 141, 0.08);
  color: var(--title-light);
}

.ui-alert-warn {
  border-color: rgba(235, 174, 61, 0.45);
  background: rgba(235, 174, 61, 0.08);
}

.ui-alert-risk {
  border-color: rgba(230, 76, 103, 0.45);
  background: rgba(230, 76, 103, 0.08);
}

.stage-panel {
  padding: 1.25rem;
  background: var(--card-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: surface-resolve 0.6s var(--ease-temper);
  }
}

/* ══════════════════════════════ RESPONSIVE ══════════════════════════════ */

@media (max-width: 1024px) {
  .cap-grid,
  .tier-rail,
  .integration-grid,
  .closing-combo,
  .forecast-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .deal-dossier {
    grid-template-columns: 1fr;
  }

  .dossier-margin {
    border-right: none;
    border-top: 1px solid var(--border-light);
  }

  .portfolio-sheet {
    grid-template-columns: 1fr;
  }

  .book-spread {
    grid-template-columns: 1fr;
  }

  .book-page {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

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

@media (max-width: 768px) {
  .nav-main,
  .header-actions .btn:not(.nav-toggle) {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .header-actions .btn-sm.btn-primary {
    display: none;
  }

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

  .pain-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
  }

  .deal-zipper {
    grid-template-columns: 1fr;
  }

  .zipper-track {
    display: none;
  }

  .zipper-side--buyer {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

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

  .cap-grid,
  .tier-rail,
  .integration-grid,
  .closing-combo,
  .forecast-evidence,
  .evidence-rail {
    grid-template-columns: 1fr;
  }

  .deal-surface {
    min-height: 420px;
  }

  .pressure-pin b {
    font-size: 0.5rem;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-hero-actions .btn {
    width: 100%;
  }

  .tempered-hero-top .brand-signal {
    font-size: 2.2rem;
  }

  .surface-status {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ══════════════════════════════ STAGE BRIDGE (pages.py class names) ══════════════════════════════ */

.pain-rail--nine {
  grid-template-columns: repeat(3, 1fr);
}

.pain-rail--nine .pain-cell {
  border-bottom: 1px solid var(--border-dark);
}

.pain-rail--nine .pain-cell:nth-child(3n) {
  border-right: none;
}

@media (max-width: 900px) {
  .pain-rail--nine {
    grid-template-columns: 1fr 1fr;
  }
  .pain-rail--nine .pain-cell:nth-child(3n) {
    border-right: 1px solid var(--border-dark);
  }
  .pain-rail--nine .pain-cell:nth-child(2n) {
    border-right: none;
  }
}

.atlas-rail,
.plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.atlas-link,
.plat-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-light);
  text-decoration: none;
  color: var(--title-light);
  transition: border-color 0.2s, transform 0.2s var(--ease-forge);
}

.section--plum .atlas-link,
.section--iron .atlas-link {
  background: var(--card-dark);
  border-color: var(--border-dark);
  color: var(--title-dark);
}

.atlas-link:hover,
.plat-link:hover {
  border-color: var(--hot-metal);
  transform: translateY(-2px);
  text-decoration: none;
}

.atlas-link b,
.plat-link b {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--title-light);
}

.section--plum .atlas-link b,
.section--iron .atlas-link b {
  color: var(--title-dark);
}

.atlas-link span,
.plat-link span {
  font-size: 0.75rem;
  color: var(--body-light);
  line-height: 1.45;
}

.section--plum .atlas-link span,
.section--iron .atlas-link span {
  color: var(--body-dark);
}

.ai-forge-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.ai-forge-cell {
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-light);
}

.ai-forge-cell b {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--title-light);
}

.ai-forge-cell b.is-miss {
  color: var(--risk);
}

.close-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.cf-node {
  padding: 1rem 0.75rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(91, 36, 73, 0.55);
  text-align: center;
}

.cf-node.is-on {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.3);
}

.cf-node b {
  display: block;
  font-family: var(--font-display);
  color: var(--title-dark);
  margin-bottom: 0.25rem;
}

.cf-node span {
  font-size: 0.6875rem;
  color: var(--body-dark);
}

.team-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.team-pill {
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--title-dark);
  font-weight: 600;
  cursor: pointer;
}

.team-pill.is-on {
  background: var(--hot-metal);
  border-color: var(--hot-metal);
  color: #fff;
}

.team-blurb {
  font-size: 0.9375rem;
  color: var(--body-dark);
  max-width: 42rem;
}

/* Home deal surface stage */
.deal-surface-stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.surface-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.surface-meta-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: rgba(23, 18, 22, 0.35);
  min-width: 8rem;
}

.surface-meta-chip span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--body-dark);
}

.surface-meta-chip b {
  font-size: 0.8125rem;
  color: var(--title-dark);
}

.surface-meta-chip b.is-miss {
  color: var(--decision-yellow);
}

.surface-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 320px);
  gap: 1rem;
  align-items: stretch;
}

.deal-mesh-pane {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-dark);
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(91, 36, 73, 0.65) 0%, transparent 70%),
    linear-gradient(145deg, rgba(74, 22, 58, 0.95) 0%, rgba(91, 36, 73, 0.85) 100%);
  box-shadow: var(--shadow-deal), inset 0 1px 0 rgba(255, 248, 239, 0.08);
  overflow: hidden;
  padding: 1rem;
}

.deal-mesh {
  position: relative;
  height: 340px;
  margin-top: 0.5rem;
  border-radius: var(--radius-lg);
  background-image:
    linear-gradient(rgba(122, 65, 102, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 65, 102, 0.35) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 75%);
}

.mesh-dent {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(23, 18, 22, 0.15), rgba(23, 18, 22, 0.5) 70%);
  box-shadow: inset 0 4px 12px rgba(23, 18, 22, 0.4);
  transition: opacity 0.5s, transform 0.5s;
}

.mesh-dent.is-healed,
.mesh-dent.is-resolved,
.mesh-dent.is-released {
  opacity: 0;
  transform: scale(0.55);
}

.dent-legal { left: 68%; top: 28%; }
.dent-security { left: 72%; top: 55%; }
.dent-proc { left: 48%; top: 68%; }
.dent-budget { left: 22%; top: 48%; }

.deal-mesh .signature-ring {
  width: min(200px, 48%);
}

.signature-ring.is-idle {
  opacity: 0.35;
  border-style: dashed;
}

.signature-ring.is-formed {
  opacity: 1;
  border-style: solid;
  border-color: var(--closing-teal);
  animation: ring-pulse 2.4s ease-in-out infinite;
}

.signature-ring p {
  margin: 0.35rem 0.5rem 0;
  font-size: 0.625rem;
  text-align: center;
  color: rgba(224, 200, 215, 0.75);
  line-height: 1.35;
}

.pressure-rail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pressure-rail .pressure-pin {
  left: var(--px);
  top: var(--py);
  pointer-events: auto;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.pressure-pin span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--title-dark);
  white-space: nowrap;
  background: rgba(23, 18, 22, 0.55);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.pressure-pin em {
  font-style: normal;
  font-size: 0.5rem;
  color: var(--body-dark);
  text-transform: uppercase;
}

.pressure-pin.pin-risk::before {
  background: var(--risk);
  box-shadow: 0 0 0 3px rgba(230, 76, 103, 0.25);
}

.pressure-pin.pin-waiting::before {
  background: var(--waiting);
}

.pressure-pin.pin-idle::before {
  background: var(--deal-blue);
}

.pressure-pin.is-resolved,
.pressure-pin.is-released {
  opacity: 0.35;
  transform: translate(-50%, -50%) scale(0.85);
}

.surface-caption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--body-dark);
}

.surface-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.surface-conditions,
.surface-evidence,
.surface-forecast-preview {
  padding: 0.85rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(23, 18, 22, 0.35);
}

.cond-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.cond-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(122, 65, 102, 0.35);
  color: var(--body-dark);
}

.cond-row b {
  color: var(--title-dark);
  font-weight: 600;
}

.cond-row.cond-risk b { color: var(--risk); }
.cond-row.cond-wait b { color: var(--waiting); }

.surface-evidence ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.surface-evidence li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  padding: 0.3rem 0;
  color: var(--body-dark);
}

.surface-evidence li.is-dim {
  opacity: 0.55;
}

.surface-evidence li em {
  font-style: normal;
  color: var(--closing-teal);
  font-family: var(--font-mono);
  font-size: 0.625rem;
}

.mini-shadow {
  height: 10px;
  margin: 0.65rem 0 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--closing-teal), rgba(244, 91, 60, 0.8));
  width: var(--shadow-len, 60%);
  max-width: 100%;
}

/* Close Book stage */
.close-book-stage {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  padding: 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.book-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  grid-column: 1 / -1;
}

.book-spine {
  width: auto;
  background: transparent;
  border: none;
  padding: 0;
  align-items: stretch;
}

.book-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.close-book-stage .book-page {
  flex: 1 1 28%;
  min-width: 110px;
  padding: 0.85rem 0.75rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--contract-ivory);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--title-light);
  transform: none;
}

.close-book-stage .book-page.is-on {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.25);
}

.close-book-stage .book-page.is-hidden-section {
  opacity: 0.4;
  text-decoration: line-through;
}

.close-book-stage .book-page.bp-risk {
  border-left: 3px solid var(--risk);
}

.close-book-stage .book-page.bp-waiting {
  border-left: 3px solid var(--waiting);
}

.close-book-stage .book-page.bp-missing {
  border-left: 3px solid var(--hot-metal);
}

.close-book-stage .book-page.bp-complete {
  border-left: 3px solid var(--closing-teal);
}

.book-marker {
  position: absolute;
  bottom: 0;
  left: var(--mark, 50%);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--hot-metal);
  box-shadow: var(--shadow-emboss);
}

.book-readout {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #faf6ef;
}

.book-fag {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.fag-col {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--card-light);
}

.fag-col p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--body-light);
  line-height: 1.45;
}

.fag-fact { border-left: 3px solid var(--closing-teal); }
.fag-assume { border-left: 3px solid var(--waiting); }
.fag-gap { border-left: 3px solid var(--risk); }

.book-readout ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.book-readout li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-light);
}

.split-note {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.split-note p {
  font-size: 0.875rem;
  color: var(--body-light);
}

/* Dossier */
.dossier-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 340px);
  gap: 0;
  min-height: 420px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.dossier-margins {
  padding: 1rem;
  background: #faf6ef;
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.margin-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--deal-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card-light);
  cursor: pointer;
}

.margin-chip.is-on {
  border-color: var(--hot-metal);
  border-left-color: var(--hot-metal);
}

.margin-chip b {
  display: block;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.margin-chip span {
  font-size: 0.75rem;
  color: var(--body-light);
}

.margin-chip[data-type="assumption"] { border-left-color: var(--waiting); }
.margin-chip[data-type="contradiction"] { border-left-color: var(--risk); }
.margin-chip[data-type="verified"] { border-left-color: var(--closing-teal); }

.narrative-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.flag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  border-radius: 3px;
  background: rgba(115, 130, 255, 0.12);
  color: var(--title-light);
}

.flag--assume { background: rgba(235, 174, 61, 0.15); color: #9a6a10; }
.flag--contra { background: rgba(230, 76, 103, 0.12); color: var(--risk); }
.flag--ok { background: rgba(60, 203, 141, 0.12); color: #1f8a5a; }

/* Theater */
.theater-stage[data-theater] {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 260px);
  gap: 1rem;
  position: relative;
  min-height: 480px;
  padding: 1.5rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 60% 45% at 50% 45%, rgba(115, 130, 255, 0.12) 0%, transparent 70%),
    var(--card-dark);
  box-shadow: var(--shadow-deal);
}

.theater-stage-floor {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(74, 22, 58, 0.55);
}

.theater-stage-floor h3 {
  color: var(--title-dark);
  margin: 0.35rem 0;
}

.theater-stage-floor p {
  color: var(--body-dark);
  font-size: 0.875rem;
}

.tension-lines {
  width: min(320px, 80%);
  height: 48px;
  margin: 0.5rem auto 0;
}

.tension-line {
  stroke: var(--border-dark);
  stroke-width: 2;
}

.tension-line.is-hot {
  stroke: var(--hot-metal);
}

.theater-seats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.theater-seat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: rgba(91, 36, 73, 0.55);
  color: var(--title-dark);
  cursor: pointer;
  text-align: left;
}

.theater-seat span {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.theater-seat b {
  font-size: 0.8125rem;
}

.seat-empty { border-style: dashed; opacity: 0.7; }
.seat-filled { border-color: var(--closing-teal); }
.seat-tension { border-color: var(--hot-metal); }
.seat-waiting { border-color: var(--waiting); }

.theater-inspect {
  padding: 1rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(23, 18, 22, 0.4);
  color: var(--body-dark);
}

.theater-inspect h4 {
  color: var(--title-dark);
  margin: 0.35rem 0;
}

/* Combination dials */
.dial-vault {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  padding: 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

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

.combo-dial {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 50%;
  border: 3px solid var(--border-light);
  background:
    conic-gradient(var(--closing-teal) 0 var(--dial-val, 40%), rgba(220, 199, 170, 0.45) var(--dial-val, 40%) 100%);
  cursor: pointer;
  position: relative;
}

.combo-dial::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--card-light);
}

.combo-dial span,
.combo-dial b {
  position: relative;
  z-index: 1;
}

.combo-dial span {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--title-light);
}

.combo-dial b {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--hot-metal);
}

.dial-risk { box-shadow: 0 0 0 2px rgba(230, 76, 103, 0.25); }
.dial-wait { box-shadow: 0 0 0 2px rgba(235, 174, 61, 0.25); }

.dial-readout {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #faf6ef;
}

.dial-readout ul {
  list-style: none;
  margin: 0.75rem 0;
  padding: 0;
}

.dial-readout li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
}

/* Zipper */
.zipper-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  min-height: 420px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card-dark);
  box-shadow: var(--shadow-deal);
}

.zip-col {
  padding: 1rem;
}

.zip-buyer { background: rgba(247, 233, 213, 0.08); border-right: 1px solid var(--border-dark); }
.zip-seller { background: rgba(115, 130, 255, 0.08); border-left: 1px solid var(--border-dark); }

.zip-track {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zip-tooth {
  padding: 0.75rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: rgba(91, 36, 73, 0.55);
  color: var(--title-dark);
}

.zip-tooth b {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.2rem;
}

.zip-tooth > span {
  font-size: 0.75rem;
  color: var(--body-dark);
}

.zip-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  margin-top: 0.55rem;
  font-size: 0.6875rem;
}

.zip-meta em {
  font-style: normal;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--body-dark);
  opacity: 0.75;
}

.zip-meta strong {
  font-weight: 600;
  color: var(--title-dark);
}

.tooth-matched { border-color: var(--closing-teal); }
.tooth-stall { border-color: var(--risk); }
.tooth-open { border-color: var(--waiting); }

.zip-center {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 0.35rem;
  background: linear-gradient(180deg, #5b2449, #3a1230);
  text-align: center;
}

.zip-pull {
  width: 22px;
  height: var(--zip-progress, 42%);
  min-height: 48px;
  max-height: 85%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--hot-metal), #c9442a);
  box-shadow: var(--shadow-emboss);
  margin: 0.5rem 0;
  transition: height 0.45s var(--ease-forge);
}

.zip-center p {
  font-size: 0.625rem;
  color: var(--body-dark);
  line-height: 1.35;
  margin-top: 0.5rem;
}

/* Term fabric stage */
.term-fabric-stage {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 1rem;
  min-height: 420px;
  padding: 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.fabric-loom {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at center, rgba(244, 91, 60, 0.06), transparent 60%), var(--contract-ivory);
  overflow: hidden;
}

.fabric-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fabric-nodes {
  position: absolute;
  inset: 0;
}

.fabric-node {
  position: absolute;
  left: calc(18% + var(--fx, 0) * 28%);
  top: calc(16% + var(--fy, 0) * 28%);
  transform: translate(-50%, -50%);
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--card-light);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8125rem;
  box-shadow: var(--shadow-soft);
}

.fabric-readout {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #faf6ef;
}

.fabric-readout ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.fabric-readout li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
}

/* Deal room table stage */
.deal-table-stage {
  position: relative;
  min-height: 480px;
  padding: 3.75rem 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(247, 233, 213, 0.55) 0%, rgba(255, 252, 246, 0.95) 18%, rgba(255, 252, 246, 0.95) 82%, rgba(115, 130, 255, 0.08) 100%);
  box-shadow: var(--shadow-deal);
}

.table-buyer { top: 0.65rem; }
.table-seller { bottom: 0.65rem; }

.table-edge .mono-label {
  width: 100%;
  margin-bottom: 0.25rem;
}

.edge-task {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--title-light);
}

.table-surface {
  position: relative;
  min-height: 320px;
}

.table-artifact {
  left: var(--ax, 50%);
  top: 42%;
}

.table-artifact[data-edge="bottom"] {
  top: 68%;
}

.table-agenda {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 70%);
  padding: 1rem;
  text-align: center;
  background: rgba(255, 252, 246, 0.92);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  z-index: 1;
}

/* Forecast shadow stage */
.forecast-shadow-stage {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  padding: 1.25rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--card-light);
  box-shadow: var(--shadow-deal);
}

.fc-track {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.forecast-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--contract-ivory);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.forecast-row::after {
  content: "";
  position: absolute;
  left: 28%;
  top: 0;
  bottom: 0;
  width: var(--shadow-len, 50%);
  background: linear-gradient(90deg, rgba(66, 214, 199, 0.25), rgba(244, 91, 60, 0.35));
  pointer-events: none;
}

.forecast-row span,
.forecast-row b,
.forecast-row em {
  position: relative;
  z-index: 1;
}

.forecast-row em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--hot-metal);
}

.fc-inspect {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #faf6ef;
}

.fc-inspect ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: var(--body-light);
}

/* State machine */
.state-machine {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 1rem;
  padding: 1.25rem;
  border: 1.5px solid #2a2228;
  border-radius: var(--radius-xl);
  background: var(--iron-black);
  color: var(--body-dark);
}

.sm-lane .mono-label,
.sm-live .mono-label {
  color: var(--closing-teal);
}

.sm-states,
.sm-events {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.sm-node,
.sm-event {
  padding: 0.65rem 0.75rem;
  border: 1px solid #3a3036;
  border-radius: var(--radius-sm);
  background: #221c20;
  color: var(--title-dark);
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
}

.sm-node.is-on {
  border-color: var(--closing-teal);
  box-shadow: 0 0 0 1px rgba(66, 214, 199, 0.25);
}

.sm-live pre {
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: #151014;
  color: var(--decision-yellow);
  font-size: 0.6875rem;
  overflow-x: auto;
}

.sm-arrows {
  width: 100%;
  height: 120px;
  opacity: 0.45;
}

.code-panel {
  padding: 1rem;
  border: 1px solid #3a3036;
  border-radius: var(--radius);
  background: #151014;
}

.code-panel pre {
  margin: 0.5rem 0 0;
  color: var(--closing-teal);
  font-size: 0.75rem;
  overflow-x: auto;
}

/* Pricing portfolio */
.portfolio-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.portfolio-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-light);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.portfolio-field.pf-2 {
  grid-column: span 2;
}

.portfolio-field span {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--body-light);
}

.portfolio-field b {
  font-size: 1.125rem;
  color: var(--title-light);
}

.portfolio-field em {
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--hot-metal);
}

.tier-panel {
  background: var(--contract-ivory);
}

.tier-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--title-light);
  margin: 0.35rem 0 0.75rem;
}

.tier-price span {
  font-size: 0.875rem;
  color: var(--body-light);
}

.tier-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.tier-compare > div {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-light);
}

.tier-compare h4 {
  margin-bottom: 0.35rem;
}

.tier-compare p {
  font-size: 0.8125rem;
  color: var(--body-light);
}

.integ-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.integ-list li {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--card-light);
}

.integ-list b {
  display: block;
  margin-bottom: 0.35rem;
}

.integ-list span {
  font-size: 0.8125rem;
  color: var(--body-light);
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.keyword-row li {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--title-light);
  background: var(--card-light);
}

.anatomy {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.anatomy li {
  margin-bottom: 0.5rem;
  color: var(--body-light);
}

.about-block .tagline-exact {
  margin: 1rem 0;
}

.is-flash {
  animation: ring-pulse 0.6s ease;
}

@media (max-width: 960px) {
  .surface-body,
  .close-book-stage,
  .dossier-stage,
  .theater-stage[data-theater],
  .dial-vault,
  .zipper-stage,
  .term-fabric-stage,
  .forecast-shadow-stage,
  .state-machine,
  .portfolio-sheet,
  .ai-forge-rail,
  .close-flow,
  .split-note,
  .tier-compare {
    grid-template-columns: 1fr;
  }

  .zip-center {
    width: 100%;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .zip-pull {
    width: var(--zip-progress, 42%);
    height: 12px;
    min-height: 12px;
  }

  .theater-seats,
  .dial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sm-mid { display: flex; flex-direction: column; gap: 0.5rem; }

/* ══════════════════════════════ V2 STAGES — readable Close Book / Theater / Forecast ══════════════════════════════ */

/* Light panels inside dark sections must reset inherited light text */
.section--plum .close-book-stage,
.section--iron .close-book-stage,
.section--plum .forecast-shadow-stage,
.section--iron .forecast-shadow-stage,
.section--plum .dial-vault,
.section--iron .dial-vault,
.section--plum .term-fabric-stage,
.section--iron .term-fabric-stage,
.section--plum .dossier-stage,
.section--iron .dossier-stage,
.section--plum .deal-table-stage,
.section--iron .deal-table-stage {
  color: var(--title-light);
}

.section--plum .forecast-shadow-stage .mono-label,
.section--iron .forecast-shadow-stage .mono-label,
.section--plum .close-book-stage .mono-label,
.section--iron .close-book-stage .mono-label {
  color: var(--body-light);
}

/* Neutralize legacy vertical spine label rule inside Close Book */
.close-book-stage .book-spine,
.close-book-stage .book-spine span,
.book-leaves span,
.book-leaf span {
  writing-mode: horizontal-tb !important;
  transform: none !important;
  color: inherit;
}

.close-book-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: #fffdf9;
  box-shadow: var(--shadow-deal);
  color: var(--title-light);
}

.close-book-stage .book-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  grid-column: auto;
}

.book-deal-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hot-metal);
}

.book-phase {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--title-light);
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

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

.book-leaf {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 96px;
  padding: 0.9rem 0.95rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--contract-ivory);
  cursor: pointer;
  text-align: left;
  color: var(--title-light);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.book-leaf:hover {
  border-color: #c4a888;
  transform: translateY(-1px);
}

.book-leaf.is-on {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.28), var(--shadow-soft);
  background: #fff;
}

.book-leaf-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--title-light) !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  line-height: 1.2;
}

.book-leaf-status {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body-light) !important;
  writing-mode: horizontal-tb !important;
}

.book-leaf.bp-complete { border-left: 4px solid var(--closing-teal); }
.book-leaf.bp-waiting { border-left: 4px solid var(--waiting); }
.book-leaf.bp-risk { border-left: 4px solid var(--risk); }
.book-leaf.bp-missing { border-left: 4px solid var(--hot-metal); }
.book-leaf.is-hidden-section {
  opacity: 0.45;
  text-decoration: line-through;
}

.close-book-stage .book-readout {
  padding: 1.1rem 1.15rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
  color: var(--title-light);
}

.book-readout-kicker,
.fag-label,
.fc-panel-label,
.theater-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kicker-light);
  margin-bottom: 0.5rem;
}

.close-book-stage .book-readout h3 {
  color: var(--title-light);
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.book-readout-detail {
  font-size: 0.9375rem;
  color: #261c23;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.close-book-stage .book-fag {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.close-book-stage .fag-col {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--contract-ivory);
}

.close-book-stage .fag-col p {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: #261c23;
  line-height: 1.45;
  font-weight: 500;
}

.book-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-metrics li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: #3a3438;
}

.book-metrics b {
  color: #261c23;
  font-weight: 700;
}

.split-note {
  color: #261c23;
}

.split-note p {
  color: #3a3438;
}

.split-note strong {
  color: #261c23;
}

/* Decision Theater — clean 3-zone board */
.decision-theater {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  grid-template-areas:
    "stage stage"
    "cast inspect";
  gap: 1rem;
  padding: 1.35rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(115, 130, 255, 0.14), transparent 55%),
    #3d1230;
  box-shadow: var(--shadow-deal);
  color: var(--title-dark);
}

.theater-stage-board {
  grid-area: stage;
  text-align: center;
  padding: 1.25rem 1.5rem;
  border: 1.5px solid rgba(154, 95, 132, 0.65);
  border-radius: var(--radius-lg);
  background: rgba(23, 18, 22, 0.45);
}

.theater-stage-board .theater-kicker {
  color: var(--decision-yellow);
}

.theater-stage-board h3 {
  color: var(--title-dark);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin: 0.35rem 0 0.5rem;
}

.theater-status {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--body-dark);
}

.theater-tension {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.tension-chip {
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(154, 95, 132, 0.7);
  color: var(--body-dark);
  background: rgba(91, 36, 73, 0.55);
}

.tension-chip.is-hot,
.theater-tension.is-hot .tension-chip.is-hot {
  border-color: var(--hot-metal);
  color: #fff;
  background: rgba(244, 91, 60, 0.28);
}

.theater-cast {
  grid-area: cast;
}

.theater-cast .theater-kicker,
.theater-inspect .theater-kicker {
  color: var(--decision-yellow);
}

.decision-theater .theater-seats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.decision-theater .theater-seat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-height: 92px;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid rgba(154, 95, 132, 0.75);
  border-radius: var(--radius);
  background: rgba(91, 36, 73, 0.72);
  color: var(--title-dark);
  cursor: pointer;
  text-align: left;
}

.decision-theater .theater-seat:hover,
.decision-theater .theater-seat.is-on {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.35);
}

.seat-role {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 220, 232, 0.85);
}

.seat-who {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.seat-state {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--closing-teal);
}

.decision-theater .seat-empty {
  border-style: dashed;
  opacity: 1;
  background: rgba(23, 18, 22, 0.35);
}

.decision-theater .seat-empty .seat-state { color: rgba(240, 220, 232, 0.65); }
.decision-theater .seat-filled { border-color: var(--closing-teal); }
.decision-theater .seat-tension { border-color: var(--hot-metal); }
.decision-theater .seat-waiting .seat-state { color: var(--waiting); }

.decision-theater .theater-inspect {
  grid-area: inspect;
  padding: 1rem 1.1rem;
  border: 1.5px solid rgba(154, 95, 132, 0.75);
  border-radius: var(--radius);
  background: rgba(23, 18, 22, 0.5);
  color: var(--body-dark);
}

.decision-theater .theater-inspect h4 {
  color: #fff;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  margin: 0.25rem 0 0.55rem;
}

.theater-inspect-detail,
.theater-inspect-influence {
  margin: 0 0 0.55rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--body-dark);
}

.theater-inspect-influence {
  font-weight: 600;
  color: var(--decision-yellow);
}

/* Forecast Shadow — high contrast on light panel */
.forecast-shadow-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr);
  gap: 1.15rem;
  padding: 1.35rem 1.4rem;
  border: 1.5px solid rgba(220, 199, 170, 0.55);
  border-radius: var(--radius-xl);
  background: #fffdf9;
  box-shadow: var(--shadow-deal);
  color: var(--title-light);
}

.forecast-shadow-stage .fc-panel-label {
  color: var(--kicker-light);
}

.fc-track {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.55rem;
}

.forecast-row {
  position: relative;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: var(--title-light);
}

.forecast-row::after {
  content: none;
}

.forecast-row .fc-bar {
  position: absolute;
  left: 6.5rem;
  right: 0.85rem;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(66, 214, 199, 0.35), rgba(244, 91, 60, 0.55));
  width: calc((100% - 8rem) * var(--shadow-len, 50%) / 100%);
  max-width: calc(100% - 8rem);
  pointer-events: none;
  z-index: 0;
}

.forecast-row .fc-id,
.forecast-row .fc-crm,
.forecast-row .fc-shadow {
  position: relative;
  z-index: 1;
}

.forecast-row .fc-id {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--title-light);
}

.forecast-row .fc-crm {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--title-light);
}

.forecast-row .fc-shadow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hot-metal);
  white-space: nowrap;
}

.forecast-row.is-on,
.forecast-row:hover {
  border-color: var(--hot-metal);
  box-shadow: 0 0 0 1px rgba(244, 91, 60, 0.2);
}

.forecast-shadow-stage .fc-inspect {
  padding: 1.05rem 1.1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  background: #fff;
  color: #261c23;
}

.forecast-shadow-stage .fc-inspect h3,
.forecast-shadow-stage .fc-inspect p,
.forecast-shadow-stage .fc-inspect li,
.forecast-shadow-stage .fc-crm-line,
.forecast-shadow-stage .fc-evidence-line,
.fc-crm-line,
.fc-evidence-line {
  color: #261c23 !important;
}

.forecast-shadow-stage .fc-inspect h3 {
  margin: 0.15rem 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.fc-crm-line,
.fc-evidence-line {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 500;
}

.fc-steps {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.fc-steps li {
  position: relative;
  padding: 0.45rem 0 0.45rem 0.95rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: #261c23 !important;
  line-height: 1.45;
  font-weight: 500;
}

.fc-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot-metal);
}

/* Light panels inside dark sections — readable body copy */
.section--iron .forecast-shadow-stage,
.section--plum .forecast-shadow-stage,
.section--iron .close-book-stage,
.section--plum .close-book-stage,
.section--iron .dial-vault,
.section--plum .dial-vault,
.section--iron .term-fabric-stage,
.section--plum .term-fabric-stage,
.section--iron .dossier-stage,
.section--plum .dossier-stage {
  color: #261c23;
}

.section--iron .forecast-shadow-stage p,
.section--plum .forecast-shadow-stage p,
.section--iron .close-book-stage p,
.section--plum .close-book-stage p,
.section--iron .dial-vault p,
.section--plum .dial-vault p,
.section--iron .term-fabric-stage p,
.section--plum .term-fabric-stage p,
.section--iron .dossier-stage p,
.section--plum .dossier-stage p,
.dial-readout p,
.fabric-readout p,
.dossier-narrative p,
.book-readout-detail,
.close-book-stage .fag-col p {
  color: #261c23 !important;
}

.forecast-row .fc-id,
.forecast-row .fc-crm {
  color: #261c23 !important;
}


@media (max-width: 900px) {
  .book-layout,
  .decision-theater,
  .forecast-shadow-stage {
    grid-template-columns: 1fr;
  }

  .decision-theater {
    grid-template-areas:
      "stage"
      "cast"
      "inspect";
  }

  .book-leaves,
  .decision-theater .theater-seats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-row {
    grid-template-columns: 1fr auto;
  }

  .forecast-row .fc-crm {
    grid-column: 1 / -1;
  }

  .forecast-row .fc-bar {
    left: 1rem;
    width: calc(100% * var(--shadow-len, 50%) / 100% - 2rem);
    max-width: calc(100% - 2rem);
    top: auto;
    bottom: 0.55rem;
    transform: none;
  }
}
