:root {
  --krtml-bg: #fffdf8;
  --krtml-card: #ffffff;
  --krtml-soft: #eef7f5;
  --krtml-soft-2: #f7fbff;
  --krtml-ink: #14212b;
  --krtml-muted: #566875;
  --krtml-primary: #123047;
  --krtml-deep: #2f6f8f;
  --krtml-accent: #0b7894;
  --krtml-warm: #f3ead7;
  --krtml-line: rgba(20, 33, 43, .14);
  --krtml-shadow: 0 12px 40px rgba(20, 33, 43, .08);
}

body.krtml-structure-active {
  background: var(--krtml-bg);
  padding-top: 64px;
}
body.admin-bar.krtml-structure-active { padding-top: 96px; }

/*
 * The KRTML shell is plugin-owned. Many themes also render their own header navigation.
 * Hide common theme navigation selectors so Recovery/Tools/Safety links do not appear twice.
 * The KRTML left/right drawer nav remains visible because it is outside the theme header.
 */
body.krtml-structure-active header .wp-block-navigation,
body.krtml-structure-active .wp-site-blocks > header .wp-block-navigation,
body.krtml-structure-active .site-header .main-navigation,
body.krtml-structure-active #site-navigation,
body.krtml-structure-active header nav:not(.krtml-drawer-nav) {
  display: none !important;
}

body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(2.55rem, 7.5vw, 5.25rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.045em;
}

.krtml-topbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000 !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 64px;
  box-sizing: border-box;
  background: rgba(255, 253, 248, .96);
  border-bottom: 1px solid var(--krtml-line);
  backdrop-filter: blur(12px);
}
body.admin-bar .krtml-topbar { top: 32px !important; }

.krtml-brand {
  text-align: center;
  color: var(--krtml-ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .02em;
}

.krtml-topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.krtml-topbar-nav a {
  color: var(--krtml-ink);
  text-decoration: none;
  font-weight: 900;
  font-size: .94rem;
  padding: .55rem .75rem;
  border-radius: 999px;
}
.krtml-topbar-nav a:hover,
.krtml-topbar-nav a:focus {
  background: var(--krtml-soft);
  outline: none;
}

.krtml-icon-button,
.krtml-small-button,
.krtml-toggle-mode {
  border: 1px solid var(--krtml-line);
  border-radius: 999px;
  background: #fff;
  color: var(--krtml-ink);
  cursor: pointer;
  min-height: 40px;
}
.krtml-icon-button { margin: 8px; font-size: 1.2rem; }
.krtml-small-button { padding: .35rem .65rem; }
.krtml-toggle-mode { padding: .75rem 1rem; text-align: left; }

.krtml-drawer-backdrop {
  position: fixed;
  z-index: 2147482990;
  inset: 0;
  background: rgba(10, 20, 30, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
body.krtml-drawer-open .krtml-drawer-backdrop { opacity: 1; pointer-events: auto; }

.krtml-drawer {
  position: fixed;
  z-index: 2147483001;
  top: 64px;
  bottom: 0;
  width: min(90vw, 420px);
  background: var(--krtml-bg);
  border: 1px solid var(--krtml-line);
  box-shadow: var(--krtml-shadow);
  overflow-y: auto;
  transition: transform .22s ease;
}
body.admin-bar .krtml-drawer { top: 96px; }
.krtml-drawer-left { left: 0; transform: translateX(-105%); }
.krtml-drawer-right { right: 0; transform: translateX(105%); }
body.krtml-left-open .krtml-drawer-left { transform: translateX(0); }
body.krtml-right-open .krtml-drawer-right { transform: translateX(0); }

.krtml-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--krtml-bg);
  border-bottom: 1px solid var(--krtml-line);
}
.krtml-drawer-nav { display: grid; gap: .55rem; padding: 1rem; }
.krtml-drawer-nav a,
.krtml-menu-details summary {
  display: block;
  padding: .75rem .85rem;
  border-radius: 14px;
  color: var(--krtml-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--krtml-line);
}
.krtml-menu-details summary { cursor: pointer; font-weight: 800; }
.krtml-menu-details a { margin: .45rem 0 .45rem .65rem; font-size: .95rem; }
.krtml-right-note { margin: 1rem; padding: 1rem; border-radius: 18px; background: var(--krtml-soft); }
.krtml-disabled { opacity: .55; pointer-events: none; }

.krtml-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
  color: var(--krtml-ink);
}
.krtml-hero,
.krtml-section,
.krtml-share-block {
  margin: 1rem 0 1.25rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: var(--krtml-card);
  border: 1px solid var(--krtml-line);
  border-radius: 28px;
  box-shadow: var(--krtml-shadow);
}
.krtml-hero { background: linear-gradient(135deg, #ffffff, var(--krtml-soft)); }

.krtml-kicker,
.krtml-section-subtitle,
.krtml-pill {
  display: inline-block;
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--krtml-deep);
}
.krtml-section-subtitle {
  margin: 0 0 .9rem;
  padding: .42rem .8rem;
  background: var(--krtml-soft);
  border-radius: 999px;
  font-size: clamp(1.05rem, 2.5vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: .035em;
}
.krtml-pill {
  background: var(--krtml-soft);
  padding: .24rem .58rem;
  border-radius: 999px;
}

.krtml-page h2 { font-size: clamp(1.9rem, 5.5vw, 3.6rem); line-height: 1.06; margin: .25rem 0 1rem; letter-spacing: -0.035em; }
.krtml-page h3 { margin: .5rem 0 .65rem; line-height: 1.15; }
.krtml-lede { font-size: 1.12rem; line-height: 1.65; color: var(--krtml-muted); max-width: 820px; }
.krtml-five-line { font-weight: 900; font-size: 1.05rem; }

.krtml-button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.krtml-button,
.krtml-deep-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .76rem 1rem;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.2;
}
.krtml-button { border: 1px solid var(--krtml-line); background: #fff; color: var(--krtml-ink); }
.krtml-button-primary { background: var(--krtml-primary); color: #fff; border-color: var(--krtml-primary); }
.krtml-deep-link { color: #fff; background: var(--krtml-deep); margin: .25rem 0; }

.krtml-hero-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  margin: 1.25rem 0;
}
.krtml-hero-map span {
  text-align: center;
  border: 1px solid var(--krtml-line);
  border-radius: 20px;
  padding: 1rem .5rem;
  background: #fff;
  font-weight: 950;
  font-size: 1.4rem;
}
.krtml-hero-map small { display: block; margin-top: .25rem; font-size: .72rem; font-weight: 750; color: var(--krtml-muted); }

.krtml-series-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
  margin-top: 1.25rem;
}
.krtml-series-column {
  border: 1px solid var(--krtml-line);
  background: #fff;
  border-radius: 24px;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(230px, 300px) 1fr;
  gap: 1rem;
  align-items: start;
  min-width: 0;
}
.krtml-series-action {
  display: grid;
  gap: .75rem;
  align-content: start;
}
.krtml-series-points {
  border-left: 1px solid var(--krtml-line);
  padding-left: 1rem;
}
.krtml-series-letter {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--krtml-primary);
  color: #fff;
  font-weight: 950;
}
.krtml-series-column h3 { font-size: clamp(1.15rem, 2.2vw, 1.55rem); margin: 0; line-height: 1.18; }
.krtml-series-column ul { margin: .1rem 0 .1rem 1.15rem; padding: 0; }
.krtml-series-column li { margin: .45rem 0; line-height: 1.45; }
.krtml-series-column .krtml-button { width: fit-content; }

.krtml-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.krtml-card,
.krtml-hub-row,
.krtml-sequence-card,
.krtml-article-door {
  border: 1px solid var(--krtml-line);
  border-radius: 22px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 4px 18px rgba(20,33,43,.04);
}
.krtml-route-card { display: grid; gap: .45rem; color: var(--krtml-ink); text-decoration: none; }
.krtml-route-card span { color: var(--krtml-muted); }

.krtml-horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 340px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x proximity;
}
.krtml-sequence-card { color: var(--krtml-ink); text-decoration: none; scroll-snap-align: start; min-height: 210px; display: grid; gap: .5rem; }
.krtml-sequence-card strong { color: var(--krtml-deep); font-weight: 950; }
.krtml-sequence-card small { color: var(--krtml-muted); }
.krtml-sequence-card span { line-height: 1.5; }

.krtml-hub-list { display: grid; gap: .8rem; }
.krtml-hub-row { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 1.1rem; align-items: start; color: var(--krtml-ink); text-decoration: none; }
.krtml-hub-action { display: grid; gap: .75rem; align-content: start; }
.krtml-hub-title-line { display: block; white-space: normal; color: var(--krtml-deep); font-size: 1.06rem; line-height: 1.25; }
.krtml-hub-action .krtml-button { width: fit-content; }
.krtml-hub-details { border-left: 1px solid var(--krtml-line); padding-left: 1rem; }
.krtml-hub-details ul { margin: 0 0 0 1.15rem; padding: 0; }
.krtml-hub-details li { margin: .38rem 0; line-height: 1.52; }

.krtml-series-intro p,
.krtml-spine-statements p { margin: .55rem 0; line-height: 1.65; }
.krtml-spine-statements p { padding: .75rem .85rem; border-left: 4px solid var(--krtml-deep); background: var(--krtml-soft-2); border-radius: 12px; }
.krtml-two-column-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.krtml-accordion { display: grid; gap: .85rem; }
.krtml-accordion details,
.krtml-optional-grid details {
  border: 1px solid var(--krtml-line);
  border-radius: 20px;
  background: #fff;
  padding: 1rem;
}
.krtml-accordion summary,
.krtml-optional-grid summary {
  cursor: pointer;
  font-weight: 950;
  font-size: 1.04rem;
  line-height: 1.35;
}

