:root {
  --ink: #121820;
  --paper: #f4f1ea;
  --white: #ffffff;
  --teal: #0c665c;
  --teal-dark: #073f3a;
  --coral: #ef6a50;
  --yellow: #f2c84b;
  --line: rgba(18, 24, 32, 0.18);
  --muted: #5f6a70;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Segoe UI", Arial, sans-serif; letter-spacing: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; background: var(--white); padding: 12px 16px; }
.skip-link:focus { top: 16px; }

.topbar { min-height: 68px; padding: 0 3.5vw; display: flex; align-items: center; gap: 32px; background: rgba(244, 241, 234, 0.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--white); font-size: 12px; }
.topbar nav { display: flex; gap: 24px; margin-left: auto; }
.topbar nav a, .back-link { color: #39434a; text-decoration: none; font-size: 14px; }
.topbar nav a:hover, .back-link:hover { color: var(--teal); }
.system-state { border-left: 1px solid var(--line); padding-left: 24px; font-size: 13px; font-weight: 700; }
.system-state i { display: inline-block; width: 8px; height: 8px; background: var(--teal); border-radius: 50%; margin-right: 8px; }

.hero { min-height: min(820px, calc(100vh - 68px)); position: relative; overflow: hidden; display: flex; align-items: flex-end; color: var(--white); background: #172128; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 17, 21, .92) 0%, rgba(8, 17, 21, .68) 42%, rgba(8, 17, 21, .08) 72%), linear-gradient(0deg, rgba(8, 17, 21, .66), transparent 42%); }
.hero-content { position: relative; width: min(720px, 92vw); padding: 8vh 0 6vh 6vw; }
.eyebrow { margin: 0 0 14px; color: #9de4d4; text-transform: uppercase; font-weight: 800; font-size: 12px; }
.eyebrow.dark { color: var(--teal); }
.eyebrow.light { color: #92d8ca; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 740px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 7.4vw, 104px); line-height: .92; font-weight: 500; }
.hero-copy { max-width: 610px; margin: 28px 0 0; color: #d6e0df; font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 2px; text-decoration: none; cursor: pointer; font-weight: 800; }
.button.primary { background: var(--coral); color: var(--white); }
.button.primary:hover { background: #d9533d; }
.button.secondary { border-color: rgba(255,255,255,.62); color: var(--white); background: rgba(12, 25, 30, .2); }
.hero-metrics { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 18px; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.28); }
.hero-metrics span { display: flex; flex-direction: column; gap: 4px; color: #c0ccca; font-size: 12px; }
.hero-metrics strong { color: var(--white); font-size: 25px; }

.band { padding: 96px 6vw; }
.section-heading { max-width: 780px; }
.section-heading.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 520px); gap: 64px; align-items: end; }
.section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 68px); line-height: 1; font-weight: 500; }
.section-heading p:not(.eyebrow) { color: var(--muted); line-height: 1.7; font-size: 17px; }
.pipeline { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pipeline li { min-height: 116px; padding: 20px 12px; border-right: 1px solid var(--line); font-weight: 800; display: flex; flex-direction: column; justify-content: space-between; }
.pipeline li:last-child { border-right: 0; }
.pipeline span { color: var(--coral); font-size: 12px; }

.positions { background: var(--white); }
.filters { display: flex; justify-content: flex-end; gap: 12px; }
.filters label { color: var(--muted); font-size: 12px; font-weight: 700; }
.filters select { display: block; min-width: 160px; margin-top: 7px; border: 1px solid var(--line); background: var(--white); padding: 11px 34px 11px 12px; border-radius: 2px; }
.position-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.position-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 340px; display: flex; flex-direction: column; }
.position-topline { display: flex; justify-content: space-between; gap: 12px; }
.priority, .validation { font-size: 11px; font-weight: 900; text-transform: uppercase; }
.priority { color: var(--coral); }
.validation.blocked { color: #a73828; }
.validation.pass_with_warnings { color: #83610d; }
.validation.pass { color: var(--teal); }
.position-org { margin: 38px 0 8px; color: var(--teal); font-size: 13px; font-weight: 800; }
.position-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 32px; font-weight: 500; }
.position-card > p:last-of-type { color: var(--muted); }
.readiness-line { margin-top: auto; display: flex; justify-content: space-between; font-size: 13px; }
.readiness-track { height: 5px; margin: 10px 0 24px; background: #e4e3df; }
.readiness-track i { display: block; height: 100%; background: var(--teal); }
.position-card dl { display: grid; grid-template-columns: 1.4fr .7fr 1fr; margin: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.position-card dl div { min-width: 0; }
.position-card dt { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 800; }
.position-card dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 60px 0; color: var(--muted); }

.profile { color: var(--white); background: var(--teal-dark); }
.profile .section-heading p:not(.eyebrow) { color: #bad1cd; }
.profile-layout { margin-top: 52px; display: grid; grid-template-columns: minmax(280px, .7fr) 1.3fr; gap: 80px; }
.profile-score { border-top: 1px solid rgba(255,255,255,.24); padding-top: 24px; display: flex; flex-direction: column; }
.profile-score strong { color: var(--yellow); font-family: Georgia, serif; font-size: 92px; font-weight: 500; }
.profile-score span { font-size: 18px; }
.profile-score small { margin-top: 18px; color: #9db8b3; }
.category-list { display: grid; grid-template-columns: repeat(2, 1fr); }
.category-list div { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; gap: 24px; }
.category-list span { color: #c8d8d5; }
.category-list strong { color: var(--yellow); }

.agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; margin-top: 56px; }
.agent-card { display: grid; grid-template-columns: minmax(210px, .9fr) minmax(220px, 1.1fr); min-height: 560px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); overflow: hidden; }
.agent-image { min-height: 560px; overflow: hidden; background: #cbd9d7; }
.agent-image img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: transform .35s ease; }
.agent-image:hover img { transform: scale(1.015); }
.agent-copy { padding: 32px; display: flex; flex-direction: column; }
.agent-copy > span { color: var(--coral); font-weight: 900; }
.agent-copy > p:first-of-type { margin-top: auto; color: var(--teal); font-weight: 800; }
.agent-copy h3 { margin: 8px 0 10px; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.agent-copy p { color: var(--muted); line-height: 1.6; }
.agent-copy a { margin-top: 18px; color: var(--teal); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.new-application { color: var(--white); background: #192127; }
.new-application .section-heading p:not(.eyebrow) { color: #b9c3c6; }
.command-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; }
#command-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#command-form label { font-size: 12px; color: #b8c2c5; font-weight: 700; }
#command-form input { width: 100%; display: block; margin-top: 7px; padding: 13px; color: var(--white); background: #11181d; border: 1px solid #445158; border-radius: 2px; }
#command-form .button { align-self: end; }
.command-output { grid-column: 1 / -1; min-height: 78px; padding: 18px; border: 1px solid #445158; background: #10161a; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.command-output code { color: #9de4d4; overflow-wrap: anywhere; }
.copy-button { border: 0; color: var(--white); background: transparent; text-decoration: underline; cursor: pointer; }

.handoff-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 52px; background: var(--line); border: 1px solid var(--line); }
.handoff-flow article { min-height: 220px; padding: 24px; background: var(--paper); }
.handoff-flow span { color: var(--coral); font-size: 12px; font-weight: 900; }
.handoff-flow h3 { margin: 56px 0 8px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.handoff-flow p { color: var(--muted); line-height: 1.55; }

footer { min-height: 120px; padding: 32px 6vw; display: flex; align-items: center; gap: 40px; color: #bac4c5; background: #0d1317; }
footer p { margin-left: auto; }
.footer-brand { color: var(--white); }

.agent-page { background: var(--white); }
.agent-page .topbar { position: static; }
.agent-page .back-link { margin-left: auto; }
.agent-profile { min-height: calc(100vh - 68px); display: grid; grid-template-columns: minmax(420px, .95fr) minmax(480px, 1.05fr); }
.agent-profile.reverse .agent-profile-image { order: 2; }
.agent-profile-image { height: calc(100vh - 68px); min-height: 620px; position: sticky; top: 68px; align-self: start; background: #dfe7e5; overflow: hidden; }
.agent-profile-image img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.agent-profile-copy { padding: clamp(48px, 7vw, 108px); align-self: center; }
.agent-profile-copy h1 { color: var(--ink); font-size: clamp(52px, 6vw, 86px); }
.agent-profile-copy .lead { color: var(--muted); font-size: 19px; line-height: 1.7; }
.agent-profile-copy dl { margin: 42px 0; border-top: 1px solid var(--line); }
.agent-profile-copy dl div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.agent-profile-copy dt { color: var(--teal); font-weight: 900; }
.agent-profile-copy dd { margin: 0; }
.agent-profile-copy h2 { font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.agent-profile-copy li { margin: 10px 0; line-height: 1.5; }

@media (max-width: 1000px) {
  .topbar nav { display: none; }
  .system-state { margin-left: auto; }
  .hero-content { padding-left: 5vw; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .pipeline li:nth-child(4) { border-right: 0; }
  .position-grid, .agent-grid { grid-template-columns: 1fr; }
  .section-heading.split, .command-layout { grid-template-columns: 1fr; gap: 28px; }
  .filters { justify-content: flex-start; }
  .handoff-flow { grid-template-columns: repeat(2, 1fr); }
  .agent-profile { grid-template-columns: 1fr; }
  .agent-profile.reverse .agent-profile-image { order: 0; }
  .agent-profile-image { min-height: 70vh; height: 70vh; position: static; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 18px; }
  .system-state { font-size: 0; border: 0; padding: 0; }
  .system-state i { margin: 0; }
  .hero { min-height: 760px; }
  .hero-image { object-position: 62% top; }
  .hero-overlay { background: linear-gradient(0deg, rgba(8,17,21,.96) 0%, rgba(8,17,21,.74) 60%, rgba(8,17,21,.18) 100%); }
  .hero-content { width: 100%; padding: 0 20px 28px; }
  h1 { font-size: 49px; }
  .hero-copy { font-size: 15px; }
  .hero-actions .button { flex: 1 1 180px; }
  .hero-metrics { margin-top: 24px; gap: 10px; }
  .band { padding: 70px 20px; }
  .section-heading h2 { font-size: 40px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li { border-bottom: 1px solid var(--line); }
  .pipeline li:nth-child(even) { border-right: 0; }
  .filters { flex-direction: column; }
  .filters select { width: 100%; }
  .position-card { padding: 22px; }
  .position-card dl { grid-template-columns: 1fr 1fr; gap: 16px; }
  .profile-layout { grid-template-columns: 1fr; gap: 38px; }
  .category-list { grid-template-columns: 1fr; }
  .agent-card { grid-template-columns: 1fr; }
  .agent-image { min-height: 620px; height: 620px; }
  .agent-copy { min-height: 330px; }
  #command-form { grid-template-columns: 1fr; }
  .command-output { align-items: flex-start; flex-direction: column; }
  .handoff-flow { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  footer p { margin-left: 0; }
  .agent-profile-image { min-height: 72vh; height: 72vh; }
  .agent-profile-copy { padding: 54px 20px; }
  .agent-profile-copy h1 { font-size: 50px; }
  .agent-profile-copy dl div { grid-template-columns: 1fr; gap: 6px; }
}
