@import 'tailwindcss';

:root {
  --background: #101413;
  --foreground: #f3efe7;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(243, 239, 231, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 231, 0.014) 1px, transparent 1px),
    var(--background);
  background-size: 28px 28px;
  color: var(--foreground);
  font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

.hero {
  min-height: 78vh;
  padding: 28px clamp(18px, 4vw, 64px) 48px;
  background:
    linear-gradient(135deg, rgba(16, 20, 19, 0.78), rgba(16, 20, 19, 0.92)),
    url('./assets/octagon-analysis.png'),
    radial-gradient(circle at 18% 20%, rgba(199, 55, 47, 0.28), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(45, 125, 103, 0.25), transparent 26%),
    #101413;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(243, 239, 231, 0.16);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 560px;
}

.topbar-actions > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(243, 239, 231, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff8e8;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.topbar-actions > a:hover,
.topbar-actions > a:focus {
  border-color: #d6b25e;
  background: rgba(214, 178, 94, 0.16);
}

.manual-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: rgba(243, 239, 231, 0.72);
}

.manual-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(243, 239, 231, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.eyebrow,
.section-label {
  margin: 0 0 9px;
  color: #d6b25e;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 890px;
  margin-bottom: 0;
  font-size: clamp(2.3rem, 6vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.status-pill,
.verified {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid rgba(243, 239, 231, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8e8;
  border-radius: 8px;
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  background: #65d38a;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(101, 211, 138, 0.7);
  animation: pulse 1.7s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(101, 211, 138, 0);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(280px, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: end;
  margin-top: clamp(44px, 8vh, 92px);
}

.progress-panel {
  border: 1px solid rgba(243, 239, 231, 0.18);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 22px;
}

.progress-panel h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
}

.progress-note {
  color: rgba(243, 239, 231, 0.72);
  line-height: 1.45;
}

.meter {
  height: 12px;
  overflow: hidden;
  background: rgba(243, 239, 231, 0.15);
  border-radius: 999px;
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c7372f, #d6b25e, #2d7d67);
}

.progress-rows {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.chapter-row,
.case-tab {
  width: 100%;
  border: 1px solid rgba(243, 239, 231, 0.14);
  background: rgba(0, 0, 0, 0.16);
  color: inherit;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 10px 12px;
}

.chapter-row small {
  display: block;
  margin-top: 4px;
  color: rgba(243, 239, 231, 0.58);
  font-size: 0.76rem;
  line-height: 1.28;
}

.chapter-row.active {
  border-color: #d6b25e;
  background: rgba(214, 178, 94, 0.16);
}

.cover-visual {
  min-height: 390px;
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
}

.cover-visual p {
  max-width: 560px;
  color: rgba(243, 239, 231, 0.74);
}

.octagon {
  position: relative;
  width: min(62vw, 530px);
  aspect-ratio: 1;
  border: 3px solid rgba(243, 239, 231, 0.68);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background:
    linear-gradient(90deg, rgba(243, 239, 231, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(243, 239, 231, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.04);
  background-size: 44px 44px;
}

.fighter,
.line {
  position: absolute;
  display: block;
}

.fighter {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
}

.fighter.red {
  left: 27%;
  top: 54%;
  background: #c7372f;
}

.fighter.blue {
  right: 25%;
  top: 32%;
  background: #2766b1;
}

.line {
  height: 4px;
  transform-origin: left center;
  border-radius: 999px;
}

.line.kick {
  left: 40%;
  top: 50%;
  width: 190px;
  background: #d6b25e;
  transform: rotate(-31deg);
}

.line.angle {
  left: 37%;
  top: 62%;
  width: 145px;
  background: #2d7d67;
  transform: rotate(11deg);
}

.workbench {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  padding: 26px clamp(18px, 4vw, 64px) 64px;
}

.toolkit {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(150px, 1fr));
  gap: 1px;
  background: rgba(243, 239, 231, 0.18);
  border-bottom: 1px solid rgba(243, 239, 231, 0.16);
}

.toolkit > div,
.toolkit article {
  min-height: 170px;
  padding: 24px clamp(18px, 4vw, 42px);
  background: #151b19;
}

.toolkit h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1.03;
}

.toolkit strong {
  display: block;
  margin-bottom: 12px;
  color: #f3efe7;
  font-size: 1.05rem;
}

.toolkit p {
  color: rgba(243, 239, 231, 0.7);
  line-height: 1.48;
}

.manual-rules {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) repeat(3, minmax(190px, 0.9fr));
  gap: 1px;
  background: rgba(243, 239, 231, 0.18);
  border-bottom: 1px solid rgba(243, 239, 231, 0.16);
}

.manual-rules > div,
.manual-rules article {
  min-height: 190px;
  padding: 24px clamp(18px, 4vw, 42px);
  background: #101413;
}

.manual-rules h2 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.06;
}

.manual-rules article span {
  display: block;
  margin-bottom: 22px;
  color: #d6b25e;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.85rem;
  font-weight: 800;
}

.manual-rules strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.manual-rules p {
  color: rgba(243, 239, 231, 0.68);
  line-height: 1.48;
}

.plan-builder {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(220px, 0.7fr) minmax(300px, 1.35fr);
  gap: 18px;
  align-items: stretch;
  padding: 28px clamp(18px, 4vw, 64px);
  background: #f3efe7;
  color: #141816;
  border-bottom: 1px solid rgba(20, 24, 22, 0.14);
}

.builder-copy,
.builder-controls,
.plan-output {
  border: 1px solid rgba(20, 24, 22, 0.14);
  border-radius: 8px;
  background: #fffdf8;
  padding: 18px;
}

.builder-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  line-height: 1.04;
}

.builder-copy p:last-child {
  color: #4b514d;
  line-height: 1.5;
}

.builder-controls {
  display: grid;
  gap: 10px;
}

.builder-controls button {
  min-height: 48px;
  border: 1px solid rgba(20, 24, 22, 0.16);
  border-radius: 8px;
  background: transparent;
  color: #141816;
  cursor: pointer;
  text-align: left;
  padding: 10px 12px;
}

.builder-controls button.active {
  background: #101413;
  color: #fff8e8;
}

.plan-output {
  display: grid;
  gap: 16px;
}

.plan-head span,
.plan-steps span,
.model-fights {
  display: block;
  color: #b23d35;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-head strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.plan-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-steps div {
  min-height: 126px;
  padding: 14px;
  border: 1px solid rgba(20, 24, 22, 0.12);
  border-radius: 8px;
  background: #f7f4ec;
}

.plan-steps p {
  margin: 8px 0 0;
  color: #3e4742;
  line-height: 1.43;
}

.model-fights {
  margin: 0;
  color: #0c5b80;
}

.stats-band {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) repeat(3, minmax(150px, 0.8fr)) auto;
  gap: 14px;
  align-items: stretch;
  padding: 26px clamp(18px, 4vw, 64px);
  background: #f3efe7;
  color: #141816;
  border-bottom: 1px solid rgba(20, 24, 22, 0.14);
}

.stats-band h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 2.2rem);
  line-height: 1.05;
}

