/* Shared CRPE NotebookLM visual system.
   Source: notebooklm-crpe-reference.html
   Keep HTML pages lean by linking this file instead of inlining the full stylesheet. */

:root {
  --font-body: "Bricolage Grotesque", system-ui, sans-serif;
  --font-title: "Fraunces", Georgia, serif;
  --font-mono: "Fragment Mono", ui-monospace, monospace;

  --bg: #fff9ee;
  --paper: #ffffff;
  --cream: #fff2d6;
  --ink: #263238;
  --muted: #69757b;
  --line: rgba(38, 50, 56, 0.12);
  --line-strong: rgba(38, 50, 56, 0.2);

  --coral: #ec6a4b;
  --coral-soft: #ffe0d6;
  --sun: #f7c948;
  --sun-soft: #fff0b8;
  --mint: #71bf9b;
  --mint-soft: #dff5ea;
  --sky: #69aee8;
  --sky-soft: #d9ecff;
  --lilac: #a78bd8;
  --lilac-soft: #eadfff;
  --cranberry: #c94f70;
  --cranberry-soft: #ffe0ea;

  --shadow: 0 20px 55px rgba(48, 58, 64, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 10% 8%, rgba(247, 201, 72, 0.36), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(105, 174, 232, 0.28), transparent 30%),
    radial-gradient(circle at 72% 86%, rgba(113, 191, 155, 0.26), transparent 28%),
    linear-gradient(90deg, rgba(236, 106, 75, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(105, 174, 232, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 30px 30px, 30px 30px, auto;
  padding: 28px;
}

.layout {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
}

.toc {
  position: sticky;
  top: 22px;
  align-self: start;
  max-height: calc(100dvh - 44px);
  overflow: auto;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(48, 58, 64, 0.08);
}

.toc-title {
  padding: 0 8px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 9px 10px;
  border-radius: 12px;
  border-left: 4px solid transparent;
  font-size: 14px;
  line-height: 1.2;
  transition: 160ms ease;
}

.toc a:hover,
.toc a.active {
  color: var(--ink);
  background: var(--cream);
  border-left-color: var(--coral);
}

main { min-width: 0; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background:
    linear-gradient(135deg, #ffffff 0%, #fff6df 58%, #e8f5ff 100%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 56px);
  margin-bottom: 26px;
}

.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background:
    conic-gradient(from 12deg, var(--sun), var(--mint), var(--sky), var(--lilac), var(--coral), var(--sun));
  opacity: 0.22;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker::before {
  content: "";
  flex: 0 0 40px;
  width: 40px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 5px 50%, var(--coral) 0 5px, transparent 5.5px),
    radial-gradient(circle at 20px 50%, var(--sun) 0 5px, transparent 5.5px),
    radial-gradient(circle at 35px 50%, var(--mint) 0 5px, transparent 5.5px);
}

h1 {
  position: relative;
  z-index: 1;
  margin: 18px 0 14px;
  max-width: 960px;
  font-family: var(--font-title);
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.lead {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.38;
}

.hero-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 940px;
}

.principle {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.principle strong {
  display: block;
  font-size: 21px;
  margin-bottom: 6px;
}

.principle span {
  color: var(--muted);
  line-height: 1.35;
  font-size: 15px;
}

section {
  margin: 28px 0;
  scroll-margin-top: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}

h2 {
  margin: 8px 0 0;
  font-family: var(--font-title);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.section-note {
  max-width: 490px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 16px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.card {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
}

.card.featured {
  box-shadow: 0 16px 38px rgba(48, 58, 64, 0.1);
  border-color: var(--line-strong);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--accent, var(--coral));
}

.c-coral { --accent: var(--coral); --soft: var(--coral-soft); }
.c-sun { --accent: var(--sun); --soft: var(--sun-soft); }
.c-mint { --accent: var(--mint); --soft: var(--mint-soft); }
.c-sky { --accent: var(--sky); --soft: var(--sky-soft); }
.c-lilac { --accent: var(--lilac); --soft: var(--lilac-soft); }
.c-cranberry { --accent: var(--cranberry); --soft: var(--cranberry-soft); }

.label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--soft, var(--coral-soft));
  color: color-mix(in srgb, var(--accent, var(--coral)) 78%, #263238 22%);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.notions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffaf0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.cycle-program {
  display: grid;
  gap: 14px;
}

.cycle-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(48, 58, 64, 0.08);
}

.cycle-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--soft, var(--cream)), #ffffff);
  border-bottom: 1px solid var(--line);
}

.cycle-top h3 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.cycle-top p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.cycle-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent, var(--coral)) 42%, transparent);
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

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

.subject {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.subject:last-child { border-right: 0; }

.subject h4 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.subject h4::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--accent, var(--coral));
}

.subject ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

