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

:root {
  --bg: #ffffff;
  --bg-page: #eeeef0;
  --bg-card: #f3f3f5;
  --bg-dark: #1a1a1e;
  --text: #0a0a0f;
  --text-mid: #44444d;
  --text-muted: #888890;
  --border: #dddde2;
  --accent: #0038ff;
  --accent-dark: #0028cc;
  --accent-bg: #0038ff;
  --accent-light: #eef1ff;
  --danger: #d63031;
  --danger-bg: #fff0f0;
  --success: #00a86b;
  --success-bg: #edfff6;
  --warning: #e67e22;
  --warning-bg: #fff8ed;
  --slide-w: 297mm;
  --slide-h: 210mm;
}

/* increased base font size significantly for much better slide readability */
html { font-size: 24px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.6;
  font-weight: 400;
}

strong { font-weight: 700; }

/* ===== SLIDE ===== */
.slide {
  width: var(--slide-w);
  height: var(--slide-h);
  background: var(--bg);
  margin: 20px auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  page-break-after: always;
  page-break-inside: avoid;
}

.slide-inner {
  padding: 0 48px;
  padding-top: 52px;
  height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
}

/* ===== NAV BAR ===== */
.slide-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 10;
}

.nav-brand {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-right: 32px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links li {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.01em;
  cursor: default;
}

.nav-links li.active {
  color: var(--accent);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}

.nav-right {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav-icon {
  width: 22px;
  height: 22px;
  color: var(--text-mid);
  cursor: pointer;
}

/* ===== FOOTER ===== */
.slide-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.55rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.page-ref {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
}

/* ===== HEADER ===== */
.slide-header {
  margin-bottom: 20px;
  margin-top: 14px;
  flex-shrink: 0;
}

.section-label {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.slide-header h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* ===== TITLE SLIDE ===== */
.slide-title { background: var(--bg); }

.slide-title .slide-inner {
  padding-top: 60px;
}

.title-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 60%;
}

.title-badge {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.title-accent-line { display: none; }

.slide-title h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.slide-title h1 .accent { color: var(--accent); }

.subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-mid);
  margin-top: 16px;
  line-height: 1.6;
}

.title-meta {
  margin-top: 36px;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.meta-divider { margin: 0 10px; opacity: 0.4; }

.title-decoration {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.deco-circle {
  display: none;
}

.title-phase {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
}

.phase-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 32px;
  text-align: center;
}

.phase-badge .phase-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
}

.phase-badge .phase-label {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== SUMMARY GRID ===== */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.summary-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px 24px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.summary-icon { font-size: 1.2rem; margin-bottom: 6px; }

.summary-card h3 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.summary-card p {
  font-size: 0.72rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ===== TWO COLUMNS ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  flex: 1;
}

.col-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-card);
  letter-spacing: -0.01em;
}

/* ===== STATS ===== */
.stat-block { margin-bottom: 16px; }

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.stat-number.accent { color: var(--accent); }
.stat-unit { font-size: 0.8rem; font-weight: 600; }

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.check-list { list-style: none; }

.check-list li {
  font-size: 0.72rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-card);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-mid);
}

.check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.highlight-box {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin-top: 12px;
}

.highlight-box p { font-size: 0.72rem; line-height: 1.6; }
.accent-text { color: var(--accent); }

/* ===== FLOW DIAGRAM ===== */
.flow-section { margin-bottom: 16px; }

.flow-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.flow-step { display: flex; align-items: center; }

.flow-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
  min-width: 150px;
}

.flow-box-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.flow-icon { font-size: 1.2rem; margin-bottom: 2px; }
.flow-label { font-size: 0.65rem; line-height: 1.4; color: var(--text-mid); font-weight: 500;}
.flow-arrow { font-size: 0.9rem; color: var(--text-muted); margin: 0 8px; }

.problem-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.problem-card {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--danger);
}