.krtml-article-stack { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
.krtml-article-door {
  display: block;
  width: 100%;
  color: var(--krtml-ink);
  text-decoration: none;
  border-left: 6px solid var(--krtml-accent);
  background: linear-gradient(90deg, rgba(238,247,245,.75), #fff 52%);
}
.krtml-article-door h3 { font-size: 1.35rem; }
.krtml-article-door em { display: inline-flex; margin-top: .75rem; font-style: normal; font-weight: 900; color: var(--krtml-deep); }
.krtml-article-lines { margin: .75rem 0 0 1.25rem; padding: 0; }
.krtml-article-lines li { margin: .45rem 0; line-height: 1.55; }
.krtml-optional-grid { display: grid; gap: .85rem; }

.krtml-safety-inline {
  padding: 1rem;
  border-left: 4px solid var(--krtml-primary);
  background: var(--krtml-soft);
  border-radius: 14px;
  margin: 1rem 0;
  line-height: 1.55;
}

.krtml-share-block blockquote {
  margin: .75rem 0 1rem;
  padding: 1rem 1.2rem;
  border-left: 5px solid var(--krtml-deep);
  background: var(--krtml-soft-2);
  border-radius: 14px;
  font-size: 1.08rem;
  font-weight: 750;
}
.krtml-share-card-preview { min-height: 160px; display: grid; place-items: center; text-align: center; font-size: 1.25rem; font-weight: 900; }

.krtml-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; }
.krtml-admin-field label { display: block; margin-bottom: .25rem; }

body.krtml-lowstim {
  --krtml-bg: #fbfaf5;
  --krtml-soft: #f2f1eb;
  --krtml-soft-2: #f7f6f0;
  --krtml-primary: #26333d;
  --krtml-deep: #40525c;
  --krtml-accent: #586b72;
}
body.krtml-lowstim .krtml-hero { background: #fff; }
body.krtml-lowstim * { scroll-behavior: auto !important; }

@media (max-width: 1180px) {
  .krtml-series-column {
    grid-template-columns: minmax(210px, 280px) 1fr;
  }
}

@media (max-width: 780px) {
  .krtml-page { padding: .75rem; }
  .krtml-hero,
  .krtml-section,
  .krtml-share-block { border-radius: 20px; padding: 1.25rem; }
  .krtml-hero-map { grid-template-columns: repeat(5, minmax(54px, 1fr)); gap: .45rem; }
  .krtml-hero-map span { padding: .65rem .25rem; font-size: 1rem; }
  .krtml-card-grid,
  .krtml-two-column-text,
  .krtml-series-column,
  .krtml-hub-row { grid-template-columns: 1fr; }
  .krtml-series-points,
  .krtml-hub-details { border-left: 0; padding-left: 0; }
  .krtml-button,
  .krtml-series-column .krtml-button,
  .krtml-hub-action .krtml-button { width: 100%; }
  .krtml-admin-grid { grid-template-columns: 1fr; }
  body.admin-bar.krtml-structure-active { padding-top: 110px; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  body.admin-bar .krtml-drawer { top: 110px; }
}

/* v0.6.0 layout repair: remove theme title/header bar, enlarge navigation/readability, and restructure hub sequence cards. */
body.krtml-structure-active {
  padding-top: 78px !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: 110px !important;
}

/* Hide the theme-owned site title/header so the remaining top bar is only the KRTML navigation. */
body.krtml-structure-active .wp-site-blocks > header,
body.krtml-structure-active .wp-site-blocks > .wp-block-template-part:first-child,
body.krtml-structure-active > header,
body.krtml-structure-active #masthead,
body.krtml-structure-active .site-header,
body.krtml-structure-active .site-branding,
body.krtml-structure-active .wp-block-site-title,
body.krtml-structure-active .wp-block-site-logo {
  display: none !important;
}

.krtml-topbar {
  min-height: 78px !important;
  grid-template-columns: 58px minmax(0, 1fr) 58px !important;
  background: rgba(255, 253, 248, .985) !important;
}
body.admin-bar .krtml-topbar {
  top: 32px !important;
}
.krtml-topbar-nav {
  gap: .55rem !important;
  justify-content: center !important;
}
.krtml-topbar-nav a {
  font-size: clamp(1.06rem, 1.8vw, 1.28rem) !important;
  padding: .72rem 1.02rem !important;
  line-height: 1.12 !important;
  letter-spacing: -0.01em;
}
.krtml-icon-button {
  min-height: 46px !important;
  min-width: 46px !important;
  font-size: 1.35rem !important;
  margin: 8px !important;
}
.krtml-drawer {
  top: 78px !important;
}
body.admin-bar .krtml-drawer {
  top: 110px !important;
}

/* KRTML map: horizontal, scrollable series bars with title/button on the left and bullets on the right. */
.krtml-series-columns {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(560px, 680px) !important;
  grid-template-columns: none !important;
  overflow-x: auto !important;
  gap: 1.15rem !important;
  padding: .25rem .25rem 1rem !important;
  scroll-snap-type: x proximity;
}
.krtml-series-column {
  display: grid !important;
  grid-template-columns: minmax(190px, 235px) minmax(260px, 1fr) !important;
  gap: 1.1rem !important;
  align-items: stretch !important;
  min-width: 0 !important;
  scroll-snap-align: start;
}
.krtml-series-action {
  align-content: space-between !important;
  min-height: 100% !important;
}
.krtml-series-column h3 {
  font-size: clamp(1.22rem, 1.9vw, 1.6rem) !important;
}
.krtml-series-points {
  border-left: 1px solid var(--krtml-line) !important;
  padding-left: 1.05rem !important;
  font-size: 1.05rem !important;
}
.krtml-series-points li {
  line-height: 1.55 !important;
}

/* Bigger section subtitles: Series Overview, Hub Sequence, and playlist section labels. */
.krtml-section-subtitle,
.krtml-big-subtitle {
  font-size: clamp(1.35rem, 3vw, 1.9rem) !important;
  padding: .55rem 1rem !important;
  letter-spacing: .02em !important;
  line-height: 1.18 !important;
}

/* Playlist expansion readability. */
.krtml-accordion details,
.krtml-optional-grid details {
  font-size: 1.07rem !important;
}
.krtml-accordion summary,
.krtml-optional-grid summary {
  font-size: clamp(1.22rem, 2.6vw, 1.62rem) !important;
  line-height: 1.25 !important;
  padding: .2rem 0 !important;
}
.krtml-accordion details > p,
.krtml-optional-grid details > p,
.krtml-accordion li,
.krtml-optional-grid li {
  font-size: 1.06rem !important;
  line-height: 1.65 !important;
}
.krtml-article-door {
  padding: 1.2rem !important;
}
.krtml-article-door h3 {
  font-size: clamp(1.45rem, 3.2vw, 2rem) !important;
  line-height: 1.15 !important;
}
.krtml-article-door p,
.krtml-article-door li {
  font-size: 1.06rem !important;
  line-height: 1.65 !important;
}
.krtml-pill {
  font-size: .9rem !important;
}

/* Hub sequence cards: two horizontal bars per hub. */
.krtml-hub-list {
  gap: 1.05rem !important;
}
.krtml-hub-row {
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px !important;
  background: #fff !important;
}
.krtml-hub-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.15rem !important;
  background: linear-gradient(135deg, var(--krtml-primary), var(--krtml-deep)) !important;
  color: #fff !important;
}
.krtml-hub-title-line {
  color: #fff !important;
  font-size: clamp(1.28rem, 2.6vw, 1.85rem) !important;
  line-height: 1.18 !important;
  font-weight: 950 !important;
}
.krtml-hub-topbar .krtml-button {
  flex: 0 0 auto !important;
  background: #fff !important;
  color: var(--krtml-primary) !important;
  border-color: #fff !important;
  font-size: 1rem !important;
  padding: .7rem 1rem !important;
}
.krtml-hub-details {
  border-left: 0 !important;
  padding: 1rem 1.15rem 1.15rem !important;
  background: #fff !important;
}
.krtml-hub-details ul {
  margin: 0 0 0 1.25rem !important;
  padding: 0 !important;
}
.krtml-hub-details li {
  font-size: 1.08rem !important;
  line-height: 1.62 !important;
  margin: .42rem 0 !important;
}

@media (max-width: 780px) {
  body.krtml-structure-active { padding-top: 72px !important; }
  body.admin-bar.krtml-structure-active { padding-top: 118px !important; }
  .krtml-topbar { min-height: 72px !important; grid-template-columns: 54px minmax(0, 1fr) 54px !important; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  .krtml-topbar-nav a { font-size: 1rem !important; padding: .65rem .85rem !important; }
  .krtml-drawer { top: 72px !important; }
  body.admin-bar .krtml-drawer { top: 118px !important; }
  .krtml-series-columns { grid-auto-columns: minmax(86vw, 1fr) !important; }
  .krtml-series-column { grid-template-columns: 1fr !important; }
  .krtml-series-points { border-left: 0 !important; padding-left: 0 !important; }
  .krtml-hub-topbar { align-items: flex-start !important; }
  .krtml-hub-topbar .krtml-button { width: auto !important; white-space: nowrap !important; }
}

@media (max-width: 520px) {
  .krtml-hub-topbar {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
  }
  .krtml-hub-title-line { font-size: 1.18rem !important; }
  .krtml-hub-topbar .krtml-button { font-size: .92rem !important; padding: .62rem .76rem !important; }
}


/* v0.7.0 refinement: larger navigation, larger drawer hub links, vertical clickable KRTML plates, tighter title spacing. */
body.krtml-structure-active {
  padding-top: 84px !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: 116px !important;
}
.krtml-topbar {
  min-height: 84px !important;
  grid-template-columns: 62px minmax(0, 1fr) 62px !important;
}
body.admin-bar .krtml-topbar { top: 32px !important; }
.krtml-topbar-nav {
  gap: .72rem !important;
  justify-content: flex-start !important;
  padding: 0 .35rem !important;
}
.krtml-topbar-nav a {
  font-size: clamp(1.22rem, 2.25vw, 1.58rem) !important;
  padding: .82rem 1.14rem !important;
  min-height: 48px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
}
.krtml-icon-button {
  min-height: 50px !important;
  min-width: 50px !important;
  font-size: 1.55rem !important;
}
.krtml-drawer { top: 84px !important; }
body.admin-bar .krtml-drawer { top: 116px !important; }

/* Remove the leftover theme-title/header gap so page content starts immediately below the KRTML menu. */
body.krtml-structure-active .wp-site-blocks,
body.krtml-structure-active .wp-site-blocks > main,
body.krtml-structure-active main,
body.krtml-structure-active .site-main,
body.krtml-structure-active .entry-content,
body.krtml-structure-active .wp-block-post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.krtml-structure-active .entry-header,
body.krtml-structure-active .page-header,
body.krtml-structure-active .wp-block-post-title {
  margin-top: .25rem !important;
  margin-bottom: .35rem !important;
}
.krtml-page {
  padding-top: .25rem !important;
  margin-top: 0 !important;
}
.krtml-hero:first-child,
.krtml-section:first-child {
  margin-top: .35rem !important;
}

/* Larger left/right drawer text. */
.krtml-drawer-head strong {
  font-size: 1.32rem !important;
  line-height: 1.15 !important;
}
.krtml-drawer-nav {
  gap: .7rem !important;
}
.krtml-menu-details summary {
  font-size: clamp(1.18rem, 2.6vw, 1.42rem) !important;
  line-height: 1.2 !important;
  padding: .95rem 1rem !important;
}
.krtml-menu-details a,
.krtml-drawer-nav > a,
.krtml-right-links a,
.krtml-right-links button {
  font-size: clamp(1.08rem, 2.35vw, 1.28rem) !important;
  line-height: 1.28 !important;
  padding: .9rem 1rem !important;
}
.krtml-menu-details a {
  margin: .5rem 0 .5rem .35rem !important;
}

/* KRTML Map cards: vertical stack of horizontal clickable plates. */
.krtml-series-columns {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-flow: row !important;
  grid-auto-columns: unset !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  gap: 1rem !important;
  padding: .25rem 0 .25rem !important;
  scroll-snap-type: none !important;
}
.krtml-series-column,
a.krtml-series-plate {
  display: grid !important;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 1.15rem !important;
  color: var(--krtml-ink) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #ffffff, var(--krtml-soft-2)) !important;
  border: 1px solid var(--krtml-line) !important;
  border-radius: 24px !important;
  box-shadow: 0 6px 22px rgba(20, 33, 43, .055) !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease !important;
}
a.krtml-series-plate:hover,
a.krtml-series-plate:focus {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 32px rgba(20, 33, 43, .09) !important;
  border-color: rgba(11, 120, 148, .38) !important;
  outline: none !important;
}
.krtml-series-action {
  display: grid !important;
  align-content: space-between !important;
  justify-items: start !important;
  gap: .85rem !important;
}
.krtml-series-column h3 {
  font-size: clamp(1.35rem, 2.35vw, 1.85rem) !important;
  line-height: 1.12 !important;
}
.krtml-series-column .krtml-button {
  pointer-events: none !important;
  width: fit-content !important;
  font-size: 1.02rem !important;
}
.krtml-series-points {
  border-left: 1px solid var(--krtml-line) !important;
  padding-left: 1.2rem !important;
  font-size: clamp(1.1rem, 2.1vw, 1.28rem) !important;
}
.krtml-series-points li {
  margin: .5rem 0 !important;
  line-height: 1.56 !important;
}

/* Hub Sequence readability: bigger details and bullets. */
.krtml-hub-topbar {
  padding: 1.05rem 1.2rem !important;
}
.krtml-hub-title-line {
  font-size: clamp(1.38rem, 2.9vw, 2rem) !important;
  line-height: 1.16 !important;
}
.krtml-hub-topbar .krtml-button {
  font-size: clamp(1rem, 1.8vw, 1.18rem) !important;
  padding: .72rem 1.05rem !important;
}
.krtml-hub-details {
  padding: 1.1rem 1.25rem 1.25rem !important;
}
.krtml-hub-details ul {
  margin-left: 1.45rem !important;
}
.krtml-hub-details li {
  font-size: clamp(1.16rem, 2.15vw, 1.34rem) !important;
  line-height: 1.72 !important;
  margin: .5rem 0 !important;
}

@media (max-width: 780px) {
  body.krtml-structure-active { padding-top: 82px !important; }
  body.admin-bar.krtml-structure-active { padding-top: 128px !important; }
  .krtml-topbar { min-height: 82px !important; grid-template-columns: 58px minmax(0, 1fr) 58px !important; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  .krtml-topbar-nav a { font-size: 1.14rem !important; padding: .72rem .95rem !important; }
  .krtml-drawer { top: 82px !important; }
  body.admin-bar .krtml-drawer { top: 128px !important; }
  .krtml-series-column,
  a.krtml-series-plate { grid-template-columns: 1fr !important; }
  .krtml-series-points { border-left: 0 !important; padding-left: 0 !important; }
}

@media (max-width: 520px) {
  .krtml-topbar-nav a { font-size: 1.08rem !important; padding: .68rem .82rem !important; }
  .krtml-hub-title-line { font-size: 1.25rem !important; }
  .krtml-hub-details li { font-size: 1.1rem !important; }
  .krtml-menu-details a,
  .krtml-drawer-nav > a,
  .krtml-right-links a,
  .krtml-right-links button { font-size: 1.05rem !important; }
}


/* v0.8.0 refinement: tighter top spacing, unified body typography, true vertical plate flow, and vertical R sequence bars. */
body.krtml-structure-active {
  padding-top: 68px !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: 100px !important;
}
.krtml-topbar {
  min-height: 68px !important;
  grid-template-columns: 54px minmax(0, 1fr) 54px !important;
}
body.admin-bar .krtml-topbar { top: 32px !important; }
.krtml-drawer { top: 68px !important; }
body.admin-bar .krtml-drawer { top: 100px !important; }
.krtml-topbar-nav a {
  font-size: clamp(1.15rem, 2.05vw, 1.45rem) !important;
  padding: .62rem 1rem !important;
  min-height: 42px !important;
}
.krtml-icon-button {
  min-height: 44px !important;
  min-width: 44px !important;
  font-size: 1.42rem !important;
  margin: 6px !important;
}
body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: .15rem !important;
}
.krtml-page {
  padding-top: 0 !important;
}
.krtml-hero:first-child,
.krtml-section:first-child {
  margin-top: 0 !important;
}
.krtml-hero,
.krtml-section,
.krtml-share-block {
  margin-top: .65rem !important;
}

/* Unified sub-body typography across Level 1, Level 2, and Level 3. */
.krtml-level p,
.krtml-level li,
.krtml-level-body,
.krtml-body-list li,
.krtml-spine-statements p,
.krtml-accordion details > p,
.krtml-accordion li,
.krtml-optional-grid li,
.krtml-article-body-list li,
.krtml-safety-inline,
.krtml-hub-details li,
.krtml-sequence-bar-body li,
.krtml-series-points li {
  font-size: clamp(1.12rem, 2.05vw, 1.28rem) !important;
  line-height: 1.68 !important;
}
.krtml-body-list,
.krtml-article-body-list {
  margin: .75rem 0 1rem 1.35rem !important;
  padding: 0 !important;
}
.krtml-body-list li,
.krtml-article-body-list li {
  margin: .48rem 0 !important;
}
.krtml-article-body-list strong {
  color: var(--krtml-primary);
}
.krtml-article-lines {
  margin: 0 !important;
}

/* KRTML Map series plates: no symbol; 1:2 ratio; whole plate remains clickable. */
.krtml-series-letter {
  display: none !important;
}
.krtml-series-columns {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-flow: row !important;
  overflow: visible !important;
  gap: 1rem !important;
}
.krtml-series-column,
a.krtml-series-plate {
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) !important;
  align-items: stretch !important;
}
.krtml-series-action {
  background: rgba(238,247,245,.72);
  border-radius: 18px;
  padding: 1rem;
}
.krtml-series-column h3 {
  font-size: clamp(1.45rem, 2.6vw, 2rem) !important;
}
.krtml-series-column .krtml-button {
  margin-top: auto !important;
}
.krtml-series-points {
  padding-left: 1.35rem !important;
}

/* Homepage Recovery Compass sequence: vertical scroll of horizontal bars, not a horizontal carousel. */
.krtml-sequence-vertical {
  display: grid;
  gap: 1rem;
  max-height: 760px;
  overflow-y: auto;
  padding: .25rem .25rem 1rem;
  scrollbar-width: thin;
}
.krtml-sequence-bar {
  display: block;
  color: var(--krtml-ink);
  text-decoration: none;
  border: 1px solid var(--krtml-line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20,33,43,.045);
}
.krtml-sequence-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--krtml-soft), #ffffff);
  border-bottom: 1px solid var(--krtml-line);
}
.krtml-sequence-bar-top strong {
  font-size: clamp(1.25rem, 2.45vw, 1.75rem);
  line-height: 1.18;
  color: var(--krtml-deep);
}
.krtml-sequence-open {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: .62rem .9rem;
  background: var(--krtml-primary);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}
