/* ═══════════════════════════════════════════════════════════════
   YOUTHWORK.AI — Part 02: Prompt Engineering
   Part-specific styles. Requires youthworkai.css loaded first.
   ═══════════════════════════════════════════════════════════════ */

/* ─── PART 02 COLOUR ADDITIONS ─── */
:root {
  --coral:    #F09580;
  --coral-lt: #F5B3A3;
  --coral-bg: #FDF0ED;
  --coral-dk: #C0503A;

  /* annotated prompt ingredient colours */
  --ap-role-bg:    rgba(14,138,104,0.12);
  --ap-role-bd:    var(--teal);
  --ap-ctx-bg:     rgba(196,125,14,0.12);
  --ap-ctx-bd:     var(--amber);
  --ap-task-bg:    rgba(74,127,187,0.14);
  --ap-task-bd:    #4A7FBB;
  --ap-task-txt:   #2C5F8A;
  --ap-fmt-bg:     rgba(123,94,167,0.12);
  --ap-fmt-bd:     #7B5EA7;
  --ap-fmt-txt:    #5B3E87;
  --ap-con-bg:     rgba(240,149,128,0.18);
  --ap-con-bd:     var(--coral);
  --ap-con-txt:    var(--coral-dk);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — TERMINAL PANEL
   ═══════════════════════════════════════════════════════════════ */
.hero-terminal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.terminal-window {
  background: #0D1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  animation: fadeUp 0.8s 0.4s both;
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.t-dot.red    { background: #FF5F57; }
.t-dot.yellow { background: #FFBD2E; }
.t-dot.green  { background: #28C840; }
.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.08em;
  margin-left: 8px;
}
.terminal-body {
  padding: 28px 28px 32px;
  min-height: 300px;
  position: relative;
}
.terminal-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  display: block;
}
.terminal-label.weak  { color: #E07070; }
.terminal-label.strong { color: var(--teal-lt); }

.terminal-prompt-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-arrow {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.2);
  font-size: 18px;
  padding: 12px 0;
}
.terminal-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--teal-lt);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.terminal-phase { transition: opacity 0.4s ease; }
.terminal-phase.hidden { opacity: 0; }

/* ═══════════════════════════════════════════════════════════════
   WHY PROMPTING MATTERS
   ═══════════════════════════════════════════════════════════════ */
.why-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 100px;
  margin-bottom: 0;
}
.why-sticky {
  position: sticky;
  top: 90px;
  align-self: start;
}
.why-stat {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 24px;
}
.why-stat em {
  font-style: italic;
  color: var(--teal);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════════
   ANNOTATED PROMPT — ANATOMY SECTION
   ═══════════════════════════════════════════════════════════════ */
.anatomy-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 60px;
}
.anatomy-intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-40);
  font-weight: 300;
}

.annotated-prompt-wrap {
  margin-bottom: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.ap-header {
  background: var(--ink);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-header-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.ap-header-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  margin-left: 8px;
}
.annotated-prompt {
  background: #F5F4F0;
  padding: 32px 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
/* ingredient highlight spans */
.ap-role {
  background: var(--ap-role-bg);
  border-bottom: 2px solid var(--ap-role-bd);
  color: var(--teal-mid);
  padding: 1px 3px;
  border-radius: 2px 2px 0 0;
}
.ap-ctx {
  background: var(--ap-ctx-bg);
  border-bottom: 2px solid var(--ap-ctx-bd);
  color: var(--amber);
  padding: 1px 3px;
  border-radius: 2px 2px 0 0;
}
.ap-task {
  background: var(--ap-task-bg);
  border-bottom: 2px solid var(--ap-task-bd);
  color: var(--ap-task-txt);
  padding: 1px 3px;
  border-radius: 2px 2px 0 0;
}
.ap-fmt {
  background: var(--ap-fmt-bg);
  border-bottom: 2px solid var(--ap-fmt-bd);
  color: var(--ap-fmt-txt);
  padding: 1px 3px;
  border-radius: 2px 2px 0 0;
}
.ap-con {
  background: var(--ap-con-bg);
  border-bottom: 2px solid var(--ap-con-bd);
  color: var(--ap-con-txt);
  padding: 1px 3px;
  border-radius: 2px 2px 0 0;
}

/* legend */
.ap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}
.ap-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.ap-legend-swatch {
  width: 12px; height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── INGREDIENT CARDS (expandable) ─── */
.ingredient-cards {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  margin-bottom: 0;
}
.ingr-item {
  background: var(--paper);
  overflow: hidden;
}
.ingr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  gap: 16px;
}
.ingr-header:hover { background: var(--paper-2); }
.ingr-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
.ingr-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-40);
  flex-shrink: 0;
}
.ingr-swatch {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ingr-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.ingr-toggle {
  width: 28px; height: 28px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-40);
  font-size: 16px;
  transition: all 0.25s;
  flex-shrink: 0;
}
.ingr-item.open .ingr-toggle {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  transform: rotate(45deg);
}
.ingr-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.ingr-body-inner {
  padding: 0 32px 32px 76px;
}
.ingr-body-inner p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-80);
  font-weight: 300;
  margin-bottom: 20px;
}
.ingr-examples {
  background: var(--paper-2);
  border-left: 3px solid var(--teal);
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
  margin-top: 4px;
}
.ingr-examples-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: 10px;
}
.ingr-examples li {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-80);
  font-weight: 400;
  margin-left: 20px;
  margin-bottom: 5px;
}
.ingr-examples li:last-child { margin-bottom: 0; }
.ingr-bad  { color: var(--coral-dk); }
.ingr-good { color: var(--teal-mid); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   PROMPT LIBRARY
   ═══════════════════════════════════════════════════════════════ */
.lib-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 48px;
}
.lib-intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-40);
  font-weight: 300;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.filter-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  background: var(--white);
  color: var(--ink-40);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.filter-tab:hover { color: var(--ink); border-color: var(--ink-12); }
