/* workbook.css — Interactive ACF AI Essentials Participant Workbook Styles */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-surface: #1e293b;
  --color-surface-card: #0f172a;
  --color-border: #334155;
  --color-border-glow: #38bdf8;
  
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  /* Lightened from #64748b, which sat at 3.07:1 on the card surface and
     failed WCAG AA. This clears 4.7:1 while staying visibly de-emphasised. */
  --color-text-dim: #8494a9;
  
  --color-primary: #38bdf8;
  --color-primary-hover: #0284c7;
  --color-accent: #f59e0b;
  --color-accent-soft: rgba(245, 158, 11, 0.15);
  --color-success: #10b981;
  --color-success-soft: rgba(16, 185, 129, 0.15);
  --color-danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);

  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: 4rem;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Accessibility utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #0f172a;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* A visible focus ring on every interactive control, not just inputs. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Shown only in the printed / PDF copy */
.print-only {
  display: none;
}

/* Prompt cards hidden by search or category filter (restored for print) */
.prompt-card.is-filtered-out {
  display: none;
}

/*
 * Print mirrors: a plain-text twin of each field. Hidden on screen; in print
 * it replaces the form control so long answers are never clipped by the
 * control's fixed height, and empty fields become ruled writing lines.
 */
.print-mirror {
  display: none;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  text-decoration: none;
}

.brand-badge span {
  color: var(--color-text-main);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #0f172a;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-main);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.08);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--color-border);
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 40%);
}

.hero-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 750px;
  margin-bottom: 1.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.meta-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.meta-icon {
  font-size: 1.4rem;
  color: var(--color-primary);
}

.meta-label {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Main Content Grid */
.section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title .step-num {
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--color-primary);
  color: #0f172a;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.section-desc {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Cards & Layout */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-glow);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Body copy helpers (were inline styles; extracted so print can restyle them) */
.lead-muted {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.lead-muted--wide {
  margin-bottom: 1.5rem;
}

.tab-intro {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.exercise-title {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.exercise-hint {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.golden-rule {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.trust-list {
  margin-left: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.example-box {
  background: var(--color-surface-card);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.example-box--roomy {
  padding: 1.25rem;
}

.example-heading {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.example-heading--bad {
  color: var(--color-danger);
}

.example-heading--good {
  color: var(--color-success);
}

.example-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.example-text--last {
  margin-bottom: 0;
}

.result-count {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  min-height: 1.4em;
}

.site-footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Callout Box */
.callout {
  background: rgba(56, 189, 248, 0.08);
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
}

.callout-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.custom-table th {
  background: #0f172a;
  color: var(--color-primary);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.custom-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* Inputs & Form Elements */
.input-group {
  margin-bottom: 1.25rem;
}

.input-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--color-text-main);
}

.input-label span {
  color: var(--color-text-muted);
  font-weight: 400;
}

.input-field, .textarea-field {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.input-field:focus, .textarea-field:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.textarea-field {
  min-height: 100px;
  resize: vertical;
}

.textarea-lg {
  min-height: 120px;
}

.textarea-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.autosave-indicator {
  font-size: 0.75rem;
  color: var(--color-success);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.autosave-indicator.visible {
  opacity: 1;
}

/* Framework 4-Questions Grid */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.framework-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border-top: 3px solid var(--color-primary);
}

.framework-card h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.framework-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Tabs Interface */
.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--color-text-main);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Search & Filter Controls */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  padding-left: 2.75rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-dim);
  font-size: 1.1rem;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 0.45rem 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover, .pill-btn.active {
  background: var(--color-primary);
  color: #0f172a;
  border-color: var(--color-primary);
}

/* Prompt Card Grid */
.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.prompt-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.prompt-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.prompt-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text-main);
}

.prompt-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.12);
  color: var(--color-primary);
  font-weight: 600;
}

.prompt-text {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  margin-bottom: 1rem;
  max-height: 180px;
  overflow-y: auto;
}

.copy-btn {
  width: 100%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--color-primary);
  color: #0f172a;
  border-color: var(--color-primary);
}

.copy-btn.copied {
  background: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

/* Tools Directory Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.tool-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.tool-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.tool-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.tool-link-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Checkbox Lists */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--color-surface-card);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.checkbox-item:hover {
  border-color: var(--color-primary);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.925rem;
  color: var(--color-text-main);
}


/* ---- Section 0: starter tasks & document pack ---------------------- */
.step-num--plain {
  background: transparent !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary);
  letter-spacing: 0.06em;
}

.callout-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.cluster-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.35rem;
}

