/* =========================================================================
   AI-Agent 導入講座 ハンズオン編 — extra templates
   Layer B Design System extensions for templates beyond the base reference.
   All values stay within Layer B tokens. No new colors invented.
   ========================================================================= */

/* Generic chrome shared across all extra templates */
.slide .stack { box-sizing: border-box; }
.slide .heading { word-break: keep-all; line-break: strict; overflow-wrap: break-word; }
.slide .lead    { word-break: keep-all; line-break: strict; overflow-wrap: break-word; }

/* =========================================================================
   COVER (P1) — large hero + subhero, brand wordmark + author + ghost
   ========================================================================= */
.slide--cover .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 220px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  z-index: 2;
}
.slide--cover .ghost-numeral { z-index: 0; }
.slide--cover .kicker { color: var(--accent); margin-bottom: 8px; }
.slide--cover .hero {
  font-size: 96px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--fg);
}
.slide--cover .hero .accent { color: var(--accent); }
.slide--cover .subhero {
  font-size: 36px;
  font-weight: 500;
  color: var(--fg-sub);
  line-height: 1.55;
  margin-top: 16px;
  max-width: 1500px;
}
.slide--cover .lead {
  font-size: 32px;
  font-weight: 400;
  color: var(--fg-sub);
  line-height: 1.7;
  margin-top: 56px;
}
.slide--cover .author {
  position: absolute;
  left: 120px;
  bottom: 130px;
  font-family: var(--font-latin);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* =========================================================================
   AGENDA — 3-card horizontal layout
   ========================================================================= */
.slide--agenda .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 200px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.slide--agenda .heading { font-size: 88px; }
.slide--agenda .lead { font-size: 32px; color: var(--fg-sub); max-width: 1400px; }
.slide--agenda .cards {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.slide--agenda .card {
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  background: var(--bg-elev);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.slide--agenda .card .num {
  font-family: var(--font-latin);
  font-size: 18px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}
.slide--agenda .card .ttl {
  font-size: 32px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.slide--agenda .card .desc {
  font-size: 22px;
  color: var(--fg-sub);
  line-height: 1.6;
}

/* =========================================================================
   COMPARE — 2 column with column titles
   ========================================================================= */
.slide--compare .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 200px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.slide--compare .heading { font-size: 80px; }
.slide--compare .cols {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.slide--compare .col {
  padding: 36px 40px;
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.slide--compare .col .col-label {
  font-family: var(--font-latin);
  font-size: 16px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
}
.slide--compare .col--mute  { border-color: var(--rule); }
.slide--compare .col--mute  .col-label { color: var(--fg-mute); }
.slide--compare .col--positive .col-label { color: var(--positive); }
.slide--compare .col--positive { border-color: rgba(0, 255, 176, 0.45); }
.slide--compare .col--accent .col-label { color: var(--accent); }
.slide--compare .col--accent { border-color: rgba(0, 210, 255, 0.45); }
.slide--compare .col--warn .col-label { color: var(--warn); }
.slide--compare .col--warn { border-color: rgba(255, 217, 61, 0.55); }

.slide--compare .col-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}
.slide--compare .col ul.col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.slide--compare .col ul.col-list li {
  font-size: 24px;
  line-height: 1.55;
  color: var(--fg);
  position: relative;
  padding-left: 28px;
}
.slide--compare .col ul.col-list li::before {
  content: "・";
  position: absolute;
  left: 0; top: -4px;
  font-size: 32px;
  line-height: 1;
  color: currentColor;
  opacity: 0.6;
}
.slide--compare .col--mute ul.col-list li     { color: var(--fg-sub); }
.slide--compare .col--positive ul.col-list li::before { color: var(--positive); opacity: 1; }
.slide--compare .col--accent ul.col-list li::before { color: var(--accent); opacity: 1; }
.slide--compare .col--warn ul.col-list li::before { color: var(--warn); opacity: 1; }

.slide--compare .footer-note {
  margin-top: 24px;
  font-size: 22px;
  color: var(--fg-mute);
  line-height: 1.6;
}

/* =========================================================================
   CHECKLIST — list of checkmark items
   ========================================================================= */
.slide--checklist .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 200px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.slide--checklist .heading { font-size: 88px; }
.slide--checklist ul.checks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  max-width: 1500px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.slide--checklist ul.checks li {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  font-size: 32px;
  line-height: 1.5;
  color: var(--fg);
}
.slide--checklist ul.checks li::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 8px;
  border-radius: 8px;
  background: var(--positive);
  background-image:
    linear-gradient(45deg, transparent 45%, var(--bg) 45%, var(--bg) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--bg) 45%, var(--bg) 55%, transparent 55%);
  /* Use a bona-fide check via SVG mask for crispness */
  -webkit-mask-image: none;
}
.slide--checklist ul.checks li {
  position: relative;
}
.slide--checklist ul.checks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  width: 18px;
  height: 10px;
  border-left: 4px solid var(--bg);
  border-bottom: 4px solid var(--bg);
  transform: rotate(-45deg);
}
.slide--checklist .footer-note {
  margin-top: 24px;
  font-size: 24px;
  color: var(--fg-mute);
  line-height: 1.6;
  max-width: 1500px;
}

/* =========================================================================
   STEPS — vertical numbered steps
   ========================================================================= */
.slide--steps .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 200px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.slide--steps .heading { font-size: 80px; }
.slide--steps .steps-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1600px;
}
.slide--steps .step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.slide--steps .step:first-child { border-top: none; }
.slide--steps .step .step-num {
  font-family: var(--font-latin);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.slide--steps .step .step-body {
  font-size: 28px;
  line-height: 1.55;
  color: var(--fg);
}
.slide--steps .step .step-body b { color: var(--accent); font-weight: 700; }
.slide--steps .footer-note {
  margin-top: 24px;
  font-size: 22px;
  color: var(--fg-mute);
  line-height: 1.6;
}

/* =========================================================================
   QUOTE — large pull quote
   ========================================================================= */
.slide--quote .stack {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 240px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.slide--quote .quote-mark {
  font-family: var(--font-latin);
  font-size: 240px;
  font-weight: 900;
  line-height: 0.8;
  color: var(--accent);
  opacity: 0.25;
  letter-spacing: -0.05em;
}
.slide--quote .quote-text {
  font-size: 80px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--fg);
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: break-word;
}
.slide--quote .quote-text .accent { color: var(--accent); }
.slide--quote .quote-text .positive { color: var(--positive); }
.slide--quote .quote-text .warn { color: var(--warn); }
.slide--quote .attribution {
  margin-top: 24px;
  font-size: 24px;
  color: var(--fg-mute);
  line-height: 1.6;
  max-width: 1500px;
}
.slide--quote .attribution::before {
  content: "— ";
  color: var(--fg-mute);
}

/* =========================================================================
   VSCODE — VS Code mockup
   ========================================================================= */
.slide--vscode .stack-text {
  position: absolute;
  left: 120px;
  top: 200px;
  right: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}
.slide--vscode .heading { font-size: 56px; max-width: 1680px; }
.slide--vscode .heading .accent { color: var(--accent); }

.slide--vscode .vscode-window {
  position: absolute;
  left: 120px;
  right: 120px;
  top: 380px;
  height: 580px;
  border-radius: 14px;
  overflow: hidden;
  background: #1e1e1e;
  border: 1px solid var(--rule-strong);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  display: grid;
  grid-template-rows: 36px 32px 1fr 24px;
  grid-template-columns: 56px 240px 1fr 380px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: #d4d4d4;
  font-size: 14px;
}
/* Title bar */
.slide--vscode .vscode-titlebar {
  grid-column: 1 / -1;
  grid-row: 1;
  background: #3c3c3c;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid #252526;
}
.slide--vscode .vscode-titlebar .dots {
  display: flex; gap: 8px;
}
.slide--vscode .vscode-titlebar .dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.slide--vscode .vscode-titlebar .dot--r { background: #ff5f56; }
.slide--vscode .vscode-titlebar .dot--y { background: #ffbd2e; }
.slide--vscode .vscode-titlebar .dot--g { background: #27c93f; }
.slide--vscode .vscode-titlebar .ttl {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #cccccc;
  letter-spacing: 0;
}
/* Activity bar (left strip, 56px) */
.slide--vscode .vscode-activity {
  grid-column: 1;
  grid-row: 2 / 4;
  background: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 18px;
  border-right: 1px solid #252526;
}
.slide--vscode .vscode-activity .ico {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: #858585;
  position: relative;
}
.slide--vscode .vscode-activity .ico.active { color: #fff; }
.slide--vscode .vscode-activity .ico.active::before {
  content: ""; position: absolute; left: -16px; top: -4px;
  width: 2px; height: 36px; background: #fff;
}
.slide--vscode .vscode-activity .ico.highlight {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}
/* Tabs row */
.slide--vscode .vscode-tabs {
  grid-column: 2 / -1;
  grid-row: 2;
  background: #252526;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #1e1e1e;
}
.slide--vscode .vscode-tabs .tab {
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #969696;
  border-right: 1px solid #1e1e1e;
  background: #2d2d2d;
}
.slide--vscode .vscode-tabs .tab.active {
  background: #1e1e1e;
  color: #fff;
}
/* Sidebar (file tree) */
.slide--vscode .vscode-sidebar {
  grid-column: 2;
  grid-row: 3;
  background: #252526;
  padding: 12px 0;
  font-size: 13px;
  color: #cccccc;
  overflow: hidden;
  border-right: 1px solid #1e1e1e;
}
.slide--vscode .vscode-sidebar .sb-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #969696;
  padding: 4px 16px 8px;
}
.slide--vscode .vscode-sidebar .sb-row {
  padding: 3px 16px 3px 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slide--vscode .vscode-sidebar .sb-row.folder { padding-left: 16px; color: #cccccc; }
.slide--vscode .vscode-sidebar .sb-row.folder::before {
  content: "▸ "; color: #cccccc;
}
.slide--vscode .vscode-sidebar .sb-row.folder.open::before { content: "▾ "; }
/* Editor */
.slide--vscode .vscode-editor {
  grid-column: 3;
  grid-row: 3;
  background: #1e1e1e;
  padding: 16px 20px;
  overflow: hidden;
  font-size: 14px;
}
.slide--vscode .vscode-editor .welcome-title {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  font-family: var(--font-stack);
}
.slide--vscode .vscode-editor .welcome-sub {
  font-size: 13px;
  color: #b8b8b8;
  margin-bottom: 24px;
  font-family: var(--font-stack);
}
.slide--vscode .vscode-editor .welcome-section {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #858585;
  margin-top: 14px;
  margin-bottom: 6px;
  font-family: var(--font-stack);
}
.slide--vscode .vscode-editor .welcome-link {
  color: #3794ff;
  font-size: 13px;
  margin-bottom: 4px;
  font-family: var(--font-stack);
}
/* Claude Code panel */
.slide--vscode .vscode-claude {
  grid-column: 4;
  grid-row: 3;
  background: #252526;
  border-left: 1px solid #1e1e1e;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  font-size: 13px;
  color: #cccccc;
  overflow: hidden;
}
.slide--vscode .vscode-claude .claude-head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a3a3a;
  margin-bottom: 12px;
}
.slide--vscode .vscode-claude .claude-spark {
  color: var(--accent); font-size: 16px;
}
.slide--vscode .vscode-claude .claude-title {
  font-weight: 600; color: #fff;
  font-family: var(--font-stack);
}
.slide--vscode .vscode-claude .claude-msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  font-family: var(--font-stack);
  font-size: 13px;
  line-height: 1.55;
}
.slide--vscode .vscode-claude .msg-user {
  background: #2d4d6e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  align-self: flex-end;
  max-width: 85%;
}
.slide--vscode .vscode-claude .msg-ai {
  color: #d4d4d4;
  padding: 4px 0;
}
.slide--vscode .vscode-claude .perm-box {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 210, 255, 0.06);
  font-family: var(--font-stack);
  font-size: 12px;
  color: #fff;
}
.slide--vscode .vscode-claude .perm-box .perm-title {
  font-weight: 700; margin-bottom: 6px; color: var(--accent);
}
.slide--vscode .vscode-claude .perm-box .perm-cmd {
  font-family: ui-monospace, monospace;
  background: #1e1e1e;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 6px 0;
  display: block;
  color: #ffd93d;
  font-size: 12px;
}
.slide--vscode .vscode-claude .perm-box .perm-btns {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.slide--vscode .vscode-claude .perm-box .btn {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #555;
  background: #333;
  color: #d4d4d4;
}
.slide--vscode .vscode-claude .perm-box .btn--yes {
  background: var(--positive); border-color: var(--positive); color: #0a0a14;
}
.slide--vscode .vscode-claude .claude-input {
  margin-top: 10px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #1e1e1e;
  font-size: 13px;
  color: #969696;
  font-family: var(--font-stack);
}
/* Status bar */
.slide--vscode .vscode-status {
  grid-column: 1 / -1;
  grid-row: 4;
  background: #007acc;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 16px;
}
.slide--vscode .vscode-status .spark { color: var(--warn); }

/* Highlight ring overlay (red circle for emphasis) */
.slide--vscode .vscode-window .ring {
  position: absolute;
  border: 3px solid var(--warn);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(255, 217, 61, 0.6);
}
.slide--vscode .vscode-window .ring--act {
  /* Activity bar extension highlight */
  left: 14px; top: 110px; width: 56px; height: 40px;
  border-radius: 6px;
}

.slide--vscode .footer-note {
  position: absolute;
  left: 120px;
  right: 120px;
  bottom: 100px;
  font-size: 22px;
  color: var(--fg-mute);
  line-height: 1.6;
  z-index: 2;
}

/* =========================================================================
   Generic kicker color overrides for accent variations per slide
   ========================================================================= */
.kicker--positive { color: var(--positive) !important; }
.kicker--warn { color: var(--warn) !important; }
.kicker--accent { color: var(--accent) !important; }

/* When accent for a slide is positive/warn, override .heading .accent */
.slide[data-accent="positive"] .heading .accent { color: var(--positive); }
.slide[data-accent="warn"]     .heading .accent { color: var(--warn); }
.slide[data-accent="positive"] .quote-text .accent { color: var(--positive); }
.slide[data-accent="warn"]     .quote-text .accent { color: var(--warn); }
.slide[data-accent="positive"] .kicker { color: var(--positive); }
.slide[data-accent="warn"]     .kicker { color: var(--warn); }

/* =========================================================================
   Density compensation — when content is crowded, scale down predictably.
   Vertical budget on a 1080 canvas after chrome (top:200, bottom ~120) ≈ 760px.
   ========================================================================= */

/* List with 9+ items — shrink heading + body + gaps so 9 fit cleanly */
.slide--list .stack:has(.bullets > li:nth-child(9)) .heading { font-size: 72px; }
.slide--list ol.bullets:has(> li:nth-child(9)) > li,
.slide--list ul.bullets:has(> li:nth-child(9)) > li {
  font-size: 30px;
  margin-bottom: 12px;
}
.slide--list ol.bullets:has(> li:nth-child(9)) > li::before { font-size: 30px; }
.slide--list ol.bullets:has(> li:nth-child(9)) + .list-summary,
.slide--list ul.bullets:has(> li:nth-child(9)) + .list-summary {
  margin-top: 32px;
  font-size: 28px;
}

/* Steps with 5+ items — tighten so they fit */
.slide--steps .steps-list:has(> .step:nth-child(5)) .step { padding: 14px 0; }
.slide--steps .steps-list:has(> .step:nth-child(5)) .step .step-body { font-size: 24px; line-height: 1.45; }
.slide--steps .steps-list:has(> .step:nth-child(5)) .step .step-num { font-size: 30px; }
.slide--steps .steps-list:has(> .step:nth-child(7)) .step { padding: 10px 0; }
.slide--steps .steps-list:has(> .step:nth-child(7)) .step .step-body { font-size: 22px; line-height: 1.4; }

/* Checklist with 6+ items — tighten */
.slide--checklist ul.checks:has(> li:nth-child(6)) li { font-size: 28px; gap: 18px; }
.slide--checklist ul.checks:has(> li:nth-child(6)) { gap: 18px; }

/* Compare columns with 7+ items — shrink list font */
.slide--compare .col ul.col-list:has(> li:nth-child(7)) li { font-size: 21px; }
.slide--compare .col ul.col-list:has(> li:nth-child(7)) { gap: 10px; }

/* List slide with unordered bullets — accent override */
.slide[data-accent="positive"] ul.bullets > li::before { background: var(--positive); }
.slide[data-accent="warn"]     ul.bullets > li::before { background: var(--warn); }
.slide[data-accent="positive"] ol.bullets > li::before { color: var(--positive); }
.slide[data-accent="warn"]     ol.bullets > li::before { color: var(--warn); }
.slide[data-accent="positive"] .list-summary { color: var(--positive); }
.slide[data-accent="warn"]     .list-summary { color: var(--warn); }

/* Override section underline + heading accent */
.slide[data-accent="positive"] .slide--section .underline,
.slide.slide--section[data-accent="positive"] .underline { background: var(--positive); }
.slide[data-accent="warn"] .slide--section .underline,
.slide.slide--section[data-accent="warn"] .underline { background: var(--warn); }
