:root {
  --paper: #f4f7f5;
  --paper-deep: #e6ece8;
  --ink: #17272d;
  --muted: #607077;
  --line: #c8d4cf;
  --blue: #184f91;
  --blue-soft: #dce9f7;
  --forest: #26705e;
  --marigold: #f0b544;
  --coral: #cb654f;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(23, 39, 45, 0.11);
  --display: "Newsreader", Georgia, serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 79, 145, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(24, 79, 145, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--paper);
  font-family: var(--body);
  min-height: 100vh;
}

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

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 181, 68, 0.9);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
  z-index: 99;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  align-items: end;
  padding: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.brand-mark i {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--white);
}

.brand-mark i:nth-child(2) {
  height: 14px;
  background: var(--marigold);
}

.brand-mark i:nth-child(3) {
  height: 10px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.system-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.system-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 5px rgba(38, 112, 94, 0.1);
}

main {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  column-gap: clamp(40px, 8vw, 150px);
  padding: clamp(48px, 7vw, 100px) 0 46px;
  align-items: end;
}

.intro-kicker,
.step-label,
.section-label,
.result-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--blue);
}

.intro-kicker {
  grid-column: 1 / -1;
  margin-bottom: 18px;
}

.intro h1 {
  margin: 0;
  max-width: 930px;
  font-family: var(--display);
  font-size: clamp(48px, 6.3vw, 102px);
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: -0.055em;
}

.intro > p {
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.65;
  margin: 0 0 24px;
  color: var(--muted);
}

.principle-row {
  grid-column: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.principle-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(330px, 0.37fr) minmax(560px, 0.63fr);
  min-height: 780px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: clip;
}

.intake-panel,
.conference-panel {
  padding: clamp(28px, 3.2vw, 52px);
}

.intake-panel {
  background: rgba(255, 255, 255, 0.68);
  border-right: 1px solid var(--line);
}

.panel-heading,
.conference-topline,
.result-header,
.email-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.panel-heading h2,
.conference-topline h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(25px, 2vw, 34px);
  letter-spacing: -0.035em;
}

.text-button,
.copy-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 2px 0;
  color: var(--blue);
  background: none;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

form {
  margin-top: 37px;
}

.field {
  display: block;
  margin-bottom: 23px;
}

.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.field textarea,
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(244, 247, 245, 0.72);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.field textarea {
  min-height: 137px;
  resize: vertical;
  padding: 16px;
  line-height: 1.55;
}

.field input,
.field select {
  min-height: 51px;
  padding: 0 14px;
}

.field textarea:hover,
.field input:hover,
.field select:hover,
.field textarea:focus,
.field input:focus,
.field select:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(24, 79, 145, 0.08);
}

