:root {
  --ground: #e9eee6;
  --ground-art:
    radial-gradient(circle at 12% 10%, rgba(51, 100, 74, 0.14), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(74, 128, 98, 0.13), transparent 45%),
    radial-gradient(circle at 75% 82%, rgba(51, 100, 74, 0.08), transparent 48%),
    var(--ground);
  --glass: rgba(248, 250, 246, 0.72);
  --glass-strong: rgba(252, 253, 250, 0.88);
  --glass-edge: rgba(255, 255, 255, 0.78);
  --panel: #fdfdfb;
  --panel-2: #f4f6f1;
  --control: rgba(255, 255, 255, 0.82);
  --text: #1e2520;
  --muted: #5d655b;
  --line: rgba(30, 40, 33, 0.13);
  --line-strong: rgba(30, 40, 33, 0.24);
  --accent: #33644a;
  --accent-strong: #2b5640;
  --accent-ink: #ffffff;
  --accent-soft: rgba(51, 100, 74, 0.11);
  --accent-softer: rgba(51, 100, 74, 0.06);
  --danger: #a2342f;
  --warn-bg: #fbf0dc;
  --warn-fg: #674a22;
  --warn-line: #d9b77f;
  --ok-bg: #dcefe2;
  --ok-fg: #1f4d33;
  --bad-bg: #f7dcda;
  --bad-fg: #7a2d2a;
  --logo-moss: #38694f;
  --shadow-sm: 0 1px 2px rgba(22, 40, 29, 0.06);
  --shadow: 0 1px 2px rgba(22, 40, 29, 0.05), 0 8px 22px -10px rgba(22, 40, 29, 0.16);
  --shadow-glass: inset 0 1px 0 var(--glass-edge), 0 1px 2px rgba(22, 40, 29, 0.05), 0 14px 34px -18px rgba(22, 40, 29, 0.28);
  --shadow-pop: inset 0 1px 0 var(--glass-edge), 0 28px 70px -20px rgba(16, 30, 22, 0.42), 0 4px 14px rgba(16, 30, 22, 0.1);
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111613;
    --ground-art:
      radial-gradient(circle at 14% 12%, rgba(140, 195, 163, 0.11), transparent 42%),
      radial-gradient(circle at 86% 20%, rgba(56, 112, 79, 0.14), transparent 45%),
      var(--ground);
    --glass: rgba(30, 38, 33, 0.68);
    --glass-strong: rgba(28, 35, 31, 0.9);
    --glass-edge: rgba(255, 255, 255, 0.08);
    --panel: #1b221e;
    --panel-2: #212a25;
    --control: rgba(255, 255, 255, 0.08);
    --text: #e8ebe6;
    --muted: #a8b2a8;
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #8cc3a3;
    --accent-strong: #38704f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(140, 195, 163, 0.16);
    --accent-softer: rgba(140, 195, 163, 0.08);
    --danger: #e39a94;
    --warn-bg: #382f22;
    --warn-fg: #e7cd9e;
    --warn-line: #68553b;
    --ok-bg: #24452f;
    --ok-fg: #cfe9d7;
    --bad-bg: #4a2624;
    --bad-fg: #f1c9c6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.52);
    --shadow-glass: inset 0 1px 0 var(--glass-edge), 0 16px 38px -18px rgba(0, 0, 0, 0.65);
    --shadow-pop: inset 0 1px 0 var(--glass-edge), 0 30px 76px -18px rgba(0, 0, 0, 0.72);
  }
}

