:root {
    --bg: #F3F6F5; --surface: #FFFFFF; --ink: #142420; --muted: #55665F;
    --line: #D6E0DC; --accent: #1E6B55; --accent-ink: #FFFFFF; --soft: #E6EFEB;
    --pos: #1E6B55; --neg: #B3412F;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0F1815; --surface: #16231F; --ink: #E6EFEC; --muted: #9AB0A8;
      --line: #283A34; --accent: #5CC2A0; --accent-ink: #0A1411; --soft: #1C2D28;
      --pos: #5CC2A0; --neg: #E48A78;
      color-scheme: dark;
    }
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 1.0625rem; line-height: 1.65; }
  a { color: var(--accent); }
  a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
  code { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .82em; background: var(--soft); padding: .1rem .35rem; border-radius: 5px; }
  .wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

  header.top { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
  header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
  .brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
  .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; }
  nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
  nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem; }
  nav a:hover { color: var(--ink); }

  .hero { padding: 5rem 0 4rem; }
  .kicker { color: var(--accent); font-weight: 700; margin: 0 0 .8rem; }
  .hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 1.25rem; max-width: 17ch; }
  .hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin: 0; }

  section { padding: 3.75rem 0; border-top: 1px solid var(--line); }
  h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 1rem; }
  h3 { font-size: 1.1rem; margin: 0 0 .35rem; }
  .prose { max-width: 64ch; }
  .prose p { margin: 0 0 1rem; }
  .muted { color: var(--muted); }

  .principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem 2.5rem; margin-top: 2rem; }
  .principles p { margin: 0; color: var(--muted); }

  .tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; margin-top: 1.5rem; }
  .features { display: grid; gap: 1.5rem; }
  .features p { margin: 0; color: var(--muted); }
  .ai-note { background: var(--surface); border-left: 4px solid var(--accent); padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; margin-top: 1.75rem; font-size: .98rem; }

  .console { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .console-bar { display: flex; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
  .console-bar span:last-child { color: var(--muted); font-weight: 600; }
  .table-scroll { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: .88rem; }
  th, td { padding: .65rem .8rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
  th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
  th { color: var(--muted); font-weight: 600; }
  tr:last-child td { border-bottom: 0; }
  td.num { font-family: "JetBrains Mono", ui-monospace, monospace; }
  .pos { color: var(--pos); font-weight: 600; } .neg { color: var(--neg); font-weight: 600; }
  .status { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--soft); font-size: .8rem; }
  .caption { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; }

  dl.api { display: grid; grid-template-columns: 13rem 1fr; gap: 0; margin: 1.75rem 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  dl.api dt, dl.api dd { margin: 0; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
  dl.api dt { font-weight: 700; background: var(--soft); }
  dl.api dt:last-of-type, dl.api dd:last-of-type { border-bottom: 0; }

  .policy-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
  .policy-links a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; text-decoration: none; color: var(--ink); }
  .policy-links a:hover { border-color: var(--accent); }
  .policy-links strong { display: block; font-size: 1.1rem; margin-bottom: .3rem; }
  .policy-links span { color: var(--muted); }

  .legal { padding: 3.5rem 0 4rem; }
  .legal article { max-width: 66ch; }
  .legal h1 { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 .4rem; }
  .legal .updated { color: var(--muted); margin: 0 0 2.25rem; }
  .legal h2 { font-size: 1.25rem; margin: 2.25rem 0 .6rem; }
  .legal li { margin-bottom: .45rem; }
  .back { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; text-decoration: none; }

  footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2.75rem 0 2rem; color: var(--muted); font-size: .93rem; }
  .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
  footer h3 { color: var(--ink); font-size: .98rem; margin: 0 0 .6rem; }
  footer p { margin: 0 0 .3rem; }
  footer a { color: var(--muted); }
  footer ul { list-style: none; padding: 0; margin: 0; }
  footer li { margin-bottom: .3rem; }
  .footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }


  @media (max-width: 800px) {
    .tool-grid { grid-template-columns: 1fr; gap: 2rem; }
    dl.api { grid-template-columns: 1fr; }
    dl.api dt { border-bottom: 0; padding-bottom: .25rem; }
    dl.api dd { padding-top: .25rem; }
    .hero { padding: 3.25rem 0 2.75rem; }
  }
