/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: 'IBM Plex Sans Arabic', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --default-transition-duration: 150ms;
    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
    --color-forest: #173f35;
    --color-gold: #b79c64;
    --font-editorial: var(--font-sans);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring:where(:not(iframe)) {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .visible {
    visibility: visible;
  }
  .fixed {
    position: fixed;
  }
  .relative {
    position: relative;
  }
  .static {
    position: static;
  }
  .container {
    width: 100%;
    @media (width >= 40rem) {
      max-width: 40rem;
    }
    @media (width >= 48rem) {
      max-width: 48rem;
    }
    @media (width >= 64rem) {
      max-width: 64rem;
    }
    @media (width >= 80rem) {
      max-width: 80rem;
    }
    @media (width >= 96rem) {
      max-width: 96rem;
    }
  }
  .block {
    display: block;
  }
  .contents {
    display: contents;
  }
  .grid {
    display: grid;
  }
  .hidden {
    display: none;
  }
  .inline {
    display: inline;
  }
  .min-h-screen {
    min-height: 100vh;
  }
  .grow {
    flex-grow: 1;
  }
  .transform {
    transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
  }
  .antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .filter {
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }
  .transition {
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
  }
}
.app[dir='ltr'] .continue-monogram {
  font-size: 12px;
  overflow: hidden;
  padding-inline: 3px;
}
.app[dir='ltr'] [data-icon='arrow'] {
  scale: -1 1;
}
.language-menu {
  position: relative;
  flex-shrink: 0;
}
.language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--green);
  background: var(--surface);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.language-trigger:hover,
.language-menu.is-open .language-trigger {
  border-color: var(--gold);
  background: var(--soft);
}
.language-caret {
  color: var(--muted);
  transition: transform 0.2s ease;
}
.language-menu.is-open .language-caret {
  transform: rotate(180deg);
  color: var(--gold);
}
.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 164px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px #173f3518;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dark-theme .language-dropdown {
  box-shadow: 0 12px 30px #00000055;
}
.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 5px;
  color: var(--ink);
  font-size: 12px;
  text-align: start;
}
.language-option:hover {
  background: var(--soft);
  color: var(--green);
}
.language-option.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 600;
}
.language-option-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.language-option-meta small {
  font-size: 9px;
  letter-spacing: 0.4px;
}
.language-option.active .language-option-meta {
  color: var(--gold);
}
.language-option-meta .icon {
  width: 13px;
  height: 13px;
}
.language-toggle {
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--green);
  background: var(--surface);
  font-size: 11px;
}
.language-toggle:hover {
  border-color: var(--gold);
  background: var(--soft);
}
.language-status {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 70;
  width: fit-content;
  margin-inline: auto;
  background: var(--color-forest);
  color: white;
  border-radius: 6px;
  padding: 12px 18px;
  font-size: 12px;
  direction: ltr;
}
.language-status button {
  text-decoration: underline;
  margin-inline-start: 8px;
}
.app[dir='ltr'] {
  text-align: left;
}
.app[dir='ltr'] .brand-button,
.app[dir='ltr'] .nav-item {
  text-align: left;
}
.app[dir='ltr'] .brand span {
  letter-spacing: -0.3px;
  font-size: 19px;
}
.app[dir='ltr'] .hero-art-caption,
.app[dir='ltr'] .continue-encouragement {
  text-align: center;
}
.app[dir='ltr'] .continue-identity h2 {
  font-size: 22px;
}
.app[dir='ltr'] .art-name,
.app[dir='ltr'] .tone-prophet .art-name {
  font-size: 26px;
}
.app[dir='ltr'] .art-honorific {
  font-size: 9px;
}
.app[dir='ltr'] .historical-timeline {
  border-right: 0;
  border-left: 1px solid var(--line);
  padding-right: 0;
  padding-left: 35px;
}
.app[dir='ltr'] .historical-dot {
  right: auto;
  left: -41px;
}
.app[dir='ltr'] .reading-levels[data-level='read'] {
  --level-offset: 100%;
}
.app[dir='ltr'] .reading-levels[data-level='deep'] {
  --level-offset: 200%;
}
.app[dir='ltr'] .reading-levels small {
  font-size: 9px;
}
.app[dir='ltr'] .reading-levels {
  direction: ltr;
}
.app[dir='ltr'] .resume-copy h1 {
  line-height: 1.5;
}
.app[dir='ltr'] .biography-prose {
  line-height: 1.9;
}
.app[dir='ltr'] .epithet-callout {
  border-right: 0;
  border-left: 3px solid var(--gold);
}
.app[dir='ltr'] .page-intro h1 {
  line-height: 1.4;
}
@media (max-width: 980px) {
  .language-menu {
    grid-column: 4;
    grid-row: 2;
    margin-top: 5px;
    justify-self: end;
  }
  .language-trigger {
    min-height: 40px;
    padding: 6px 8px;
  }
  .language-toggle {
    grid-column: 4;
    grid-row: 2;
    width: 40px;
    min-height: 40px;
    margin-top: 5px;
  }
  .topbar .search-field {
    grid-column: 1 / 4;
  }
}
@media (max-width: 540px) {
  .language-trigger {
    padding: 6px;
    font-size: 10px;
  }
  .language-toggle {
    width: 36px;
  }
  .app[dir='ltr'] .brand span {
    font-size: clamp(13px, 4.2vw, 17px);
  }
  .app[dir='ltr'] .brand small {
    font-size: 8px;
    letter-spacing: 0;
  }
  .app[dir='ltr'] .continue-monogram {
    font-size: 11px;
  }
  .app[dir='ltr'] .continue-identity h2 {
    font-size: 18px;
  }
  .app[dir='ltr'] .historical-timeline {
    padding-left: 24px;
  }
  .app[dir='ltr'] .historical-dot {
    left: -30px;
  }
}
@layer base {
  body {
    margin: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
  }
  button,
  a,
  input,
  select {
    -webkit-tap-highlight-color: transparent;
  }
  button,
  a,
  select {
    cursor: pointer;
  }
  button,
  input,
  select,
  textarea,
  kbd {
    font-family: var(--font-sans);
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  button:disabled {
    cursor: default;
  }
  button,
  input,
  select {
    outline-offset: 5px;
  }
  :focus-visible {
    outline: 2px solid var(--color-gold);
  }
  ::selection {
    background: #d8c7a2;
    color: #173f35;
  }
}
.app {
  --bg: #f8f8f3;
  --surface: #fffefa;
  --sidebar: #f1f3eb;
  --ink: #293e36;
  --muted: #737b6d;
  --line: #e7e9df;
  --soft: #e9ede2;
  --green: #285344;
  --gold: #aa8e54;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.library-loading {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: #f8f8f3;
  color: #285344;
  font-family: var(--font-sans);
}
.library-loading h1 {
  font-family: var(--font-editorial);
  font-size: 30px;
}
.library-loading p {
  color: #81877b;
  font-size: 12px;
}
.icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
button {
  transition: background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.brand-button {
  display: block;
  flex-shrink: 0;
  text-align: right;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--green);
}
.brand-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 0;
  border: 0;
  object-fit: contain;
}
.brand span {
  font-family: var(--font-editorial);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.8;
  white-space: nowrap;
  letter-spacing: 0;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: -3px;
}
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  color: var(--muted);
  min-height: 44px;
  padding: 12px 11px;
  border-radius: 5px;
  font-size: 13px;
  white-space: nowrap;
}
.nav-item .icon {
  width: 17px;
  height: 17px;
}
.nav-item:hover {
  background: var(--soft);
  color: var(--green);
}
.nav-item.active {
  color: var(--green);
  font-weight: 600;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar {
  min-height: 88px;
  max-width: 1324px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 42px;
}
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-inline: auto;
}
.desktop-nav .icon {
  display: none;
}
.desktop-nav .nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  inset-inline: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  width: 218px;
  min-width: 0;
}
.search-field .icon {
  width: 17px;
  height: 17px;
}
.search-field input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: var(--ink);
  padding: 10px 0;
  outline-offset: 2px;
}
.search-field input::placeholder {
  color: #93988c;
}
.search-field kbd {
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--soft);
  color: var(--green);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}
.theme-toggle:hover {
  background: var(--soft);
  border-color: var(--gold);
}
.theme-toggle .icon {
  width: 16px;
  height: 16px;
}
.top-bookmark {
  position: relative;
}
.top-bookmark .icon {
  width: 18px;
}
.top-bookmark i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  top: 3px;
  left: 4px;
}
.mobile-menu {
  display: none;
}
.mobile-nav {
  display: none;
}
.main-content {
  max-width: 1324px;
  margin: auto;
  padding: 31px 42px 0;
}
.hero {
  display: flex;
  position: relative;
  overflow: hidden;
  background: #173e34;
  border-radius: 9px;
  min-height: 334px;
  color: #f5f0df;
  padding: 28px 36px 26px;
}
.hero::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px #051d161a;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.04' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  opacity: 0.7;
}
.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  padding-top: 4px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #d1c6a5;
}
.tiny-star {
  width: 12px;
  height: 12px;
  color: #bba66e;
}
.hero h1 {
  font-family: var(--font-editorial);
  font-size: clamp(38px, 3.15vw, 51px);
  font-weight: 400;
  line-height: 1.5;
  margin: 10px 0 10px;
  letter-spacing: 0;
}
.hero h1 > span {
  color: #d4bd82;
}
.hero-copy > p {
  font-size: 13px;
  color: #c3cfc0;
  line-height: 2;
  margin-top: 3px;
}
.hero-actions {
  display: flex;
  gap: 23px;
  align-items: center;
  margin-top: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 11px 22px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}
.button .icon {
  width: 17px;
  height: 17px;
}
.button-gold {
  color: #253e32;
  background: #d7c28e;
  border: 1px solid #e1cea1;
}
.button-gold:hover {
  background: #e4d3a9;
  transform: translateY(-2px);
}
.hero-secondary {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e0e4d6;
}
.hero-secondary .icon {
  width: 15px;
  height: 15px;
}
.hero-secondary:hover {
  color: #e2c78b;
}
.hero-proof {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  color: #a5b8a7;
  font-size: 9px;
}
.hero-proof > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-proof .icon {
  width: 12px;
  height: 12px;
}
.proof-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8a9c85;
}
.hero-art-wrap {
  width: 40%;
  align-self: stretch;
  position: relative;
  margin: -17px -8px -30px -21px;
}
.heritage-art {
  width: 100%;
  height: 100%;
  min-height: 310px;
  max-height: 347px;
  opacity: 0.9;
}
.hero-art-caption {
  position: absolute;
  bottom: 27px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-editorial);
  font-size: 16px;
  color: #c6b788;
}
.stats-strip {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-top: 18px;
  padding: 0 4px 19px;
  border-bottom: 1px solid var(--line);
  min-height: 42px;
}
.stats-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.stats-strip .icon {
  width: 15px;
  height: 15px;
  color: #9a9f8d;
  margin-left: 2px;
}
.stats-strip strong {
  font-size: 16px;
  font-weight: 500;
  color: #395840;
}
.stats-strip div > span {
  font-size: 11px;
  color: var(--muted);
}
.stats-strip .text-stat {
  font-size: 10px;
  font-weight: 500;
}
.stats-divider {
  width: 1px;
  height: 16px;
  background: #dfe3d5;
}
.stats-note {
  margin-right: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-editorial);
  font-size: 14px;
  color: #92957e;
}
.categories-section {
  padding-top: 25px;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}
.section-kicker {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0;
  display: block;
  margin-bottom: 3px;
}
.section-heading h2 {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.4;
}
.section-aside {
  color: var(--muted);
  font-size: 10px;
  padding-bottom: 5px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.category-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 15px 3px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
}
.category-tile:hover,
.category-tile.chosen {
  border-color: #a7b394;
  background: var(--sidebar);
  transform: translateY(-3px);
}
.category-tile.chosen::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  position: absolute;
  top: 9px;
  left: 9px;
}
.category-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  margin-bottom: 2px;
}
.category-icon .icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.45;
}
.category-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.category-tile small {
  font-size: 9px;
  color: #999e91;
}
.tone-prophet {
  --accent: #a88b4d;
  --tint: #f3efdf;
  --art-bg: #eeead9;
  --art-ink: #786c39;
}
.tone-one_ummah {
  --accent: #5c6f9e;
  --tint: #eceff6;
  --art-bg: #e5eaf4;
  --art-ink: #4b5d87;
}
.tone-sahabi {
  --accent: #638160;
  --tint: #eaf0e4;
  --art-bg: #e9eddf;
  --art-ink: #5e7753;
}
.tone-mother_of_believers {
  --accent: #ae8685;
  --tint: #f6edeb;
  --art-bg: #f1e6e0;
  --art-ink: #a87d6b;
}
.tone-daughter_of_prophet {
  --accent: #9580a0;
  --tint: #f1ecf3;
  --art-bg: #ede6ef;
  --art-ink: #8d749a;
}
.tone-grandchild_of_prophet {
  --accent: #56857d;
  --tint: #e7f1ef;
  --art-bg: #e2eeec;
  --art-ink: #46736b;
}
.tone-scholar {
  --accent: #708b91;
  --tint: #e9eff0;
  --art-bg: #e1ebea;
  --art-ink: #5f8384;
}
.tone-tabii {
  --accent: #808e67;
  --tint: #eef0e7;
  --art-bg: #e8eddd;
  --art-ink: #7b855b;
}
.tone-leader {
  --accent: #a08b68;
  --tint: #f2ede3;
  --art-bg: #ede5d7;
  --art-ink: #9c8052;
}
.tone-woman_scholar {
  --accent: #99889f;
  --tint: #f0eaf0;
  --art-bg: #ede5ed;
  --art-ink: #957f97;
}
.tone-seerah {
  --accent: #4c6f91;
  --tint: #e8eff6;
  --art-bg: #e2ebf3;
  --art-ink: #385877;
}
.tone-expedition {
  --accent: #9c4b44;
  --tint: #f5e8e6;
  --art-bg: #f0dfdd;
  --art-ink: #823a34;
}
.figures-section {
  padding-top: 30px;
  scroll-margin-top: 110px;
}
.figures-heading {
  margin-bottom: 18px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #607457;
  padding-bottom: 5px;
}
.text-link .icon {
  width: 16px;
  height: 16px;
}
.text-link:hover {
  color: var(--gold);
}
.figures-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.figure-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.25s,
    box-shadow 0.25s;
  min-width: 0;
}
.figure-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px #233d2710;
}
.card-art {
  height: 155px;
  background: var(--art-bg);
  color: var(--art-ink);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-art-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='68' fill='none' viewBox='0 0 68 68'%3E%3Cpath d='m34 0 10 24 24 10-24 10-10 24-10-24L0 34l24-10Z' stroke='%23988d68' stroke-width='.5'/%3E%3Cpath d='m0 0 68 68m0-68L0 68' stroke='%23988d68' stroke-width='.25'/%3E%3C/svg%3E");
  mask-image: linear-gradient(90deg, #000, #0000 42%, #0000 58%, #000);
}
.card-art::before {
  content: '';
  width: 166px;
  height: 166px;
  border: 1px solid var(--art-ink);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--art-ink) 15%, transparent);
  }
  border-radius: 50% 50% 2px 2px;
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}
.card-art::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 160px;
  border: 1px solid var(--art-ink);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--art-ink) 10%, transparent);
  }
  top: 31px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}
.card-category {
  position: absolute;
  right: 11px;
  top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fffaf47a;
  border: 1px solid #fffefa55;
  font-size: 8px;
  color: var(--art-ink);
  padding: 3px 6px;
  border-radius: 3px;
  z-index: 2;
}
.card-category .icon {
  width: 10px;
  height: 10px;
}
.save-button {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #fffcf78a;
  color: var(--art-ink);
  z-index: 3;
}
.save-button .icon {
  width: 13px;
  height: 13px;
}
.save-button:hover {
  background: #fffcf7;
}
.is-saved > .icon {
  fill: currentColor;
}
.art-name-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  justify-content: center;
  padding-top: 20px;
  z-index: 1;
}
.art-name {
  font-family: var(--font-editorial);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.55;
  max-width: 90%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.art-honorific {
  font-family: var(--font-editorial);
  font-size: 10px;
  margin-top: -1px;
}
.tone-prophet .art-name {
  font-size: 38px;
}
.art-corner {
  position: absolute;
  bottom: 10px;
  width: 16px;
  height: 16px;
  opacity: 0.4;
  pointer-events: none;
  border-bottom: 1px solid var(--art-ink);
}
.art-corner-one {
  right: 10px;
  border-right: 1px solid var(--art-ink);
}
.art-corner-two {
  left: 10px;
  border-left: 1px solid var(--art-ink);
}
.card-body {
  padding: 15px 15px 0;
}
.figure-epithet {
  font-size: 9px;
  color: var(--accent);
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 4px;
  min-height: 16px;
}
.card-body h3 {
  font-family: var(--font-editorial);
  font-size: 24px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-body h3 button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body h3 button:hover {
  color: var(--gold);
}
.card-body > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding: 11px 0 12px;
  font-size: 9px;
}
.card-footer span,
.card-footer button {
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-footer > span {
  color: #989e90;
  font-size: 8px;
}
.card-footer .icon {
  width: 12px;
  height: 12px;
}
.card-footer > button {
  color: #52714c;
}
.card-footer > button:hover {
  color: var(--gold);
}
.paths-section {
  margin-top: 35px;
}
.paths-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.path-card {
  background: #eff0e7;
  border: 1px solid #e2e5d7;
  border-radius: 7px;
  display: flex;
  overflow: hidden;
  text-align: right;
  min-height: 168px;
  position: relative;
}
.path-copy {
  padding: 20px 24px;
  position: relative;
  z-index: 2;
  width: 72%;
}
.path-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #839071;
}
.path-tag .icon {
  width: 12px;
  height: 12px;
}
.path-card h3 {
  font-family: var(--font-editorial);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.5;
  margin: 5px 0;
  color: #3c583e;
}
.path-card p {
  color: #8b927f;
  font-size: 10px;
  line-height: 1.9;
}
.path-link {
  font-size: 10px;
  color: #5e7555;
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 12px;
}
.path-link .icon {
  width: 14px;
  height: 14px;
}
.path-photo {
  position: absolute;
  inset: 0 55% 0 0;
  background: linear-gradient(90deg, #e9e6d940, #eff0e7 99%),
    url('../assets/heritage-arch.jpg') center 55% / cover;
  opacity: 0.65;
  filter: saturate(0.45);
  transition: transform 0.4s;
}
.path-card:hover .path-photo {
  transform: scale(1.04);
}
.path-card:hover {
  border-color: #bec9af;
}
.path-decoration {
  position: absolute;
  left: -8px;
  bottom: -27px;
  display: grid;
  place-items: center;
  width: 165px;
  height: 190px;
  border: 1px solid #d7ddc8;
  border-radius: 50% 50% 0 0;
  transform: rotate(-12deg);
  color: #c6cfb4;
}
.path-decoration::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid #d7ddc8;
  border-radius: inherit;
}
.path-decoration .icon {
  width: 75px;
  height: 75px;
  stroke-width: 0.6;
}
.main-footer {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding: 23px 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}
.main-footer > div {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-editorial);
  font-size: 15px;
  color: #80896c;
}
.footer-star {
  width: 15px;
  height: 15px;
  color: #b9aa7b;
}
.main-footer > span {
  font-size: 8px;
}
.copyright {
  margin-right: 5px;
}
.main-footer > button {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 9px;
}
.main-footer .icon {
  width: 13px;
  height: 13px;
}
.main-footer .footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-sans);
}
.footer-links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.footer-links button:hover {
  color: var(--green);
}
.results-count {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 5px;
}
.library-toolbar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 18px 0 23px;
}
.filter-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter-chips button {
  font-size: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}
