@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+JP:wght@400;500;700;800;900&display=swap');

* { box-sizing: border-box; }

:root {
  --bg: #e6e1dc;
  --paper: #fffdf9;
  --soft: #f6f2ee;
  --ink: #111111;
  --muted: #4d4d4d;
  --line: #d7d0c9;
  --accent: #ce7857;
  --accent-dark: #a85c45;
  --black: #000000;
  --shadow: 0 8px 24px rgba(0,0,0,0.12);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #f5f2ee 0%, var(--bg) 100%);
  color: var(--ink);
  line-height: 1.72;
  overflow-x: hidden;
}

a { color: inherit; }

.deck-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(230,225,220,0.88);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 30px;
  height: 3px;
  border-radius: 8px;
  background: currentColor;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.74);
  color: #2d3c38;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.nav-links a[aria-current="page"],
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.deck {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.slide {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: clamp(24px, 5vw, 56px) 0;
  scroll-margin-top: 80px;
}

.slide-inner,
.panel {
  min-width: 0;
  border: 1px solid rgba(222,216,204,0.86);
  border-radius: 8px;
  background: rgba(255,253,249,0.88);
  box-shadow: var(--shadow);
}

.slide-inner {
  padding: clamp(28px, 5vw, 52px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 18px;
}

.hero-card {
  display: grid;
  align-content: space-between;
  min-width: 0;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 8px;
  background: var(--black);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-card p,
.hero-card li {
  color: #d8d8d8;
}

.kicker {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 860px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

h2 {
  max-width: 900px;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 880;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

h3 {
  color: #20262d;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.35;
  margin-bottom: 8px;
}

p,
li {
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
}

.lead {
  max-width: 780px;
  margin-top: 22px;
  color: #38423f;
  font-size: clamp(19px, 2.2vw, 25px);
}

.note {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: rgba(206,120,87,0.1);
  color: #3f332e;
  font-weight: 650;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-width: 0;
  height: 100%;
  padding: 20px;
  border: 1px solid rgba(222,216,204,0.92);
  border-radius: 8px;
  background: rgba(255,255,255,0.86);
}

.card.accent {
  border-top: 4px solid var(--accent);
}

.card.dark {
  border-color: var(--black);
  background: var(--black);
}

.card.dark h3,
.card.dark p,
.card.dark li {
  color: #fff;
}

.clean-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.clean-list li {
  position: relative;
  padding-left: 18px;
}

.clean-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.stack {
  display: grid;
  gap: 8px;
}

.layer-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.layer-row b {
  display: grid;
  place-items: center;
  min-height: 72px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 18px;
}

.layer-row span {
  padding: 16px 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.term-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: clamp(14px, 1.3vw, 17px);
}

.term-table th,
.term-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.term-table th {
  background: var(--soft);
  color: var(--ink);
  font-weight: 850;
}

.term-table tr:last-child td {
  border-bottom: 0;
}

.quote {
  margin-top: 22px;
  padding: 22px;
  border-radius: 8px;
  background: var(--black);
  color: #fff;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.45;
  font-weight: 820;
}

.quote span {
  display: block;
  margin-top: 10px;
  color: #d8d8d8;
  font-size: 0.6em;
  font-weight: 500;
}

.stepper {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  counter-reset: steps;
}

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.step::before {
  counter-increment: steps;
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(206,120,87,0.14);
  color: var(--accent-dark);
  font-weight: 900;
}

.step strong {
  display: block;
  color: var(--ink);
}

.step span {
  display: block;
  color: var(--muted);
}

.deck-controls {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  gap: 8px;
}

.deck-controls a,
.deck-controls button {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.progress {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 35;
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.15s ease;
}

footer {
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 880px) {
  .deck-nav,
  .hero-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .deck {
    width: min(100% - 28px, 1160px);
  }

  .slide {
    min-height: auto;
    padding: 18px 0;
  }

  .grid,
  .grid.two,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .layer-row {
    grid-template-columns: 1fr;
  }

  .term-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .deck-controls {
    right: 12px;
    bottom: 12px;
  }
}
