/* ============================================================
   style-notion.css — plain reproduction of the source Notion page's
   own look: Notion's system font stack, block spacing, callout/toggle
   treatment, native colors and table styling. No card redesign, no
   accent-row/pitch-diagram layout — just the blocks as Notion itself
   renders them.
   ============================================================ */

:root {
  --fg: rgb(55, 53, 47);
  --fg-light: rgba(55, 53, 47, 0.65);
  --fg-lighter: rgba(55, 53, 47, 0.45);
  --bg: #ffffff;
  --page-bg: #ffffff;
  --bg-hover: rgba(55, 53, 47, 0.06);
  --border: rgba(55, 53, 47, 0.09);
  --border-strong: rgba(55, 53, 47, 0.16);
  --callout-bg: rgb(239, 238, 237);
  --blue: rgb(35, 131, 226);
  /* Kansaidex's own pitch-accent-diagram accent color (its default theme's
     --accent), kept as the same hex so the "Kansai" graph reads as the
     same visual language as the Kansaidex dictionary it's ported from. */
  --pitch-accent-kansai: #4f97ab;
  --page-width: 900px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP",
    Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --smiley-sans: "Smiley Sans", var(--sans);
}

@font-face {
  font-family: "Smiley Sans";
  src: url("/fonts/SmileySans-Oblique.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0.05em solid var(--border-strong);
  transition: border-color 0.1s ease;
}
a:hover { border-color: var(--fg-light); }

/* ---- top nav (not part of the Notion page itself, kept minimal) ---- */

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  border-bottom: none;
}
.brand:hover { border-bottom: none; opacity: 0.7; }

/* ---- hamburger menu + slide-in drawer (injected by js/auth.js) ---- */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  border-bottom: none;
}
.btn-login:hover { background: var(--bg-hover); border-bottom: none; }

/* ---- homepage header CTA (replaces the hamburger menu + login link
   on the landing page with a single text link) ---- */

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  border-bottom: none;
}
.btn-header-cta:hover { opacity: 0.75; border-bottom: none; }

.menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.menu-trigger:hover { background: var(--bg-hover); }

.menu-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-start;
}
.menu-drawer-layer[hidden] { display: none; }

.menu-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: default;
  animation: menu-backdrop-enter 460ms cubic-bezier(0.6, 0, 0.2, 1);
}
.menu-drawer-layer.is-closing .menu-backdrop {
  animation: menu-backdrop-exit 460ms cubic-bezier(0.8, 0, 0.4, 1) forwards;
}

.menu-drawer {
  position: relative;
  width: min(80vw, 320px);
  min-width: 240px;
  height: 100%;
  overflow-y: auto;
  padding: 20px 20px 28px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.18);
  animation: menu-drawer-enter 460ms cubic-bezier(0.6, 0, 0.2, 1);
}
.menu-drawer-layer.is-closing .menu-drawer {
  animation: menu-drawer-exit 460ms cubic-bezier(0.8, 0, 0.4, 1) forwards;
}

@keyframes menu-drawer-enter {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes menu-drawer-exit {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@keyframes menu-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes menu-backdrop-exit {
  from { opacity: 1; }
  to { opacity: 0; }
}

.menu-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 18px;
  border-bottom: 1px solid var(--border);
}
.menu-drawer-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
}

.menu-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.menu-drawer-close:hover { background: var(--border); }

.menu-list { margin-top: 4px; }

.menu-search {
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--border);
}
.menu-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 15px;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
}
.menu-search-input:focus { outline: none; border-color: var(--blue); }

.menu-search-results { margin-top: 10px; }
.menu-search-empty {
  margin: 4px 2px;
  font-size: 13px;
  color: var(--fg-lighter);
}
.menu-search-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 4px;
  border-bottom: none;
  color: var(--fg);
}
.menu-search-result:hover { background: var(--bg-hover); border-bottom: none; }
.menu-search-result-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.menu-search-result-text { min-width: 0; }
.menu-search-result-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-search-result-category {
  display: block;
  font-size: 12px;
  color: var(--fg-lighter);
}

.menu-account {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.menu-account strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fg-lighter);
  margin-bottom: 4px;
}
.menu-account-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  word-break: break-all;
}
.menu-login-link {
  display: inline-block;
  color: var(--blue);
  border-bottom: none;
  font-weight: 600;
}
.menu-login-link:hover { text-decoration: underline; }

