/* Editorial Public Website & Guides Stylesheet */
:root {
  --bg: #f7f4ee;
  --bg-muted: #efeae0;
  --surface: #fdfcf9;
  --surface-hover: #ece6da;
  --rule: #e3ddd1;
  --rule-strong: #cbc3b4;
  --text: #1b1917;
  --text-muted: #5b554d;
  --text-soft: #8d867b;
  --ink-btn: #1b1917;
  --ink-btn-text: #fdfcf9;
  --accent: #b84a27;
  --accent-soft: rgba(184, 74, 39, 0.09);
  --sage: #2d6a4f;
  --sage-soft: rgba(45, 106, 79, 0.11);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

@keyframes pubFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sticky Editorial Header */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.pub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
}

.pub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pub-brand:hover { color: var(--text); }

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--ink-btn);
  color: var(--ink-btn-text);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  font-weight: 600;
}

.pub-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.pub-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.14s ease;
}
.pub-links a:hover, .pub-links a[aria-current="page"] { color: var(--text); }

.pub-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-mobile-guide {
  display: none;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 8px;
}
.pub-mobile-guide:hover { color: var(--text); }

.pbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 17px;
  border-radius: 7px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.pbtn:hover { background: var(--surface-hover); color: var(--text); }
.pbtn:active { transform: scale(0.985); }
.pbtn-primary {
  background: var(--ink-btn);
  border-color: var(--ink-btn);
  color: var(--ink-btn-text);
}
.pbtn-primary:hover { opacity: 0.9; background: var(--ink-btn); color: var(--ink-btn-text); }

/* Editorial Hero Spread */
.hero {
  padding-top: 62px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 48px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.9vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero p.lead {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 17.5px;
  line-height: 1.62;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-soft);
}

/* Interactive Workbench Specimen */
.specimen-card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 14px 36px rgba(27, 25, 23, 0.05);
}

.specimen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.specimen-tabs {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.specimen-tabs::-webkit-scrollbar { display: none; }

.spec-tab {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.spec-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.spec-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sage);
  font-weight: 500;
}

.spec-prompt {
  margin: 14px 0 12px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.42;
  color: var(--text);
}

.spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  color: var(--text-muted);
  transition: all 0.16s var(--ease-out);
}
.preview-chip:hover { border-color: var(--accent); color: var(--text); }
.preview-chip.hit {
  background: var(--sage-soft);
  color: var(--sage);
  border-color: var(--sage);
  font-weight: 600;
}
.preview-chip.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.spec-def-box {
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--bg);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  animation: pubFadeIn 0.16s var(--ease-out);
}
.spec-def-box strong { color: var(--text); font-family: var(--font-serif); font-size: 15.5px; }

.spec-draft-area {
  width: 100%;
  min-height: 92px;
  border: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 12px 0;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text);
  resize: vertical;
  outline: none;
}
.spec-draft-area:focus { border-top-color: var(--accent); border-bottom-color: var(--accent); }

.spec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.spec-hint {
  font-size: 12px;
  color: var(--text-soft);
}

/* Sections */
.pub-section { padding: 72px 0; }
.pub-section.alt {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-header-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 42px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(29px, 3.6vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.015em;
}

.section-lead {
  color: var(--text-muted);
  margin: 0;
  font-size: 16px;
}

/* 3-Step Workflow Ledger */
.step-ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}

.step-col {
  padding: 26px 26px 26px 0;
  border-right: 1px solid var(--rule);
}
.step-col:not(:first-child) { padding-left: 26px; }
.step-col:last-child { border-right: none; padding-right: 0; }

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.step-col h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 8px;
}
.step-col p { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* Register Comparison Spread (Writing vs Speaking) */
.register-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
}

.topic-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--rule);
}

.topic-tab {
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  padding: 12px 6px;
  text-align: left;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.14s ease, padding-left 0.16s var(--ease-out);
}
.topic-tab:hover { color: var(--text); padding-left: 10px; }
.topic-tab.active { color: var(--accent); font-weight: 600; padding-left: 10px; }

.compare-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-pane {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 22px;
}
.compare-pane-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.compare-pane-lbl.writing { color: var(--accent); }
.compare-pane-lbl.speaking { color: var(--sage); }

.compare-quote {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.58;
  margin: 0 0 14px;
}
.compare-quote mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 4px;
  border-radius: 3px;
}
.compare-pane.speaking .compare-quote mark {
  background: var(--sage-soft);
  color: var(--sage);
}
.compare-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
}

/* Curriculum Ruled Index */
.curriculum-list {
  border-top: 1px solid var(--rule-strong);
}

.curriculum-row {
  display: grid;
  grid-template-columns: 44px 1.2fr 1.4fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 6px;
  border-bottom: 1px solid var(--rule);
}

.cur-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
}
.cur-title {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--text);
}
.cur-sample {
  font-size: 13.5px;
  color: var(--text-muted);
  font-style: italic;
}
.cur-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
  color: var(--accent);
  white-space: nowrap;
}

/* Grids & Cards (Guides & Studio Features) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.info-card {
  border-top: 1px solid var(--rule-strong);
  padding-top: 18px;
}
.info-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.info-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.26;
}
.info-card h3 a { text-decoration: none; color: var(--text); }
.info-card h3 a:hover { color: var(--accent); }
.info-card p { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* Closing CTA Band */
.cta-band {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 44px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 400;
  margin: 0 0 6px;
}
.cta-band p { margin: 0; color: var(--text-muted); max-width: 520px; }

/* FAQ */
.faq-list { border-top: 1px solid var(--rule); max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; font-size: 15.5px; }
.faq-item p { margin: 10px 0 0; color: var(--text-muted); font-size: 14.5px; }

/* Guide Reading Room & Article Prose */
.guide-group { margin-top: 42px; }
.guide-group-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 46px 22px 72px;
}
.article-wrap h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1.1;
  font-weight: 400;
  margin: 10px 0 14px;
}
.article-wrap h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin: 34px 0 10px;
}
.article-wrap h3 { font-size: 17px; margin: 22px 0 8px; }

.callout-box {
  border-left: 2px solid var(--accent);
  padding: 12px 0 12px 18px;
  margin: 28px 0;
  color: var(--text-muted);
}

/* Footer */
.pub-footer {
  border-top: 1px solid var(--rule);
  padding: 44px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

@media (max-width: 960px) {
  .hero, .section-header-split, .register-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 36px; padding-bottom: 44px; }
  .step-ledger { grid-template-columns: 1fr; }
  .step-col { border-right: none; border-bottom: 1px solid var(--rule); padding: 20px 0 !important; }
  .step-col:last-child { border-bottom: none; }
  .topic-pills { flex-direction: row; overflow-x: auto; border-top: none; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
  .topic-tab { border-bottom: none; white-space: nowrap; padding: 8px 12px; border-radius: 6px; }
  .topic-tab.active { background: var(--accent-soft); padding-left: 12px; }
  .compare-panes, .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .curriculum-row { grid-template-columns: 36px 1fr; gap: 6px 14px; }
  .cur-sample { grid-column: 2; }
  .cur-link { grid-column: 2; }
  .pub-links { display: none; }
  .pub-mobile-guide { display: inline-flex; align-items: center; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .pub-section { padding: 52px 0; }
  .specimen-card { padding: 18px 16px; }
  .spec-draft-area { font-size: 16px; }
  .pub-actions .pbtn { padding: 7px 12px; font-size: 13px; }
  .hero-cta .pbtn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
