:root {
  color-scheme: light;
  --bg: #f8faf7;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --ink: #14201d;
  --muted: #5f6e68;
  --line: rgba(20, 32, 29, 0.14);
  --brand: #0f7b63;
  --brand-2: #2155d6;
  --accent: #d85d27;
  --gold: #d39a16;
  --rose: #c44568;
  --shadow: 0 18px 42px rgba(20, 32, 29, 0.1);
  --radius: 8px;
  --shell: min(1180px, calc(100% - 32px));
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1514;
  --surface: #171f1d;
  --surface-2: #1f2a27;
  --ink: #f2f7f4;
  --muted: #b5c0bb;
  --line: rgba(242, 247, 244, 0.16);
  --brand: #44c7a5;
  --brand-2: #8ea8ff;
  --accent: #ff9466;
  --gold: #f4c45d;
  --rose: #ff8ead;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(20, 32, 29, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 32, 29, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-2), white 20%);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 99;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface), transparent 9%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background:
    linear-gradient(135deg, var(--brand) 0 38%, var(--gold) 38% 68%, var(--accent) 68%);
  color: #0f1514;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.mini-link,
.icon-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 750;
  font-size: 0.92rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.mini-link:hover,
.icon-button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
}

.nav-search .field {
  padding-right: 58px;
}

.nav-search .icon-button {
  position: absolute;
  top: 5px;
  right: 5px;
  min-height: 34px;
  padding-inline: 12px;
}

.safety-strip {
  background: var(--ink);
  color: var(--bg);
  border-bottom: 4px solid var(--accent);
}

.safety-strip .shell {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-block: 9px;
  font-size: 0.94rem;
}

.page {
  padding: 30px 0 70px;
}

.section {
  padding: 54px 0;
}

.section-tight {
  margin-top: 34px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
  gap: 30px;
  align-items: center;
  padding: 34px 0 26px;
}

.hero-copy,
.page-title {
  min-width: 0;
}

.eyebrow,
.stamp {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  color: #12130f;
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin: 16px 0;
  font-size: clamp(2.55rem, 6vw, 5.25rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.8rem, 3.7vw, 3.1rem);
  font-weight: 900;
}

h3 {
  font-size: 1.2rem;
  font-weight: 850;
}

h4 {
  margin-top: 14px;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin: 0 0 14px;
}

.lead {
  max-width: 790px;
  color: color-mix(in srgb, var(--ink), var(--muted) 32%);
  font-size: clamp(1.08rem, 2.1vw, 1.35rem);
}

.local-line {
  max-width: 760px;
  color: var(--brand);
  font-size: 1.08rem;
  font-weight: 750;
}

.hero-actions,
.action-row,
.button-row,
.feedback-row,
.rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions,
.action-row {
  margin-top: 18px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 15px;
  font-weight: 850;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 var(--ink);
}

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

.btn.ghost {
  background: transparent;
  box-shadow: none;
}

.btn.small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.88rem;
  box-shadow: none;
}

.field,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
  min-height: 44px;
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-weight: 600;
}

.search-panel {
  position: relative;
  max-width: 790px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 22px 0 18px;
}

.result-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  max-height: min(480px, 70vh);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
}

.result-dropdown:empty {
  display: none;
}

.result-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-radius: 7px;
  padding: 10px;
}

.result-item:hover {
  background: var(--surface-2);
}

.result-item small {
  display: block;
  color: var(--muted);
}

.hero-media {
  min-width: 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-2);
}

.hero-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.hero-note span {
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.stats-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.stats-grid strong {
  display: block;
  font-size: 1.5rem;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 700;
}

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

.journey-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.journey-card:hover,
.card:hover,
.tool-card:hover,
.prompt-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--ink), var(--brand) 30%);
}

.journey-card span {
  color: var(--brand);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

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

.tool-card,
.card,
.prompt-card,
.panel,
.answer-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(20, 32, 29, 0.03);
}

.tool-card,
.card,
.prompt-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.hub-card {
  border-top: 5px solid var(--brand-2);
}

.tool-card {
  border-top: 5px solid var(--accent);
}

.tool-card h3,
.card h3,
.prompt-card h3 {
  margin: 10px 0 8px;
}

.tool-card p,
.card p,
.prompt-card p {
  color: var(--muted);
}

