@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', 'Noto Sans Devanagari', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', 'Noto Sans Devanagari', Georgia, Cambria, serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --primary: #00873d;
  --primary-hover: #006e31;
  --primary-dark: #004d22;
  --primary-light: #e8f7ee;
  --primary-border: #9ae2b6;
  --primary-glow: rgba(0, 135, 61, 0.2);

  --secondary: #0284c7;
  --phonepe: #5f259f;
  --phonepe-hover: #4d1c82;
  --phonepe-light: #f3ebfc;

  --text-main: #0f172a;
  --text-muted: #526371;
  --bg-main: #f3f6f4;
  --bg-card: #ffffff;
  --border: #e2e8e3;
  --radius: 14px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 20px rgba(0, 135, 61, 0.08);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 135, 61, 0.065) 0%, transparent 42%),
    radial-gradient(circle at 92% 14%, rgba(2, 132, 199, 0.045) 0%, transparent 38%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  overflow-x: hidden;
}

/* App Header & Desktop Top Nav */
.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 135, 61, 0.16);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 4px 20px rgba(6, 78, 38, 0.05);
}

.app-header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-link:hover {
  transform: scale(1.02);
}

.brand-link img {
  width: min(220px, 42vw);
  height: auto;
  max-height: 40px;
  object-fit: contain;
  display: block;
}

.desktop-top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(241, 245, 242, 0.9);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(0, 135, 61, 0.1);
}

.desktop-nav-link {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.desktop-nav-link:hover {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.85);
}

.desktop-nav-link.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 2px 10px rgba(0, 135, 61, 0.12);
}

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

.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-wrap .search-field-ico {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
  display: inline-flex;
}

.header-search-input {
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  width: 185px;
  background: #f8faf9;
  transition: border-color 0.2s, width 0.2s, background 0.2s, box-shadow 0.2s;
}

.header-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  width: 225px;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Sleek Duotone Vector Icons */
.st-ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}

.st-ico-sm { width: 14px; height: 14px; vertical-align: -2px; }
.st-ico-md { width: 18px; height: 18px; vertical-align: -3.5px; }
.st-ico-lg { width: 20px; height: 20px; vertical-align: -4px; }

.st-icon-pill {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e8f7ee, #d1fae5);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 135, 61, 0.16);
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .search-field-wrap {
    order: 3;
    flex-basis: 100%;
    width: 100%;
  }
  .header-search-input {
    width: 100%;
  }
}