.cluster-blurb {
  color: var(--color-text-muted);
  font-size: 0.925rem;
  margin-bottom: 1rem;
}

.starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.starter-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}

.starter-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.55rem;
  margin-bottom: 0.5rem;
}

.starter-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.starter-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.docs-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.doc-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.doc-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.doc-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.doc-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.12);
  color: var(--color-primary);
}

.doc-text {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* ---- Move 1 / Move 3 additions ------------------------------------- */
.today-flag {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--color-success-soft);
  color: var(--color-success);
}

.steps-list {
  margin: 0 0 1rem 1.25rem;
  color: var(--color-text-muted);
}

.steps-list li {
  margin-bottom: 0.5rem;
}

.steps-list strong {
  color: var(--color-text-main);
}

/* Print Styles for Downloadable PDF Workbook (Fillable by Hand or Digital) */
@media print {

  /* ---- Page geometry ------------------------------------------------ */
  @page {
    size: letter portrait;
    margin: 0.6in 0.55in;
  }

  /*
   * Repoint the whole palette to ink-on-paper. Because the screen rules
   * already reference these variables, every colour in the document becomes
   * print-correct here without restating a single selector. The values are
   * chosen to clear WCAG AA (4.5:1) against white paper.
   */
  :root {
    --color-bg: #ffffff;
    --color-bg-alt: #ffffff;
    --color-surface: #ffffff;
    --color-surface-card: #ffffff;
    --color-border: #94a3b8;
    --color-border-glow: #94a3b8;

    --color-text-main: #0f172a;
    --color-text-muted: #334155;
    --color-text-dim: #475569;

    --color-primary: #0b5f8a;
    --color-primary-hover: #0b5f8a;
    --color-accent: #8a4b04;
    --color-accent-soft: transparent;
    --color-success: #14663c;
    --color-danger: #b3261e;

    --shadow-card: none;
    --shadow-glow: none;
  }

  body {
    background: #ffffff !important;
    color: var(--color-text-main) !important;
    font-size: 10.5pt;
    line-height: 1.5;
    padding-bottom: 0;
  }

  /* ---- Hide the interactive chrome ---------------------------------- */
  .site-header,
  .skip-link,
  #sr-status,
  .btn,
  .controls-bar,
  .copy-btn,
  .autosave-indicator,
  .result-count,
  .tabs-header {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* ---- Cover block --------------------------------------------------- */
  .hero {
    background: none !important;
    padding: 0 0 1rem !important;
    border-bottom: 2px solid var(--color-border) !important;
  }

  .hero-title {
    background: none !important;
    -webkit-text-fill-color: var(--color-text-main) !important;
    color: var(--color-text-main) !important;
    font-size: 21pt !important;
  }

  .hero-tag {
    background: none !important;
    border: 1px solid var(--color-accent) !important;
    color: var(--color-accent) !important;
  }

  .hero-subtitle {
    font-size: 11pt;
  }

  .print-nameplate {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
  }

  .print-nameplate p {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    font-size: 10pt;
  }

  .nameplate-label {
    font-weight: 700;
    white-space: nowrap;
  }

  .nameplate-rule {
    flex: 1;
    border-bottom: 1px solid #475569;
    height: 1.05em;
  }

  /* ---- Pagination ---------------------------------------------------- */
  .section {
    padding: 1rem 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
    /* Sections are far taller than a page, so only their children may avoid
       splitting. Forcing avoid here would push whole sections onto new pages
       and leave large blank areas. */
    page-break-inside: auto;
    break-inside: auto;
  }

  .section-title,
  .card-title,
  .exercise-title {
    page-break-after: avoid;
    break-after: avoid;
  }

  .section-title {
    font-size: 15pt;
  }

  .framework-card,
  .prompt-card,
  .tool-card,
  .checkbox-item,
  .callout,
  .example-box,
  .input-group,
  .table-wrapper {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  .card {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    box-shadow: none !important;
    border: 1px solid var(--color-border) !important;
    /* Worksheet cards are routinely taller than a page, so they must be
       allowed to split; their inner .input-group blocks stay intact. */
    page-break-inside: auto;
    break-inside: auto;
  }

  .step-num {
    background: none !important;
    color: var(--color-text-main) !important;
    border: 1.5px solid var(--color-text-main) !important;
  }

  /* ---- Everything the participant filled in --------------------------- */

  /*
   * Swap each form control for its plain-text twin. A printed <textarea>
   * clips to its own height and drops the overflow; a <div> grows instead,
   * so nothing the participant wrote is lost from the PDF.
   */
  .input-field,
  .textarea-field {
    display: none !important;
  }

  .print-mirror {
    display: block;
    font-family: var(--font-body);
    font-size: 10pt;
    line-height: 1.55;
    color: var(--color-text-main);
    white-space: pre-wrap;
    overflow-wrap: break-word;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #ffffff;
  }

  .textarea-mono + .print-mirror {
    font-family: var(--font-mono);
    font-size: 9pt;
  }

  /*
   * An unanswered field prints as blank ruled lines so the workbook can be
   * finished by hand. print-color-adjust stops the browser stripping the
   * gradient that draws them; the border-bottom is a fallback that still
   * gives one writing line if a printer drops backgrounds entirely.
   */
  .print-mirror.is-blank {
    min-height: calc(var(--print-lines, 1) * 28px);
    padding: 0;
    border: none;
    border-bottom: 1px solid #64748b;
    border-radius: 0;
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 27px,
      #94a3b8 27px,
      #94a3b8 28px
    );
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .input-label {
    font-size: 9.5pt;
    margin-bottom: 0.3rem;
  }

  .input-group {
    margin-bottom: 1rem;
  }

  /* ---- Checkboxes ---------------------------------------------------- */
  .checkbox-item {
    border: 1px solid var(--color-border) !important;
    padding: 0.5rem 0.65rem !important;
  }

  .checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid #334155;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    flex: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .checkbox-item input[type="checkbox"]:checked::after {
    content: "X";
    position: absolute;
    top: -4px;
    left: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
  }

  .checkbox-label {
    font-size: 9.5pt;
  }

  /* ---- Tables -------------------------------------------------------- */
  .table-wrapper {
    overflow: visible !important;
    margin: 0.85rem 0;
  }

  .custom-table {
    font-size: 9pt;
  }

  .custom-table th {
    background: #eef2f7 !important;
    color: var(--color-text-main) !important;
    border: 1px solid var(--color-border) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .custom-table td {
    background: #ffffff !important;
    color: var(--color-text-main) !important;
    border: 1px solid var(--color-border) !important;
  }

  thead {
    display: table-header-group;
  }

  tr, img {
    page-break-inside: avoid;
  }

  /* ---- Breakout worksheets ------------------------------------------- */
  /*
   * On screen only the selected cluster is shown. The printed workbook must
   * carry all three, so every panel is revealed regardless of tab state.
   */
  .tab-content {
    display: block !important;
    margin-bottom: 1.5rem !important;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
  }

  /* ---- Prompt pack --------------------------------------------------- */
  /*
   * Search and category filters are a screen convenience. Every one of the 50
   * prompts belongs in the PDF whatever the participant last clicked.
   */
  .prompt-card.is-filtered-out {
    display: block !important;
  }

  /* Grid containers paginate unpredictably; block flow breaks cleanly. */
  .prompts-grid,
  .tools-grid {
    display: block !important;
  }

  .prompt-card,
  .tool-card {
    display: block !important;
    margin-bottom: 0.6rem !important;
    padding: 0.65rem 0.8rem !important;
    border: 1px solid var(--color-border) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .prompt-header {
    margin-bottom: 0.4rem;
  }

  .prompt-title {
    font-size: 10pt;
  }

  .prompt-category {
    background: none !important;
    border: 1px solid var(--color-primary);
    color: var(--color-primary) !important;
  }

  /* The screen version scrolls inside a 180px box, which would silently
     truncate every prompt in the PDF. */
  .prompt-text {
    background: #fbfcfd !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    max-height: none !important;
    overflow: visible !important;
    font-size: 8.5pt;
    line-height: 1.45;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0;
  }

  /* ---- Tools directory ----------------------------------------------- */
  .tool-badge {
    background: none !important;
    border: 1px solid var(--color-accent);
    color: var(--color-accent) !important;
  }

  .tool-name {
    font-size: 10.5pt;
    display: block;
  }

  .tool-desc {
    margin-bottom: 0.3rem;
    font-size: 9pt;
  }

  .tool-link-text {
    display: none;
  }

  /* On paper a link has no destination unless we print one. */
  .tool-card::after {
    content: attr(href);
    display: block;
    font-family: var(--font-mono);
    font-size: 8pt;
    color: var(--color-primary);
    word-break: break-all;
  }

  a {
    color: var(--color-primary) !important;
    text-decoration: none;
  }

  /* ---- Misc ---------------------------------------------------------- */
  .callout {
    background: none !important;
    border-left: 3px solid var(--color-primary) !important;
    padding: 0.75rem 1rem;
  }

  .callout-quote {
    color: var(--color-text-main) !important;
    font-size: 11pt;
  }

  .example-box {
    border: 1px solid var(--color-border) !important;
    background: #ffffff !important;
  }

  .example-text {
    color: #1e293b !important;
  }

  .framework-card {
    border: 1px solid var(--color-border) !important;
    border-top: 2px solid var(--color-primary) !important;
    padding: 0.75rem;
  }

  .site-footer {
    margin-top: 1.5rem;
    color: var(--color-text-dim) !important;
    page-break-before: avoid;
  }

  /* ---- Section 0: starter tasks & document pack ---------------------- */
  .step-num--plain {
    border: 1.5px solid var(--color-text-main) !important;
    color: var(--color-text-main) !important;
  }

  .cluster-heading {
    font-size: 12pt;
    margin: 1rem 0 0.25rem;
    page-break-after: avoid;
    break-after: avoid;
  }

  .cluster-blurb {
    font-size: 9.5pt;
    margin-bottom: 0.6rem;
  }

  /* Block flow paginates predictably where grid does not. */
  .starter-grid {
    display: block !important;
  }

  .starter-card {
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border) !important;
    border-left: 2px solid var(--color-accent) !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .starter-code {
    background: none !important;
    border: 1px solid var(--color-accent);
    color: var(--color-accent) !important;
  }

  .starter-title {
    font-size: 10pt;
  }

  .starter-desc {
    font-size: 9pt;
  }

  .doc-card {
    border: 1px solid var(--color-border) !important;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.75rem;
    /* A document is longer than a page; let it split but keep the heading
       attached to the start of its body. */
    page-break-inside: auto;
    break-inside: auto;
  }

  .doc-header {
    page-break-after: avoid;
    break-after: avoid;
  }

  .doc-title {
    font-size: 10.5pt;
  }

  .doc-tag {
    background: none !important;
    border: 1px solid var(--color-primary);
    color: var(--color-primary) !important;
  }

  /*
   * On screen each document scrolls inside a 320px box. Left alone that would
   * silently cut every document short in the PDF — the same failure the prompt
   * cards had.
   */
  .doc-text {
    max-height: none !important;
    overflow: visible !important;
    background: #fbfcfd !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 8pt;
    line-height: 1.45;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0;
  }

  .today-flag {
    background: none !important;
    border: 1px solid var(--color-success);
    color: var(--color-success) !important;
  }

  .steps-list {
    font-size: 9.5pt;
  }
}