.problem-num {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.problem-card h4 { font-size: 0.75rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.01em; }
.problem-card p { font-size: 0.65rem; color: var(--text-mid); line-height: 1.5; }

/* ===== SOLUTION ===== */
.solution-flow {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.solution-step {
  display: flex;
  align-items: stretch;
  width: 90%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.step-accent {
  background: var(--accent);
  border-color: var(--accent);
}

.step-accent .step-number { color: #fff; background: rgba(0,0,0,0.15); }
.step-accent .step-content { color: #fff; }
.step-accent .step-content h4 { color: #fff; }
.step-accent .step-content p { color: rgba(255,255,255,0.8); }

.step-number {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  background: rgba(0,56,255,0.04);
}

.step-content { padding: 12px 20px; }
.step-content h4 { font-size: 0.75rem; font-weight: 800; margin-bottom: 2px; letter-spacing: -0.01em; }
.step-content p { font-size: 0.65rem; color: var(--text-mid); line-height: 1.5; }

.solution-arrow { text-align: center; color: var(--accent); font-size: 0.85rem; margin: 4px 0; }

.key-message {
  text-align: center;
  margin-top: 14px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-radius: 6px;
}

.key-message p { font-size: 0.75rem; margin: 2px 0; }
.key-new { font-size: 0.95rem !important; }
.line-through { text-decoration: line-through; color: var(--text-muted); }

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  flex: 1;
}

.comparison-table th, .comparison-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--bg-card);
}

.comparison-table thead th {
  background: var(--bg-card);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 12px;
  letter-spacing: -0.01em;
}

.comparison-table thead th small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.55rem;
  margin-top: 2px;
}

.th-accent {
  background: var(--accent) !important;
  color: #fff !important;
}

.th-accent small { color: rgba(255,255,255,0.7) !important; }

.td-accent { background: var(--accent-light); }
.row-label { text-align: left !important; font-weight: 700; color: var(--text-mid); }
.text-danger { color: var(--danger); font-weight: 700; }
.text-good { color: var(--success); font-weight: 700; }

.comparison-point {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 12px;
  text-align: center;
}

.comparison-point p { font-size: 0.72rem; }

/* ===== ECONOMICS ===== */
.econ-cols { gap: 28px; }

.waterfall { margin-bottom: 6px; }

.wf-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 10px;
}

.wf-label {
  font-size: 0.62rem;
  color: var(--text-mid);
  width: 110px;
  flex-shrink: 0;
  text-align: right;
}

.wf-bar {
  height: 28px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  min-width: 90px;
  white-space: nowrap;
}

.wf-cost { background: var(--bg-dark); }
.wf-expense { background: #6c6c78; }
.wf-revenue { background: var(--accent); }
.wf-profit { background: var(--accent); }
.wf-profit-row { margin-top: 8px; padding-top: 8px; border-top: 2px dashed var(--border); }

.note { font-size: 0.55rem; color: var(--text-muted); margin-top: 4px; }

.broker-compare { margin-top: 8px; }
.broker-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
}
.broker-new { background: var(--accent-light); }
.broker-label {
  font-size: 0.55rem;
  font-weight: 800;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}
.broker-new .broker-label { background: var(--accent); color: #fff; border-color: var(--accent); }
.broker-arrow { text-align: center; color: var(--text-muted); font-size: 0.7rem; margin: 1px 0; }
.text-muted { color: var(--text-muted); }

.sim-table { width: 100%; border-collapse: collapse; font-size: 0.65rem; }
.sim-table th, .sim-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--bg-card);
  text-align: left;
}
.sim-table thead th {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sim-highlight { background: var(--accent-light); }
.big-num { font-size: 0.95rem; letter-spacing: -0.02em; }

/* ===== ADVANTAGE ===== */
.advantage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.adv-card {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 16px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.adv-card::before {
  content: '';
  position: absolute;
  top: 16px; left: 0;
  width: 4px; height: 20px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.adv-num {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.adv-card h4 { font-size: 0.75rem; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.01em; }
.adv-card p { font-size: 0.65rem; color: var(--text-mid); line-height: 1.5; }

.moat-message {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-dark);
  color: #fff;
  border-radius: 6px;
  padding: 14px 20px;
  margin-top: 10px;
}

.moat-icon { font-size: 1.6rem; }
.moat-message p { font-size: 0.68rem; line-height: 1.5; opacity: 0.9; }

/* ===== RISK TABLE ===== */
.risk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  flex: 1;
}

.risk-table th, .risk-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg-card);
  text-align: left;
  vertical-align: top;
}

.risk-table thead th {
  background: var(--bg-card);
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.risk-badge {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 3px;
  display: inline-block;
  letter-spacing: 0.03em;
}

.risk-high { background: var(--danger-bg); color: var(--danger); }
.risk-mid { background: var(--warning-bg); color: var(--warning); }
.risk-low { background: var(--success-bg); color: var(--success); }

/* ===== FUND ===== */
.fund-total {
  text-align: center;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: 8px;
}

.fund-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.fund-unit { font-size: 0.8rem; font-weight: 700; }

.fund-label {
  display: block;
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fund-bars { display: flex; flex-direction: column; gap: 8px; }

.fund-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  margin-bottom: 3px;
}

.fund-bar {
  height: 10px;
  background: var(--bg-card);
  border-radius: 5px;
  overflow: hidden;
}

.fund-fill { height: 100%; background: var(--accent); border-radius: 5px; }
.fund-fill-2 { background: #3358ff; }
.fund-fill-3 { background: #6680ff; }
.fund-fill-4 { background: #aab5d6; }

.timeline { display: flex; flex-direction: column; gap: 8px; }

.tl-item {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid transparent;
}

.tl-highlight { border-color: var(--accent); background: var(--accent-light); }

.tl-period {
  flex-shrink: 0;
  width: 110px;
  padding: 8px 10px;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: rgba(0,56,255,0.04);
  border-right: 1px solid var(--border);
}

.tl-period small { font-weight: 400; color: var(--text-muted); }

.tl-content { padding: 8px 14px; display: flex; flex-direction: column; justify-content: center; }
.tl-content h4 { font-size: 0.72rem; font-weight: 800; margin-bottom: 2px; letter-spacing: -0.01em; }
.tl-content p { font-size: 0.6rem; color: var(--text-mid); line-height: 1.5; }

/* ===== CLOSING ===== */
.slide-closing { background: var(--bg); }

.closing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.closing-accent-line {
  width: 48px;
  height: 4px;
  background: var(--accent);
  margin-bottom: 24px;
}

.closing-content h2 {
  font-size: 1.8rem;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.closing-message {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.closing-message .accent-text { color: var(--accent); }

.closing-divider {
  width: 36px;
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.closing-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.closing-meta { margin-top: 24px; }
.closing-meta p {
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Decorative squares (Reference design element) */
.deco-square {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.deco-square-accent { background: var(--accent); }
.deco-square-dark { background: var(--bg-dark); }
.deco-square-muted { background: var(--border); }

/* ===== PRINT ===== */
@media print {
  body { background: white; margin: 0; padding: 0; }
  .slide { box-shadow: none; margin: 0; }
  .slide-nav { position: absolute; }
  @page { size: A4 landscape; margin: 0; }
}

@media screen and (max-width: 1200px) {
  .slide {
    width: 100vw;
    height: calc(100vw * 210 / 297);
  }
}
