:root {
  --teal: #0d9488;
  --emerald: #10b981;
  --amber: #f59e0b;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --panel: #ffffff;
  --night: #051426;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Sora", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(13, 148, 136, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 4%, rgba(16, 185, 129, 0.12), transparent 28rem),
    #f8fafc;
  background-size: 32px 32px, 32px 32px, auto, auto;
  font-family: var(--body);
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 280px minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.search-shell span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.top-action,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(13, 148, 136, 0.28);
  border-radius: 6px;
  color: var(--teal);
  background: rgba(13, 148, 136, 0.06);
  font-weight: 900;
}

.btn.primary {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.btn.ghost {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.82);
  overflow-y: auto;
}

.sidebar-kicker,
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--amber);
}

.toc {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.toc a {
  position: relative;
  padding: 11px 12px 11px 16px;
  border-radius: 6px;
  color: var(--slate);
  font-size: 14px;
  font-weight: 800;
}

.toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: transparent;
}

.toc a:hover,
.toc a.active {
  color: var(--ink);
  background: #ffffff;
}

.toc a.active::before {
  background: var(--teal);
}

.sidebar-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sidebar-card b {
  display: block;
  font-family: var(--display);
  font-size: 14px;
}

.sidebar-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.sidebar-card.amber {
  border-left: 4px solid var(--amber);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--emerald);
}

.content {
  min-width: 0;
  padding: 32px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: end;
  padding: 34px;
  border: 1px solid rgba(13, 148, 136, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.94)),
    url("../../assets/images/hero-industrial-bg.webp") center/cover;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.02em;
}

h1 {
  max-width: 760px;
  margin-top: 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

h3 {
  font-size: 22px;
  line-height: 1.25;
}

.hero-panel p,
.section-head p {
  max-width: 760px;
  color: var(--slate);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.hero-meta div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hero-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-meta b {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-grid article,
.suite-grid article,
.agent-grid article,
.path-card,
.card,
.table-card,
.code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.quick-grid article {
  padding: 18px;
}

.quick-grid span,
.suite-grid span,
.path-card span {
  display: block;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-grid b,
.suite-grid b,
.path-card b,
.agent-grid b {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  line-height: 1.35;
}

.quick-grid small,
.path-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.doc-section {
  margin-top: 32px;
  padding: 32px 0 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin-top: 12px;
}

.path-grid,
.suite-grid,
.agent-grid,
.swatch-grid {
  display: grid;
  gap: 14px;
}

.path-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-card {
  padding: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.path-card:hover,
.suite-grid article:hover,
.agent-grid article:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.16);
}

.split-grid,
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 22px;
}

.card.accent {
  border-left: 4px solid var(--teal);
}

.card.danger {
  border-left: 4px solid #ef4444;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-header span,
.table-title,
.code-head span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.card-header b {
  font-family: var(--display);
}

.card p {
  color: var(--slate);
  line-height: 1.75;
}

.kv-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.kv-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}

.kv-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kv-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.success {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.badge.info {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
}

.badge.warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.badge.muted {
  color: #475569;
  background: #f1f5f9;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.timeline div {
  padding: 20px;
  border-right: 1px solid var(--line);
}

.timeline div:last-child {
  border-right: 0;
}

.timeline b {
  display: block;
  color: var(--teal);
  font-family: var(--display);
}

.timeline span,
.suite-grid p,
.agent-grid p {
  display: block;
  margin-top: 8px;
  color: var(--slate);
  line-height: 1.65;
}

.check-list,
.x-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.x-list li {
  position: relative;
  padding-left: 24px;
  color: var(--slate);
  line-height: 1.65;
}

.check-list li::before,
.x-list li::before {
  position: absolute;
  left: 0;
  top: 0.42em;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.check-list li::before {
  content: "";
  background: var(--emerald);
}

.x-list li::before {
  content: "";
  background: #ef4444;
}

.table-card {
  overflow: hidden;
}

.table-title {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--slate);
  line-height: 1.55;
}

.code-card {
  overflow: hidden;
  margin-bottom: 16px;
}

.code-card.compact {
  margin-bottom: 0;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #334155;
  background: #0f172a;
}

.code-head span {
  color: #cbd5e1;
}

.code-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: #ccfbf1;
  background: rgba(13, 148, 136, 0.18);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  color: #dbeafe;
  background: #1e293b;
}

code {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}

.suite-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.suite-grid article,
.agent-grid article {
  padding: 18px;
}

.swatch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.swatch-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.swatch-grid span {
  display: block;
  height: 62px;
  margin-bottom: 14px;
  border-radius: 6px;
  background: var(--swatch);
}

.swatch-grid b,
.swatch-grid small {
  display: block;
}

.swatch-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
}

.type-sample h3 {
  margin-bottom: 12px;
}

.type-sample p {
  margin: 0;
}

.agent-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.footer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
  padding: 32px;
  border-radius: 12px;
  color: #d7e6e4;
  background:
    radial-gradient(circle at 82% 12%, rgba(245, 158, 11, 0.2), transparent 22rem),
    linear-gradient(135deg, #051426, #0d1c2f);
}

.footer-panel span {
  color: #fcd34d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-panel h2 {
  margin-top: 10px;
  color: #ffffff;
}

.footer-panel p {
  max-width: 760px;
  color: #b7d8d2;
  line-height: 1.75;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .toc {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content {
    padding: 24px;
  }

  .hero-panel,
  .footer-panel {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .path-grid,
  .timeline,
  .swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suite-grid,
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .content {
    padding: 16px;
  }

  .hero-panel {
    padding: 24px;
  }

  h1 {
    font-size: 40px;
  }

  .toc,
  .quick-grid,
  .path-grid,
  .split-grid,
  .two-col,
  .timeline,
  .suite-grid,
  .swatch-grid,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

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

  .timeline div:last-child {
    border-bottom: 0;
  }

  .kv-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  table {
    min-width: 680px;
  }

  .table-card {
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
