:root {
  --page-bg: #f8f8f8;
  --text: #09090b;
  --muted: #6f717a;
  --subtle: #4f5661;
  --line: #dedede;
  --line-strong: #cfcfcf;
  --blue: #006fbd;
  --pill-border: #dadde2;
  --pill-text: #74767f;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.code-block {
  width: 100%;
  margin: 24px 0 22px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  color: var(--text);
  background: transparent;
}

.code-block code {
  display: block;
  min-width: 640px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre;
}

.schema-table-wrap {
  margin-top: 4px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 24px;
}

.result-grid div {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.result-grid span {
  display: block;
  color: var(--pill-text);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
}

.input-quote {
  margin: 24px 0;
  border-left: 4px solid var(--text);
  padding: 4px 0 4px 18px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.5;
}

.comparison-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.comparison-list div {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.comparison-list strong {
  color: var(--text);
  font-weight: 900;
}

.comparison-list span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.comparison-list p {
  grid-column: 2;
  margin: 0;
  color: var(--text);
}

.plain-list li {
  line-height: 1.55;
}

.muted-note {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .comparison-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .comparison-list p {
    grid-column: auto;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.58;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(248, 248, 248, 0.96);
}

.site-nav {
  width: min(1380px, calc(100% - 72px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  line-height: 1;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #08080a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.nav-links {
  gap: 30px;
  color: var(--pill-text);
  font-size: 1rem;
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--blue);
}

.language-button {
  min-height: 36px;
  border: 1px solid var(--pill-border);
  border-radius: 8px;
  padding: 6px 14px;
  background: #fff;
  color: var(--text);
}

.project-page {
  width: min(1160px, calc(100% - 72px));
  margin: 0 auto;
  padding: 68px 0 88px;
}

.project-hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 920px;
  font-size: clamp(2.65rem, 5.2vw, 4.2rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.75rem, 2vw, 2rem);
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.project-summary {
  max-width: 880px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 560;
  line-height: 1.58;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.outline-button {
  width: 136px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.outline-button:hover {
  color: var(--blue);
}

.detail-section {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  column-gap: 48px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.last-section {
  border-bottom: 0;
}

.section-side {
  min-width: 0;
}

.section-side h2 {
  max-width: 210px;
}

.section-main {
  min-width: 0;
}

.section-main > p {
  max-width: 880px;
  margin: 0 0 22px;
  color: var(--text);
}

.section-main a {
  color: var(--blue);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 34px;
  margin-top: 26px;
}

.summary-grid div {
  min-width: 0;
}

.summary-grid div {
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  padding: 18px;
  background: #f8f8f8;
}

.summary-grid strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.28;
}

.summary-grid p,
.step-list span,
.muted-note {
  color: var(--muted);
}

.summary-grid p {
  margin: 8px 0 0;
  color: #555963;
  line-height: 1.52;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.48;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--pill-text);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

td:first-child {
  color: var(--text);
  font-weight: 850;
}

.problem-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.problem-table-wrap {
  border: 1px solid #d4d7dc;
  border-radius: 8px;
  background: var(--page-bg);
}

.problem-table th {
  padding: 14px 18px;
  color: #5f6672;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
  background: var(--page-bg);
}

.problem-table td {
  padding: 16px;
  line-height: 1.45;
}

.challenges-table {
  table-layout: fixed;
}

.challenges-table .challenge-col {
  width: 22%;
}

.challenges-table .solution-col {
  width: 48%;
}

.challenges-table .skill-col {
  width: 30%;
}

.challenges-table td:first-child {
  color: var(--text);
  font-weight: 900;
  line-height: 1.34;
}

.challenges-table td:nth-child(2),
.challenges-table td:nth-child(3) {
  color: #626873;
}

.architecture-card {
  margin: 26px 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  background: #fafafa;
}

.architecture-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.architecture-card-header span {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.architecture-layer {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 18px 18px 22px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.architecture-layer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: var(--layer-accent);
}

.layer-control {
  --layer-accent: #9bb7d4;
}

.layer-evidence {
  --layer-accent: #9fc7b1;
}

.layer-validation {
  --layer-accent: #d2a679;
}

.layer-index {
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
}

.architecture-layer h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.22;
}

.layer-chips,
.output-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-chip,
.output-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.2;
}

.layer-chip {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}

.emphasis-chip {
  border-color: #c9b59b;
  background: #fffaf3;
  color: #2f2418;
  font-weight: 850;
}

.architecture-connector {
  width: 1px;
  height: 18px;
  margin: 8px auto;
  background: #d1d5db;
}

.output-block {
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px dashed #d8dde3;
}

.output-label {
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.output-row {
  margin-top: 0;
}

.output-chip {
  border: 1px solid #bcd7ee;
  background: #f3f8fc;
  color: var(--blue);
  font-weight: 850;
}

.muted-note {
  max-width: 900px;
  margin: 0;
  font-size: 0.98rem;
}

.pipeline-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 24px 0 18px;
}

.pipeline-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #d8dde3;
  border-radius: 999px;
  background: #fafafa;
  padding: 6px 12px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.2;
}

.pipeline-arrow {
  color: #a0a6af;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

.step-list {
  counter-reset: steps;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.step-list li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 56px minmax(180px, 280px) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.step-list li::before {
  content: counter(steps, decimal-leading-zero);
  color: var(--pill-text);
  font-weight: 900;
}

.step-list strong {
  color: var(--text);
  line-height: 1.28;
}

.eval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.eval-card {
  min-width: 0;
  min-height: 122px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  padding: 17px 18px;
}

.eval-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.28;
}

.eval-card span {
  display: block;
  color: #626873;
  line-height: 1.45;
}

.agent-trace-card {
  margin-top: 24px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #fafafa;
  padding: 22px;
}

.trace-question {
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 18px;
}

.trace-question span {
  display: block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.trace-question p {
  margin: 0;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
}

.agent-trace {
  counter-reset: trace;
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-trace::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 18px;
  left: 21px;
  width: 1px;
  background: #e1e4e8;
}

.agent-trace li {
  counter-increment: trace;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid #e1e4e8;
}

.agent-trace li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.agent-trace li::before {
  content: counter(trace, decimal-leading-zero);
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  border: 1px solid #e1e4e8;
  border-radius: 999px;
  background: #fafafa;
  color: var(--pill-text);
  font-size: 0.86rem;
  font-weight: 900;
}

.agent-trace li.trace-gate::before {
  border-color: #bcd7ee;
  background: #f3f8fc;
  color: var(--blue);
}

.agent-trace li.trace-gate strong {
  color: #0b66b2;
}

.agent-trace strong {
  color: var(--text);
  line-height: 1.28;
}

.agent-trace span {
  color: var(--muted);
  line-height: 1.5;
}

.stack-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.stack-list div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.stack-list dt {
  color: var(--text);
  font-weight: 900;
}

.stack-list dd {
  margin: 0;
  color: var(--text);
}

.plain-list {
  margin: 0;
  padding-left: 22px;
}

.plain-list li {
  margin: 0 0 10px;
  color: var(--text);
}

@media (max-width: 900px) {
  body {
    font-size: 17px;
  }

  .site-nav,
  .project-page {
    width: min(100% - 42px, 1160px);
  }

  .site-nav {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .project-page {
    padding-top: 50px;
  }

  .detail-section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 42px 0;
  }

  .section-side h2 {
    max-width: none;
  }

  .summary-grid,
  .eval-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-nav,
  .project-page {
    width: min(100% - 28px, 1160px);
  }

  h1 {
    font-size: clamp(2.3rem, 14vw, 3.4rem);
  }

  h2 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

  .outline-button {
    width: 100%;
  }

  .architecture-card {
    padding: 16px;
  }

  .architecture-layer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 15px;
  }

  .step-list li {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .step-list span {
    grid-column: 2;
  }

  .agent-trace-card {
    padding: 16px;
  }

  .agent-trace li {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 16px 0;
  }

  .agent-trace span {
    grid-column: 2;
  }

  .stack-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