.filter-chips button.selected {
  background: var(--green);
  color: var(--surface);
  border-color: var(--green);
}
.filter-chips button:hover:not(.selected) {
  background: var(--soft);
  color: var(--green);
}
.display-controls {
  display: flex;
  gap: 10px;
  align-self: flex-end;
  align-items: center;
}
.display-controls select {
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted);
  padding: 6px;
  background: var(--surface);
}
.display-controls .icon {
  width: 16px;
  height: 16px;
}
.search-summary {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.search-summary button {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--green);
  font-size: 10px;
}
.search-summary .icon {
  width: 12px;
  height: 12px;
}
.load-more {
  border: 1px solid var(--line);
  margin: 30px auto 0;
  display: flex;
  width: fit-content;
  color: var(--green);
}
.load-more:hover {
  background: var(--soft);
}
.empty-state {
  text-align: center;
  padding: 65px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.empty-state > .icon {
  width: 34px;
  height: 34px;
  color: var(--gold);
}
.empty-state h3 {
  font-family: var(--font-editorial);
  font-size: 28px;
  margin: 16px 0 8px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.button-green {
  background: var(--green);
  color: #fffdf5;
}
.button-green:hover {
  background: #3c6550;
}
.list-view {
  grid-template-columns: 1fr 1fr;
}
.list-view .figure-card {
  display: flex;
}
.list-view .card-art {
  height: 180px;
  width: 35%;
  flex-shrink: 0;
}
.list-view .card-body {
  flex: 1;
  min-width: 0;
}
.list-view .card-category {
  font-size: 7px;
}
.list-view .art-name {
  font-size: 27px;
}
.page-intro {
  margin: 15px 0 40px;
}
.page-intro h1 {
  font-family: var(--font-editorial);
  font-size: 40px;
  margin: 8px 0;
}
.page-intro p {
  color: var(--muted);
  font-size: 13px;
}
.timeline {
  margin: 0 25px 45px 0;
  border-right: 1px solid #d5ddca;
  padding-right: 40px;
}
.timeline-era {
  position: relative;
  padding: 0 0 42px;
}
.era-number {
  position: absolute;
  right: -57px;
  top: 0;
  width: 32px;
  height: 32px;
  border: 1px solid #d5ddca;
  border-radius: 50%;
  background: var(--bg);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.era-heading > span {
  font-size: 10px;
  color: var(--gold);
}
.era-heading h2 {
  font-family: var(--font-editorial);
  font-size: 28px;
  margin: 4px 0 15px;
}
.timeline-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.timeline-figures button {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px;
  text-align: right;
}
.timeline-figures button:hover {
  border-color: var(--gold);
}
.timeline-figures button > .icon:first-child {
  color: var(--gold);
}
.timeline-figures button > .icon:last-child {
  margin-right: auto;
  width: 15px;
}
.timeline-figures span {
  font-family: var(--font-editorial);
  font-size: 22px;
}
.timeline-figures small {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.paths-page {
  margin-top: 15px;
}
.paths-page .section-heading {
  margin-bottom: 30px;
}
.paths-page .section-heading h2 {
  font-size: 36px;
}
.paths-page .paths-grid {
  gap: 20px;
}
.paths-page .path-card {
  min-height: 230px;
}
.paths-page .path-copy {
  padding: 30px;
}
.paths-page .path-card h3 {
  font-size: 32px;
}
.reader-dialog {
  --green: #285344;
  --ink: #293e36;
  --muted: #81877b;
  --gold: #aa8e54;
  --line: #e7e9df;
  --soft: #e9ede2;
  --surface: #fffefa;
  color: var(--ink);
  background: var(--surface);
  width: min(760px, calc(100% - 36px));
  max-height: 90dvh;
  border: 1px solid #dbdfcf;
  border-radius: 10px;
  padding: 0;
  margin: auto;
  direction: rtl;
  font-family: var(--font-sans);
}
.reader-dialog::backdrop {
  background: #102b2499;
  backdrop-filter: blur(5px);
}
.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 30px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 3;
}
.brand-small .brand-icon {
  width: 36px;
  height: 36px;
}
.brand-small span {
  font-size: 20px;
}
.brand-small small {
  display: none;
}
.reader-content {
  padding: 32px 48px 45px;
}
.reader-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.reader-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tint);
  color: var(--accent);
  font-size: 11px;
  padding: 7px 12px;
  border-radius: 4px;
}
.reader-category .icon {
  width: 15px;
  height: 15px;
}
.reader-tools {
  display: flex;
  gap: 7px;
}
.font-adjust {
  font-family: var(--font-editorial);
  gap: 2px;
  font-size: 23px;
}
.font-adjust span {
  font-family: var(--font-sans);
  font-size: 12px;
}
.reader-content h1 {
  font-family: var(--font-editorial);
  font-size: 43px;
  line-height: 1.6;
  margin: 5px 0;
}
.reader-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 25px;
}
.reader-dates {
  display: flex;
  gap: 30px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 26px;
}
.reader-dates > span {
  font-size: 12px;
}
.reader-dates small {
  color: var(--muted);
  font-size: 9px;
  display: block;
  margin-bottom: 5px;
}
.reader-biography h2,
.reader-sources h2 {
  font-family: var(--font-editorial);
  font-weight: 700;
  font-size: 24px;
  margin: 25px 0 10px;
}
.reader-biography p {
  font-family: var(--font-editorial);
  font-size: 21px;
  line-height: 2.1;
  color: #5f685a;
  margin-bottom: 22px;
  white-space: pre-line;
}
.reader-status {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin: 16px 0;
}
.reader-size-1 .reader-biography p {
  font-size: 24px;
}
.reader-size-2 .reader-biography p {
  font-size: 27px;
}
.reader-sources {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 3px;
}
.reader-sources h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.reader-sources h2 .icon {
  width: 19px;
}
.reader-sources > div {
  display: flex;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.source-number {
  color: var(--gold);
  font-size: 10px;
  padding-top: 3px;
}
.reader-sources strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.reader-sources small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.9;
}
.original-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gold);
  margin-top: 27px;
}
.original-link .icon {
  width: 14px;
  height: 14px;
}
.about-content > p {
  font-size: 14px;
  line-height: 2.3;
  margin: 15px 0;
  color: var(--muted);
}
.about-content .about-note {
  background: var(--soft);
  border-radius: 5px;
  padding: 15px;
  font-size: 11px;
}
.about-content .button {
  margin-top: 15px;
}
.dark-theme,
.reader-dark {
  --bg: #121212;
  --surface: #1e1e1e;
  --sidebar: #181818;
  --ink: #e6e6e6;
  --muted: #a6a6a6;
  --line: #333333;
  --soft: #292929;
  --green: #a4b995;
  --gold: #c5ae77;
  color-scheme: dark;
}
.dark-theme .hero {
  background: var(--surface);
}
.dark-theme .hero-copy > p,
.dark-theme .hero-proof {
  color: var(--muted);
}
.dark-theme .tone-prophet {
  --accent: #d1b978;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #d8c68d;
}
.dark-theme .tone-one_ummah {
  --accent: #9bb0dc;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #aebff0;
}
.dark-theme .tone-sahabi {
  --accent: #a4bf91;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #b1c69b;
}
.dark-theme .tone-mother_of_believers {
  --accent: #cba6a1;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #d4b0a5;
}
.dark-theme .tone-daughter_of_prophet {
  --accent: #c0accc;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #c9b7d4;
}
.dark-theme .tone-grandchild_of_prophet {
  --accent: #8dc1b6;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #9fd0c6;
}
.dark-theme .tone-scholar {
  --accent: #a0bec1;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #b0cbca;
}
.dark-theme .tone-tabii {
  --accent: #b0bf94;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #c0cba5;
}
.dark-theme .tone-leader {
  --accent: #c9b18b;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #d5be95;
}
.dark-theme .tone-woman_scholar {
  --accent: #c6afc8;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #d0bad1;
}
.dark-theme .tone-seerah {
  --accent: #95b8d9;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #a9c7e4;
}
.dark-theme .tone-expedition {
  --accent: #d8928b;
  --tint: var(--soft);
  --art-bg: var(--soft);
  --art-ink: #e2a59f;
}
.dark-theme .card-category {
  background: var(--tint);
  border-color: var(--line);
}
.dark-theme .save-button {
  background: var(--surface);
  color: var(--art-ink);
}
.dark-theme .save-button:hover {
  background: var(--soft);
}
.dark-theme .card-footer > button,
.dark-theme .text-link,
.dark-theme .path-link {
  color: var(--green);
}
.dark-theme .card-footer > button:hover,
.dark-theme .text-link:hover {
  color: var(--gold);
}
.dark-theme .stats-divider {
  background: var(--line);
}
.dark-theme .path-tag,
.dark-theme .main-footer > div {
  color: var(--muted);
}
.dark-theme .path-decoration {
  color: var(--line);
  border-color: var(--line);
}
.dark-theme .path-decoration::before {
  border-color: var(--line);
}
.dark-theme .era-number,
.dark-theme .timeline,
.dark-theme .reader-dialog {
  border-color: var(--line);
}
.dark-theme .nav-item {
  color: var(--muted);
}
.dark-theme .nav-item.active {
  color: var(--ink);
}
.dark-theme .stats-strip strong {
  color: var(--ink);
}
.dark-theme .category-tile {
  background: var(--surface);
}
.dark-theme .path-card {
  background: var(--surface);
  border-color: var(--line);
}
.dark-theme .path-card h3 {
  color: var(--ink);
}
.dark-theme .path-card p {
  color: var(--muted);
}
.dark-theme .path-photo {
  opacity: 0.25;
}
.dark-theme .filter-chips button.selected {
  color: var(--bg);
}
.reader-dark::backdrop {
  background: #00000099;
}
.reader-dark .reader-biography p {
  color: #cccccc;
}
.reader-dark .button-green,
.dark-theme .button-green {
  background: #749065;
  color: #fffdf5;
}
@media (min-width: 1500px) {
  .hero {
    min-height: 368px;
    padding: 35px 46px;
  }
  .hero h1 {
    font-size: 55px;
  }
  .hero-copy > p {
    font-size: 13px;
  }
  .hero-eyebrow {
    font-size: 11px;
  }
  .hero-art-wrap {
    margin-top: -25px;
  }
  .card-art {
    height: 180px;
  }
  .category-tile {
    padding-block: 18px 15px;
  }
  .category-title {
    font-size: 11px;
  }
}
@media (max-width: 1180px) {
  .brand span {
    font-size: 20px;
  }
  .topbar {
    padding-inline: 27px;
    gap: 16px;
  }
  .desktop-nav .nav-item {
    padding-inline: 8px;
    font-size: 12px;
  }
  .theme-toggle {
    width: 36px;
    padding: 7px;
  }
  .theme-toggle > span {
    display: none;
  }
  .main-content {
    padding-inline: 27px;
  }
  .search-field {
    width: 180px;
  }
  .hero {
    padding-inline: 26px;
    min-height: 329px;
  }
  .hero h1 {
    font-size: 41px;
  }
  .hero-art-wrap {
    width: 37%;
    margin-left: -24px;
  }
  .hero-actions {
    gap: 15px;
  }
  .hero-art-caption {
    font-size: 13px;
  }
  .stats-strip {
    gap: 16px;
  }
  .stats-note {
    display: none;
  }
  .category-grid {
    gap: 7px;
  }
  .category-title {
    font-size: 9px;
  }
  .category-tile {
    padding-block: 12px;
  }
  .figures-grid {
    gap: 11px;
  }
  .card-art {
    height: 143px;
  }
  .card-body {
    padding: 12px 11px 0;
  }
  .card-body h3 {
    font-size: 19px;
  }
  .card-footer {
    font-size: 8px;
  }
  .card-footer > span {
    font-size: 7px;
  }
  .path-copy {
    padding-inline: 17px;
    width: 80%;
  }
  .path-card h3 {
    font-size: 24px;
  }
}
@media (max-width: 980px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, 40px);
    gap: 8px;
    padding: 14px 24px 16px;
  }
  .brand-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .desktop-nav {
    display: none;
  }
  .header-tools {
    display: contents;
  }
  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 40px;
    min-height: 40px;
  }
  .top-bookmark {
    grid-column: 3;
    grid-row: 1;
    width: 40px;
    height: 40px;
  }
  .mobile-menu {
    display: inline-flex;
    grid-column: 4;
    grid-row: 1;
    width: 40px;
    height: 40px;
  }
  .search-field {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding-inline: 12px;
    margin-top: 5px;
    min-height: 40px;
  }
  .mobile-nav:not([hidden]) {
    display: grid;
    gap: 4px;
    padding: 12px 24px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    max-height: calc(100dvh - 145px);
    overflow-y: auto;
  }
  .mobile-nav .nav-item {
    width: 100%;
    font-size: 13px;
    padding-inline: 14px;
  }
  .mobile-nav .nav-item.active {
    background: var(--soft);
  }
  .figures-section {
    scroll-margin-top: 160px;
  }
  .main-content {
    padding: 24px 24px 0;
  }
  .hero {
    min-height: 330px;
    padding-inline: 23px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .hero-copy > p {
    font-size: 10px;
  }
  .hero-eyebrow {
    font-size: 9px;
  }
  .hero-art-wrap {
    width: 34%;
    margin-left: -25px;
  }
  .hero-art-caption {
    font-size: 11px;
    bottom: 40px;
  }
  .hero-actions {
    gap: 15px;
  }
  .hero-secondary {
    font-size: 10px;
  }
  .hero-actions .button {
    padding-inline: 15px;
    gap: 14px;
  }
  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
  }
  .category-tile {
    padding: 11px 8px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .category-icon {
    width: 27px;
    height: 27px;
    margin: 0;
  }
  .category-icon .icon {
    width: 16px;
    height: 16px;
  }
  .category-title {
    font-size: 9px;
  }
  .category-tile small {
    display: none;
  }
  .figures-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
  .card-art {
    height: 162px;
  }
  .card-body {
    padding: 15px 15px 0;
  }
  .card-body h3 {
    font-size: 23px;
  }
  .card-footer {
    font-size: 10px;
  }
  .card-footer > span {
    font-size: 9px;
  }
  .paths-grid {
    grid-template-columns: 1fr;
  }
  .path-copy {
    width: 70%;
    padding: 22px 25px;
  }
  .timeline-figures {
    grid-template-columns: 1fr;
  }
  .list-view {
    grid-template-columns: 1fr;
  }
  .list-view .card-art {
    height: 180px;
  }
}
@media (max-width: 760px) {
  .brand {
    gap: 10px;
  }
  .brand span {
    font-size: 20px;
  }
  .topbar {
    padding-inline: 22px;
  }
  .search-field input {
    font-size: 12px;
  }
  .main-content {
    padding: 22px 22px 0;
  }
  .hero {
    min-height: 335px;
    padding: 27px 30px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero-copy > p {
    font-size: 11px;
  }
  .hero-art-wrap {
    width: 37%;
    margin-left: -28px;
  }
  .hero-art-caption {
    bottom: 33px;
    font-size: 13px;
  }
  .hero-secondary {
    font-size: 11px;
  }
  .category-tile {
    justify-content: center;
    padding-block: 13px;
  }
  .category-title {
    font-size: 10px;
  }
  .card-art {
    height: 175px;
  }
}
@media (max-width: 540px) {
  .topbar {
    padding-inline: 16px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) repeat(3, 36px);
  }
  .brand {
    gap: 8px;
  }
  .brand span {
    font-size: clamp(14px, 4.5vw, 18px);
  }
  .brand small {
    font-size: 9px;
    letter-spacing: 0;
  }
  .brand-icon {
    width: 42px;
    height: 42px;
  }
  .theme-toggle,
  .top-bookmark,
  .mobile-menu {
    width: 36px;
    height: 40px;
  }
  .search-field {
    gap: 8px;
  }
  .search-field kbd {
    display: none;
  }
  .search-field > .icon {
    width: 15px;
  }
  .top-bookmark .icon {
    width: 16px;
  }
  .mobile-nav:not([hidden]) {
    padding-inline: 16px;
  }
  .main-content {
    padding: 16px 16px 0;
  }
  .hero {
    min-height: 370px;
    border-radius: 7px;
    padding: 24px;
  }
  .hero-copy {
    width: 100%;
  }
  .hero-eyebrow {
    font-size: 9px;
  }
  .hero h1 {
    font-size: 41px;
    position: relative;
    line-height: 1.55;
    margin-block: 12px 12px;
  }
  .hero-copy > p {
    font-size: 12px;
    line-height: 2;
    position: relative;
    max-width: 270px;
  }
  .hero-art-wrap {
    position: absolute;
    left: -80px;
    bottom: -21px;
    width: 250px;
    opacity: 0.22;
    height: 300px;
    margin: 0;
    pointer-events: none;
  }
  .hero-art-caption {
    display: none;
  }
  .hero-actions {
    margin-top: 24px;
    gap: 20px;
  }
  .hero-actions .button {
    padding: 10px 17px;
    font-size: 10px;
  }
  .hero-secondary {
    font-size: 9px;
    gap: 5px;
  }
  .hero-secondary .icon {
    width: 13px;
  }
  .hero-proof {
    font-size: 8px;
    margin-top: 24px;
    gap: 8px;
  }
  .stats-strip {
    justify-content: space-between;
    gap: 7px;
    margin-top: 16px;
    padding-bottom: 16px;
  }
  .stats-strip > div {
    gap: 5px;
  }
  .stats-strip .icon {
    width: 13px;
    height: 13px;
    margin: 0;
  }
  .stats-strip strong {
    font-size: 15px;
  }
  .stats-strip div > span {
    font-size: 8px;
  }
  .stats-strip > div:last-of-type {
    display: none;
  }
  .stats-divider:nth-of-type(2) {
    display: none;
  }
  .stats-strip > div:nth-of-type(2) {
    margin-left: 14px;
  }
  .stats-strip > div:first-child {
    margin-right: 14px;
  }
  .section-heading {
    gap: 10px;
    margin-bottom: 15px;
  }
  .section-heading h2 {
    font-size: 25px;
  }
  .section-kicker {
    font-size: 8px;
  }
  .section-aside {
    font-size: 8px;
  }
  .categories-section {
    padding-top: 22px;
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .category-tile {
    flex-direction: column;
    gap: 7px;
    padding: 11px 2px 12px;
  }
  .category-title {
    font-size: 9px;
    letter-spacing: 0;
  }
  .category-icon {
    width: 29px;
    height: 29px;
  }
  .category-icon .icon {
    width: 17px;
    height: 17px;
  }
  .figures-section {
    padding-top: 26px;
  }
  .figures-grid {
    gap: 11px;
  }
  .text-link {
    font-size: 8px;
    gap: 6px;
    padding-bottom: 3px;
  }
  .text-link .icon {
    width: 13px;
  }
  .card-art {
    height: 145px;
  }
  .card-art::before {
    width: 136px;
    height: 146px;
    top: 28px;
  }
  .card-art::after {
    width: 122px;
    height: 139px;
    top: 35px;
  }
  .card-category {
    top: 9px;
    right: 8px;
    font-size: 6px;
    padding: 3px 4px;
    gap: 3px;
  }
  .card-category .icon {
    width: 8px;
    height: 8px;
  }
  .save-button {
    width: 22px;
    height: 23px;
    left: 7px;
    top: 8px;
  }
  .save-button .icon {
    width: 11px;
  }
  .art-name {
    font-size: 32px;
  }
  .tone-prophet .art-name {
    font-size: 32px;
  }
  .art-honorific {
    font-size: 9px;
  }
  .card-body {
    padding: 12px 11px 0;
  }
  .figure-epithet {
    font-size: 8px;
    min-height: 14px;
  }
  .card-body h3 {
    font-size: 20px;
    margin-bottom: 5px;
  }
  .card-body > p {
    font-size: 11px;
    line-height: 1.9;
    min-height: 42px;
  }
  .card-footer {
    font-size: 8px;
    gap: 4px;
    padding-block: 10px;
    margin-top: 12px;
  }
  .card-footer > span {
    font-size: 7px;
    gap: 3px;
  }
  .card-footer .icon {
    width: 10px;
    height: 10px;
  }
  .card-footer > button {
    gap: 4px;
  }
  .paths-section {
    margin-top: 28px;
  }
  .path-copy {
    width: 78%;
    padding: 19px 20px;
  }
  .path-card h3 {
    font-size: 27px;
  }
  .path-card p {
    font-size: 9px;
  }
  .path-tag {
    font-size: 8px;
  }
  .path-card {
    min-height: 174px;
  }
  .main-footer {
    margin-top: 27px;
    padding-block: 20px;
    flex-wrap: wrap;
    row-gap: 13px;
  }
  .main-footer > div {
    font-size: 13px;
  }
  .main-footer > span {
    font-size: 7px;
  }
  .main-footer .footer-links {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
  }
  .filter-chips {
    gap: 6px;
  }
  .filter-chips button {
    font-size: 9px;
    padding: 5px 8px;
  }
  .library-toolbar {
    gap: 10px;
    padding-block: 15px 18px;
  }
  .display-controls {
    gap: 4px;
  }
  .display-controls select {
    font-size: 9px;
  }
  .search-summary {
    font-size: 10px;
  }
  .results-count {
    font-size: 9px;
  }
  .reader-dialog {
    width: calc(100% - 20px);
    max-height: 94dvh;
  }
  .reader-topbar {
    padding: 12px 20px;
  }
  .brand-small span {
    font-size: 20px;
  }
  .reader-content {
    padding: 25px 24px 35px;
  }
  .reader-content h1 {
    font-size: 34px;
    line-height: 1.6;
  }
  .reader-dates {
    gap: 20px;
  }
  .reader-dates > span {
    font-size: 10px;
  }
  .reader-biography p {
    font-size: 20px;
  }
  .reader-size-1 .reader-biography p {
    font-size: 23px;
  }
  .reader-size-2 .reader-biography p {
    font-size: 26px;
  }
  .reader-sources small {
    font-size: 9px;
  }
  .page-intro h1 {
    font-size: 34px;
  }
  .page-intro p {
    font-size: 11px;
    line-height: 1.9;
  }
  .timeline {
    padding-right: 28px;
    margin-right: 17px;
  }
  .era-number {
    right: -44px;
  }
  .timeline-figures button {
    padding: 15px;
    gap: 11px;
  }
  .timeline-figures span {
    font-size: 20px;
  }
  .paths-page .section-heading h2 {
    font-size: 30px;
  }
  .paths-page .path-copy {
    padding: 23px;
  }
  .paths-page .path-card {
    min-height: 210px;
  }
  .list-view .card-art {
    width: 38%;
    height: 175px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.figma-custom-code-fragment {
  display: contents;
}
.figma-bypass-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--color-forest);
  color: white;
  padding: 10px 16px;
  border-radius: 5px;
}
.figma-bypass-link:focus {
  transform: translateY(0);
}
.main-content {
  padding-bottom: 48px;
  min-height: 60vh;
}
.card-body h3 a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body h3 a:hover {
  color: var(--gold);
}
.card-footer a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}
.filter-chips a {
  font-size: 11px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}