.krtml-sequence-bar-body {
  padding: 1rem 1.25rem 1.15rem;
}
.krtml-sequence-bar-body ul {
  margin: 0 0 0 1.35rem;
  padding: 0;
}
.krtml-sequence-bar-body li {
  margin: .44rem 0;
}

/* More generous playlist expansion readability. */
.krtml-accordion summary,
.krtml-optional-grid summary {
  font-size: clamp(1.28rem, 2.8vw, 1.72rem) !important;
}
.krtml-article-door {
  padding: 1.25rem 1.35rem !important;
}
.krtml-article-door h3 {
  font-size: clamp(1.55rem, 3.35vw, 2.08rem) !important;
}

@media (max-width: 780px) {
  body.krtml-structure-active { padding-top: 66px !important; }
  body.admin-bar.krtml-structure-active { padding-top: 112px !important; }
  .krtml-topbar { min-height: 66px !important; grid-template-columns: 50px minmax(0, 1fr) 50px !important; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  .krtml-drawer { top: 66px !important; }
  body.admin-bar .krtml-drawer { top: 112px !important; }
  .krtml-topbar-nav a { font-size: 1.08rem !important; padding: .58rem .82rem !important; }
  .krtml-series-column,
  a.krtml-series-plate { grid-template-columns: 1fr !important; }
  .krtml-series-action { padding: .9rem !important; }
  .krtml-series-points { border-left: 0 !important; padding-left: 0 !important; }
  .krtml-sequence-bar-top { display: grid; grid-template-columns: 1fr auto; align-items: start; }
  .krtml-sequence-open { font-size: .92rem; padding: .55rem .72rem; }
}

@media (max-width: 520px) {
  .krtml-sequence-bar-top { grid-template-columns: 1fr; }
  .krtml-sequence-open { width: fit-content; }
  .krtml-topbar-nav a { font-size: 1rem !important; }
}

/* v1.0 foundational hub/playlist architecture */
body.krtml-structure-active {
  --krtml-ink: #132f46;
  --krtml-muted: #526b7d;
  --krtml-line: rgba(19, 47, 70, 0.16);
  --krtml-soft: #f6fbfe;
  --krtml-soft-2: #eef8f8;
  --krtml-accent: #0c6b86;
  --krtml-accent-dark: #11334b;
  --krtml-warm: #fff8ee;
}

.krtml-topbar-nav a {
  font-size: clamp(1.04rem, 2.8vw, 1.25rem) !important;
  font-weight: 850 !important;
  padding: 0.8rem 0.92rem !important;
  letter-spacing: 0.01em;
}

.krtml-icon-button {
  font-size: 1.45rem !important;
  min-width: 48px !important;
  min-height: 48px !important;
}

.krtml-drawer-nav a,
.krtml-drawer-nav summary,
.krtml-drawer-nav button {
  font-size: 1.04rem !important;
  line-height: 1.45 !important;
}

.krtml-menu-details > a {
  font-size: 1.02rem !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.krtml-page {
  padding-top: 0.15rem !important;
}

.entry-header,
.wp-block-post-title,
.page-title,
.entry-title {
  margin-top: 0.25rem !important;
  margin-bottom: 0.8rem !important;
}

.krtml-architecture {
  display: grid;
  gap: 1rem;
}

.krtml-arch-box {
  border: 1px solid var(--krtml-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(19, 47, 70, 0.055);
  overflow: clip;
}

.krtml-arch-box > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--krtml-soft), var(--krtml-soft-2));
  border-bottom: 1px solid var(--krtml-line);
  color: var(--krtml-ink);
  font-size: clamp(1.28rem, 4vw, 1.72rem);
  font-weight: 900;
  line-height: 1.16;
}