/* Reader account pages: a book spread on wide screens and a ruled letterpad on phones. */
.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 44px 24px;
  display: grid;
  place-items: center;
  color: #173527;
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  background: radial-gradient(ellipse at 18% 12%, #e0f4e8 0, transparent 32%), linear-gradient(135deg, #edf5ef, #d9e8de 55%, #edf1e7);
}
.auth-book-layout {
  width: min(1060px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1fr);
  position: relative;
  border-radius: 22px;
  filter: drop-shadow(0 32px 34px rgba(10, 45, 25, .18));
  perspective: 1500px;
}
.auth-book-layout::before {
  content: '';
  position: absolute;
  inset: 7px -8px -8px 8px;
  z-index: -1;
  border-radius: 24px;
  background: repeating-linear-gradient(180deg, #fffdf6 0 3px, #e9e1d1 3px 5px);
  box-shadow: 0 8px 15px rgba(19, 38, 26, .18);
}
.auth-book-cover, .auth-paper { min-width: 0; position: relative; }
.auth-book-cover {
  overflow: hidden;
  padding: 42px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  background: radial-gradient(circle at 80% 20%, rgba(61, 160, 95, .4), transparent 34%), linear-gradient(145deg, #07351c, #075a30 55%, #063019);
  border: 1px solid #c99a3b;
  border-right: 7px solid #b38632;
  border-radius: 20px 5px 5px 20px;
  box-shadow: inset -9px 0 14px rgba(0,0,0,.24), inset 0 0 0 5px rgba(239,193,78,.12);
  transform: rotateY(2deg);
}
.auth-book-cover::after { content:''; position:absolute; top:0; right:0; bottom:0; width:20px; background:linear-gradient(90deg,rgba(0,0,0,.22),transparent); }
.auth-brand { display:block; max-width:240px; margin:0 0 52px; padding:9px 12px; border-radius:10px; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.auth-brand img { display:block; width:100%; max-height:72px; object-fit:contain; }
.auth-cover-kicker, .auth-form-kicker { font-size:10px; font-weight:900; letter-spacing:.16em; }
.auth-cover-kicker { color:#f4d676; }
.auth-book-cover h1 { margin:14px 0; color:#fff3b0; font:800 clamp(28px,3vw,40px)/1.12 'Playfair Display',serif; }
.auth-book-cover p { max-width:330px; color:#d7eee0; font-size:14px; line-height:1.8; }
.auth-cover-seal { width:84px; height:84px; margin-top:auto; display:flex; flex-direction:column; justify-content:center; align-items:center; border:1px solid rgba(250,220,137,.65); border-radius:50%; color:#f5dc86; box-shadow:0 0 0 5px rgba(250,220,137,.09), inset 0 0 0 4px rgba(250,220,137,.12); }
.auth-cover-seal span { font:800 24px 'Playfair Display',serif; }
.auth-cover-seal small { font-size:8px; letter-spacing:.12em; }
.auth-back-link { margin-top:25px; color:#d4eadc; text-decoration:none; font-size:12px; font-weight:700; }
.auth-paper { padding:42px clamp(26px,5vw,62px); background:linear-gradient(90deg,#e2d8c3 0,#fffdf7 14px,#fffdf7 100%); border:1px solid #e4dccb; border-radius:5px 20px 20px 5px; box-shadow:inset 18px 0 25px -24px #604c2b; }
.auth-form-heading { margin:0 0 26px; }
.auth-form-kicker { color:#178148; }
.auth-form-heading h2 { margin:9px 0 5px; color:#123c26; font:800 29px 'Playfair Display',serif; }
.auth-form-heading p { margin:0; color:#667b6e; font-size:13px; line-height:1.6; }
.auth-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px 14px; }
.auth-field { display:block; min-width:0; color:#334d3d; font-size:12px; font-weight:800; }
.auth-field-wide { grid-column:1/-1; }
.auth-field input { display:block; width:100%; min-height:47px; margin-top:7px; padding:12px 13px; border:1px solid #d9dfd5; border-radius:10px; outline:0; color:#183c28; background:rgba(255,255,255,.88); font:500 14px 'Plus Jakarta Sans',sans-serif; transition:border-color .18s,box-shadow .18s; }
.auth-field select { display:block; width:100%; min-height:47px; margin-top:7px; padding:12px 34px 12px 13px; border:1px solid #d9dfd5; border-radius:10px; outline:0; color:#183c28; background:#fff; font:600 13px 'Plus Jakarta Sans',sans-serif; }
.auth-field select:focus { border-color:#1b9151; box-shadow:0 0 0 3px rgba(27,145,81,.12); }
.auth-field input:disabled { color:#829087; background:#f1f3ef; cursor:not-allowed; }
.auth-field input[hidden] { display:none; }
.auth-field input:focus { border-color:#1b9151; box-shadow:0 0 0 3px rgba(27,145,81,.12); }
.auth-label-link { float:right; font-weight:700; }
.auth-label-link a, .auth-switch a { color:#08783b; text-decoration:none; font-weight:800; }
.auth-submit { min-height:51px; margin-top:4px; padding:13px 18px; display:flex; justify-content:space-between; align-items:center; border:0; border-radius:12px; color:white; background:linear-gradient(135deg,#087b3d,#07552c); box-shadow:0 7px 0 #063d22,0 12px 18px rgba(6,70,35,.2); font:800 15px 'Outfit',sans-serif; cursor:pointer; }
.auth-submit span { font-size:20px; }
.auth-submit:disabled { opacity:.72; cursor:wait; }
.auth-switch { margin:22px 0 0; color:#718075; text-align:center; font-size:13px; }
.auth-demo-panel { margin-top:21px; padding-top:15px; border-top:1px solid #e9e2d3; color:#52665a; }
.auth-demo-panel summary { cursor:pointer; font-size:12px; font-weight:800; }
.auth-demo-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.auth-demo-list button { display:grid; gap:3px; padding:10px; text-align:left; border:1px solid #dce9df; border-radius:9px; background:#f5faf6; color:#16472b; cursor:pointer; }
.auth-demo-list button strong { font-size:11px; }
.auth-demo-list button small { color:#758579; font-size:10px; }
@media(max-width:767px) {
  .auth-page { display:block; padding:16px 12px 28px; background:#e9eee7; }
  .auth-book-layout { display:block; width:min(520px,100%); min-height:0; margin:0 auto; filter:drop-shadow(0 18px 22px rgba(27,43,28,.18)); }
  .auth-book-layout::before { inset:5px -4px -5px 4px; border-radius:16px; }
  .auth-book-cover { min-height:0; padding:16px 18px 18px; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px 12px; border-radius:15px 15px 4px 4px; border-right:1px solid #c99a3b; border-bottom:5px solid #b38632; transform:none; }
  .auth-book-cover::after { display:none; }
  .auth-brand { width:165px; margin:0 auto 0 0; padding:5px 8px; }
  .auth-brand img { max-height:45px; }
  .auth-cover-kicker { align-self:center; font-size:8px; }
  .auth-book-cover h1 { flex:1 0 100%; margin:4px 0 0; font-size:23px; }
  .auth-book-cover p { flex:1 1 100%; margin:0; font-size:11px; line-height:1.5; }
  .auth-cover-seal, .auth-back-link { display:none; }
  .auth-paper { min-height:calc(100dvh - 190px); padding:25px 19px 24px 29px; border-radius:4px 4px 15px 15px; background:repeating-linear-gradient(180deg,#fffdf8 0 31px,#e6ecdf 32px,#fffdf8 33px); box-shadow:inset 13px 0 16px -18px #574527; }
  .auth-form-heading { margin-bottom:20px; }
  .auth-form-heading h2 { font-size:25px; }
  .auth-form-heading p { font-size:12px; }
  .auth-form-grid { gap:12px 10px; }
  .auth-field { font-size:11px; }
  .auth-field input { min-height:45px; margin-top:5px; padding:10px; background:rgba(255,255,255,.94); font-size:13px; }
  .auth-field select { min-height:45px; margin-top:5px; padding:10px; font-size:12px; }
  .auth-submit { min-height:48px; }
  .auth-switch { margin-top:19px; font-size:12px; }
  .auth-demo-list { grid-template-columns:1fr; }
}

/* Tax Magazine header and top navigation polish. */
.app-header {
  background: linear-gradient(115deg, rgba(255,255,255,.98), rgba(244,251,246,.97) 60%, rgba(255,250,235,.96));
  border-bottom: 1px solid rgba(191, 148, 56, .38);
  box-shadow: 0 8px 24px rgba(6, 61, 31, .10);
}
.app-header-container { max-width: 1580px; padding-top: 11px; padding-bottom: 11px; gap: 12px; }
.brand-link { padding: 7px 10px; border: 1px solid rgba(0,135,61,.14); border-radius: 13px; background: linear-gradient(145deg,#fff,#f4fbf6); box-shadow: 0 3px 0 #d9ebdf, 0 8px 15px rgba(0,75,35,.08), inset 0 1px 0 #fff; }
.brand-link img { max-height: 43px; }
.desktop-top-nav { padding: 5px; border-color: rgba(0,135,61,.16); border-radius: 16px; background: linear-gradient(145deg,#f2f8f3,#e8f2eb); box-shadow: inset 0 1px 2px rgba(7,62,31,.08); }
.desktop-nav-link { min-height: 36px; padding: 8px 11px; border-radius: 11px; transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease; }
.desktop-nav-link:hover { transform: translateY(-1px); box-shadow: 0 4px 9px rgba(6,78,38,.1); }
.desktop-nav-link.active { color:#fff; background:linear-gradient(135deg,#087a3e,#064b27); box-shadow:0 3px 0 #04391d, 0 6px 12px rgba(6,78,38,.2), inset 0 1px 0 rgba(255,255,255,.25); }
.search-field-wrap { padding: 3px; border:1px solid #e0e9e2; border-radius:999px; background:#fff; box-shadow: inset 0 1px 2px rgba(23,55,34,.04), 0 3px 9px rgba(25,65,39,.05); }
.header-search-input { background:transparent; }
.header-search-input:focus { outline:none; }
.user-profile-chip { border-color:#bde5ca; background:linear-gradient(145deg,#f0fbf4,#e4f5e9); box-shadow:0 3px 0 #cce8d4, 0 6px 12px rgba(0,96,45,.08), inset 0 1px 0 #fff; }
.user-chip-name { font-weight:800; }
.user-profile-chip .badge { border-radius:999px; white-space:nowrap; }
.logout-compact-btn, .auth-guest-wrap > .btn { min-height:37px; border-radius:11px; box-shadow:0 3px 0 rgba(15,70,38,.1); }
@media (min-width:1024px) {
  .app-header-container { gap:10px; }
  .brand-link img { width:min(190px,16vw); }
  .desktop-top-nav { gap:2px; }
  .desktop-nav-link { padding-left:9px; padding-right:9px; font-size:12px; }
  .header-search-input { width:150px; }
  .header-search-input:focus { width:190px; }
}
@media (max-width:1023px) {
  .desktop-top-nav { border-radius:14px; }
  .desktop-nav-link { padding-left:9px; padding-right:9px; }
}
@media (max-width:767px) {
  .app-header { background:linear-gradient(160deg,#fff 0%,#f4fbf6 72%,#fffaf0 100%); }
  .app-header-container { display:grid; grid-template-columns:minmax(0,1fr); gap:9px; padding:11px 13px 13px; }
  .brand-link { grid-row:1; }
  .brand-link img { width:min(184px,58vw); max-height:39px; }
  .header-actions { grid-row:2; width:100%; justify-content:center; }
  #navbar-auth-actions, .auth-user-pill-wrap, .auth-guest-wrap { width:100%; justify-content:center; gap:8px; }
  .auth-user-pill-wrap { padding:5px 7px; border:1px solid rgba(12,126,62,.14); border-radius:16px; background:rgba(255,255,255,.78); box-shadow:0 4px 0 #e2eee5, 0 7px 13px rgba(9,78,39,.07); }
  .user-profile-chip { flex:0 1 auto; max-width:55vw; }
  .user-chip-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .user-profile-chip .badge { font-size:10px!important; }
  .search-field-wrap { grid-row:3; order:initial; width:100%; min-height:44px; padding:2px 5px; }
  .header-search-input { width:100%; }
  .header-search-input:focus { width:100%; }
  .logout-compact-btn, .auth-guest-wrap > .btn { min-height:36px; }
}

.auth-user-pill-wrap, .auth-guest-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 24px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
}

.user-profile-chip:hover {
  background: #d8f2e3;
}

.user-avatar-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

/* Main App Shell Layout */
.app-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
  width: 100%;
  flex: 1;
}

/* App View Switcher Section */
.app-view {
  display: none;
  animation: viewEnter 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-view.active {
  display: block;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatAmbient {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, 10px) scale(1.06); }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.35); }
}

.reveal-card {
  animation: cardReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Editorial Welcome Hero */
.editorial-hero {
  background: linear-gradient(135deg, #052e16 0%, #064e26 52%, #00873d 100%);
  border-radius: 22px;
  padding: 26px 30px;
  margin-bottom: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 24px;
  box-shadow: 0 18px 36px -12px rgba(6, 78, 38, 0.35);
}

.editorial-hero::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
  animation: floatAmbient 8s ease-in-out infinite;
}

.editorial-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 30%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.24) 0%, transparent 70%);
  pointer-events: none;
  animation: floatAmbient 10s ease-in-out infinite reverse;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-subtext {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-bottom: 16px;
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-glass-btn {
  padding: 8px 15px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-glass-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.hero-glass-btn.solid {
  background: #ffffff;
  color: #064e26;
  border-color: #ffffff;
}

.hero-stats-glass {
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
  z-index: 1;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.hero-stat-lbl {
  font-size: 11px;
  opacity: 0.84;
  margin-top: 3px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .editorial-hero {
    grid-template-columns: 1fr;
    padding: 20px 18px;
    gap: 16px;
    border-radius: 18px;
  }
  .hero-heading {
    font-size: 22px;
  }
  .hero-stats-glass {
    padding: 12px 14px;
  }
}

/* Year & Archive Navigation Bar */
.year-navigator-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.year-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.year-nav-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #064e26;
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

.year-pills-row::-webkit-scrollbar {
  display: none;
}

.year-pill-btn {
  padding: 8px 18px;
  background: #f1f5f2;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.year-pill-btn:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.year-pill-btn.active {
  background: linear-gradient(135deg, #00873d, #059669);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(0, 135, 61, 0.26);
}

/* Month Cards Grid (The Core App Experience) */
.month-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.month-app-card {
  background: white;
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.045);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.month-app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px -10px rgba(0, 135, 61, 0.18);
  border-color: var(--primary-border);
}

.month-card-header {
  background: linear-gradient(135deg, #052e16 0%, #09582b 55%, #00873d 100%);
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.month-card-header::after {
  content: '';
  position: absolute;
  top: -35px;
  right: -25px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.month-badge-large {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.month-year-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  opacity: 0.95;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.month-logo-mini {
  height: 28px;
  background: rgba(255, 255, 255, 0.95);
  padding: 3px 8px;
  border-radius: 6px;
  object-fit: contain;
}

.month-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
}

.month-topic-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.month-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.month-card-actions {
  display: flex;
  gap: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-locked {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-unlocked {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
}

.btn-phonepe {
  background: var(--phonepe);
  color: white;
}

.btn-phonepe:hover {
  background: var(--phonepe-hover);
  box-shadow: 0 4px 14px rgba(95, 37, 159, 0.3);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 10px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.pricing-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5fbf6 100%);
  border: 1px solid #c8e7d2;
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  isolation: isolate;
  overflow: visible;
}

.pricing-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -54px;
  right: -42px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 150, 81, 0.14), rgba(31, 150, 81, 0) 70%);
  pointer-events: none;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 10px 24px var(--primary-glow);
  transform: scale(1.02);
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #064e26;
  margin-bottom: 6px;
}

.plan-duration {
  align-self: flex-start;
  border: 1px solid #c9ead4;
  border-radius: 999px;
  padding: 6px 11px;
  background: #eaf8ef;
  font-size: 12px;
  font-weight: 800;
  color: #126337;
  margin-bottom: 16px;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  margin-bottom: 18px;
}

.plan-price span {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--text-muted);
}

.plan-window-heading { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #557364; margin-bottom: 5px; }
.plan-window-range { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.plan-window-range strong { color: #064e26; }
.plan-window-range span { color: #91a89a; }
.plan-window-duration { margin-top: 5px; font-size: 11px; color: #64786c; }

.plan-features {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modern Floating Bottom Dock (Hidden on Desktop, Visible on Tablet & Mobile) */
.app-bottom-nav {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 12px;
  right: 12px;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 135, 61, 0.16);
  border-radius: 22px;
  padding: 6px 4px;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  z-index: 90;
  box-shadow: 0 12px 32px rgba(6, 78, 38, 0.15), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.bottom-nav-item {
  flex: 1;
  min-width: 0;
  padding: 7px 2px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 9.8px;
  font-weight: 700;
  letter-spacing: -0.015em;
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

.bottom-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  transition: transform 0.22s ease;
}

.bottom-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-icon svg .ico-duotone {
  fill: currentColor;
  fill-opacity: 0.12;
  stroke: none;
  transition: fill-opacity 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-icon svg .ico-duotone {
  fill-opacity: 0.28;
}

.bottom-nav-item:hover {
  color: var(--primary);
  background: rgba(0, 135, 61, 0.05);
}

.bottom-nav-item.active {
  color: var(--primary-dark);
  background: linear-gradient(135deg, #e8f7ee, #d1fae5);
  box-shadow: inset 0 0 0 1px rgba(0, 135, 61, 0.18);
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-1px) scale(1.06);
  color: var(--primary);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 16px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--primary);
}

/* =========================================
   RESPONSIVE BREAKPOINTS: DESKTOP, TABLET & MOBILE
   ========================================= */

/* Tablet & Mobile (< 1024px): Hide Desktop Top Nav, Show Modern Floating Bottom Dock */
@media (max-width: 1023px) {
  body {
    padding-bottom: 96px;
  }

  .desktop-top-nav {
    display: none;
  }

  .app-bottom-nav {
    display: flex;
  }

  .app-header-container {
    padding: 10px 16px;
  }

  .app-main {
    padding: 20px 16px;
  }

  #toast-container {
    bottom: 92px;
    right: 14px;
    left: 14px;
  }

  .pricing-card.featured {
    transform: none;
  }
}

/* Tablet Specific (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .month-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trending-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-search-input {
    width: 220px;
  }
}

/* Mobile Specific (<= 767px) */
@media (max-width: 767px) {
  .app-header-container {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand-link img {
    width: min(190px, 52vw);
    max-height: 34px;
  }

  .header-actions {
    flex: 1;
    justify-content: flex-end;
    gap: 6px;
  }

  .search-field-wrap {
    width: 100%;
    order: 3;
    flex-basis: 100%;
  }

  .header-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
  }

  .header-search-input:focus {
    width: 100%;
  }

  .user-chip-name {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logout-compact-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .lang-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .year-navigator-card {
    padding: 14px;
  }

  .year-nav-title {
    font-size: 15px;
  }

  .month-cards-grid,
  .trending-news-grid,
  .pricing-grid,
  .archive-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .reader-header {
    padding: 0 10px;
  }

  .reader-header-title {
    max-width: 170px;
    font-size: 13px;
  }

  .paywall-card {
    padding: 22px 18px;
  }

  .checkout-wrapper {
    margin: 14px 10px !important;
  }
}

/* Extra Small Mobile (<= 400px) */
@media (max-width: 400px) {
  .app-bottom-nav {
    left: 6px;
    right: 6px;
    bottom: 10px;
    padding: 5px 3px;
  }
  .bottom-nav-item {
    font-size: 8.8px;
    padding: 6px 1px;
  }
  .bottom-nav-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 1024px) and (max-width: 1240px) {
  .desktop-nav-link {
    padding: 6px 9px;
    font-size: 12px;
    gap: 4px;
  }
  .header-search-input {
    width: 170px;
  }
  .header-search-input:focus {
    width: 210px;
  }
}

@media (max-width: 767px) {
  .app-header {
    background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%);
    border-bottom: 1px solid rgba(0, 135, 61, 0.2);
    box-shadow: 0 8px 22px rgba(5, 74, 37, 0.1);
  }

  .app-header-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px 14px;
  }

  .brand-link {
    grid-row: 1;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 4px 12px;
    border: 1px solid rgba(0, 135, 61, 0.12);
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #f3fbf6);
    box-shadow: 0 4px 0 #deeee4, 0 7px 16px rgba(0, 80, 38, 0.09), inset 0 1px 0 #ffffff;
  }

  .brand-link img {
    width: min(196px, 58vw);
    max-height: 38px;
    filter: drop-shadow(0 2px 2px rgba(0, 93, 42, 0.12));
  }

  .header-actions {
    grid-row: 2;
    flex: none;
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  #navbar-auth-actions,
  .auth-user-pill-wrap,
  .auth-guest-wrap {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .user-profile-chip {
    padding: 4px 9px 4px 4px;
    box-shadow: 0 3px 0 #c8e7d4, 0 5px 10px rgba(0, 96, 45, 0.1), inset 0 1px 0 #ffffff;
  }

  .logout-compact-btn {
    border-radius: 12px;
    box-shadow: 0 3px 0 #d8e1db, 0 5px 9px rgba(15, 23, 42, 0.08);
  }

  .lang-toggle-pill {
    padding: 3px;
    border-color: rgba(0, 135, 61, 0.14);
    background: linear-gradient(145deg, #ffffff, #eaf5ee);
    box-shadow: 0 3px 0 #d7e7dd, inset 0 1px 0 #ffffff;
  }

  .lang-btn.active {
    background: linear-gradient(145deg, #10a653, #007538);
    box-shadow: 0 3px 0 #005629, 0 4px 8px rgba(0, 105, 48, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .search-field-wrap {
    grid-row: 3;
    order: initial;
    width: 100%;
    min-width: 0;
    padding: 2px;
    border-radius: 17px;
    background: linear-gradient(145deg, #ffffff, #edf6f1);
    box-shadow: 0 4px 0 #dce9e1, 0 7px 14px rgba(10, 72, 38, 0.08), inset 0 1px 0 #ffffff;
  }

  .header-search-input {
    height: 44px;
    border-color: rgba(0, 98, 46, 0.12);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 2px 5px rgba(10, 70, 38, 0.045);
  }

  .app-bottom-nav {
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 7px 5px;
    gap: 3px;
    border: 1px solid rgba(0, 135, 61, 0.2);
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(236, 248, 241, 0.97));
    box-shadow: 0 8px 0 rgba(190, 219, 201, 0.74), 0 14px 28px rgba(3, 63, 30, 0.2), inset 0 1px 0 #ffffff;
    perspective: 800px;
  }

  .bottom-nav-item {
    gap: 5px;
    min-height: 62px;
    padding: 6px 1px 5px;
    border: 1px solid transparent;
    border-radius: 15px;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
  }

  .bottom-nav-icon {
    width: 34px;
    height: 32px;
    border: 1px solid rgba(67, 99, 81, 0.12);
    border-radius: 11px;
    color: #52677b;
    background: linear-gradient(145deg, #ffffff, #e6efea);
    box-shadow: 0 3px 0 #cbd9d1, 0 5px 8px rgba(29, 53, 39, 0.1), inset 0 1px 0 #ffffff;
    transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease, background 180ms ease, color 180ms ease;
  }

  .bottom-nav-icon svg {
    width: 19px;
    height: 19px;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
  }

  .bottom-nav-item:hover {
    color: var(--primary-dark);
    background: rgba(0, 135, 61, 0.045);
  }

  .bottom-nav-item.active {
    transform: translateY(-3px);
    border-color: rgba(0, 135, 61, 0.18);
    background: linear-gradient(155deg, #f4fff8, #d8f3e3);
    box-shadow: 0 4px 0 #b9dfc7, 0 7px 12px rgba(0, 108, 49, 0.13), inset 0 1px 0 #ffffff;
  }

  .bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-2px) rotateX(7deg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, #16a85a, #007337);
    box-shadow: 0 4px 0 #005327, 0 6px 9px rgba(0, 95, 43, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  }

  .bottom-nav-item.active .bottom-nav-icon svg {
    filter: drop-shadow(0 1px 1px rgba(0, 55, 24, 0.35));
  }

  .bottom-nav-item.active::after {
    top: -4px;
    width: 18px;
    height: 3px;
    box-shadow: 0 2px 5px rgba(0, 135, 61, 0.32);
  }

  .bottom-nav-item:active {
    transform: translateY(2px) scale(0.97);
  }
}

/* In-App Reader Modal Sheet (Fullscreen) */
.in-app-reader-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #1e293b;
  /* Keep the reader above the animated cover preview while the handoff runs. */
  z-index: 230;
  flex-direction: column;
  animation: slideUp 0.25s ease-out;
}

.in-app-reader-modal.active {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.reader-header {
  height: 56px;
  min-height: 56px;
  flex: 0 0 56px;
  box-sizing: border-box;
  background: #0d2116;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: white;
}

.reader-header-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.reader-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  background: radial-gradient(ellipse at center, #5b6470 0%, #27313b 78%);
  overflow: hidden;
}

.kindle-reader {
  position: relative;
  z-index: 11;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px clamp(8px, 2vw, 28px) 58px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.reader-book-stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2200px;
  perspective-origin: 50% 48%;
  touch-action: pan-y;
}

.reader-paper {
  position: relative;
  display: block;
  width: fit-content;
  height: fit-content;
  min-height: 0;
  max-height: calc(100dvh - 190px);
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  overflow: visible;
  border: 1px solid rgba(247, 238, 211, 0.7);
  border-radius: 13px 19px 19px 13px;
  background: linear-gradient(90deg, #40271b 0, #9a7651 1.1%, #e8dec9 2.3%, #fffdf7 3.4%, #fffdf7 96%, #ded2bb 98%, #8e6842 99.3%, #342117 100%);
  box-shadow: 0 34px 55px rgba(0, 0, 0, 0.48), 0 12px 0 #7e6043, 0 15px 0 #d1c1a6, 0 18px 0 #735638, 0 22px 35px rgba(0, 0, 0, 0.35), inset 13px 0 18px rgba(55, 35, 17, 0.2), inset -5px 0 9px rgba(54, 35, 18, 0.14);
  transform: rotateX(1deg);
  transform-origin: center center;
  transition: transform 190ms ease, opacity 190ms ease;
  backface-visibility: hidden;
}

/* The center hinge and curved leather spine make the spread read as a physical book. */
.reader-paper::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: clamp(22px, 2.2vw, 36px);
  transform: translateX(-50%);
  pointer-events: none;
  border-radius: 48%;
  background: linear-gradient(90deg, rgba(28, 20, 12, 0.2), rgba(73, 47, 26, 0.08) 22%, rgba(255, 255, 255, 0.58) 49%, rgba(69, 47, 29, 0.1) 76%, rgba(27, 19, 12, 0.18));
  box-shadow: 0 0 9px rgba(54, 38, 20, 0.25);
}

.reader-paper.cover-mode::before {
  left: 0;
  width: clamp(18px, 1.8vw, 28px);
  transform: translateX(-15%);
  border-radius: 50% 0 0 50%;
  background: linear-gradient(90deg, rgba(18, 14, 9, 0.8), rgba(69, 47, 26, 0.68) 30%, rgba(184, 145, 82, 0.42) 67%, rgba(30, 20, 12, 0.12));
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.24);
}

.reader-paper::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 5px;
  right: -8px;
  bottom: -8px;
  left: 7px;
  border-radius: 14px 20px 20px 14px;
  background: repeating-linear-gradient(180deg, #bca98a 0 1px, #f4ecdc 1px 3px);
  box-shadow: 6px 8px 12px rgba(0, 0, 0, 0.3);
}

.reader-paper.turn-forward {
  transform: none;
  opacity: 1;
}

.reader-paper.turn-backward {
  transform: none;
  opacity: 1;
}

.reader-pdf-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: #fffdf7;
  box-shadow: 0 4px 18px rgba(40, 32, 18, 0.16);
}

.reader-cover-page {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b321c;
  box-shadow: 0 4px 18px rgba(40, 32, 18, 0.16);
}

.reader-book-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 5px 12px 12px 5px;
  background: #fdfbf4;
  box-shadow: inset 0 0 0 1px rgba(80, 62, 28, 0.2), 0 6px 20px rgba(0, 0, 0, 0.22);
}

.reader-paper.cover-mode .reader-book-spread {
  grid-template-columns: minmax(0, 1fr);
  border-radius: 4px 12px 12px 4px;
  background: #103b24;
  box-shadow: inset 0 0 0 1px rgba(247, 213, 137, 0.22), inset 7px 0 12px rgba(20, 12, 7, 0.28), 0 5px 12px rgba(0, 0, 0, 0.28);
}

.reader-paper.cover-mode .reader-left-page { display: none !important; }
.reader-paper.cover-mode .reader-right-page {
  border-radius: 4px 12px 12px 4px;
  box-shadow: inset 8px 0 12px -8px rgba(18, 10, 5, 0.68), inset -2px 0 2px rgba(255, 255, 255, 0.08);
}

.reader-paper.cover-mode .reader-bookmark-ribbon { display: none; }

.reader-paper.cover-intro {
  animation: book-3d-arrive 760ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.reader-paper.cover-intro .reader-cover-page {
  transform-origin: left center;
  backface-visibility: hidden;
  animation: book-cover-unfold 820ms cubic-bezier(0.2, 0.72, 0.25, 1) both;
}

.reader-paper.cover-intro .reader-cover-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 24%, rgba(255, 255, 255, 0.02) 36%, rgba(255, 255, 255, 0.28) 48%, rgba(255, 255, 255, 0.04) 58%, transparent 72%);
  transform: translateX(-115%);
  animation: book-cover-sheen 900ms 220ms ease-out both;
}

@keyframes book-3d-arrive {
  0% { opacity: 0; transform: perspective(1500px) rotateY(-22deg) rotateX(9deg) translate3d(24px, 22px, -80px) scale(0.9); }
  65% { opacity: 1; transform: perspective(1500px) rotateY(4deg) rotateX(1deg) translate3d(-3px, -3px, 12px) scale(1.015); }
  100% { opacity: 1; transform: rotateX(1deg) translate3d(0, 0, 0) scale(1); }
}

@keyframes book-cover-unfold {
  0% { opacity: 0.45; transform: perspective(1100px) rotateY(-105deg); filter: brightness(0.58); }
  58% { opacity: 1; transform: perspective(1100px) rotateY(9deg); filter: brightness(1.12); }
  100% { opacity: 1; transform: perspective(1100px) rotateY(0); filter: brightness(1); }
}

@keyframes book-cover-sheen {
  to { transform: translateX(115%); }
}

.reader-page-sheet {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-style: preserve-3d;
  background: linear-gradient(90deg, #f5f0e4, #fffdf7 7%, #fffdf7 96%, #eee8db);
}

.reader-page-sheet::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  background: linear-gradient(90deg, #eee7d8, #fffdf7 12%, #fbf7ed 88%, #e9dfcd);
  box-shadow: inset 0 0 16px rgba(68, 49, 25, 0.13);
}

.reader-left-page {
  border-right: 1px solid rgba(72, 58, 32, 0.24);
  box-shadow: inset -18px 0 22px -16px rgba(45, 34, 18, 0.72), inset 0 0 1px rgba(94, 71, 39, 0.25);
}

.reader-right-page {
  box-shadow: inset 18px 0 22px -16px rgba(45, 34, 18, 0.72), inset 0 0 1px rgba(94, 71, 39, 0.25);
}

.reader-right-page .reader-pdf-canvas,
.reader-left-page .reader-pdf-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.reader-paper.turn-forward .reader-right-page {
  transform: perspective(1500px) rotateY(-178deg);
  transform-origin: left center;
}

.reader-paper.turn-backward .reader-left-page {
  transform: perspective(1500px) rotateY(178deg);
  transform-origin: right center;
}

.reader-page-sheet {
  transition: transform 760ms cubic-bezier(0.44, 0.02, 0.23, 1);
  backface-visibility: hidden;
  will-change: transform;
}

.reader-bookmark-ribbon {
  display: none;
  position: absolute;
  z-index: 6;
  top: -1px;
  right: 22px;
  width: 22px;
  height: 54px;
  background: linear-gradient(90deg, #8c1d22, #d13a3e 48%, #8b1720);
  filter: drop-shadow(1px 3px 2px rgba(32, 17, 11, 0.35));
}

.reader-bookmark-ribbon.visible { display: block; }
.reader-bookmark-ribbon::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 9px solid #f4ecdc;
}

.reader-cover-page > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reader-cover-fallback {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 28px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: #fef08a;
  background: radial-gradient(circle at 50% 35%, #17683a, #082815 75%);
  border: 3px solid #d6a634;
}

.reader-cover-fallback img {
  width: min(90%, 420px);
  height: auto;
  background: white;
}

.reader-cover-fallback strong {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 38px);
  line-height: 1.25;
  text-wrap: balance;
}

.reader-cover-fallback span {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.12em;
}

.reader-load-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  color: #173822;
  background: rgba(255, 253, 247, 0.94);
  font-size: 13px;
  font-weight: 700;
}

.reader-page-arrow {
  grid-row: 1;
  width: 46px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  color: white;
  background: rgba(8, 30, 18, 0.62);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.reader-page-arrow:hover {
  background: #0d512b;
  transform: scale(1.04);
}

.reader-page-arrow:first-child { grid-column: 1; }
.reader-page-arrow:nth-of-type(2) { grid-column: 3; }

.reader-page-toolbar {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: max(32px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 999px;
  color: #e8f5eb;
  background: linear-gradient(180deg, rgba(18, 50, 34, 0.94), rgba(5, 24, 16, 0.96));
  border: 1px solid rgba(226, 194, 119, 0.28);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.reader-page-toolbar button {
  position: relative;
  border: 1px solid rgba(224, 241, 225, 0.3);
  border-radius: 11px;
  padding: 7px 12px;
  color: white;
  background: linear-gradient(180deg, #477356 0%, #28553a 48%, #17432b 100%);
  box-shadow: 0 4px 0 #0a2a19, 0 6px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease, background 150ms ease;
}

.reader-page-toolbar button:hover:not(:disabled) {
  filter: brightness(1.16);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0a2a19, 0 9px 14px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.reader-page-toolbar button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0a2a19, 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reader-page-toolbar .reader-cover-button {
  color: #fff4c5;
  border-color: rgba(255, 220, 132, 0.6);
  background: linear-gradient(180deg, #b88b39, #8a5d1d);
  box-shadow: 0 4px 0 #5b3b14, 0 6px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.reader-page-toolbar #reader-mark-button {
  color: #fff0b0;
  border-color: rgba(255, 220, 132, 0.44);
  background: linear-gradient(180deg, #806638, #5c451f);
  box-shadow: 0 4px 0 #392910, 0 6px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reader-page-toolbar #reader-bookmark-button:not(:disabled) {
  color: #ffe1df;
  border-color: rgba(255, 180, 176, 0.46);
  background: linear-gradient(180deg, #9a4848, #6d292c);
  box-shadow: 0 4px 0 #43191b, 0 6px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reader-page-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.reader-page-toolbar button:focus-visible {
  outline: 2px solid #ffe08a;
  outline-offset: 3px;
}

.reader-page-toolbar span { min-width: 105px; text-align: center; }

@media (max-width: 767px) {
  .reader-header {
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }
  #in-app-reader .reader-header > div:first-child {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  #in-app-reader .reader-header > div:first-child > button {
    padding: 7px 9px !important;
    white-space: nowrap;
    font-size: 12px;
  }
  #in-app-reader-title {
    display: block;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px !important;
  }
  #in-app-reader-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    gap: 7px !important;
  }
  #in-app-reader-actions > a {
    max-width: calc(100% - 44px);
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  #in-app-reader-actions > button {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    color: white !important;
    background: linear-gradient(180deg, #355743, #183524) !important;
  }
  .reader-body { flex: 1 1 0; width: 100%; min-height: 0; }
  .kindle-reader {
    padding: 10px 8px 104px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }
  .reader-page-arrow {
    position: absolute;
    z-index: 15;
    top: 50%;
    width: 34px;
    height: 48px;
    border-radius: 12px;
    font-size: 30px;
    transform: translateY(-50%);
  }
  .reader-page-arrow:hover { transform: translateY(-50%) scale(1.03); }
  .reader-page-arrow:first-child { left: 5px; }
  .reader-page-arrow:nth-of-type(2) { right: 5px; }
  .reader-book-stage { grid-column: 1; grid-row: 1; width: 100%; height: 100%; }
  .reader-paper {
    max-height: 100%;
    padding: 5px;
    border-radius: 3px 8px 8px 3px;
  }
  .reader-paper::before { display: none; }
  .reader-paper::after { right: -5px; bottom: -5px; }
  .reader-book-spread { display: block; }
  .reader-left-page { display: none !important; }
  .reader-right-page { width: 100%; height: 100%; }
  .reader-cover-fallback { padding: 14px; }
  .reader-page-toolbar {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
    padding: 9px;
    border-radius: 18px;
    font-size: 10px;
  }
  .reader-page-toolbar button {
    min-width: 0;
    min-height: 36px;
    width: 100%;
    padding: 6px 5px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
  }
  .reader-page-toolbar .reader-cover-button { grid-column: 1; grid-row: 1; }
  .reader-page-toolbar button[aria-label="Previous page"] { grid-column: 2; grid-row: 1; }
  .reader-page-toolbar button[aria-label="Next page"] { grid-column: 3; grid-row: 1; }
  .reader-page-toolbar #reader-mark-button { grid-column: 1; grid-row: 2; }
  .reader-page-toolbar #reader-bookmark-button { grid-column: 2; grid-row: 2; }
  .reader-page-toolbar span {
    grid-column: 3;
    grid-row: 2;
    min-width: 0;
    white-space: nowrap;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reader-paper { transition-duration: 0.01ms; }
  .reader-paper.cover-intro,
  .reader-paper.cover-intro .reader-cover-page,
  .reader-paper.cover-intro .reader-cover-page::after { animation-duration: 0.01ms; animation-delay: 0ms; }
}

/* Watermark Overlay */
.watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  opacity: 0.12;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  overflow: hidden;
  user-select: none;
}

.watermark-item {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
  transform: rotate(-25deg);
  padding: 30px;
  white-space: nowrap;
}

/* Paywall Modal */
.paywall-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 210;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.paywall-card {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-border);
}

.paywall-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #064e26;
  margin-bottom: 8px;
}

.paywall-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Section titles for dashboard & pages */
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #064e26;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Form inputs & labels */
input, select, textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: -0.01em;
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  background: #0d2116;
  color: white;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { background: #064e26; border-left: 4px solid #10b981; }
.toast.error { background: #7f1d1d; border-left: 4px solid #ef4444; }
.toast.info { background: #0d2116; border-left: 4px solid var(--primary); }

/* =========================================
   LIVE APP MARQUEE BANNER
   ========================================= */
.app-marquee-bar {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
}

.marquee-label-chip {
  flex-shrink: 0;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.marquee-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  animation: saralMarqueeScroll var(--marquee-speed, 24s) linear infinite;
}

.app-marquee-bar:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes saralMarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =========================================
   TRENDING NEWS GRID & CARDS (FREE PUBLIC)
   ========================================= */
.trending-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-bottom: 36px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.news-card-media {
  width: 100%;
  height: 185px;
  background: linear-gradient(135deg, #064e26, #00873d);
  position: relative;
  overflow: hidden;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-category-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-free-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #10b981;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-card-content {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
}

.news-card-excerpt {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* =========================================
   PLAN START DATE MODAL & LEGACY DASHBOARD
   ========================================= */
.site-header {
  background: white;
  border-bottom: 2px solid var(--primary-border);
  padding: 10px 20px;
}

.nav-container, .container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.container {
  padding: 28px 20px;
  flex: 1;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.edition-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.edition-thumb {
  background: linear-gradient(135deg, #09371c, #00873d);
  padding: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edition-thumb .card-logo {
  height: 26px;
  background: white;
  padding: 2px 6px;
  border-radius: 6px;
}

.edition-thumb .month-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.edition-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.edition-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.year-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.year-tab {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.year-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.site-footer {
  background: #0d2116;
  color: #cbd5e1;
  padding: 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================
   LANGUAGE SWITCHER (EN | हिं)
   ========================================= */
.lang-toggle-pill {
  display: inline-flex;
  align-items: center;
  background: #f1f5f2;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 135, 61, 0.24);
}

/* =========================================
   UNIFIED ELEGANT APP FOOTER
   ========================================= */
.app-site-footer {
  background: linear-gradient(135deg, #062b16 0%, #0d2116 100%);
  color: #cbd5e1;
  margin-top: auto;
  border-top: 2px solid var(--primary);
  padding: 36px 24px 28px;
}

@media (max-width: 1023px) {
  .app-site-footer {
    padding-bottom: 108px;
  }
}

.app-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

@media (max-width: 767px) {
  .app-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.app-footer-heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #86efac;
  margin-bottom: 12px;
}

.app-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s;
}

.app-footer-links a:hover {
  color: #4ade80;
}

.app-footer-bottom {
  max-width: 1240px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
}

/* =========================================
   LEGAL & QUERY / ASK QUESTION PAGES
   ========================================= */
.legal-hero {
  background: linear-gradient(135deg, #064e26, #00873d);
  color: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.legal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.legal-card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #064e26;
  margin: 20px 0 8px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p, .legal-card li {
  font-size: 14.5px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 8px;
}

.legal-card ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.query-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.query-reply-box {
  background: #e8f7ee;
  border: 1px solid var(--primary-border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 14px;
}

/* =========================================
   POLISHED INTERACTIVE MOTION & SCROLL UX
   ========================================= */
.month-card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  transform: skewX(-18deg);
  transition: left 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.month-app-card:hover .month-card-header::before {
  left: 145%;
}

.news-card,
.pricing-card,
.query-card,
.legal-card {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px -10px rgba(0, 135, 61, 0.16);
}

.pricing-card.featured:hover {
  transform: scale(1.02) translateY(-5px);
}

.paywall-modal .paywall-card {
  animation: modalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Premium month/year subscription picker */
.paywall-modal .plan-start-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  max-width: 600px !important;
  padding: 30px !important;
  border: 1px solid rgba(91, 190, 126, 0.7);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 180, 78, 0.14), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f7fcf8 58%, #edf8f0 100%);
  box-shadow: 0 28px 80px rgba(3, 28, 16, 0.32), 0 8px 24px rgba(0, 135, 61, 0.12);
  animation: planPickerEnter 0.52s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.plan-start-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #087d3d, #55bd78 55%, #d9a83d);
}

.plan-start-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 7px;
  bottom: 0;
  left: -65%;
  width: 42%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: planCardSheen 1.15s 0.28s ease-out both;
}

.plan-start-card > * { position: relative; z-index: 1; }

.plan-picker-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.plan-picker-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #9a7020;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.plan-picker-eyebrow::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0b8a45, #d4a33b);
}

.plan-picker-heading p {
  margin: 6px 0 0;
  color: #687b70;
  font-size: 13px;
}

.plan-picker-close {
  min-width: 76px;
  min-height: 38px;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.plan-picker-close:hover { transform: rotate(-3deg) translateY(-1px); background: #f1f8f3; box-shadow: 0 5px 12px rgba(17, 98, 53, 0.09); }

.plan-start-card h3 {
  font-size: clamp(21px, 4vw, 27px);
  color: #064e26;
}

#start-modal-plan-info {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #c9e4d1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 12px rgba(10, 83, 43, 0.06), inset 0 1px #fff;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

#start-modal-plan-info:hover { transform: translateY(-1px); border-color: #7bc292; box-shadow: 0 7px 16px rgba(10, 83, 43, 0.1), inset 0 1px #fff; }

.plan-selection-panel {
  position: relative;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid rgba(93, 181, 123, 0.55);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(240, 250, 243, 0.98), rgba(255, 255, 255, 0.9));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95), 0 10px 28px rgba(17, 98, 53, 0.07);
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}

.plan-selection-panel:hover {
  transform: translateY(-2px);
  border-color: #42a96a;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95), 0 16px 34px rgba(17, 98, 53, 0.11);
}

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

.plan-start-fields label {
  display: block;
  margin: 0 0 7px;
  color: #466252;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.plan-start-fields select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #d4e4d9;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #13291b;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(12, 64, 34, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.plan-start-fields select:hover { border-color: #65bb82; }
.plan-start-fields select:focus-visible {
  border-color: #168149;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(28, 151, 77, 0.14), 0 6px 16px rgba(12, 64, 34, 0.08);
  transform: translateY(-1px);
}

.plan-start-preview {
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid #b7e3c4;
  border-radius: 16px;
  background: radial-gradient(circle at 100% 0%, rgba(220, 174, 69, 0.12), transparent 34%), linear-gradient(110deg, #ffffff, #f7fcf8);
  color: #064e26;
  font-size: 13px;
  box-shadow: 0 7px 18px rgba(8, 85, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.plan-start-preview:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(8, 85, 42, 0.1); }
.plan-window-heading { color: #547365; }
.plan-window-range { font-size: 15px; }

.plan-start-actions { display: flex; gap: 12px; }
.plan-start-actions .btn {
  min-height: 52px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.plan-start-actions .btn:first-child { flex: 0.42; }
.plan-start-actions .btn:last-child {
  position: relative;
  overflow: hidden;
  flex: 1;
  background: linear-gradient(135deg, #54208c, #7135b2 58%, #4d1d83);
  box-shadow: 0 8px 18px rgba(91, 39, 145, 0.23), inset 0 1px rgba(255, 255, 255, 0.22);
}
.plan-start-actions .btn:last-child::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -55%;
  width: 36%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.plan-start-actions .btn:last-child:hover::after { left: 125%; }
.plan-start-actions .btn:hover { transform: translateY(-3px); box-shadow: 0 13px 24px rgba(20, 74, 42, 0.18); }
.plan-start-actions .btn:last-child:hover { box-shadow: 0 14px 27px rgba(91, 39, 145, 0.34); filter: brightness(1.06); }
.plan-start-actions .btn:active { transform: translateY(0) scale(0.985); }

.pricing-card {
  transform-style: preserve-3d;
  will-change: transform;
  background-image: linear-gradient(145deg, #fff 0%, #f7fcf8 72%, #eef8f1 100%);
  box-shadow: 0 12px 28px rgba(13, 71, 38, 0.08), inset 0 1px rgba(255, 255, 255, 0.9);
  animation: planCardRise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pricing-card:nth-child(2) { animation-delay: 70ms; }
.pricing-card:nth-child(3) { animation-delay: 140ms; }
.pricing-card:nth-child(4) { animation-delay: 210ms; }
.pricing-card .plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #073f25;
  text-shadow: 0 1px rgba(255, 255, 255, 0.8);
}
.pricing-card .plan-price span {
  padding: 4px 8px;
  border: 1px solid rgba(13, 117, 59, 0.12);
  border-radius: 999px;
  background: rgba(235, 248, 239, 0.86);
}
.pricing-card .btn-phonepe {
  position: relative;
  overflow: hidden;
  box-shadow: 0 7px 16px rgba(86, 34, 138, 0.2), inset 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.pricing-card .btn-phonepe::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -55%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.pricing-card .btn-phonepe:hover { transform: translateY(-2px); box-shadow: 0 12px 23px rgba(86, 34, 138, 0.3); filter: brightness(1.05); }
.pricing-card .btn-phonepe:hover::after { left: 125%; }

.pricing-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 100% 0%, rgba(220, 174, 69, 0.16), transparent 34%);
  opacity: 0.55;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pricing-card:hover {
  transform: perspective(900px) translateY(-8px) rotateX(1.5deg) scale(1.012);
  border-color: #59b877;
  box-shadow: 0 22px 42px rgba(13, 71, 38, 0.16), 0 0 0 4px rgba(46, 160, 84, 0.06);
}

.pricing-card:hover::before { opacity: 1; }
.pricing-card.featured { box-shadow: 0 18px 38px rgba(0, 135, 61, 0.17), inset 0 1px rgba(255, 255, 255, 0.9); }
.pricing-card.featured:hover { transform: perspective(900px) translateY(-9px) rotateX(1.5deg) scale(1.035); }
.featured-ribbon { background: linear-gradient(100deg, #087d3d, #14974e 60%, #b98a2c); box-shadow: 0 5px 14px rgba(6, 78, 38, 0.19); }

@keyframes planPickerEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.965) rotateX(3deg); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}

@keyframes planCardSheen {
  from { left: -65%; opacity: 0; }
  18% { opacity: 1; }
  to { left: 130%; opacity: 0; }
}

@keyframes planCardRise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .paywall-modal .plan-start-card { padding: 22px 18px !important; border-radius: 22px; }
  .plan-picker-heading { gap: 8px; }
  .plan-picker-heading p { max-width: 230px; font-size: 12px; }
  .plan-picker-close { min-width: 62px; padding-inline: 8px; }
  .plan-selection-panel { padding: 15px; border-radius: 17px; }
  .plan-start-fields { gap: 10px; }
  .plan-start-fields select { min-height: 47px; padding: 0 10px; font-size: 14px; }
  .plan-start-preview { padding: 13px; }
  .plan-window-range { font-size: 13px; }
  .plan-start-actions { gap: 9px; }
  .plan-start-actions .btn { min-height: 49px; padding-inline: 10px; }
}

@media (max-width: 380px) {
  .plan-start-fields { grid-template-columns: 1fr; }
  .plan-window-range { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .paywall-modal .plan-start-card, .plan-selection-panel, .plan-start-fields select,
  .plan-start-preview, .plan-start-actions .btn, .pricing-card { animation: none !important; transition: none !important; }
}

.paywall-card-premium {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(93, 181, 123, 0.7);
  border-radius: 24px;
  background: radial-gradient(circle at 100% 0%, rgba(220, 174, 69, 0.14), transparent 34%), linear-gradient(145deg, #fff 0%, #f7fcf8 100%);
  box-shadow: 0 30px 90px rgba(2, 18, 32, 0.34), inset 0 1px #fff;
  animation: planPickerEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.paywall-card-premium::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #078341, #68c688 55%, #d5a33c);
}
.paywall-emblem {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px solid #b9e4c6;
  border-radius: 20px;
  background: linear-gradient(145deg, #effbf3, #fff);
  color: #087d3d;
  box-shadow: 0 8px 18px rgba(8, 125, 61, 0.12), inset 0 1px #fff;
  transform: rotate(-4deg);
}
.paywall-kicker { display: block; margin-bottom: 8px; color: #9a7020; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.paywall-card-premium h2 { font-family: var(--font-display); font-size: clamp(22px, 4vw, 28px) !important; }
.paywall-card-premium .btn { box-shadow: 0 8px 18px rgba(91, 39, 145, .22); transition: transform .2s ease, box-shadow .2s ease; }
.paywall-card-premium .btn:hover { transform: translateY(-2px); box-shadow: 0 13px 24px rgba(91, 39, 145, .3); }

.checkout-promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: -2px 0 18px; }
.checkout-promo-field { display: block; padding: 13px; border: 1px solid #d8eadf; border-radius: 15px; background: linear-gradient(145deg, #f6fcf8, #fff); color: #124a2c; font-size: 12px; font-weight: 850; }
.checkout-promo-field > span { display: block; margin: 4px 0 9px; color: #718277; font-size: 10px; font-weight: 600; }
.checkout-promo-field > div { display: flex; gap: 6px; }
.checkout-promo-field input { width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid #d5e5da; border-radius: 10px; outline: none; background: #fff; color: #193526; font: inherit; font-size: 12px; font-weight: 650; }
.checkout-promo-field input:focus { border-color: #38a365; box-shadow: 0 0 0 3px rgba(28,151,77,.12); }
.checkout-promo-field button { flex: 0 0 auto; padding: 0 12px; border: 0; border-radius: 10px; background: linear-gradient(145deg,#087d3d,#0c9650); color: white; font: inherit; font-size: 11px; font-weight: 850; cursor: pointer; box-shadow: 0 4px 10px rgba(8,125,61,.18); }
.checkout-promo-field small { display: block; min-height: 15px; margin-top: 6px; color: #77877e; font-size: 10px; font-weight: 650; }
.checkout-promo-field small.is-valid { color: #087d3d; }.checkout-promo-field small.is-invalid { color: #b42318; }
.profile-referral-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; margin: 12px 0; padding: 12px 14px; border: 1px solid #bee5c9; border-radius: 15px; background: linear-gradient(110deg,#effaf2,#fff); box-shadow: 0 7px 18px rgba(10,83,43,.06); }
.profile-referral-card > span { color: #687b70; font-size: 11px; font-weight: 750; }.profile-referral-card strong { color: #075d30; letter-spacing: .08em; }
.profile-referral-card button { padding: 7px 10px; border: 1px solid #bce0c6; border-radius: 9px; background: white; color: #087d3d; font-weight: 800; cursor: pointer; }
.profile-referral-card small { grid-column: 1 / -1; color: #75847b; font-size: 10px; }
@media(max-width:560px){.checkout-promo-grid{grid-template-columns:1fr;gap:9px}.paywall-card-premium{padding:28px 20px!important;border-radius:21px}.profile-referral-card{grid-template-columns:1fr auto auto}}
@media(prefers-reduced-motion:reduce){.paywall-card-premium{animation:none!important}}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.85);
  animation: livePulse 1.6s ease-in-out infinite;
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00873d, #10b981, #38bdf8);
  z-index: 120;
  transition: width 0.08s linear;
  pointer-events: none;
}

.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #064e26;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(6, 78, 38, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: var(--primary);
  transform: translateY(-2px) scale(1.05);
}

@media (max-width: 1023px) {
  .back-to-top-btn {
    bottom: 92px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

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

/* =========================================
   ANIMATED 3D BOOK SHOWCASE & MINI COVERS (CLIENT APP)
   ========================================= */
.month-mini-book {
  width: 48px;
  height: 64px;
  border-radius: 3px 7px 7px 3px;
  border-left: 4px solid rgba(6, 78, 38, 0.9);
  border-top: 1.5px solid rgba(254, 240, 138, 0.7);
  border-right: 1.5px solid rgba(254, 240, 138, 0.45);
  border-bottom: 1.5px solid rgba(254, 240, 138, 0.7);
  background: linear-gradient(145deg, #0b5e2e, #052e16);
  box-shadow: -3px 6px 12px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fef08a;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  transform: perspective(300px) rotateY(-10deg);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.month-mini-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.month-app-card:hover .month-mini-book {
  transform: perspective(300px) rotateY(-2deg) scale(1.06);
  box-shadow: -5px 10px 16px rgba(0, 0, 0, 0.32);
}

/* Animated 3D Book Showcase Modal */
.book-showcase-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 28, 15, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 215;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.book-showcase-overlay.active {
  display: flex;
}

.book-showcase-shell {
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf6 100%);
  border-radius: 24px;
  max-width: 820px;
  width: 100%;
  border: 1.5px solid rgba(0, 135, 61, 0.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  position: relative;
  animation: modalPop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.book-showcase-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.book-showcase-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Left 3D Stage */
.book-3d-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(34, 197, 94, 0.24) 0%, transparent 62%),
    linear-gradient(155deg, #06391c 0%, #0b5128 55%, #052613 100%);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  position: relative;
  overflow: hidden;
}

.book-3d-orbit {
  transform-style: preserve-3d;
  animation: bookContinuousOrbit 4.8s ease-in-out infinite;
  cursor: pointer;
}

.book-3d-orbit:hover {
  animation-play-state: paused;
}

@keyframes bookContinuousOrbit {
  0%, 100% {
    transform: rotateY(-18deg) rotateX(5deg) translateY(0px);
  }
  50% {
    transform: rotateY(10deg) rotateX(-2deg) translateY(-10px);
  }
}

.book-3d-object {
  position: relative;
  width: 196px;
  height: 274px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Inner White Page Stack + Preview Text */
.book-3d-inside {
  position: absolute;
  inset: 4px 2px 4px 8px;
  background: linear-gradient(180deg, #fffdf7 0%, #f8f5ea 100%);
  border-radius: 3px 10px 10px 3px;
  border: 1px solid #e2d9c2;
  padding: 18px 16px;
  box-shadow: inset 8px 0 18px rgba(0, 0, 0, 0.12), 10px 14px 26px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transform: translateZ(-12px);
}

/* Layered Paper Side Edge Thickness */
.book-3d-edge {
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 0;
  width: 24px;
  background: repeating-linear-gradient(
    90deg,
    #f8f4e8 0px,
    #f8f4e8 2px,
    #ddd5bf 2px,
    #ddd5bf 3px
  );
  transform: rotateY(90deg) translateZ(12px);
  border-radius: 0 2px 2px 0;
}

/* Hardcover Spine Binding */
.book-3d-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 24px;
  background: linear-gradient(90deg, #042210 0%, #0b4a26 55%, #062f17 100%);
  transform: rotateY(-90deg) translateZ(12px);
  border-left: 1px solid rgba(254, 240, 138, 0.45);
}

/* Animated Front Cover (Displays Admin Uploaded Cover Image) */
.book-3d-cover {
  position: absolute;
  inset: 0;
  border-radius: 4px 12px 12px 4px;
  background: linear-gradient(145deg, #136835 0%, #062b15 100%);
  border-left: 8px solid #041d0e;
  border-top: 2px solid #eab308;
  border-right: 2px solid rgba(234, 179, 8, 0.6);
  border-bottom: 2px solid #eab308;
  box-shadow: -8px 14px 30px rgba(0, 0, 0, 0.42);
  transform-origin: left center;
  transform: translateZ(12px);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: visible;
}

/* Gloss sheen sweeping gently across book cover */
.book-3d-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 65%;
  height: 100%;
  background: linear-gradient(108deg, transparent 20%, rgba(255, 255, 255, 0.25) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: bookGlassSheen 3.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bookGlassSheen {
  0%, 35% { left: -130%; }
  75%, 100% { left: 150%; }
}

.book-3d-object.is-open .book-3d-cover,
.book-3d-orbit:hover .book-3d-object .book-3d-cover {
  transform: translateZ(12px) rotateY(-128deg);
}

.book-3d-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-3d-cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(transparent, rgba(4, 28, 13, 0.92));
  padding: 18px 12px 10px;
  color: #ffffff;
  text-align: center;
}

.book-stage-hint {
  margin-top: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: #bbf7d0;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-meta-pane {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 767px) {
  .book-showcase-shell {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .book-3d-stage {
    padding: 26px 20px 20px;
  }
  .book-3d-object {
    width: 156px;
    height: 220px;
  }
  .book-meta-pane {
    padding: 20px;
  }
}

/* Final overrides keep the Tax Magazine topbar above legacy responsive rules. */
.app-header { background:linear-gradient(115deg,rgba(255,255,255,.98),rgba(244,251,246,.97) 60%,rgba(255,250,235,.96)); border-bottom:1px solid rgba(191,148,56,.38); box-shadow:0 8px 24px rgba(6,61,31,.10); }
.app-header-container { max-width:1580px; padding-top:11px; padding-bottom:11px; gap:12px; }
.brand-link { padding:7px 10px; border:1px solid rgba(0,135,61,.14); border-radius:13px; background:linear-gradient(145deg,#fff,#f4fbf6); box-shadow:0 3px 0 #d9ebdf,0 8px 15px rgba(0,75,35,.08),inset 0 1px 0 #fff; }
.brand-link img { max-height:43px; }
.desktop-top-nav { padding:5px; border-color:rgba(0,135,61,.16); border-radius:16px; background:linear-gradient(145deg,#f2f8f3,#e8f2eb); box-shadow:inset 0 1px 2px rgba(7,62,31,.08); }
.desktop-nav-link { min-height:36px; padding:8px 10px; border-radius:11px; transition:transform .18s ease,color .18s ease,background .18s ease,box-shadow .18s ease; }
.desktop-nav-link:hover { transform:translateY(-1px); box-shadow:0 4px 9px rgba(6,78,38,.1); }
.desktop-nav-link.active { color:#fff; background:linear-gradient(135deg,#087a3e,#064b27); box-shadow:0 3px 0 #04391d,0 6px 12px rgba(6,78,38,.2),inset 0 1px 0 rgba(255,255,255,.25); }
.search-field-wrap { padding:3px; border:1px solid #e0e9e2; border-radius:999px; background:#fff; box-shadow:inset 0 1px 2px rgba(23,55,34,.04),0 3px 9px rgba(25,65,39,.05); }
.header-search-input { background:transparent; }
.user-profile-chip { border-color:#bde5ca; background:linear-gradient(145deg,#f0fbf4,#e4f5e9); box-shadow:0 3px 0 #cce8d4,0 6px 12px rgba(0,96,45,.08),inset 0 1px 0 #fff; }
.user-chip-name { font-weight:800; }
.user-profile-chip .badge { border-radius:999px; white-space:nowrap; }
.logout-compact-btn,.auth-guest-wrap>.btn { min-height:37px; border-radius:11px; box-shadow:0 3px 0 rgba(15,70,38,.1); }
@media (min-width:1024px) { .app-header-container { gap:10px; } .brand-link img { width:min(190px,16vw); } .desktop-top-nav { gap:2px; } .desktop-nav-link { padding-left:8px; padding-right:8px; font-size:12px; } .header-search-input { width:145px; } .header-search-input:focus { width:180px; } }
@media (max-width:1023px) and (min-width:768px) { .desktop-top-nav { border-radius:14px; } .desktop-nav-link { padding-left:8px; padding-right:8px; } }
@media (max-width:767px) {
  .app-header { background:linear-gradient(160deg,#fff 0%,#f4fbf6 72%,#fffaf0 100%); }
  .app-header-container { display:grid; grid-template-columns:minmax(0,1fr); gap:9px; padding:11px 13px 13px; }
  .brand-link { grid-row:1; }
  .brand-link img { width:min(184px,58vw); max-height:39px; }
  .header-actions { grid-row:2; width:100%; justify-content:center; }
  #navbar-auth-actions,.auth-user-pill-wrap,.auth-guest-wrap { width:100%; justify-content:center; gap:8px; }
  .auth-user-pill-wrap { padding:5px 7px; border:1px solid rgba(12,126,62,.14); border-radius:16px; background:rgba(255,255,255,.78); box-shadow:0 4px 0 #e2eee5,0 7px 13px rgba(9,78,39,.07); }
  .user-profile-chip { flex:0 1 auto; max-width:55vw; }
  .user-chip-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .user-profile-chip .badge { font-size:10px!important; }
  .search-field-wrap { grid-row:3; order:initial; width:100%; min-height:44px; padding:2px 5px; }
  .header-search-input,.header-search-input:focus { width:100%; }
  .logout-compact-btn,.auth-guest-wrap>.btn { min-height:36px; }
}

/* Signup book intro: a closed hardcover opens into a spiral-bound reader spread. */
.auth-animated-book {
  width:min(380px,100%);
  min-height:530px;
  grid-template-columns:minmax(0,1fr);
  overflow:visible;
  transition:width 1.35s cubic-bezier(.2,.75,.2,1), min-height 1.1s ease, margin .8s ease, grid-template-columns 1.1s ease, filter .5s ease;
  filter:drop-shadow(0 32px 34px rgba(10,45,25,.22));
}
.auth-animated-book:not(.is-opening):not(.is-open) { animation: closedBookFloat 3.4s ease-in-out infinite; }
.auth-animated-book:not(.is-opening):not(.is-open) .auth-book-cover,
.auth-animated-book:not(.is-opening):not(.is-open) .auth-paper { display:none; visibility:hidden; opacity:0; }
.auth-animated-book.is-opening,.auth-animated-book.is-open {
  width:min(1060px,100%);
  min-height:650px;
  grid-template-columns:minmax(280px,.82fr) minmax(0,1fr);
  animation:none;
}
.auth-animated-book.is-opening .auth-book-cover,.auth-animated-book.is-opening .auth-paper,
.auth-animated-book.is-open .auth-book-cover,.auth-animated-book.is-open .auth-paper {
  display:block;
  visibility:visible;
  opacity:1;
}
.auth-animated-book.is-opening .auth-book-cover,.auth-animated-book.is-open .auth-book-cover { display:flex; }
.auth-animated-book.is-opening .auth-book-cover,.auth-animated-book.is-open .auth-book-cover {
  border-radius:19px 4px 4px 19px;
  border-right:0;
  transform:none;
  animation: openPageReveal .8s .46s both;
}
.auth-animated-book.is-opening .auth-paper,.auth-animated-book.is-open .auth-paper {
  border-radius:4px 19px 19px 4px;
  animation: openPageReveal .8s .68s both;
}
.auth-animated-book .auth-book-closed-cover {
  position:absolute;
  inset:0;
  z-index:10;
  box-sizing:border-box;
  width:100%;
  height:100%;
  padding:48px 38px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid #d9ad4f;
  border-right:10px solid #a97821;
  border-radius:20px 8px 8px 20px;
  color:#fff4bd;
  background:radial-gradient(ellipse at 72% 18%,rgba(39,151,79,.55),transparent 34%),radial-gradient(ellipse at 20% 85%,rgba(1,38,20,.75),transparent 46%),linear-gradient(135deg,#063619,#08723b 56%,#064322);
  box-shadow:inset -15px 0 22px rgba(0,0,0,.29),inset 0 0 0 7px rgba(232,187,75,.12),0 20px 34px rgba(0,0,0,.28);
  cursor:pointer;
  transform-origin:left center;
  transition:width 1.2s ease,transform 1.4s cubic-bezier(.25,.8,.2,1),opacity .32s ease 1.02s,border-radius .5s ease;
  backface-visibility:hidden;
}
.auth-animated-book .auth-book-closed-cover::before { content:'';position:absolute;inset:15px;border:1px solid rgba(246,214,129,.52);border-radius:12px;pointer-events:none; }
.auth-animated-book .auth-book-closed-cover::after { content:'';position:absolute;inset:0 0 0 auto;width:18px;background:linear-gradient(90deg,rgba(255,255,255,.14),rgba(0,0,0,.15)); }
.closed-cover-logo { width:min(300px,90%);padding:13px 16px;border-radius:12px;background:#fff;box-shadow:0 12px 24px rgba(0,0,0,.2); }
.closed-cover-logo img { display:block;width:100%;max-height:85px;object-fit:contain; }
.closed-cover-rule { width:76px;height:2px;margin:33px 0 19px;background:linear-gradient(90deg,transparent,#f2d36d,transparent); }
.closed-cover-edition { color:#d5e8d8;font-size:10px;font-weight:800;letter-spacing:.2em;text-align:center; }
.closed-cover-title { margin-top:17px;text-align:center;color:#ffedaa;font:800 clamp(27px,4vw,39px)/1.14 'Playfair Display',serif;text-shadow:0 3px 12px rgba(0,0,0,.25); }
.closed-cover-subtitle { margin-top:18px;color:#c1e7ca;font-size:10px;font-weight:800;letter-spacing:.18em; }
.closed-cover-open { position:absolute;bottom:29px;display:flex;gap:9px;align-items:center;padding:10px 15px;border:1px solid rgba(255,255,255,.24);border-radius:999px;color:#f8f2d9;background:rgba(0,0,0,.18);font-size:11px;font-weight:700; }
.closed-cover-open b { font-size:17px;color:#ffda75; }
.auth-animated-book.is-opening .auth-book-closed-cover { width:50%; transform:perspective(1500px) rotateY(-158deg) translateZ(20px); opacity:0; pointer-events:none; }
.auth-animated-book.is-open .auth-book-closed-cover { visibility:hidden; pointer-events:none; }
.auth-book-spiral { position:absolute;left:50%;top:17px;bottom:17px;z-index:8;width:30px;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 3px 3px rgba(25,27,18,.24)); }
.auth-book-spiral::before { content:'';position:absolute;inset:0 5px;background:repeating-radial-gradient(ellipse 8px 6px at 50% 6px,transparent 0 3px,#e5cf91 3.6px 5px,#665027 5.5px 6.5px,transparent 7px 12px);background-size:100% 22px;background-repeat:repeat-y; }
.auth-book-spiral::after { content:'';position:absolute;top:0;bottom:0;left:14px;width:2px;border-radius:2px;background:linear-gradient(90deg,#79602b,#f4e0a9 48%,#876622); }
.auth-animated-book.is-opening .auth-book-spiral,.auth-animated-book.is-open .auth-book-spiral { animation:spiralShine 1.7s .5s ease both; }
.auth-animated-book.is-open .auth-book-cover { background:radial-gradient(circle at 75% 22%,rgba(57,174,94,.36),transparent 30%),linear-gradient(145deg,#07351c,#075a30 55%,#063019);box-shadow:inset 0 0 0 5px rgba(239,193,78,.12),inset -10px 0 20px rgba(0,0,0,.18); }
.auth-animated-book.is-open .auth-paper { background:repeating-linear-gradient(180deg,#fffdf8 0 31px,#e6ecdf 32px,#fffdf8 33px); }
@keyframes closedBookFloat { 0%,100%{transform:translateY(0) rotateY(-2deg)}50%{transform:translateY(-8px) rotateY(2deg)} }
@keyframes openPageReveal { from{opacity:0;filter:blur(3px);transform:translateX(20px)}to{opacity:1;filter:blur(0);transform:translateX(0)} }
@keyframes spiralShine { 0%{filter:drop-shadow(0 3px 3px rgba(25,27,18,.24))}45%{filter:drop-shadow(0 0 8px rgba(255,220,133,.95))}100%{filter:drop-shadow(0 3px 3px rgba(25,27,18,.24))} }
@media(max-width:767px) {
  .auth-animated-book { width:min(360px,100%);min-height:500px;display:grid;grid-template-columns:minmax(0,1fr); }
  .auth-animated-book:not(.is-opening):not(.is-open) { width:min(300px,calc(100vw - 48px));min-height:430px;margin:clamp(24px,calc((100dvh - 470px)/2),180px) auto 26px; }
  .auth-animated-book.is-opening,.auth-animated-book.is-open { width:min(520px,100%);min-height:0;margin:10px auto 20px;grid-template-columns:minmax(0,1fr); }
  .auth-animated-book .auth-book-closed-cover { padding:30px 20px;border-right:1px solid #d9ad4f;border-bottom:10px solid #a97821;border-radius:18px; }
  .auth-animated-book.is-opening .auth-book-closed-cover { width:100%;height:220px;border-bottom-width:5px;transform:perspective(1200px) rotateX(-112deg);transform-origin:top center; }
  .closed-cover-logo { width:min(235px,82%);padding:9px 12px; }
  .closed-cover-logo img { max-height:60px; }
  .closed-cover-rule { margin:20px 0 12px; }
  .closed-cover-title { margin-top:12px;font-size:27px; }
  .closed-cover-subtitle { margin-top:12px;font-size:8px; }
  .closed-cover-open { bottom:19px; }
  .auth-animated-book .auth-book-cover { grid-row:1; }
  .auth-animated-book .auth-paper { grid-row:3; }
  .auth-book-spiral { position:relative;left:auto;top:auto;bottom:auto;grid-row:2;grid-column:1;width:100%;height:22px;margin:-5px 0;transform:none; }
  .auth-book-spiral::before { inset:2px 10px;background:repeating-radial-gradient(ellipse 7px 7px at 7px 50%,transparent 0 3px,#e5cf91 3.6px 5px,#665027 5.5px 6.5px,transparent 7px 12px);background-size:22px 100%;background-repeat:repeat-x; }
  .auth-book-spiral::after { top:10px;bottom:auto;left:8px;right:8px;width:auto;height:2px;background:linear-gradient(180deg,#79602b,#f4e0a9 48%,#876622); }
}
@media(prefers-reduced-motion:reduce) {
  .auth-animated-book:not(.is-opening):not(.is-open) { animation:none; }
  .auth-animated-book,.auth-animated-book * { scroll-behavior:auto!important; }
}

/* Signup editorial backdrop and enriched welcome / inside-cover details. */
.auth-page.auth-register-page,.auth-page.auth-login-page {
  position:relative;
  overflow-x:hidden;
  background:radial-gradient(ellipse at 12% 18%,rgba(31,126,69,.42) 0,rgba(31,126,69,0) 30%),radial-gradient(ellipse at 88% 78%,rgba(174,128,42,.2) 0,transparent 28%),radial-gradient(ellipse at 82% 8%,rgba(41,105,66,.32) 0,transparent 25%),linear-gradient(135deg,#061b12 0%,#0a2c1c 48%,#102b20 100%);
}
.auth-page.auth-register-page::before,.auth-page.auth-login-page::before {
  content:'';position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.36;
  background-image:radial-gradient(rgba(228,203,139,.38) .75px,transparent .85px),linear-gradient(120deg,transparent 0 48%,rgba(237,220,167,.11) 48.2% 48.35%,transparent 48.6%);
  background-size:30px 30px,100% 100%;
  mask-image:radial-gradient(ellipse at center,transparent 20%,#000 100%);
}
.auth-page.auth-register-page::after,.auth-page.auth-login-page::after {
  content:'';position:fixed;right:-120px;top:48%;width:360px;height:360px;z-index:0;pointer-events:none;border:1px solid rgba(224,187,100,.22);border-radius:50%;
  box-shadow:0 0 0 25px rgba(240,219,164,.035),0 0 0 55px rgba(72,150,94,.065),0 0 0 86px rgba(224,187,100,.045);
  animation:signupOrbit 22s linear infinite;
}
.auth-page.auth-register-page .auth-book-layout,.auth-page.auth-login-page .auth-book-layout { z-index:1; }
.auth-cover-highlights { display:grid;grid-template-columns:1fr;gap:8px;width:min(100%,300px);margin-top:19px; }
.auth-cover-highlights div { display:flex;align-items:center;gap:11px;padding:8px 11px;border:1px solid rgba(225,247,230,.19);border-radius:10px;background:linear-gradient(100deg,rgba(255,255,255,.11),rgba(255,255,255,.04));box-shadow:inset 0 1px 0 rgba(255,255,255,.08);color:#e4f3e8; }
.auth-cover-highlights span { display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:8px;color:#ffdf83;background:rgba(232,190,82,.16);font-size:9px;font-weight:900;letter-spacing:.04em; }
.auth-cover-highlights b { font-size:11px;letter-spacing:.01em; }
.auth-animated-book.is-open .auth-book-cover { position:relative;overflow:hidden;background:radial-gradient(ellipse at 76% 8%,rgba(57,174,94,.42),transparent 34%),repeating-linear-gradient(135deg,rgba(255,255,255,.018) 0 1px,transparent 1px 10px),linear-gradient(145deg,#07351c,#075a30 55%,#063019); }
.auth-animated-book.is-open .auth-book-cover::before { content:'';position:absolute;right:-130px;top:35%;width:290px;height:290px;border:1px solid rgba(241,211,122,.2);border-radius:50%;box-shadow:0 0 0 22px rgba(241,211,122,.035),0 0 0 48px rgba(255,255,255,.025);pointer-events:none; }
.auth-animated-book.is-open .auth-book-cover > * { position:relative;z-index:1; }
.auth-animated-book.is-open .auth-cover-kicker { display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.09); }
.auth-animated-book.is-open .auth-book-cover h1 { max-width:360px;margin-top:22px;text-shadow:0 4px 18px rgba(0,0,0,.2); }
.auth-animated-book.is-open .auth-book-cover p { max-width:320px;font-size:13px; }
.auth-animated-book.is-open .auth-cover-highlights { gap:9px;margin-top:21px; }
.auth-animated-book.is-open .auth-cover-highlights div { padding:10px 12px;border-radius:12px;transition:transform .22s ease,background .22s ease; }
.auth-animated-book.is-open .auth-cover-highlights div:hover { transform:translateX(5px);background:rgba(255,255,255,.16); }
.auth-animated-book.is-open .auth-cover-seal { width:72px;height:72px;margin-top:24px;animation:sealGlow 3.2s ease-in-out infinite; }
.auth-animated-book.is-open .auth-back-link { display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding-top:17px;opacity:.82; }
.auth-animated-book.is-opening .auth-cover-highlights,.auth-animated-book.is-opening .auth-cover-seal,.auth-animated-book.is-opening .auth-back-link { animation:softSlideIn .65s .82s both; }
.closed-cover-title { max-width:320px; }
.closed-cover-subtitle { max-width:260px;line-height:1.6;text-align:center;letter-spacing:.06em; }
@keyframes signupOrbit { to { transform:rotate(360deg); } }
@keyframes sealGlow { 0%,100% { box-shadow:0 0 0 5px rgba(250,220,137,.08),inset 0 0 0 4px rgba(250,220,137,.11); } 50% { box-shadow:0 0 0 8px rgba(250,220,137,.13),0 0 22px rgba(250,220,137,.18),inset 0 0 0 4px rgba(250,220,137,.18); } }
@keyframes softSlideIn { from { opacity:0;transform:translateY(12px); } to { opacity:1;transform:translateY(0); } }
@media(max-width:767px) {
  .auth-page.auth-register-page,.auth-page.auth-login-page { background:radial-gradient(ellipse at 7% 12%,rgba(28,111,60,.36),transparent 35%),radial-gradient(ellipse at 92% 90%,rgba(168,122,44,.16),transparent 32%),linear-gradient(155deg,#061a11 0%,#0b2e1e 52%,#10291e 100%); }
  .auth-page.auth-register-page::after,.auth-page.auth-login-page::after { width:220px;height:220px;right:-100px;top:22%;border-color:rgba(224,187,100,.18); }
  .auth-page.auth-register-page::before,.auth-page.auth-login-page::before { opacity:.24;background-size:20px 20px,100% 100%; }
  .auth-cover-highlights { grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px;margin-top:6px; }
  .auth-cover-highlights div { justify-content:center;gap:5px;padding:6px 4px; }
  .auth-cover-highlights span { width:21px;height:21px;flex-basis:21px;font-size:8px; }
  .auth-cover-highlights b { font-size:8px;text-align:left; }
  .auth-animated-book.is-open .auth-book-cover { padding:15px 15px 17px; }
  .auth-animated-book.is-open .auth-book-cover h1 { margin:4px 0 0;font-size:22px; }
  .auth-animated-book.is-open .auth-book-cover p { font-size:10px;line-height:1.5; }
  .auth-animated-book.is-open .auth-cover-highlights { margin-top:4px; }
  .auth-animated-book.is-open .auth-cover-highlights div { flex-direction:column;gap:3px; }
  .auth-animated-book.is-open .auth-cover-highlights b { text-align:center; }
  .auth-animated-book.is-open .auth-cover-seal,.auth-animated-book.is-open .auth-back-link { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  .auth-page.auth-register-page::after,.auth-page.auth-login-page::after,.auth-animated-book.is-open .auth-cover-seal { animation:none; }
}

/* Subscriber profile */
.profile-shell{width:min(960px,100%);margin:0 auto;padding:clamp(18px,4vw,38px);border:1px solid #dfe9e1;border-radius:26px;background:linear-gradient(145deg,#fff 5%,#f7fbf8 100%);box-shadow:0 22px 60px rgba(16,67,38,.09)}
.profile-page-heading{margin:0 0 24px}.profile-page-heading>span,.profile-kicker{color:#11804a;font-size:10px;font-weight:900;letter-spacing:.13em}.profile-page-heading h2{margin:6px 0;color:#103f27;font:800 clamp(24px,4vw,32px) 'Outfit',sans-serif}.profile-page-heading p{margin:0;color:#718078;font-size:13px;line-height:1.6}
.profile-card-stack{display:grid;gap:15px}.profile-hero-card{position:relative;display:flex;align-items:center;gap:17px;min-height:140px;padding:24px;border-radius:20px;overflow:hidden;background:radial-gradient(circle at 88% 14%,rgba(239,202,110,.24),transparent 27%),linear-gradient(120deg,#06351e,#08743d 68%,#0c8650);color:#fff;box-shadow:0 14px 30px rgba(5,78,39,.2)}.profile-avatar,.profile-guest-icon{display:grid;place-items:center;flex:0 0 62px;width:62px;height:62px;border:1px solid rgba(255,255,255,.35);border-radius:20px;background:linear-gradient(145deg,#f6df9e,#c99b3f);color:#23442e;font:900 19px 'Outfit',sans-serif;box-shadow:inset 0 1px 0 #fff8}.profile-hero-copy{min-width:0}.profile-hero-copy .profile-kicker{color:#f3d88e}.profile-hero-copy h3{margin:4px 0 1px;color:white;font:800 clamp(20px,3vw,26px) 'Outfit',sans-serif;overflow-wrap:anywhere}.profile-hero-copy p{margin:0;color:#d5eadc;font-size:12px;font-weight:650}.profile-status-pill{display:inline-flex;align-items:center;gap:6px;max-width:max-content;padding:7px 11px;border:1px solid transparent;border-radius:999px;font-size:10px;font-weight:850;white-space:nowrap}.profile-hero-card>.profile-status-pill{margin-left:auto}.profile-status-pill.active{border-color:#b9edca;background:#e7f9ec;color:#08723b}.profile-status-pill.scheduled{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.profile-status-pill.inactive{border-color:#fde68a;background:#fffbeb;color:#a16207}.profile-status-pill.stopped{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.profile-details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-info-card{display:grid;gap:5px;min-width:0;padding:16px;border:1px solid #e1eae3;border-radius:15px;background:#fff;box-shadow:0 4px 14px rgba(20,65,40,.035)}.profile-info-card>span,.profile-membership-meta>span{color:#748178;font-size:10px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}.profile-info-card strong{color:#183d29;font-size:13px;overflow-wrap:anywhere}.profile-info-card small{color:#88948c;font-size:10px;line-height:1.45}.profile-info-card .profile-referral-value{font-family:ui-monospace,monospace;color:#078148;letter-spacing:.06em}
.profile-membership-card{padding:19px;border:1px solid #d7e9dc;border-radius:17px;background:linear-gradient(140deg,#f1faf3,#fff 74%)}.profile-membership-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.profile-membership-heading h3{margin:5px 0 13px;color:#16472b;font:800 19px 'Outfit',sans-serif}.profile-membership-meta{display:grid;gap:4px;padding:11px 13px;border:1px solid #e4ede6;border-radius:12px;background:#fff}.profile-membership-meta strong{color:#254934;font-size:12px}.profile-days-count{display:flex;align-items:baseline;gap:8px;margin:14px 0 2px;color:#08723b}.profile-days-count strong{font:900 28px 'Outfit',sans-serif}.profile-days-count span{font-size:12px;font-weight:750}.profile-access-note{margin:11px 0 0;color:#66776d;font-size:12px;line-height:1.55}.profile-membership-card .btn{margin-top:11px}
.profile-referral-card-modern{grid-template-columns:1fr auto;margin:0;padding:16px;border-color:#d6e9dc;background:linear-gradient(115deg,#f1faf3,#fff);box-shadow:none}.profile-referral-card-modern>div{display:grid;gap:5px}.profile-referral-card-modern strong{font:850 18px ui-monospace,monospace;letter-spacing:.08em;overflow-wrap:anywhere}.profile-referral-card-modern small{grid-column:1/-1;font-size:11px;line-height:1.5}.profile-referral-card-modern button{padding:9px 13px}.profile-guest-card{display:grid;justify-items:start;gap:10px;padding:26px;border:1px solid #dce9df;border-radius:19px;background:radial-gradient(circle at 90% 10%,#e8f7ee,transparent 38%),#fff}.profile-guest-card .profile-guest-icon{margin-bottom:4px}.profile-guest-card h3{margin:0;color:#16472b;font:800 22px 'Outfit',sans-serif}.profile-guest-card p{max-width:600px;margin:0;color:#6c7b72;font-size:13px;line-height:1.65}.profile-guest-card>div:last-child{display:flex;gap:9px;flex-wrap:wrap;margin-top:4px}.profile-actions{display:flex;gap:9px;flex-wrap:wrap;margin:17px 0}.profile-actions>.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:43px;flex:1 1 150px}.profile-policy-links{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0;padding:12px 14px;border:1px solid #e5ece7;border-radius:12px;background:#f8fbf9;font-size:12px}.profile-policy-links a{color:#155d35;font-weight:750;text-decoration:none}.profile-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:16px;border-top:1px solid #e6eee8}.profile-footer>span{color:#75847b;font-size:11px}
.profile-notification-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 19px;border:1px solid #d9e9de;border-radius:16px;background:linear-gradient(115deg,#f5fbf6,#fff);box-shadow:0 5px 17px rgba(20,65,40,.04)}.profile-notification-copy{display:grid;gap:4px;min-width:0}.profile-notification-copy strong{color:#1d4730;font-size:13px}.profile-notification-copy small{color:#718078;font-size:11px;line-height:1.5}.notification-switch{position:relative;display:inline-flex;flex:0 0 52px;align-items:center;width:52px;height:32px;cursor:pointer}.notification-switch input{position:absolute;width:1px;height:1px;opacity:0}.notification-switch-track{position:absolute;inset:0;border:1px solid #cbd8ce;border-radius:999px;background:#dfe8e1;transition:background .2s,border-color .2s}.notification-switch-track::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 6px #17382230;transition:transform .2s}.notification-switch input:checked+.notification-switch-track{border-color:#087a3e;background:#087a3e}.notification-switch input:checked+.notification-switch-track::after{transform:translateX(20px)}.notification-switch input:focus-visible+.notification-switch-track{outline:3px solid #e0b44e;outline-offset:3px}.notification-switch input:disabled+.notification-switch-track{opacity:.55;cursor:not-allowed}
@media(max-width:600px){.profile-shell{padding:17px;border-radius:19px}.profile-hero-card{align-items:flex-start;flex-wrap:wrap;padding:19px}.profile-hero-card>.profile-status-pill{margin:0 0 0 79px}.profile-details-grid{grid-template-columns:1fr}.profile-membership-heading{flex-direction:column}.profile-referral-card-modern{grid-template-columns:1fr auto}.profile-footer{align-items:flex-start;flex-direction:column}.profile-notification-card{gap:12px;padding:15px}.notification-switch{flex-basis:48px;width:48px}.notification-switch input:checked+.notification-switch-track::after{transform:translateX(16px)}}

/* Keep app actions and modal close controls inside short and narrow viewports. */
button, [role="button"], .btn { box-sizing:border-box; min-width:0; max-width:100%; }
button:focus-visible, [role="button"]:focus-visible, .btn:focus-visible {
  outline:3px solid #e0b44e;
  outline-offset:3px;
}

.paywall-modal {
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  align-items:stretch;
  justify-content:flex-start;
}
.paywall-modal > .paywall-card {
  flex:0 0 auto;
  width:min(100%, 680px);
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  margin:auto;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#plan-start-modal .plan-picker-heading {
  position:sticky;
  top:0;
  z-index:6;
  margin:-30px -30px 18px;
  padding:30px 30px 10px;
  background:linear-gradient(145deg,#fff 0%,#f7fcf8 72%,#edf8f0 100%);
}
.book-showcase-overlay {
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  align-items:flex-start;
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
.book-showcase-shell {
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.book-showcase-close {
  position:sticky;
  top:8px;
  z-index:12;
  grid-column:1 / -1;
  grid-row:1;
  justify-self:end;
  align-self:start;
  flex:0 0 44px;
  width:44px;
  height:44px;
  margin:8px 8px -52px auto;
  touch-action:manipulation;
}
.app-bottom-nav { bottom:max(10px,env(safe-area-inset-bottom)); }

@media (max-width:560px) {
  .paywall-modal { padding: max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  .paywall-modal > .paywall-card {
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    border-radius:18px;
  }
  #plan-start-modal .plan-picker-heading {
    top:0;
    margin:-22px -18px 16px;
    padding:22px 18px 10px;
    gap:8px;
  }
  #plan-start-modal .plan-picker-close { min-width:56px; min-height:44px; flex:0 0 auto; }
  .plan-start-actions { flex-wrap:wrap; }
  .plan-start-actions .btn,
  .plan-start-actions .btn:first-child,
  .plan-start-actions .btn:last-child { flex:1 1 140px; min-width:0; white-space:normal; }
  .checkout-promo-field > div { flex-wrap:wrap; }
  .checkout-promo-field > div > input { flex:1 1 150px; min-width:0; }
  .checkout-promo-field > div > button { flex:0 0 auto; min-height:44px; }
  .book-showcase-overlay { padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  .book-showcase-shell {
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    border-radius:18px;
  }
  .book-showcase-close { top:4px; margin:4px 4px -48px auto; }
}

@media (max-width:360px) {
  .paywall-modal > .paywall-card { padding:18px 14px !important; }
  #plan-start-modal .plan-picker-heading { margin-inline:-14px; padding-inline:14px; }
  .plan-start-actions .btn,
  .plan-start-actions .btn:first-child,
  .plan-start-actions .btn:last-child { flex-basis:100%; }
  .reader-page-toolbar { left:5px; right:5px; gap:6px 4px; padding:7px; }
  .reader-page-toolbar button { padding-inline:3px; font-size:10px; }
}
