/* ── LIGHT THEME ── */
    [data-theme="light"] {
      --bg: #ffffff;
      --bg-2: #ECEAE3;
      --surface: #FFFFFF;
      /* --surface-2: #F9F8F5; */
      --surface-3: #F0EFE9;
      --border: #E5E3DC;
      --border-2: #D0CEC5;
      --ink: #1A1916;
      --ink-2: #4A4845;
      --ink-3: #706D67;
      --ink-inv: #FFFFFF;
      --terra: #C15F3C;
      --terra-lt: #FAF0EB;
      --terra-dk: #A04E30;
      --terra-glow: rgba(193, 95, 60, .14);
      --terra-bd: #F0C4B3;
      --up: #2D6A4F;
      --up-bg: #EAF7EF;
      --up-bd: #95D5B2;
      --dn: #B5200D;
      --dn-bg: #FEF0EE;
      --dn-bd: #F5B4AD;
      --warn: #8B5E06;
      --warn-bg: #FEF8EC;
      --warn-bd: #F5DF8A;
      --shadow: 0 1px 3px rgba(26, 25, 22, .06), 0 4px 14px rgba(26, 25, 22, .09);
      --shadow-sm: 0 1px 3px rgba(26, 25, 22, .06);
      --shadow-lg: 0 8px 30px rgba(26, 25, 22, .12);
    }

    /* ── DARK THEME ── */
    [data-theme="dark"] {
      --bg: #1C1B18;
      --bg-2: #141310;
      --surface: #242320;
      --surface-2: #2C2B27;
      --surface-3: #201F1C;
      --border: #38352F;
      --border-2: #4A4740;
      --ink: #F0EFE9;
      --ink-2: #B5B1A8;
      --ink-3: #939088;
      --ink-inv: #1C1B18;
      --terra: #D4734A;
      --terra-lt: #2E211A;
      --terra-dk: #E08060;
      --terra-glow: rgba(212, 115, 74, .2);
      --terra-bd: #6B3520;
      --up: #52B788;
      --up-bg: #142D20;
      --up-bd: #2D6A4F;
      --dn: #E85D50;
      --dn-bg: #2D1210;
      --dn-bd: #7A2018;
      --warn: #F0A500;
      --warn-bg: #2A2000;
      --warn-bd: #7A5200;
      --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .35);
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, .25);
      --shadow-lg: 0 8px 30px rgba(0, 0, 0, .4);
    }

    :root {
      --r: 6px;
      --r-lg: 10px;
      --font: 'Inter', system-ui, sans-serif;
      --serif: 'Merriweather', ui-serif, Georgia, serif;
      --mono: 'JetBrains Mono', 'Courier New', monospace;
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    html {
      min-height: 100%;
    }

    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--ink);
      font-size: 15px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      transition: background .25s, color .25s;
    }

    /* NAV */
    .nav {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 200;
      transition: background .25s, border-color .25s;
    }

    .nav-in {
      max-width: 1080px;
      margin: 0 auto;
      padding: 0 20px;
      height: 54px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nav-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--ink);
    }

    .nav-logo {
      width: 32px;
      height: 32px;
      background: var(--terra);
      color: #fff;
      font-family: var(--mono);
      font-size: 15px;
      font-weight: 600;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      letter-spacing: -1px;
      box-shadow: 0 2px 6px var(--terra-glow);
      transition: background .25s;
    }

    .nav-site {
      font-family: var(--serif);
      font-size: 16px;
      font-weight: 700;
      letter-spacing: -0.3px;
      color: var(--ink);
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* DROPDOWN */
    .mc-wrap {
      position: relative;
    }

    .mc-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 32px;
      padding: 0 12px;
      border-radius: 99px;
      border: 1.5px solid var(--border-2);
      background: var(--surface);
      font-family: var(--font);
      font-size: 12px;
      font-weight: 700;
      color: var(--ink-2);
      cursor: pointer;
      white-space: nowrap;
      transition: border-color .15s, color .15s, background .15s;
    }

    .mc-btn:hover,
    .mc-btn.is-open {
      border-color: var(--terra);
      color: var(--terra);
      background: var(--terra-lt);
    }

    .mc-chev {
      transition: transform .22s;
      flex-shrink: 0;
    }

    .mc-btn.is-open .mc-chev {
      transform: rotate(180deg);
    }

    .mc-drop {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      min-width: 240px;
      width: max-content;
      max-width: calc(100vw - 32px);
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: var(--r-lg);
      box-shadow: var(--shadow);
      z-index: 400;
      overflow: hidden;
    }

    .mc-drop.is-open {
      display: block;
      animation: mcFade .17s ease;
    }

    @keyframes mcFade {
      from {
        opacity: 0;
        transform: translateY(-5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .mc-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink-2);
      border-bottom: 1px solid var(--surface-2);
      transition: background .12s, color .12s;
      white-space: nowrap;
    }

    .mc-row:last-child {
      border-bottom: none;
    }

    .mc-row:hover {
      background: var(--terra-lt);
      color: var(--terra);
    }

    /* FEATURED ROW (Trading Calculator Highlight in Dropdown) */
    .mc-row.mc-featured {
      background: var(--terra-lt);
      color: var(--terra);
      font-weight: 700;
      border-top: 1.5px solid var(--border);
    }

    .mc-row.mc-featured span#dd8 {
      color: var(--terra);
      font-weight: 700;
      transition: color .12s;
    }

    .mc-row.mc-featured .mc-ico {
      font-size: 16px;
      filter: drop-shadow(0 1px 2px rgba(193, 95, 60, 0.3));
    }

    .mc-badge {
      margin-left: auto;
      font-size: 9.5px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 99px;
      background: var(--terra);
      color: #ffffff !important;
      letter-spacing: 0.6px;
      line-height: 1.2;
      box-shadow: 0 1px 3px rgba(193, 95, 60, 0.35);
      transition: background .15s, color .15s, transform .15s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .mc-row.mc-featured:hover {
      background: var(--terra);
      color: #ffffff;
    }

    .mc-row.mc-featured:hover span#dd8 {
      color: #ffffff;
    }

    .mc-row.mc-featured:hover .mc-badge {
      background: #ffffff;
      color: var(--terra) !important;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
      transform: scale(1.05);
    }

    .mc-ico {
      font-size: 16px;
      width: 20px;
      text-align: center;
      flex-shrink: 0;
    }

    .mc-all {
      justify-content: center;
      font-weight: 700;
      color: var(--terra);
      background: var(--surface-2);
    }

    .mc-all:hover {
      background: var(--terra-lt);
    }

    /* THEME TOGGLE */
    .theme-toggle {
      width: 44px;
      height: 24px;
      background: var(--border-2);
      border: none;
      border-radius: 99px;
      cursor: pointer;
      position: relative;
      transition: background .25s;
      flex-shrink: 0;
      padding: 0;
    }

    .theme-toggle::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      transition: transform .25s;
      box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    }

    [data-theme="dark"] .theme-toggle {
      background: var(--terra);
    }

    [data-theme="dark"] .theme-toggle::after {
      transform: translateX(20px);
    }

    .toggle-icons {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      user-select: none;
      cursor: pointer;
    }

    .toggle-icon {
      transition: opacity .2s;
    }

    [data-theme="light"] .icon-moon {
      opacity: .4;
    }

    [data-theme="dark"] .icon-sun {
      opacity: .4;
    }

    /* ═══════════════════════════════════════════════════
       CLEAN AD SYSTEM (Zero empty space when no ads)
       ═══════════════════════════════════════════════════ */
    .adslot,
    .ad-strip,
    .col-ad,
    .ad-mid,
    .mob-ad,
    .ad-label {
      display: none !important;
      margin: 0 !important;
      padding: 0 !important;
      min-height: 0 !important;
      height: 0 !important;
      border: none !important;
      background: transparent !important;
    }

    /* PAGE GRID — Clean & Centered by default */
    .page {
      flex: 1 0 auto;
      width: 100%;
      max-width: 760px;
      margin: 0 auto;
      padding: 28px 20px 64px;
      display: block;
    }

    .main {
      min-width: 0;
      width: 100%;
    }

    /* When sidebar ads are loaded and filled */
    body.has-sidebar-ads .page {
      max-width: 1080px;
      display: grid;
      grid-template-columns: 160px 1fr 160px;
      column-gap: 28px;
      align-items: start;
    }

    body.has-sidebar-ads .col-ad.ad-filled {
      position: sticky;
      top: 70px;
      display: flex !important;
      flex-direction: column;
      gap: 16px;
      align-items: center;
      min-width: 160px !important;
      min-height: 600px !important;
      height: auto !important;
    }

    /* Top Banner Ad — only when filled */
    .ad-strip.ad-filled {
      display: flex !important;
      background: var(--surface);
      border-bottom: 1px solid var(--border) !important;
      padding: 8px 20px !important;
      justify-content: center;
      min-height: 90px !important;
      height: auto !important;
      box-sizing: content-box;
      transition: background .25s, border-color .25s;
    }

    /* Mid & Mobile Ads — only when filled */
    .ad-mid.ad-filled {
      display: flex !important;
      justify-content: center;
      margin: 24px auto !important;
      min-height: 250px !important;
      height: auto !important;
    }

    .mob-ad.ad-filled {
      display: block !important;
      margin: 16px auto !important;
      min-height: 50px !important;
      height: auto !important;
    }

    .adslot.ad-filled {
      display: block !important;
      text-align: center;
      background: transparent !important;
      border: none !important;
    }

    .adslot.ad-filled.ad-sky {
      width: 160px;
      min-height: 600px !important;
      height: auto !important;
    }

    .adslot.ad-filled.ad-rect {
      width: 300px;
      min-height: 250px !important;
      height: auto !important;
    }

    .adslot.ad-filled.ad-bar {
      width: 100%;
      max-width: 728px;
      min-height: 90px !important;
      height: auto !important;
    }

    ins.adsbygoogle {
      max-width: 100% !important;
    }

    .ad-filled .ad-label {
      display: block !important;
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--ink-3);
      margin-bottom: 4px !important;
      text-align: center;
      user-select: none;
    }

    /* PAGE HEADING */
    .pg-head {
      margin-bottom: 22px;
    }

    .pg-head h1 {
      font-family: var(--serif);
      font-size: clamp(22px, 3.5vw, 32px);
      font-weight: 700;
      letter-spacing: -0.4px;
      line-height: 1.2;
      margin-bottom: 6px;
      color: var(--ink);
    }

    .pg-head p {
      font-size: 14px;
      color: var(--ink-3);
      font-weight: 500;
    }

    /* TABS */
    .tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 16px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
      display: none;
    }

    .tab {
      flex-shrink: 0;
      padding: 8px 18px;
      border-radius: 99px;
      border: 1.5px solid var(--border-2);
      background: var(--surface);
      font-family: var(--font);
      font-size: 13px;
      font-weight: 600;
      color: var(--ink-2);
      cursor: pointer;
      white-space: nowrap;
      transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
    }

    .tab.on {
      border-color: var(--terra);
      background: var(--terra);
      color: #fff;
      box-shadow: 0 2px 8px var(--terra-glow);
    }

    .tab:not(.on):hover {
      border-color: var(--terra);
      color: var(--terra);
    }

    /* PANELS */
    .panel {
      display: none;
    }

    .panel.on {
      display: block;
    }

    /* CALC CARD */
    .calc-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--r-lg);
      overflow: hidden;
      box-shadow: var(--shadow);
      margin-bottom: 12px;
      transition: background .25s, border-color .25s, box-shadow .25s;
    }

    .input-z {
      padding: 24px 24px 20px;
      border-bottom: 1px solid var(--border);
      transition: border-color .25s;
    }

    .sentence {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 12px;
      line-height: 2.6;
      font-family: var(--serif);
      font-size: 18px;
      font-weight: 400;
      color: var(--ink);
    }

    .wrd {
      flex-shrink: 0;
      user-select: none;
      font-style: italic;
      color: var(--ink-2);
    }

    .fw {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    .fi {
      height: 44px;
      width: 112px;
      border: 1.5px solid var(--border-2);
      border-radius: var(--r);
      background: var(--surface-2);
      padding: 0 32px 0 12px;
      font-family: var(--mono);
      font-size: 15px;
      font-weight: 500;
      color: var(--ink);
      outline: none;
      transition: border-color .15s, background .15s, box-shadow .15s;
      appearance: textfield;
      -moz-appearance: textfield;
    }

    .fi::-webkit-outer-spin-button,
    .fi::-webkit-inner-spin-button {
      -webkit-appearance: none;
    }

    .fi:focus {
      border-color: var(--terra);
      background: var(--terra-lt);
      box-shadow: 0 0 0 3px var(--terra-glow);
    }

    .fi.bad {
      border-color: var(--dn);
      background: var(--dn-bg);
      box-shadow: 0 0 0 3px rgba(181, 32, 13, .1);
    }

    .fi::placeholder {
      color: var(--ink-3);
      font-family: var(--font);
      font-size: 13px;
    }

    .fu {
      position: absolute;
      right: 10px;
      pointer-events: none;
      font-size: 11px;
      font-weight: 700;
      color: var(--ink-3);
      font-family: var(--font);
    }

    /* RESULT */
    .res-z {
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      min-height: 76px;
      border-bottom: 1px solid var(--border);
      transition: background .22s, border-color .22s;
    }

    .res-z.s-idle {
      background: var(--surface-2);
    }

    .res-z.s-ok {
      background: var(--terra-lt);
      border-bottom-color: var(--terra-bd);
    }

    .res-z.s-up {
      background: var(--up-bg);
      border-bottom-color: var(--up-bd);
    }

    .res-z.s-dn {
      background: var(--dn-bg);
      border-bottom-color: var(--dn-bd);
    }

    .res-z.s-warn {
      background: var(--warn-bg);
      border-bottom-color: var(--warn-bd);
    }

    .res-eye {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.4px;
      color: var(--ink-3);
      margin-bottom: 4px;
      transition: color .2s;
    }

    .res-num {
      font-family: var(--mono);
      font-size: 38px;
      font-weight: 500;
      color: var(--ink);
      letter-spacing: -2px;
      line-height: 1;
      transition: color .2s;
    }

    .res-num.up {
      color: var(--up);
    }

    .res-num.dn {
      color: var(--dn);
    }

    .res-num.warn {
      color: var(--warn);
      font-size: 13px;
      font-family: var(--font);
      font-weight: 700;
      letter-spacing: 0;
    }

    .res-num.idle {
      color: var(--ink-3);
      font-size: 14px;
      font-family: var(--font);
      font-weight: 500;
      letter-spacing: 0;
    }

    .res-sub {
      font-size: 12px;
      color: var(--ink-3);
      font-weight: 500;
      margin-top: 5px;
      transition: color .2s;
    }

    /* COPY BUTTON */
    .copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 34px;
      padding: 0 14px;
      border-radius: 99px;
      border: 1.5px solid var(--border-2);
      background: var(--surface);
      font-family: var(--font);
      font-size: 12.5px;
      font-weight: 600;
      color: var(--ink-2);
      cursor: pointer;
      flex-shrink: 0;
      white-space: nowrap;
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transition: border-color .15s, color .15s, background .15s, opacity .18s .08s, visibility 0s .27s;
    }

    .copy-btn.show {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
      transition: border-color .15s, color .15s, background .15s, opacity .18s .08s, visibility 0s 0s;
    }

    .copy-btn:hover {
      border-color: var(--terra);
      color: var(--terra);
      background: var(--terra-lt);
    }

    .copy-btn.ok {
      border-color: var(--up);
      color: var(--up);
      background: var(--up-bg);
    }

    /* FORMULA */
    .formula {
      padding: 9px 24px;
      background: var(--surface-3);
      font-size: 11.5px;
      color: var(--ink-3);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      transition: background .25s;
    }

    .formula code {
      font-family: var(--mono);
      font-size: 11px;
      background: var(--surface);
      border: 1px solid var(--border);
      padding: 2px 6px;
      border-radius: 4px;
      color: var(--terra);
      font-weight: 500;
      transition: background .25s, border-color .25s, color .25s;
    }

    /* HISTORY */
    .hist {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--r-lg);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      margin-top: 4px;
      margin-bottom: 28px;
      transition: background .25s, border-color .25s;
    }

    .hist-hd {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 18px;
      border-bottom: 1px solid var(--border);
      background: var(--surface-3);
      transition: background .25s, border-color .25s;
    }

    .hist-hd span {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--ink-3);
    }

    .hist-clr {
      background: none;
      border: none;
      cursor: pointer;
      font-family: var(--font);
      font-size: 11.5px;
      font-weight: 600;
      color: var(--ink-3);
      transition: color .14s;
      padding: 0;
    }

    .hist-clr:hover {
      color: var(--dn);
    }

    .hist-body {
      max-height: 160px;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--border-2) transparent;
    }

    .hist-body::-webkit-scrollbar {
      width: 3px;
    }

    .hist-body::-webkit-scrollbar-thumb {
      background: var(--border-2);
      border-radius: 99px;
    }

    .hist-row {
      display: flex;
      align-items: center;
      padding: 9px 18px;
      gap: 10px;
      border-bottom: 1px solid var(--surface-3);
      transition: background .1s;
    }

    .hist-row:last-child {
      border-bottom: none;
    }

    .hist-row:hover {
      background: var(--surface-2);
    }

    .hist-expr {
      flex: 1;
      font-size: 13px;
      color: var(--ink-2);
      font-weight: 500;
    }

    .hist-ans {
      font-family: var(--mono);
      font-size: 13px;
      font-weight: 500;
      color: var(--terra);
    }

    .hist-none {
      padding: 18px;
      text-align: center;
      font-size: 13px;
      color: var(--ink-3);
      font-style: italic;
    }

    /* SECTIONS */

    .sec-lbl {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: var(--ink-3);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .sec-lbl::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
      transition: background .25s;
    }

    .about-h2 {
      font-family: var(--serif);
      font-size: 18px;
      font-weight: 700;
      color: var(--ink);
      margin-bottom: 12px;
      letter-spacing: -0.3px;
    }

    .fq-h3 {
      font-family: var(--font);
      font-size: 14px;
      font-weight: 600;
      color: inherit;
      margin: 0;
      display: inline;
    }

    .about {
      font-family: var(--serif);
      font-size: 15px;
      color: var(--ink-2);
      line-height: 1.8;
      margin-bottom: 24px;
      font-weight: 400;
    }

    .about p+p {
      margin-top: 12px;
    }

    /* FACTS */
    .facts {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 28px;
    }

    .fact {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--r);
      padding: 15px 16px;
      box-shadow: var(--shadow-sm);
      transition: background .25s, border-color .25s;
    }

    .fact-lbl {
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--terra);
      margin-bottom: 6px;
    }

    .fact p {
      font-size: 13px;
      color: var(--ink-2);
      line-height: 1.6;
      font-weight: 500;
    }

    /* FAQ */
    .faq {
      margin-bottom: 28px;
    }

    .fq {
      border-top: 1px solid var(--border);
    }

    .fq:last-child {
      border-bottom: 1px solid var(--border);
    }

    .fq-btn {
      width: 100%;
      text-align: left;
      background: none;
      border: none;
      cursor: pointer;
      font-family: var(--font);
      font-size: 14px;
      font-weight: 600;
      color: var(--ink);
      padding: 15px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      transition: color .14s;
    }

    .fq-btn:hover {
      color: var(--terra);
    }

    .fq-ico {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      border-radius: 50%;
      border: 1.5px solid var(--border-2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      line-height: 1;
      color: var(--ink-3);
      font-style: normal;
      transition: transform .24s, border-color .14s, background .14s, color .14s;
    }

    .fq.open .fq-ico {
      transform: rotate(45deg);
      border-color: var(--terra);
      background: var(--terra-lt);
      color: var(--terra);
    }

    .fq-body {
      overflow: hidden;
      max-height: 0;
      transition: max-height .32s ease;
    }

    .fq-inner {
      font-family: var(--serif);
      font-size: 14px;
      color: var(--ink-2);
      line-height: 1.78;
      padding-bottom: 15px;
    }

    /* FOOTER */
    .footer {
      margin-top: auto;
      width: 100%;
      background: var(--surface-3);
      border-top: 1px solid var(--border);
      padding: 20px;
      transition: background .25s, border-color .25s;
    }

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

    .fc {
      font-size: 12px;
      color: var(--ink-3);
      font-weight: 500;
    }

    .fl {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }

    .fl a {
      font-size: 12px;
      font-weight: 600;
      color: var(--ink-3);
      text-decoration: none;
      transition: color .14s;
    }

    .fl a:hover {
      color: var(--terra);
    }

    /* Footer Language */
    .footer-lang {
      max-width: 1080px;
      margin: 12px auto 0;
      padding: 12px 20px 0;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      transition: border-color .25s;
    }

    .fl-lbl {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--ink-3);
      margin-right: 4px;
      white-space: nowrap;
    }

    .fl-btn {
      padding: 4px 11px;
      border-radius: 99px;
      border: 1.5px solid var(--border-2);
      background: var(--surface);
      font-family: var(--font);
      font-size: 11.5px;
      font-weight: 600;
      color: var(--ink-3);
      cursor: pointer;
      white-space: nowrap;
      transition: border-color .15s, color .15s, background .15s;
    }

    .fl-btn.on {
      border-color: var(--terra);
      color: var(--terra);
      background: var(--terra-lt);
    }

    .fl-btn:not(.on):hover {
      border-color: var(--terra);
      color: var(--terra);
    }

    /* RESPONSIVE */
    @media(max-width:880px) {
      .page {
        grid-template-columns: 1fr;
      }

      .col-ad {
        display: none;
      }

      .mob-ad.ad-filled {
        display: block !important;
      }
    }

    @media(max-width:560px) {
      .page {
        padding: 16px 14px 50px;
      }

      .sentence {
        font-size: 16px;
        gap: 6px 8px;
        line-height: 2.4;
      }

      .fi {
        width: 90px;
        height: 40px;
        font-size: 14px;
      }

      .res-num {
        font-size: 28px;
      }

      .input-z {
        padding: 16px 16px 14px;
      }

      .res-z {
        padding: 14px 16px;
      }

      .formula {
        padding: 8px 16px;
      }

      .hist-row {
        padding: 9px 14px;
      }

      .facts {
        grid-template-columns: 1fr;
      }

      .tab {
        font-size: 12.5px;
        padding: 6px 12px;
      }

      .pg-head h1 {
        font-size: 22px;
      }

      .nav-site {
        font-size: 14px;
      }

      .footer-in {
        flex-direction: column;
        align-items: flex-start;
      }

      .mc-label {
        display: none;
      }

      .mc-btn {
        padding: 0 9px;
      }

      .footer-lang {
        padding: 10px 14px 0;
      }

      .fl-btn {
        font-size: 11px;
        padding: 3px 8px;
      }
    }