.filter-chips a.selected {
  background: var(--green);
  color: var(--surface);
  border-color: var(--green);
}
.filter-chips a:hover:not(.selected) {
  background: var(--soft);
  color: var(--green);
}
.dark-theme .filter-chips a.selected {
  color: var(--bg);
}
.browse-page .section-heading h1 {
  font-size: 30px;
  font-weight: 600;
}
.page-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  padding: 7px 0 16px;
  flex-wrap: wrap;
}
.page-crumbs a:hover {
  color: var(--gold);
}
.page-crumbs > span:last-child {
  color: var(--ink);
}
.page-intro h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.7;
}
.page-intro p {
  max-width: 780px;
  font-size: 13px;
  line-height: 2.1;
}
.save-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: calc(100% - 40px);
  padding: 15px 18px;
  border-radius: 7px;
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 25px #0002;
  font-size: 12px;
}
.save-notice button {
  display: grid;
  place-items: center;
}
progress {
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
  accent-color: var(--gold);
}
progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: var(--gold);
  border-radius: 10px;
  transition: width 0.3s;
}
progress::-moz-progress-bar {
  background: var(--gold);
  border-radius: 10px;
}
.resume-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  align-items: center;
  gap: 50px;
  padding: 38px 42px;
  border-radius: 10px;
  background: #173e34;
  color: #f3efdf;
  min-height: 390px;
}
.resume-copy {
  position: relative;
  z-index: 2;
}
.resume-copy h1 {
  font-size: clamp(28px, 2.7vw, 38px);
  font-weight: 500;
  line-height: 1.8;
  margin: 14px 0 13px;
}
.resume-copy h1 em {
  font-style: normal;
  color: #d7c28e;
}
.resume-copy > p {
  max-width: 420px;
  font-size: 13px;
  line-height: 2.3;
  color: #c3cfc0;
}
.resume-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 9px;
  color: #a9bcab;
  margin-top: 24px;
}
.resume-proof .icon {
  width: 13px;
  height: 13px;
}
.resume-proof > span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  margin-inline: 4px;
}
.resume-library {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #d7c28e;
  margin-top: 25px;
}
.resume-library .icon {
  width: 15px;
  height: 15px;
}
.resume-art {
  position: absolute;
  inset: 0 20% 0 0;
  opacity: 0.1;
  pointer-events: none;
}
.resume-art .heritage-art {
  width: 100%;
  height: 100%;
  max-height: none;
}
.continue-card {
  position: relative;
  z-index: 2;
  background: #ffffff0d;
  border: 1px solid #bba66e44;
  border-radius: 9px;
  padding: 22px 26px 18px;
  backdrop-filter: blur(5px);
}
.continue-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: #dbc68e;
}
.continue-top > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.continue-top .icon {
  width: 15px;
  height: 15px;
}
.continue-category {
  border: 1px solid #d7c28e33;
  border-radius: 4px;
  font-size: 9px;
  padding: 4px 7px;
  color: #c3cfc0;
}
.continue-identity {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 21px;
}
.continue-monogram {
  display: grid;
  place-items: center;
  width: 70px;
  height: 78px;
  border-radius: 38px 38px 5px 5px;
  border: 1px solid #d7c28e66;
  color: #d7c28e;
  font-size: 19px;
  background: #c6ae7510;
  flex-shrink: 0;
}
.continue-monogram .icon {
  width: 32px;
  height: 32px;
}
.continue-identity small {
  font-size: 9px;
  color: #bcba9a;
  display: block;
}
.continue-identity h2 {
  font-size: 25px;
  line-height: 1.8;
  font-weight: 500;
  margin: 2px 0;
}
.continue-identity > div:last-child > span {
  font-size: 10px;
  color: #b5c4b3;
}
.continue-description {
  font-size: 11px;
  line-height: 2;
  color: #bdcbb9;
  margin-top: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.continue-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 20px 0 9px;
  font-size: 9px;
  color: #bbc6ac;
}
.continue-card progress::-webkit-progress-bar {
  background: #ffffff20;
}
.continue-button {
  display: flex;
  width: 100%;
  margin-top: 20px;
  justify-content: space-between;
  font-size: 12px;
  padding-block: 12px;
}
.continue-encouragement {
  display: block;
  color: #9fae98;
  font-size: 9px;
  text-align: center;
  margin-top: 12px;
}
.prominent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 6px;
}
.prominent-stats > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 23px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
}
.stat-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--soft);
  color: var(--gold);
  border-radius: 50%;
}
.stat-symbol .icon {
  width: 23px;
  height: 23px;
}
.prominent-stats strong {
  display: block;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.prominent-stats div > div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.knowledge-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 8px;
  min-height: 285px;
  transition: transform 0.2s,
    border-color 0.2s;
}
.knowledge-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.knowledge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.knowledge-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: var(--gold);
  background: var(--soft);
  border-radius: 12px;
}
.knowledge-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.4;
}
.path-count {
  color: var(--muted);
  font-size: 10px;
  background: var(--bg);
  padding: 5px 8px;
  border-radius: 4px;
}
.knowledge-card h2 {
  font-size: 20px;
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 7px;
}
.knowledge-card > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  margin-bottom: 23px;
}
.knowledge-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
  margin-bottom: 10px;
}
.knowledge-progress strong {
  color: var(--gold);
  font-weight: 500;
}
.knowledge-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  color: var(--green);
  margin-top: 20px;
}
.knowledge-link .icon {
  width: 16px;
  height: 16px;
}
.path-intro {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.path-intro h1 {
  margin-top: 20px;
}
.path-progress-panel {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: space-between;
  padding: 26px 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 30px;
}
.path-progress-panel > div {
  flex: 1;
  max-width: 700px;
}
.path-progress-panel strong {
  font-size: 15px;
  font-weight: 500;
}
.path-progress-panel p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 16px;
}
.progress-ring {
  width: 70px;
  height: 70px;
  border: 4px solid var(--soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 24px;
  flex-shrink: 0;
}
.progress-ring small {
  font-size: 11px;
  margin-inline-start: 3px;
}
.path-complete {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  margin-top: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  color: var(--muted);
}
.path-complete .icon {
  width: 14px;
  height: 14px;
}
.path-complete.completed {
  background: var(--soft);
  color: var(--green);
}
.path-certificate {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--gold);
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 30px;
}
.path-certificate > .icon {
  color: var(--gold);
  width: 36px;
  height: 36px;
}
.path-certificate > div {
  flex: 1;
}
.path-certificate p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}
.timeline-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.timeline-option {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s,
    transform 0.2s;
}
.timeline-option:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}
.timeline-option-art {
  display: grid;
  place-items: center;
  height: 155px;
  margin: -24px -24px 24px;
  position: relative;
  background: var(--soft);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  color: var(--gold);
}
.timeline-option-art::before,
.timeline-option-art::after {
  content: '';
  position: absolute;
  width: 170px;
  height: 170px;
  top: 20px;
  border: 1px solid var(--gold);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  }
  border-radius: 50% 50% 0 0;
}
.timeline-option-art::after {
  width: 150px;
  top: 30px;
}
.timeline-option-art > .icon {
  width: 45px;
  height: 45px;
  stroke-width: 1;
  margin-top: -15px;
}
.timeline-mini-axis {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: 65%;
  bottom: 24px;
  height: 1px;
  background: var(--line);
}
.timeline-mini-axis i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: -2px;
}
.timeline-option h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.7;
  margin: 8px 0;
}
.timeline-option > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
  margin-bottom: 20px;
}
.timeline-option-tag {
  color: var(--gold);
  font-size: 10px;
  margin-top: auto;
}
.timeline-option .knowledge-link {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.historical-timeline {
  max-width: 970px;
  margin: 35px auto 0;
  padding-right: 35px;
  border-right: 1px solid var(--line);
}
.historical-item {
  position: relative;
  padding-bottom: 24px;
}
.historical-dot {
  position: absolute;
  right: -41px;
  top: 25px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  outline: 1px solid var(--gold);
  background: var(--gold);
}
.historical-card {
  display: block;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 28px;
  border-radius: 8px;
}
.historical-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.historical-meta > span:first-child {
  color: var(--gold);
}
.historical-card h2,
.historical-card h3 {
  font-size: 23px;
  line-height: 1.7;
  margin: 10px 0 5px;
  font-weight: 500;
}
.historical-card h2 a:hover {
  color: var(--gold);
}
.historical-card .historical-title {
  font-size: 12px;
  color: var(--green);
  margin-bottom: 15px;
}
.historical-card details {
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.historical-card summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.historical-card summary .icon {
  width: 14px;
  height: 14px;
}
.historical-card details p {
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
  margin: 17px 0;
}
.century-heading {
  font-size: 17px;
  font-weight: 500;
  color: var(--gold);
  padding: 10px 0 24px;
}
.expedition-filters {
  margin-top: 25px;
}
.expedition-filters button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 17px;
  font-size: 12px;
}
.expedition-filters button > span {
  font-size: 10px;
  opacity: 0.8;
}
.expedition-card:hover {
  border-color: var(--gold);
}
.expedition-card > p {
  color: var(--muted);
  line-height: 2;
  font-size: 12px;
}
.outcome-tag {
  display: inline-block;
  border-radius: 4px;
  background: var(--soft);
  color: var(--green);
  padding: 6px 10px;
  font-size: 11px;
  margin-top: 14px;
}
.sariyya-item .historical-dot {
  background: var(--bg);
}
.figure-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 12px 0 30px;
}
.figure-page-heading h1 {
  font-size: 37px;
  line-height: 1.8;
  font-weight: 600;
  margin-top: 14px;
}
.figure-page-heading p {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}
.figure-honorific {
  display: block;
  color: var(--gold);
  font-size: 12px;
  margin-top: 8px;
}
.reader-save {
  border: 1px solid var(--line);
  color: var(--green);
  background: var(--surface);
  font-size: 12px;
  white-space: nowrap;
}
.reader-save:hover {
  border-color: var(--gold);
}
.narration-player {
  position: relative;
  overflow: hidden;
  background: #173e34;
  color: #eee9d8;
  border-radius: 10px;
  padding: 24px 30px;
  margin-bottom: 36px;
}
.narration-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Cpath d='m35 0 10 25 25 10-25 10-10 25-10-25L0 35l25-10Z' fill='none' stroke='%23baa46d' stroke-width='.6'/%3E%3C/svg%3E");
  mask-image: linear-gradient(90deg, #000, #0000 65%);
}
.narration-header,
.narration-main,
.audio-seek,
.audio-empty {
  position: relative;
  z-index: 1;
}
.narration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.audio-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #d4c494;
}
.audio-eyebrow .icon {
  width: 16px;
  height: 16px;
}
.audio-level {
  padding: 4px 9px;
  border: 1px solid #bba66e44;
  font-size: 9px;
  border-radius: 4px;
  margin-right: 6px;
}
.playback-speed {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b8c7b8;
  font-size: 10px;
}
.playback-speed select {
  border: 1px solid #d7c28e44;
  border-radius: 4px;
  padding: 5px 8px;
  color: #e5d9b6;
  background: #173e34;
  font-size: 11px;
  direction: ltr;
}
.narration-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 30px 0 27px;
}
.narration-title small {
  font-size: 10px;
  color: #b3c3b0;
}
.narration-title h2 {
  font-size: 29px;
  line-height: 1.8;
  font-weight: 500;
  margin: 4px 0;
}
.narration-title p {
  font-size: 11px;
  color: #a4b8a3;
  line-height: 1.9;
}
.narration-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-inline: 25px;
  direction: ltr;
}
.narration-transport > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #d0c39a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.narration-transport > button:disabled {
  opacity: 0.35;
}
.narration-transport > button .icon {
  width: 19px;
  height: 19px;
}
.narration-transport > .audio-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #d7c28e;
  color: #233e32;
  justify-content: center;
  border: 6px solid #1b483b;
  outline: 1px solid #b7a16a77;
}
.audio-play:hover:not(:disabled) {
  transform: scale(1.05);
}
.audio-seek {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 10px;
  color: #b9c3ab;
  font-variant-numeric: tabular-nums;
}
.audio-seek input {
  flex: 1;
  min-width: 0;
  height: 5px;
  accent-color: #d7c28e;
  cursor: pointer;
}
.audio-empty {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #fff2;
  color: #c6d0be;
  font-size: 11px;
  line-height: 1.9;
}
.audio-empty button {
  color: #dec995;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.audio-empty button .icon {
  width: 14px;
  height: 14px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 40px;
}
.article-main {
  min-width: 0;
}
.reading-levels {
  position: sticky;
  top: 104px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 520px);
  margin-inline: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  gap: 0;
  isolation: isolate;
}
.reading-levels button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  padding: 11px 12px;
  color: var(--muted);
}
.reading-levels button.active {
  background: transparent;
  color: var(--green);
}
.reading-levels button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.reading-levels .icon {
  width: 18px;
  height: 18px;
}
.reading-levels strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.reading-levels small {
  display: block;
  font-size: 8px;
  margin-top: 5px;
  font-weight: 400;
}
.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 1px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.article-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.article-toolbar > span > .icon {
  width: 14px;
  height: 14px;
}
.article-reading {
  scroll-margin-top: 210px;
  padding-bottom: 20px;
}
.biography-prose {
  font-size: 18px;
  line-height: 2.3;
  color: var(--ink);
}
.biography-prose > p {
  margin-bottom: 24px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.biography-prose h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.9;
  margin: 35px 0 14px;
}
.biography-prose > h2:first-child {
  margin-top: 0;
}
.biography-prose strong {
  font-weight: 600;
}
.biography-prose sup {
  font-size: 10px;
  color: var(--gold);
  padding-inline: 2px;
}
.biography-prose ul {
  list-style: disc;
  padding-inline-start: 25px;
  margin-bottom: 20px;
}
.article-size-1 .biography-prose {
  font-size: 21px;
}
.article-size-2 .biography-prose {
  font-size: 24px;
}
.epithet-callout {
  background: var(--soft);
  padding: 22px 25px;
  border-right: 3px solid var(--gold);
  border-radius: 5px;
  margin: 25px 0;
}
.epithet-callout h2 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
}
.epithet-callout p {
  font-size: 14px;
  line-height: 2.1;
  color: var(--muted);
}
.article-sidebar {
  position: sticky;
  top: 110px;
}
.facts-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 22px;
}
.facts-card h2 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}
.facts-card > div {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.facts-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
}
.facts-card p {
  font-size: 12px;
  line-height: 2;
}
.facts-card > .fact-encouragement {
  font-size: 12px;
  line-height: 2.2;
  color: var(--muted);
  padding-top: 20px;
}
.facts-card > a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--gold);
  margin-top: 20px;
}
.facts-card > a .icon {
  width: 14px;
  height: 14px;
}
.reading-index {
  margin: 22px 10px;
  font-size: 11px;
}
.reading-index strong {
  color: var(--gold);
  display: block;
  font-weight: 500;
  margin-bottom: 15px;
}
.reading-index a {
  display: block;
  padding: 9px 0;
  color: var(--muted);
}
.article-milestones,
.article-miracles,
.scripture-section {
  border-top: 1px solid var(--line);
  margin: 30px 0;
  padding-top: 25px;
  scroll-margin-top: 210px;
}
.article-milestones > h2,
.article-miracles > h2,
.scripture-section > h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 22px;
  color: var(--green);
}
.article-milestones > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.article-milestones > div > span {
  color: var(--gold);
  font-size: 12px;
  line-height: 2;
}
.article-milestones h3 {
  font-size: 15px;
  line-height: 1.9;
  font-weight: 500;
}
.article-milestones p {
  color: var(--muted);
  font-size: 13px;
  line-height: 2.1;
  margin-top: 8px;
}
.article-miracles details {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 17px;
  margin-bottom: 10px;
}
.article-miracles summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.9;
}
.article-miracles .biography-prose {
  font-size: 14px;
  margin-top: 15px;
}
.scripture-section blockquote {
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 15px;
}
.scripture-section blockquote p {
  font-size: 20px;
  line-height: 2.2;
}
.scripture-section cite {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
  line-height: 2;
  margin-top: 15px;
}
.scripture-section small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 2.2;
  margin-top: 15px;
}
.finish-reading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px;
  background: var(--soft);
  border-radius: 8px;
  margin: 30px 0;
}
.finish-reading > .icon {
  width: 25px;
  height: 25px;
  color: var(--gold);
}
.finish-reading > div {
  flex: 1;
}
.finish-reading h2 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
}
.finish-reading p {
  color: var(--muted);
  font-size: 10px;
  line-height: 2;
  margin-top: 6px;
}
.finish-reading small {
  color: var(--green);
}
.finish-reading button {
  padding-inline: 14px;
  font-size: 10px;
  white-space: nowrap;
}
.article-sources {
  padding-top: 25px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  scroll-margin-top: 210px;
}
.article-sources h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 23px;
}
.article-sources ol {
  list-style: none;
}
.article-sources li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 210px;
}
.source-index {
  color: var(--gold);
  font-size: 12px;
  min-width: 18px;
  padding-top: 3px;
}
.article-sources li > div {
  flex: 1;
  min-width: 0;
}
.article-sources h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.9;
}
.article-sources p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 3px;
}
.article-sources small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
  margin-top: 5px;
  display: block;
}
.source-status {
  background: var(--soft);
  color: var(--green);
  padding: 4px 7px;
  border-radius: 3px;
  font-size: 9px;
  max-width: 90px;
  line-height: 1.8;
}
.participants {
  margin: 20px 0 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.participants h2 {
  font-size: 18px;
  width: 100%;
  margin-bottom: 10px;
}
.participants a {
  background: var(--soft);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 4px;
}
.site-footer {
  background: var(--sidebar);
  border-top: 1px solid var(--line);
}
.footer-content {
  max-width: 1324px;
  margin: auto;
  padding: 45px 42px 35px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 45px;
}
.footer-brand > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2.3;
  margin-top: 20px;
}
.footer-motto {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  margin-top: 24px;
}
.footer-motto .icon {
  width: 14px;
  height: 14px;
}
.footer-column h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 5px 0 20px;
  color: var(--ink);
}
.footer-column > a {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 13px;
  line-height: 1.8;
}
.footer-column > a .icon {
  width: 12px;
  height: 12px;
}
.footer-column > a:hover {
  color: var(--gold);
}
.footer-column > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 2;
  margin-bottom: 18px;
}
.footer-column > .store-link {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 14px;
  min-width: 160px;
  background: var(--surface);
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
}
.store-link small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-bottom: 2px;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  padding: 22px 0;
  margin: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.footer-bottom > div {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-bottom .icon {
  width: 11px;
  height: 11px;
}
.dark-theme .resume-hero,
.dark-theme .narration-player {
  background: var(--surface);
  border: 1px solid var(--line);
}
.dark-theme .resume-copy > p,
.dark-theme .resume-proof,
.dark-theme .continue-description,
.dark-theme .continue-identity > div:last-child > span,
.dark-theme .continue-progress,
.dark-theme .continue-encouragement,
.dark-theme .continue-category {
  color: var(--muted);
}
.dark-theme .continue-card {
  background: var(--soft);
}
.dark-theme .prominent-stats strong {
  color: var(--ink);
}
.dark-theme .playback-speed select {
  background: var(--soft);
}
.dark-theme .narration-title p,
.dark-theme .narration-title small,
.dark-theme .playback-speed,
.dark-theme .audio-seek,
.dark-theme .audio-empty {
  color: var(--muted);
}
.dark-theme .narration-transport > .audio-play {
  border-color: var(--soft);
}
@media (max-width: 1100px) {
  .resume-hero {
    gap: 30px;
    padding: 30px;
  }
  .resume-copy h1 {
    font-size: 30px;
  }
  .continue-card {
    padding-inline: 20px;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 25px;
  }
  .knowledge-card {
    padding: 22px;
  }
  .knowledge-card h2 {
    font-size: 18px;
  }
  .footer-content {
    padding-inline: 30px;
    gap: 28px;
  }
  .footer-bottom {
    margin-inline: 30px;
  }
}
@media (max-width: 980px) {
  .knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .reading-levels {
    top: 148px;
  }
  .figure-page-heading h1 {
    font-size: 31px;
  }
  .resume-hero {
    gap: 25px;
    padding: 28px;
  }
  .resume-copy h1 {
    font-size: 28px;
  }
  .resume-copy > p {
    font-size: 12px;
  }
  .continue-identity {
    gap: 12px;
  }
  .continue-identity h2 {
    font-size: 21px;
  }
  .continue-monogram {
    width: 56px;
    height: 65px;
    font-size: 16px;
  }
  .continue-category {
    display: none;
  }
  .prominent-stats strong {
    font-size: 31px;
  }
  .prominent-stats > div {
    padding-inline: 12px;
    gap: 13px;
  }
  .timeline-options {
    gap: 15px;
  }
  .timeline-option {
    padding: 19px;
  }
  .timeline-option-art {
    margin: -19px -19px 20px;
  }
  .timeline-option h2 {
    font-size: 18px;
  }
  .timeline-option p {
    font-size: 11px;
  }
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand > p {
    max-width: 480px;
  }
}
@media (max-width: 760px) {
  .resume-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 30px;
  }
  .resume-copy h1 {
    font-size: 34px;
  }
  .resume-copy > p {
    max-width: none;
  }
  .resume-proof {
    margin-top: 17px;
  }
  .resume-library {
    margin-top: 18px;
  }
  .continue-card {
    padding: 22px 25px;
  }
  .continue-category {
    display: block;
  }
  .continue-identity h2 {
    font-size: 26px;
  }
  .continue-monogram {
    width: 68px;
    height: 76px;
    font-size: 19px;
  }
  .prominent-stats {
    gap: 10px;
  }
  .prominent-stats > div {
    flex-direction: column;
    text-align: center;
    gap: 13px;
    padding: 20px 10px;
  }
  .prominent-stats div > div > span {
    font-size: 10px;
    line-height: 1.9;
  }
  .stat-symbol {
    width: 35px;
    height: 35px;
  }
  .stat-symbol .icon {
    width: 19px;
    height: 19px;
  }
  .timeline-options {
    grid-template-columns: 1fr;
  }
  .timeline-option {
    padding: 25px;
  }
  .timeline-option-art {
    height: 150px;
    margin: -25px -25px 20px;
  }
  .timeline-option h2 {
    font-size: 23px;
  }
  .timeline-option p {
    font-size: 13px;
  }
  .figure-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .figure-page-heading h1 {
    font-size: 29px;
  }
  .figure-page-heading p {
    font-size: 12px;
  }
  .narration-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 25px 0;
  }
  .narration-title h2 {
    font-size: 25px;
  }
  .narration-transport {
    align-self: center;
    gap: 30px;
  }
  .narration-player {
    padding: 23px;
  }
  .playback-speed > span {
    display: none;
  }
  .finish-reading {
    flex-wrap: wrap;
  }
  .finish-reading button {
    margin-inline-start: 40px;
  }
  .footer-content {
    padding: 35px 25px;
    gap: 25px;
  }
  .footer-bottom {
    margin-inline: 25px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
@media (max-width: 540px) {
  .main-content {
    padding-bottom: 35px;
  }
  .resume-hero {
    padding: 23px;
    gap: 25px;
  }
  .resume-copy h1 {
    font-size: 27px;
    line-height: 1.9;
  }
  .resume-copy .hero-eyebrow {
    font-size: 9px;
  }
  .resume-copy > p {
    font-size: 12px;
  }
  .resume-proof {
    font-size: 8px;
    gap: 5px;
  }
  .resume-proof .icon {
    width: 11px;
    height: 11px;
  }
  .resume-proof > span {
    display: none;
  }
  .continue-card {
    padding: 18px;
  }
  .continue-identity h2 {
    font-size: 22px;
  }
  .continue-monogram {
    width: 52px;
    height: 62px;
    font-size: 16px;
  }
  .continue-identity small {
    font-size: 8px;
  }
  .continue-description {
    font-size: 10px;
  }
  .continue-top {
    font-size: 10px;
  }
  .continue-category {
    font-size: 8px;
  }
  .continue-progress {
    font-size: 8px;
  }
  .continue-button {
    font-size: 11px;
    gap: 12px;
    padding-inline: 12px;
  }
  .prominent-stats {
    gap: 7px;
    margin-top: 15px;
  }
  .prominent-stats > div {
    padding: 16px 6px;
    gap: 10px;
  }
  .prominent-stats strong {
    font-size: 28px;
  }
  .prominent-stats div > div > span {
    font-size: 9px;
    margin-top: 5px;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .knowledge-card {
    min-height: 265px;
    padding: 24px;
  }
  .knowledge-card h2 {
    font-size: 21px;
  }
  .path-intro h1,
  .page-intro h1 {
    font-size: 28px;
  }
  .page-intro p {
    font-size: 12px;
  }
  .path-progress-panel {
    padding: 20px;
    gap: 18px;
  }
  .path-progress-panel strong {
    font-size: 12px;
    line-height: 2;
  }
  .progress-ring {
    width: 55px;
    height: 55px;
    font-size: 20px;
  }
  .path-complete {
    font-size: 10px;
    padding-inline: 6px;
  }
  .path-certificate {
    flex-wrap: wrap;
  }
  .historical-timeline {
    padding-right: 24px;
    margin-top: 25px;
  }
  .historical-dot {
    right: -30px;
  }
  .historical-card {
    padding: 20px;
  }
  .historical-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .historical-card h2,
  .historical-card h3 {
    font-size: 20px;
    margin-top: 10px;
  }
  .historical-card .historical-title {
    font-size: 11px;
  }
  .historical-card details p {
    font-size: 12px;
  }
  .century-heading {
    font-size: 16px;
  }
  .expedition-filters button {
    font-size: 11px;
    padding-inline: 13px;
  }
  .page-crumbs {
    font-size: 10px;
    gap: 7px;
  }
  .figure-page-heading h1 {
    font-size: 27px;
  }
  .reader-save {
    font-size: 11px;
  }
  .narration-player {
    padding: 20px;
    margin-bottom: 25px;
  }
  .narration-title h2 {
    font-size: 24px;
  }
  .audio-eyebrow {
    font-size: 10px;
    gap: 5px;
  }
  .audio-eyebrow .icon {
    width: 14px;
    height: 14px;
  }
  .audio-level {
    font-size: 8px;
    padding-inline: 6px;
    margin-right: 2px;
  }
  .narration-title p {
    font-size: 10px;
  }
  .narration-transport > .audio-play {
    width: 62px;
    height: 62px;
  }
  .audio-seek {
    gap: 10px;
    font-size: 9px;
  }
  .reading-levels {
    top: 145px;
    gap: 0;
  }
  .reading-levels button {
    gap: 6px;
    padding: 12px 5px;
  }
  .reading-levels .icon {
    width: 16px;
    height: 16px;
  }
  .reading-levels strong {
    font-size: 14px;
  }
  .reading-levels small {
    font-size: 7px;
  }
  .article-toolbar > span {
    font-size: 9px;
    gap: 5px;
  }
  .article-toolbar .icon {
    display: none;
  }
  .biography-prose {
    font-size: 17px;
    line-height: 2.3;
  }
  .biography-prose h2 {
    font-size: 20px;
  }
  .article-size-1 .biography-prose {
    font-size: 19px;
  }
  .article-size-2 .biography-prose {
    font-size: 21px;
  }
  .article-milestones > div {
    grid-template-columns: 65px 1fr;
    gap: 14px;
  }
  .article-milestones > div > span {
    font-size: 10px;
  }
  .article-milestones h3 {
    font-size: 14px;
  }
  .article-milestones p {
    font-size: 12px;
  }
  .article-milestones > h2,
  .article-miracles > h2,
  .scripture-section > h2 {
    font-size: 20px;
  }
  .scripture-section blockquote p {
    font-size: 18px;
  }
  .source-status {
    max-width: 65px;
    font-size: 8px;
  }
  .article-sources h3 {
    font-size: 13px;
  }
  .article-sources p {
    font-size: 11px;
  }
  .article-sources small {
    font-size: 9px;
  }
  .article-sources h2 {
    font-size: 21px;
  }
  .finish-reading {
    padding: 20px;
    gap: 12px;
  }
  .finish-reading h2 {
    font-size: 13px;
  }
  .finish-reading p {
    font-size: 10px;
  }
  .article-sidebar {
    display: block;
  }
  .reading-index {
    display: none;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
    padding: 30px 20px;
    gap: 30px 15px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-content > .footer-column:last-child {
    grid-column: 1 / -1;
  }
  .footer-column > .store-link {
    display: inline-flex;
    margin-left: 10px;
    min-width: 140px;
    font-size: 13px;
  }
  .footer-column h2 {
    font-size: 12px;
  }
  .footer-column > a {
    font-size: 11px;
  }
  .footer-bottom {
    margin-inline: 20px;
    font-size: 9px;
  }
  .footer-bottom > div {
    gap: 20px;
  }
}
.app {
  --motion-fast: 160ms;
  --motion-base: 280ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  transition: background-color var(--motion-base) ease,
    color var(--motion-base) ease;
}
.site-header,
.site-footer,
.facts-card,
.reading-levels,
.narration-player,
.continue-card {
  transition: background-color var(--motion-base) ease,
    border-color var(--motion-base) ease;
}
.brand-icon {
  transition: transform var(--motion-base) var(--motion-ease);
}
.app button:not(:disabled):active,
.app .button:active {
  transform: scale(0.97);
}
.app button:disabled {
  cursor: not-allowed;
}
.icon-button,
.theme-toggle,
.save-button,
.path-complete,
.button {
  transition: transform var(--motion-fast) var(--motion-ease),
    background-color var(--motion-base) ease,
    border-color var(--motion-base) ease,
    color var(--motion-base) ease,
    box-shadow var(--motion-base) ease;
}
.figure-card,
.knowledge-card,
.timeline-option,
.category-tile {
  transition: transform var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) ease,
    background-color var(--motion-base) ease;
}
.search-field {
  border-radius: 6px;
  transition: box-shadow var(--motion-base) ease,
    color var(--motion-base) ease;
}
.search-field:focus-within {
  color: var(--green);
  box-shadow: 0 0 0 3px var(--gold);
  @supports (color: color-mix(in lab, red, red)) {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 16%, transparent);
  }
}
.desktop-nav .nav-item::after {
  content: '';
  position: absolute;
  inset-inline: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  opacity: 0;
  transition: transform var(--motion-base) var(--motion-ease),
    opacity var(--motion-base) ease;
}
.desktop-nav .nav-item.active::after {
  transform: scaleX(1);
  opacity: 1;
}
.text-link .icon,
.knowledge-link .icon,
.continue-button > .icon,
.resume-library > .icon,
.card-footer a > .icon,
.category-icon > .icon {
  transition: transform var(--motion-base) var(--motion-ease);
}
.save-button[aria-pressed='true'] > .icon,
.reader-save[aria-pressed='true'] > .icon,
.path-complete[aria-pressed='true'] > .icon {
  animation: saved-mark 340ms var(--motion-ease);
}
.theme-toggle > .icon {
  animation: theme-glyph-in 300ms var(--motion-ease);
}
.reading-level-indicator {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 5px;
  background: var(--soft);
  transform: translateX(var(--level-offset, -100%));
  transition: transform 320ms var(--motion-ease),
    background-color var(--motion-base) ease;
  pointer-events: none;
}
.reading-levels[data-level='intro'] {
  --level-offset: 0%;
}
.reading-levels[data-level='read'] {
  --level-offset: -100%;
}
.reading-levels[data-level='deep'] {
  --level-offset: -200%;
}
.reading-levels button > .icon {
  transition: transform var(--motion-base) var(--motion-ease),
    color var(--motion-base) ease;
}
.reading-levels button.active > .icon {
  transform: translateY(-1px);
}
.reading-level-content {
  animation: reading-copy-in 220ms ease-out;
}
.audio-equalizer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 16px;
  margin-inline: 3px;
  opacity: 0.45;
  transition: opacity var(--motion-base) ease;
}
.audio-equalizer i {
  display: block;
  width: 2px;
  height: 13px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleY(0.3);
  animation: sound-meter 650ms ease-in-out infinite alternate;
  animation-play-state: paused;
}
.audio-equalizer i:nth-child(2) {
  animation-delay: -220ms;
}
.audio-equalizer i:nth-child(3) {
  animation-delay: -430ms;
}
.audio-equalizer i:nth-child(4) {
  animation-delay: -120ms;
}
.is-playing .audio-equalizer {
  opacity: 1;
}
.is-playing .audio-equalizer i {
  animation-play-state: running;
}
.is-playing .audio-play {
  box-shadow: 0 0 0 6px #d7c28e12;
}
progress::-webkit-progress-value {
  transition: width 450ms var(--motion-ease);
}
@media (hover: hover) and (pointer: fine) {
  .brand-button:hover .brand-icon {
    transform: translateY(-1px);
  }
  .desktop-nav .nav-item:not(.active):hover::after {
    transform: scaleX(0.45);
    opacity: 0.55;
  }
  .figure-card:hover,
  .figure-card:focus-within,
  .knowledge-card:hover,
  .knowledge-card:focus-visible,
  .timeline-option:hover,
  .timeline-option:focus-visible {
    transform: translateY(-5px);
    border-color: var(--gold);
    @supports (color: color-mix(in lab, red, red)) {
      border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
    }
    box-shadow: 0 10px 26px #0000000c;
  }
  .category-tile:hover > .category-icon > .icon {
    transform: translateY(-2px) scale(1.06);
  }
  .text-link:hover .icon,
  .knowledge-card:hover .knowledge-link .icon,
  .timeline-option:hover .knowledge-link .icon,
  .continue-button:hover > .icon,
  .resume-library:hover > .icon,
  .card-footer a:hover > .icon {
    transform: translateX(-3px);
  }
  .audio-play:hover:not(:disabled) {
    transform: scale(1.035);
  }
}
@keyframes saved-mark {
  0% {
    transform: scale(0.8);
  }
  45% {
    transform: scale(1.17);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes theme-glyph-in {
  from {
    opacity: 0.35;
    transform: rotate(-35deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}
@keyframes reading-copy-in {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}
@keyframes sound-meter {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.explore-hub {
  padding: 12px 0 20px;
}
.explore-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 11px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}
.explore-entry .icon {
  width: 15px;
  height: 15px;
}
.daily-streak-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 11px;
}
.daily-streak-values strong {
  display: block;
  color: var(--gold);
  font-size: 28px;
  margin-bottom: 5px;
}
.explore-teaser {
  margin-top: 38px;
}
.explore-support {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 25px 30px;
  border-radius: 9px;
  background: #173e34;
  color: #f3efdf;
  text-align: start;
  border: 1px solid transparent;
}
.explore-support > :not(.card-art-pattern) {
  position: relative;
  z-index: 1;
}
.support-heart {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #d7c28e;
  background: #d7c28e12;
}
.support-heart .icon {
  width: 25px;
  height: 25px;
}
.explore-support > span:nth-last-child(2) {
  flex: 1;
}
.explore-support strong {
  display: block;
  font-size: 19px;
  font-weight: 500;
}
.explore-support small {
  display: block;
  color: #c3cfc0;
  font-size: 12px;
  line-height: 1.9;
  margin-top: 7px;
}
.explore-support > .icon {
  color: #d7c28e;
  width: 20px;
  height: 20px;
}
.dark-theme .explore-support {
  background: var(--surface);
  border-color: var(--line);
}
.dark-theme .explore-support small {
  color: var(--muted);
}
.explore-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 34px 0 18px;
}
.explore-section-label h3 {
  font-size: 22px;
  font-weight: 500;
}
.explore-preview-badge {
  color: var(--muted);
  font-size: 10px;
}
.explore-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.explore-tool-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  min-height: 155px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 25px 23px 45px;
  text-align: start;
  transition: border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}
.tool-glyph {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: var(--gold);
  background: var(--soft);
  border-radius: 50%;
}
.tool-glyph .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.5;
}
.tool-copy {
  flex: 1;
  min-width: 0;
}
.tool-copy strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 500;
}
.tool-copy small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  margin-top: 7px;
}
.explore-tool-card > .icon {
  position: absolute;
  inset-inline-end: 24px;
  bottom: 19px;
  width: 16px;
  height: 16px;
  color: var(--green);
}
.explore-tool-heading {
  padding: 5px 0 20px;
}
.explore-tool-heading > .text-link {
  display: flex;
  width: fit-content;
  margin-bottom: 25px;
}
.explore-tool-heading > .tool-glyph {
  margin-bottom: 13px;
}
.explore-tool-heading h2 {
  font-size: 29px;
  font-weight: 600;
  line-height: 1.7;
}
.explore-tool-heading > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
  margin-top: 8px;
}
.explore-demo {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 25px;
  font-size: 10px;
  line-height: 1.8;
}
.explore-demo .icon {
  width: 13px;
  height: 13px;
  color: var(--gold);
}
.explore-coming-soon {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--gold);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  }
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.coming-soon-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--gold);
}
.coming-soon-icon .icon {
  width: 18px;
  height: 18px;
}
.coming-soon-copy {
  flex: 1;
  min-width: 0;
}
.coming-soon-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.6;
}
.coming-soon-copy p {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.coming-soon-pill {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--soft);
  border: 1px solid var(--gold);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line));
  }
  color: var(--gold);
  font-size: 10px;
  font-weight: 500;
}
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}
.tool-panel > h3 {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.7;
}
.tool-panel > p {
  font-size: 13px;
  line-height: 2.1;
  color: var(--muted);
  margin: 14px 0 20px;
}
.tool-panel > .icon {
  width: 42px;
  height: 42px;
  color: var(--gold);
  margin-bottom: 20px;
}
.tool-empty {
  padding: 70px 20px;
  text-align: center;
}
.tool-empty > .icon {
  width: 46px;
  height: 46px;
  color: var(--gold);
  margin-bottom: 23px;
}
.tool-empty h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.8;
}
.tool-empty p {
  color: var(--muted);
  font-size: 13px;
  line-height: 2.1;
  max-width: 480px;
  margin: 13px auto 25px;
}
.explore-map-filters {
  margin-bottom: 20px;
}
.explore-map {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: var(--soft);
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--green);
}
.explore-map svg {
  display: block;
  width: 100%;
  min-height: 420px;
}
.explore-map .map-land {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 2;
}
.explore-map .map-water {
  fill: var(--soft);
}
.explore-map circle {
  fill: var(--green);
}
.explore-map .map-dot {
  fill: var(--surface);
}
.explore-map text {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--ink);
}
.map-preview-label {
  position: absolute;
  bottom: 15px;
  inset-inline: 15px;
  width: fit-content;
  margin-inline: auto;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.compare-picker {
  border: 1px dashed var(--gold);
  background: var(--surface);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
}
.compare-picker > .icon {
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin-bottom: 20px;
}
.compare-picker label {
  display: block;
  font-size: 14px;
  margin-bottom: 14px;
}
.compare-picker select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 10px;
  border-radius: 5px;
  font-size: 12px;
}
.compare-picker {
  min-width: 0;
}
.comparison-table {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.comparison-table > div {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.comparison-table > div:last-child {
  border: 0;
}
.comparison-table strong,
.comparison-table p {
  padding: 17px;
  font-size: 12px;
  line-height: 2;
  font-weight: 400;
}
.comparison-table strong {
  color: var(--gold);
  background: var(--soft);
}
.quiz-panel,
.support-panel {
  max-width: 730px;
  margin-inline: auto;
  text-align: center;
}
.quiz-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--soft);
  padding: 4px;
  border-radius: 7px;
  margin: 26px 0 14px;
}
.quiz-segments button {
  padding: 11px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 12px;
}
.quiz-segments button.selected {
  background: var(--surface);
  color: var(--green);
}
.quiz-panel > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 25px;
}
.quiz-panel > .button {
  width: 100%;
  max-width: 400px;
}
.quiz-panel > .text-link {
  margin-inline: auto;
}
.quiz-example {
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
  margin-bottom: 20px;
}
.quiz-answer {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 15px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: start;
}
.support-panel button:disabled {
  opacity: 0.6;
}
.daily-streak {
  text-align: center;
}
.daily-label {
  color: var(--gold);
  font-size: 11px;
}
.daily-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 22px 0;
}
.daily-stats > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 24px 10px;
}
.daily-stats .icon {
  width: 21px;
  height: 21px;
  color: var(--gold);
}
.daily-stats strong {
  font-size: 29px;
  font-weight: 600;
}
.daily-stats small {
  font-size: 11px;
  color: var(--muted);
}
.daily-figure {
  margin-bottom: 20px;
}
.daily-quiz-link {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--green);
  font-size: 13px;
}
.daily-quiz-link > .icon:last-child {
  margin-inline-start: auto;
}
.smart-search-field {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  margin-bottom: 22px;
}
.search-field > .icon,
.smart-search-field > .icon {
  order: 2;
}
.smart-search-field > .icon {
  width: 21px;
  height: 21px;
  color: var(--green);
}
.search-field input,
.smart-search-field input {
  order: 1;
  text-align: start;
}
.smart-search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
}
.search-field kbd,
.smart-search-field button {
  order: 3;
}
.smart-search-field button {
  color: var(--gold);
}
.search-examples {
  max-width: 850px;
}
.search-examples h3 {
  font-size: 20px;
  margin-bottom: 20px;
}
.search-examples > button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  width: 100%;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  text-align: start;
}
.search-examples > button:last-child {
  border: 0;
}
.search-examples > button > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-examples > button > .icon:last-child {
  margin-inline-start: auto;
}
.timeline-links {
  margin-top: 38px;
}
.timeline-links > .section-heading > .icon {
  color: var(--gold);
}
.timeline-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.timeline-links-grid > a,
.timeline-links-grid > button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: start;
  transition: border-color 0.2s,
    transform 0.2s;
}
.timeline-links-grid > a > .icon,
.timeline-links-grid > button > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}
.timeline-links-grid .tool-copy strong {
  font-size: 15px;
}
.timeline-links-grid .tool-copy small {
  font-size: 10px;
}
.phone-timeline {
  padding-top: 12px;
}
.phone-timeline > h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.8;
  margin: 25px 0;
}
.phone-timeline-list {
  display: grid;
  gap: 13px;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 15px;
}
.phone-timeline-list > button,
.phone-timeline-list > details {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 18px;
  text-align: start;
}
.phone-timeline-list strong {
  display: block;
  font-size: 16px;
  line-height: 1.9;
  font-weight: 500;
}
.phone-timeline-list span,
.phone-timeline-list small {
  display: block;
  font-size: 10px;
  line-height: 1.9;
  color: var(--gold);
}
.phone-timeline-list > button > .icon {
  width: 14px;
  height: 14px;
  color: var(--green);
  margin-top: 10px;
}
.phone-timeline-list summary {
  cursor: pointer;
}
.phone-timeline-list p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
  margin-top: 15px;
}
.phone-timeline-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 10px;
  margin-top: 15px;
}
.phone-timeline-list a .icon {
  width: 12px;
  height: 12px;
}
.explore-mobile-entry {
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 6px;
  padding-top: 16px;
}
.explore-compact {
  --ink: var(--ios-text);
  --muted: var(--ios-muted);
  --green: var(--ios-accent);
  --gold: var(--ios-gold);
  --surface: var(--ios-card);
  --line: var(--ios-line);
  padding-top: 0;
}
.explore-compact .explore-support {
  padding: 18px 16px;
  gap: 12px;
}
.explore-compact .explore-support strong {
  font-size: 15px;
}
.explore-compact .explore-support small {
  font-size: 10px;
}
.explore-compact .support-heart {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
}
.explore-compact .support-heart .icon {
  width: 20px;
  height: 20px;
}
.explore-compact .explore-support > .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.explore-compact .explore-section-label {
  margin: 26px 0 15px;
}
.explore-compact .explore-section-label h3 {
  font-size: 16px;
}
.explore-compact .explore-preview-badge {
  font-size: 8px;
}
.explore-compact .explore-tools-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}
.explore-compact .explore-tool-card {
  align-items: center;
  gap: 12px;
  padding: 17px 15px;
  min-height: 85px;
}
.explore-compact .tool-glyph {
  width: 35px;
  height: 35px;
}
.explore-compact .tool-glyph .icon {
  width: 20px;
  height: 20px;
}
.explore-compact .tool-copy strong {
  font-size: 13px;
}
.explore-compact .tool-copy small {
  font-size: 10px;
  margin-top: 5px;
}
.explore-compact .explore-tool-card > .icon {
  position: static;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.explore-compact .explore-tool-heading h2 {
  font-size: 24px;
}
.explore-compact .explore-tool-heading > p {
  font-size: 11px;
}
.explore-compact .explore-demo {
  font-size: 9px;
}
.explore-compact .tool-panel {
  padding: 22px 18px;
}
.explore-compact .tool-panel > h3 {
  font-size: 21px;
}
.explore-compact .tool-panel > p {
  font-size: 11px;
}
.explore-compact .tool-empty {
  padding: 45px 5px;
}
.explore-compact .tool-empty h3 {
  font-size: 20px;
}
.explore-compact .tool-empty p {
  font-size: 12px;
}
.explore-compact .compare-grid {
  gap: 12px;
}
.explore-compact .compare-picker {
  padding: 23px 9px;
}
.explore-compact .compare-picker label {
  font-size: 11px;
}
.explore-compact .compare-picker select {
  font-size: 10px;
  padding: 7px 4px;
}
.explore-compact .comparison-table > div {
  grid-template-columns: 1fr 1fr;
}
.explore-compact .comparison-table strong {
  grid-column: 1 / -1;
}
.explore-compact .comparison-table strong,
.explore-compact .comparison-table p {
  padding: 11px;
  font-size: 11px;
}
.explore-compact .smart-search-field {
  padding: 14px 12px;
  gap: 8px;
}
.explore-compact .smart-search-field input {
  font-size: 11px;
}
.explore-compact .search-examples > button {
  font-size: 12px;
  gap: 7px;
}
.explore-compact .search-examples > button > .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.explore-compact .daily-stats {
  gap: 9px;
}
.explore-compact .daily-stats > div {
  padding: 18px 5px;
}
.explore-compact .daily-stats small {
  font-size: 9px;
}
.explore-compact .explore-map-filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
}
.explore-compact .explore-map-filters button {
  white-space: nowrap;
}
.explore-compact .explore-map text {
  font-size: 25px;
}
.explore-compact .explore-map g > circle:not(.map-dot) {
  r: 18px;
}
.timeline-links-compact > .section-heading h2 {
  font-size: 18px;
  font-weight: 600;
}
.timeline-links-compact .section-kicker {
  font-size: 9px;
}
.timeline-links-compact .timeline-links-grid {
  grid-template-columns: 1fr;
  gap: 13px;
}
.timeline-links-compact .timeline-links-grid > button {
  padding: 17px 15px;
  gap: 12px;
}
.timeline-links-compact .tool-glyph {
  width: 37px;
  height: 37px;
}
.timeline-links-compact .tool-glyph .icon {
  width: 20px;
  height: 20px;
}
.timeline-links-compact .tool-copy strong {
  font-size: 13px;
}
.timeline-links-compact .tool-copy small {
  font-size: 10px;
}
@media (hover: hover) {
  .explore-tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 8px 22px #00000008;
  }
  .timeline-links-grid > a:hover,
  .timeline-links-grid > button:hover {
    border-color: var(--gold);
  }
}
@media (max-width: 1180px) {
  .explore-entry {
    display: none;
  }
}
@media (max-width: 980px) {
  .explore-tools-grid,
  .timeline-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .explore-tools-grid,
  .timeline-links-grid {
    grid-template-columns: 1fr;
  }
  .explore-tool-card {
    min-height: 115px;
    padding: 20px 18px 35px;
  }
  .explore-support {
    padding: 22px 18px;
    gap: 13px;
  }
  .explore-support strong {
    font-size: 17px;
  }
  .explore-support small {
    font-size: 11px;
  }
  .support-heart {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
  }
  .explore-support > .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  .explore-section-label h3 {
    font-size: 20px;
  }
  .explore-tool-heading h2 {
    font-size: 26px;
  }
  .tool-panel {
    padding: 25px 20px;
  }
  .compare-picker {
    padding: 25px 10px;
  }
  .compare-picker select {
    font-size: 11px;
  }
  .comparison-table > div {
    grid-template-columns: 1fr 1fr;
  }
  .comparison-table strong {
    grid-column: 1 / -1;
  }
  .search-examples > button {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .explore-hub *,
  .timeline-links * {
    transition-duration: 0.01ms !important;
  }
}
.map-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}
.map-stats-bar > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.map-stats-bar .icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.map-layout.has-drawer {
  grid-template-columns: minmax(0, 1fr) 330px;
}
.heritage-leaflet-wrap {
  min-height: 500px;
  height: 500px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--soft);
  position: relative;
}
.heritage-leaflet-canvas {
  width: 100%;
  height: 100%;
  z-index: 1;
}
.heritage-leaflet-wrap:not(.is-dark) .leaflet-tile-pane {
  filter: sepia(0.22) saturate(0.75) hue-rotate(-6deg) brightness(1.01);
}
.heritage-leaflet-wrap.is-dark .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.88) contrast(0.92) saturate(0.65);
}
.heritage-leaflet-wrap .leaflet-container img {
  max-width: none !important;
}
.heritage-leaflet-wrap .leaflet-overlay-pane svg {
  width: auto;
  min-height: 0;
  max-width: none;
}
.heritage-leaflet-wrap .leaflet-attribution-flag,
.heritage-leaflet-wrap .leaflet-control-attribution svg {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.heritage-map-pin-wrap {
  background: transparent;
  border: 0;
}
.heritage-map-pin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fffdf5;
  border: 2.5px solid var(--gold);
  box-shadow: 0 6px 16px #173e3438;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.dark-theme .heritage-map-pin {
  color: #121212;
}
.heritage-map-pin:hover,
.heritage-map-pin.active {
  transform: scale(1.14);
  background: var(--gold);
  color: #173e34;
  border-color: var(--surface);
}
.heritage-map-tooltip {
  font-family: var(--font-sans);
  font-size: 11px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 9px;
  box-shadow: 0 6px 18px #00000018;
}
.map-drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
}
.map-drawer-head h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}
.map-drawer-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-drawer-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  transition: border-color 0.2s, transform 0.2s;
}
.map-drawer-item:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.map-item-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
}
.map-item-icon .icon {
  width: 15px;
  height: 15px;
}
.map-item-copy {
  flex: 1;
  min-width: 0;
}
.map-item-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-item-copy small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-drawer-item > .icon {
  width: 13px;
  height: 13px;
  color: var(--green);
}
.map-fallback-list {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}
.map-place-chip span {
  color: var(--gold);
  font-weight: 600;
}
.featured-comparisons {
  margin-bottom: 20px;
}
.featured-comparisons .filter-chips {
  margin-top: 8px;
}
.comparison-header-row {
  background: var(--sidebar) !important;
}
.comparison-figure-link {
  padding: 15px 17px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}
