@charset "UTF-8";
/* ============================================================================
 * HISTORY OF RAJASTHAN (by RAS Prep) • Production Stylesheet v6.2
 * Location: /public_html/assets/css/portal.css
 * Soothing Heritage Peacock Palette • Matte Medallion • Unified CTAs • Play Books Lookup
 * ============================================================================ */

@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }

/* ============================================================================
 * 1. SIGNATURE DESIGN TOKENS & 3-THEME SYSTEM
 * ============================================================================ */
:root,
html[data-theme="default"] {
  --bg-primary: #FAF6F0;
  --bg-secondary: #F2EAE0;
  --bg-card: #FFFFFF;
  --bg-darkest: #0E3437;
  --bg-dark-section: #13464A;
  --bg-dark-elevated: #1A585D;

  --brand-teal: #166567;
  --brand-teal-dark: #0F4B4D;
  --accent-saffron: #C85A27;
  --accent-gold: #C88A22;
  --accent-gold-light: #E8B85C;

  --text-primary: #1D2827;
  --text-secondary: #445453;
  --text-muted: #60706F;
  --text-light: #FAF6F0;

  --border-light: #E4DAD0;
  --border-dark: #256166;
  --reply-box-bg: #EDF6F6;

  --btn-radius: 10px;
  --ui-btn-primary: #166567;
  --ui-btn-accent: #C85A27;
  --ui-btn-text: #FFFFFF;

  --font-body-en: 'Lexend', system-ui, -apple-system, sans-serif;
  --font-body-hi: 'Tiro Devanagari Hindi', 'Noto Sans Devanagari', serif;
  --font-heading-en: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-button: 'Lexend', system-ui, sans-serif;

  --sticky-header-offset: 132px;
  --shadow-card: 0 8px 24px rgba(15, 56, 60, 0.06), 0 1px 2px rgba(15, 56, 60, 0.04);
  --shadow-card-hover: 0 16px 36px rgba(15, 56, 60, 0.12), 0 4px 12px rgba(200, 138, 34, 0.12);
}

html[data-theme="reading"] {
  --bg-primary: #F4ECD8;
  --bg-secondary: #EAE0C8;
  --bg-card: #FAF5E8;
  --bg-darkest: #211D17;
  --bg-dark-section: #2F2921;
  --bg-dark-elevated: #3D362B;

  --brand-teal: #175456;
  --brand-teal-dark: #0E3B3D;
  --accent-saffron: #A94118;
  --accent-gold: #A97217;
  --accent-gold-light: #DFB057;

  --text-primary: #1E1913;
  --text-secondary: #3E362B;
  --text-muted: #5C5142;
  --text-light: #FAF5E8;

  --border-light: #D5C6A8;
  --border-dark: #4E4437;
  --reply-box-bg: #EFE7D4;
}

html[data-theme="dark"] {
  --bg-primary: #0B1B1D;
  --bg-secondary: #122A2D;
  --bg-card: #153236;
  --bg-darkest: #071314;
  --bg-dark-section: #0F292C;
  --bg-dark-elevated: #183C40;

  --brand-teal: #279499;
  --brand-teal-dark: #6ED4D8;
  --accent-saffron: #E07342;
  --accent-gold: #D9A13B;
  --accent-gold-light: #F0C674;

  --text-primary: #F1F5F4;
  --text-secondary: #C4D2D1;
  --text-muted: #96ABA9;
  --text-light: #F6F8F7;

  --border-light: #234649;
  --border-dark: #234B4F;
  --reply-box-bg: #183639;
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.34);
  --shadow-card-hover: 0 20px 44px rgba(0, 0, 0, 0.48);
}

/* ============================================================================
 * 2. BASE TYPOGRAPHY, SCROLL OFFSET & READING PROGRESS RIBBON
 * ============================================================================ */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-header-offset, 132px) + 14px); }
body { background-color: var(--bg-primary); color: var(--text-primary); font-family: var(--font-body-en); overflow-x: clip; -webkit-font-smoothing: antialiased; }
html[lang="hi"] body { font-family: var(--font-body-hi); }
.font-royal { font-family: var(--font-heading-en); }
.font-editorial { font-family: var(--font-editorial); }
html[lang="hi"] .font-royal, html[lang="hi"] .font-editorial { font-family: 'Noto Sans Devanagari', 'Tiro Devanagari Hindi', serif; letter-spacing: 0; }
section[id], header[id], article[id], div[id].scroll-mt-28 { scroll-margin-top: calc(var(--sticky-header-offset, 132px) + 14px); }

#hor-scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-saffron), var(--brand-teal));
  transform: scaleX(var(--hor-scroll-pct, 0)); pointer-events: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================================
 * 3. MARGIN-LOCKED STICKY HEADER
 * ============================================================================ */