.menu-account-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.menu-password-btn,
.menu-logout-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.menu-password-btn:hover,
.menu-logout-btn:hover { background: var(--bg-hover); }

.menu-password-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-password-form[hidden] { display: none; }
.menu-password-form label { font-size: 12px; color: var(--fg-light); margin-top: 8px; }
.menu-password-form input {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
}
.menu-password-form input:focus { outline: none; border-color: var(--blue); }
.menu-password-form-buttons { display: flex; gap: 8px; margin-top: 10px; }
.menu-password-form .error-message,
.menu-password-form .notice { margin-top: 6px; }

/* ---- auth forms (login / signup / admin) ---- */

.auth-form {
  max-width: 360px;
  margin: 64px auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form h2 { font-size: 1.25em; margin: 0 0 4px; }
.auth-form label { font-size: 13px; color: var(--fg-light); margin-top: 10px; }
.auth-form input {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
}
.auth-form input:focus { outline: none; border-color: var(--blue); }
.auth-form .btn { margin-top: 14px; }

.auth-links { font-size: 13px; margin-top: 12px; color: var(--fg-light); line-height: 1.8; }
.auth-links a { color: var(--blue); border-bottom: none; }
.auth-links a:hover { text-decoration: underline; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--fg); opacity: 0.85; }

