:root {
  --color-navy-950: #031c3d;
  --color-navy-900: #06254d;
  --color-navy-800: #0a3264;
  --color-ice-50: #f4fbff;
  --color-ice-100: #eaf7ff;
  --color-surface: #ffffff;
  --color-ink: #031a3b;
  --color-muted: #52677e;
  --color-border: #c6dbe9;
  --color-border-dark: #476789;
  --color-lime: #cfff00;
  --color-lime-soft: #f0ffd0;
  --color-coral: #ff7168;
  --color-blue: #2475ff;
  --color-teal: #37c9a5;
  --color-white: #ffffff;
  --color-shadow: rgb(3 28 61 / 0.12);
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell: 1536px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --radius-window: 14px;
  --shadow-window: 0 24px 70px var(--color-shadow);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--color-ice-50);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--color-ink);
  background: var(--color-ice-50);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-lime);
  outline-offset: 4px;
}

::selection { color: var(--color-navy-950); background: var(--color-lime); }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--color-navy-950);
  background: var(--color-lime);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  position: relative;
  z-index: 100;
  height: 76px;
  color: var(--color-white);
  background: var(--color-navy-950);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.wordmark {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.2vw, 48px);
}

.site-header nav a {
  color: rgb(255 255 255 / 0.88);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 160ms var(--ease-out);
}

.site-header nav a:hover { color: var(--color-lime); }

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.hero {
  min-height: calc(100svh - 76px);
  background: var(--color-ice-50);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  min-height: calc(100svh - 76px);
  padding-top: 54px;
  padding-bottom: 48px;
}

.hero-copy { position: relative; z-index: 5; min-width: 0; }

