:root {
  --ink: #141a17;
  --ink-soft: #24302a;
  --paper: #ffffff;
  --canvas: #f4f6f4;
  --line: #e2e6e2;
  --muted: #64716a;
  --muted-dark: #a8b3ac;
  --lime: #c4e84f;
  --lime-deep: #9dc633;
  --coral: #ff795e;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --radius: 10px;
  --shadow: 0 14px 40px rgba(20, 26, 23, 0.08);
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  letter-spacing: 0;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lime);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand img {
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  color: var(--ink-soft);
}

.site-nav a:not(.nav-cta):hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-cta {
  padding: 9px 16px;
  background: var(--ink);
  color: #f4f7f2;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--ink-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  background: var(--ink);
  color: #f4f7f2;
  overflow: hidden;
}

.hero-inner {
  padding: 96px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 14vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  color: #ffffff;
}

.hero-lede {
  margin: 28px 0 0;
  font-size: clamp(19px, 3vw, 27px);
  line-height: 1.45;
  color: #d6ded8;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
}

.button-primary {
  background: var(--lime);
  color: var(--ink);
}

.button-primary:hover {
  background: #d1f163;
}

.button-ghost {
  background: transparent;
  color: #f4f7f2;
  border-color: #3a463f;
}

.button-ghost:hover {
  border-color: #748078;
}

.hero-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.hero-tools a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #334039;
  border-radius: 8px;
  color: #c3cec7;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.hero-tools a:hover {
  color: #ffffff;
  border-color: #65746b;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-lime {
  background: var(--lime);
}

.dot-blue {
  background: var(--blue);
}

.dot-indigo {
  background: var(--indigo);
}

/* Section headings */
.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading .eyebrow {
  color: var(--muted);
}

.section-heading .eyebrow span {
  background: var(--lime-deep);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 18px 0 0;
  font-size: 17px;
  color: var(--muted);
}

/* Tools */
.tools {
  padding: 96px 0;
  background: var(--paper);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(20, 26, 23, 0.03);
}

.tool-card-rolecase {
  border-top: 4px solid var(--lime);
}

.tool-card-ofd {
  border-top: 4px solid var(--blue);
}

.tool-card-markdown {
  border-top: 4px solid var(--indigo);
}

.tool-media {
  margin: 0;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  position: relative;
}

.tool-media-rolecase {
  background: #edf2e6;
}

.tool-media-ofd {
  background: linear-gradient(135deg, #eaf2ff 0%, #dfe9ff 100%);
}

.tool-media-markdown {
  padding: 0;
  background: #eef0ee;
}

.tool-media-markdown img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.tool-media figcaption {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tool-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tool-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tool-title-row h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.tool-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 17px;
}

.tool-open:hover {
  color: var(--ink);
  border-color: #b8c1ba;
}

.tool-tagline {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.tool-desc {
  margin: 16px 0 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

.tool-tags {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-tags li {
  font-size: 12px;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
}

/* Principles */
.principles {
  padding: 96px 0;
  background: var(--canvas);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.principle-index {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--lime-deep);
  background: #eef3e1;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.principles-grid h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.principles-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Contact */
.contact {
  background: var(--ink);
  color: #f4f7f2;
}

.contact-inner {
  padding: 88px 0;
}

.eyebrow-dark {
  color: var(--lime);
}

.eyebrow-dark span {
  background: var(--lime);
}

.contact h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.contact p {
  margin: 18px 0 30px;
  max-width: 560px;
  color: #c3cec7;
  font-size: 17px;
}

/* Footer */
.site-footer {
  background: #0f1411;
  color: #b8c3bb;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-brand .brand {
  color: #f4f7f2;
}

.footer-brand p {
  margin: 14px 0 0;
  color: #8f9c94;
}

.footer-links {
  display: flex;
  gap: 72px;
}

.footer-links h3 {
  margin: 0 0 14px;
  color: #f4f7f2;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  margin-bottom: 10px;
  color: #9faba3;
  font-size: 15px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid #25302a;
  font-size: 13px;
  color: #7d8a82;
}

.footer-bottom a {
  color: #9faba3;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* Privacy page */
.page {
  padding: 72px 0;
}

.page-inner {
  max-width: 720px;
}

.page .eyebrow {
  color: var(--muted);
}

.page .eyebrow span {
  background: var(--lime-deep);
}

.page h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page h2 {
  margin: 32px 0 10px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.page p,
.page li {
  color: var(--muted);
  font-size: 16px;
}

.page ul {
  padding-left: 22px;
}

.page a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 860px) {
  .tools-grid,
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principles-grid {
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 36px;
  }

  .footer-links {
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px 10px;
    border-radius: 8px;
  }

  .site-nav a:hover {
    background: var(--canvas);
  }

  .site-nav .nav-cta {
    text-align: center;
    margin-top: 6px;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero-inner {
    padding: 64px 0 52px;
  }

  .tools,
  .principles {
    padding: 64px 0;
  }

  .contact-inner {
    padding: 64px 0;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