.krtml-arch-box > summary::-webkit-details-marker { display: none; }
.krtml-arch-box > summary::after {
  content: '+';
  float: right;
  font-weight: 900;
  color: var(--krtml-accent);
}
.krtml-arch-box[open] > summary::after { content: '–'; }

.krtml-arch-box-body {
  padding: clamp(1rem, 3vw, 1.35rem);
  font-size: clamp(1.02rem, 2.9vw, 1.15rem);
  line-height: 1.72;
}

.krtml-box-safety > summary {
  background: linear-gradient(135deg, #fff7ed, #fffdf8);
}

.krtml-field-list {
  display: grid;
  gap: 1rem;
}

.krtml-field-item {
  padding: 0.95rem 1rem;
  border-radius: 17px;
  background: rgba(246, 251, 254, 0.76);
  border: 1px solid rgba(19, 47, 70, 0.09);
}

.krtml-field-label {
  display: block;
  font-size: clamp(1.03rem, 3vw, 1.2rem);
  line-height: 1.25;
  margin-bottom: 0.45rem;
  color: var(--krtml-accent-dark);
}

.krtml-field-value p,
.krtml-field-value li,
.krtml-body-list li,
.krtml-spine-paragraph p,
.krtml-hub-details li,
.krtml-sequence-bar-body li,
.krtml-article-body-list li {
  font-size: clamp(1.02rem, 2.8vw, 1.16rem) !important;
  line-height: 1.68 !important;
}

.krtml-body-list {
  margin: 0.35rem 0 0;
  padding-left: 1.35rem;
}

.krtml-body-list li + li { margin-top: 0.42rem; }

.krtml-spine-list {
  display: grid;
  gap: 1rem;
}

.krtml-spine-paragraph {
  border: 1px solid rgba(12, 107, 134, 0.20);
  background: linear-gradient(135deg, #ffffff, #f8fcff);
  border-radius: 20px;
  padding: 1rem;
}

.krtml-spine-link {
  display: inline-flex;
  color: #075c78;
  text-decoration: none;
  font-size: clamp(1.08rem, 3.1vw, 1.27rem);
  line-height: 1.3;
  margin-bottom: 0.45rem;
}

.krtml-spine-link:hover,
.krtml-spine-link:focus {
  text-decoration: underline;
}

.krtml-flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin: 0.8rem 0 1.15rem;
}

.krtml-flip-card {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  min-height: 190px;
  perspective: 1000px;
  cursor: pointer;
  text-align: left;
}

.krtml-flip-inner {
  position: relative;
  display: block;
  min-height: 190px;
  transform-style: preserve-3d;
  transition: transform 0.48s ease;
}

.krtml-flip-card.is-flipped .krtml-flip-inner,
.krtml-flip-card:focus-visible .krtml-flip-inner {
  transform: rotateY(180deg);
}

.krtml-flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(19, 47, 70, 0.16);
  backface-visibility: hidden;
  box-shadow: 0 8px 22px rgba(19, 47, 70, 0.07);
}