.prompt-mini {
  margin: 0 22px 22px;
  padding: 14px 16px;
  background: #263238;
  color: #fff9ee;
  border-radius: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.path {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-family: var(--font-mono);
  background: var(--sun-soft);
  border: 1px solid rgba(247, 201, 72, 0.62);
}

.step h3 {
  margin: 2px 0 4px;
  font-size: 22px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

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

.routine-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--coral);
  margin-bottom: 11px;
}

.routine-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 5px;
}

.routine-card span {
  display: block;
  color: var(--muted);
  line-height: 1.36;
}

.tool-map {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.tool-main {
  border-radius: var(--radius-xl);
  padding: 26px;
  background: linear-gradient(135deg, var(--mint-soft), #ffffff);
  border: 1px solid var(--line);
}

.tool-main h3 {
  margin: 0 0 12px;
  font-size: 31px;
  line-height: 1;
}

.tool-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 17px;
}

.tool-list {
  display: grid;
  gap: 10px;
}

.tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.tool b { display: block; margin-bottom: 4px; }
.tool small { color: var(--muted); line-height: 1.35; display: block; }

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

.prompt-zone {
  margin-bottom: 22px;
}

.zone-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
}

.zone-intro h3 {
  margin: 0 0 5px;
  font-size: 25px;
  line-height: 1;
}

.zone-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.zone-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--sun-soft);
  white-space: nowrap;
}

.prompt {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #263238;
  color: #fff9ee;
  box-shadow: 0 18px 42px rgba(38, 50, 56, 0.18);
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255, 249, 238, 0.13);
  color: rgba(255, 249, 238, 0.74);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

.warning {
  background: linear-gradient(135deg, var(--coral-soft), #ffffff);
  border: 1px solid rgba(236, 106, 75, 0.35);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.warning h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.warning ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.75;
}

.tracking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(48, 58, 64, 0.08);
}

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

.tracking-table th {
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.tracking-table td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.footer {
  margin: 34px 0 10px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero, section {
  animation: fadeUp 520ms ease both;
}

section:nth-of-type(1) { animation-delay: 70ms; }
section:nth-of-type(2) { animation-delay: 120ms; }
section:nth-of-type(3) { animation-delay: 170ms; }
section:nth-of-type(4) { animation-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1160px) {
  .layout { grid-template-columns: 1fr; }
  .toc {
    z-index: 20;
    top: 0;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    max-height: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: -28px -28px 24px;
    padding: 10px 28px;
  }
  .toc-title { display: none; }
  .toc a {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 4px solid transparent;
    white-space: nowrap;
  }
  .toc a:hover,
  .toc a.active {
    border-bottom-color: var(--coral);
    border-left-color: transparent;
  }
  .routine, .cols-4, .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject { border-bottom: 1px solid var(--line); }
  .subject:nth-child(2n) { border-right: 0; }
  section { scroll-margin-top: 78px; }
}

@media (max-width: 760px) {
  body { padding: 18px; }
  .toc { margin: -18px -18px 20px; padding-inline: 18px; }
  .hero { padding: 26px 20px; border-radius: 26px; }
  h1 { font-size: 42px; }
  .hero-row, .cols-2, .cols-3, .cols-4, .routine, .tool-map, .prompt-grid, .subject-grid, .zone-intro {
    grid-template-columns: 1fr;
  }
  .cycle-top { grid-template-columns: 1fr; }
  .subject { border-right: 0; border-bottom: 1px solid var(--line); }
  .subject:last-child { border-bottom: 0; }
  .section-head { display: block; }
  .section-note { margin-top: 8px; }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #263238 !important;
  }

  body {
    padding: 0;
    font-size: 10.5pt;
  }

  .layout {
    display: block;
    max-width: none;
  }

  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 0 10mm;
    padding: 8px;
    border-radius: 10px;
    break-inside: avoid;
  }

  .toc a {
    display: inline-block;
    padding: 4px 6px;
    font-size: 9pt;
  }

  .hero {
    padding: 12mm;
    margin-bottom: 8mm;
    border-radius: 14px;
    break-inside: avoid;
  }

  .hero::before {
    display: none;
  }

  h1 {
    font-size: 34pt;
    letter-spacing: -0.02em;
  }

  h2 {
    font-size: 24pt;
  }

  .lead {
    font-size: 13pt;
  }

  section {
    margin: 8mm 0;
    break-inside: auto;
  }

  .card,
  .cycle-panel,
  .routine-card,
  .warning,
  .prompt,
  .step,
  .tracking-table {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .grid,
  .hero-row,
  .routine,
  .prompt-grid,
  .subject-grid {
    gap: 8px;
  }

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

  .card,
  .subject,
  .routine-card {
    padding: 12px;
  }

  .cycle-top {
    padding: 14px 16px;
  }

  .prompt,
  .prompt-mini {
    background: #263238 !important;
    color: #fff9ee !important;
  }

  .tracking-table th,
  .tracking-table td {
    padding: 7px 8px;
    font-size: 8.5pt;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