.comparison-figure-link:hover {
  color: var(--gold);
}
.comparison-highlight-row strong {
  color: var(--green);
}
.quiz-live {
  text-align: start;
}
.quiz-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.quiz-progress-meta strong {
  color: var(--gold);
}
.quiz-prompt {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.8;
  margin: 22px 0 18px;
  color: var(--ink);
}
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  text-align: start;
}
.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--soft);
}
.quiz-option-btn .quiz-opt-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 11px;
  flex-shrink: 0;
}
.quiz-option-btn > .icon {
  margin-inline-start: auto;
  width: 16px;
  height: 16px;
}
.quiz-option-btn.is-correct {
  border-color: var(--green);
  background: var(--soft);
  color: var(--green);
  font-weight: 600;
}
.quiz-option-btn.is-wrong {
  border-color: #c2514b;
  background: #c2514b;
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb, #c2514b 10%, var(--surface));
  }
  color: #c2514b;
}
.quiz-feedback {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.quiz-explanation {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.quiz-score-big {
  font-size: 40px;
  font-weight: 700;
  color: var(--gold);
  margin: 12px 0;
}
.quiz-summary-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.achievements-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  opacity: 0.6;
}
.achievement-badge.unlocked {
  opacity: 1;
  border-color: var(--gold);
  background: var(--soft);
  color: var(--green);
  font-weight: 600;
}
.achievement-badge .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
@media (max-width: 900px) {
  .map-layout.has-drawer {
    grid-template-columns: minmax(0, 1fr);
  }
  .heritage-leaflet-wrap {
    height: 380px;
    min-height: 380px;
  }
}
.footer-column > a[href$="/iphone"] {
  display: none;
}
@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}
@property --tw-blur {
  syntax: "*";
  inherits: false;
}
@property --tw-brightness {
  syntax: "*";
  inherits: false;
}
@property --tw-contrast {
  syntax: "*";
  inherits: false;
}
@property --tw-grayscale {
  syntax: "*";
  inherits: false;
}
@property --tw-hue-rotate {
  syntax: "*";
  inherits: false;
}
@property --tw-invert {
  syntax: "*";
  inherits: false;
}
@property --tw-opacity {
  syntax: "*";
  inherits: false;
}
@property --tw-saturate {
  syntax: "*";
  inherits: false;
}
@property --tw-sepia {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-color {
  syntax: "*";
  inherits: false;
}
@property --tw-drop-shadow-alpha {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
@property --tw-drop-shadow-size {
  syntax: "*";
  inherits: false;
}
@layer properties {
  @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
    *, ::before, ::after, ::backdrop {
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
      --tw-blur: initial;
      --tw-brightness: initial;
      --tw-contrast: initial;
      --tw-grayscale: initial;
      --tw-hue-rotate: initial;
      --tw-invert: initial;
      --tw-opacity: initial;
      --tw-saturate: initial;
      --tw-sepia: initial;
      --tw-drop-shadow: initial;
      --tw-drop-shadow-color: initial;
      --tw-drop-shadow-alpha: 100%;
      --tw-drop-shadow-size: initial;
    }
  }
}

/* === New Unified Features Styles === */
.reading-level-menu .language-trigger { gap: 6px; }
.reading-level-menu .language-trigger .icon { width: 14px; height: 14px; opacity: 0.85; }
.figure-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(148px, 1fr)); gap: 8px; flex-shrink: 0; align-items: stretch; }
.figure-heading-actions > button,
.figure-heading-actions > .if-share-menu,
.figure-heading-actions > .if-share-menu > button { width: 100%; justify-content: center; white-space: nowrap; }
@media (max-width: 760px) { .figure-heading-actions { width: 100%; } }
.suggest-correction-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; transition: border-color 0.2s ease, color 0.2s ease; }
.suggest-correction-btn:hover { border-color: var(--gold); color: var(--green); }
.suggest-correction-btn .icon { width: 15px; height: 15px; color: var(--gold); }
.if-modal-backdrop { position: fixed; inset: 0; background: rgba(18, 18, 18, 0.58); display: grid; place-items: center; z-index: 9999; padding: 16px; }
.if-modal-card { width: min(500px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.if-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.if-modal-head h3 { margin: 0; font-size: 18px; color: var(--green); }
.if-modal-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.if-modal-form { display: flex; flex-direction: column; gap: 12px; }
.if-modal-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink); }
.if-modal-form input, .if-modal-form select, .if-modal-form textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-family: inherit; font-size: 14px; }
.if-modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.if-modal-msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.if-modal-msg.is-ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.if-modal-msg.is-err { background: rgba(180, 35, 24, 0.12); color: #b42318; }
.if-feature-stack { display: flex; flex-direction: column; gap: 18px; }
.if-moments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 14px; margin-top: 14px; }
.if-moment-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; height: 100%; text-align: start; color: var(--ink); transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.if-moment-card-link { cursor: pointer; text-decoration: none; color: inherit; }
.if-moment-card-link:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); }
.if-moment-card-link:hover .if-moment-cta { color: var(--gold); }
.if-moment-card.is-done { border-color: var(--gold); }
.if-moment-title { font-size: 15px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.if-moment-card p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--muted); }
.if-moment-story { flex: 1; }
.if-moment-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.if-moment-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.if-moment-source { min-width: 0; flex: 1; font-size: 11px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.if-moment-cta { white-space: nowrap; flex-shrink: 0; padding-bottom: 0 !important; gap: 6px !important; font-size: 11px !important; font-weight: 600; }
.if-values-grid { margin-top: 16px; grid-auto-rows: 1fr; align-items: stretch; }
.if-value-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; cursor: pointer; }
.if-value-card-art { flex-shrink: 0; }
.if-value-art-wrap { padding: 30px 18px 14px; text-align: center; gap: 6px; }
.if-value-art-title,
.tone-prophet .if-value-art-title { font-size: 19px !important; line-height: 1.45 !important; white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; max-width: 92%; }
.if-value-art-sub { margin-top: 2px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 85%; }
.if-value-card-body { display: flex; flex-direction: column; flex: 1; padding: 15px 15px 0; }
.if-value-figure-name { font-size: 20px !important; margin-bottom: 6px !important; }
.if-value-story { flex: 1; display: -webkit-box !important; -webkit-line-clamp: 4 !important; -webkit-box-orient: vertical; overflow: hidden; min-height: 84px; line-height: 1.85 !important; font-size: 12px !important; color: var(--muted); }
.if-value-card-footer { margin-top: auto !important; padding: 11px 0 12px !important; gap: 10px !important; }
.if-value-source { min-width: 0; flex: 1; display: inline-flex !important; align-items: center; gap: 5px; overflow: hidden; }
.if-value-source > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.if-value-card .if-moment-cta { display: inline-flex; align-items: center; color: var(--green); transition: color 0.2s ease, transform 0.2s ease; }
.if-value-card:hover .if-moment-cta { color: var(--gold); }
.if-value-card:hover .if-moment-cta .icon { transform: translateX(-3px); }
.app[dir='ltr'] .if-value-art-title,
.app[dir='ltr'] .tone-prophet .if-value-art-title { font-size: 16px !important; line-height: 1.35 !important; }
@media (max-width: 540px) {
  .if-value-art-title,
  .tone-prophet .if-value-art-title { font-size: 16px !important; }
  .if-value-figure-name { font-size: 17px !important; }
}
.if-badges-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.if-badge-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--muted); }
.if-badge-pill.is-unlocked { border-color: var(--gold); color: var(--green); font-weight: 600; }
.if-kids-story-text { font-size: 16px; line-height: 2; color: var(--ink); margin: 10px 0; }
.if-kids-card { cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease; }
.if-kids-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.if-plan-link { text-decoration: none; color: inherit; }
.if-notes-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.if-notes-toolbar .smart-search-field { flex: 1; min-width: 220px; }
.if-muted { color: var(--muted); font-size: 13px; }

