/* Asset Terra: theme toggle, language picker and dark theme (all public pages) */

/* ---------- Header tools ---------- */
.site .panel { order:1; }
.tools { order:2; display:flex; align-items:center; gap:8px; margin-left:auto; flex:none; }
.site .menu-btn { order:3; margin-left:0; }
.tool-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:44px; min-width:44px; padding:0 12px;
  border:1.5px solid var(--tool-line); border-radius:22px; background:transparent; color:inherit; cursor:pointer;
  font:600 14px "Poppins",Arial,sans-serif; letter-spacing:.3px; }
.tool-btn:hover { border-color:var(--green); }
.tool-btn svg { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.theme-btn { padding:0; width:44px; }
.theme-btn .sun { display:none; }
[data-theme="dark"] .theme-btn .sun { display:block; }
[data-theme="dark"] .theme-btn .moon { display:none; }
.lang { position:relative; }
.lang-menu { position:absolute; right:0; top:calc(100% + 8px); z-index:60; display:grid; gap:2px; min-width:210px; max-height:min(70vh,460px); overflow:auto;
  padding:8px; border-radius:18px; background:var(--surface); border:1px solid var(--tool-line); box-shadow:0 18px 40px rgba(0,0,0,.18); }
.lang-menu[hidden] { display:none; }
.lang-menu button { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:10px 14px; border:0; border-radius:12px;
  background:transparent; color:inherit; font:400 15px "Poppins",Arial,sans-serif; text-align:left; cursor:pointer; }
.lang-menu button:hover, .lang-menu button:focus-visible { background:var(--hover); outline:none; }
.lang-menu button[aria-checked="true"] { font-weight:600; }
.lang-menu button[aria-checked="true"]::after { content:""; width:12px; height:7px; border:solid var(--green); border-width:0 0 2px 2px; transform:rotate(-45deg) translateY(-2px); }
.lang-menu small { opacity:.6; font-size:12px; }

:root { --tool-line:#d6e9b4; --surface:#fff; --hover:#f3fbe3; }

/* Hide Google Translate's own bar and highlights */
#gt-el { display:none !important; }
iframe.skiptranslate, .skiptranslate > iframe, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame { display:none !important; visibility:hidden !important; }
body { top:0 !important; }
.goog-text-highlight { background:none !important; box-shadow:none !important; }

@media (max-width:1100px) { .tools { gap:6px; } }
@media (max-width:440px) {
  .site { gap:10px !important; }
  .site .logo { gap:10px; }
  .site .logo b { font-size:18px; }
  .tool-btn { height:40px; min-width:40px; padding:0 9px; }
  .theme-btn { width:40px; padding:0; }
  .lang-btn .globe { display:none; }
  .site .menu-btn { width:40px; height:40px; }
}

/* ---------- Smooth theme change ---------- */
html.theme-anim, html.theme-anim * { transition:background-color .25s, color .25s, border-color .25s !important; }

/* ---------- Dark theme ---------- */
html[data-theme="dark"] {
  color-scheme:dark;
  --bg:#0e130f; --surface:#172019; --text:#edf2ea; --tool-line:#2c3a2d; --hover:#1f2b21;
  --soft:#141d16; --line:#263228; --muted:#a6b1a5;
}
[data-theme="dark"] html, html[data-theme="dark"], [data-theme="dark"] body { background:var(--bg); color:var(--text); }
[data-theme="dark"] a:focus-visible, [data-theme="dark"] button:focus-visible, [data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus-visible, [data-theme="dark"] textarea:focus-visible, [data-theme="dark"] summary:focus-visible { outline-color:var(--lime); }
[data-theme="dark"] .panel.open { background:var(--surface); box-shadow:0 18px 40px rgba(0,0,0,.5); }

/* Home page */
[data-theme="dark"] .art::before { opacity:.25; }
[data-theme="dark"] .cta { color:#111; }
[data-theme="dark"] .cta.ghost { color:var(--text); box-shadow:inset 0 0 0 2px var(--text); background:transparent; }
[data-theme="dark"] .feat, [data-theme="dark"] .steps li, [data-theme="dark"] .plan, [data-theme="dark"] .calc-out,
[data-theme="dark"] .qa details { background:var(--surface); border-color:var(--line); }
[data-theme="dark"] .qa details[open] { background:#1b261d; border-color:#1b261d; }
[data-theme="dark"] .qa summary::after { color:#111; }
[data-theme="dark"] .feat:hover { box-shadow:0 18px 40px rgba(0,0,0,.4); }
[data-theme="dark"] .plan.pop { background:#0a0f0b; border-color:#3d5a1c; }
[data-theme="dark"] .calc-out { box-shadow:0 24px 50px rgba(0,0,0,.35); }
[data-theme="dark"] #c-chart rect[fill="#0d4d12"] { fill:#4f9a0a; }
[data-theme="dark"] .k1 { background:#4f9a0a; }
[data-theme="dark"] .sliders input { accent-color:var(--lime); }
[data-theme="dark"] .sec.dark, [data-theme="dark"] .foot { background:#0a0f0b; }
[data-theme="dark"] .banner { color:#111; }

/* Inner pages */
[data-theme="dark"] .hero-sm { background:radial-gradient(closest-side at 80% 30%, rgba(179,242,43,.12), rgba(0,0,0,0)); }
[data-theme="dark"] .card, [data-theme="dark"] .auth { background:var(--surface); }
[data-theme="dark"] .form input, [data-theme="dark"] .form select, [data-theme="dark"] .form textarea { background-color:var(--bg); color:var(--text); border-color:#33432f; }
[data-theme="dark"] .reg select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23edf2ea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
[data-theme="dark"] .reg input:focus, [data-theme="dark"] .reg select:focus { border-color:var(--lime); }
[data-theme="dark"] .reg .hint, [data-theme="dark"] .reg .opt { color:var(--muted); }
[data-theme="dark"] .error { color:#ff8a7a; }
[data-theme="dark"] .ok { color:var(--lime); background:#1b261d; }
[data-theme="dark"] .ok.note { background:var(--bg); }
[data-theme="dark"] .faq, [data-theme="dark"] .site-foot, [data-theme="dark"] .have { border-color:var(--line); }
[data-theme="dark"] .stats { background:#1b2b14; }

/* ---------- Translated pages: longer words need room ---------- */
.nav a, .site .main a, .pill-btn, .pill, .cta { white-space:nowrap; }
html[class*="translated-"] h1 .l1, html[class*="translated-"] h1 em { white-space:normal; }
html[class*="translated-"] .hero h1 { font-size:clamp(32px,4.2vw,56px); }
html[class*="translated-"] .cta { width:auto; padding:0 22px; }
@media (min-width:1101px) {
  html[class*="translated-"] .nav { gap:clamp(12px,1.4vw,24px); }
  html[class*="translated-"] .nav a { font-size:15px; }
  html[class*="translated-"] .pill-btn { padding:0 16px; font-size:15px; }
}
@media (max-width:820px) {
  html[class*="translated-"] .site .menu-btn { display:grid; }
  html[class*="translated-"] .site .panel { display:none; position:absolute; top:calc(100% - 8px); left:0; right:0; z-index:20; flex-direction:column; align-items:stretch; gap:20px; padding:24px; background:var(--surface); border-radius:24px; box-shadow:0 18px 40px rgba(0,0,0,.18); }
  html[class*="translated-"] .site .panel.open { display:flex; }
  html[class*="translated-"] .site .nav, html[class*="translated-"] .site .main { flex-direction:column; gap:4px; margin:0; }
  html[class*="translated-"] .site .nav a, html[class*="translated-"] .site .main a { padding:12px 4px; font-size:18px; }
  html[class*="translated-"] .site .actions { flex-direction:column; }
  html[class*="translated-"] .site .pill-btn, html[class*="translated-"] .site .pill { width:100%; }
}

/* Phone menu: Register / Login sit side by side at their natural size */
@media (max-width:820px) {
  .site .panel .actions { flex-direction:row; flex-wrap:wrap; gap:12px; }
  .site .panel .actions .pill-btn { width:auto; min-width:116px; padding:0 24px; }
}
@media (max-width:820px) {
  .site .panel .actions .pill { width:auto; min-width:116px; padding:0 24px; }
}
@media (max-width:820px) {
  html[class*="translated-"] .site .actions { flex-direction:row; flex-wrap:wrap; }
  html[class*="translated-"] .site .pill-btn, html[class*="translated-"] .site .pill { width:auto; min-width:116px; }
}

/* Final banner buttons keep their colours in both themes */
.banner .cta.dark-btn, [data-theme="dark"] .banner .cta.dark-btn { background:#111; color:#fff; }
.banner .cta.ghost-dark, [data-theme="dark"] .banner .cta.ghost-dark { background:transparent; color:#111; box-shadow:inset 0 0 0 2px #111; }
.banner .cta.dark-btn:hover { background:#0d4d12; }
.banner .cta.ghost-dark:hover { background:#111; color:#fff; }

/* Tablets and small laptops (821–1100px): the full menu stays visible, in two rows:
   logo + Register/Login + language/theme on top, the menu links centred underneath. */
@media (min-width:821px) and (max-width:1100px) {
  .site { flex-wrap:wrap; row-gap:6px; min-height:0 !important; padding:18px 0 8px; }
  .site .panel { display:contents !important; }
  .site .logo { order:0; }
  .site .actions { order:1; margin-left:auto; gap:8px; flex-direction:row !important; }
  .site .tools { order:2; margin-left:0; }
  .site .nav, .site .main { order:3; flex-basis:100%; flex-direction:row !important; justify-content:center; gap:clamp(22px,4vw,44px) !important; margin:0;
    padding:10px 0 2px; border-top:1px solid var(--tool-line); }
  .site .nav a, .site .main a { padding:4px 0 !important; font-size:16px !important; }
  .site .menu-btn { display:none !important; }
  .site .pill-btn, .site .pill { width:auto !important; height:42px !important; padding:0 20px !important; }
}
/* Translated pages need the two-row header a little earlier, because translated words are longer */
@media (min-width:1101px) and (max-width:1320px) {
  html[class*="translated-"] .site { flex-wrap:wrap; row-gap:6px; min-height:0; padding:18px 0 8px; }
  html[class*="translated-"] .site .panel { display:contents; }
  html[class*="translated-"] .site .actions { order:1; margin-left:auto; gap:8px; }
  html[class*="translated-"] .site .tools { order:2; margin-left:0; }
  html[class*="translated-"] .site .nav, html[class*="translated-"] .site .main { order:3; flex-basis:100%; justify-content:center; margin:0; padding:10px 0 2px; border-top:1px solid var(--tool-line); }
}
@media (min-width:821px) and (max-width:1100px) { .site { margin-bottom:22px; } }