.error-message { color: #e03e3e; font-size: 13px; min-height: 1.2em; }

.notice {
  background: var(--callout-bg);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
}

/* ---- admin table (admin.html) ---- */

.table-scroll { overflow-x: auto; margin-top: 8px; }
.admin-table { border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; white-space: nowrap; }
.admin-table th { background: var(--callout-bg); font-weight: 600; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.tag-yes { background: #ddedea; color: #0f7b6c; }
.tag-no { background: #fbe4e4; color: #e03e3e; }

/* ---- breadcrumb (Notion's own top-bar page trail) ---- */

.breadcrumb { display: flex; align-items: center; gap: 2px; font-size: 14px; color: var(--fg-light); min-width: 0; }

.crumb {
  padding: 4px 6px;
  border-radius: 4px;
  border-bottom: none;
  color: var(--fg-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.crumb:hover { background: var(--bg-hover); }

.crumb-current { color: var(--fg); font-weight: 500; }

.crumb-sep { color: var(--fg-lighter); font-size: 13px; }

/* ---- Notion-style page shell ---- */

.page-body { max-width: var(--page-width); margin: 0 auto; padding: 0 96px 12vh; }

.page-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

@media (max-width: 700px) {
  .page-body { padding-left: 24px; padding-right: 24px; }
}

/* Wide-screen breakpoint: the page shell otherwise always caps out at
   --page-width (900px) and just leaves the extra width as blank margin
   on a wide/landscape viewport — open it up here instead so the whole
   page actually uses the space, not just the callout grid below. */
@media (min-width: 1100px) {
  .page-body { max-width: 1200px; padding-left: 64px; padding-right: 64px; }
}

.lp-first-heading.block-heading:first-child { margin-top: 48px; }

/* ---- homepage hero (background pattern + content image overlay, swapped by orientation) ---- */

.lp-hero {
  position: relative;
  width: 100%;
  min-height: 65vh;
  background: #000 url("/img/header background.png") center center / auto 180% no-repeat;
  overflow: hidden;
}

.lp-hero picture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
}

.lp-hero-content {
  display: block;
  width: 100%;
  max-width: min(260vw, 1600px);
  max-height: 100%;
  height: auto;
  object-fit: contain;
  transform: scale(1);
  transform-origin: center;
  backface-visibility: hidden;
}

@media (orientation: landscape) {
  .lp-hero-content {
    max-width: min(400vw, 2400px);
    transform: scale(1.4);
  }
}

.page-cover {
  width: 100%;
  height: 30vh;
  min-height: 180px;
  max-height: 340px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.page-cover::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  right: -20%;
  bottom: -20%;
  background: url("/img/header background.png") center center / cover no-repeat;
}
.page-cover-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(150px, 40vw, 300px);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.85));
}

.page-icon {
  --icon-size: clamp(150px, 20vw, 200px);
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 12px;
  overflow: hidden;
  margin: calc(var(--icon-size) * -0.35) 0 0 calc(var(--icon-size) * -0.12);
  position: relative;
}
.page-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-icon.no-cover { margin-top: 48px; }

.page-icon-emoji {
  --icon-size: 100px;
  font-size: calc(var(--icon-size) * 0.7);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* A page with a cover but no icon (e.g. the LP) still needs the same
   breathing room an icon's own box would otherwise provide. */
.page-title.no-icon { margin-top: 40px; }

.page-byline {
  color: var(--fg-lighter);
  font-size: 16px;
  margin: 0 0 24px;
}

/* ---- sub-page links (Notion "child_page" style: an indented list of
   icon + title rows under the parent page's title) ---- */

.subpage-list { margin: 4px 0 12px 24px; }

.subpage-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 2px;
  border-radius: 4px;
  border-bottom: none;
  color: var(--fg);
  font-size: 15px;
}
.subpage-link:hover { background: var(--bg-hover); border-bottom: none; }
.subpage-link .subpage-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.subpage-link .subpage-title {
  border-bottom: 0.05em solid var(--border-strong);
  padding-bottom: 1px;
}

/* ---- sample-page links (LP "Check out these sample pages!" callout) ---- */

.sample-link-list { display: flex; flex-direction: column; }
.sample-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-bottom: none;
  color: var(--blue);
  font-weight: 700;
}
.sample-link:hover { border-bottom: none; text-decoration: underline; }
.sample-link .sample-link-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ---- clickable Kansai prefecture map (regional-variations category) ---- */

.kansai-map-wrap {
  margin: 4px 0 16px 24px;
  display: flex;
  justify-content: center;
}

.kansai-map {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.kansai-pref {
  fill: var(--callout-bg);
  stroke: var(--bg);
  stroke-width: 3;
  stroke-linejoin: round;
  transition: fill 0.12s ease;
}

a:has(.kansai-pref) {
  border-bottom: none;
  cursor: pointer;
}

a:hover .kansai-pref {
  fill: #7a9bb5;
}

.kansai-pref--disabled {
  fill: var(--border);
}

.kansai-pref-label {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  fill: var(--fg);
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3px;
}

.kansai-pref-label.is-hovered {
  fill: #fff;
  stroke: #7a9bb5;
}

/* ---- block spacing ---- */

.block-paragraph { margin: 1px 0 2px; padding: 3px 0; white-space: pre-wrap; }

.block-spacer { height: 1.5em; margin: 1px 0 2px; padding: 3px 0; }

.block-bulleted-list { margin: 1px 0 2px; padding-left: 1.6em; }
.block-bulleted-list li { padding: 3px 0; white-space: pre-wrap; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; margin: 0; }

.block-heading {
  margin: 1.4em 0 4px;
}
.block-heading:first-child { margin-top: 0; }
h1.block-heading { font-size: 1.875em; font-weight: 700; }
h2.block-heading { font-size: 1.5em; font-weight: 700; margin-top: 3em; }
h3.block-heading { font-size: 1.25em; font-weight: 600; }
h4.block-heading { font-size: 1.1em; font-weight: 600; }

/* ---- callout (and quote, which Notion normalizes the same way here) ---- */

.block-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 24px 24px 23px;
  margin: 16px 0;
  border-radius: 12px;
  white-space: pre-wrap;
}
.block-callout--outline { border: 1px solid var(--border-strong); }

.block-callout--tight-v { padding-top: 12px; padding-bottom: 12px; }

.block-callout .callout-icon { flex-shrink: 0; font-size: 1.1em; line-height: 1.5; }

/* A plain block flow here is the right default everywhere else, but Chrome
   gives sibling margins around a <audio> element wildly inflated (~30px
   instead of the few px the margin values ask for) once it's part of the
   real page — a layout quirk tied to the native <audio controls> element,
   not reproducible by margin math or in a detached test node. A flex
   column + gap bypasses margin collapsing (and the quirk) entirely, so
   every child here (incl. the divider between example pairs) gets the
   same deterministic spacing regardless of what's next to it. */
.block-callout .callout-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.block-callout .callout-body > * { margin: 0; }

/* Groups a run of sibling callouts (e.g. the "what's different" section's
   four cards): always a single stacked column, same as Notion's own
   vertical stack. */
.callout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0;
}
.callout-grid .block-callout { margin: 0; min-width: 0; }

/* These cards are narrower than a full-width table comfortably fits in
   .block-table's default nowrap cells (sized for a full-page lesson
   table) — wrap cell text instead, so the card's own width always
   matches the other callouts/blocks on the page instead of growing a
   horizontal scrollbar. */
.callout-grid .block-table td,
.callout-grid .block-table th {
  white-space: normal;
}

