/* Free / Basic edition visual refresh inspired by Yousaf Journal's editorial typography and warm palette.
   Deliberately scoped to Basic mode. Premium workspace styles are not changed. */
:root {
  --free-bg: #f7f3ef;
  --free-paper: #fffdf9;
  --free-ink: #211820;
  --free-muted: #716b72;
  --free-line: #e2d8d7;
  --free-burgundy: #681f3b;
  --free-purple: #63418f;
  --free-gold: #c99535;
  --free-soft: #f1e7e9;
  --free-shadow: 0 18px 48px rgba(41, 20, 31, .09);
}
body[data-mode="basic"] {
  background: var(--free-bg);
  color: var(--free-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body[data-mode="basic"] .site-header {
  background: rgba(247, 243, 239, .9);
  border-color: rgba(104, 31, 59, .13);
  box-shadow: 0 8px 28px rgba(41, 20, 31, .035);
}
body[data-mode="basic"] .brand { letter-spacing: -.035em; }
body[data-mode="basic"] .brand-mark {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--free-burgundy), var(--free-purple));
  box-shadow: 0 9px 24px rgba(104, 31, 59, .2);
}
body[data-mode="basic"] .main-nav a,
body[data-mode="basic"] .text-button { color: #5d5059; }
body[data-mode="basic"] .main-nav a:hover,
body[data-mode="basic"] .text-button:hover { color: var(--free-burgundy); }
body[data-mode="basic"] .mode-switch {
  background: rgba(255, 253, 249, .86);
  border-color: var(--free-line);
}
body[data-mode="basic"] .mode-pill { color: var(--free-muted); }
body[data-mode="basic"] .mode-pill.active {
  color: #fff;
  background: linear-gradient(135deg, var(--free-burgundy), #853653);
  box-shadow: 0 6px 18px rgba(104, 31, 59, .2);
}
body[data-mode="basic"] .pill,
body[data-mode="basic"] .account-button {
  border-color: var(--free-line);
  border-radius: 13px;
  background: var(--free-paper);
  color: var(--free-ink);
}
body[data-mode="basic"] .account-button {
  color: #fff;
  border-color: var(--free-burgundy);
  background: var(--free-burgundy);
  box-shadow: 0 8px 20px rgba(104, 31, 59, .16);
}
.basic-mode .eyebrow {
  color: var(--free-burgundy);
  letter-spacing: .17em;
  font-size: .72rem;
}
.basic-mode .hero h1,
.basic-mode .section-heading h2 {
  color: var(--free-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
.basic-mode .hero h1 { letter-spacing: -.065em; }
.basic-mode .hero-copy {
  color: var(--free-muted);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}
.basic-mode .news-section {
  border-color: var(--free-line);
}
.basic-mode .section-heading h2 { letter-spacing: -.045em; }
.basic-mode .date-wrap { color: var(--free-muted); }
.basic-mode .news-grid {
  gap: 18px;
  border: 0;
  align-items: stretch;
}
.basic-mode .news-card,
.basic-mode .news-card:nth-child(1),
.basic-mode .news-card:nth-child(2),
.basic-mode .news-card:nth-child(3),
.basic-mode .news-card:nth-child(4),
.basic-mode .news-card:nth-child(5) {
  position: relative;
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--free-line);
  border-radius: 21px;
  background: var(--free-paper);
  box-shadow: 0 10px 30px rgba(41, 20, 31, .055);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.basic-mode .news-card:nth-child(1),
.basic-mode .news-card:nth-child(2) { grid-column: span 6; }
.basic-mode .news-card:nth-child(n+3) { grid-column: span 4; }
.basic-mode .news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(104, 31, 59, .28);
  box-shadow: var(--free-shadow);
}
.basic-mode .news-card img,
.basic-mode .news-card:nth-child(1) img,
.basic-mode .news-card:nth-child(2) img {
  display: block;
  width: calc(100% + 40px);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -20px -20px 19px;
  filter: saturate(.94);
}
.basic-mode .rank {
  color: #a79aa0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}
.basic-mode .category {
  color: var(--free-burgundy);
  background: var(--free-soft);
  padding: 5px 9px;
  border-radius: 99px;
  font-size: .68rem;
  letter-spacing: .08em;
}
.basic-mode .news-card h3,
.basic-mode .news-card:nth-child(1) h3,
.basic-mode .news-card:nth-child(2) h3 {
  color: var(--free-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  margin: 15px 0 10px;
}
.basic-mode .news-card:nth-child(1) h3,
.basic-mode .news-card:nth-child(2) h3 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}
.basic-mode .news-card p {
  color: #70666d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.55;
}
.basic-mode .card-meta {
  color: #8b7e85;
  border-top: 1px solid rgba(104, 31, 59, .09);
  margin-top: 18px;
  padding-top: 13px;
}
.basic-mode .primary {
  color: #fff;
  border-color: var(--free-burgundy);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--free-burgundy), #853653);
  box-shadow: 0 10px 24px rgba(104, 31, 59, .18);
}
.basic-mode .secondary {
  border-color: var(--free-line);
  border-radius: 13px;
  background: var(--free-paper);
  color: var(--free-burgundy);
}
body[data-mode="basic"] footer {
  border-color: var(--free-line);
  color: var(--free-muted);
  background: var(--free-bg);
}
body[data-mode="basic"] .footer-link { color: var(--free-burgundy); }
body[data-mode="basic"] .modal-root {
  background: rgba(33, 24, 32, .52);
  backdrop-filter: blur(8px);
}
body[data-mode="basic"] .modal {
  border: 1px solid var(--free-line);
  border-radius: 22px;
  background: var(--free-paper);
  box-shadow: var(--free-shadow);
}
body[data-mode="basic"] input:focus,
body[data-mode="basic"] textarea:focus,
body[data-mode="basic"] select:focus {
  outline: none;
  border-color: rgba(104, 31, 59, .55);
  box-shadow: 0 0 0 3px rgba(104, 31, 59, .09);
}
@media (max-width: 700px) {
  .basic-mode .news-grid { gap: 13px; }
  .basic-mode .news-card,
  .basic-mode .news-card:nth-child(1),
  .basic-mode .news-card:nth-child(2),
  .basic-mode .news-card:nth-child(3),
  .basic-mode .news-card:nth-child(4),
  .basic-mode .news-card:nth-child(5) {
    grid-column: 1 / -1;
    padding: 17px;
    border-radius: 18px;
  }
  .basic-mode .news-card img,
  .basic-mode .news-card:nth-child(1) img,
  .basic-mode .news-card:nth-child(2) img {
    width: calc(100% + 34px);
    margin: -17px -17px 16px;
  }
  .basic-mode .news-card h3,
  .basic-mode .news-card:nth-child(1) h3,
  .basic-mode .news-card:nth-child(2) h3 {
    font-size: clamp(1.5rem, 6.8vw, 2rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .basic-mode .news-card,
  .basic-mode .news-card:hover { transition: none; transform: none; }
}

/* Premium story cards: restore crisp contrast on the dark workspace. */
body[data-mode="premium"] .premium-mode .premium-card,
body[data-mode="premium"] .premium-mode article.premium-card {
  background: linear-gradient(145deg, #111b2a 0%, #17263a 58%, #101a29 100%) !important;
  border: 1px solid #35465d;
  color: #f7f9fc !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
}
body[data-mode="premium"] .premium-mode .premium-card h3 {
  color: #f8fafc !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-shadow: none;
}
body[data-mode="premium"] .premium-mode .premium-card p {
  color: #c5d0df !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.62;
}
body[data-mode="premium"] .premium-mode .premium-card .rank { color: #a9bad0 !important; }
body[data-mode="premium"] .premium-mode .premium-card .category {
  color: #ffd16a !important;
  background: rgba(255, 181, 46, .12);
  border-radius: 99px;
  padding: 5px 9px;
}
body[data-mode="premium"] .premium-mode .premium-card .card-meta,
body[data-mode="premium"] .premium-mode .premium-card .card-meta a {
  color: #aebdd0 !important;
}
body[data-mode="premium"] .premium-mode .premium-card .premium-tag {
  color: #ffda83 !important;
  border-color: rgba(255, 181, 46, .42);
  background: rgba(255, 181, 46, .1);
}

/* Auth dialogs are shared across modes: clear hierarchy, polished fields and strong actions. */
.modal-root {
  background: rgba(8, 13, 24, .74);
  backdrop-filter: blur(13px) saturate(1.1);
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}
.modal-root .modal {
  width: min(100%, 560px);
  max-height: min(92dvh, 900px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid #e9e4e0;
  border-radius: 25px;
  background: linear-gradient(155deg, #ffffff 0%, #fffdf9 72%, #f8f1ed 100%);
  color: #211820;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}
.modal-root .modal h2 {
  margin: 4px 48px 14px 0;
  color: #241820;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 8vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .98;
}
.modal-root .modal p { color: #655d62; line-height: 1.6; }
.modal-root .modal label:not(.remember-row) {
  display: block;
  margin: 18px 0 8px;
  color: #30262c;
  font-size: .96rem;
  font-weight: 750;
}
.modal-root .modal input:not([type="checkbox"]):not([type="file"]),
.modal-root .modal select,
.modal-root .modal textarea {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 13px 15px;
  border: 1.5px solid #ddd5d0;
  border-radius: 15px;
  background: #fff;
  color: #211820;
  font: 600 1rem/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: inset 0 1px 2px rgba(36, 24, 30, .025);
}
.modal-root .modal input:focus,
.modal-root .modal select:focus,
.modal-root .modal textarea:focus {
  border-color: #a63a25;
  outline: none;
  box-shadow: 0 0 0 4px rgba(166, 58, 37, .11);
}
.modal-root .modal .remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px 0 20px;
  color: #393038;
  font-weight: 700;
}
.modal-root .modal .remember-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #a63a25;
}
.modal-root .modal button.primary,
.modal-root .modal form button[type="submit"] {
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  border: 1px solid #96351f;
  border-radius: 15px;
  background: linear-gradient(135deg, #a63a25, #87301f);
  color: #fff;
  font: 750 1.05rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 12px 25px rgba(142, 49, 31, .19);
}
.modal-root .modal .close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3eeeb;
  color: #30252b;
  font-size: 1.8rem;
}
.modal-root .modal .footer-link {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  color: #6f2b37;
  font-size: .98rem;
  font-weight: 700;
  text-align: center;
}
.modal-root .modal .auth-premium-preview {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #e8d9c6;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8ed, #f8eff0);
}
.modal-root .modal .auth-premium-kicker {
  color: #8c3c32;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
}
.modal-root .modal .auth-premium-preview h3 {
  margin: 8px 0 12px;
  color: #2b2027;
  font: 700 1.45rem/1.1 Georgia, "Times New Roman", serif;
}
.modal-root .modal .auth-premium-grid { display: grid; gap: 10px; }
.modal-root .modal .auth-premium-grid > div {
  padding: 11px 13px;
  border: 1px solid rgba(104, 31, 59, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}
.modal-root .modal .auth-premium-grid b,
.modal-root .modal .auth-premium-grid span { display: block; }
.modal-root .modal .auth-premium-grid b { color: #34242c; }
.modal-root .modal .auth-premium-grid span { margin-top: 3px; color: #74666d; font-size: .9rem; }
@media (max-width: 520px) {
  .modal-root .modal { border-radius: 21px; padding: 24px 20px 27px; }
  .modal-root .modal h2 { font-size: clamp(2.55rem, 12vw, 3.3rem); }
}


/* Header brand and mode/navigation panel polish. */
body[data-mode="basic"] .site-header {
  min-height: 66px;
  align-items: center;
  padding: 10px clamp(12px, 2.6vw, 30px);
  gap: clamp(10px, 2vw, 22px);
}
body[data-mode="basic"] .site-header > .brand {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  min-height: 48px;
  padding: 4px 9px;
  margin: 0;
  border: 1px solid rgba(104, 31, 59, .10);
  border-radius: 13px;
  background: rgba(255, 253, 249, .96);
  box-shadow: 0 5px 16px rgba(41, 20, 31, .07);
  transform: none !important;
  position: relative;
  top: auto !important;
}
body[data-mode="basic"] .site-header .brand-logo {
  display: block;
  width: 174px !important;
  height: 37px !important;
  max-width: 100%;
  flex: 0 1 174px !important;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
  vertical-align: middle;
}
body[data-mode="basic"] .site-header .header-tools {
  align-items: center;
  gap: 8px;
}
body[data-mode="basic"] .mode-switch {
  padding: 4px;
  gap: 3px;
  border: 1px solid #e3d8d9;
  border-radius: 15px;
  background: #eee7e5;
  box-shadow: inset 0 1px 2px rgba(41, 20, 31, .05);
}
body[data-mode="basic"] .mode-pill {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 750;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
body[data-mode="basic"] .mode-pill:not(.active):hover {
  color: var(--free-burgundy);
  background: rgba(255,255,255,.7);
}
body[data-mode="basic"] #languageToggle,
body[data-mode="basic"] #accountButton {
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 12px;
  font-weight: 750;
}
body[data-mode="basic"] #languageToggle {
  border-color: #dfd2d3;
  background: #fffdf9;
  color: #4e3541;
}
body[data-mode="basic"] #accountButton {
  background: linear-gradient(135deg, #681f3b, #873c58);
  border-color: #681f3b;
}
body[data-mode="basic"] .news-pager,
body[data-mode="basic"] .date-search-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 12px 0 18px;
  padding: 12px;
  border: 1px solid #e2d8d7;
  border-radius: 17px;
  background: linear-gradient(135deg, #fffdf9, #f3ece8);
  box-shadow: 0 8px 24px rgba(41, 20, 31, .055);
}
body[data-mode="basic"] .news-pager button,
body[data-mode="basic"] .date-search-controls button,
body[data-mode="basic"] .date-search-controls .secondary {
  min-height: 40px;
  border: 1px solid #dfd2d3;
  border-radius: 11px;
  background: #fffdf9;
  color: #4f3440;
  font-weight: 700;
  box-shadow: none;
}
body[data-mode="basic"] .news-pager button.active,
body[data-mode="basic"] .date-search-controls button.primary,
body[data-mode="basic"] .date-search-controls .primary {
  color: #fff;
  border-color: #681f3b;
  background: linear-gradient(135deg, #681f3b, #873c58);
  box-shadow: 0 6px 15px rgba(104, 31, 59, .16);
}
body[data-mode="basic"] .date-search-controls input,
body[data-mode="basic"] .date-search-controls select {
  min-height: 40px;
  border: 1px solid #dfd2d3;
  border-radius: 11px;
  background: #fff;
  color: #211820;
}
@media (max-width: 760px) {
  body[data-mode="basic"] .site-header {
    min-height: 62px;
    padding: 7px 9px;
    gap: 7px;
  }
  body[data-mode="basic"] .site-header > .brand {
    flex: 0 1 118px;
    width: 118px;
    min-width: 100px;
    height: 42px;
    min-height: 42px;
    padding: 3px 5px;
    border-radius: 10px;
  }
  body[data-mode="basic"] .site-header .brand-logo {
    width: 108px !important;
    height: 31px !important;
    flex-basis: 108px !important;
  }
  body[data-mode="basic"] .site-header .header-tools { gap: 4px; }
  body[data-mode="basic"] .mode-switch { padding: 3px; gap: 1px; }
  body[data-mode="basic"] .mode-pill {
    min-height: 36px;
    padding: 6px 8px;
    font-size: .72rem;
  }
  body[data-mode="basic"] #languageToggle,
  body[data-mode="basic"] #accountButton {
    min-height: 38px;
    padding: 6px 8px;
    font-size: .72rem;
  }
  body[data-mode="basic"] .news-pager,
  body[data-mode="basic"] .date-search-controls {
    gap: 7px;
    padding: 9px;
    border-radius: 14px;
  }
}
@media (max-width: 380px) {
  body[data-mode="basic"] .site-header > .brand {
    flex-basis: 98px;
    width: 98px;
    min-width: 92px;
  }
  body[data-mode="basic"] .site-header .brand-logo {
    width: 89px !important;
    flex-basis: 89px !important;
  }
}


/* Shared header, logo and edition controls: intentionally apply in BOTH Basic and Premium modes. */
.site-header {
  min-height: 66px;
  align-items: center;
  padding: 10px clamp(12px, 2.6vw, 30px);
  gap: clamp(10px, 2vw, 22px);
}
.site-header > .brand {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  min-height: 48px;
  padding: 4px 9px;
  margin: 0;
  border: 1px solid rgba(104, 31, 59, .10);
  border-radius: 13px;
  background: rgba(255, 253, 249, .96);
  box-shadow: 0 5px 16px rgba(41, 20, 31, .07);
  transform: none !important;
  position: relative;
  top: auto !important;
}
.site-header .brand-logo {
  display: block;
  width: 174px !important;
  height: 37px !important;
  max-width: 100%;
  flex: 0 1 174px !important;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
  vertical-align: middle;
}
.site-header .header-tools { align-items: center; gap: 8px; }
.mode-switch {
  padding: 4px;
  gap: 3px;
  border: 1px solid #e3d8d9;
  border-radius: 15px;
  background: #eee7e5;
  box-shadow: inset 0 1px 2px rgba(41, 20, 31, .05);
}
.mode-pill {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 750;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.mode-pill:not(.active):hover {
  color: #681f3b;
  background: rgba(255,255,255,.7);
}
#languageToggle, #accountButton {
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 12px;
  font-weight: 750;
}
#languageToggle {
  border-color: #dfd2d3;
  background: #fffdf9;
  color: #4e3541;
}
#accountButton {
  background: linear-gradient(135deg, #681f3b, #873c58);
  border-color: #681f3b;
}
.news-pager, .date-search-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 12px 0 18px;
  padding: 12px;
  border: 1px solid #e2d8d7;
  border-radius: 17px;
  background: linear-gradient(135deg, #fffdf9, #f3ece8);
  box-shadow: 0 8px 24px rgba(41, 20, 31, .055);
}
.news-pager button, .date-search-controls button, .date-search-controls .secondary {
  min-height: 40px;
  border: 1px solid #dfd2d3;
  border-radius: 11px;
  background: #fffdf9;
  color: #4f3440;
  font-weight: 700;
  box-shadow: none;
}
.news-pager button.active, .date-search-controls button.primary, .date-search-controls .primary {
  color: #fff;
  border-color: #681f3b;
  background: linear-gradient(135deg, #681f3b, #873c58);
  box-shadow: 0 6px 15px rgba(104, 31, 59, .16);
}
.date-search-controls input, .date-search-controls select {
  min-height: 40px;
  border: 1px solid #dfd2d3;
  border-radius: 11px;
  background: #fff;
  color: #211820;
}
@media (max-width: 760px) {
  .site-header { min-height: 62px; padding: 7px 9px; gap: 7px; }
  .site-header > .brand {
    flex: 0 1 118px; width: 118px; min-width: 100px;
    height: 42px; min-height: 42px; padding: 3px 5px; border-radius: 10px;
  }
  .site-header .brand-logo {
    width: 108px !important; height: 31px !important; flex-basis: 108px !important;
  }
  .site-header .header-tools { gap: 4px; }
  .mode-switch { padding: 3px; gap: 1px; }
  .mode-pill { min-height: 36px; padding: 6px 8px; font-size: .72rem; }
  #languageToggle, #accountButton { min-height: 38px; padding: 6px 8px; font-size: .72rem; }
  .news-pager, .date-search-controls { gap: 7px; padding: 9px; border-radius: 14px; }
}
@media (max-width: 380px) {
  .site-header > .brand { flex-basis: 98px; width: 98px; min-width: 92px; }
  .site-header .brand-logo { width: 89px !important; flex-basis: 89px !important; }
}



/* Unified visual system for BOTH Basic and Premium header controls. */
.site-header {
  min-height: 66px;
  align-items: center;
  padding: 9px clamp(12px, 2.6vw, 30px);
  gap: clamp(10px, 2vw, 22px);
  background: rgba(247, 243, 239, .96);
  color: #211820;
  border-bottom: 1px solid rgba(104, 31, 59, .13);
  box-shadow: 0 8px 28px rgba(41, 20, 31, .055);
}
.site-header > .brand {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  min-height: 48px;
  padding: 4px 9px;
  margin: 0;
  border: 1px solid rgba(104, 31, 59, .10);
  border-radius: 13px;
  background: #fffdf9;
  box-shadow: 0 5px 16px rgba(41, 20, 31, .07);
  transform: none !important;
  position: relative;
  top: auto !important;
}
.site-header .brand-logo {
  display: block;
  width: 174px !important;
  height: 37px !important;
  max-width: 100%;
  flex: 0 1 174px !important;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
  vertical-align: middle;
}
.site-header .main-nav a,
.site-header .text-button { color: #5d5059; }
.site-header .main-nav a:hover,
.site-header .text-button:hover { color: #681f3b; }
.site-header .header-tools { align-items: center; gap: 8px; }
.mode-switch {
  padding: 4px;
  gap: 3px;
  border: 1px solid #e3d8d9;
  border-radius: 15px;
  background: #eee7e5;
  box-shadow: inset 0 1px 2px rgba(41, 20, 31, .05);
}
.mode-pill {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 11px;
  color: #716b72;
  font-size: .84rem;
  font-weight: 750;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.mode-pill.active {
  color: #fff !important;
  background: linear-gradient(135deg, #681f3b, #853653) !important;
  box-shadow: 0 6px 18px rgba(104, 31, 59, .18) !important;
}
.mode-pill:not(.active):hover { color: #681f3b; background: rgba(255,255,255,.7); }
#languageToggle, #accountButton {
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 12px;
  font-weight: 750;
}
#languageToggle {
  border: 1px solid #dfd2d3;
  background: #fffdf9;
  color: #4e3541;
}
#accountButton {
  background: linear-gradient(135deg, #681f3b, #873c58) !important;
  border: 1px solid #681f3b !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(104, 31, 59, .16);
}
body[data-mode="premium"] .site-header {
  background: rgba(247, 243, 239, .96) !important;
  color: #211820 !important;
  border-bottom-color: rgba(104, 31, 59, .13) !important;
}
body[data-mode="premium"] .site-header .main-nav a,
body[data-mode="premium"] .site-header .text-button { color: #5d5059 !important; }
body[data-mode="premium"] .mode-switch { border-color: #e3d8d9 !important; background: #eee7e5 !important; }
body[data-mode="premium"] .mode-pill { color: #716b72 !important; }
body[data-mode="premium"] .mode-pill.active { color: #fff !important; }
body[data-mode="premium"] #languageToggle { background: #fffdf9 !important; color: #4e3541 !important; border-color: #dfd2d3 !important; }
body[data-mode="premium"] #accountButton { background: linear-gradient(135deg, #681f3b, #873c58) !important; color: #fff !important; border-color: #681f3b !important; }

/* Shared sign-in, password, recovery, payment and bank method dialogs. */
.modal-root {
  background: rgba(25, 18, 25, .66) !important;
  backdrop-filter: blur(12px) saturate(1.08);
}
.modal-root .modal,
#modalRoot .premium-management-modal {
  border: 1px solid #e4d9d6 !important;
  border-radius: 23px !important;
  background: linear-gradient(155deg, #fff 0%, #fffdf9 72%, #f8f1ed 100%) !important;
  color: #211820 !important;
  box-shadow: 0 26px 78px rgba(18, 12, 18, .28) !important;
}
.modal-root .modal h2,
#modalRoot .premium-management-modal h2 {
  color: #241820 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  letter-spacing: -.045em;
}
.modal-root .modal p,
#modalRoot .premium-management-modal p { color: #655d62; line-height: 1.55; }
.modal-root .modal label,
#modalRoot .premium-management-modal label { color: #30262c; font-weight: 700; }
.modal-root .modal input:not([type="checkbox"]):not([type="file"]),
.modal-root .modal select,
.modal-root .modal textarea,
#modalRoot .premium-management-modal input:not([type="checkbox"]):not([type="file"]),
#modalRoot .premium-management-modal select,
#modalRoot .premium-management-modal textarea {
  border: 1.5px solid #ddd5d0 !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #211820 !important;
  box-shadow: none !important;
}
.modal-root .modal button.primary,
.modal-root .modal form button[type="submit"],
#modalRoot .premium-management-modal button.primary {
  border: 1px solid #681f3b !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #681f3b, #873c58) !important;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(104, 31, 59, .16) !important;
}
.modal-root .modal .footer-link,
#modalRoot .premium-management-modal .footer-link { color: #681f3b !important; }
.modal-root .modal .close,
#modalRoot .premium-management-modal .close {
  border: 1px solid #e7ddda;
  background: #f4eeeb !important;
  color: #30252b !important;
}
#modalRoot .premium-management-modal .pm-summary,
#modalRoot .premium-management-modal .pm-customer,
#modalRoot .premium-management-modal .pm-stats span {
  border-color: #e5d9d7 !important;
  background: #fffaf6 !important;
  color: #30262c !important;
}
#modalRoot .premium-management-modal .pm-summary *,
#modalRoot .premium-management-modal .pm-customer *,
#modalRoot .premium-management-modal .pm-stats * { color: inherit; }
#modalRoot .premium-management-modal .pm-payment {
  border-top-color: #e5d9d7 !important;
}
#modalRoot .premium-management-modal .payment-method {
  border: 1px solid #e5d9d7;
  border-radius: 13px;
  padding: 12px 14px;
  background: #f8f1ed;
  color: #30262c;
}
#modalRoot .premium-management-modal .payment-method b { color: #681f3b; }

/* Urdu: right-align modal and payment form content without reversing controls. */
html[dir="rtl"] .modal-root .modal,
html[dir="rtl"] #modalRoot .premium-management-modal { text-align: right; }
html[dir="rtl"] .modal-root .modal h2 { margin-right: 0; margin-left: 48px; }
html[dir="rtl"] .modal-root .modal label { text-align: right; }
html[dir="rtl"] .modal-root .modal .remember-row { flex-direction: row; justify-content: flex-start; }
html[dir="rtl"] .modal-root .modal .close { right: auto; left: 18px; }
html[dir="rtl"] .modal-root .modal .footer-link { margin-right: 0; margin-left: auto; text-align: right; }
html[dir="rtl"] #modalRoot .premium-management-modal .pm-actions { justify-content: flex-start; }
html[dir="rtl"] #modalRoot .premium-management-modal .pm-customer { direction: rtl; }
@media (max-width: 760px) {
  .site-header { min-height: 62px; padding: 7px 9px; gap: 7px; }
  .site-header > .brand { flex: 0 1 118px; width: 118px; min-width: 100px; height: 42px; min-height: 42px; padding: 3px 5px; border-radius: 10px; }
  .site-header .brand-logo { width: 108px !important; height: 31px !important; flex-basis: 108px !important; }
  .site-header .header-tools { gap: 4px; }
  .mode-switch { padding: 3px; gap: 1px; }
  .mode-pill { min-height: 36px; padding: 6px 8px; font-size: .72rem; }
  #languageToggle, #accountButton { min-height: 38px; padding: 6px 8px; font-size: .72rem; }
}
@media (max-width: 380px) {
  .site-header > .brand { flex-basis: 98px; width: 98px; min-width: 92px; }
  .site-header .brand-logo { width: 89px !important; flex-basis: 89px !important; }
}
