:root {
  --ink: #071a20;
  --ink-2: #0d2830;
  --paper: #f5f7f3;
  --white: #ffffff;
  --lime: #c9ff64;
  --cyan: #52dfdd;
  --muted: #647478;
  --line: #d7ded9;
  --shadow: 0 22px 60px rgba(7, 26, 32, 0.11);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); font-size: 16px; line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; background: var(--lime); padding: .7rem 1rem; border-radius: .4rem; }
.skip-link:focus { top: 1rem; }
.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; }

.site-header { height: 84px; max-width: 1440px; margin: auto; padding: 0 clamp(1.25rem, 4vw, 4.5rem); display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: white; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; line-height: 1.05; }
.brand strong { display: block; font-family: Manrope, sans-serif; letter-spacing: -.02em; }
.brand small { display: block; color: #91a9ad; margin-top: .28rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; }
.brand-mark { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; transform: skew(-8deg); }
.brand-mark i { background: var(--lime); border-radius: 8px 8px 2px 2px; display: block; }
.brand-mark i:nth-child(1) { height: 55%; }.brand-mark i:nth-child(2) { height: 100%; }.brand-mark i:nth-child(3) { height: 75%; background: var(--cyan); }
nav { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2.3rem); }
nav a { color: #c3d0d1; text-decoration: none; font-size: .9rem; }
nav a:hover { color: white; }
.nav-github { border: 1px solid #385058; border-radius: 99px; padding: .55rem 1rem; }

.hero { max-width: 1440px; margin: auto; padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 4vw, 4.5rem) clamp(4rem, 8vw, 7.5rem); background: var(--ink); color: white; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: clamp(3rem, 7vw, 8rem); align-items: center; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 38rem; height: 38rem; border: 1px solid rgba(82,223,221,.15); border-radius: 50%; right: -14rem; top: -18rem; box-shadow: 0 0 0 6rem rgba(82,223,221,.025), 0 0 0 12rem rgba(82,223,221,.018); pointer-events: none; }
.eyebrow { margin: 0 0 1rem; color: var(--lime); text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700; }
.eyebrow.dark { color: #34716e; }
h1, h2, h3 { font-family: Manrope, sans-serif; }
h1 { font-size: clamp(2.9rem, 5.7vw, 5.8rem); line-height: .98; letter-spacing: -.06em; margin: 0; max-width: 850px; }
h1 span { color: var(--cyan); }
.hero-lede { max-width: 680px; font-size: clamp(1.02rem, 1.4vw, 1.25rem); line-height: 1.65; color: #aec0c2; margin: 2rem 0; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; border-radius: 99px; padding: .85rem 1.25rem; border: 0; cursor: pointer; font-weight: 700; }
.button.primary { background: var(--lime); color: var(--ink); }
.button.primary:hover { background: #d7ff8d; transform: translateY(-1px); }
.button.secondary { border: 1px solid #39515a; color: white; }
.button.secondary:hover { border-color: #789096; }

.hero-system { position: relative; z-index: 1; border: 1px solid #274149; border-radius: 1.2rem; background: rgba(13,40,48,.68); padding: 1.4rem; box-shadow: 0 28px 70px rgba(0,0,0,.24); backdrop-filter: blur(8px); }
.system-label { color: #80999e; text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; margin-bottom: 1rem; }
.system-track { position: absolute; left: 39px; top: 72px; bottom: 75px; width: 1px; background: #34515a; }
.track-progress { display: block; width: 1px; height: 75%; background: linear-gradient(var(--cyan), var(--lime)); }
.track-node { position: absolute; left: -4px; width: 9px; height: 9px; background: var(--ink-2); border: 2px solid var(--cyan); border-radius: 50%; }
.n1{top:0}.n2{top:25%}.n3{top:50%}.n4{top:75%}.n5{top:100%;border-color:var(--lime)}
.system-stages { display: grid; gap: .32rem; }
.system-stages button { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: .7rem; background: transparent; color: white; border: 0; border-radius: .7rem; padding: .7rem .8rem; text-align: left; cursor: pointer; }
.system-stages button:hover, .system-stages button:focus-visible { background: #163740; outline: none; }
.system-stages span { color: #6c858a; font-size: .7rem; }
.system-stages strong { font-size: 1rem; }
.system-stages small { color: #789096; }
.hero-system > p { color: #698187; margin: 1rem 0 0 2.6rem; font-size: .76rem; }

.workflow, .catalogue, .about { max-width: 1440px; margin: auto; padding-left: clamp(1.25rem, 4vw, 4.5rem); padding-right: clamp(1.25rem, 4vw, 4.5rem); }
.workflow { padding-top: clamp(4rem, 7vw, 7rem); padding-bottom: clamp(4rem, 7vw, 6rem); }
.section-heading, .catalogue-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2.3rem; }
.section-heading h2, .catalogue-heading h2, .about h2 { font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.05; letter-spacing: -.045em; margin: 0; }
.section-heading > p { color: var(--muted); max-width: 480px; margin: 0; }
.intent-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: white; }
.intent-card { min-height: 134px; background: white; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr auto; gap: 1rem; align-items: center; padding: 1.4rem; text-align: left; cursor: pointer; color: var(--ink); }
.intent-card:nth-child(3n) { border-right: 0; }.intent-card:nth-last-child(-n+3) { border-bottom: 0; }
.intent-card:hover { background: var(--ink); color: white; }
.intent-icon { width: 42px; height: 42px; display: grid; place-items: center; background: #eaf4ef; border-radius: 50%; color: #0b5857; }
.intent-icon svg, .tool-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.intent-card strong, .intent-card small { display: block; }.intent-card small { color: var(--muted); margin-top: .3rem; }.intent-card:hover small { color: #9db1b5; }
.intent-card b { font-size: 1.2rem; }

.catalogue { padding-bottom: clamp(5rem, 9vw, 9rem); }
.catalogue-heading { margin-bottom: 1.7rem; }
#result-count { color: var(--muted); margin: 0; }
.catalogue-controls { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: .8rem; align-items: center; padding: .75rem; background: white; border: 1px solid var(--line); border-radius: .9rem; }
.search-box { height: 48px; display: flex; align-items: center; gap: .7rem; padding: 0 .7rem; border-right: 1px solid var(--line); color: var(--muted); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; font-size: 1rem; background: transparent; color: var(--ink); }
kbd { font: 700 .7rem DM Sans; border: 1px solid var(--line); padding: .2rem .45rem; border-radius: .3rem; color: #7a898c; background: var(--paper); }
.filters { display: flex; gap: .35rem; flex-wrap: wrap; }
.filter { border: 0; background: transparent; border-radius: 99px; padding: .48rem .75rem; color: #53676b; cursor: pointer; font-size: .82rem; white-space: nowrap; }
.filter:hover { background: #eef2ef; }.filter.active { background: var(--ink); color: white; }
.sort-control { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .8rem; }
.sort-control select { border: 0; background: var(--paper); padding: .5rem; border-radius: .4rem; color: var(--ink); }
.active-query { display: flex; justify-content: space-between; margin-top: 1rem; color: var(--muted); font-size: .85rem; }
.active-query button { border: 0; background: none; color: #235f5d; cursor: pointer; text-decoration: underline; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.tool-card { background: white; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; min-height: 470px; display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease; }
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-visual { height: 165px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #0c242b; color: var(--accent, var(--cyan)); }
.card-visual::before { content:""; position:absolute; inset: 25% -10%; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; opacity:.22; transform: rotate(-8deg); }
.visual-code { position: absolute; top: 1rem; left: 1rem; font-size: .7rem; letter-spacing: .12em; color: #789096; }
.tool-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid currentColor; position: relative; z-index: 2; }
.tool-icon svg { width: 35px; height: 35px; }
.visual-orbit { position: absolute; width: 130px; height: 52px; border: 1px solid currentColor; border-radius: 50%; opacity: .35; transform: rotate(-18deg); }
.accent-cyan{--accent:#52dfdd}.accent-orange{--accent:#ff9d57}.accent-blue{--accent:#72a7ff}.accent-lime{--accent:#c9ff64}.accent-purple{--accent:#b99aff}.accent-red{--accent:#ff7777}.accent-yellow{--accent:#ffd45f}
.card-body { flex: 1; padding: 1.35rem; display: flex; flex-direction: column; }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: center; color: #39706f; text-transform: uppercase; letter-spacing: .09em; font-size: .64rem; font-weight: 700; }
.card-meta small { color: #849194; text-transform: none; letter-spacing: 0; font-size: .7rem; }
.card-body h3 { margin: .9rem 0 .55rem; font-size: 1.5rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
.card-body p { color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1.15rem 0; }
.tags span { background: #eef2ef; border-radius: 99px; padding: .28rem .55rem; font-size: .68rem; color: #5a696c; }
.card-body > a { margin-top: auto; padding-top: 1rem; border-top: 1px solid #e7ebe8; display: flex; justify-content: space-between; text-decoration: none; font-weight: 700; font-size: .88rem; }
.card-body > a:hover { color: #236f6c; }
.empty-state { text-align: center; border: 1px dashed #aab6b2; border-radius: 1rem; padding: 4rem 1rem; margin-top: 1.4rem; }
.empty-state h3 { margin: 0; font-size: 1.5rem; }.empty-state p { color: var(--muted); }.empty-state .button { margin-top: .7rem; }

.about { background: var(--ink); color: white; padding-top: clamp(4rem, 7vw, 7rem); padding-bottom: clamp(4rem, 7vw, 7rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 9rem); }
.about p { color: #a5b8bb; font-size: 1.05rem; margin-top: 0; }
.text-link { display: inline-flex; gap: .7rem; color: var(--lime); text-decoration: none; margin-top: 1rem; font-weight: 700; }
footer { max-width: 1440px; margin: auto; min-height: 115px; padding: 1.5rem clamp(1.25rem, 4vw, 4.5rem); background: #041217; color: #899fa3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
footer .brand { color: white; }footer .brand-mark { width: 24px; height: 24px; }footer p { margin: 0; }footer > a:last-child { color: white; text-decoration: none; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }.hero-copy { max-width: 900px; }.hero-system { max-width: 720px; }
  .catalogue-controls { grid-template-columns: 1fr; }.search-box { border-right: 0; border-bottom: 1px solid var(--line); }.sort-control { justify-self: end; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }.intent-grid { grid-template-columns: repeat(2, 1fr); }.intent-card:nth-child(3n) { border-right: 1px solid var(--line); }.intent-card:nth-child(2n) { border-right: 0; }.intent-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }.intent-card:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 720px) {
  .site-header { height: 72px; }.site-header nav a:not(.nav-github) { display: none; }.nav-github { padding: .45rem .75rem; }
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }.hero-system { padding: 1rem; }.system-stages button { grid-template-columns: 28px 1fr; }.system-stages small { display: none; }
  .section-heading, .catalogue-heading { align-items: start; flex-direction: column; }.intent-grid, .tool-grid { grid-template-columns: 1fr; }.intent-card { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }.intent-card:last-child { border-bottom: 0 !important; }
  .filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .3rem; }.sort-control { justify-self: start; }.tool-card { min-height: 440px; }
  .about { grid-template-columns: 1fr; }.about h2 br { display: none; }footer { flex-direction: column; align-items: flex-start; padding-top: 2rem; padding-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } .tool-card, .button { transition: none; } }