/* .block-table-wrap carries its own top/bottom margin for full-page
   lesson tables, but inside a callout card that fights the flex gap
   above and shows up as extra blank space before/after the table.
   .block-callout also sets white-space: pre-wrap for its own text
   blocks, which inherits straight down into the wrap — every newline
   and indentation space in the markup around the <table> was rendering
   as real blank lines above/below it (the same bug .word-card works
   around above). Opt back out of both here. */
.block-callout .callout-body .block-table-wrap {
  margin: 0;
  white-space: normal;
}

/* ---- pitch-accent diagram (ported from Kansaidex's own dictionary
   design: a mora-by-mora H/L dot graph, Standard next to Kansai) ---- */

.accent-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.accent-col {
  flex: 1 1 110px;
  min-width: 0;
  /* flex (not block) so the whitespace text nodes between the h3 and the
     .pitch-diagram div in the markup don't each get their own line-box of
     real height — the same fix .block-callout .callout-body uses. */
  display: flex;
  flex-direction: column;
}

.accent-col h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 2px;
}

.accent-col h3.kansai-label {
  color: var(--pitch-accent-kansai);
}

.pitch-diagram {
  color: var(--fg);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.pitch-diagram svg { display: block; }

.pitch-diagram-kansai { color: var(--pitch-accent-kansai); }

.mora-label {
  font-size: 11px;
  fill: var(--fg-light);
}

/* ---- word card (kanji+reading header with a favorite star, gloss,
   then the Standard/Kansai accent row, each column with its own play
   button) — entries divided by a plain horizontal rule instead of
   sitting in their own floating shadowed tile. ---- */

.word-card {
  /* .block-callout sets white-space: pre-wrap for its own text blocks,
     and that inherits straight down into the word card — every newline
     and indentation space in the markup between elements was rendering
     as real blank space, which is what was actually inflating the card's
     height (not the padding/margin values below). Opt back out here. */
  white-space: normal;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.word-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.word-card .kanji {
  font-size: 26px;
  font-weight: 700;
}

.word-card rt {
  font-size: 0.5em;
  font-weight: 400;
  color: var(--fg-light);
  user-select: none;
}

.word-card .gloss {
  color: var(--fg-light);
  margin: 6px 0 16px;
}

.accent-col h3 {
  font-size: 12px;
}

.audio-play-btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pitch-accent-kansai);
  color: #fff;
  box-shadow: 0 3px 8px rgba(79, 151, 171, 0.3);
  cursor: pointer;
  touch-action: manipulation;
}

.audio-play-btn:focus-visible {
  outline: 2px solid var(--pitch-accent-kansai);
  outline-offset: 2px;
}

.audio-play-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.audio-play-btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.audio-play-btn.is-playing {
  background: var(--fg);
}

.audio-play-btn-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.audio-play-btn-bars i {
  flex: 1;
  display: block;
  background: currentColor;
  border-radius: 1px;
  animation: audio-play-bar 0.8s ease-in-out infinite;
}

.audio-play-btn-bars i:nth-child(1) { animation-delay: -0.32s; }
.audio-play-btn-bars i:nth-child(2) { animation-delay: -0.16s; }
.audio-play-btn-bars i:nth-child(3) { animation-delay: 0s; }

@keyframes audio-play-bar {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.accent-row .accent-col audio {
  display: none;
}

/* ---- toggle ---- */

.block-toggle summary {
  cursor: pointer;
  font-weight: 600;
  padding: 3px 2px 3px 24px;
  position: relative;
  list-style: none;
  border-radius: 3px;
}
.block-toggle summary::-webkit-details-marker { display: none; }
.block-toggle summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 11px;
  color: var(--fg-light);
  transition: transform 0.15s ease;
}
.block-toggle[open] summary::before { transform: rotate(90deg); }
.block-toggle summary:hover { background: var(--bg-hover); }
.block-toggle { margin: 1px 0; }
.block-toggle .toggle-body { padding-left: 24px; margin-top: 2px; }

/* ---- Notion rich-text colors (per-run annotations from Notion) ---- */

