/* Claude worker-flow deepseek site. Plain CSS, no build step. */

:root {
  --paper: #EEF2F6;
  --ink: #172233;
  --muted: #5A6B80;
  --line: #CBD5E1;
  --stop: #E5484D;

  --deepseek: #2E5BFF;
  --sol: #F5A300;
  --luna: #8F7CF7;
  --qwen: #0FA88F;

  --font: "Anuphan", "Leelawadee UI", "Tahoma", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

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

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Type scale ---------- */

h1 {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 14em;
  margin: 0 0 0.7em;
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.9em;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.18rem;
  color: var(--ink);
}

.builder,
.hint {
  font-size: 0.875rem;
  color: var(--muted);
}

#content p,
#content ul,
#content ol,
#content dl,
#content figure {
  max-width: 34rem;
}

/* ---------- Code ---------- */

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(23, 34, 51, 0.06);
  padding: 0.08em 0.36em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

/* ---------- Layout ---------- */

.layout {
  display: block;
}

main {
  padding: 0 20px;
}

section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72svh;
  padding: 8svh 0;
  box-sizing: border-box;
}

@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 40rem) 1fr;
  }

  main {
    grid-column: 1;
    grid-row: 1;
    padding-left: clamp(24px, 6vw, 96px);
    padding-right: 32px;
  }

  #stage {
    grid-column: 2;
    grid-row: 1;
    height: 100vh;
  }

  section {
    min-height: 92vh;
    padding: 16vh 0;
  }

  #hero {
    min-height: 100vh;
  }
}

/* ---------- Stage ---------- */

#stage {
  position: sticky;
  top: 0;
  height: 42svh;
  z-index: 2;
  background: var(--paper);
  overflow: hidden;
}

@media (min-width: 960px) {
  #stage {
    height: 100vh;
  }
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 800ms ease;
}

#scene.is-ready {
  opacity: 1;
}

#stage-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 30rem;
  opacity: 0;
  transition: opacity 300ms ease;
}

#stage-caption.is-visible {
  opacity: 1;
}

#stage-fallback {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0;
  padding: 24px;
  color: var(--muted);
}

#stage-fallback:not([hidden]) {
  display: flex;
}

/* ---------- Lists ---------- */

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

li {
  padding: 0.55em 0;
  border-top: 1px solid var(--line);
}

li:last-child {
  border-bottom: 1px solid var(--line);
}

ol {
  counter-reset: item;
}

ol > li {
  counter-increment: item;
}

ol > li::before {
  content: counter(item);
  color: var(--muted);
  font-weight: 600;
  min-width: 1.6em;
  display: inline-block;
}

/* ---------- Definition lists ---------- */

dl {
  margin: 0 0 1.2em;
}

dt {
  font-weight: 600;
  border-top: 1px solid var(--line);
  padding-top: 0.55em;
}

dd {
  margin: 0;
  padding-bottom: 0.55em;
  color: var(--ink);
}

dl > dd:last-child {
  border-bottom: 1px solid var(--line);
}

@media (min-width: 960px) {
  dl {
    display: grid;
    grid-template-columns: minmax(0, 15rem) 1fr;
    column-gap: 1.5rem;
  }

  dt,
  dd {
    border-top: 1px solid var(--line);
    padding: 0.55em 0;
  }

  dl > :nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Swatches ---------- */

.swatch {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  margin-right: 0.5em;
  vertical-align: 0.05em;
}

.swatch[data-model="deepseek"] {
  background: var(--deepseek);
}

.swatch[data-model="sol"] {
  background: var(--sol);
}

.swatch[data-model="luna"] {
  background: var(--luna);
}

.swatch[data-model="qwen"] {
  background: var(--qwen);
}

.swatch[data-model="claude"] {
  background: transparent;
  border: 1.5px solid var(--ink);
}

/* ---------- Approval figure ---------- */

figure.round {
  margin: 1.6em 0;
  padding: 1.1em 1.3em;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
}

figure.round figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.6em;
}

figure.round p {
  margin: 0.15em 0;
}

/* ---------- Bench table ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}

th,
td {
  padding: 0.5em 0.6em 0.5em 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.bar {
  display: block;
  margin-top: 4px;
  height: 6px;
  border-radius: 3px;
  width: calc(var(--v) / 295 * 100%);
}

tbody tr:nth-child(1) .bar,
tbody tr:nth-child(2) .bar,
tbody tr:nth-child(5) .bar {
  background: var(--deepseek);
}

tbody tr:nth-child(3) .bar,
tbody tr:nth-child(4) .bar,
tbody tr:nth-child(6) .bar {
  background: var(--luna);
}

tbody tr:nth-child(7) .bar,
tbody tr:nth-child(8) .bar {
  background: var(--qwen);
}

/* ---------- Note ---------- */

.note {
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 0.9em;
}

/* ---------- Links ---------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Footer ---------- */

#credits {
  padding: 10vh clamp(24px, 6vw, 96px) 8vh;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

#credits p {
  margin: 0.4em 0;
}

#credits p:last-child {
  margin-bottom: 0;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