.field small {
  display: block;
  text-align: right;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.field small b {
  font-weight: 400;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.primary-button {
  width: 100%;
  min-height: 60px;
  margin-top: 3px;
  padding: 0 20px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: var(--blue);
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(24, 79, 145, 0.22);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #123f76;
  box-shadow: 0 14px 30px rgba(24, 79, 145, 0.28);
}

.primary-button:disabled {
  cursor: wait;
  transform: none;
  opacity: 0.75;
}

.primary-button svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.privacy-note {
  margin: 14px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted);
}

.conference-panel {
  position: relative;
  background:
    radial-gradient(circle at 50% 24%, rgba(220, 233, 247, 0.62), transparent 33%),
    var(--paper);
}

.run-mode {
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.run-mode.live {
  color: var(--forest);
  border-color: rgba(38, 112, 94, 0.4);
}

.conference-table {
  position: relative;
  margin-top: 35px;
  min-height: 292px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.table-axis {
  position: absolute;
  inset: 50% 24px auto;
  border-top: 1px dashed rgba(24, 79, 145, 0.28);
}

.table-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75px;
  height: 75px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--blue);
  box-shadow: 0 0 0 10px rgba(220, 233, 247, 0.85);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.35;
  text-transform: uppercase;
  z-index: 3;
}

.agent-card {
  position: relative;
  min-height: 132px;
  padding: 20px 74px 20px 20px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-content: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.agent-card:nth-child(even) {
  padding-left: 72px;
  padding-right: 20px;
}

.agent-index {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--blue);
}

.agent-card h3 {
  margin: -4px 0 6px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.agent-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.agent-state {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 6px;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 7px;
  text-transform: uppercase;
}

.agent-card:nth-child(even) .agent-state {
  right: auto;
  left: 12px;
}

.agent-card.working {
  border-color: var(--marigold);
  transform: translateY(-2px);
  box-shadow: 0 9px 26px rgba(240, 181, 68, 0.12);
}

.agent-card.working .agent-state {
  color: #6f4a05;
  background: #fff2d6;
}

.agent-card.complete {
  border-color: rgba(38, 112, 94, 0.45);
}

.agent-card.complete .agent-state {
  color: var(--forest);
  background: #e3f1ed;
}

.agent-card.synthesis {
  background: rgba(220, 233, 247, 0.55);
}

.empty-state {
  margin: 37px auto 0;
  max-width: 430px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.empty-rule {
  width: 38px;
  margin: 0 auto 14px;
  border-top: 2px solid var(--marigold);
}

.result {
  margin-top: 45px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  animation: reveal 520ms ease both;
}

.result-header h2 {
  margin: 9px 0 8px;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.result-header p {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.first-move {
  margin: 28px 0 36px;
  padding: 18px 21px;
  display: grid;
  grid-template-columns: 105px 1fr;
  align-items: start;
  background: var(--ink);
  color: var(--white);
}

.first-move span {
  padding-top: 3px;
  color: var(--marigold);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.first-move p {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
}

.section-label {
  margin-bottom: 14px;
}

.agent-findings,
.plan-section,
.result-columns,
.email-card {
  margin-top: 35px;
}

.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.finding {
  padding: 16px;
  border-top: 2px solid var(--blue);
  background: var(--white);
}

.finding:nth-child(2) {
  border-color: var(--forest);
}

.finding:nth-child(3) {
  border-color: var(--coral);
}

.finding strong {
  display: block;
  margin-bottom: 7px;
  font-family: var(--display);
  font-size: 16px;
}

.finding p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.week-list {
  border-top: 1px solid var(--ink);
}

.week-row {
  display: grid;
  grid-template-columns: 78px minmax(140px, 0.55fr) 1fr;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.week-number {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
}

.week-row h3 {
  margin: -4px 0 4px;
  font-family: var(--display);
  font-size: 20px;
}

.week-row > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.week-row ul {
  margin: 0;
  padding-left: 17px;
  font-size: 11px;
  line-height: 1.6;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.result-block {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.opportunity {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.opportunity strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 17px;
}

.opportunity p,
.opportunity small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.opportunity small {
  margin-top: 5px;
  color: var(--blue);
}

.question-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: questions;
}

.question-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  counter-increment: questions;
}

.question-list li::before {
  content: counter(questions, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--coral);
  font-family: var(--mono);
  font-size: 8px;
}

.email-card {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 7px 7px 0 var(--blue-soft);
}

.email-topline strong {
  font-family: var(--display);
  font-size: 18px;
}

.email-topline > span {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.email-card > p {
  margin: 19px 0 0;
  color: var(--muted);
  white-space: pre-line;
  font-size: 11px;
  line-height: 1.65;
}

.result-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

#guardrails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#guardrails span {
  padding: 5px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 8px;
}

#generation-meta {
  margin: 13px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.error-card {
  margin-top: 38px;
  padding: 18px;
  color: #742b1d;
  background: #fae7e2;
  border-left: 3px solid var(--coral);
}

.error-card p {
  margin: 5px 0 0;
  font-size: 11px;
}

.method-strip {
  margin: 36px 0 0;
  padding: 21px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-strip i {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.method-strip small {
  color: var(--marigold);
  font-size: 8px;
}

.site-footer {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 45px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 10px rgba(220, 233, 247, 0.85); }
  50% { box-shadow: 0 0 0 18px rgba(220, 233, 247, 0.25); }
}

.conference-table.running .table-center {
  animation: breathe 1.5s ease-in-out infinite;
}

@media (max-width: 1050px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .intro > p,
  .principle-row {
    grid-column: 1;
    max-width: 650px;
  }

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

  .intake-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1500px);
  }

  .edition {
    display: none;
  }

  .intro {
    padding-top: 48px;
  }

  .intro h1 {
    font-size: clamp(45px, 15vw, 66px);
  }

  .intake-panel,
  .conference-panel {
    padding: 26px 20px;
  }

  .field-grid,
  .conference-table,
  .finding-grid,
  .result-columns {
    grid-template-columns: 1fr;
  }

  .conference-table {
    min-height: auto;
  }

  .agent-card,
  .agent-card:nth-child(even) {
    min-height: 105px;
    padding: 17px 65px 17px 17px;
  }

  .agent-card:nth-child(even) .agent-state {
    right: 12px;
    left: auto;
  }

  .table-center,
  .table-axis {
    display: none;
  }

  .week-row {
    grid-template-columns: 60px 1fr;
  }

  .week-row ul {
    grid-column: 2;
  }

  .first-move {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .method-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .method-strip i {
    width: 40px;
    flex: none;
  }

  .site-footer {
    gap: 14px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