.tool-card .button-row {
  margin-top: auto;
  padding-top: 10px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.score {
  min-width: 38px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
  padding: 5px 8px;
  text-align: center;
  font-weight: 900;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 800;
}

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

.link-chip:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.content-band {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.compact-link {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 13px;
}

.compact-link:hover {
  border-color: var(--ink);
}

.compact-link small {
  color: var(--muted);
}

.page-title {
  margin-bottom: 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 750;
}

.breadcrumbs a {
  color: var(--brand);
}

.filters {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 22px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 7%);
  backdrop-filter: blur(12px);
}

.usecase-filters {
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, 0.7fr));
}

.prompt-filters {
  grid-template-columns: minmax(220px, 1.3fr) repeat(6, minmax(128px, 0.8fr));
}

.skill-filters {
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 0.7fr));
}

.workflow-filters {
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(150px, 0.7fr));
}

.skill-card {
  border-top: 4px solid var(--brand-2);
}

.workflow-card {
  border-top: 4px solid var(--accent);
}

.cluster-rail {
  margin-bottom: 18px;
}

.sticky-filters {
  position: sticky;
  top: 84px;
  z-index: 10;
}

.result-count {
  margin: 8px 0 16px;
  color: var(--muted);
  font-weight: 800;
}

.tool-workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.panel,
.answer-box {
  padding: 18px;
}

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

.form-grid label:has(textarea) {
  grid-column: 1 / -1;
}

.output-text {
  width: 100%;
  min-height: 420px;
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1514;
  color: #edf7f3;
  padding: 14px;
  white-space: pre-wrap;
  font: 0.9rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.compact-output {
  min-height: 180px;
  max-height: 320px;
  margin: 12px 0 0;
  font-size: 0.84rem;
}

.prompt-copy-grid {
  display: grid;
  gap: 14px;
}

.prompt-output-card {
  padding: 14px;
}

.ai-row {
  margin-top: 12px;
}

.feedback-row {
  margin-top: 12px;
}

.notice {
  border: 1px solid color-mix(in srgb, var(--accent), var(--line) 40%);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent), transparent 88%);
  padding: 13px 14px;
  font-weight: 750;
}

.content-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.toc a {
  color: var(--muted);
  font-weight: 750;
}

.toc a:hover {
  color: var(--brand);
}

.article {
  max-width: 860px;
}

.article p,
.article li {
  color: color-mix(in srgb, var(--ink), var(--muted) 28%);
  font-size: 1.04rem;
}

.rich-article section {
  scroll-margin-top: 110px;
  margin-bottom: 34px;
}

.rich-article h2 {
  margin-bottom: 12px;
}

.clean-list,
.steps {
  margin: 10px 0 0;
  padding-left: 1.2rem;
}

.clean-list li,
.steps li {
  margin-bottom: 7px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

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

th {
  background: var(--surface-2);
  font-weight: 900;
}

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

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
}

summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  font-weight: 900;
  cursor: pointer;
}

details p {
  padding: 0 16px 16px;
  color: var(--muted);
}

.empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 34px;
  text-align: center;
}

.small-empty {
  padding: 12px;
  text-align: left;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 38px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(120px, 0.6fr));
  gap: 28px;
}

.footer h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.footer a:not(.brand) {
  display: block;
  color: var(--muted);
  font-weight: 750;
  margin-bottom: 8px;
}

.footer p {
  max-width: 520px;
  color: var(--muted);
}

.compare-drawer {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 40;
  width: min(760px, calc(100% - 24px));
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  transform: translateX(-50%);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.compare-drawer.show {
  display: grid;
}

.compare-drawer span {
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: min(360px, calc(100% - 32px));
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .tool-workbench,
  .split-section,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

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

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

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 24px, 1180px);
  }

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

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.25rem, 14vw, 3.5rem);
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .journey-grid,
  .grid.tools,
  .grid.four,
  .grid.three,
  .grid.two,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
    position: static;
    max-height: 72vh;
    overflow: auto;
  }

  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a,
  .nav-links .icon-button,
  .btn.small {
    min-height: 44px;
    flex: 0 0 auto;
  }

  .action-row .btn {
    flex: 1 1 140px;
  }

  .output-text {
    min-height: 260px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-drawer {
    grid-template-columns: 1fr;
  }

  .nav-search .icon-button {
    position: static;
    margin-top: 8px;
    width: 100%;
  }

  .nav-search .field {
    padding-right: 12px;
  }
}

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