/* =====================================================
   経団連HR×AIレポート 読み解きスライド
   Palette: モノトーン × かたわら紺 (#1B2A4A) × えんじ (#8B1F2E)
   ===================================================== */
:root {
  --c-base: #FFFFFF;
  --c-main: #1B2A4A;          /* かたわら紺 */
  --c-accent: #8B1F2E;        /* えんじ */
  --c-accent-dark: #6F1924;
  --c-accent-soft: #F4E7E9;
  --c-sub: #5A6878;
  --c-mute: #8B95A3;
  --c-border: #DDE2EA;
  --c-surface: #F5F7FA;
  --c-bridge-bg: #1B2A4A;
  --c-bridge-text: #FFFFFF;
  --c-text: #1B2A4A;
  --c-text-muted: #5A6878;
  --c-card: #F5F7FA;

  --font-head: 'Noto Sans JP','Inter',sans-serif;
  --font-body: 'Noto Sans JP','Inter',sans-serif;

  --accent-line-color: #8B1F2E;
  --card-radius: 0px;
  --card-border: 1px solid #DDE2EA;
  --card-bg: #F5F7FA;

  --shadow-soft: 0 4px 12px rgba(27,42,74,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-base);
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* ===== Topbar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center;
  padding: 0 20px; z-index: 50;
  backdrop-filter: blur(8px);
}
.hamb {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--c-main); padding: 4px 10px;
}
.hamb:hover { color: var(--c-accent); }
.topbar-title {
  font-size: 14px; font-weight: 700; color: var(--c-main);
  margin-left: 8px; letter-spacing: 0.04em;
}
.topbar-right {
  margin-left: auto; display: flex; align-items: center; gap: 14px;
}
.page-indicator {
  font-size: 13px; color: var(--c-sub); font-feature-settings: 'tnum';
}
.page-indicator span { color: var(--c-main); font-weight: 700; }

/* ===== Sidebar ===== */
.sidebar {
  position: fixed; top: 56px; bottom: 0; left: 0; width: 280px;
  background: var(--c-main); color: #fff;
  transform: translateX(-100%); transition: transform .25s ease;
  z-index: 60; overflow-y: auto;
  padding: 24px 0;
}
.sidebar.open { transform: translateX(0); }
.sidebar-head {
  font-size: 11px; letter-spacing: 0.18em; color: rgba(255,255,255,.5);
  padding: 0 24px 16px; text-transform: uppercase;
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  padding: 10px 24px; font-size: 13px; cursor: pointer;
  border-left: 3px solid transparent; transition: all .15s;
  display: flex; align-items: baseline; gap: 12px;
}
.sidebar-list li:hover { background: rgba(255,255,255,.06); }
.sidebar-list li.active {
  background: rgba(139,31,46,.22);
  border-left-color: var(--c-accent);
}
.sidebar-list .num {
  font-size: 11px; color: rgba(255,255,255,.45); min-width: 22px; font-weight: 700;
}
.backdrop {
  position: fixed; inset: 0; background: rgba(27,42,74,.4);
  display: none; z-index: 55;
}
.backdrop.show { display: block; }

