/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/
/* ============================================================
   HAMLET A LEVEL SERIES — Shared Stylesheet
   Deep Violet / Indigo Palette · DM Sans + Space Grotesk
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ── TOKENS ── */
:root {
  --accent: #5B21B6;
  --accent-light: #EDE9FE;
  --accent-mid: #4C1D95;
  --accent-rgb: 91,33,182;
  --page-bg: #FFFFFF;
  --hero-bg: linear-gradient(160deg, #F5F3FF 0%, #FAF8FF 60%, #FFFFFF 100%);
  --hero-radial: rgba(91,33,182,0.08);
  --surface: #F5F3FF;
  --surface-deep: #EDE9FE;
  --heading: #0F0A1E;
  --body-text: #4B5563;
  --text-faint: #9CA3AF;
  --border: #DDD6FE;
  --toc-hover-bg: #EDE9FE;
  --toc-hover-text: #0F0A1E;
  --green: #16A34A;
  --amber: #D97706;
  --red: #DC2626;
  --purple: #7C3AED;
  --teal: #0D9488;
  --radius: 12px;
  --radius-lg: 18px;
  --callout-info-bg: #F5F3FF;
  --callout-info-border: #C4B5FD;
  --callout-info-text: #4C1D95;
  --callout-info-strong: #3B0764;
  --callout-tip-bg: #F0FDF4;
  --callout-tip-border: #86EFAC;
  --callout-tip-text: #166534;
  --callout-tip-strong: #14532D;
  --callout-warn-bg: #FFFBEB;
  --callout-warn-border: #FCD34D;
  --callout-warn-text: #92400E;
  --callout-warn-strong: #78350F;
  --code-bg: #F5F3FF;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--page-bg);
  color: var(--body-text);
  line-height: 1.7;
  font-size: 18px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--heading);
  margin-bottom: 6px;
}

h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--heading);
  margin: 20px 0 10px;
}

p {
  margin-bottom: 14px;
  font-weight: 400;
}

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

/* ── HERO ── */
.hero {
  background: var(--hero-bg);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--hero-radial) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-mid);
  background: rgba(91,33,182,0.1);
  border: 1px solid rgba(91,33,182,0.2);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 42px;
  line-height: 1.15;
  color: var(--heading);
  margin-bottom: 16px;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--body-text);
  max-width: 680px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-mid);
}

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 40px;
}
.toc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-mid);
  margin-bottom: 18px;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4px;
}
.toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.toc-item:hover {
  background: var(--toc-hover-bg);
  color: var(--toc-hover-text);
  text-decoration: none;
}
.toc-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
}
.toc-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--body-text);
}
.toc-item:hover .toc-label { color: var(--heading); }