.krtml-flip-front {
  background: linear-gradient(135deg, #eef8ff, #f7fcff);
  color: var(--krtml-ink);
}

.krtml-flip-front strong {
  font-size: 1.16rem;
  line-height: 1.23;
}

.krtml-flip-front small {
  color: var(--krtml-muted);
  font-weight: 700;
}

.krtml-flip-back {
  background: linear-gradient(135deg, #fffaf2, #ffffff);
  color: var(--krtml-ink);
  transform: rotateY(180deg);
  overflow-y: auto;
}

.krtml-flip-back strong {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a5b12;
}

.krtml-flip-back span,
.krtml-flip-back em {
  font-size: 0.98rem;
  line-height: 1.45;
}

.krtml-hub-topbar,
.krtml-sequence-bar-top {
  background: linear-gradient(135deg, #11334b, #0c6b86) !important;
  color: #fff !important;
  border-radius: 18px 18px 0 0 !important;
  padding: 0.92rem 1rem !important;
}

.krtml-hub-title-line,
.krtml-sequence-bar-top strong {
  font-size: clamp(1.1rem, 3.2vw, 1.35rem) !important;
}

.krtml-hub-details,
.krtml-sequence-bar-body {
  padding: 1rem 1.15rem !important;
  background: #fff !important;
  border: 1px solid rgba(19, 47, 70, 0.12) !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
}

.krtml-hub-row,
.krtml-sequence-bar {
  display: block !important;
  border-radius: 18px !important;
  margin-bottom: 1rem !important;
}

.krtml-series-columns {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
  overflow: visible !important;
}

.krtml-series-plate {
  display: grid !important;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr) !important;
  gap: 1rem !important;
  text-decoration: none !important;
  align-items: stretch !important;
}

.krtml-series-action {
  border-right: 1px solid rgba(19, 47, 70, 0.13);
  padding-right: 1rem;
}

.krtml-series-action h3 {
  font-size: clamp(1.14rem, 3.2vw, 1.36rem) !important;
  margin-bottom: 0.8rem !important;
}

.krtml-series-points li {
  font-size: clamp(1.02rem, 2.8vw, 1.14rem) !important;
  line-height: 1.58 !important;
}

@media (max-width: 720px) {
  .krtml-series-plate {
    grid-template-columns: 1fr !important;
  }
  .krtml-series-action {
    border-right: 0;
    border-bottom: 1px solid rgba(19, 47, 70, 0.13);
    padding-right: 0;
    padding-bottom: 0.85rem;
  }
  .krtml-flip-grid {
    grid-template-columns: 1fr;
  }
}

/* v1.1.0 — lean top menu + adaptive practice/right drawer. */
.krtml-topbar-nav {
  justify-content: center !important;
  gap: .5rem !important;
}
.krtml-topbar-nav a {
  font-size: clamp(1.05rem, 2.7vw, 1.28rem) !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  padding: .72rem .95rem !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
}
.krtml-topbar-nav a.krtml-disabled {
  opacity: .48 !important;
}

.krtml-right-panel-stack {
  display: grid;
  gap: .85rem;
  padding: 1rem;
}
.krtml-right-panel {
  background: #fff;
  border: 1px solid var(--krtml-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20,33,43,.045);
}
.krtml-right-panel summary {
  cursor: pointer;
  list-style-position: inside;
  padding: .95rem 1rem;
  font-weight: 950;
  font-size: clamp(1.12rem, 2.8vw, 1.36rem);
  line-height: 1.18;
  background: linear-gradient(135deg, var(--krtml-soft), #fff);
}
.krtml-right-panel[open] summary {
  border-bottom: 1px solid var(--krtml-line);
}
.krtml-right-panel-body {
  padding: 1rem;
  font-size: clamp(1rem, 2.35vw, 1.13rem);
  line-height: 1.55;
}
.krtml-right-panel-body strong {
  display: block;
  margin-bottom: .6rem;
  color: var(--krtml-primary);
}
.krtml-right-list {
  margin: .55rem 0 0;
  padding-left: 1.15rem;
}
.krtml-right-list li {
  margin-bottom: .62rem;
}
.krtml-right-route-grid {
  display: grid;
  gap: .55rem;
}
.krtml-right-route {
  display: block;
  padding: .78rem .9rem;
  border-radius: 14px;
  background: var(--krtml-soft-2);
  border: 1px solid var(--krtml-line);
  color: var(--krtml-ink);
  font-weight: 850;
  text-decoration: none;
}
.krtml-right-route:hover,
.krtml-right-route:focus {
  background: var(--krtml-soft);
  outline: none;
}
.krtml-right-panel .krtml-flip-grid {
  grid-template-columns: 1fr !important;
  gap: .75rem !important;
}
.krtml-right-panel .krtml-flip-card {
  min-height: 150px !important;
}
.krtml-right-panel .krtml-flip-front strong,
.krtml-right-panel .krtml-flip-back strong {
  margin-bottom: .35rem;
}
.krtml-right-microcopy {
  margin: .7rem 0 0;
  color: var(--krtml-muted);
  font-size: .96rem;
}
.krtml-right-mode {
  width: 100%;
  text-align: center !important;
  font-size: 1rem !important;
  font-weight: 850 !important;
}

@media (max-width: 520px) {
  .krtml-topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  }
  .krtml-topbar-nav {
    justify-content: flex-start !important;
  }
  .krtml-topbar-nav a {
    font-size: 1.02rem !important;
    padding: .68rem .76rem !important;
  }
}

/* v1.2.0 — compact reading lane, contextual right drawer, two-row top menu, desktop split panes. */
body.krtml-structure-active {
  padding-top: 112px !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: 144px !important;
}

.krtml-topbar {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  min-height: 112px !important;
  padding: .35rem .65rem .5rem !important;
  gap: .25rem !important;
  background: rgba(255, 253, 248, .98) !important;
}
body.admin-bar .krtml-topbar { top: 32px !important; }
.krtml-topbar-brand-row {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) 54px !important;
  align-items: center !important;
  width: 100% !important;
  gap: .25rem !important;
}
.krtml-site-name {
  color: var(--krtml-ink) !important;
  text-decoration: none !important;
  text-align: center !important;
  font-size: clamp(1.08rem, 3.2vw, 1.45rem) !important;
  font-weight: 950 !important;
  letter-spacing: .01em !important;
  line-height: 1.1 !important;
}
.krtml-topbar-nav {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(.35rem, 1.4vw, .75rem) !important;
  overflow-x: auto !important;
  padding: .05rem 0 .1rem !important;
  text-align: center !important;
  scrollbar-width: none !important;
}
.krtml-topbar-nav::-webkit-scrollbar { display: none !important; }
.krtml-topbar-nav a {
  flex: 0 0 auto !important;
  font-size: clamp(1.02rem, 3.1vw, 1.22rem) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  min-height: 38px !important;
  padding: .58rem .78rem !important;
  border-radius: 999px !important;
  color: var(--krtml-ink) !important;
  text-decoration: none !important;
}
.krtml-icon-button {
  margin: 0 !important;
  min-width: 46px !important;
  min-height: 42px !important;
  font-size: 1.25rem !important;
}
.krtml-drawer {
  top: 112px !important;
  transition: transform .28s ease, opacity .28s ease !important;
}
body.admin-bar .krtml-drawer { top: 144px !important; }

/* Keep page titles calmer and separated from content. */
body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(1.45rem, 4.4vw, 2.35rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.02em !important;
  text-align: center !important;
  margin: .7rem auto 1.35rem !important;
  padding: 0 .95rem !important;
  max-width: 900px !important;
}
body.krtml-structure-active .entry-header {
  margin: 0 auto !important;
  padding-top: .35rem !important;
  padding-bottom: .45rem !important;
}
.krtml-page {
  padding-top: .25rem !important;
  transition: none !important;
}

/* Compact public hub/playlist reading lane. */
.krtml-readable-page {
  display: grid !important;
  gap: 1rem !important;
}
.krtml-readable-page .krtml-section {
  margin: 0 0 1rem !important;
}
.krtml-readable-text,
.krtml-compact-list li,
.krtml-core-question span,
.krtml-compact-note,
.krtml-safety-strip,
.krtml-spine-paragraph p {
  font-size: clamp(1.04rem, 2.7vw, 1.17rem) !important;
  line-height: 1.72 !important;
}
.krtml-core-question {
  margin-top: 1rem !important;
  padding: 1rem 1.1rem !important;
  border-radius: 18px !important;
  border: 1px solid rgba(12,107,134,.18) !important;
  background: linear-gradient(135deg, #f6fbfe, #ffffff) !important;
  display: grid !important;
  gap: .45rem !important;
}
.krtml-core-question strong,
.krtml-compact-note strong {
  color: var(--krtml-accent-dark) !important;
  font-size: clamp(1.03rem, 2.7vw, 1.16rem) !important;
}
.krtml-compact-note {
  margin-top: 1rem !important;
  padding: 1rem 1.1rem !important;
  border-radius: 18px !important;
  background: var(--krtml-soft) !important;
  border: 1px solid var(--krtml-line) !important;
}
.krtml-compact-list {
  margin: .35rem 0 0 !important;
  padding-left: 1.35rem !important;
}
.krtml-compact-list li + li { margin-top: .5rem !important; }
.krtml-safety-strip {
  margin: .25rem 0 1rem !important;
  padding: .95rem 1.1rem !important;
  border-left: 5px solid #0c6b86 !important;
  border-radius: 16px !important;
  background: #fff7ed !important;
  box-shadow: 0 6px 18px rgba(20,33,43,.045) !important;
}
.krtml-spine-paragraph {
  padding: 1.15rem 1.2rem !important;
}
.krtml-spine-link strong {
  color: #075c78 !important;
  font-weight: 950 !important;
}
.krtml-route-button-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: .75rem !important;
}

/* Updated flippable teaching cards. */
.krtml-flip-card {
  text-align: center !important;
}
.krtml-flip-face {
  padding: 1rem 1.05rem !important;
}
.krtml-flip-front {
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  position: absolute !important;
}
.krtml-flip-front strong {
  font-size: clamp(1.15rem, 3.4vw, 1.42rem) !important;
  line-height: 1.22 !important;
  font-weight: 950 !important;
  display: block !important;
  max-width: 92% !important;
  margin: auto !important;
}
.krtml-flip-front small {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: .85rem !important;
  text-align: center !important;
  font-size: .86rem !important;
  font-weight: 850 !important;
  color: var(--krtml-muted) !important;
}
.krtml-flip-back {
  justify-content: space-between !important;
  align-items: stretch !important;
  text-align: left !important;
}
.krtml-flip-definition,
.krtml-flip-example {
  display: block !important;
}
.krtml-flip-definition strong,
.krtml-flip-example strong,
.krtml-flip-back strong {
  font-weight: 950 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--krtml-accent-dark) !important;
  font-size: .96rem !important;
  margin: 0 0 .35rem !important;
}
.krtml-flip-definition span,
.krtml-flip-example span {
  display: block !important;
  font-size: clamp(.98rem, 2.5vw, 1.08rem) !important;
  line-height: 1.5 !important;
}

@media (max-width: 720px) {
  body.krtml-structure-active {
    padding-top: 108px !important;
  }
  body.admin-bar.krtml-structure-active {
    padding-top: 154px !important;
  }
  .krtml-topbar {
    min-height: 108px !important;
    padding-left: .55rem !important;
    padding-right: .55rem !important;
  }
  .krtml-drawer { top: 108px !important; }
  body.admin-bar .krtml-drawer { top: 154px !important; }
  .krtml-topbar-brand-row {
    grid-template-columns: 46px minmax(0, 1fr) 46px !important;
  }
  .krtml-site-name {
    font-size: clamp(1.02rem, 4.4vw, 1.28rem) !important;
  }
  .krtml-topbar-nav {
    justify-content: center !important;
    gap: .28rem !important;
  }
  .krtml-topbar-nav a {
    font-size: clamp(.94rem, 3.8vw, 1.03rem) !important;
    padding: .54rem .58rem !important;
    min-height: 36px !important;
  }
  .krtml-icon-button {
    min-width: 42px !important;
    min-height: 40px !important;
  }
}

/* v1.3.0 — final reader lane + concept popovers + polished shell.
   This update preserves the KRTML Structure v1.2 model while adding the Map, Series,
   Article, share-preview, and expandable-term refinements. */
body.krtml-structure-active {
  padding-top: 104px !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: 136px !important;
}
.krtml-topbar {
  min-height: 104px !important;
  padding: .28rem .62rem .42rem !important;
  gap: .1rem !important;
  box-shadow: 0 8px 26px rgba(19,47,70,.055) !important;
}
body.admin-bar .krtml-topbar { top: 32px !important; }
.krtml-topbar-brand-row {
  grid-template-columns: 54px minmax(0, 1fr) 54px !important;
  min-height: 44px !important;
}
.krtml-site-name {
  font-size: clamp(1.38rem, 3.8vw, 2.05rem) !important;
  line-height: 1.02 !important;
  font-weight: 980 !important;
  letter-spacing: -0.015em !important;
}
.krtml-topbar-nav {
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(.32rem, 1vw, .7rem) !important;
  padding: .05rem 0 0 !important;
}
.krtml-topbar-nav a {
  border: 1px solid rgba(19, 47, 70, .18) !important;
  background: #fff !important;
  box-shadow: 0 3px 10px rgba(19,47,70,.055) !important;
  border-radius: 999px !important;
  font-size: clamp(1.02rem, 2.45vw, 1.2rem) !important;
  padding: .54rem .95rem !important;
  min-height: 36px !important;
}
.krtml-topbar-nav a:hover,
.krtml-topbar-nav a:focus {
  background: var(--krtml-soft) !important;
  border-color: rgba(12,107,134,.35) !important;
}
.krtml-icon-button {
  min-width: 44px !important;
  min-height: 40px !important;
  font-size: 1.32rem !important;
  box-shadow: 0 3px 10px rgba(19,47,70,.055) !important;
}
.krtml-drawer { top: 104px !important; }
body.admin-bar .krtml-drawer { top: 136px !important; }
.krtml-drawer-head-center {
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  padding: 1rem 1.1rem !important;
}
.krtml-drawer-head-center strong {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem) !important;
  font-weight: 980 !important;
}
.krtml-drawer-head .krtml-small-button { display: none !important; }
.krtml-menu-details a {
  font-size: clamp(1.06rem, 1.8vw, 1.2rem) !important;
  padding: .82rem .95rem !important;
}
.krtml-right-panel-body { font-size: clamp(1.02rem, 1.8vw, 1.13rem) !important; }

/* Calmer page titles between the fixed top menu and content. */
body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(1.25rem, 3.2vw, 1.95rem) !important;
  margin: .45rem auto .95rem !important;
  line-height: 1.18 !important;
  text-align: center !important;
}

/* Map visuals and journey kit. */
.krtml-map-hero-grid,
.krtml-series-opening-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.krtml-map-intro p {
  font-size: clamp(1.04rem, 2.25vw, 1.18rem);
  line-height: 1.75;
  margin: 0 0 .9rem;
}
.krtml-symbolic-image {
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--krtml-line);
  box-shadow: 0 8px 24px rgba(19,47,70,.06);
}
.krtml-symbolic-image svg { display: block; width: 100%; height: auto; }
.krtml-journey-kit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .85rem;
}
.krtml-journey-kit-grid div {
  border: 1px solid var(--krtml-line);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, var(--krtml-soft));
  padding: 1rem;
  display: grid;
  gap: .3rem;
  text-align: center;
}
.krtml-journey-kit-grid strong { color: var(--krtml-primary); font-size: 1.1rem; }
.krtml-journey-kit-grid span { color: var(--krtml-muted); line-height: 1.35; }
.krtml-map-series-copy {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--krtml-line);
  border-radius: 22px;
  background: #fff;
  margin: 0 0 1rem;
}
.krtml-map-series-copy h3 a {
  color: #075c78;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  text-decoration: none;
}
.krtml-map-series-copy h3 a:hover { text-decoration: underline; }
.krtml-map-series-copy p { font-size: clamp(1.04rem, 2.25vw, 1.18rem); line-height: 1.72; }