/* === Unified More-Rounded Corners (matching iOS & Android) + Transparent Continue/Details Button === */
.resume-hero { border-radius: 22px !important; overflow: hidden; }
.continue-card { border-radius: 18px !important; }
.continue-category { border-radius: 10px !important; }
.continue-button,
.continue-card .button,
.resume-library {
  background: transparent !important;
  border: 1.5px solid rgba(215, 194, 142, 0.55) !important;
  color: #e6d3a3 !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.continue-button:hover,
.continue-card .button:hover,
.resume-library:hover {
  background: rgba(215, 194, 142, 0.12) !important;
  border-color: #d7c28e !important;
}
.figure-card,
.category-tile,
.explore-tool-card,
.tool-panel,
.path-card,
.timeline-card,
.timeline-entry,
.expedition-card,
.prominent-stats > div,
.if-moment-card,
.if-modal-card,
.heritage-leaflet-wrap,
.map-drawer,
.audio-card,
.audio-player,
.explore-coming-soon {
  border-radius: 16px !important;
}
.figure-card-art,
.figure-art-frame {
  border-top-left-radius: 15px !important;
  border-top-right-radius: 15px !important;
}
.button,
.icon-button,
.reader-save,
.suggest-correction-btn,
.theme-toggle,
.explore-entry,
.language-trigger,
.search-field,
.smart-search-field,
.filter-chips button,
.quiz-segments button,
.quiz-option-btn,
.sort-select,
.if-modal-form input,
.if-modal-form select,
.if-modal-form textarea {
  border-radius: 12px !important;
}
.language-dropdown {
  border-radius: 14px !important;
}
.language-option {
  border-radius: 10px !important;
}

/* === Strict LTR / RTL Direction Alignment & Hide iPhone Preview Link === */
html[dir='ltr'],
body[dir='ltr'],
.app[dir='ltr'] {
  direction: ltr !important;
  text-align: left;
}
html[dir='rtl'],
body[dir='rtl'],
.app[dir='rtl'] {
  direction: rtl;
  text-align: right;
}
.app[dir='ltr'] .reader-dialog,
html[dir='ltr'] .reader-dialog {
  direction: ltr;
}
.app[dir='ltr'] .section-heading,
.app[dir='ltr'] .resume-copy,
.app[dir='ltr'] .continue-card,
.app[dir='ltr'] .figure-card-body,
.app[dir='ltr'] .path-card,
.app[dir='ltr'] .explore-tool-card,
.app[dir='ltr'] .footer-column,
.app[dir='ltr'] .footer-brand {
  text-align: left;
}
a[href='/iphone'],
a[href$='/iphone'] {
  display: none !important;
}

/* === Footer 5 Store Buttons (Compact Vertical Stack + Windows Options) === */
.footer-store-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 196px;
}
.footer-store-links .store-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 164px;
  padding: 6px 11px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.footer-store-links .store-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.footer-store-links .store-link .icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.footer-store-links .store-link small {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.35;
  margin-bottom: 1px;
}
.footer-win-dl {
  position: relative;
  width: 100%;
}
.footer-win-trigger {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.footer-win-trigger::-webkit-details-marker {
  display: none;
}
.footer-win-chev {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.footer-win-dl[open] .footer-win-trigger {
  border-color: var(--gold);
}
.footer-win-dl[open] .footer-win-chev {
  transform: rotate(180deg);
  color: var(--gold);
}
.footer-win-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 245px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: start;
}
.dark-theme .footer-win-menu {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.footer-win-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.footer-win-item:hover {
  background: var(--soft);
  color: var(--green);
}
.footer-win-item strong {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}
.footer-win-item span {
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.4;
}
.footer-store-links .store-link-soon {
  opacity: 0.62;
  cursor: default;
  border-style: dashed;
}
.footer-store-links .store-link-soon:hover {
  border-color: var(--line);
  color: var(--ink);
}
@media (max-width: 540px) {
  .footer-store-links {
    max-width: 230px;
  }
  .footer-win-menu {
    min-width: 230px;
  }
}

/* === Project Telegram Channel Section (Home Page, below Timelines) === */
.telegram-section {
  margin-top: 38px;
}
.telegram-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 34px;
  border-radius: 18px;
  background: #173e34;
  color: #f3efdf;
  border: 1px solid rgba(215, 194, 142, 0.24);
}
.telegram-banner::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px #051d161a;
}
.telegram-banner > :not(.card-art-pattern) {
  position: relative;
  z-index: 1;
}
.telegram-main {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.telegram-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(215, 194, 142, 0.16);
  border: 1px solid rgba(215, 194, 142, 0.34);
  color: #d7c28e;
}
.telegram-badge svg {
  width: 25px;
  height: 25px;
}
.telegram-copy {
  flex: 1;
  min-width: 0;
}
.telegram-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #d7c28e;
  margin-bottom: 5px;
}
.telegram-handle {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(215, 194, 142, 0.14);
  border: 1px solid rgba(215, 194, 142, 0.28);
  color: #e6d3a3;
  font-size: 10px;
  direction: ltr;
  unicode-bidi: isolate;
}
.telegram-copy h2 {
  font-family: var(--font-editorial);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  color: #f3efdf;
  margin: 0 0 6px;
}
.telegram-copy p {
  font-size: 12.5px;
  line-height: 1.95;
  color: #c3cfc0;
  margin: 0;
  max-width: 640px;
}
.telegram-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.telegram-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #d7c28e;
  border: 1px solid #e1cea1;
  color: #173e34;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.telegram-cta:hover {
  background: #e4d3a9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.telegram-cta-whatsapp {
  background: rgba(215, 194, 142, 0.16);
  border: 1px solid rgba(215, 194, 142, 0.55);
  color: #e6d3a3;
}
.telegram-cta-whatsapp:hover {
  background: rgba(215, 194, 142, 0.26);
  color: #f5ebd0;
}
.telegram-cta .icon,
.telegram-cta svg {
  width: 15px;
  height: 15px;
}
.dark-theme .telegram-banner {
  background: var(--surface);
  border-color: var(--line);
}
.dark-theme .telegram-copy h2 {
  color: var(--ink);
}
.dark-theme .telegram-copy p {
  color: var(--muted);
}
@media (max-width: 820px) {
  .telegram-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 22px;
    gap: 18px;
  }
  .telegram-main {
    align-items: flex-start;
  }
  .telegram-copy h2 {
    font-size: 21px;
  }
  .telegram-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .telegram-cta {
    width: 100%;
  }
}
@media (max-width: 540px) {
  .telegram-section {
    margin-top: 28px;
  }
  .telegram-banner {
    padding: 20px 18px;
    border-radius: 16px;
  }
  .telegram-badge {
    width: 44px;
    height: 44px;
  }
  .telegram-badge svg {
    width: 20px;
    height: 20px;
  }
  .telegram-copy h2 {
    font-size: 19px;
  }
  .telegram-copy p {
    font-size: 11.5px;
  }
}

