/* Site-wide Light / Dark mode. Dark is the site's own look (styles.css + dashboard.css); Light re-colours the same components
   through their variables and a few overrides. The mode is chosen with the sun / moon button in the menu (theme.js) and kept in localStorage. */
/* The mode switch in the menu: shows the mode you would switch to. */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s, transform .3s;
}
.theme-btn:hover { border-color: rgba(255, 138, 43, 0.6); background: rgba(255, 138, 43, 0.07); box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.08); transform: rotate(18deg); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .t-sun { display: none; }
html[data-theme="dark"] .theme-btn .t-sun { display: block; }       /* dark now: the sun invites to light */
html[data-theme="dark"] .theme-btn .t-moon { display: none; }
.theme-btn[hidden] { display: none; }

/* LIGHT mode ---------------------------------------------------------------- */
html[data-theme="light"] body { background: #ece3d3; color-scheme: light; }
html[data-theme="light"] body {
  --bg: #ece3d3; --surface: #fffaf0; --surface-high: #ffffff;
  --text: #1b130c; --muted: rgba(27, 19, 12, .68); --faint: rgba(27, 19, 12, .62);
  --line: rgba(27, 19, 12, .12); --line-strong: rgba(27, 19, 12, .22);
  --glass-hi: rgba(255, 255, 255, .88); --glass: rgba(255, 250, 240, .74); --glass-line: rgba(255, 255, 255, .92);
  --glass-shadow: 0 26px 60px -30px rgba(70, 45, 10, .5), inset 0 1px 0 #fff;
  --primary: #d9811c; --secondary: #d9541a;
  color: var(--text);
}
html[data-theme="light"] body .nav { background: rgba(255, 252, 246, .78); border-bottom-color: rgba(27, 19, 12, .1); }
html[data-theme="light"] .dim { color: rgba(27, 19, 12, .46); }
html[data-theme="light"] .btn-ghost { background: rgba(27, 19, 12, .05); border-color: rgba(27, 19, 12, .2); color: var(--text); }
html[data-theme="light"] .btn-ghost:hover { background: #fff; }
html[data-theme="light"] .status-pill { background: rgba(255, 255, 255, .6); border-color: rgba(27, 19, 12, .18); color: var(--muted); }
/* The glass home page (/home): the Mumia Core card's list was white. */
html[data-theme="light"] .core-list li { color: var(--text); }
html[data-theme="light"] .nav .nav-links a { color: var(--muted); }
html[data-theme="light"] .nav .nav-links a.active, html[data-theme="light"] .nav .nav-links a:hover { color: var(--primary); }
html[data-theme="light"] .nav .drop-toggle, html[data-theme="light"] .nav .theme-btn, html[data-theme="light"] .nav .menu-btn { background: rgba(27, 19, 12, .04); }
/* The page you are on: dark text on the orange (orange on orange, or white for Contact, could not be read). */
@media (min-width: 881px) {
  html[data-theme="light"] .nav .nav-links > a.active, html[data-theme="light"] .nav .contact-btn.active .contact-label {
    color: #7a3300; background: linear-gradient(150deg, rgba(255, 138, 43, 0.55), rgba(255, 90, 20, 0.25));
  }
}
html[data-theme="light"] .plan-sheet.premium, html[data-theme="light"] .pkg.premium {
  background: linear-gradient(160deg, #ffffff, #fff1d8) padding-box, linear-gradient(140deg, rgba(217, 129, 28, .8), rgba(217, 129, 28, .3) 60%, rgba(217, 129, 28, .6)) border-box;
}
html[data-theme="light"] .spec:hover, html[data-theme="light"] .stat:hover, html[data-theme="light"] .plan-sheet:hover,
html[data-theme="light"] .promise:hover, html[data-theme="light"] .pkg:hover {
  box-shadow: 0 26px 50px -24px rgba(70, 45, 10, .5);
}

/* Light mode: the store buttons stay black, so their text must stay white. */
html[data-theme="light"] .store-btn:not(.off) { color: #fff; }
html[data-theme="light"] .store-btn:not(.off) small { color: rgba(255, 255, 255, .62); }

/* Light mode: the menus (phone drawer, rail tips, language / contact / account / news panels) are light too,
   otherwise their dark text would sit on dark glass. */
html[data-theme="light"] .nav .drop-panel, html[data-theme="light"] .nav .news-panel {
  background: rgba(255, 252, 246, .97); border-color: rgba(27, 19, 12, .14); box-shadow: 0 24px 60px -20px rgba(70, 45, 10, .45);
}
html[data-theme="light"] .nav .drop-item:hover { background: rgba(217, 129, 28, .1); border-color: rgba(217, 129, 28, .3); }
html[data-theme="light"] .nav .nav-links > a > span, html[data-theme="light"] .nav .nav-links .contact-label > span:not(.drop-chevron) {
  background: rgba(255, 252, 246, .97); border-color: rgba(27, 19, 12, .14);
}
/* (With the rail opened wide the names are plain text in the rows: no tip background behind them.) */
@media (min-width: 881px) {
  html.rail-open[data-theme="light"] .nav .nav-links > a > span,
  html.rail-open[data-theme="light"] .nav .nav-links .contact-label > span:not(.drop-chevron) { background: none; border-color: transparent; }
}
@media (max-width: 880px) {
  html[data-theme="light"] .nav .nav-links { background: rgba(255, 252, 246, .97); }
  html[data-theme="light"] .nav .nav-links > a:hover, html[data-theme="light"] .nav .nav-links .contact-label:hover { background: rgba(27, 19, 12, .06); }
}

/* Pages without the 3D stage: a soft warm light behind the content instead of the dark colour glow. */
html[data-theme="light"] .page-glow {
  background:
    radial-gradient(48vw 40vw at 88% 4%, rgba(255, 190, 100, .38), transparent 70%),
    radial-gradient(44vw 44vw at 4% 42%, rgba(255, 222, 170, .30), transparent 70%),
    radial-gradient(40vw 40vw at 70% 98%, rgba(255, 170, 110, .22), transparent 70%);
}

/* Account (sign in / sign up / my account): the dark crystal backdrop becomes a light one, the frosted card turns white. */
html[data-theme="light"] body[data-page="account"]::before {
  background: radial-gradient(60vw 50vw at 12% 8%, #fff3dc, transparent 70%), radial-gradient(55vw 55vw at 92% 92%, #ffd9b0, transparent 70%), #ece3d3;
}
html[data-theme="light"] body[data-page="account"] .page-glow { opacity: .35; }
html[data-theme="light"] .wrap.account-wrap {
  background: linear-gradient(150deg, rgba(255, 255, 255, .92), rgba(255, 250, 240, .8)); border-color: rgba(255, 255, 255, .95);
  box-shadow: 0 40px 100px -40px rgba(70, 45, 10, .5), inset 0 1px 0 #fff;
}
html[data-theme="light"] .account-intro { background: linear-gradient(160deg, rgba(255, 244, 224, .8), rgba(255, 250, 240, .4)); border-right-color: rgba(27, 19, 12, .08); }
html[data-theme="light"] .account-perks li { color: rgba(27, 19, 12, .78); }
html[data-theme="light"] .acc-tabs { background: rgba(27, 19, 12, .06); border-color: rgba(27, 19, 12, .12); }
html[data-theme="light"] .acc-set { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .acc-msg.bad { color: #b3261e; background: rgba(255, 90, 90, .1); }
html[data-theme="light"] .acc-news { background: rgba(255, 138, 43, .08); }

/* Light: the dark icons inside the sign-in fields. */
html[data-theme="light"] .field input[name="login"], html[data-theme="light"] .field input[name="username"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231b130c' fill-opacity='.55'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E"); }
html[data-theme="light"] .field input[type="email"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231b130c' fill-opacity='.55'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); }
html[data-theme="light"] .field input[name="password"], html[data-theme="light"] .field input[name="current"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231b130c' fill-opacity='.55'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z'/%3E%3C/svg%3E"); }
html[data-theme="light"] .field input { color: var(--text); border-bottom-color: rgba(27, 19, 12, .3); }
html[data-theme="light"] .field input::placeholder { color: rgba(27, 19, 12, .38); }

/* Account keys: the "renewed" mark readable on the light page. */
html[data-theme="light"] .key-tag { color: #8a3d00; background: rgba(255, 138, 43, .24); }

/* Legal pages. */
html[data-theme="light"] .policy-toc { background: rgba(255, 252, 246, .88); }
html[data-theme="light"] .policy-body section:first-child { background: rgba(255, 138, 43, .08); }

/* The purchase window, the support chat and the reseller page's panels are dark panels in both modes: they keep the dark colours. */
html[data-theme="light"] .buy-modal, html[data-theme="light"] .support, html[data-theme="light"] .rs-card {
  --bg: #07080b; --surface: #0f1116; --surface-high: #151821; --text: #f5f6f8; --muted: #8e939f; --faint: #80858f;
  --line: rgba(255, 255, 255, .10); --line-strong: rgba(255, 255, 255, .18);
  --glass-hi: rgba(255, 255, 255, .11); --glass: rgba(255, 255, 255, .065); --glass-line: rgba(255, 255, 255, .16);
  --glass-shadow: 0 18px 50px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .14);
  --primary: #ff8a2b; --secondary: #ff5a14; color: var(--text); color-scheme: dark;
}
html[data-theme="light"] .buy-modal .btn-ghost, html[data-theme="light"] .support .btn-ghost, html[data-theme="light"] .rs-card .btn-ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
/* (The light page's dark field lines and hints do not show on those dark panels.) */
html[data-theme="light"] .rs-card .field input { border-bottom-color: rgba(255, 255, 255, .2); }
html[data-theme="light"] .rs-card .field input::placeholder { color: rgba(142, 147, 159, .55); }
/* Light: what was white or pale on the dark page and vanished on the light one (found by a contrast check of every page). */
html[data-theme="light"] .field > span:first-child { color: rgba(27, 19, 12, .62); }
html[data-theme="light"] .rs-card .field > span:first-child { color: rgba(255, 255, 255, .55); }
html[data-theme="light"] .bar-row.us .val { color: var(--text); }
html[data-theme="light"] .pill { color: #8a3d00; background: rgba(255, 138, 43, .2); }
html[data-theme="light"] .pkg.promo .sheet-top > span:first-child { color: #12753d; }
html[data-theme="light"] .btn-danger { color: #b3261e; background: rgba(255, 90, 90, .12); border-color: rgba(179, 38, 30, .45); }