.hero-copy h1 {
  max-width: 7.2ch;
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(4.5rem, 6vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.92;
  text-wrap: balance;
}

.hero-copy p {
  max-width: 32rem;
  margin: 34px 0 0;
  font-size: clamp(1rem, 1.3vw, 1.17rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 34px;
  padding: 0 30px;
  color: var(--color-navy-950);
  background: var(--color-lime);
  border: 1px solid var(--color-lime);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 800;
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.primary-button:hover { background: var(--color-white); transform: translateY(-2px); }

.hero-stage {
  position: relative;
  min-width: 0;
  height: clamp(590px, 67vh, 660px);
}

.tool-window {
  position: absolute;
  display: block;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid rgb(3 28 61 / 0.08);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.tool-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 78px rgb(3 28 61 / 0.17);
}

.tool-window--main {
  top: 6%;
  right: 0;
  width: 100%;
  height: 78%;
  overflow: hidden;
}

.tool-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 24%;
  padding: 28px 16px;
  border-right: 1px solid var(--color-border);
}

.tool-sidebar strong { margin: 0 8px 18px; font-size: 0.9rem; }
.tool-sidebar span { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 5px; color: var(--color-muted); font-size: 0.7rem; }
.tool-sidebar span.is-selected { color: var(--color-ink); background: var(--color-lime-soft); }
.tool-sidebar i { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 2px; }

.tool-canvas { height: 100%; margin-left: 24%; padding: 30px 28px; }
.tool-canvas__head { display: flex; align-items: center; justify-content: space-between; }
.tool-canvas__head strong { font-size: 1.25rem; }
.tool-canvas__head span { color: var(--color-muted); font-size: 0.74rem; }

.map-panel {
  height: 44%;
  margin-top: 22px;
  overflow: hidden;
  background: var(--color-ice-100);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.map-panel svg { display: block; width: 100%; height: 100%; }
.map-line { fill: none; stroke: var(--color-border); stroke-width: 2; }
.map-line--secondary { stroke-width: 1; opacity: 0.85; }
.river-line { fill: none; stroke: var(--color-blue); stroke-width: 5; opacity: 0.25; }
.map-dot { stroke: var(--color-surface); stroke-width: 5; }
.map-dot--blue { fill: var(--color-blue); }
.map-dot--coral { fill: var(--color-coral); }
.map-dot--lime { fill: var(--color-lime); }

.signal-list { margin-top: 15px; }
.signal-list div { display: grid; grid-template-columns: 10px 92px 1fr 20%; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--color-border); }
.signal-list span { color: var(--color-muted); font-size: 0.69rem; }
.signal-list b { height: 5px; background: var(--color-border); border-radius: 3px; }
.signal { width: 7px; height: 7px; border-radius: 50%; }
.signal--coral { background: var(--color-coral); }
.signal--blue { background: var(--color-blue); }
.signal--lime { background: var(--color-lime); }

.tool-window--prompt {
  bottom: 2%;
  left: -7%;
  z-index: 3;
  width: 47%;
  min-height: 42%;
  padding: 24px 22px 18px;
}

.tool-window--prompt > strong,
.tool-window--review > strong { font-size: 0.98rem; }

.prompt-box {
  margin-top: 16px;
  padding: 15px 16px;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
}

.down-icon { display: block; width: 18px; margin: 10px auto; fill: none; stroke: var(--color-border-dark); stroke-width: 1.5; }

.result-box { position: relative; display: grid; gap: 9px; padding: 14px 14px 16px 29px; background: var(--color-lime-soft); border-radius: 6px; }
.result-box span { width: 78%; height: 5px; background: var(--color-border); border-radius: 4px; }
.result-box span:nth-child(2) { width: 55%; }
.result-box span:nth-child(3) { width: 66%; }
.result-box i { position: absolute; left: 14px; width: 6px; height: 6px; background: var(--color-lime); border-radius: 50%; }
.result-box i:nth-of-type(1) { top: 15px; }
.result-box i:nth-of-type(2) { top: 29px; }
.result-box i:nth-of-type(3) { top: 43px; }
.mini-action { display: flex; justify-content: flex-end; margin-top: 10px; }
.mini-action span { width: 72px; height: 26px; background: var(--color-lime); border-radius: 4px; }

.tool-window--review {
  right: -5%;
  bottom: -3%;
  z-index: 4;
  width: 52%;
  min-height: 38%;
  padding: 24px 22px 18px;
}

.review-columns { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center; gap: 8px; margin-top: 17px; }
.review-columns > div { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--color-border); border-radius: 6px; }
.review-columns span { height: 5px; background: var(--color-border); border-radius: 4px; }
.review-columns i, .review-columns b { width: 52%; height: 6px; background: var(--color-coral); border-radius: 4px; }
.review-columns b { background: var(--color-blue); }
.review-columns svg { width: 18px; fill: none; stroke: var(--color-border-dark); stroke-width: 1.5; }
.review-summary { display: grid; grid-template-columns: 7px 1fr 1fr; gap: 9px; align-items: center; margin-top: 12px; padding: 13px; background: var(--color-lime-soft); border-radius: 6px; }
.review-summary i { width: 7px; height: 7px; background: var(--color-lime); border-radius: 50%; }
.review-summary span { height: 5px; background: var(--color-border); border-radius: 4px; }

.tools-section { color: var(--color-white); background: var(--color-navy-950); padding: 104px 0 96px; }
.tools-layout, .more-tools-layout, .notes-layout { display: grid; grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.62fr); gap: clamp(48px, 7vw, 112px); }
.section-intro h2, .about-section h2 { margin: 0; font-size: clamp(3.5rem, 5.4vw, 5.4rem); font-weight: 800; letter-spacing: -0.06em; line-height: 0.96; }
.section-intro p { max-width: 29rem; margin: 34px 0 0; font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--color-muted); }
.section-intro--light p { color: rgb(255 255 255 / 0.74); }

.tool-directory a { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 0.9fr) 96px; align-items: center; gap: 34px; min-height: 112px; border-bottom: 1px solid; }
.tool-directory a:first-child { border-top: 1px solid; }
.tool-directory--dark a { border-color: var(--color-border-dark); }
.tool-directory--light a { border-color: var(--color-border); }
.tool-directory strong { font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: -0.035em; }
.tool-directory span { color: var(--color-muted); font-size: 0.98rem; line-height: 1.45; }
.tool-directory--dark span { color: rgb(255 255 255 / 0.72); }
.tool-directory b { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; color: var(--color-navy-950); background: var(--color-lime); border-radius: 4px; transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out); }
.tool-directory a:hover b { background: var(--color-white); transform: translateX(4px); }

.more-tools { padding: 48px 0 104px; background: var(--color-ice-50); }
.tool-directory--light a:hover b { background: var(--color-navy-950); color: var(--color-white); }