.filter-tab.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.prompt-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--white);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.prompt-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.prompt-card.hidden { display: none; }

.pcard-top {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--rule);
}
.pcard-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-mid);
  background: var(--teal-bg);
  padding: 4px 10px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 12px;
}
.pcard-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.pcard-code-wrap {
  position: relative;
  flex: 1;
}
.pcard-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-80);
  background: #F5F4F0;
  padding: 20px 24px 48px;
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
}
.copy-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover { background: var(--teal-mid); }
.copy-btn.copied {
  background: var(--teal);
  pointer-events: none;
}

.why-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  cursor: pointer;
  border-top: 1px solid var(--rule);
  background: none;
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-40);
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.why-toggle-btn:hover { background: var(--paper-2); color: var(--ink); }
.why-toggle-icon {
  font-size: 14px;
  transition: transform 0.25s;
}
.prompt-card.why-open .why-toggle-icon { transform: rotate(45deg); }
.why-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.why-body-inner {
  padding: 0 24px 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-40);
  font-weight: 300;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   COMMON MISTAKES
   ═══════════════════════════════════════════════════════════════ */
.mistakes-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 60px;
}
.mistakes-intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-40);
  font-weight: 300;
}

.mistake-pairs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mistake-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.mp-mistake {
  padding: 36px 40px;
  background: var(--coral-bg);
  border-right: 1px solid rgba(240,149,128,0.25);
  position: relative;
}
.mp-fix {
  padding: 36px 40px;
  background: var(--teal-bg);
}
.mp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-mistake .mp-label { color: var(--coral-dk); }
.mp-fix    .mp-label { color: var(--teal-mid); }
.mp-label-icon { font-size: 13px; }
.mp-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(192,80,58,0.4);
  position: absolute;
  top: 16px; right: 20px;
}
.mp-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
}
.mp-mistake .mp-title { color: var(--coral-dk); }
.mp-fix    .mp-title { color: var(--teal-mid); }
.mp-example {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.mp-mistake .mp-example {
  background: rgba(240,149,128,0.15);
  color: var(--coral-dk);
  border-left: 3px solid var(--coral);
}
.mp-fix .mp-example {
  background: rgba(14,138,104,0.1);
  color: var(--teal-mid);
  border-left: 3px solid var(--teal);
}
.mp-body {
  font-size: 14px;
  line-height: 1.75;
  font-weight: 300;
}
.mp-mistake .mp-body { color: var(--coral-dk); opacity: 0.8; }
.mp-fix    .mp-body { color: var(--teal-mid); }

/* ═══════════════════════════════════════════════════════════════
   ADVANCED TECHNIQUES  (dark accordion, reuses limits pattern)
   ═══════════════════════════════════════════════════════════════ */
.advanced-section {
  background: var(--ink);
  padding: var(--section-pad-v) var(--section-pad-h);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.advanced-inner { max-width: var(--inner-max); margin: 0 auto; }
.advanced-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 72px;
}
.advanced-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.advanced-header {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 60px;
}
.advanced-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 3.5vw, 50px);
  font-weight: 700;
  line-height: 1.08;
  color: white;
}
.advanced-h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--teal-lt);
}
.advanced-intro {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
  padding-top: 12px;
}

/* technique accordion (same interaction as limits-list) */
.technique-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.technique-item {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}
.technique-item:last-child { border-bottom: none; }
.technique-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.technique-header:hover { background: rgba(255,255,255,0.04); }
.technique-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.technique-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.technique-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.technique-toggle {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 16px;
  transition: all 0.25s;
  flex-shrink: 0;
}
.technique-item.open .technique-toggle {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  transform: rotate(45deg);
}
.technique-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.technique-body-inner {
  padding: 0 28px 28px 68px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════════
   TEAL PULL QUOTE SECTION
   ═══════════════════════════════════════════════════════════════ */
.teal-quote-section {
  padding: 100px var(--section-pad-h);
  background: var(--teal);
  text-align: center;
}
.teal-quote-inner { max-width: 800px; margin: 0 auto; }
.teal-quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: rgba(255,255,255,0.35);
  line-height: 0.5;
  margin-bottom: 32px;
  display: block;
}
.teal-quote-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: rgba(255,255,255,0.95);
  margin-bottom: 36px;
}
.teal-quote-cite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — tablet (≤1100px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .advanced-header { grid-template-columns: 1fr; gap: 32px; }
  .prompt-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile (≤900px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .why-layout { grid-template-columns: 1fr; gap: 48px; }
  .why-sticky { position: static; }
  .anatomy-header { grid-template-columns: 1fr; gap: 24px; }
  .lib-header { grid-template-columns: 1fr; gap: 24px; }
  .mistakes-header { grid-template-columns: 1fr; gap: 24px; }
  .mistake-pair { grid-template-columns: 1fr; }
  .mp-mistake { border-right: none; border-bottom: 1px solid rgba(240,149,128,0.25); }
  .mp-num { display: none; }
  .advanced-section { padding: 80px 32px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — small phones (≤480px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .annotated-prompt { padding: 20px 16px; font-size: 11px; }
  .ingr-header { padding: 18px 20px; }
  .ingr-body-inner { padding: 0 20px 20px 20px; }
  .ingr-title { font-size: 17px; }
  .ap-legend { gap: 8px; padding: 12px 16px; }
  .mp-mistake, .mp-fix { padding: 24px 20px; }
  .technique-header { padding: 18px 20px; }
  .technique-body-inner { padding: 0 20px 20px 20px; }
  .technique-name { font-size: 17px; }
  .pcard-code { font-size: 11px; }
}