/* ── MODULE HEADER ── */
.module {
  margin-bottom: 56px;
}
.module-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.module-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 48px;
  color: var(--surface-deep);
  line-height: 1;
  flex-shrink: 0;
  min-width: 60px;
}
.module-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}
.module-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--heading);
  line-height: 1.2;
  margin-bottom: 6px;
}
.module-desc {
  font-size: 15px;
  color: var(--text-faint);
  font-weight: 400;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── AO TAGS ── */
.ao-tag {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  padding: 2px 7px;
  margin: 0 3px;
  background: rgba(91,33,182,0.1);
  color: var(--accent-mid);
  border: 1px solid rgba(91,33,182,0.2);
  vertical-align: middle;
}
.ao-tag.ao2 { background: rgba(13,148,136,0.1); color: #0D9488; border-color: rgba(13,148,136,0.25); }
.ao-tag.ao3 { background: rgba(217,119,6,0.1); color: #B45309; border-color: rgba(217,119,6,0.25); }
.ao-tag.ao5 { background: rgba(124,58,237,0.1); color: #6D28D9; border-color: rgba(124,58,237,0.25); }

/* ── CALLOUTS ── */
.callout {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  border-left: 3px solid;
}
.callout.info {
  background: var(--callout-info-bg);
  border-color: var(--callout-info-border);
  color: var(--callout-info-text);
}
.callout.tip {
  background: var(--callout-tip-bg);
  border-color: var(--callout-tip-border);
  color: var(--callout-tip-text);
}
.callout.warn {
  background: var(--callout-warn-bg);
  border-color: var(--callout-warn-border);
  color: var(--callout-warn-text);
}
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-body { font-size: 15px; line-height: 1.65; }
.callout.info .callout-body strong { color: var(--callout-info-strong); }
.callout.tip .callout-body strong { color: var(--callout-tip-strong); }
.callout.warn .callout-body strong { color: var(--callout-warn-strong); }

/* ── FEATURE GRID ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.feature-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 8px;
}
.feature-body {
  font-size: 14px;
  color: var(--body-text);
  line-height: 1.6;
}

/* ── STEPS ── */
.steps { margin: 20px 0; }
.step {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}
.step-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-connector {
  width: 2px;
  flex: 1;
  background: var(--border);
  min-height: 20px;
  margin: 4px 0;
}
.step:last-child .step-connector { display: none; }
.step-content { padding-bottom: 24px; }
.step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 6px;
  margin-top: 4px;
}
.step-body {
  font-size: 15px;
  color: var(--body-text);
  line-height: 1.65;
}

/* ── WORKFLOW TIMELINE ── */
.workflow { margin: 20px 0; }
.workflow-phase {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.workflow-phase:last-child { border-bottom: none; }
.phase-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  height: fit-content;
  margin-top: 3px;
  flex-shrink: 0;
}
.phase-1 { background: rgba(91,33,182,0.12); color: var(--accent-mid); }
.phase-2 { background: rgba(13,148,136,0.12); color: #0D9488; }
.phase-3 { background: rgba(217,119,6,0.12); color: #B45309; }
.phase-4 { background: rgba(22,163,74,0.12); color: #166534; }
.phase-5 { background: rgba(220,38,38,0.12); color: #B91C1C; }
.phase-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 6px;
}
.phase-desc {
  font-size: 14px;
  color: var(--body-text);
  line-height: 1.65;
}

/* ── COMPARISON CARDS ── */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.comparison-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 720px) {
  .comparison, .comparison-3 { grid-template-columns: 1fr; }
}
.compare-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.compare-card.good-card { border-top: 3px solid var(--green); }
.compare-card.bad-card  { border-top: 3px solid var(--red); }
.compare-card.neutral-card { border-top: 3px solid var(--accent); }
.compare-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.compare-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--heading);
}
.compare-list {
  list-style: none;
  padding: 12px 16px;
}
.compare-list li {
  font-size: 14px;
  color: var(--body-text);
  line-height: 1.55;
  padding: 5px 0;
  border-bottom: 1px solid var(--surface);
  padding-left: 14px;
  position: relative;
}
.compare-list li:last-child { border-bottom: none; }
.compare-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.compare-list.bad li::before { color: var(--red); content: '✗'; }
.compare-list.good li::before { color: var(--green); content: '✓'; }

/* ── PROMPT CARDS ── */
.prompt-card {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 12px 0;
  border-left: 3px solid var(--border);
  background: var(--surface);
}
.prompt-card.good  { border-color: var(--green); background: #F0FDF4; }
.prompt-card.bad   { border-color: var(--red); background: #FEF2F2; }
.prompt-card.purple { border-color: var(--purple); background: rgba(124,58,237,0.06); }
.prompt-card.amber  { border-color: var(--amber); background: var(--callout-warn-bg); }
.prompt-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.prompt-card.purple .prompt-label { color: var(--purple); }
.prompt-card.good .prompt-label   { color: var(--green); }
.prompt-card.bad .prompt-label    { color: var(--red); }
.prompt-card.amber .prompt-label  { color: var(--amber); }
.prompt-text {
  font-size: 14px;
  font-style: italic;
  color: var(--body-text);
  line-height: 1.6;
}

/* ── QUOTE BLOCK ── */
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  margin: 20px 0;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-text {
  font-size: 16px;
  font-style: italic;
  color: var(--heading);
  line-height: 1.65;
  margin-bottom: 8px;
}
.quote-source {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

/* ── RHYTHM DIAGRAM ── */
.rhythm-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  overflow-x: auto;
}
.rhythm-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}
.rhythm-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.rhythm-row:last-child { margin-bottom: 0; }
.rhythm-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  min-width: 90px;
  padding-top: 6px;
}
.rhythm-beats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
}
.beat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.beat-box {
  width: 34px; height: 28px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.beat-box.stressed   { background: var(--accent); color: #fff; }
.beat-box.unstressed { background: var(--surface-deep); color: var(--accent-mid); }
.beat-box.missing    { background: transparent; border: 1.5px dashed var(--border); color: var(--text-faint); }
.beat-syl {
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  max-width: 40px;
  word-break: break-word;
  line-height: 1.2;
}
.beat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 2px;
  align-self: flex-start;
  margin-top: 0;
}

/* ── EXAM PROMPT ── */
.exam-prompt {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 28px 0 0;
}
.exam-prompt-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.exam-prompt-q {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.4;
}
.exam-prompt-hint {
  font-size: 14px;
  color: var(--body-text);
  line-height: 1.6;
}

/* ── ESSAY PLAN ── */
.essay-plan {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0;
}
.essay-section { border-bottom: 1px solid var(--border); }
.essay-section:last-child { border-bottom: none; }
.essay-section-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-mid);
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.essay-section-body {
  padding: 14px 16px;
  background: #fff;
}
.essay-section-point {
  font-size: 14px;
  color: var(--body-text);
  line-height: 1.6;
  padding: 5px 0;
  border-bottom: 1px solid var(--surface);
  display: flex;
  gap: 10px;
}
.essay-section-point::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.essay-section-point:last-child { border-bottom: none; }

/* ── MINI-ESSAY COMPARISON ── */
.answer-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
@media (max-width: 720px) { .answer-comparison { grid-template-columns: 1fr; } }
.answer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.answer-card-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.answer-card-header.weak   { background: #FEF2F2; border-bottom: 1px solid #FECACA; }
.answer-card-header.strong { background: #F0FDF4; border-bottom: 1px solid #BBF7D0; }
.answer-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.answer-card-title.weak   { color: var(--red); }
.answer-card-title.strong { color: var(--green); }
.answer-card-grade {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.answer-card-grade.weak   { background: #FECACA; color: #991B1B; }
.answer-card-grade.strong { background: #BBF7D0; color: #14532D; }
.answer-card-body { padding: 16px; background: #fff; }
.answer-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 14px 0 4px;
}
.answer-section-label:first-child { margin-top: 0; }
.answer-text {
  font-size: 14px;
  font-style: italic;
  color: var(--body-text);
  line-height: 1.65;
  margin-bottom: 4px;
}
.answer-annotations {
  list-style: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.answer-annotations li {
  font-size: 13px;
  line-height: 1.55;
  padding: 5px 0 5px 20px;
  position: relative;
  border-bottom: 1px solid var(--surface);
  color: var(--body-text);
}
.answer-annotations li:last-child { border-bottom: none; }
.answer-annotations.weak li::before   { content: '✗'; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.answer-annotations.strong li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ── CODE BLOCK ── */
.code-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-mid);
  background: var(--surface-deep);
  padding: 8px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px;
  font-family: 'DM Mono', 'Fira Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--body-text);
  margin-bottom: 20px;
  white-space: pre-wrap;
}
.comment  { color: var(--text-faint); font-style: italic; }
.string   { color: var(--teal); }
.keyword  { color: var(--accent); font-weight: 700; }

/* ── SEPARATOR ── */
.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ── TAGS ROW ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface-deep);
  color: var(--accent-mid);
  border: 1px solid var(--border);
}

/* ── FOOTER ── */
.footer-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-top: 48px;
  text-align: center;
}
.footer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--heading);
  margin-bottom: 8px;
}
.footer-body {
  font-size: 15px;
  color: var(--body-text);
  margin-bottom: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.footer-attr {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── PRINT ── */
@media print {
  body { font-size: 13px; }
  .page { padding: 24px 16px; }
  .hero { padding: 28px 24px; }
  .hero h1 { font-size: 26px; }
  .sep { margin: 28px 0; }
  .toc-item:hover { background: none; }
  a { color: inherit; text-decoration: none; }
  .exam-prompt { border: 1px solid var(--border); }
  .answer-comparison { grid-template-columns: 1fr; }
  .essay-plan { break-inside: avoid; }
  .comparison-3 { grid-template-columns: 1fr; }
}