.notes-section { padding: 120px 0; background: var(--color-ice-50); }
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list a { display: grid; grid-template-columns: 150px minmax(0, 1fr) 60px; align-items: center; gap: 28px; min-height: 96px; border-bottom: 1px solid var(--color-border); }
.note-list li:first-child a { border-top: 1px solid var(--color-border); }
.note-list time { color: var(--color-muted); font-size: 0.95rem; }
.note-list strong { font-size: clamp(1.05rem, 1.5vw, 1.35rem); letter-spacing: -0.025em; }
.note-list b { color: #88a900; transition: color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.note-list a:hover b { color: var(--color-navy-950); transform: translateX(3px); }

.about-section { color: var(--color-white); background: var(--color-navy-950); padding: 104px 0; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr); align-items: center; gap: clamp(64px, 10vw, 160px); }
.about-section p { max-width: 34rem; margin: 0; color: rgb(255 255 255 / 0.76); font-size: clamp(1.18rem, 1.8vw, 1.5rem); line-height: 1.55; text-wrap: pretty; }

.site-footer { padding: 30px 0; background: var(--color-ice-50); }
.footer-layout { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.footer-layout strong { font-size: 1.1rem; }
.footer-layout div { display: flex; align-items: center; gap: 0; }
.footer-layout div a { padding: 4px 24px; font-weight: 600; }
.footer-layout div a + a { border-left: 1px solid var(--color-border); }
.footer-layout a:hover { color: #718d00; }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 36px; }
  .hero-copy h1 { font-size: clamp(4rem, 7.6vw, 5.25rem); }
  .hero-stage { height: 580px; }
  .tool-window--main { width: 94%; }
  .tool-window--prompt { width: 49%; }
  .tool-window--review { width: 58%; }
  .tool-directory a { grid-template-columns: minmax(170px, 1fr) minmax(180px, 0.9fr) 80px; gap: 22px; }
}

@media (max-width: 820px) {
  .site-header { height: 68px; }
  .menu-button { display: inline-flex; }
  .site-header nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--color-navy-950);
    border-top: 1px solid rgb(255 255 255 / 0.08);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 220ms var(--ease-out), visibility 220ms step-end;
  }
  .site-header nav.is-open { transform: translateY(0); visibility: visible; transition: transform 220ms var(--ease-out), visibility 0ms step-start; }
  .site-header nav a { padding: 12px 0; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 58px; min-height: auto; padding-top: 72px; padding-bottom: 96px; }
  .hero-copy h1 { font-size: clamp(3.7rem, 13vw, 5.5rem); }
  .hero-stage { height: auto; display: grid; gap: 18px; }
  .tool-window { position: relative; inset: auto; width: 100%; min-height: 0; }
  .tool-window--main { height: 510px; }
  .tool-window--prompt, .tool-window--review { padding: 24px; }
  .tools-layout, .more-tools-layout, .notes-layout, .about-layout { grid-template-columns: 1fr; gap: 52px; }
  .more-tools-layout > div[aria-hidden] { display: none; }
  .tools-section, .notes-section, .about-section { padding: 88px 0; }
  .more-tools { padding: 28px 0 88px; }
  .tool-directory a { grid-template-columns: 1fr 88px; gap: 10px 20px; padding: 24px 0; }
  .tool-directory a span { grid-column: 1 / 2; }
  .tool-directory a b { grid-column: 2; grid-row: 1 / 3; }
  .note-list a { grid-template-columns: 120px minmax(0, 1fr) 48px; gap: 18px; }
}

@media (max-width: 560px) {
  .hero-grid { padding-top: 56px; }
  .hero-copy h1 { font-size: clamp(3.25rem, 15.2vw, 4.4rem); letter-spacing: -0.07em; }
  .hero-copy p { margin-top: 26px; }
  .primary-button { width: 100%; }
  .tool-window--main { height: 430px; }
  .tool-sidebar { display: none; }
  .tool-canvas { margin-left: 0; padding: 24px 20px; }
  .tool-window--prompt, .tool-window--review { border-radius: 10px; }
  .review-columns { grid-template-columns: 1fr 16px 1fr; }
  .section-intro h2, .about-section h2 { font-size: clamp(3rem, 15vw, 4.1rem); }
  .tool-directory a { grid-template-columns: 1fr; gap: 12px; }
  .tool-directory a span { grid-column: auto; }
  .tool-directory a b { grid-column: auto; grid-row: auto; width: 100%; margin-top: 8px; }
  .note-list a { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 22px 0; }
  .note-list time { grid-column: 1 / -1; }
  .note-list strong { grid-column: 1; }
  .note-list b { grid-column: 2; }
  .footer-layout { align-items: flex-start; flex-direction: column; }
  .footer-layout div { width: 100%; }
  .footer-layout div a { flex: 1; padding: 4px 0; }
  .footer-layout div a + a { padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