/* Inline expandable terms. */
.krtml-term {
  appearance: none;
  border: 0;
  border-bottom: 2px solid rgba(12,107,134,.45);
  color: #075c78;
  background: rgba(238,248,248,.72);
  border-radius: 7px 7px 3px 3px;
  padding: .02rem .18rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.krtml-term:hover,
.krtml-term:focus {
  background: rgba(12,107,134,.13);
  outline: 2px solid rgba(12,107,134,.18);
  outline-offset: 2px;
}
.krtml-term-popover {
  position: fixed;
  z-index: 2147483005;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.krtml-term-popover.is-open {
  opacity: 1;
  pointer-events: auto;
}
.krtml-term-popover-card {
  position: fixed;
  width: min(92vw, 360px);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--krtml-line);
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(19,47,70,.22);
  padding: 1.1rem;
}
.krtml-term-close,
.krtml-share-modal-close {
  float: right;
  border: 1px solid var(--krtml-line);
  background: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1.25rem;
}
.krtml-term-popover h3 { margin: .1rem 2.2rem .8rem 0; color: var(--krtml-primary); }
.krtml-term-definition strong,
.krtml-term-example strong { display: block; color: var(--krtml-accent-dark); margin-bottom: .3rem; }
.krtml-term-definition span,
.krtml-term-example span { line-height: 1.55; }

/* Share preview modal. */
.krtml-share-modal { display: none; position: fixed; z-index: 2147483006; inset: 0; }
.krtml-share-modal.is-open { display: block; }
.krtml-share-modal-backdrop { position: absolute; inset: 0; background: rgba(10,20,30,.38); }
.krtml-share-modal-card {
  position: relative;
  margin: min(8vh, 70px) auto;
  width: min(92vw, 560px);
  max-height: 84vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--krtml-line);
  box-shadow: 0 22px 80px rgba(19,47,70,.28);
  padding: 1.25rem;
}
.krtml-share-modal-image { width: 100%; border-radius: 20px; border: 1px solid var(--krtml-line); margin: .8rem 0 1rem; }
.krtml-share-modal-title { font-size: clamp(1.35rem, 3.2vw, 2rem); margin: .4rem 0 .6rem; }
.krtml-share-modal-description,
.krtml-share-modal-caption { line-height: 1.6; color: var(--krtml-muted); }
.krtml-share-modal-caption { background: var(--krtml-soft); border-radius: 16px; padding: .85rem 1rem; }

/* Flippable cards: keep definition/example away from extreme edges. */
.krtml-flip-face { padding: 1.2rem 1.25rem !important; }
.krtml-flip-back { justify-content: center !important; gap: 1.15rem !important; }
.krtml-flip-definition,
.krtml-flip-example { padding: .55rem 0 !important; }
.krtml-flip-definition strong,
.krtml-flip-example strong { font-weight: 980 !important; }

@media (max-width: 720px) {
  body.krtml-structure-active { padding-top: 104px !important; }
  body.admin-bar.krtml-structure-active { padding-top: 150px !important; }
  .krtml-topbar { min-height: 104px !important; padding: .25rem .5rem .38rem !important; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  .krtml-drawer { top: 104px !important; }
  body.admin-bar .krtml-drawer { top: 150px !important; }
  .krtml-site-name { font-size: clamp(1.25rem, 5.2vw, 1.62rem) !important; }
  .krtml-topbar-nav a { font-size: clamp(.94rem, 3.6vw, 1.02rem) !important; padding: .5rem .62rem !important; }
  .krtml-map-hero-grid,
  .krtml-series-opening-grid,
  .krtml-journey-kit-grid { grid-template-columns: 1fr; }
  .krtml-symbolic-image { max-width: 440px; margin: 0 auto; }
  .krtml-term-popover { background: rgba(10,20,30,.28); }
  .krtml-term-popover-card {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    max-height: 72vh;
    border-radius: 24px 24px 0 0;
  }
}

/* v1.4.0 — requested layout corrections and cleanup. */
:root {
  --krtml-drawer-width: min(32vw, 420px);
  --krtml-topbar-height: 96px;
}

body.krtml-structure-active {
  padding-top: var(--krtml-topbar-height) !important;
}
body.admin-bar.krtml-structure-active {
  padding-top: calc(var(--krtml-topbar-height) + 32px) !important;
}

/* Keep the theme title smaller and centered if the active theme still renders one. */
body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(1.35rem, 3.4vw, 2.15rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.018em !important;
  text-align: center !important;
  margin: .72rem auto .85rem !important;
  padding: 0 !important;
  max-width: 960px !important;
}

/* Two-row top bar: title strip + centered clickable menu pills. */
.krtml-topbar {
  min-height: var(--krtml-topbar-height) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: .12rem !important;
  padding: .28rem .78rem .4rem !important;
  background: rgba(255,253,248,.985) !important;
}
body.admin-bar .krtml-topbar { top: 32px !important; }
.krtml-topbar-brand-row {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) 56px !important;
  align-items: center !important;
  gap: .3rem !important;
  width: 100% !important;
}
.krtml-site-name {
  text-align: center !important;
  font-size: clamp(1.6rem, 3.9vw, 2.35rem) !important;
  font-weight: 980 !important;
  line-height: 1.03 !important;
  letter-spacing: -0.025em !important;
  color: var(--krtml-ink) !important;
  text-decoration: none !important;
}
.krtml-topbar-nav {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(.38rem, 1.4vw, .8rem) !important;
  width: 100% !important;
  padding: .02rem 0 0 !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
.krtml-topbar-nav::-webkit-scrollbar { display: none !important; }
.krtml-topbar-nav a {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: .48rem .92rem !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid rgba(19,47,70,.18) !important;
  box-shadow: 0 3px 12px rgba(19,47,70,.06) !important;
  font-size: clamp(.98rem, 2.2vw, 1.12rem) !important;
  font-weight: 920 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}
.krtml-topbar-nav a:hover,
.krtml-topbar-nav a:focus {
  background: var(--krtml-soft) !important;
  border-color: rgba(12,107,134,.38) !important;
}
.krtml-icon-button {
  min-width: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  font-size: 1.42rem !important;
}
.krtml-drawer {
  top: var(--krtml-topbar-height) !important;
  width: var(--krtml-drawer-width) !important;
  max-width: 420px !important;
}
body.admin-bar .krtml-drawer { top: calc(var(--krtml-topbar-height) + 32px) !important; }

/* Center drawer titles, remove left alignment feeling, and add collapse/expand arrows to series bars. */
.krtml-drawer-head,
.krtml-drawer-head-center {
  justify-content: center !important;
  text-align: center !important;
  font-weight: 980 !important;
  font-size: clamp(1.22rem, 2.6vw, 1.65rem) !important;
  letter-spacing: -0.01em !important;
}
.krtml-menu-details summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .8rem !important;
  font-size: clamp(1.08rem, 2.5vw, 1.28rem) !important;
  line-height: 1.25 !important;
}
.krtml-menu-details summary::-webkit-details-marker { display: none !important; }
.krtml-menu-details summary::marker { content: '' !important; }
.krtml-menu-details summary::after {
  content: '▸';
  font-size: 1.05rem;
  color: var(--krtml-deep);
  transition: transform .18s ease;
}
.krtml-menu-details[open] summary::after {
  content: '▾';
}
.krtml-menu-details a {
  font-size: clamp(1.02rem, 2.15vw, 1.18rem) !important;
  line-height: 1.35 !important;
}
.krtml-right-mode,
.krtml-toggle-mode { display: none !important; }

/* Reading lane: bigger body copy, but title chips stay clean. */
.krtml-page,
.krtml-readable-text,
.krtml-page p,
.krtml-page li,
.krtml-core-question span,
.krtml-compact-note,
.krtml-spine-paragraph,
.krtml-spine-paragraph p,
.krtml-readable-opening,
.krtml-readable-opening p,
.krtml-safety-strip,
.krtml-body-list li,
.krtml-compact-list li {
  font-size: clamp(1.12rem, 1.9vw, 1.26rem) !important;
  line-height: 1.72 !important;
}
.krtml-section-subtitle,
.krtml-kicker,
.krtml-pill {
  text-transform: none !important;
  letter-spacing: .005em !important;
}
.krtml-section-subtitle {
  font-size: clamp(1.12rem, 2.35vw, 1.46rem) !important;
  line-height: 1.2 !important;
}

