:root {
  --bg: #FAFAFA;
  --bg-alt: #F4F4F0;
  --text: #1A1A1A;
  --text-muted: #6B6B66;
  --border: #E5E5E0;
  --accent: #2C4A3E;
  --accent-soft: #E8EDE9;
  --code-bg: #F7F7F4;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 4px 16px rgba(26, 26, 26, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; transition: color 150ms ease; }
a:hover { color: #1f352c; text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section.s-green { background: #F0F5F1; }
.section.s-amber { background: #FBF7EC; }
.section.s-lavender { background: #F4F1F8; }
.section.s-rose { background: #F7F0F0; }
.section.s-blue { background: #F0F4F8; }

.section h2 {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 60px;
  max-width: none;
  padding: 0;
}
nav.site-nav { display: flex; gap: 0; flex: 1; height: 100%; }
nav.site-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding: 0 16px;
  border-radius: 0;
  transition: flex 200ms ease;
}
nav.site-nav a:hover { flex: 1.3; }
nav.site-nav a:first-child { border-radius: 0; }
nav.site-nav a:last-child { border-radius: 0; }
nav.site-nav a:nth-child(1) { background: #B8D4C7; }
nav.site-nav a:nth-child(2) { background: #EDD9A0; }
nav.site-nav a:nth-child(3) { background: #D0C5DD; }
nav.site-nav a:nth-child(4) { background: #E0BCBC; }
nav.site-nav a:nth-child(5) { background: #BCCFDA; }
nav.site-nav a:hover { text-decoration: none; }
@media (max-width: 640px) { nav.site-nav { gap: 0; font-size: 11px; } }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 48px; text-align: center; }
.hero .tagline {
  font-size: 20px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 820px;
  line-height: 1.6;
}
.hero-note {
  font-size: 15px;
  color: var(--text-muted);
  margin: 40px auto 0;
  line-height: 1.6;
  max-width: 820px;
  opacity: 0;
  transition: opacity 600ms ease;
}
.hero-note.visible { opacity: 1; }
.hero-note a { font-weight: 500; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-radius 200ms ease-out;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-alt); border-color: #d4d4cc; }

/* ---------- Pillars ---------- */
.pillars { max-width: 760px; }
.pillar {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.pillar:first-child { padding-top: 0; }
.pillar:last-child { border-bottom: none; padding-bottom: 0; }
.pillar .num {
  font-family: "Lora", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  min-width: 32px;
}
.pillar .body h3 { font-size: 19px; margin-bottom: 6px; }
.pillar .body p { font-size: 15.5px; color: var(--text-muted); margin: 0; line-height: 1.6; }
@media (min-width: 880px) {
  .pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
  .pillar:nth-child(1) { border-bottom: none; padding-bottom: 0; }
  .pillar:nth-child(2) { border-bottom: none; padding-bottom: 0; padding-top: 0; }
  .pillar:nth-child(3) { padding-top: 28px; border-bottom: none; padding-bottom: 0; }
  .pillar:nth-child(4) { padding-top: 28px; }
}

/* ---------- Generator ---------- */
.generator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 880px) { .generator { grid-template-columns: 360px 1fr; } }

.gen-form { display: flex; flex-direction: column; gap: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder { color: #b0b0a8; }

.gen-outputs { display: flex; flex-direction: column; gap: 20px; }

.output-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.output-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
}
.copy-btn {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.copy-btn:hover { background: transparent; color: var(--accent); border-color: var(--border); }
.copy-btn.copied { background: #2E9F6E; color: #fff; border-color: #2E9F6E; }
.output-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Matrix Table ---------- */
.matrix-wrap { overflow-x: auto; }
table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
table.matrix th, table.matrix td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
table.matrix th:last-child, table.matrix td:last-child { border-right: none; }
table.matrix thead th {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
table.matrix tbody tr:last-child td { border-bottom: none; }
table.matrix .use { font-weight: 500; }
table.matrix td.matrix-status { text-align: center; }
.matrix-icon { display: inline-flex; align-items: center; justify-content: center; }
.matrix-icon svg { width: 22px; height: 22px; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.faq-group {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 4px;
}
.faq-group:first-child { margin-top: 0; }
details.faq {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
details.faq[open] { border-color: #d4d4cc; box-shadow: var(--shadow); }
details.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 500;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .chev {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 13px;
  transition: transform 150ms ease;
}
details.faq[open] summary .chev { transform: rotate(90deg); }
details.faq .answer { padding: 0 22px 20px; color: var(--text-muted); font-size: 15px; }

/* ---------- Full License ---------- */
.license-doc {
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: #fff;
  padding: 40px;
  border-radius: 12px;
}
@media (max-width: 640px) { .license-doc { padding: 24px 16px; } }
.license-doc h3 {
  font-size: 24px;
  margin: 32px 0 12px;
}
.license-doc h4 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.license-doc p, .license-doc li { font-size: 15.5px; }
.license-doc ul { padding-left: 20px; margin: 0 0 16px; }
.license-doc li { margin-bottom: 8px; }
.license-doc blockquote {
  margin: 0 0 20px;
  padding: 12px 20px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}
.license-doc .divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.license-doc .closing {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 28px;
}
.license-doc strong { font-weight: 600; }

/* ---------- Footer ---------- */
.footer-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
}