/* === Support Panel PayPal.me Integration === */
.support-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 18px;
}
.support-amount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  direction: ltr;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.support-amount-pill:hover {
  border-color: var(--gold);
  background: var(--soft);
  color: var(--green);
  transform: translateY(-2px);
}
.support-amount-pill.is-featured {
  border-color: var(--gold);
  background: var(--soft);
  color: var(--green);
}
.support-paypal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 12px;
  background: #173e34;
  border: 1px solid rgba(215, 194, 142, 0.45);
  color: #f3efdf;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.support-paypal-cta:hover {
  background: #215245;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 62, 52, 0.22);
}
.support-paypal-cta svg {
  width: 17px;
  height: 17px;
  color: #d7c28e;
}
.dark-theme .support-paypal-cta {
  background: #d7c28e;
  border-color: #e1cea1;
  color: #173e34;
}
.dark-theme .support-paypal-cta svg {
  color: #173e34;
}
.dark-theme .support-paypal-cta:hover {
  background: #e4d3a9;
}
.support-paypal-note {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.tool-panel.support-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.tool-panel.support-panel > .icon {
  margin-inline: auto;
}
.tool-panel.support-panel > h3,
.tool-panel.support-panel > p,
.tool-panel.support-panel > .support-paypal-note {
  text-align: center;
}



/* === Seerah Events & Milestones (أحداث ومحطات السيرة) === */
.timeline-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.timeline-links-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .timeline-options,
  .timeline-links-grid {
    grid-template-columns: 1fr;
  }
}
.seerah-era-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 22px;
}
.seerah-era-header .century-heading {
  padding: 0;
}
.seerah-era-span {
  font-size: 11px;
  color: var(--muted);
}
.seerah-card-summary {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.95;
  margin-top: 6px;
}
.seerah-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.seerah-card-tags .outcome-tag {
  margin-top: 0;
}
.seerah-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  border: 1px solid var(--gold);
  background: var(--bg);
  color: var(--gold);
  padding: 5px 10px;
  font-size: 10.5px;
  font-weight: 500;
}
.seerah-link-badge .icon {
  width: 12px;
  height: 12px;
}
.seerah-linked-item .historical-dot {
  background: var(--bg);
  outline-color: var(--green);
}
.seerah-clauses {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 26px;
  margin: 26px 0 30px;
}
.seerah-clauses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.seerah-clauses-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 600;
  color: var(--green);
  margin: 0;
}
.seerah-clauses-head h2 .icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
}
.seerah-clauses-count {
  font-size: 10.5px;
  color: var(--gold);
  background: var(--soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.seerah-clauses-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.seerah-clauses-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.seerah-clause-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}
.seerah-clause-body {
  flex: 1;
  min-width: 0;
}
.seerah-clause-body h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 4px;
}
.seerah-clause-body p {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 540px) {
  .seerah-clauses {
    padding: 18px 16px;
  }
  .seerah-clauses-list li {
    padding: 12px;
    gap: 10px;
  }
}