/* Continue links: simple and compact, like the Begin with links on the Map page. */
.krtml-route-button-grid { display: none !important; }
.krtml-continue-link-list {
  display: grid;
  gap: .75rem;
}
.krtml-continue-link {
  display: grid;
  gap: .18rem;
  padding: .95rem 1.05rem;
  border-radius: 18px;
  border: 1px solid var(--krtml-line);
  background: linear-gradient(135deg, #ffffff, var(--krtml-soft-2));
  color: var(--krtml-ink);
  text-decoration: none;
}
.krtml-continue-link span {
  font-size: .92rem;
  font-weight: 850;
  color: var(--krtml-muted);
}
.krtml-continue-link strong {
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  color: var(--krtml-deep);
}
.krtml-continue-primary { border-color: rgba(12,107,134,.35); }
.krtml-next-block {
  margin-top: 1.05rem;
  padding-top: .85rem;
  border-top: 1px solid var(--krtml-line);
}
.krtml-next-block h3,
.krtml-playlist-articles h3 {
  margin: 0 0 .55rem !important;
  font-size: clamp(1.1rem, 2.1vw, 1.32rem) !important;
  color: var(--krtml-primary) !important;
}

/* Inline term popover: compact body, centered term, no close button. */
.krtml-term-popover {
  background: transparent;
}
.krtml-term-popover-card {
  width: min(92vw, 380px) !important;
  max-height: min(70vh, 390px) !important;
  padding: 1.05rem 1.15rem 1.15rem !important;
}
.krtml-term-close { display: none !important; }
.krtml-term-popover h3 {
  margin: .1rem 0 .8rem !important;
  text-align: center !important;
  font-size: clamp(1.12rem, 2.6vw, 1.42rem) !important;
  line-height: 1.18 !important;
}
.krtml-term-definition,
.krtml-term-example {
  margin: .72rem 0 !important;
  font-size: .98rem !important;
  line-height: 1.5 !important;
}
.krtml-term-definition strong,
.krtml-term-example strong {
  display: block !important;
  font-size: 1.03rem !important;
  font-weight: 950 !important;
  margin-bottom: .24rem !important;
  color: var(--krtml-accent-dark) !important;
}
.krtml-term-definition span,
.krtml-term-example span {
  font-size: .96rem !important;
  line-height: 1.5 !important;
}

/* Flippable cards: definition and example should breathe, not sit at extreme edges. */
.krtml-flip-back {
  justify-content: center !important;
  gap: 1.2rem !important;
  padding: 1.15rem !important;
}
.krtml-flip-definition,
.krtml-flip-example {
  padding: .3rem 0 !important;
}
.krtml-flip-definition strong,
.krtml-flip-example strong {
  display: block !important;
  font-weight: 980 !important;
  font-size: .98rem !important;
  margin-bottom: .3rem !important;
}

/* Map hero no longer reserves a right-side image column. */
.krtml-map-hero-grid,
.krtml-series-opening-grid {
  display: block !important;
}
.krtml-map-hero .krtml-symbolic-image { display: none !important; }
.krtml-symbolic-image {
  margin: 1rem auto 1.25rem !important;
  max-width: 620px !important;
}

@media (max-width: 720px) {
  :root { --krtml-topbar-height: 104px; }
  body.admin-bar.krtml-structure-active { padding-top: calc(var(--krtml-topbar-height) + 46px) !important; }
  body.admin-bar .krtml-topbar { top: 46px !important; }
  body.admin-bar .krtml-drawer { top: calc(var(--krtml-topbar-height) + 46px) !important; }
  .krtml-site-name { font-size: clamp(1.55rem, 6vw, 2.05rem) !important; }
  .krtml-topbar-nav a { font-size: clamp(.96rem, 3.75vw, 1.05rem) !important; padding: .48rem .72rem !important; }
  .krtml-drawer { width: min(92vw, 420px) !important; }
  .krtml-term-popover { background: rgba(10,20,30,.28) !important; }
  .krtml-term-popover-card {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    max-height: 72vh !important;
    border-radius: 24px 24px 0 0 !important;
  }
}

/* === KRTML Structure v1.5.0 refinements ===
   Right menu collapsed by default in PHP; this CSS locks the cleaner content rail. */

/* The page heading should sit centered in the same reading rail, not off to the theme edge. */
body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1,
.krtml-page > h1,
.krtml-page > h2,
.krtml-readable-page > h1,
.krtml-readable-page > h2 {
  text-align: center !important;
}


/* Right-side menu order/content is now controlled by PHP. All panels are collapsed by default. */
.krtml-right-panel[open] summary {
  border-bottom: 1px solid var(--krtml-line);
}

/* Inline definition terms: color only, no underline. */
.krtml-term {
  border-bottom: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  color: #075c78 !important;
  background: rgba(238,248,248,.85) !important;
  border-radius: 8px !important;
  padding: .02rem .22rem !important;
}
.krtml-term:hover,
.krtml-term:focus {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

/* Pop-up term card: compact explanation, centered term, labels clear but not oversized. */
.krtml-term-popover h3 {
  text-align: center !important;
  margin: .1rem 0 .9rem !important;
  font-weight: 950 !important;
}
.krtml-term-definition strong,
.krtml-term-example strong {
  font-size: 1.08rem !important;
  font-weight: 950 !important;
  color: var(--krtml-primary) !important;
}
.krtml-term-definition span,
.krtml-term-example span {
  font-size: .94rem !important;
  line-height: 1.48 !important;
}

/* Mobile: keep content full-width overlay behavior; no fixed central rail. */
@media (max-width: 899px) {
  body.krtml-structure-active .krtml-page,
  body.krtml-structure-active .entry-title,
  body.krtml-structure-active .wp-block-post-title,
  body.krtml-structure-active .page-title,
  body.krtml-structure-active .entry-header h1 {
    width: auto !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
  }
}


/* v1.6.0 R0 expanded content image blocks */
.krtml-content-image {
  margin: 1.25rem auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--krtml-line);
  background: #fff;
  box-shadow: 0 10px 26px rgba(19,47,70,.07);
}
.krtml-content-image img { display:block; width:100%; height:auto; }
.krtml-content-image figcaption {
  font-size: .95rem;
  line-height: 1.45;
  color: var(--krtml-muted);
  padding: .8rem 1rem 1rem;
  background: #fff;
  text-align: center;
}
.krtml-custom-article-section .krtml-content-image { max-width: 860px; }

/* Slightly larger reading size, with calmer popover size retained. */
.krtml-page,
.krtml-readable-text,
.krtml-page p,
.krtml-page li,
.krtml-core-question span,
.krtml-compact-note,
.krtml-spine-paragraph,
.krtml-spine-paragraph p,
.krtml-readable-opening,
.krtml-readable-opening p,
.krtml-safety-strip,
.krtml-body-list li,
.krtml-compact-list li,
.krtml-map-series-copy p,
.krtml-map-intro p,
.krtml-r-entry-card p {
  font-size: clamp(1.18rem, 2vw, 1.32rem) !important;
  line-height: 1.76 !important;
}

body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(1.55rem, 3.65vw, 2.55rem) !important;
}