.stat-card,
.data-link {
  display: grid;
  align-content: center;
  min-height: 118px;
  border: 1px solid rgba(20, 24, 22, 0.14);
  border-radius: 8px;
  padding: 15px;
  background: #fffdf8;
  text-decoration: none;
}

.stat-card strong {
  color: #c7372f;
  font-size: 2rem;
  line-height: 1;
}

.stat-card span {
  margin-top: 8px;
  color: #4b514d;
  font-size: 0.88rem;
  line-height: 1.35;
}

.data-link {
  color: #0c5b80;
  font-weight: 800;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(243, 239, 231, 0.16);
  border-bottom: 1px solid rgba(243, 239, 231, 0.16);
}

.private-package {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(180px, 0.9fr));
  gap: 1px;
  background: rgba(243, 239, 231, 0.18);
  border-bottom: 1px solid rgba(243, 239, 231, 0.16);
}

.private-package > div,
.private-package article {
  min-height: 176px;
  padding: 24px clamp(18px, 4vw, 42px);
  background: #f3efe7;
  color: #141816;
}

.private-package h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.private-package strong {
  display: block;
  margin-bottom: 10px;
  color: #b23d35;
  font-size: 1rem;
}

.private-package p {
  color: #4b514d;
  line-height: 1.5;
}

.pipeline-item {
  min-height: 148px;
  padding: 22px clamp(18px, 4vw, 64px);
  background: #151b19;
}

.pipeline-item span {
  display: block;
  margin-bottom: 12px;
  color: #d6b25e;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-item strong {
  display: block;
  margin-bottom: 8px;
  color: #f3efe7;
  font-size: 2.5rem;
  line-height: 1;
}

.pipeline-item p {
  max-width: 420px;
  color: rgba(243, 239, 231, 0.68);
  line-height: 1.42;
}

.case-list {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  gap: 12px;
}

.case-tab {
  display: grid;
  gap: 7px;
  min-height: 128px;
  padding: 16px;
}

.case-tab span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.case-tab strong {
  font-size: 1rem;
}

.case-tab em {
  color: rgba(243, 239, 231, 0.68);
  font-size: 0.88rem;
  font-style: normal;
}

.case-tab.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.case-card {
  border-top: 5px solid var(--accent);
  background: #f3efe7;
  color: #161a18;
  border-radius: 8px;
  padding: clamp(18px, 3vw, 34px);
  box-shadow: inset 0 0 0 1px rgba(22, 26, 24, 0.08);
}