#sticky-top-shell { width: 100%; max-width: 100vw; overflow-x: clip; box-shadow: 0 6px 20px rgba(14, 52, 55, 0.16); }
#top-utility-drawer { max-height: 0; overflow: hidden; transition: max-height 0.26s ease; }
#top-utility-drawer.is-open { max-height: 240px; }
@media (min-width: 1024px) { #top-utility-drawer.desktop-default-open { max-height: 100px; } }

#sticky-top-shell header { padding-top: 8px !important; padding-bottom: 8px !important; width: 100% !important; max-width: 100vw !important; }
#sticky-top-shell #hor-header-row { width: 100% !important; max-width: 1280px !important; min-width: 0 !important; flex-wrap: nowrap !important; }
#sticky-top-shell header .btn-action { font-size: 11px !important; min-height: 34px !important; padding: 4px 11px !important; border-radius: 9999px !important; }
#sticky-top-shell header #btn-lens-explorer, #sticky-top-shell header #btn-lens-aspirant { font-size: 11px !important; min-height: 28px !important; padding: 2px 10px !important; border-radius: 9999px !important; }
#sticky-top-shell header #header-auth-btn { font-size: 11px !important; min-height: 32px !important; padding: 4px 12px !important; border-radius: 9999px !important; }
#sticky-top-shell header .royal-emblem-bezel { width: 36px !important; height: 36px !important; flex-shrink: 0 !important; }
#sticky-top-shell #tier-2-scroll-track .pillar-pill { font-size: 11.5px !important; min-height: 32px !important; padding: 4px 13px !important; }

@media (max-width: 639px) {
  #sticky-top-shell header { padding-left: 8px !important; padding-right: 8px !important; }
  #sticky-top-shell #hor-header-row { gap: 4px !important; }
  #sticky-top-shell header .btn-action { min-height: 30px !important; height: 30px !important; padding: 2px 7px !important; font-size: 10px !important; gap: 2px !important; }
  #sticky-top-shell header #btn-lens-explorer, #sticky-top-shell header #btn-lens-aspirant { min-height: 24px !important; height: 24px !important; padding: 1px 7px !important; font-size: 9.5px !important; }
  #sticky-top-shell header #header-auth-btn { min-height: 28px !important; height: 28px !important; padding: 2px 8px !important; font-size: 9.5px !important; }
  #sticky-top-shell header .royal-emblem-bezel { width: 30px !important; height: 30px !important; border-width: 2px !important; }
}
@media (max-width: 390px) {
  #sticky-top-shell header { padding-left: 6px !important; padding-right: 6px !important; }
  #sticky-top-shell header #btn-lens-explorer, #sticky-top-shell header #btn-lens-aspirant { padding: 1px 5px !important; font-size: 9px !important; }
  #sticky-top-shell header #header-auth-btn { padding: 2px 6px !important; font-size: 9px !important; }
  #sticky-top-shell header .royal-emblem-bezel { width: 28px !important; height: 28px !important; }
}
@media (max-width: 440px) { #txt-home-btn { display: none !important; } }

.tier-nav-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; min-width: 28px; border-radius: 9999px;
  border: 1.5px solid var(--accent-gold); background-color: var(--bg-card); color: var(--brand-teal-dark);
  font-weight: 900; font-size: 16px; line-height: 1; cursor: pointer; flex-shrink: 0;
}
@media (min-width: 1024px) { .tier-nav-arrow { display: none !important; } }

/* ============================================================================
 * 4. UNIFIED EDITORIAL BUTTON SYSTEM (ZERO GAME-LIKE STYLING)
 * ============================================================================ */
.btn-action {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--font-button); font-weight: 700; letter-spacing: 0.02em;
  border-radius: var(--btn-radius); cursor: pointer; text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.btn-action:active { transform: translateY(0) scale(0.985); }

.btn-hero-cta, .btn-saffron {
  background: linear-gradient(180deg, #D56632 0%, var(--ui-btn-accent, #C85A27) 60%, #B14B1C 100%);
  color: var(--ui-btn-text, #FFFFFF) !important; border: 1px solid rgba(242, 208, 138, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px -4px rgba(14, 52, 55, 0.30);
}
.btn-hero-cta:hover, .btn-saffron:hover { transform: translateY(-1.5px); border-color: #F0C975; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 12px 24px -6px rgba(14, 52, 55, 0.40); }

.btn-teal {
  background: linear-gradient(180deg, #1E7D80 0%, var(--ui-btn-primary, #166567) 60%, #104E50 100%);
  color: var(--ui-btn-text, #FFFFFF) !important; border: 1px solid rgba(232, 184, 92, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 6px 16px -4px rgba(14, 52, 55, 0.26);
}
.btn-teal:hover { transform: translateY(-1.5px); border-color: var(--accent-gold-light); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 22px -6px rgba(14, 52, 55, 0.38); }

.btn-royal-gold {
  background: linear-gradient(180deg, #EAC06D 0%, #D49C3B 60%, #BC8424 100%);
  color: #0E3437 !important; border: 1px solid rgba(250, 232, 188, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 16px -4px rgba(14, 52, 55, 0.26);
}
.btn-royal-gold:hover { transform: translateY(-1.5px); filter: brightness(1.04); }

.btn-glass-gold {
  background: rgba(250, 246, 240, 0.08); color: #F5E9D3 !important;
  border: 1px solid rgba(232, 184, 92, 0.45); backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(14, 52, 55, 0.14);
}
.btn-glass-gold:hover { transform: translateY(-1.5px); background: rgba(250, 246, 240, 0.15); border-color: #E8B85C; color: #FFFFFF !important; }

.btn-outline-archival {
  background: var(--bg-card); color: var(--brand-teal-dark);
  border: 1.5px solid var(--accent-gold); box-shadow: 0 2px 6px rgba(14, 52, 55, 0.05);
}
.btn-outline-archival:hover { transform: translateY(-1.5px); background: var(--bg-secondary); border-color: var(--brand-teal); }

.ras-prep-pill-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.34rem 0.95rem; border-radius: 9999px;
  font-weight: 800; background: linear-gradient(180deg, #EAC06D 0%, #D49A34 100%); color: #0E3437;
  border: 1px solid rgba(255, 242, 210, 0.55); text-decoration: none;
}
.pillar-pill {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  padding: 0.38rem 0.95rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700;
  border: 1.5px solid var(--border-light); background-color: var(--bg-card); color: var(--text-primary);
  cursor: pointer; flex-shrink: 0; transition: all 0.18s ease; text-decoration: none;
}
.pillar-pill:hover { border-color: var(--accent-gold); color: var(--brand-teal-dark); }
.pillar-pill.active { background: linear-gradient(180deg, #1E7D80 0%, var(--brand-teal) 100%); border-color: var(--brand-teal); color: #FFFFFF !important; }

/* ============================================================================
 * 5. SOOTHING HERITAGE PEACOCK SURFACES (HERO + ABOUT US + DARK BANDS)
 * ============================================================================ */
.hor-peacock-surface,
.hor-imperial-hero {
  position: relative;
  background:
    radial-gradient(ellipse 65% 55% at 24% 46%, rgba(232, 184, 92, 0.10), transparent 64%),
    linear-gradient(145deg, #13464A 0%, #18575B 52%, #1C6064 100%);
  color: #FAF6F0;
}
html[data-theme="reading"] .hor-peacock-surface,
html[data-theme="reading"] .hor-imperial-hero {
  background: linear-gradient(145deg, #2D2720 0%, #373027 55%, #3F372D 100%);
}
html[data-theme="dark"] .hor-peacock-surface,
html[data-theme="dark"] .hor-imperial-hero {
  background:
    radial-gradient(ellipse 65% 55% at 24% 46%, rgba(232, 184, 92, 0.08), transparent 64%),
    linear-gradient(145deg, #0E2B2E 0%, #13393D 55%, #174448 100%);
}
.hor-hero-bg-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* Restful Matte Sandstone-Ivory Logo Medallion (Zero Harsh Brightness / Zero Halo) */
.hor-emblem-medallion {
  position: relative; width: 164px; height: 164px; border-radius: 9999px;
  background: radial-gradient(circle at 38% 32%, #F5EFE4 0%, #EDE2CF 70%, #E3D4BC 100%);
  border: 2.5px solid rgba(208, 160, 74, 0.72);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.45), 0 10px 24px rgba(10, 34, 36, 0.22);
  display: flex; align-items: center; justify-content: center; padding: 15px;
}
.hor-emblem-medallion img { opacity: 0.92; filter: brightness(0.96) contrast(0.96); }
@media (max-width: 639px) { .hor-emblem-medallion { width: 128px; height: 128px; padding: 11px; } }

.hor-gold-divider {
  width: 68px; height: 3.5px; border-radius: 9999px; margin: 0 auto;
  background: linear-gradient(90deg, #C88A22, #E8B85C);
}

.hor-dark-band {
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 12% 10%, rgba(232, 184, 92, 0.08), transparent 60%),
    linear-gradient(180deg, #13464A 0%, #103C40 100%);
  color: var(--text-light);
}
.hor-dark-card {
  background: rgba(14, 52, 55, 0.72);
  border: 1px solid rgba(232, 184, 92, 0.28); border-radius: 1.15rem;
  box-shadow: 0 10px 24px rgba(10, 34, 36, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.hor-dark-card:hover { transform: translateY(-3px); border-color: var(--accent-gold-light); box-shadow: 0 16px 32px rgba(10, 34, 36, 0.28); }

/* Harmonized Portal Highlight Cards inside About the Initiative */
.hor-about-highlight-card {
  background: rgba(250, 246, 240, 0.075);
  border: 1px solid rgba(232, 184, 92, 0.28);
  border-radius: 1.1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(10, 34, 36, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.hor-about-highlight-card:hover {
  transform: translateY(-2px);
  background: rgba(250, 246, 240, 0.11);
  border-color: rgba(232, 184, 92, 0.55);
}

.hor-pillar-card {
  position: relative; overflow: hidden; border-radius: 1.25rem;
  border: 1px solid var(--border-light); background-color: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.hor-pillar-card:hover { transform: translateY(-4px); border-color: var(--accent-gold); box-shadow: var(--shadow-card-hover); }

.royal-emblem-bezel { background: radial-gradient(circle at 35% 30%, #F5EFE4, #E8DBC7); border: 2px solid rgba(208, 160, 74, 0.8); }
.enclosed-card { background-color: var(--bg-card); border: 1px solid var(--border-light); border-radius: 1.25rem; box-shadow: var(--shadow-card); transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.enclosed-card.hor-lift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--accent-gold); }
.light-search-input { background-color: #FAF6F0; color: #1D2827; border: 1.5px solid var(--accent-gold); }
.light-search-input::placeholder { color: #60706F; }
.hor-input { background-color: var(--bg-primary); color: var(--text-primary); border: 1.5px solid var(--border-light); outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.hor-input:focus { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(22, 101, 103, 0.14); }
.ras-link { color: var(--brand-teal-dark); font-weight: 800; text-decoration: none; }
.ras-link:hover { color: var(--accent-saffron); text-decoration: underline; }
.hor-heritage-canvas { position: relative; background: radial-gradient(circle at 18% 22%, rgba(232, 184, 92, 0.16), transparent 52%), linear-gradient(135deg, #13464A 0%, #18575B 55%, #166567 100%); overflow: hidden; }

/* ============================================================================
 * 6. MOBILE-SAFE STACKED ACCORDION INDEX, READING WORKSPACE & FOCUS MODE
 * ============================================================================ */
.hor-workspace-shell { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) {
  .hor-workspace-shell { grid-template-columns: 270px minmax(0, 1fr); gap: 1.5rem; }
  .hor-workspace-shell.hor-rail-collapsed { grid-template-columns: minmax(0, 1fr); }
  .hor-workspace-shell.hor-rail-collapsed .hor-index-rail { display: none; }
}
@media (min-width: 1440px) {
  .hor-workspace-shell.hor-has-minitoc { grid-template-columns: 270px minmax(0, 1fr) 195px; }
  .hor-workspace-shell.hor-has-minitoc.hor-rail-collapsed { grid-template-columns: minmax(0, 1fr) 195px; }
}

.hor-index-rail { display: flex; flex-direction: column; width: 100%; }
.hor-index-rail-body { display: none; max-height: 52vh; overflow-y: auto; }
.hor-index-rail.is-mobile-open .hor-index-rail-body { display: block; }
@media (min-width: 1024px) {
  .hor-index-rail { position: sticky; top: calc(var(--sticky-header-offset, 132px) + 14px); max-height: calc(100vh - var(--sticky-header-offset, 132px) - 28px); }
  .hor-index-rail-body { display: flex !important; flex-direction: column; flex: 1; min-height: 0; max-height: none; overflow: hidden; }
}
.hor-minitoc-rail { display: none; position: sticky; top: calc(var(--sticky-header-offset, 132px) + 14px); max-height: calc(100vh - var(--sticky-header-offset, 132px) - 28px); overflow-y: auto; }
@media (min-width: 1440px) { .hor-minitoc-rail { display: block; } }

.hor-reading-measure { max-width: 74ch; margin-left: auto; margin-right: auto; }
.hor-prose-body, .prose-reading { line-height: 1.84; color: var(--text-primary); }
.hor-prose-body h2 { font-family: var(--font-heading-en); font-size: 1.32rem; font-weight: 800; margin: 1.6rem 0 0.7rem; color: var(--brand-teal-dark); border-bottom: 1.5px solid var(--border-light); padding-bottom: 0.35rem; }
.hor-prose-body h3 { font-size: 1.08rem; font-weight: 800; margin: 1.25rem 0 0.5rem; color: var(--text-primary); }
.hor-prose-body p { margin-bottom: 0.95rem; }
.hor-prose-body ul, .hor-prose-body ol { padding-left: 1.35rem; margin-bottom: 1rem; }
.hor-prose-body ul { list-style-type: disc; }
.hor-prose-body ol { list-style-type: decimal; }
.hor-prose-body blockquote { border-left: 4px solid var(--accent-gold); padding: 0.75rem 1rem; background-color: var(--bg-secondary); border-radius: 0 0.75rem 0.75rem 0; font-style: italic; margin: 1rem 0; }

.mains-yield-box { background-color: var(--bg-secondary); border: 1px solid var(--border-light); border-left: 4px solid var(--brand-teal); border-radius: 1rem; padding: 1.1rem 1.25rem; }
.hor-qa-item { background-color: var(--bg-card); border: 1px solid var(--border-light); border-radius: 0.85rem; overflow: hidden; }
.hor-qa-item summary { padding: 0.8rem 1rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.hor-qa-item summary::-webkit-details-marker { display: none; }
.hor-qa-item[open] summary { border-bottom: 1px solid var(--border-light); background-color: var(--bg-secondary); }

html.hor-focus-mode #sticky-top-shell, html.hor-zen-mode #sticky-top-shell,
html.hor-focus-mode footer, html.hor-zen-mode footer,
html.hor-focus-mode .hor-index-rail, html.hor-zen-mode .hor-index-rail,
html.hor-focus-mode .hor-minitoc-rail, html.hor-zen-mode .hor-minitoc-rail,
html.hor-focus-mode .hor-hide-in-focus, html.hor-zen-mode .hor-hide-in-zen { display: none !important; }
html.hor-focus-mode .hor-workspace-shell, html.hor-zen-mode .hor-workspace-shell { grid-template-columns: minmax(0, 1fr) !important; }
html.hor-focus-mode body, html.hor-zen-mode body { padding-top: 62px; }

#hor-focus-floating-bar, #hor-zen-floating-bar {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80;
  display: none; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 9999px;
  background-color: var(--bg-dark-section); color: var(--text-light); border: 1.5px solid var(--accent-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30); max-width: 96vw; overflow-x: auto;
}
html.hor-focus-mode #hor-focus-floating-bar, html.hor-zen-mode #hor-zen-floating-bar { display: inline-flex; }

/* ============================================================================
 * 7. GOOGLE PLAY BOOKS-STYLE INLINE WORD LOOKUP POPOVER
 * ============================================================================ */
#hor-inline-dict-popover {
  position: fixed; z-index: 9995; width: min(350px, calc(100vw - 24px));
  background-color: var(--bg-card); color: var(--text-primary);
  border: 2px solid var(--accent-gold); border-radius: 1rem;
  box-shadow: 0 22px 48px rgba(14, 52, 55, 0.30), 0 4px 12px rgba(200, 138, 34, 0.18);
  padding: 0.95rem 1.05rem; font-size: 0.8rem; line-height: 1.55;
  animation: horPopoverIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes horPopoverIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hor-dict-term { appearance: none; background: transparent; border: 0; padding: 0 1px; margin: 0; font: inherit; color: inherit; border-bottom: 1.5px dotted var(--accent-gold); cursor: help; display: inline; }
.hor-kw-box { display: inline; padding: 0.06em 0.38em; border-radius: 0.38rem; font-weight: 700; cursor: pointer; border-bottom: 2px solid var(--brand-teal); background-color: rgba(22, 101, 103, 0.11); color: var(--brand-teal-dark); }

/* ============================================================================
 * 8. COMMUNITY BAR, PORTRAITS, TIMELINE, FLIP CARDS & QUIZ PALETTE
 * ============================================================================ */
.hor-community-row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.85rem; }
@media (min-width: 768px) { .hor-community-row { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; } }
.social-row-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.45rem; }
@media (min-width: 768px) { .social-row-strip { flex-wrap: nowrap; justify-content: flex-end; gap: 0.4rem; flex-shrink: 0; } }
.social-pill-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.65rem; border-radius: 9999px; background-color: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-primary); font-size: 0.72rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; transition: transform 0.18s ease, border-color 0.18s ease; text-decoration: none; }
.social-pill-btn:hover { transform: translateY(-2px); border-color: var(--accent-gold); }
.social-icon-wrap { width: 24px; height: 24px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.passport-portrait-frame { width: 84px; height: 108px; aspect-ratio: 35 / 45; border-radius: 10px; border: 2.5px solid var(--accent-gold); overflow: hidden; flex-shrink: 0; background: linear-gradient(145deg, var(--bg-dark-section), var(--brand-teal)); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.20); display: flex; align-items: center; justify-content: center; }
.passport-portrait-frame-sm { width: 52px; height: 67px; aspect-ratio: 35 / 45; border-radius: 8px; border: 2px solid var(--accent-gold); overflow: hidden; flex-shrink: 0; background: linear-gradient(145deg, var(--bg-dark-section), var(--brand-teal)); display: flex; align-items: center; justify-content: center; }
.passport-portrait-frame img, .passport-portrait-frame-sm img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.timeline-rail { position: absolute; top: 0.5rem; bottom: 0.5rem; left: 0.65rem; width: 3px; border-radius: 9999px; background: linear-gradient(180deg, var(--accent-gold), var(--brand-teal), var(--accent-saffron)); }
.timeline-node-marker { width: 16px; height: 16px; border-radius: 9999px; background-color: var(--accent-gold); border: 3px solid var(--bg-card); box-shadow: 0 0 0 2px var(--brand-teal); }
.timeline-card-surface { background-color: var(--bg-card); border: 1px solid var(--border-light); border-left: 4px solid var(--accent-gold); border-radius: 1.1rem; box-shadow: var(--shadow-card); }

.otd-flip-scene { perspective: 1100px; min-height: 290px; cursor: pointer; }
.otd-flip-inner { position: relative; width: 100%; min-height: 290px; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); transform-style: preserve-3d; }
.otd-flip-scene.is-flipped .otd-flip-inner { transform: rotateY(180deg); }
.otd-flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 1.25rem; padding: 1.35rem; border: 2px solid var(--accent-gold); display: flex; flex-direction: column; justify-content: space-between; }
.otd-flip-front { align-items: center; justify-content: center; text-align: center; background: linear-gradient(155deg, #13464A, #18575B 60%, var(--brand-teal)); color: var(--text-light); }
.otd-flip-back { transform: rotateY(180deg); background-color: var(--bg-card); color: var(--text-primary); overflow-y: auto; }
.otd-number-medallion { width: 68px; height: 68px; border-radius: 9999px; border: 2.5px solid var(--accent-gold-light); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading-en); font-size: 1.75rem; font-weight: 800; color: var(--accent-gold-light); background: rgba(200, 138, 34, 0.16); }

.pal-not-visited  { background-color: #E5E7EB; color: #1F2937; border: 1px solid #9CA3AF; }
.pal-not-answered { background-color: #E11D48; color: #FFFFFF; border: 1px solid #9F1239; }
.pal-answered     { background-color: #059669; color: #FFFFFF; border: 1px solid #065F46; }
.pal-marked       { background-color: #7C3AED; color: #FFFFFF; border: 1px solid #5B21B6; border-radius: 9999px !important; }
.pal-ans-marked   { background-color: #7C3AED; color: #FFFFFF; border: 2.5px solid #10B981; border-radius: 9999px !important; }

#hor-global-search-panel { position: relative; z-index: 45; background-color: var(--bg-secondary); border-bottom: 3px solid var(--accent-gold); box-shadow: 0 18px 40px rgba(14, 52, 55, 0.20); }

/* ============================================================================
 * 9. 5-LAYER ANTI-SCREENSHOT & ANTI-COPY SHIELD
 * ============================================================================ */
body.hor-shield-active { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none !important; }
body.hor-shield-active .hor-prose-body, body.hor-shield-active .prose-reading { -webkit-user-select: text; -moz-user-select: text; user-select: text; }
body.hor-shield-active input, body.hor-shield-active textarea, body.hor-shield-active select { -webkit-user-select: text !important; user-select: text !important; -webkit-touch-callout: default !important; }
body.hor-shield-active img { -webkit-user-drag: none; user-drag: none; }

#hor-privacy-curtain {
  position: fixed; inset: 0; z-index: 2147483647; background: #0E3437;
  display: none; align-items: center; justify-content: center; text-align: center;
  padding: 1.5rem; color: #FAF6F0; pointer-events: none; transform: translateZ(0);
}
html.hor-curtain-locked { background: #0E3437 !important; }
html.hor-curtain-locked body > *:not(#hor-privacy-curtain) { visibility: hidden !important; opacity: 0 !important; }
html.hor-curtain-locked #hor-privacy-curtain { display: flex !important; pointer-events: auto !important; }

#hor-watermark-layer {
  position: fixed; inset: -24px; z-index: 9990; pointer-events: none; overflow: hidden;
  opacity: 0.085; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr);
  align-items: center; justify-items: center; transition: transform 0.6s ease;
}
#hor-watermark-layer span { transform: rotate(-24deg); font-size: 11px; font-weight: 800; letter-spacing: 0.05em; white-space: nowrap; color: #166567; }
html[data-theme="dark"] #hor-watermark-layer span { color: #E8B85C; }
@media (max-width: 767px) {
  #hor-watermark-layer { opacity: 0.11; grid-template-columns: 1fr; grid-template-rows: repeat(8, 1fr); }
  #hor-watermark-layer span { font-size: 9.5px; }
}

@media print {
  body.hor-shield-active * { display: none !important; visibility: hidden !important; }
  body.hor-shield-active::before {
    content: "Printing, copying, screenshotting, and unauthorized redistribution of content from historyofrajasthan.com is strictly prohibited.";
    display: block !important; visibility: visible !important; padding: 48px 24px;
    font-size: 20px; font-weight: 700; text-align: center; color: #0E3437;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* ============================================================================
 * 10. PROFESSIONAL ARCHITECTURAL HORIZONTAL SLIDER (HEADER + REGION + ARCHIVES)
 * ============================================================================ */
.hor-hslider {
  position: relative; display: flex; align-items: center; gap: 0.45rem; width: 100%; min-width: 0;
}
.hor-hslider-viewport {
  position: relative; flex: 1; min-width: 0; overflow: hidden;
}
.hor-hslider-viewport::before,
.hor-hslider-viewport::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 34px; z-index: 3;
  pointer-events: none; opacity: 0; transition: opacity 0.22s ease;
}
.hor-hslider-viewport::before { left: 0; }
.hor-hslider-viewport::after  { right: 0; }

.hor-hslider.can-scroll-left .hor-hslider-viewport::before  { opacity: 1; }
.hor-hslider.can-scroll-right .hor-hslider-viewport::after  { opacity: 1; }

/* Light Surface Fade (Header Tier-2 & Archival Cream Bands) */
.hor-hslider-light .hor-hslider-viewport::before {
  background: linear-gradient(90deg, var(--bg-secondary) 12%, rgba(242, 234, 224, 0) 100%);
}
.hor-hslider-light .hor-hslider-viewport::after {
  background: linear-gradient(270deg, var(--bg-secondary) 12%, rgba(242, 234, 224, 0) 100%);
}
html[data-theme="dark"] .hor-hslider-light .hor-hslider-viewport::before {
  background: linear-gradient(90deg, var(--bg-secondary) 15%, rgba(18, 42, 45, 0) 100%);
}
html[data-theme="dark"] .hor-hslider-light .hor-hslider-viewport::after {
  background: linear-gradient(270deg, var(--bg-secondary) 15%, rgba(18, 42, 45, 0) 100%);
}

/* Dark Peacock Surface Fade (Region Hero 10-Zone Switcher) */
.hor-hslider-dark .hor-hslider-viewport::before {
  background: linear-gradient(90deg, #13464A 18%, rgba(19, 70, 74, 0) 100%);
}
.hor-hslider-dark .hor-hslider-viewport::after {
  background: linear-gradient(270deg, #1B5D61 18%, rgba(27, 93, 97, 0) 100%);
}

/* Sleek Architectural Hairline Slider Chevron Buttons (Zero Game-Icon Vibe) */
.hor-slider-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: var(--slider-btn-radius, 8px);
  border: 1px solid var(--border-light); background-color: var(--bg-card); color: var(--brand-teal-dark);
  cursor: pointer; transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.2s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(14, 52, 55, 0.08);
}
.hor-slider-btn svg { width: 15px; height: 15px; }
.hor-slider-btn:hover:not(:disabled) {
  background-color: var(--brand-teal); border-color: var(--brand-teal); color: #FFFFFF;
}
.hor-slider-btn:active:not(:disabled) { transform: scale(0.95); }
.hor-slider-btn:disabled { opacity: 0.26; cursor: default; box-shadow: none; }

.hor-hslider-dark .hor-slider-btn {
  background-color: rgba(250, 246, 240, 0.10); border-color: rgba(232, 184, 92, 0.42); color: #F5E9D3;
  box-shadow: none; backdrop-filter: blur(4px);
}
.hor-hslider-dark .hor-slider-btn:hover:not(:disabled) {
  background-color: rgba(232, 184, 92, 0.24); border-color: #E8B85C; color: #FFFFFF;
}
.hor-hslider-dark .pillar-pill {
  background-color: rgba(250, 246, 240, 0.09); border-color: rgba(232, 184, 92, 0.34); color: #FAF6F0;
}
.hor-hslider-dark .pillar-pill:hover {
  background-color: rgba(250, 246, 240, 0.16); border-color: #E8B85C; color: #FFFFFF;
}
.hor-hslider-dark .pillar-pill.active {
  background: linear-gradient(180deg, #EAC06D 0%, #D49C3B 100%); border-color: #F6DA9B; color: #0E3437 !important;
}

/* Hide chevrons cleanly when all items fit without overflow */
.hor-hslider:not(.has-overflow) .hor-slider-btn { display: none; }

/* ============================================================================
 * 11. BACKEND GLOBAL & PER-SECTION BUTTON STYLE VARIANTS (ADMIN SITE BUILDER)
 * ============================================================================ */
html[data-btn-style="flat"] .btn-action { box-shadow: none !important; background-image: none !important; }
html[data-btn-style="outline"] .btn-action.btn-teal,
html[data-btn-style="outline"] .btn-action.btn-saffron,
html[data-btn-style="outline"] .btn-action.btn-hero-cta {
  background: transparent !important; background-image: none !important; box-shadow: none !important;
  border-width: 1.5px !important;
}
html[data-btn-style="outline"] .btn-action.btn-teal { color: var(--brand-teal-dark) !important; border-color: var(--brand-teal) !important; }
html[data-btn-style="outline"] .btn-action.btn-saffron,
html[data-btn-style="outline"] .btn-action.btn-hero-cta { color: var(--accent-saffron) !important; border-color: var(--accent-saffron) !important; }
html[data-btn-uppercase="1"] .btn-action { text-transform: uppercase; letter-spacing: 0.06em; }
/* ============================================================================
 * 12. PHASE 9A: MOBILE OVERFLOW LOCK, COLLAPSED INDEX & INSTANT INLINE DICT
 * ============================================================================ */
html, body {
  max-width: 100%;
  overflow-x: clip !important;
}
main, main > section, #sticky-top-shell, footer {
  max-width: 100%;
  overflow-x: clip;
}
#hor-watermark-layer {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Prevent CSS Grid children from pushing mobile viewport wider than 100vw */
.hor-workspace-shell {
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0;
  max-width: 100%;
}
.hor-workspace-shell > *,
.enclosed-card,
.hor-reading-measure,
.hor-prose-body {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
@media (min-width: 1024px) {
  .hor-workspace-shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }
  .hor-workspace-shell.hor-rail-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (min-width: 1440px) {
  .hor-workspace-shell.hor-has-minitoc {
    grid-template-columns: 260px minmax(0, 1fr) 190px !important;
  }
  .hor-workspace-shell.hor-has-minitoc.hor-rail-collapsed {
    grid-template-columns: minmax(0, 1fr) 190px !important;
  }
}

/* Collapse Mobile Chapter Index by Default (< 1024px) */
@media (max-width: 1023px) {
  .hor-index-rail {
    position: static !important;
    max-height: none !important;
  }
  .hor-index-rail:not(.is-mobile-open) .hor-index-rail-body {
    display: none !important;
  }
  .hor-index-rail.is-mobile-open .hor-index-rail-body {
    display: flex !important;
    flex-direction: column;
    max-height: 56vh;
    overflow-y: auto;
  }
}

/* Hamburger Drawer Collapsible Accordions */
#mobileDrawer details > summary {
  list-style: none;
}
#mobileDrawer details > summary::-webkit-details-marker {
  display: none;
}
#mobileDrawer .hor-drawer-chev {
  display: inline-block;
  transition: transform 0.2s ease;
}
#mobileDrawer details[open] > summary .hor-drawer-chev {
  transform: rotate(180deg);
}

/* Instant Mobile-Safe Play Books Inline Dictionary Card */
#hor-inline-dict-card {
  position: fixed;
  z-index: 9998;
  width: min(350px, calc(100vw - 24px));
  border-radius: 16px;
  padding: 14px 16px;
  background-color: var(--bg-card, #FFFFFF);
  color: var(--text-primary, #1D2827);
  border: 2px solid var(--accent-gold, #C88A22);
  box-shadow: 0 18px 40px rgba(14, 52, 55, 0.28);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
#hor-inline-dict-card.hidden {
  display: none !important;
}
/* ============================================================================
 * 13. PHASE 9C-FIX: FOCUS BAR PILL LOCK, WATERMARK TRANSPARENCY & DICT DOCK
 * ============================================================================ */

/* Prevent Hindi Focus-bar button ("← सामान्य दृश्य") from wrapping into a round blot */
#hor-focus-floating-bar,
#hor-zen-floating-bar {
  display: none;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  max-width: calc(100vw - 16px) !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
html.hor-focus-mode #hor-focus-floating-bar,
html.hor-zen-mode #hor-zen-floating-bar {
  display: inline-flex !important;
}
#hor-focus-floating-bar button,
#hor-zen-floating-bar button {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  min-height: 32px !important;
  padding: 5px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Watermark strictly click-through & selection-transparent (never blocks words beneath) */
#hor-watermark-layer,
#hor-watermark-layer * {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: none !important;
  z-index: 25 !important;
}

/* Suppress legacy duplicate inline popover so only #hor-inline-dict-card renders */
#hor-inline-dict-popover {
  display: none !important;
}

/* Clean Mobile-Safe Inline Dictionary Card */
#hor-inline-dict-card {
  max-height: 40vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* ============================================================================
 * 14. PHASE 3 (v8.0): GLOSSARY UNDERLINE STYLING & LARGE-ARCHIVE SPEED CSS
 * ============================================================================ */
.hor-dict-term {
  display: inline;
  cursor: pointer;
  color: inherit;
  border-bottom: 1.5px dotted var(--brand-teal);
  text-decoration: none;
  padding: 0 1px;
  border-radius: 3px;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.hor-dict-term:hover,
.hor-dict-term:focus-visible {
  background-color: rgba(200, 138, 34, 0.14);
  border-bottom-color: var(--accent-saffron);
  border-bottom-style: solid;
  outline: none;
}
html[data-theme="dark"] .hor-dict-term {
  border-bottom-color: var(--accent-gold-light);
}
html[data-theme="dark"] .hor-dict-term:hover,
html[data-theme="dark"] .hor-dict-term:focus-visible {
  background-color: rgba(232, 184, 92, 0.18);
  border-bottom-color: var(--accent-gold-light);
}

/* Smooth 60fps scrolling on large 400-700+ item archive grids */
#pers-directory-grid > article,
#master-timeline-stream > article,
#gl-entries-stream article {
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}
@media (min-width: 768px) { #hor-inline-dict-card { max-height: 62vh; } }
/* ============================================================================
 * 15. PHASE 4 (v8.0): EDITORIAL HERO 3-CTA DOCK, 8 CONTRASTING SHADES & STRIPS
 * ============================================================================ */

/* A. Hero 3-CTA Dock (Full-width Primary + 50/50 Twin Glass on Mobile; Single Row Desktop) */
.hor-hero-cta-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}
.hor-hero-cta-primary {
  grid-column: 1 / -1;
  min-height: 46px;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-button);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: linear-gradient(180deg, #E8B85C 0%, #D49A34 65%, #BA811E 100%);
  color: #0A2628 !important;
  border: 1.5px solid rgba(255, 244, 214, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 24px -8px rgba(7, 26, 28, 0.52);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.2s ease;
}
.hor-hero-cta-primary:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 28px -8px rgba(7, 26, 28, 0.62);
}
.hor-hero-cta-secondary {
  min-height: 44px;
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-button);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.015em;
  text-decoration: none;
  cursor: pointer;
  background: rgba(250, 246, 240, 0.09);
  color: #FAF6F0 !important;
  border: 1px solid rgba(232, 184, 92, 0.52);
  backdrop-filter: blur(6px);
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.hor-hero-cta-secondary:hover {
  transform: translateY(-1.5px);
  background: rgba(250, 246, 240, 0.17);
  border-color: #F2CA74;
  color: #FFFFFF !important;
}
.hor-hero-cta-divider { display: none; }
@media (min-width: 768px) {
  .hor-hero-cta-dock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    width: auto;
  }
  .hor-hero-cta-primary { grid-column: auto; padding: 0.72rem 1.45rem; font-size: 0.875rem; }
  .hor-hero-cta-secondary { padding: 0.68rem 1.15rem; font-size: 0.82rem; }
  .hor-hero-cta-divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: rgba(232, 184, 92, 0.36);
    margin: 0 0.1rem;
  }
}

/* B. 8 Curated Contrasting Archival Background Shades (Default Theme Safe) */
html[data-theme="default"] .hor-shade-peacock_deep    { background: radial-gradient(ellipse 65% 55% at 24% 46%, rgba(232,184,92,0.10), transparent 64%), linear-gradient(145deg, #13464A 0%, #1C6064 100%) !important; }
html[data-theme="default"] .hor-shade-espresso_royal  { background: radial-gradient(ellipse 65% 55% at 20% 35%, rgba(232,184,92,0.09), transparent 62%), linear-gradient(145deg, #241D18 0%, #362B23 100%) !important; }
html[data-theme="default"] .hor-shade-indigo_fort     { background: radial-gradient(ellipse 65% 55% at 22% 40%, rgba(229,178,76,0.10), transparent 64%), linear-gradient(145deg, #152238 0%, #203454 100%) !important; }
html[data-theme="default"] .hor-shade-fort_crimson    { background: radial-gradient(ellipse 65% 55% at 25% 40%, rgba(232,184,92,0.10), transparent 64%), linear-gradient(145deg, #3B181C 0%, #522127 100%) !important; }

html[data-theme="default"] .hor-shade-parchment_ivory { background-color: #FAF6F0 !important; }
html[data-theme="default"] .hor-shade-archival_cream  { background-color: #F1E7D8 !important; }
html[data-theme="default"] .hor-shade-terracotta_mist { background-color: #F6EBE0 !important; }
html[data-theme="default"] .hor-shade-sage_archival   { background-color: #EBF2EF !important; }

/* C. Mobile-Ergonomic Horizontal Swipe Strips (Features & Compact Glossary) */
.hor-mobile-swipe-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.9rem;
  padding-bottom: 0.4rem;
  -webkit-overflow-scrolling: touch;
}
.hor-mobile-swipe-grid > * {
  flex: 0 0 82%;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .hor-mobile-swipe-grid > * { flex: 0 0 47%; }
}
@media (min-width: 768px) {
  .hor-mobile-swipe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 1.15rem;
    padding-bottom: 0;
  }
  .hor-mobile-swipe-grid > * { flex: none; }
}
@media (min-width: 1024px) {
  .hor-mobile-swipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.hor-feature-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #13464A, #1B5E62);
  color: #E8B85C;
  border: 1px solid rgba(200, 138, 34, 0.55);
}
/* ============================================================================
 * 16. PHASE 4 POLISH: CRISP FORM INPUTS, WHATSAPP OTP BOX & COMPACT READER PANE
 * ============================================================================ */

/* Crisp, readable placeholders & borders on Suggest Correction inputs */
.hor-input {
  background-color: #FFFFFF;
  color: var(--text-primary);
  border: 1.5px solid #CBB9A1;
}
.hor-input::placeholder {
  color: #4E5E5D;
  opacity: 1;
}
html[data-theme="dark"] .hor-input {
  background-color: var(--bg-primary);
  border-color: var(--border-dark);
}
html[data-theme="dark"] .hor-input::placeholder {
  color: #9BB0AE;
}

/* WhatsApp-Themed Green Verification Box */
.hor-wa-otp-box {
  background: linear-gradient(135deg, #E8F8EE 0%, #DCFCE7 100%);
  border: 1.5px solid #25D366;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.hor-wa-otp-box .hor-input {
  background-color: #FFFFFF;
  border-color: #22C55E;
  color: #0F291E;
}
.hor-wa-otp-box .hor-input:focus {
  border-color: #128C7E;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.22);
}
.hor-wa-otp-btn {
  background: linear-gradient(180deg, #22C55E 0%, #16A34A 65%, #128C7E 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid #15803D !important;
  box-shadow: 0 6px 14px -4px rgba(18, 140, 126, 0.42);
}
.hor-wa-otp-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
html[data-theme="dark"] .hor-wa-otp-box {
  background: linear-gradient(135deg, rgba(18, 140, 126, 0.26) 0%, rgba(22, 163, 74, 0.18) 100%);
  border-color: #25D366;
}
html[data-theme="dark"] .hor-wa-otp-box .hor-input {
  background-color: #0E2420;
  color: #F0FDF4;
  border-color: #25D366;
}

/* Compact Internally-Scrollable Homepage Topic Preview Pane (Prevents Endless Scrolling) */
#home-index-rail {
  max-height: 580px;
}
.hor-home-reader-box {
  max-height: 490px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 0.35rem;
}
@media (min-width: 1024px) {
  .hor-home-reader-box {
    max-height: 530px;
  }
}
/* Automatically expand full-height when Focus Mode is enabled */
html.hor-focus-mode .hor-home-reader-box,
html.hor-zen-mode .hor-home-reader-box {
  max-height: none !important;
  overflow-y: visible !important;
  padding-right: 0;
}