html[data-theme="dark"] {
  --ground: #111613;
  --ground-art:
    radial-gradient(circle at 14% 12%, rgba(140, 195, 163, 0.11), transparent 42%),
    radial-gradient(circle at 86% 20%, rgba(56, 112, 79, 0.14), transparent 45%),
    var(--ground);
  --glass: rgba(30, 38, 33, 0.68);
  --glass-strong: rgba(28, 35, 31, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.08);
  --panel: #1b221e;
  --panel-2: #212a25;
  --control: rgba(255, 255, 255, 0.08);
  --text: #e8ebe6;
  --muted: #a8b2a8;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #8cc3a3;
  --accent-strong: #38704f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(140, 195, 163, 0.16);
  --accent-softer: rgba(140, 195, 163, 0.08);
  --danger: #e39a94;
  --warn-bg: #382f22;
  --warn-fg: #e7cd9e;
  --warn-line: #68553b;
  --ok-bg: #24452f;
  --ok-fg: #cfe9d7;
  --bad-bg: #4a2624;
  --bad-fg: #f1c9c6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.52);
  --shadow-glass: inset 0 1px 0 var(--glass-edge), 0 16px 38px -18px rgba(0, 0, 0, 0.65);
  --shadow-pop: inset 0 1px 0 var(--glass-edge), 0 30px 76px -18px rgba(0, 0, 0, 0.72);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--line-strong) var(--ground);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground-art);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Header (Moss Glass Bar) ---------- */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin-inline: auto;
  width: calc(100% - 24px);
  max-width: 1100px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: saturate(170%) blur(26px);
  -webkit-backdrop-filter: saturate(170%) blur(26px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-glass);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-softer);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn,
.lang-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover,
.lang-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel);
}

html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--control);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--panel);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-strong), color-mix(in srgb, var(--accent-strong) 82%, #000));
  border-color: var(--accent-strong);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
  filter: brightness(1.06);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */
main {
  flex: 1;
  padding-top: 32px;
  padding-bottom: 64px;
}

.hero {
  padding: 36px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 36px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 4.4vw, 3.35rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.hero-sublink {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.shot-frame {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 10px;
  box-shadow: var(--shadow);
}

.shot-frame img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.shot-dark { display: none; }
html[data-theme="dark"] .shot-light { display: none; }
html[data-theme="dark"] .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}

/* ---------- Sections & Paper Cards ---------- */
.section {
  padding-top: 56px;
}

.section-head {
  margin-bottom: 24px;
  max-width: 62ch;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel h3 {
  font-size: 1.08rem;
  font-weight: 650;
  margin: 0 0 8px;
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.role-example {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--text);
}

.icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* ---------- Privacy Section ---------- */
.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.privacy-list svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.notice-honest {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-fg);
  font-size: 0.94rem;
}

/* ---------- Pricing & Comparison ---------- */
.deal-banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--ok-bg);
  color: var(--ok-fg);
  border: 1px solid var(--line);
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--accent);
}

.price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 650;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.price-amount {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}

.price-old {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 8px;
  font-weight: 500;
}

.price-meta {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  color: var(--muted);
}

.price-card .btn {
  margin-top: auto;
  width: 100%;
}

.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.95rem;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--panel-2);
  font-weight: 650;
}

.pro-only-box,
.pricing-notes {
  margin-top: 18px;
}

/* ---------- Downloads ---------- */
.dl-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 8px 0 16px;
  font-variant-numeric: tabular-nums;
}

.beta-pill {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 780px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0 20px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Dialog (Checkout Modal) ---------- */
dialog.modal {
  width: min(92vw, 440px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--glass-strong);
  backdrop-filter: saturate(170%) blur(26px);
  -webkit-backdrop-filter: saturate(170%) blur(26px);
  color: var(--text);
  padding: 24px;
  box-shadow: var(--shadow-pop);
  margin: auto;
}

dialog.modal::backdrop {
  background: rgba(18, 30, 23, 0.36);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.22rem;
}

.field {
  margin: 14px 0;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.field input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  font: inherit;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  margin: 12px 0;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent-strong);
  flex-shrink: 0;
}

.alert-bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.92rem;
  margin: 12px 0;
}

.alert-ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.95rem;
}

.license-key-box {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  margin: 12px 0;
  word-break: break-all;
}

.subpage-wrap {
  max-width: 740px;
  margin-inline: auto;
}

.subpage-wrap h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 500;
  margin: 0 0 12px;
}

.steps-ol {
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 28px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .grid-3,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 16px);
    top: 8px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 20px 0 28px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .panel {
    padding: 18px;
  }
}

/* ---------- Solid Fallback & Reduced Motion (DESIGN.md) ---------- */
@media (prefers-reduced-transparency: reduce) {
  .site-header,
  dialog.modal {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header,
  dialog.modal {
    background: var(--panel);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