.notion-color-gray { color: #9b9a97; }
.notion-color-brown { color: #64473a; }
.notion-color-orange { color: #d9730d; }
.notion-color-yellow { color: #dfab01; }
.notion-color-green { color: #0f7b6c; }
.notion-color-blue { color: #0b6e99; }
.notion-color-purple { color: #6940a5; }
.notion-color-pink { color: #ad1a72; }
.notion-color-red { color: #e03e3e; }

.notion-color-gray_background,
.notion-color-default_background { background: #f9f8f7; border-radius: 3px; padding: 0 2px; }
.notion-color-brown_background { background: #e9e5e3; border-radius: 3px; padding: 0 2px; }
.notion-color-orange_background { background: #faebdd; border-radius: 3px; padding: 0 2px; }
.notion-color-yellow_background { background: #fbf3db; border-radius: 3px; padding: 0 2px; }
.notion-color-green_background { background: #ddedea; border-radius: 3px; padding: 0 2px; }
.notion-color-blue_background { background: #ddebf1; border-radius: 3px; padding: 0 2px; }
.notion-color-purple_background { background: #eae4f2; border-radius: 3px; padding: 0 2px; }
.notion-color-pink_background { background: #f4dfeb; border-radius: 3px; padding: 0 2px; }
.notion-color-red_background { background: #fbe4e4; border-radius: 3px; padding: 0 2px; }

.block-paragraph code,
.block-callout code,
.block-heading code,
.block-table code {
  background: var(--callout-bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.85em;
}

/* ---- table of contents (Notion's auto-generated jump-list) ---- */

.block-toc { list-style: none; padding: 0; margin: 4px 0; }
.block-toc li { margin: 3px 0; }
.block-toc a {
  color: var(--blue);
  border-bottom: none;
  font-size: 14px;
}
.block-toc a:hover { text-decoration: underline; }
.block-toc .toc-level-1 { padding-left: 0; font-weight: 600; }
.block-toc .toc-level-2 { padding-left: 0; }
.block-toc .toc-level-3 { padding-left: 16px; }
.block-toc .toc-level-4 { padding-left: 32px; }

/* ---- divider / table / audio / image / embed ---- */

.block-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.block-table-wrap {
  overflow-x: auto;
  margin: 6px 0;
}
.block-table {
  border-collapse: collapse;
  font-size: 14px;
}
.block-table td, .block-table th {
  border: 1px solid var(--border);
  padding: 7px 9px;
  text-align: left;
  white-space: nowrap;
}
.block-table th { background: var(--callout-bg); font-weight: 600; }
.block-table a { color: var(--blue); border-bottom: none; }
.block-table a:hover { text-decoration: underline; }

.block-audio { margin: 4px 0; }
.block-audio audio { width: 100%; max-width: 340px; display: block; }

.block-image { max-width: 100%; width: 100%; border-radius: 4px; margin: 6px 0; display: block; }

/* culture callout photo: cap it so wide screens don't blow it up along
   with the callout's own growing width */
.block-callout .callout-body .block-image { max-width: 360px; }

.block-embed {
  margin: 12px auto;
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.block-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* ---- call-to-action button (same callout shape/padding as the page's
   other callouts, but in blue so it reads as the primary action) ---- */

.btn-buy-now {
  display: block;
  margin: 16px 0;
  padding: 24px 24px 24px 23px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 1.1em;
  font-weight: 700;
  text-align: center;
  border-bottom: none;
}
.btn-buy-now:hover { background: rgb(28, 108, 191); border-bottom: none; }

/* ---- customer review cards ---- */

.review-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 24px 0;
}
.review-card {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 20px 20px 20px 84px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.review-avatar {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.review-avatar svg { width: 28px; height: 28px; fill: #fff; }
.review-avatar--1 { background: #1a1a1a; }
.review-avatar--2 { background: #3b6ea5; }
.review-avatar--3 { background: #a9682f; }
.review-body { flex: 1; min-width: 0; }
.review-stars {
  color: #f5b400;
  letter-spacing: 2px;
  font-size: 1.1em;
  line-height: 1;
  margin-bottom: 8px;
}
.review-text {
  margin: 0;
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1.4;
}

/* ---- free-sample lesson preview (cuts off partway down the page,
   fading to white, with a buy prompt in place of the rest) ---- */

.lesson-preview-wrap {
  position: relative;
  overflow: hidden;
  min-height: 120px;
}
.lesson-preview-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--bg) 85%);
  pointer-events: none;
}
.lesson-paywall {
  margin-top: 8px;
  padding: 24px;
  border-radius: 12px;
  background: var(--bg-hover);
  text-align: center;
}
.lesson-paywall .block-heading { margin: 0 0 8px; }
.lesson-paywall .block-paragraph { margin: 0 0 16px; }
.lesson-paywall .btn-buy-now { margin: 0; max-width: 320px; margin-left: auto; margin-right: auto; }