/* ═══════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES (About, Contact, Legal)
   ═══════════════════════════════════════════════════ */
.page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.page-hero {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--ink);
}
.page-hero .updated {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.page-hero .updated span {
  color: var(--terra);
  font-weight: 600;
}
.prose h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 10px;
  letter-spacing: -0.3px;
}
.prose h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 8px;
}
.prose p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 14px;
  font-weight: 400;
}
.prose ul, .prose ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.prose li {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 6px;
}
.prose a {
  color: var(--terra);
  text-decoration: none;
  border-bottom: 1px solid var(--terra-bd);
  transition: border-color .14s, color .14s;
}
.prose a:hover { border-color: var(--terra); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose .highlight-box {
  background: var(--terra-lt);
  border: 1px solid var(--terra-bd);
  border-left: 3px solid var(--terra);
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
}
/* Contact form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--terra);
  background: var(--terra-lt);
  box-shadow: 0 0 0 3px var(--terra-glow);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-submit {
  height: 42px;
  padding: 0 28px;
  background: var(--terra);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 8px var(--terra-glow);
}
.form-submit:hover { background: var(--terra-dk); }
.form-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 10px;
  font-weight: 500;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.contact-card-icon { font-size: 24px; margin-bottom: 8px; }
.contact-card-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--terra); margin-bottom: 4px;
}
.contact-card-val {
  font-size: 14px; color: var(--ink-2); font-weight: 500;
}
@media (max-width: 560px) {
  .page-wrap { padding: 24px 14px 60px; }
  .prose h2 { font-size: 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 18px; }
}

ins.adsbygoogle { max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   TRADING PROFIT & LOSS CALCULATOR (TradeCalc Pro Interface)
   Seamless Light & Dark Theme, Zero-CLS, Mobile Responsive
   ═══════════════════════════════════════════════════════════════ */
.trade-wrap {
  margin-top: 10px;
}
.trade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.trade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg, 12px);
  padding: 22px;
  box-shadow: var(--shadow);
}
.trade-card h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.trade-sec {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.trade-sec:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.trade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.trade-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trade-field label {
  display: block;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.trade-field input,
.trade-field select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2, #F9F8F5);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: var(--r, 6px);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.trade-field input:focus,
.trade-field select:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(193, 95, 60, 0.15);
}
.trade-field small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.35;
}
.trade-pills {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.trade-pill {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 10px 14px;
  border-radius: var(--r, 6px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.trade-pill:hover {
  border-color: var(--border-2);
}
.trade-pill.long.active {
  border-color: var(--up-bd);
  background: var(--up-bg);
  color: var(--up);
}
.trade-pill.short.active {
  border-color: var(--dn-bd);
  background: var(--dn-bg);
  color: var(--dn);
}
.trade-result {
  position: sticky;
  top: 18px;
  height: max-content;
}
.trade-profitbox {
  padding: 18px;
  border: 1px solid var(--up-bd);
  background: var(--up-bg);
  border-radius: var(--r-lg, 10px);
  margin-bottom: 16px;
  transition: background .2s, border-color .2s;
}
.trade-profitbox.loss {
  border-color: var(--dn-bd);
  background: var(--dn-bg);
}
.trade-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-3);
}
.trade-big {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 4px 0;
  font-family: var(--mono, monospace);
}
.trade-big.positive {
  color: var(--up);
}
.trade-big.negative {
  color: var(--dn);
}
.trade-sub {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}
.trade-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.trade-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r, 6px);
  padding: 11px 13px;
}
.trade-stat span {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
}
.trade-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  font-family: var(--mono, monospace);
  overflow-wrap: anywhere;
}
.trade-stat.wide {
  grid-column: 1 / -1;
}
.trade-breakdown {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.trade-breakdown h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.trade-rowline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.trade-rowline:last-child {
  border-bottom: none;
}
.trade-rowline span {
  color: var(--ink-3);
}
.trade-rowline b {
  color: var(--ink);
  font-family: var(--mono, monospace);
}
.trade-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.trade-btn {
  border: 0;
  border-radius: var(--r, 6px);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, background .15s;
}
.trade-btn.primary {
  background: var(--terra);
  color: #fff;
  flex: 1;
}
.trade-btn.primary:hover {
  filter: brightness(1.08);
}
.trade-btn.secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
}
.trade-btn.secondary:hover {
  background: var(--surface-3);
}
.trade-notice {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.55;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--r, 6px);
}
@media (max-width: 860px) {
  .trade-layout {
    grid-template-columns: 1fr;
  }
  .trade-result {
    position: static;
  }
  .trade-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .trade-grid,
  .trade-grid.three,
  .trade-stats {
    grid-template-columns: 1fr;
  }
  .trade-stat.wide {
    grid-column: auto;
  }
  .trade-big {
    font-size: 24px;
  }
  .trade-actions {
    flex-direction: column;
  }
}