/* Seerah Milestones Map Layer Pin */
.heritage-map-pin.is-seerah{background:linear-gradient(135deg,#b88c3a,#8a621c)!important;border-color:#f4dfa8!important;color:#fff!important;box-shadow:0 4px 14px rgba(184,140,58,.45)!important;}
.heritage-map-pin.is-seerah.active{transform:scale(1.16);box-shadow:0 0 0 5px rgba(200,162,83,.35),0 6px 18px rgba(0,0,0,.35)!important;}

/* Expeditions Map Layer Pin */
.heritage-map-pin.is-expedition{background:linear-gradient(135deg,#8b3a3a,#5e2020)!important;border-color:#f2c9b8!important;color:#fff!important;box-shadow:0 4px 14px rgba(139,58,58,.45)!important;}
.heritage-map-pin.is-expedition.active{transform:scale(1.16);box-shadow:0 0 0 5px rgba(180,83,83,.35),0 6px 18px rgba(0,0,0,.35)!important;}

/* Inline Private Notes on Detail Pages */
.if-entity-notes{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:24px 26px;margin:28px 0;}
.if-entity-notes-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;}
.if-entity-notes-head h2{display:flex;align-items:center;gap:9px;font-size:19px;font-weight:600;color:var(--green);margin:0;}
.if-entity-notes-head h2 .icon{width:18px;height:18px;color:var(--gold);}
.if-entity-notes-sub{font-size:11.5px;color:var(--muted);margin:4px 0 0;}
.if-entity-notes-form{display:flex;flex-direction:column;gap:10px;}
.if-entity-notes-form textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-family:inherit;font-size:13.5px;line-height:1.8;}
.if-entity-notes-actions{display:flex;justify-content:flex-end;}
.if-entity-notes-list{display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line);}
.if-entity-note-item{padding:14px 16px;border-radius:12px;background:var(--bg);border:1px solid var(--line);}
.if-entity-note-text{font-size:13.5px;line-height:1.9;color:var(--ink);white-space:pre-wrap;margin:0 0 10px;}
.if-entity-note-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.if-entity-note-foot small{font-size:10.5px;color:var(--muted);}
.if-entity-note-btns{display:flex;align-items:center;gap:14px;}
.if-entity-note-btns .text-link{padding-bottom:0;font-size:11px;}
.if-danger-link{color:#b42318!important;}

/* Social Share Card Modal & Share Dropdown */
.if-share-card-modal{width:min(520px,100%);max-height:92dvh;overflow-y:auto;}
.if-card-theme-chips{margin:10px 0 14px;}
.if-card-canvas-wrap{display:flex;justify-content:center;padding:8px;background:var(--bg);border:1px solid var(--line);border-radius:14px;margin-bottom:16px;}
.if-card-canvas{width:min(320px,100%);height:auto;border-radius:10px;box-shadow:0 12px 32px rgba(0,0,0,.22);}
.if-share-menu .if-share-dropdown{min-width:210px;}
.if-share-dropdown .icon{width:14px;height:14px;color:var(--gold);}

/* Branded Heritage A4 PDF Print Identity */
@page { size: A4; margin: 14mm 15mm; }
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .site-header, .site-footer, .page-crumbs, .figure-heading-actions, .narration-player,
  .reading-levels, .article-toolbar, .finish-reading, .if-entity-notes, .reading-index,
  .save-notice, .language-status, .if-modal-backdrop, .facts-card > a, .facts-card > .fact-encouragement { display: none !important; }
  body, .app, .dark-theme { background: #ffffff !important; color: #1b2a24 !important; }
  .main-content { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .figure-page-heading {
    display: block !important;
    background: linear-gradient(135deg, #173f35 0%, #0f2b24 100%) !important;
    color: #faf7ef !important;
    padding: 22px 26px 20px !important;
    border-radius: 14px !important;
    border: 2px solid #c9af72 !important;
    box-shadow: inset 0 0 0 4px rgba(215, 194, 142, 0.2) !important;
    margin: 0 0 18px !important;
    break-inside: avoid;
  }
  .figure-page-heading::before {
    content: "✦  موسوعة شخصيات إسلامية  ·  سِيَرٌ تُضيءُ الدَّرْبَ  ✦";
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #d7c28e !important;
    letter-spacing: 0.4px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(215, 194, 142, 0.35);
  }
  .app[dir='ltr'] .figure-page-heading::before {
    content: "✦  ISLAMIC FIGURES ENCYCLOPEDIA  ·  AUTHENTIC BIOGRAPHIES  ✦";
  }
  .figure-page-heading .reader-category {
    background: rgba(215, 194, 142, 0.16) !important;
    color: #e9d7a8 !important;
    border: 1px solid rgba(215, 194, 142, 0.4) !important;
    font-size: 10px !important;
    padding: 4px 10px !important;
  }
  .figure-page-heading h1 {
    color: #ffffff !important;
    font-size: 26px !important;
    line-height: 1.4 !important;
    margin: 10px 0 4px !important;
  }
  .figure-page-heading p { color: #d8e1dc !important; font-size: 12.5px !important; margin: 0 !important; }
  .figure-page-heading .figure-honorific { color: #d7c28e !important; font-size: 12px !important; margin-top: 6px !important; }
  .article-layout { display: block !important; }
  .article-sidebar { position: static !important; margin: 0 0 18px !important; }
  .facts-card {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 18px !important;
    border: 1px solid #d7c28e !important;
    border-top: 3px solid #173f35 !important;
    background: #faf8f3 !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    break-inside: avoid;
  }
  .facts-card h2 { grid-column: 1 / -1; font-size: 13px !important; color: #173f35 !important; margin: 0 0 4px !important; font-weight: 700 !important; }
  .facts-card > div { padding: 6px 0 !important; border-bottom: 1px dashed #e2dcc8 !important; }
  .facts-card small { color: #8a7240 !important; font-size: 9.5px !important; margin-bottom: 2px !important; }
  .facts-card p { color: #1b2a24 !important; font-size: 11.5px !important; line-height: 1.6 !important; margin: 0 !important; }
  .biography-prose { font-size: 13px !important; line-height: 2 !important; color: #1b2a24 !important; text-align: justify; }
  .biography-prose p { margin-bottom: 12px !important; }
  .biography-prose h2, .article-milestones > h2, .seerah-clauses-head h2 {
    font-size: 16px !important;
    color: #173f35 !important;
    border-inline-start: 3.5px solid #b79c64 !important;
    padding-inline-start: 10px !important;
    margin: 18px 0 8px !important;
    break-after: avoid;
  }
  .seerah-clauses { background: #faf8f3 !important; border: 1px solid #dfd7c0 !important; border-radius: 10px !important; padding: 14px 16px !important; }
  .seerah-clauses-list li { background: #ffffff !important; border: 1px solid #e7e2d3 !important; break-inside: avoid; }
  .article-sources {
    margin-top: 22px !important;
    padding: 14px 18px !important;
    background: #faf8f3 !important;
    border: 1px solid #d7c28e !important;
    border-radius: 10px !important;
    break-inside: avoid;
  }
  .article-sources h2 { color: #173f35 !important; font-size: 15px !important; margin-bottom: 8px !important; }
  .article-sources li { padding: 7px 0 !important; border-bottom: 1px solid #e7e2d3 !important; }
  .main-content::after {
    content: "✦  صدر عن موسوعة شخصيات إسلامية — وقف رقمي مجاني موثّق من المصادر الأصيلة  ✦";
    display: block;
    text-align: center;
    font-size: 9.5px;
    color: #7d6a42 !important;
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1.5px solid #d7c28e;
  }
  .app[dir='ltr'] .main-content::after {
    content: "✦  Published by Islamic Figures Encyclopedia — Free Authenticated Digital Waqf  ✦";
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Family & Kids Mode (Playful yet Serene Heritage Pastel Palette)
   ═══════════════════════════════════════════════════════════════════════════ */
.if-family-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.if-family-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 26px;
  background: linear-gradient(135deg, #eef4e9 0%, #f9f3e3 55%, #f5eceb 100%);
  border: 1.5px solid #dfd8c0;
  color: var(--ink);
}
.if-family-hero > :not(.card-art-pattern) {
  position: relative;
  z-index: 1;
}
.if-family-hero-copy {
  flex: 1;
  min-width: 0;
}
.if-family-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.82);
  border: 1px solid #d7c79a;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}
.if-family-kicker .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
.if-family-hero h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.45;
  margin: 0 0 8px;
}
.if-family-hero p {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}
.if-family-hero-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.if-family-stat-bubble {
  min-width: 112px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 254, 250, 0.88);
  border: 1px solid #e2dbc4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.if-family-stat-bubble strong {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}
.if-family-stat-bubble span {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Soft Pastel Heritage Tones (Light + Dark) */
.if-pastel-sage { --fp-bg: #eef4e9; --fp-border: #d2e0c8; --fp-chip: #e0ecd8; }
.if-pastel-honey { --fp-bg: #faf4e4; --fp-border: #e6d7b2; --fp-chip: #f2e5c5; }
.if-pastel-sky { --fp-bg: #ecf2f7; --fp-border: #cddce9; --fp-chip: #dce8f2; }
.if-pastel-rose { --fp-bg: #f8efef; --fp-border: #e7d2d2; --fp-chip: #f0dfdf; }

.dark-theme .if-family-hero {
  background: linear-gradient(135deg, #1b2620 0%, #242119 55%, #241c1d 100%);
  border-color: #363830;
}
.dark-theme .if-family-kicker,
.dark-theme .if-family-stat-bubble {
  background: rgba(30, 30, 30, 0.8);
  border-color: #3a3d34;
}
.dark-theme .if-pastel-sage { --fp-bg: #1b241e; --fp-border: #2f3f34; --fp-chip: #25332a; }
.dark-theme .if-pastel-honey { --fp-bg: #242119; --fp-border: #3d3625; --fp-chip: #312c1f; }
.dark-theme .if-pastel-sky { --fp-bg: #1a2127; --fp-border: #2c3842; --fp-chip: #232d36; }
.dark-theme .if-pastel-rose { --fp-bg: #241d1e; --fp-border: #3e2f31; --fp-chip: #302426; }

.if-family-session {
  background: var(--fp-bg, var(--surface));
  border: 1.5px solid var(--fp-border, var(--line));
  border-radius: 26px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.if-family-session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.if-family-week-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--fp-border, var(--line));
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.if-family-week-pill .icon {
  width: 15px;
  height: 15px;
  color: var(--gold);
}
.if-family-week-nav {
  display: flex;
  gap: 8px;
}
.if-soft-pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
}
.if-soft-pill-btn:hover {
  border-color: var(--gold);
  color: var(--green);
}
.if-family-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.if-family-session-head h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.if-family-value-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--fp-chip, var(--soft));
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.if-family-value-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
.if-family-story-bubble,
.if-family-question-bubble {
  background: var(--surface);
  border: 1px solid var(--fp-border, var(--line));
  border-radius: 20px;
  padding: 18px 20px;
}
.if-family-question-bubble {
  border-style: dashed;
  border-color: var(--gold);
}
.if-family-mini-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.if-family-mini-label .icon {
  width: 14px;
  height: 14px;
}
.if-family-story-bubble p {
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--ink);
  margin: 0;
}
.if-family-question-bubble p {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.85;
  color: var(--green);
  margin: 0;
}
.if-family-session-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.if-family-done-btn {
  background: var(--soft);
  color: var(--green);
  border: 1.5px solid var(--gold);
}
.if-family-outline-btn {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.if-family-badges-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 24px;
}
.if-family-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.if-family-section-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.if-family-section-head small {
  font-size: 11.5px;
  color: var(--muted);
}
.if-family-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}
.if-family-badge-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg);
  opacity: 0.65;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.if-family-badge-card.is-unlocked {
  opacity: 1;
  border-color: var(--gold);
  background: var(--soft);
}
.if-family-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}
.if-family-badge-card.is-unlocked .if-family-badge-icon {
  background: var(--green);
  color: #fffdf5;
  border-color: var(--green);
}
.if-family-badge-icon .icon {
  width: 17px;
  height: 17px;
}
.if-family-badge-card strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
.if-family-badge-card small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}
.if-family-reader-box {
  background: var(--surface);
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  padding: 24px 26px;
}
.if-family-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}
.if-family-story-card {
  background: var(--fp-bg, var(--surface));
  border: 1.5px solid var(--fp-border, var(--line));
  border-radius: 22px;
  padding: 18px 20px;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.if-family-story-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 24px rgba(23, 62, 52, 0.08);
}
.if-family-story-card.is-done {
  border-color: var(--gold);
}
.if-family-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.if-family-card-cat {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--green);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 999px;
}
.if-family-card-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--gold);
}
.if-family-card-mark .icon {
  width: 13px;
  height: 13px;
}
.if-family-story-card strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.if-family-story-card p {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--muted);
  margin: 0;
}

/* 3-Level Kids Story Library & Illustrated Reader */
.if-kids-levels-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.if-kids-level-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.if-kids-level-tab:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.if-kids-level-tab.is-active {
  background: var(--green);
  border-color: var(--gold);
  color: #fffdf5;
  box-shadow: 0 8px 20px rgba(23, 62, 52, 0.18);
}
.if-kids-level-tab strong {
  font-size: 14.5px;
  font-weight: 700;
}
.if-kids-level-tab span {
  font-size: 11.5px;
  opacity: 0.82;
}
.if-kids-illus-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.if-kids-illus-card {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.if-kids-illus-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
}
.if-kids-card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}
.if-kids-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.if-kids-illus-card:hover .if-kids-card-art img {
  transform: scale(1.04);
}
.if-kids-card-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 62, 52, 0.84);
  color: #f8f2e0;
  font-size: 10.5px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.if-kids-card-check {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}
.if-kids-card-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.if-kids-card-prophet {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}
.if-kids-card-value {
  margin-top: auto;
  padding-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--green);
  font-weight: 600;
  line-height: 1.5;
}
.if-kids-card-value .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
  flex-shrink: 0;
}
.if-kids-reader-full {
  padding: 0;
  overflow: hidden;
  margin-bottom: 20px;
}
.if-kids-reader-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  overflow: hidden;
  background: var(--soft);
}
.if-kids-reader-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.if-kids-reader-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18, 22, 20, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}
.if-kids-reader-close:hover {
  background: rgba(18, 22, 20, 0.92);
}
.if-kids-reader-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.if-kids-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.if-kids-reader-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.if-kids-reader-head h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.45;
}
.if-kids-inline-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.if-soft-pill-btn.is-active {
  background: var(--green);
  color: #fffdf5;
  border-color: var(--green);
}
.if-kids-reader-prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.if-kids-reader-prose p {
  font-size: 16px;
  line-height: 2.1;
  color: var(--ink);
  margin: 0;
}
.if-kids-reader-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.if-kids-challenge-bubble {
  background: var(--soft);
  border: 1.5px solid var(--green);
  border-radius: 20px;
  padding: 18px 20px;
}
.if-kids-challenge-bubble p {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;
  color: var(--ink);
  margin: 0;
}
@media (max-width: 640px) {
  .if-kids-levels-bar {
    grid-template-columns: 1fr;
  }
  .if-kids-reader-body {
    padding: 18px 16px 20px;
  }
  .if-kids-reader-head h3 {
    font-size: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Teacher & Classroom Kit («حقيبة المعلم والفصل»)
   ═══════════════════════════════════════════════════════════════════════════ */
.if-classroom-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.if-classroom-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: 20px;
  background: #173e34;
  border: 1px solid rgba(215, 194, 142, 0.3);
  color: #f3efdf;
}
.if-classroom-hero > :not(.card-art-pattern) {
  position: relative;
  z-index: 1;
}
.if-classroom-hero-copy {
  flex: 1;
  min-width: 260px;
}
.if-classroom-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #d7c28e;
  margin-bottom: 8px;
}
.if-classroom-kicker .icon {
  width: 15px;
  height: 15px;
}
.if-classroom-hero h2 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.if-classroom-hero p {
  font-size: 13px;
  line-height: 1.95;
  color: #c8d5c6;
  max-width: 640px;
  margin: 0;
}
.dark-theme .if-classroom-hero {
  background: var(--surface);
  border-color: var(--line);
}
.dark-theme .if-classroom-hero h2 { color: var(--ink); }
.dark-theme .if-classroom-hero p { color: var(--muted); }

.if-classroom-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.if-stage-tab {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.if-stage-tab strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.if-stage-tab span {
  font-size: 11.5px;
  color: var(--muted);
}
.if-stage-tab.is-active {
  border-color: var(--gold);
  background: var(--soft);
}
.if-stage-tab.is-active strong {
  color: var(--green);
}
.if-classroom-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.if-classroom-stage-bar h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 4px;
}
.if-classroom-stage-bar p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}
.if-classroom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.if-lesson-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.if-lesson-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.if-lesson-title-wrap {
  flex: 1;
  min-width: 0;
}
.if-lesson-num {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.if-lesson-head h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  margin: 0 0 8px;
}
.if-lesson-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.if-lesson-value .icon {
  width: 12px;
  height: 12px;
  color: var(--gold);
}
.if-lesson-qr-btn {
  flex-shrink: 0;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.if-lesson-qr-btn:hover {
  transform: scale(1.04);
  border-color: var(--gold);
}
.if-qr-svg svg {
  display: block;
  width: 78px;
  height: 78px;
}
.if-lesson-qr-btn small {
  font-size: 9.5px;
  font-weight: 600;
  color: #173e34;
}
.if-lesson-block {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.if-lesson-block.is-activity {
  border-style: dashed;
  border-color: var(--gold);
}
.if-lesson-block strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.if-lesson-block p,
.if-lesson-block ul {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}
.if-lesson-block ul {
  padding-inline-start: 18px;
}
.if-lesson-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.if-lesson-actions .button {
  padding: 9px 14px;
  font-size: 11.5px;
  gap: 8px;
  border: 1px solid var(--line);
}
.if-lesson-actions .button.button-green {
  border-color: transparent;
}
.if-qr-projector-modal {
  text-align: center;
}
.if-qr-projector-box {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid var(--gold);
  margin: 12px auto 14px;
}
.if-qr-projector-box svg {
  display: block;
  width: 240px;
  height: 240px;
}
.if-qr-url-code {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

@media (max-width: 860px) {
  .if-classroom-stages,
  .if-classroom-grid {
    grid-template-columns: 1fr;
  }
  .if-family-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }
  .if-family-session {
    padding: 20px 18px;
  }
}

/* === 2027 Charter Features: Practical Steps, Researcher Highlighter, Discover Islam Guide === */
.if-practical-steps,
.if-highlighter-panel {
  margin-top: 1.5rem;
  padding: 1.35rem 1.45rem;
  border-radius: 18px;
  border: 1px solid rgba(183, 156, 100, 0.28);
  background: var(--surface, #fffefa);
}
.if-practical-head,
.if-hl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.if-practical-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent, #aa8e54);
  margin-bottom: 0.2rem;
}
.if-practical-head h2,
.if-hl-head h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}
.if-practical-sub {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.78;
}
.if-practical-list {
  display: grid;
  gap: 0.75rem;
}
.if-practical-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  text-align: start;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(40, 83, 68, 0.14);
  background: rgba(40, 83, 68, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.if-practical-item.is-done {
  border-color: rgba(40, 83, 68, 0.45);
  background: rgba(40, 83, 68, 0.08);
}
.if-practical-check {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(40, 83, 68, 0.4);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.if-practical-check.is-done {
  background: var(--brand, #285344);
  border-color: var(--brand, #285344);
  color: #fffdf5;
}
.if-practical-copy strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}
.if-practical-copy p {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  opacity: 0.86;
  line-height: 1.55;
}
.if-practical-copy small {
  font-size: 0.78rem;
  color: var(--accent, #aa8e54);
}
.if-hl-palette-bar {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(183, 156, 100, 0.1);
  margin-bottom: 1rem;
}
.if-hl-hint {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 0.6rem;
}
.if-hl-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.if-hl-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--sw-border);
  background: var(--sw-bg);
  color: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.if-hl-swatch.is-active {
  box-shadow: 0 0 0 2px var(--sw-border);
  font-weight: 600;
}
.if-hl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sw-border);
}
.if-hl-selectable {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.if-hl-selectable:hover {
  outline: 1.5px dashed rgba(183, 156, 100, 0.6);
  outline-offset: 4px;
}
.if-hl-marked {
  background: var(--if-hl-bg, rgba(201, 175, 114, 0.25)) !important;
  border-inline-start: 3px solid var(--if-hl-border, #b79c64);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}
.if-hl-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.if-hl-card {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--if-hl-bg, rgba(201, 175, 114, 0.16));
  border-inline-start: 3px solid var(--if-hl-border, #b79c64);
}
.if-hl-quote {
  margin: 0 0 0.45rem;
  font-size: 0.94rem;
  line-height: 1.65;
}
.if-hl-note {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  opacity: 0.9;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(128, 128, 128, 0.25);
}
.if-discover-grid {
  display: grid;
  gap: 1rem;
}
.if-discover-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.if-discover-num {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(183, 156, 100, 0.18);
  color: var(--accent, #aa8e54);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.if-discover-card-titles h3 {
  margin: 0 0 0.25rem;
}
.if-discover-toggle {
  margin-top: 0.6rem;
}
.if-discover-body {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(183, 156, 100, 0.22);
  line-height: 1.75;
}
.if-discover-clarify {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.if-discover-misc,
.if-discover-fact {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}
.if-discover-misc {
  background: rgba(166, 91, 108, 0.1);
  border: 1px solid rgba(166, 91, 108, 0.24);
}
.if-discover-fact {
  background: rgba(40, 83, 68, 0.1);
  border: 1px solid rgba(40, 83, 68, 0.24);
}
.if-discover-source {
  font-size: 0.85rem;
  opacity: 0.8;
}
.if-discover-links {
  margin-top: 0.75rem;
}
.if-discover-fig-chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(40, 83, 68, 0.28);
  text-decoration: none;
  color: inherit;
  font-size: 0.86rem;
}

/* === Discover Islam Typography Refinements === */
.if-discover-hero h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0.35rem 0 0.5rem;
  line-height: 1.4;
}
.if-discover-hero .if-muted {
  font-size: 1.02rem;
  line-height: 1.75;
}
.if-discover-card-titles h3 {
  font-size: 1.32rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.45;
}
.if-discover-card-titles .if-muted {
  font-size: 1rem;
  line-height: 1.7;
}
.if-discover-toggle {
  font-size: 0.96rem;
  font-weight: 600;
}
.if-discover-body {
  font-size: 1.04rem;
  line-height: 1.85;
}
.if-discover-misc,
.if-discover-fact {
  font-size: 0.98rem;
  line-height: 1.7;
}
.if-discover-source,
.if-discover-links small,
.if-discover-fig-chip {
  font-size: 0.94rem;
}

/* === 2027 Pillars: Spiritual Solace, Scholar Heritage & Classroom Tracks === */
.if-solace-title {
  font-size: 1.32rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  line-height: 1.45;
  color: var(--ink);
}
.if-solace-comfort {
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 0 0 1rem;
  color: var(--muted);
}
.if-solace-moment-title {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--green);
}
.if-solace-reflection {
  font-size: 0.98rem !important;
  line-height: 1.75 !important;
  color: var(--ink) !important;
}
.if-heritage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.if-lineage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}
.if-lineage-col {
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(183, 156, 100, 0.25);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.if-lineage-col.is-center {
  border-color: var(--gold);
  background: var(--soft);
}
.if-lineage-col > strong {
  font-size: 0.96rem;
  color: var(--green);
}
.if-discover-fig-chip.is-primary {
  background: var(--green);
  color: #fffdf5;
  border-color: var(--green);
  font-weight: 700;
}
.if-journey-map-wrap {
  margin: 1rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}
.if-journey-svg {
  width: 100%;
  height: auto;
  display: block;
}
.if-track-pills {
  margin: 2px 0 4px;
}


/* === UNIFIED MAP JOURNEYS & ISNAD FLOW === */
.if-map-journey-tab {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line)) !important;
}
.if-map-journey-tab.selected {
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 78%, var(--gold))) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.if-journey-subbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, var(--gold) 8%);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
}
.if-journey-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.if-journey-groups button.selected {
  background: var(--gold) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.if-journey-scholars {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.45rem;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}
.if-journey-scholars button {
  white-space: nowrap;
  flex: 0 0 auto;
}
.heritage-map-pin.is-journey {
  background: linear-gradient(145deg, var(--green), #1b4332);
  border: 2.5px solid var(--gold);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(24, 58, 45, 0.35);
}
.heritage-map-pin.is-journey.active {
  background: var(--gold);
  border-color: #fff;
  transform: scale(1.16);
}
.map-drawer.is-journey-drawer {
  display: flex;
  flex-direction: column;
}
.if-drawer-bio-btn {
  padding: 0.42rem 0.85rem !important;
  font-size: 0.86rem !important;
  border-radius: 999px !important;
  white-space: nowrap;
  gap: 0.35rem;
}
.if-journey-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.85rem 1rem 1.1rem;
}
.if-journey-summary {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.72;
  color: var(--muted);
}

/* Sleek Connected Isnād Lineage Flow (replaces 3 clunky boxes) */
.if-isnad-flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--gold) 8%), var(--bg));
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line));
}
.if-isnad-heading {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
  margin-bottom: 0.25rem;
}
.if-isnad-tier {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.if-isnad-tier.is-central {
  align-items: flex-start;
}
.if-isnad-role {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}
.if-isnad-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.if-isnad-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.if-isnad-pill.is-link:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}
.if-isnad-pill.is-student {
  background: color-mix(in srgb, var(--surface) 90%, var(--green) 10%);
  border-color: color-mix(in srgb, var(--green) 24%, var(--line));
}
.if-isnad-pill.is-center-pill {
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 82%, var(--gold)));
  color: #fff !important;
  border: 1.5px solid var(--gold);
  padding: 0.36rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(34, 83, 66, 0.2);
}
.if-isnad-connector {
  font-size: 0.85rem;
  line-height: 1;
  color: var(--gold);
  padding-inline-start: 0.55rem;
  opacity: 0.85;
}