.case-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(22, 26, 24, 0.14);
  padding-bottom: 22px;
}

.case-header h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.case-card .section-label {
  color: var(--accent);
}

.verified {
  background: #101413;
  align-self: flex-start;
}

.practical-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  margin-top: 24px;
  padding: 18px;
  border-radius: 8px;
  background: #151b19;
  color: #f3efe7;
}

.tactical-map {
  position: relative;
  min-height: 250px;
  border: 1px solid rgba(243, 239, 231, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(243, 239, 231, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(243, 239, 231, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(214, 178, 94, 0.16), transparent 42%);
  background-size: 32px 32px, 32px 32px, auto;
}

.tactical-map::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(243, 239, 231, 0.45);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.dot,
.path,
.cage-label,
.path-label {
  position: absolute;
  display: block;
}

.dot {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  z-index: 2;
}

.dot.a {
  left: 20%;
  top: 54%;
  background: var(--accent);
}

.dot.b {
  right: 18%;
  top: 28%;
  background: #2c5d95;
}

.path {
  left: 34%;
  height: 4px;
  border-radius: 999px;
  transform-origin: left center;
  z-index: 1;
}

.path::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 10px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateY(-50%);
}

.path.feint {
  color: #d6b25e;
  top: 55%;
  width: 34%;
  background: #d6b25e;
  transform: rotate(-24deg);
}

.path.trap {
  color: rgba(243, 239, 231, 0.66);
  top: 44%;
  width: 28%;
  border-top: 3px dashed rgba(243, 239, 231, 0.66);
  transform: rotate(18deg);
}

.path.finish {
  color: var(--accent);
  top: 50%;
  width: 48%;
  background: var(--accent);
  transform: rotate(-42deg);
}

.cage-label {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(243, 239, 231, 0.58);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.path-label {
  border: 1px solid rgba(243, 239, 231, 0.18);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(16, 20, 19, 0.78);
  color: #fff8e8;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  z-index: 3;
}

.feint-label {
  left: 43%;
  top: 39%;
}

.trap-label {
  left: 52%;
  top: 58%;
}

.finish-label {
  left: 58%;
  top: 30%;
}

.playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.playbook-grid div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(243, 239, 231, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.playbook-grid span {
  display: block;
  margin-bottom: 8px;
  color: #d6b25e;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playbook-grid p {
  margin-bottom: 0;
  color: rgba(243, 239, 231, 0.78);
  line-height: 1.45;
}

.movement-board {
  margin-top: 18px;
  border: 1px solid rgba(22, 26, 24, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #fffdf8;
}

.board-head {
  padding: 18px 18px 4px;
}

.board-head h3 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.movement-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(22, 26, 24, 0.12);
}

.movement-steps article {
  min-height: 180px;
  padding: 16px;
  background:
    linear-gradient(rgba(22, 26, 24, 0.035) 1px, transparent 1px),
    #fffdf8;
  background-size: 100% 28px;
}

.movement-steps article span {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.82rem;
  font-weight: 900;
}

.movement-steps strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.movement-steps p {
  margin: 0;
  color: #3e4742;
  line-height: 1.48;
}

.fact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 22px;
  margin-top: 24px;
}

.fact-grid section {
  border: 1px solid rgba(22, 26, 24, 0.12);
  border-radius: 8px;
  padding: 18px;
}

.fact-grid h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.fact-grid p {
  color: #3e4742;
  line-height: 1.55;
}

.fact-grid a {
  display: block;
  min-height: 38px;
  color: #0c5b80;
  text-decoration: none;
}

.fact-grid a:hover,
.fact-grid a:focus {
  text-decoration: underline;
}

.lens-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.lens-tabs button {
  min-height: 40px;
  border: 1px solid rgba(22, 26, 24, 0.16);
  background: transparent;
  color: #161a18;
  border-radius: 8px;
  padding: 8px 11px;
  cursor: pointer;
}

.lens-tabs button.active {
  background: #101413;
  color: #fff8e8;
}

.analysis-box {
  min-height: 165px;
  margin-top: 16px;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 26, 24, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 100% 30px;
  border-left: 5px solid var(--accent);
}

.analysis-box p:last-child {
  color: #26302b;
  font-size: 1.08rem;
  line-height: 1.62;
}

.analysis-box h3 {
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .topbar,
  .case-header {
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .hero-grid,
  .workbench,
  .toolkit,
  .manual-rules,
  .plan-builder,
  .stats-band,
  .pipeline,
  .private-package,
  .fact-grid,
  .practical-card,
  .playbook-grid,
  .plan-steps,
  .movement-steps {
    grid-template-columns: 1fr;
  }

  .case-list {
    position: static;
  }

  .cover-visual {
    min-height: 300px;
  }

  .octagon {
    width: min(86vw, 430px);
  }
}
