:root {
  --bg: #faf6ee;
  --surface: #fffdf8;
  --surface-soft: #f4ece0;
  --ink: #2f2722;
  --ink-muted: #6c5e53;
  --accent: #d97736;
  --accent-dark: #b95e22;
  --sage: #4f8a6b;
  --border: #e7dccb;
  --shadow: 0 10px 28px rgba(64, 43, 25, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3b26a, #d97736);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(217, 119, 54, 0.28);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(217, 119, 54, 0.25);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-sage {
  background: var(--sage);
  color: #fff;
}

/* Breadcrumbs & Hero */
.breadcrumbs {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 18px 0 8px;
}
.breadcrumbs a { color: var(--ink-muted); }
.hero {
  padding: 24px 0 18px;
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.lead {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 1.04rem;
  max-width: 760px;
}

/* Arena Embed Shell */
.arena-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 14px 0 28px;
}
.arena-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.arena-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
}
.arena-frame-wrap {
  position: relative;
  width: 100%;
  background: #f6efe3;
  display: flex;
  justify-content: center;
}
.arena-frame {
  width: 100%;
  height: 680px;
  max-height: 82vh;
  border: 0;
  display: block;
  background: #faf6ee;
}
.arena-placeholder {
  padding: 48px 24px;
  text-align: center;
  max-width: 560px;
}

/* Cards & Grids */
.section {
  padding: 20px 0 32px;
}
.section h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(64, 43, 25, 0.04);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}
.card p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.tag-free {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #e5f3ea;
  color: #2f6c4c;
}
.tag-pro {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #fbe8d8;
  color: #a94f16;
}

/* Study Sheet Table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:last-child td { border-bottom: 0; }
.term-cell { font-weight: 800; color: var(--ink); white-space: nowrap; }

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
}
.faq-item p {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Unlock Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 24, 16, 0.56);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  max-width: 460px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.price-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-dark);
  margin: 8px 0;
}
.check-list {
  margin: 12px 0 18px;
  padding-left: 20px;
  color: var(--ink-muted);
}
.check-list li { margin-bottom: 6px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0 42px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .arena-frame { height: 600px; }
  .header-inner { padding: 8px 0; }
  .nav { gap: 12px; }
}