/* ===== Stage / Slide ===== */
.slide-stage {
  position: fixed; top: 56px; bottom: 0; left: 0; right: 0;
  background: var(--c-base);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.slide {
  display: none;
  position: relative;
  width: min(100%, calc((100vh - 56px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: var(--c-base);
  container-type: inline-size;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(27,42,74,.06);
}
.slide.active {
  display: flex; flex-direction: column;
}
.slide-content {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center;
  padding: 5cqw 6cqw;
}
.slide-footer {
  position: absolute; bottom: 1.6cqw; left: 6cqw; right: 6cqw;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.0cqw; color: var(--c-sub); letter-spacing: 0.04em;
}
.slide-footer .pgnum { font-weight: 700; color: var(--c-main); }

/* Top accent bar */
.slide-accent-top {
  position: absolute; top: 0; left: 0; right: 0; height: 0.4cqw;
  background: var(--c-accent);
}

/* ===== Typography (cqw based) ===== */
.slide-h1 { font-size: 5.6cqw; font-weight: 900; line-height: 1.25; letter-spacing: 0.02em; color: var(--c-main); }
.slide-h2 { font-size: 3.6cqw; font-weight: 900; line-height: 1.3; letter-spacing: 0.02em; color: var(--c-main); }
.slide-h3 { font-size: 2.6cqw; font-weight: 700; line-height: 1.4; color: var(--c-main); }
.slide-title { font-size: 2.2cqw; font-weight: 700; line-height: 1.4; color: var(--c-main); }
.slide-body { font-size: 1.5cqw; font-weight: 400; line-height: 1.7; color: var(--c-text); }
.slide-small { font-size: 1.1cqw; line-height: 1.6; color: var(--c-sub); }
.slide-eyebrow {
  font-size: 1.1cqw; font-weight: 700; letter-spacing: 0.18em;
  color: var(--c-accent); text-transform: uppercase;
}

/* ===== Cover slide =====
   重要: display は .slide.active が制御するので、ここでは指定しない */
.slide.cover, .slide.bridge {
  background: var(--c-main); color: #fff;
}
.slide.cover .slide-content,
.slide.bridge .slide-content {
  padding: 6cqw 7cqw;
}
.slide.cover .slide-h1,
.slide.cover .slide-h2,
.slide.bridge .slide-h1,
.slide.bridge .slide-h2 { color: #fff; }
.slide.bridge .slide-body { color: rgba(255,255,255,.78); }
.cover-eyebrow {
  font-size: 1.2cqw; letter-spacing: 0.32em; color: var(--c-accent);
  font-weight: 700; margin-bottom: 1.6cqw;
}
.cover-sub {
  font-size: 1.6cqw; color: rgba(255,255,255,.78); margin-top: 1.8cqw; line-height: 1.6;
}
.cover-meta {
  margin-top: 4cqw; font-size: 1.1cqw; color: rgba(255,255,255,.55);
  border-top: 1px solid rgba(255,255,255,.18); padding-top: 1.4cqw;
  display: flex; justify-content: space-between; gap: 3cqw;
}
.slide.cover .accent-rect {
  position: absolute; right: 0; top: 0; bottom: 0; width: 38%;
  background: linear-gradient(135deg, rgba(139,31,46,.22) 0%, rgba(139,31,46,0) 70%);
}
.slide.cover .accent-bar {
  position: absolute; right: 7cqw; bottom: 6cqw; width: 0.3cqw; height: 12cqw;
  background: var(--c-accent);
}

/* ===== Headline pattern ===== */
.headline {
  margin-bottom: 3cqw;
}
.headline .eyebrow { margin-bottom: 0.8cqw; }
.headline .accent-line {
  width: 4cqw; height: 0.3cqw; background: var(--c-accent);
  margin-top: 1cqw;
}

/* ===== Cards ===== */
.card {
  background: var(--c-card);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 2cqw 2.2cqw;
  display: flex; flex-direction: column; gap: 0.8cqw;
}
.card-num {
  font-size: 2.2cqw; font-weight: 900; color: var(--c-accent); line-height: 1;
  letter-spacing: 0; font-family: 'Inter','Noto Sans JP',sans-serif;
}
.card-title {
  font-size: 1.7cqw; font-weight: 700; color: var(--c-main); line-height: 1.35;
}
.card-body {
  font-size: 1.2cqw; color: var(--c-text); line-height: 1.7;
}

/* ===== Grid ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8cqw; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2cqw; }

/* ===== Bar chart (CSS) ===== */
.bar-chart { display: flex; flex-direction: column; gap: 1.1cqw; width: 100%; }
.bar-row { display: grid; grid-template-columns: 7cqw 1fr 5cqw; align-items: center; gap: 1.2cqw; }
.bar-label { font-size: 1.3cqw; font-weight: 700; color: var(--c-main); }
.bar-track {
  height: 1.6cqw; background: var(--c-surface); border: 1px solid var(--c-border); position: relative;
}
.bar-fill {
  height: 100%; background: var(--c-main); transition: width .6s ease;
}
.bar-fill.accent { background: var(--c-accent); }
.bar-value { font-size: 1.2cqw; font-weight: 700; color: var(--c-main); text-align: right; font-feature-settings:'tnum'; }

/* ===== Donut (SVG) ===== */
.donut-wrap { display: flex; align-items: center; gap: 2.5cqw; }
.donut { width: 18cqw; height: 18cqw; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 0.7cqw; flex: 1; }
.donut-legend li {
  list-style: none; display: grid; grid-template-columns: 1cqw 1fr 4cqw;
  gap: 0.8cqw; align-items: center; font-size: 1.15cqw; color: var(--c-text);
}
.donut-legend .sw { width: 0.9cqw; height: 0.9cqw; border-radius: 0; }
.donut-legend .pct { font-weight: 700; color: var(--c-main); text-align: right; font-feature-settings:'tnum'; }

/* ===== Steps ===== */
.steps {
  display: grid; grid-template-columns: 1fr 0.3cqw 1fr 0.3cqw 1fr;
  gap: 1.4cqw; align-items: stretch;
}
.step-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  padding: 1.8cqw 1.6cqw; display: flex; flex-direction: column; gap: 1cqw;
  position: relative;
}
.step-card .step-num {
  font-size: 0.95cqw; font-weight: 900; letter-spacing: 0.18em;
  color: var(--c-accent);
}
.step-card .step-title {
  font-size: 1.5cqw; font-weight: 700; color: var(--c-main); line-height: 1.4;
}
.step-card .step-body {
  font-size: 1.1cqw; color: var(--c-text-muted); line-height: 1.7;
}
.step-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--c-accent); font-size: 1.6cqw; font-weight: 900;
}

/* ===== Table ===== */
.cases-table { width: 100%; border-collapse: collapse; }
.cases-table th {
  background: var(--c-main); color: #fff;
  font-size: 1.15cqw; font-weight: 700;
  padding: 1cqw 1.1cqw; text-align: left; letter-spacing: 0.03em;
}
.cases-table td {
  font-size: 1.1cqw; padding: 1.1cqw 1.1cqw;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top; line-height: 1.6; color: var(--c-text);
}
.cases-table tr:nth-child(even) td { background: var(--c-surface); }
.cases-table .company { font-weight: 700; color: var(--c-main); white-space: nowrap; }
.cases-table .domain { color: var(--c-accent); font-weight: 700; white-space: nowrap; }
.cases-table .effect { font-weight: 700; color: var(--c-main); }

/* ===== Quote / Highlight box ===== */
.quote-box {
  border-left: 0.4cqw solid var(--c-accent);
  background: var(--c-surface);
  padding: 2cqw 2.4cqw;
  font-size: 1.6cqw; line-height: 1.7;
  font-weight: 700; color: var(--c-main);
}
.quote-box .accent { color: var(--c-accent); }

.highlight-box {
  background: var(--c-main); color: #fff;
  padding: 2.2cqw 2.4cqw;
  border-left: 0.5cqw solid var(--c-accent);
}
.highlight-box .label {
  font-size: 1.0cqw; letter-spacing: 0.18em; color: #E8B5BD; font-weight: 700;
  margin-bottom: 0.8cqw;
}
.highlight-box .text {
  font-size: 1.5cqw; line-height: 1.7; font-weight: 700;
}

/* ===== Bullet list (questions) ===== */
.q-list { display: flex; flex-direction: column; gap: 1cqw; }
.q-item {
  display: grid; grid-template-columns: 3.4cqw 1fr; gap: 1.4cqw;
  background: var(--c-surface); border-left: 0.3cqw solid var(--c-accent);
  padding: 1.4cqw 1.8cqw; align-items: center;
}
.q-num {
  font-size: 2.4cqw; font-weight: 900; color: var(--c-accent);
  font-family: 'Inter','Noto Sans JP',sans-serif; line-height: 1;
}
.q-text { font-size: 1.5cqw; font-weight: 700; color: var(--c-main); line-height: 1.5; }

/* ===== Conclusion list ===== */
.conclusion-list { display: flex; flex-direction: column; gap: 1.4cqw; }
.concl-item {
  display: grid; grid-template-columns: 4cqw 1fr; gap: 1.6cqw; align-items: baseline;
  border-bottom: 1px solid var(--c-border); padding-bottom: 1.4cqw;
}
.concl-item:last-child { border-bottom: none; }
.concl-num {
  font-size: 3.2cqw; font-weight: 900; color: var(--c-accent);
  font-family: 'Inter','Noto Sans JP',sans-serif; line-height: 1;
}
.concl-text {
  font-size: 1.9cqw; font-weight: 700; color: var(--c-main); line-height: 1.55;
}
.concl-text .accent { color: var(--c-accent); }

/* ===== Reference list ===== */
.ref-list { display: flex; flex-direction: column; gap: 1.0cqw; }
.ref-item {
  display: grid; grid-template-columns: 2.8cqw 1fr; gap: 1.2cqw;
  padding-bottom: 1cqw; border-bottom: 1px solid var(--c-border);
}
.ref-num { color: var(--c-accent); font-weight: 700; font-size: 1.1cqw; }
.ref-text { font-size: 1.15cqw; color: var(--c-text); line-height: 1.65; }
.ref-text .ref-title { font-weight: 700; color: var(--c-main); }
.ref-text .ref-meta { color: var(--c-sub); font-size: 1.0cqw; display: block; margin-top: 0.2cqw; }

/* ===== Closing ===== */
.closing-block {
  display: flex; flex-direction: column; gap: 2cqw; max-width: 75%;
}
.closing-block .signature {
  font-size: 2.4cqw; font-weight: 900; color: #fff; letter-spacing: 0.04em;
}
.closing-block .desc {
  font-size: 1.4cqw; color: rgba(255,255,255,.78); line-height: 1.7;
}
.closing-contact {
  margin-top: 3cqw; padding-top: 2cqw;
  border-top: 1px solid rgba(255,255,255,.2);
  display: flex; gap: 3cqw; flex-wrap: wrap;
  font-size: 1.1cqw; color: rgba(255,255,255,.6);
}

/* ===== Note (annotation) ===== */
.note {
  font-size: 1.0cqw; color: var(--c-sub); line-height: 1.6;
  border-left: 0.2cqw solid var(--c-border);
  padding-left: 1cqw; margin-top: 1cqw;
}
.note strong { color: var(--c-accent); }

/* ===== Controls ===== */
.ctrl {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; gap: 8px; z-index: 40;
}
.ctrl-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(27,42,74,.85); color: #fff; border: none;
  font-size: 22px; cursor: pointer; line-height: 1;
  box-shadow: var(--shadow-soft);
  transition: background .15s, transform .15s;
}
.ctrl-btn:hover { background: var(--c-accent); transform: scale(1.06); }

/* ===== Memo feature ===== */
.memo-list-btn {
  background: var(--c-accent-soft); color: var(--c-accent);
  border: 1px solid #ecd0d4; padding: 6px 12px; border-radius: 18px; cursor: pointer;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.memo-list-btn:hover { background: var(--c-accent); color: #fff; }
.memo-list-btn span {
  background: var(--c-accent); color: #fff; border-radius: 10px;
  min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; padding: 0 5px;
}
.memo-list-btn:hover span { background: #fff; color: var(--c-accent); }
.memo-btn {
  position: fixed; top: 80px; right: 20px; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 1px solid var(--c-border); cursor: pointer; font-size: 20px;
  box-shadow: var(--shadow-soft); z-index: 54; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.memo-btn:hover { background: var(--c-accent-soft); transform: scale(1.05); }
.memo-dot {
  position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-accent); display: none; border: 2px solid #fff;
}
.memo-btn.has-note .memo-dot { display: block; }

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0; background: rgba(27,42,74,.5);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  background: #fff; border-radius: 0; padding: 24px; width: 520px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 16px;
  border-top: 4px solid var(--c-accent);
}
.modal-card-lg { width: 680px; max-height: 80vh; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head strong { font-size: 16px; color: var(--c-main); }
.modal-sub { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer; color: var(--c-text-muted);
  padding: 0 8px; line-height: 1;
}
.modal-close:hover { color: var(--c-accent); }
#memo-textarea {
  width: 100%; min-height: 160px; padding: 12px; border: 1px solid var(--c-border);
  border-radius: 4px; font-family: inherit; font-size: 14px; line-height: 1.6; resize: vertical;
  color: var(--c-text); background: #fafbfc;
}
#memo-textarea:focus { outline: none; border-color: var(--c-accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-primary {
  background: var(--c-accent); color: #fff; border: none; padding: 10px 20px;
  border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: var(--c-accent-dark); }
.btn-ghost {
  background: none; color: var(--c-text-muted); border: 1px solid var(--c-border);
  padding: 10px 16px; border-radius: 4px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { background: var(--c-accent-soft); color: var(--c-accent); border-color: var(--c-accent); }
.memo-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  max-height: 50vh; padding-right: 4px;
}
.memo-list-empty { text-align: center; color: var(--c-text-muted); padding: 32px; font-size: 13px; }
.memo-item {
  background: #fafbfc; border: 1px solid var(--c-border); border-radius: 4px; padding: 12px 16px;
}
.memo-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.memo-item-title { font-size: 13px; font-weight: 700; color: var(--c-accent); cursor: pointer; }
.memo-item-title:hover { text-decoration: underline; }
.memo-item-text { font-size: 13px; color: var(--c-text); line-height: 1.7; white-space: pre-wrap; }
.memo-item-del { background: none; border: none; color: var(--c-text-muted); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.memo-item-del:hover { color: var(--c-accent); }

/* ===== Print mode (?print=1) ===== */
@page { size: 1920px 1080px; margin: 0; }

.print-mode .topbar,
.print-mode .ctrl,
.print-mode .memo-btn,
.print-mode .sidebar,
.print-mode .backdrop,
.print-mode .modal { display: none !important; }

.print-mode html, .print-mode body {
  overflow: visible !important;
  height: auto !important;
}
.print-mode .slide-stage {
  position: static !important;
  display: block !important;
  height: auto !important;
  top: 0 !important;
  background: #fff;
}
.print-mode .slide {
  display: flex !important;
  flex-direction: column !important;
  width: 1920px !important;
  height: 1080px !important;
  max-width: none !important;
  aspect-ratio: 16 / 9;
  box-shadow: none !important;
  margin: 0 !important;
  page-break-after: always;
  break-after: page;
  overflow: hidden !important;
}
.print-mode .slide:last-child {
  page-break-after: auto;
  break-after: auto;
}

@media print {
  body { background: #fff; }
}