/* Map page R entry points: vertical scroll of horizontal-feeling plates; heading is the clickable route. */
.krtml-r-entry-list {
  display: grid;
  gap: 1.1rem;
}
.krtml-r-entry-card {
  padding: clamp(1.15rem, 2.4vw, 1.8rem);
  border-radius: 24px;
  border: 1px solid var(--krtml-line);
  background: linear-gradient(135deg, #ffffff, var(--krtml-soft-2));
  box-shadow: 0 8px 24px rgba(19,47,70,.055);
}
.krtml-r-entry-card h3 {
  margin: 0 0 .8rem !important;
  line-height: 1.2 !important;
}
.krtml-r-entry-card h3 a {
  color: #075c78 !important;
  font-size: clamp(1.35rem, 3vw, 1.9rem) !important;
  font-weight: 950 !important;
  text-decoration: none !important;
}
.krtml-r-entry-card h3 a:hover,
.krtml-r-entry-card h3 a:focus {
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
.krtml-r-entry-card p {
  margin: .72rem 0 0 !important;
}

/* Keep popover definition compact compared with page body. */
.krtml-term-definition,
.krtml-term-example,
.krtml-term-definition span,
.krtml-term-example span {
  font-size: .96rem !important;
}

@media (max-width: 720px) {
  .krtml-page,
  .krtml-readable-text,
  .krtml-page p,
  .krtml-page li,
  .krtml-r-entry-card p {
    font-size: clamp(1.08rem, 4.3vw, 1.18rem) !important;
  }
}


/* === KRTML Structure v1.9.0 typography + unicode repair support ===
   Increase main reading content by one step and page titles by two steps. */
body.krtml-structure-active .krtml-page,
body.krtml-structure-active .krtml-page p,
body.krtml-structure-active .krtml-page li,
body.krtml-structure-active .krtml-readable-text,
body.krtml-structure-active .krtml-readable-page,
body.krtml-structure-active .krtml-readable-page p,
body.krtml-structure-active .krtml-readable-page li,
body.krtml-structure-active .krtml-section,
body.krtml-structure-active .krtml-section p,
body.krtml-structure-active .krtml-section li,
body.krtml-structure-active .krtml-hero,
body.krtml-structure-active .krtml-hero p,
body.krtml-structure-active .krtml-arch-box-body,
body.krtml-structure-active .krtml-arch-box-body p,
body.krtml-structure-active .krtml-arch-box-body li,
body.krtml-structure-active .krtml-field-value,
body.krtml-structure-active .krtml-field-value p,
body.krtml-structure-active .krtml-body-list li,
body.krtml-structure-active .krtml-compact-list li,
body.krtml-structure-active .krtml-spine-paragraph,
body.krtml-structure-active .krtml-spine-paragraph p,
body.krtml-structure-active .krtml-playlist-spine p,
body.krtml-structure-active .krtml-custom-article-section p,
body.krtml-structure-active .krtml-custom-article-section li,
body.krtml-structure-active .krtml-safety-strip,
body.krtml-structure-active .krtml-safety-inline,
body.krtml-structure-active .krtml-r-entry-card p,
body.krtml-structure-active .krtml-map-intro p,
body.krtml-structure-active .krtml-map-series-copy p {
  font-size: clamp(1.26rem, 2.15vw, 1.44rem) !important;
  line-height: 1.82 !important;
}

body.krtml-structure-active .entry-title,
body.krtml-structure-active .wp-block-post-title,
body.krtml-structure-active .page-title,
body.krtml-structure-active .entry-header h1 {
  font-size: clamp(1.95rem, 4.2vw, 3.15rem) !important;
  line-height: 1.18 !important;
  margin-bottom: 1rem !important;
}

body.krtml-structure-active .krtml-section h2,
body.krtml-structure-active .krtml-hero h2 {
  font-size: clamp(2.05rem, 4.4vw, 3.35rem) !important;
  line-height: 1.16 !important;
}

body.krtml-structure-active .krtml-section h3,
body.krtml-structure-active .krtml-spine-paragraph .krtml-spine-link,
body.krtml-structure-active .krtml-custom-article-section h3 {
  font-size: clamp(1.42rem, 2.6vw, 2rem) !important;
  line-height: 1.22 !important;
}

/* Keep concept popovers readable but calmer than body text. */
body.krtml-structure-active .krtml-term-popover,
body.krtml-structure-active .krtml-term-popover p,
body.krtml-structure-active .krtml-term-definition span,
body.krtml-structure-active .krtml-term-example span {
  font-size: 1rem !important;
  line-height: 1.52 !important;
}
body.krtml-structure-active .krtml-term-definition strong,
body.krtml-structure-active .krtml-term-example strong {
  font-size: 1.12rem !important;
  font-weight: 950 !important;
}

@media (max-width: 720px) {
  body.krtml-structure-active .krtml-page,
  body.krtml-structure-active .krtml-page p,
  body.krtml-structure-active .krtml-page li,
  body.krtml-structure-active .krtml-section p,
  body.krtml-structure-active .krtml-section li,
  body.krtml-structure-active .krtml-readable-text {
    font-size: clamp(1.15rem, 4.6vw, 1.28rem) !important;
    line-height: 1.76 !important;
  }
  body.krtml-structure-active .entry-title,
  body.krtml-structure-active .wp-block-post-title,
  body.krtml-structure-active .page-title,
  body.krtml-structure-active .entry-header h1 {
    font-size: clamp(1.82rem, 7vw, 2.55rem) !important;
  }
}


/* === KRTML Structure v2.0.0 cleanup ===
   Desktop/tablet side menus now overlay only. Central content does not slide, shrink, or resize.
   Share doorway no longer shows Preview Share or Copy Link. Section subtitles are left-aligned. */
@media (min-width: 900px) {
  body.krtml-structure-active .krtml-page,
  body.krtml-structure-active .entry-title,
  body.krtml-structure-active .wp-block-post-title,
  body.krtml-structure-active .page-title,
  body.krtml-structure-active .entry-header h1 {
    width: min(100% - 2.5rem, 1080px) !important;
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    transition: none !important;
  }
}

body.krtml-structure-active .krtml-page,
body.krtml-structure-active .krtml-readable-page,
body.krtml-structure-active .krtml-section,
body.krtml-structure-active .krtml-hero,
body.krtml-structure-active .krtml-share-block {
  transform: none !important;
  transition: none !important;
}

/* Body/content headings inside central bars. */
body.krtml-structure-active .krtml-section-subtitle {
  display: block !important;
  width: 100% !important;
  margin: 0 0 1rem 0 !important;
  text-align: left !important;
  text-transform: capitalize !important;
  letter-spacing: .01em !important;
  font-size: clamp(1.32rem, 2.9vw, 1.72rem) !important;
  line-height: 1.18 !important;
}

body.krtml-structure-active .krtml-kicker,
body.krtml-structure-active .krtml-pill {
  text-transform: none !important;
}

/* Keep the outer page title centered, but left-align inner content headings. */
body.krtml-structure-active .krtml-section h2,
body.krtml-structure-active .krtml-section h3,
body.krtml-structure-active .krtml-custom-article-section h3,
body.krtml-structure-active .krtml-playlist-articles h3,
body.krtml-structure-active .krtml-next-block h3 {
  text-align: left !important;
  text-transform: none !important;
}

/* Hide removed share controls defensively if older cached markup remains briefly. */
body.krtml-structure-active [data-krtml-share-preview],
body.krtml-structure-active [data-krtml-copy-link] {
  display: none !important;
}

/* v2.1.0 Map page generated illustrations */
.krtml-map-image {
	margin: 2.1rem auto 2.35rem;
	max-width: min(100%, 980px);
	border-radius: 24px;
	overflow: hidden;
	background: #f8fbfb;
	border: 1px solid rgba(18,48,71,.12);
	box-shadow: 0 16px 42px rgba(18,48,71,.10);
}
.krtml-map-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.krtml-map-image figcaption {
	margin: 0;
	padding: .85rem 1rem 1rem;
	font-size: 1rem;
	line-height: 1.45;
	font-weight: 700;
	color: #24445b;
	text-align: center;
	background: rgba(255,255,255,.78);
}
.krtml-map-intro .krtml-map-image {
	margin-top: 1.5rem;
	margin-bottom: 2.6rem;
}
.krtml-map-series-copy .krtml-map-image {
	margin-top: 1.4rem;
	margin-bottom: 1.8rem;
}
@media (max-width: 720px) {
	.krtml-map-image {
		border-radius: 18px;
		margin: 1.5rem auto 1.8rem;
	}
	.krtml-map-image figcaption {
		font-size: .92rem;
		padding: .7rem .85rem .8rem;
	}
}

/* === KRTML Structure v2.2.0 share-card and Map quote update === */
body.krtml-structure-active .krtml-map-quote {
  margin: 1.45rem auto 1.75rem;
  padding: 1.2rem 1.35rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(238,248,248,.88));
  border: 1px solid rgba(18,48,71,.14);
  box-shadow: 0 12px 34px rgba(18,48,71,.08);
  color: #123047;
}
body.krtml-structure-active .krtml-map-quote p {
  margin: 0 0 .55rem 0 !important;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem) !important;
  line-height: 1.55 !important;
  font-weight: 850;
}
body.krtml-structure-active .krtml-map-quote cite {
  display: block;
  font-style: normal;
  font-weight: 800;
  color: #456475;
  text-align: right;
}

body.krtml-structure-active .krtml-share-card-inline {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(18,48,71,.14);
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 40px rgba(18,48,71,.09);
  margin: 1rem 0 1.15rem;
}
body.krtml-structure-active .krtml-share-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid rgba(18,48,71,.12);
}
body.krtml-structure-active .krtml-share-card-no-image {
  box-shadow: none;
  border-style: dashed;
  background: rgba(247,251,252,.72);
}
body.krtml-structure-active .krtml-share-lines {
  list-style: none !important;
  margin: 0 !important;
  padding: 1.1rem 1.25rem 1.25rem !important;
  display: grid;
  gap: .65rem;
}
body.krtml-structure-active .krtml-share-lines li {
  margin: 0 !important;
  padding-left: 1.05rem;
  position: relative;
  font-size: clamp(1.08rem, 2vw, 1.28rem) !important;
  line-height: 1.58 !important;
  color: #19374c;
  font-weight: 760;
}
body.krtml-structure-active .krtml-share-lines li::before {
  content: "";
  width: .42rem;
  height: .42rem;
  border-radius: 999px;
  background: #0c6b86;
  position: absolute;
  left: 0;
  top: .65em;
  opacity: .75;
}
body.krtml-structure-active .krtml-share-block .krtml-button-row {
  margin-top: 1rem;
}

/* Old share-preview modal controls remain unused, but hide defensively if cached markup appears. */
body.krtml-structure-active .krtml-share-modal,
body.krtml-structure-active [data-krtml-share-preview],
body.krtml-structure-active [data-krtml-copy-link] {
  display: none !important;
}

/* === KRTML Structure v2.3.0 share text + term safety update === */
body.krtml-structure-active .krtml-share-card-inline,
body.krtml-structure-active .krtml-share-card-image {
  display: none !important;
}
body.krtml-structure-active .krtml-share-text-card {
  margin: 1rem 0 1.15rem !important;
  padding: 1.1rem 1.2rem !important;
  border-radius: 22px !important;
  border: 1px solid rgba(18,48,71,.14) !important;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,248,248,.88)) !important;
  box-shadow: 0 12px 34px rgba(18,48,71,.075) !important;
}
body.krtml-structure-active .krtml-share-intro {
  margin: 0 0 .75rem 0 !important;
  font-size: clamp(1.12rem, 2vw, 1.34rem) !important;
  line-height: 1.55 !important;
  font-weight: 850 !important;
  color: #123047 !important;
}
body.krtml-structure-active .krtml-share-text-card .krtml-share-lines {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: grid !important;
  gap: .55rem !important;
}
body.krtml-structure-active .krtml-share-text-card .krtml-share-lines li {
  margin: 0 !important;
  padding-left: 1.05rem !important;
  position: relative !important;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem) !important;
  line-height: 1.55 !important;
  color: #19374c !important;
  font-weight: 680 !important;
}
body.krtml-structure-active .krtml-share-text-card .krtml-share-lines li::before {
  content: "" !important;
  width: .42rem !important;
  height: .42rem !important;
  border-radius: 999px !important;
  background: #0c6b86 !important;
  position: absolute !important;
  left: 0 !important;
  top: .68em !important;
  opacity: .8 !important;
}
body.krtml-structure-active .krtml-share-button-row .krtml-share-platform span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.25em !important;
  height: 1.25em !important;
  border-radius: 999px !important;
  background: rgba(12,107,134,.12) !important;
  color: #0c6b86 !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  margin-right: .35rem !important;
}
body.krtml-structure-active .krtml-share-instagram span {
  background: rgba(134,86,163,.14) !important;
  color: #8656a3 !important;
}

/* v2.4.0 series travel pages */
.krtml-series-travel-page .krtml-section h2 {
  margin-top: .25rem;
}
.krtml-series-travel-grid,
.krtml-series-entry-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.krtml-travel-card,
.krtml-series-entry-card {
  border: 1px solid var(--krtml-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 33, 43, .06);
  padding: clamp(1rem, 2.4vw, 1.5rem);
}
.krtml-series-entry-card h3,
.krtml-travel-card h3 {
  font-size: clamp(1.25rem, 2.7vw, 1.75rem);
  margin: 0 0 .75rem;
  line-height: 1.18;
}
.krtml-series-entry-card h3 a,
.krtml-series-spine-row .krtml-hub-title-line {
  color: var(--krtml-deep);
  text-decoration: none;
}
.krtml-series-entry-card h3 a:hover,
.krtml-series-spine-row .krtml-hub-title-line:hover {
  text-decoration: underline;
}
.krtml-series-entry-card p,
.krtml-travel-card p,
.krtml-series-spine-details p {
  font-size: clamp(1.12rem, 2.4vw, 1.28rem);
  line-height: 1.75;
  color: var(--krtml-ink);
  margin: 0 0 .9rem;
}
.krtml-series-spine-list {
  gap: 1.2rem;
}
.krtml-series-spine-row .krtml-hub-topbar {
  background: linear-gradient(135deg, var(--krtml-soft), #fff);
}
.krtml-series-spine-row .krtml-hub-details {
  padding: clamp(1rem, 2.5vw, 1.6rem);
}
.krtml-series-spine-details p:last-child,
.krtml-series-entry-card p:last-child,
.krtml-travel-card p:last-child {
  margin-bottom: 0;
}
@media (min-width: 880px) {
  .krtml-series-travel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