/* Interactive Journey Stops Timeline inside Map Drawer */
.if-journey-stops-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.if-journey-stops-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.if-journey-stop-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  text-align: start;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.if-journey-stop-btn:hover,
.if-journey-stop-btn.is-active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--surface) 88%, var(--gold) 12%);
  transform: translateY(-1px);
}
.if-journey-stop-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--green);
  color: #fff;
  border: 1.5px solid var(--gold);
  margin-top: 2px;
}
.if-journey-stop-btn.is-active .if-journey-stop-num {
  background: var(--gold);
}
.if-journey-stop-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.if-journey-stop-copy strong {
  font-size: 0.92rem;
  color: var(--ink);
}
.if-journey-stop-copy small {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}
.if-journey-source {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 0.55rem;
}


/* === JOURNEY DRAWER PICKER BAR === */
.if-journey-picker-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
}
.if-journey-select-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.if-journey-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  padding-inline-end: 42px;
  border-radius: 12px !important;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  outline: none;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.if-journey-select:hover {
  border-color: var(--gold);
  background: var(--soft);
}
.if-journey-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}
.if-journey-select-caret {
  position: absolute;
  inset-inline-end: 14px;
  width: 17px;
  height: 17px;
  color: var(--gold);
  pointer-events: none;
}


/* === MAP DRAWER FULL HEIGHT MATCH === */
.map-layout {
  align-items: stretch;
}
.map-drawer {
  height: 500px;
  max-height: 500px;
}
.map-drawer-list {
  flex: 1;
  min-height: 0;
}
@media (max-width: 900px) {
  .map-drawer {
    height: auto;
    max-height: 460px;
  }
}


/* === CATEGORY-COLORED MAP PINS === */
.heritage-map-pin[class*="tone-"] {
  background: var(--art-bg) !important;
  color: var(--art-ink) !important;
  border: 2px solid var(--art-ink) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--art-ink) 28%, transparent);
}
.dark-theme .heritage-map-pin[class*="tone-"] {
  background: var(--art-bg) !important;
  color: var(--art-ink) !important;
  border: 2px solid var(--art-ink) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.heritage-map-pin[class*="tone-"].active,
.heritage-map-pin[class*="tone-"]:hover {
  background: var(--art-ink) !important;
  color: var(--art-bg) !important;
  border-color: var(--surface) !important;
  transform: scale(1.16);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--art-ink) 26%, transparent), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.if-map-zoom-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 2px 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.if-map-zoom-hint .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}


/* === CALM HERITAGE SEERAH, EXPEDITION & JOURNEY PINS === */
.heritage-map-pin.is-seerah {
  background: #e2ebf3 !important;
  color: #385877 !important;
  border: 2px solid #385877 !important;
  box-shadow: 0 4px 12px rgba(56, 88, 119, 0.24) !important;
}
.dark-theme .heritage-map-pin.is-seerah {
  background: var(--soft) !important;
  color: #a9c7e4 !important;
  border: 2px solid #a9c7e4 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}
.heritage-map-pin.is-seerah.active,
.heritage-map-pin.is-seerah:hover {
  background: #385877 !important;
  color: #e2ebf3 !important;
  border-color: var(--surface) !important;
  transform: scale(1.16);
  box-shadow: 0 0 0 4px rgba(56, 88, 119, 0.24), 0 6px 18px rgba(0, 0, 0, 0.24) !important;
}
.dark-theme .heritage-map-pin.is-seerah.active,
.dark-theme .heritage-map-pin.is-seerah:hover {
  background: #a9c7e4 !important;
  color: #161816 !important;
}

.heritage-map-pin.is-expedition {
  background: #f0dfdd !important;
  color: #823a34 !important;
  border: 2px solid #823a34 !important;
  box-shadow: 0 4px 12px rgba(130, 58, 52, 0.24) !important;
}
.dark-theme .heritage-map-pin.is-expedition {
  background: var(--soft) !important;
  color: #e2a59f !important;
  border: 2px solid #e2a59f !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}
.heritage-map-pin.is-expedition.active,
.heritage-map-pin.is-expedition:hover {
  background: #823a34 !important;
  color: #f0dfdd !important;
  border-color: var(--surface) !important;
  transform: scale(1.16);
  box-shadow: 0 0 0 4px rgba(130, 58, 52, 0.24), 0 6px 18px rgba(0, 0, 0, 0.24) !important;
}
.dark-theme .heritage-map-pin.is-expedition.active,
.dark-theme .heritage-map-pin.is-expedition:hover {
  background: #e2a59f !important;
  color: #161816 !important;
}

.heritage-map-pin.is-journey {
  background: var(--soft) !important;
  color: var(--green) !important;
  border: 2px solid var(--green) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--green) 24%, transparent) !important;
}
.heritage-map-pin.is-journey.active,
.heritage-map-pin.is-journey:hover {
  background: var(--green) !important;
  color: var(--surface) !important;
  border-color: var(--gold) !important;
  transform: scale(1.16);
}

/* === MOBILE RESPONSIVE FIXES (2026-11-27) === */
html,
body,
.app {
  max-width: 100%;
  overflow-x: clip;
}
body:has(.dark-theme) {
  background: #121212;
}
body:not(:has(.dark-theme)) {
  background: #f8f8f3;
}

/* Scope mobile topbar grid placement strictly to the header language switcher */
@media (max-width: 980px) {
  .language-menu {
    grid-column: auto;
    grid-row: auto;
    margin-top: 0;
    justify-self: auto;
  }
  .topbar .reading-level-menu {
    display: none !important;
  }
  .topbar .search-field {
    grid-column: 1 / 3;
    grid-row: 2;
    margin-top: 4px;
    min-width: 0;
  }
  .topbar .language-menu:not(.reading-level-menu) {
    grid-column: 3 / 5;
    grid-row: 2;
    margin-top: 4px;
    justify-self: stretch;
    width: 100%;
  }
  .topbar .language-menu:not(.reading-level-menu) .language-trigger {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    padding: 6px 8px;
  }
  .topbar .language-dropdown {
    z-index: 95;
  }
}

@media (max-width: 760px) {
  .figure-page-heading {
    width: 100%;
    min-width: 0;
  }
  .figure-page-heading > div:first-child {
    width: 100%;
    min-width: 0;
  }
  .figure-heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .figure-heading-actions > .if-share-menu {
    grid-column: auto !important;
    grid-row: auto !important;
    margin-top: 0 !important;
    justify-self: stretch !important;
    width: 100%;
    min-width: 0;
  }
  .figure-heading-actions > button,
  .figure-heading-actions > .if-share-menu > button {
    width: 100%;
    min-width: 0;
    padding: 10px 10px;
    gap: 7px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
  }
  .figure-heading-actions .if-share-dropdown {
    inset-inline-end: 0;
    inset-inline-start: auto;
    max-width: calc(100vw - 32px);
  }
  .reading-levels {
    width: 100%;
    max-width: 100%;
  }
  .reading-levels button {
    min-width: 0;
    padding: 10px 6px;
  }
  .reading-levels button > span {
    min-width: 0;
    overflow: hidden;
  }
  .reading-levels small {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .article-main,
  .article-sidebar,
  .narration-player,
  .facts-card,
  .article-sources,
  .if-entity-notes {
    max-width: 100%;
    min-width: 0;
  }
  .narration-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .narration-transport {
    padding-inline: 0;
    width: 100%;
  }
}

@media (max-width: 540px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) repeat(3, 38px);
    gap: 8px;
    padding: 12px 14px 14px;
  }
  .theme-toggle,
  .top-bookmark,
  .mobile-menu {
    width: 38px;
    height: 38px;
  }
  .article-sources li {
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .source-status {
    max-width: none;
    margin-inline-start: 28px;
    font-size: 10px;
    padding: 4px 9px;
  }
  .reading-levels {
    top: 112px;
  }
  .reading-levels .icon {
    display: none;
  }
  .reading-levels strong {
    font-size: 13px;
  }
  .reading-levels small {
    font-size: 8.5px;
    white-space: nowrap;
  }
  .if-moments-grid,
  .if-family-cards-grid,
  .if-family-badges-grid {
    grid-template-columns: 1fr;
  }
  .telegram-actions {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
    padding: 28px 16px;
  }
  .footer-bottom {
    margin-inline: 16px;
  }
}


/* === CATEGORY TILE & HERO TEXT OVERFLOW HARDENING === */
.category-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.category-tile {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  padding-inline: 6px;
  text-align: center;
}
.category-title {
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-tile small {
  margin-top: auto;
}
@media (max-width: 980px) and (min-width: 541px) {
  .category-tile {
    align-items: center;
    text-align: start;
  }
  .category-title {
    flex: 1;
    min-width: 0;
    text-align: start;
  }
}
.continue-identity > div:last-child {
  min-width: 0;
  flex: 1;
}
.continue-identity h2 {
  overflow-wrap: break-word;
}
.continue-monogram {
  overflow: hidden;
  padding-inline: 4px;
}
/* Prevent unstyled SEO fallback <main> flash while SPA boots */
html.if-js #root > main {
  position: fixed;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
