/* ==========================================================================
   Ecom Profit Calculator — styles
   Light + dark themes, glass surfaces, 3D depth, calculators, content.
   ========================================================================== */

:root {
  --bg: #EEF2EF;
  --bg-2: #E4EBE6;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --surface-solid: #FFFFFF;
  --border: rgba(16, 44, 41, 0.10);
  --border-hi: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 44, 41, 0.11);
  --text: #16292A;
  --heading: #0E2826;
  --muted: #546868;
  --input-bg: rgba(255, 255, 255, 0.92);
  --brand: #0E8F68;
  --brand-2: #22C08A;
  --brand-ink: #FFFFFF;
  --brand-soft: rgba(14, 143, 104, 0.12);
  --gain: #11935A;
  --warn: #B4620A;
  --loss: #CC3A40;
  --chip-on: #0E2826;
  --chip-on-text: #FFFFFF;
  --blob-1: rgba(34, 192, 138, 0.30);
  --blob-2: rgba(246, 160, 120, 0.22);
  --blob-3: rgba(130, 118, 240, 0.18);
  --shadow-sm: 0 1px 2px rgba(14, 40, 38, 0.06), 0 2px 6px -2px rgba(14, 40, 38, 0.08);
  --shadow: 0 1px 2px rgba(14, 40, 38, 0.05), 0 8px 20px -8px rgba(14, 40, 38, 0.12), 0 28px 56px -28px rgba(14, 40, 38, 0.28);
  --shadow-lg: 0 2px 4px rgba(14, 40, 38, 0.06), 0 18px 40px -14px rgba(14, 40, 38, 0.22), 0 50px 90px -40px rgba(14, 40, 38, 0.35);
  --glass-blur: blur(18px) saturate(150%);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --accent: #F1641E;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #091312;
  --bg-2: #0D1B1A;
  --surface: rgba(20, 38, 36, 0.58);
  --surface-strong: rgba(22, 42, 40, 0.86);
  --surface-solid: #11201E;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.09);
  --text: #D9E5E2;
  --heading: #F2F8F6;
  --muted: #92A5A1;
  --input-bg: rgba(255, 255, 255, 0.045);
  --brand: #3CD69F;
  --brand-2: #7BE8C0;
  --brand-ink: #062019;
  --brand-soft: rgba(60, 214, 159, 0.14);
  --gain: #4ADE94;
  --warn: #FFB454;
  --loss: #FF7A80;
  --chip-on: #E9F5F1;
  --chip-on-text: #0B1C1A;
  --blob-1: rgba(34, 192, 138, 0.16);
  --blob-2: rgba(130, 118, 240, 0.13);
  --blob-3: rgba(246, 160, 120, 0.07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 24px -10px rgba(0, 0, 0, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 20px 44px -16px rgba(0, 0, 0, 0.65), 0 60px 100px -40px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}
/* Soft colour fields behind the glass */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38vmax 32vmax at 12% 8%, var(--blob-1), transparent 70%),
    radial-gradient(34vmax 30vmax at 92% 18%, var(--blob-2), transparent 70%),
    radial-gradient(40vmax 34vmax at 70% 92%, var(--blob-3), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--heading); line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 8px 14px; border-radius: 10px; background: var(--heading); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ---------- Glass + 3D primitives ---------- */
.glass {
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--border-hi);
}
[data-tilt] {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
  will-change: transform;
}
[data-tilt].is-tilting { transition: transform .08s linear, box-shadow .3s ease; }
.glare { position: relative; isolation: isolate; }
.glare::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.14), transparent 45%);
  transition: opacity .3s ease;
}
.is-tilting.glare::after { opacity: 1; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; padding: 10px 0; }
.header-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 18px;
  background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--border-hi);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; border-radius: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 8px rgba(14, 143, 104, 0.35)); }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--heading); white-space: nowrap; }
.brand-name span { font-weight: 500; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav-trigger { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .15s, background-color .15s; }
.nav > a:hover, .nav-trigger:hover { color: var(--heading); background: var(--brand-soft); }
.nav > a[aria-current="page"], .nav-trigger.is-current { color: var(--heading); background: var(--brand-soft); }
.nav-trigger svg { transition: transform .2s; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-drop { position: relative; }
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 70;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 110px); overflow-y: auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 10px;
  border-radius: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
}
.mega a { display: flex; gap: 12px; align-items: flex-start; padding: 9px 11px; border-radius: 12px; text-decoration: none; color: var(--text); }
.mega a:hover, .mega a[aria-current="page"] { background: var(--brand-soft); }
.mega strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--heading); }
.mega small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tool-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: linear-gradient(160deg, var(--brand-soft), transparent); border: 1px solid var(--border); color: var(--brand); }
.tool-ico svg { width: 18px; height: 18px; }

.header-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.cur-select { height: 38px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2392A5A1' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center; -webkit-appearance: none; appearance: none; font-size: 14px; font-weight: 500; color: var(--heading); }
.cur-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg); color: var(--heading); transition: background-color .15s, transform .15s; }
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn:active { transform: translateY(1px); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.menu-btn { display: none; }

@media (max-width: 959px) {
  .menu-btn { display: inline-flex; }
  .header-bar { flex-wrap: nowrap; }
  .header-tools { margin-left: auto; }
  .nav {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 4px);
    flex-direction: column; align-items: stretch; gap: 2px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 10px;
    border-radius: 18px; background: var(--surface-solid);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav > a, .nav-trigger { padding: 12px 14px; font-size: 16px; }
  .nav-drop, .nav-trigger { width: 100%; }
  .nav-trigger { justify-content: space-between; }
  .mega { position: static; width: auto; grid-template-columns: 1fr; padding: 4px 0 8px; transform: none; border: 0; box-shadow: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 16px; }
  .brand-name span { display: none; }
  .cur-select { padding-right: 24px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: 26px; padding-bottom: 30px; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--heading); }
.eyebrow-dot { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 2px 6px rgba(14, 143, 104, 0.45); }
.hero h1 { margin-top: 14px; max-width: 17ch; font-size: clamp(2.2rem, 5.4vw, 3.7rem); font-weight: 750; line-height: 1.0; letter-spacing: -0.032em; }
.hero h1 .grad { background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: 14px; max-width: 38rem; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.6; color: var(--muted); }
.updated { margin-top: 12px; font-size: 13px; color: var(--muted); }
.hero--compact { padding-bottom: 22px; }
.hero--compact h1 { max-width: 22ch; font-size: clamp(2rem, 4.6vw, 3.1rem); }

/* Floating 3D badges */
/* 3D hero scene */
.hero-art { position: relative; height: 290px; }
@media (max-width: 959px) {
  .hero-art { height: 196px; margin: 4px 0 -6px; overflow: hidden; }
  .scene { transform: scale(.68); transform-origin: top center; }
}
.scene { position: relative; width: 380px; height: 284px; margin: 0 auto; perspective: 1000px; }
.obj { --px: 0px; --py: 0px; position: absolute; transform: translate3d(var(--px), var(--py), 0); transform-style: preserve-3d; transition: transform .25s ease-out; }
.o-card { left: 84px; top: 74px; }
.o-coin { left: 8px; top: 2px; }
.o-box { right: 14px; top: 128px; }
.o-bars { left: 16px; bottom: 4px; }
.o-pct { right: 28px; top: 2px; }

.mini-card { width: 200px; padding: 16px 18px 12px; border-radius: 22px; color: #fff; background: radial-gradient(120% 80% at 100% 0%, rgba(60, 214, 159, .25), transparent 60%), linear-gradient(160deg, #164540, #0B2421); border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 30px 50px -20px rgba(10, 40, 36, .6); transform: rotateY(-16deg) rotateX(10deg); animation: card-float 7s ease-in-out infinite; }
.mc-label { display: block; font-size: 12px; color: rgba(255, 255, 255, .65); }
.mc-value { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.mc-gauge { display: block; width: 120px; margin: 6px auto 0; }
.mc-arc { animation: arc 4s ease-in-out infinite alternate; }
@keyframes card-float { 50% { transform: rotateY(-8deg) rotateX(6deg) translateY(-8px); } }
@keyframes arc { from { stroke-dashoffset: 72; } to { stroke-dashoffset: 16; } }

.coin3d { position: relative; width: 88px; height: 88px; transform-style: preserve-3d; animation: coin-spin 6s linear infinite; }
.coin3d i { position: absolute; inset: 0; border-radius: 50%; background: #B9780F; transform: translateZ(calc(var(--i) * 1px - 6px)); }
.coin3d .cf { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: var(--font-display); font-size: 44px; font-weight: 800; color: #9A5B05; background: radial-gradient(circle at 35% 30%, #FFF3B0, #F7C843 45%, #D99A1E 80%); box-shadow: inset 0 0 0 6px #E9B23A, inset 0 0 0 8px rgba(255, 255, 255, .35); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); backface-visibility: hidden; }
.coin3d .front { transform: translateZ(6px); }
.coin3d .back { transform: rotateY(180deg) translateZ(6px); }
@keyframes coin-spin { from { transform: rotateX(14deg) rotateY(0deg); } to { transform: rotateX(14deg) rotateY(360deg); } }

.cube { --s: 84px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; animation: cube-spin 16s linear infinite; }
.cube .f { position: absolute; inset: 0; background: linear-gradient(160deg, #E2B97A, #C8955A); box-shadow: inset 0 0 0 1px rgba(120, 70, 20, .25); }
.cube .f1 { transform: translateZ(calc(var(--s) / 2)); background: linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, .45) 42% 58%, transparent 58%), linear-gradient(160deg, #E2B97A, #C8955A); }
.cube .f1::after { content: ""; position: absolute; left: 12px; bottom: 12px; width: 30px; height: 20px; border-radius: 3px; background: rgba(255, 255, 255, .9); box-shadow: inset 0 -6px 0 -3px #C8955A, inset 0 -11px 0 -8px rgba(200, 149, 90, .6); }
.cube .f2 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube .f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(160deg, #D2A468, #B07B40); }
.cube .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(160deg, #D2A468, #B07B40); }
.cube .f5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, .55) 42% 58%, transparent 58%), linear-gradient(160deg, #EBC78E, #D3A266); }
.cube .f6 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); background: #9E6C35; }
@keyframes cube-spin { from { transform: rotateX(-22deg) rotateY(0deg); } to { transform: rotateX(-22deg) rotateY(360deg); } }

.bars3d { position: relative; width: 120px; height: 110px; transform-style: preserve-3d; transform: rotateX(-16deg) rotateY(-30deg); animation: bars-sway 8s ease-in-out infinite; }
.bars3d .base { position: absolute; left: -6px; bottom: -10px; width: 130px; height: 18px; border-radius: 50%; background: rgba(14, 40, 38, .22); filter: blur(7px); }
.bar3 { position: absolute; bottom: 0; width: 26px; height: var(--h); transform-style: preserve-3d; transform-origin: 50% 100%; animation: bar-grow 4.5s cubic-bezier(.22, 1, .36, 1) infinite; animation-delay: var(--d); }
.bar3:nth-child(2) { left: 4px; --b1: #9ACBDA; --b2: #5A93A6; }
.bar3:nth-child(3) { left: 44px; --b1: #E6C99C; --b2: #B28F5C; }
.bar3:nth-child(4) { left: 84px; --b1: #4FE3B0; --b2: #0C7A5E; }
.bar3 .fr { position: absolute; inset: 0; transform: translateZ(13px); background: linear-gradient(180deg, var(--b1), var(--b2)); }
.bar3 .sd { position: absolute; top: 0; bottom: 0; left: 0; width: 26px; transform: rotateY(90deg) translateZ(13px); background: var(--b2); filter: brightness(.82); }
.bar3 .tp { position: absolute; left: 0; top: -13px; width: 26px; height: 26px; transform: rotateX(90deg); background: var(--b1); filter: brightness(1.12); }
@keyframes bar-grow { 0% { transform: scaleY(.18); } 35%, 80% { transform: scaleY(1); } 100% { transform: scaleY(.18); } }
@keyframes bars-sway { 50% { transform: rotateX(-16deg) rotateY(-12deg); } }

.tile3d { display: flex; width: 66px; height: 66px; align-items: center; justify-content: center; border-radius: 18px; font-family: var(--font-display); font-size: 32px; font-weight: 800; color: #fff; background: linear-gradient(150deg, #A99BFF, #5B4BD6); box-shadow: 1px 1px 0 #5143c4, 2px 2px 0 #4c3fbb, 3px 3px 0 #473ab2, 4px 4px 0 #4236a9, 5px 5px 0 #3d32a0, 6px 6px 0 #382e97, 14px 22px 26px -8px rgba(40, 30, 120, .55), inset 0 2px 0 rgba(255, 255, 255, .45); animation: tile-swing 5s ease-in-out infinite; }
@keyframes tile-swing { 0%, 100% { transform: rotateY(-22deg) rotateX(12deg) translateY(0); } 50% { transform: rotateY(22deg) rotateX(4deg) translateY(-10px); } }

/* 3D icon tiles */
.ico3d { border: 0 !important; background: linear-gradient(150deg, var(--c1), var(--c2)) !important; color: #fff !important; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 8px 16px -6px var(--c2); }
.ico3d svg { filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .25)); }
.float-badge {
  --px: 0px; --py: 0px;
  position: absolute; display: flex; align-items: center; justify-content: center;
  border-radius: 22px; font-family: var(--font-display); font-weight: 700;
  transform: translate3d(var(--px), var(--py), 0) rotateX(12deg) rotateY(-14deg);
  animation: bob 6s ease-in-out infinite;
}
.float-badge .face { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: inherit; }
.fb-1 { left: 18px; top: 22px; width: 92px; height: 92px; font-size: 44px; color: #fff; animation-delay: -1s, .05s; }
.fb-1 .face { background: linear-gradient(150deg, #34D9A2, #0C7A5E); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -6px 12px rgba(0, 0, 0, .18), 0 18px 30px -10px rgba(14, 143, 104, .6); }
.fb-2 { right: 26px; top: 0; width: 84px; height: 84px; font-size: 34px; color: #7A3A12; animation-delay: -3s, .15s; }
.fb-2 .face { background: linear-gradient(150deg, #FFD9B8, #F39A64); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -6px 12px rgba(0, 0, 0, .12), 0 18px 30px -12px rgba(243, 154, 100, .7); }
.fb-3 { left: 120px; bottom: 6px; width: 150px; height: 96px; animation-delay: -2s, .25s; }
.fb-3 .face { background: var(--surface-strong); border: 1px solid var(--border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--border-hi); }
.fb-3 svg { width: 110px; height: 60px; }
.fb-4 { right: 4px; bottom: 54px; width: 70px; height: 70px; font-size: 30px; color: #fff; animation-delay: -4.5s, .35s; }
.fb-4 .face { background: linear-gradient(150deg, #A99BFF, #5B4BD6); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -6px 12px rgba(0, 0, 0, .18), 0 18px 30px -12px rgba(91, 75, 214, .6); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Breadcrumb */
.breadcrumb { padding-top: 14px; font-size: 14px; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .55; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--heading); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .2s, background-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: var(--brand-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -8px var(--brand); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -10px var(--brand); }
.btn-ghost { border: 1px solid var(--line); background: var(--input-bg); color: var(--heading); }
.btn-ghost:hover { background: var(--brand-soft); }

/* ==========================================================================
   Calculator
   ========================================================================== */
.calc { position: relative; }
.calc-grid { display: grid; gap: 22px; }
@media (min-width: 1024px) {
  .calc-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "sheet results" "breakdown results"; align-items: start; }
  .calc-grid > .sheet { grid-area: sheet; }
  .calc-grid > .col-results { grid-area: results; position: sticky; top: 88px; }
  .calc-grid > .breakdown { grid-area: breakdown; }
}
.col-results { display: grid; gap: 16px; }

.sheet { border-radius: 22px; }
.sheet-section { padding: 22px 18px; }
.sheet-section + .sheet-section { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .sheet-section { padding: 24px 26px; } }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.section-desc { margin-top: 4px; font-size: 14px; color: var(--muted); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 8px; background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: #fff; font-family: var(--font-body); font-size: 12px; font-weight: 700; box-shadow: 0 3px 8px -2px var(--brand); }
.fields { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field { position: relative; min-width: 0; }
.field-top { display: flex; align-items: center; gap: 6px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--heading); }
.input-wrap { display: flex; align-items: stretch; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--input-bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04); transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-wrap.invalid { border-color: var(--loss); box-shadow: 0 0 0 4px rgba(204, 58, 64, .14); }
.affix { display: flex; align-items: center; font-size: 14px; color: var(--muted); user-select: none; -webkit-user-select: none; }
.affix--pre { padding: 0 4px 0 12px; }
.affix--post { padding: 0 12px 0 4px; }
.num-input { width: 100%; min-width: 0; padding: 11px 12px 11px 0; border: 0; background: transparent; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--heading); outline: none; }
.num-input--post { padding: 11px 0 11px 12px; }
.num-input::placeholder { color: var(--muted); opacity: .5; }
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input { -moz-appearance: textfield; appearance: textfield; }
.select-input { width: 100%; margin-top: 6px; padding: 11px 36px 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2392A5A1' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font-size: 16px; color: var(--heading); }
.select-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.help { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.help.is-error { color: var(--loss); }
.input-row { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) {
  .input-row { flex-direction: row; align-items: center; gap: 14px; }
  .input-row .input-wrap { width: calc(50% - 9px); flex: none; }
  .input-row .chips { margin-top: 6px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--input-bg); font-size: 12.5px; font-weight: 500; color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--brand); color: var(--heading); }
.chip[aria-pressed="true"] { border-color: var(--chip-on); background: var(--chip-on); color: var(--chip-on-text); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }

/* Range slider */
.range { width: 100%; margin-top: 12px; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) var(--fill, 30%), var(--line) var(--fill, 30%)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--brand); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff, #DCE7E3); box-shadow: 0 0 0 4px var(--brand), 0 6px 12px -2px rgba(0, 0, 0, .35); cursor: pointer; }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff, #DCE7E3); box-shadow: 0 0 0 4px var(--brand), 0 6px 12px -2px rgba(0, 0, 0, .35); cursor: pointer; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--brand), 0 0 0 8px var(--brand-soft); }

/* Segmented control (platform / mode) */
.segmented { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 4px; margin-top: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--input-bg); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .06); }
.segmented label { position: relative; display: block; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--muted); text-align: center; transition: all .18s; }
.segmented span:hover { color: var(--heading); }
.segmented input:checked + span { background: var(--surface-solid); color: var(--heading); box-shadow: 0 1px 0 var(--border-hi) inset, 0 4px 12px -4px rgba(0, 0, 0, .28), 0 0 0 1px var(--border); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 560px) { .segmented--many { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.segmented span { min-width: 0; }
.seg-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; }
.calc-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.calc-top .segmented { margin-top: 0; min-width: min(100%, 420px); }

.reset-row { display: flex; gap: 4px; }
.text-btn { padding: 6px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background-color .15s, color .15s; }
.text-btn:hover { background: var(--brand-soft); color: var(--heading); }
.preset-note { margin: 0 18px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); font-size: 13px; color: var(--heading); }
@media (min-width: 640px) { .preset-note { margin: 0 26px; } }
.preset-note button { margin-left: 6px; font-weight: 600; text-decoration: underline; color: var(--heading); }

/* Tooltips */
.tip { display: inline-flex; }
.tip-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 600; line-height: 1; color: var(--muted); transition: all .15s; }
.tip-btn:hover { border-color: var(--brand); color: var(--brand); }
.tip-body { display: none; position: absolute; top: 28px; left: 0; right: 0; z-index: 30; padding: 12px; border-radius: 12px; background: #0E2826; color: #EAF3F0; font-size: 12.5px; font-weight: 400; line-height: 1.55; box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .tip-body { background: #EAF3F0; color: #0E2826; }
@media (hover: hover) { .tip:hover .tip-body { display: block; } }
.tip.open .tip-body, .tip-btn:focus-visible + .tip-body { display: block; }

/* ---------- Results ---------- */
.summary {
  position: relative;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(60, 214, 159, .18), transparent 60%),
    linear-gradient(160deg, #164540 0%, #0F2E2B 52%, #0A2220 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .08), 0 24px 50px -22px rgba(10, 40, 36, .65), 0 60px 90px -50px rgba(10, 40, 36, .6);
}
:root[data-theme="dark"] .summary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(60, 214, 159, .08), 0 30px 70px -30px rgba(0, 0, 0, .9), 0 0 80px -40px rgba(60, 214, 159, .35); }
@media (min-width: 640px) { .summary { padding: 28px; } }
.summary :focus-visible { outline-color: #fff; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-label { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .72); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .88); }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-value { margin-top: 8px; font-family: var(--font-display); font-size: clamp(2.6rem, 8vw, 3.8rem); font-weight: 750; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 10px 30px rgba(0, 0, 0, .25); overflow-wrap: anywhere; }
.hero-sub { margin-top: 10px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .75); }
.hero-sub strong { color: #fff; font-weight: 600; }
.tone-loss { color: #FF8A8F !important; }

/* 3D gauge */
.gauge { position: relative; max-width: 300px; margin: 18px auto 0; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-bevel { stroke: rgba(0, 0, 0, .35); }
.g-track { stroke: rgba(255, 255, 255, .09); }
.g-fill { transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1); filter: drop-shadow(0 0 6px rgba(63, 214, 127, .35)); }
.g-tick { stroke: rgba(10, 34, 32, .9); stroke-width: 2; }
.g-label { fill: rgba(255, 255, 255, .55); font-family: var(--font-body); font-size: 10px; font-weight: 500; }
.g-needle { transform-box: view-box; transform-origin: 120px 124px; transition: transform 1s cubic-bezier(.34, 1.45, .64, 1); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); }
.gauge-read { margin-top: -4px; text-align: center; }
.gauge-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gauge-cap { font-size: 12px; color: rgba(255, 255, 255, .6); }
.pill-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.summary .tip-btn { border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .75); }
.summary .tip-body { top: 34px; background: #fff; color: #0E2826; }

/* Split bar */
.split { margin-top: 24px; }
.split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.split-title { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: #fff; }
.split-total { white-space: nowrap; font-size: 14px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.split-wrap { position: relative; margin-top: 12px; }
.split-bar { display: flex; gap: 2px; height: 38px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3); }
.seg { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 700; color: #0A2220; transition: width .5s cubic-bezier(.22, 1, .36, 1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .15); }
.loss-marker { position: absolute; top: -6px; bottom: -6px; width: 2px; border-radius: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 6px rgba(255, 255, 255, .7); }
.split-note { margin-top: 12px; font-size: 14px; line-height: 1.55; }
.legend { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.legend-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: rgba(255, 255, 255, .8); }
.legend-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 10px; height: 10px; flex: none; border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.legend-val { flex: none; color: #fff; font-variant-numeric: tabular-nums; }
.legend-pct { display: inline-block; width: 3.4em; margin-left: 8px; text-align: right; color: rgba(255, 255, 255, .5); }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 24px 0 0; overflow: hidden; border-radius: 16px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.stat { padding: 15px 16px; background: rgba(8, 30, 28, .55); }
.stat dt { font-size: 12px; color: rgba(255, 255, 255, .62); }
.stat dd { margin: 0; }
.stat-value { margin-top: 4px; font-family: var(--font-display); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 2px; font-size: 11px; line-height: 1.35; color: rgba(255, 255, 255, .5); }

.compare { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.compare-text { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .78); }
.compare-text strong { color: #fff; font-weight: 600; }
.btn-light { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; color: #0E2826; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
.btn-light:hover { background: #EAF6F1; }

/* Action buttons */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); font-size: 13.5px; font-weight: 600; color: #fff; transition: background-color .15s, transform .15s; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.act:hover { background: rgba(255, 255, 255, .13); }
.act:active { transform: translateY(1px); }
.act svg { width: 16px; height: 16px; flex: none; opacity: .9; }
@media (max-width: 420px) { .act { gap: 6px; padding: 9px 6px; font-size: 13px; } }
.act--wide { grid-column: 1 / -1; }

/* Breakdown card */
.card { border-radius: 22px; }
.breakdown-head { padding: 20px 20px 0; }
.breakdown-head h2 { font-size: 18px; font-weight: 650; }
.breakdown-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; padding: 12px 20px 20px; }
@media (min-width: 640px) { .breakdown-head { padding: 22px 24px 0; } .table-scroll { padding: 12px 24px 22px; } }
.bd-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.bd-table td { padding: 8px 0; vertical-align: baseline; }
.bd-table td.num { padding-left: 8px; text-align: right; white-space: nowrap; color: var(--heading); }
.bd-table td.pct { width: 4.6em; padding-left: 12px; text-align: right; white-space: nowrap; font-size: 12px; color: var(--muted); }
.bd-table th.group { padding: 18px 0 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
.bd-table tr:first-child th.group { padding-top: 2px; }
.bd-table tr.total td { border-top: 1px solid var(--line); font-weight: 600; color: var(--heading); }
.bd-table tr.grand td { padding-top: 12px; border-top: 2px solid var(--heading); font-weight: 600; color: var(--heading); }
.bd-table tr.total td.pct, .bd-table tr.grand td.pct { font-weight: 400; color: var(--muted); }
.bd-table tr.net td { font-size: 16px; font-weight: 650; color: var(--heading); }
.bd-table tr.net td.pct { font-size: 12px; }
.t-gain { color: var(--gain) !important; }
.t-warn { color: var(--warn) !important; }
.t-loss { color: var(--loss) !important; }

/* Platform comparison table */
.ptable-card { margin-top: 22px; border-radius: 22px; }
.ptable-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 22px 22px 0; }
.ptable-head h2 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 650; }
.ptable-head p { font-size: 14px; color: var(--muted); }
.ptable-scroll { overflow-x: auto; padding: 14px 22px 22px; }
.ptable { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ptable th, .ptable td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ptable th:first-child, .ptable td:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.ptable thead th { font-family: var(--font-display); font-size: 16px; font-weight: 650; color: var(--heading); }
.ptable thead th span { display: inline-flex; align-items: center; gap: 7px; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable .is-best { background: var(--brand-soft); }
.ptable thead .is-best { border-radius: 12px 12px 0 0; }
.ptable tbody tr:last-child .is-best { border-radius: 0 0 12px 12px; }
.best-tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-family: var(--font-body); font-size: 11px; font-weight: 700; vertical-align: middle; }
.ptable .row-strong td { font-weight: 650; color: var(--heading); }

/* Sponsored card */
.sponsor { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 20px; text-decoration: none; color: var(--text); }
.sponsor-ico { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: linear-gradient(150deg, #FFD9B8, #F39A64); color: #6B300C; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 10px 18px -8px rgba(243, 154, 100, .7); }
.sponsor-ico svg { width: 22px; height: 22px; }
.sponsor-body { min-width: 0; flex: 1; }
.sponsor-tag { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sponsor-title { margin-top: 1px; font-weight: 650; color: var(--heading); }
.sponsor-text { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sponsor-cta { flex: none; padding: 8px 12px; border-radius: 10px; background: var(--chip-on); color: var(--chip-on-text); font-size: 13px; font-weight: 600; }

/* Floating result bar */
.float-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); pointer-events: none; opacity: 0; transform: translateY(140%); transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.float-bar.is-visible { opacity: 1; transform: none; }
.float-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 30rem; margin: 0 auto; padding: 12px 16px; border-radius: 18px; background: linear-gradient(160deg, #164540, #0B2421); color: #fff; border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 40px -12px rgba(0, 0, 0, .55); pointer-events: auto; }
.float-inner :focus-visible { outline-color: #fff; }
.float-label { font-size: 11px; color: rgba(255, 255, 255, .62); }
.float-values { display: flex; align-items: baseline; gap: 8px; }
.float-net { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.float-sub { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.float-btn { flex: none; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .12); font-size: 14px; font-weight: 500; color: #fff; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 300; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; background: #0E2826; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .5); opacity: 0; transform: translate(-50%, 20px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="dark"] .toast { background: #EAF3F0; color: #0E2826; }

/* ==========================================================================
   Content
   ========================================================================== */
.section { padding-top: 64px; }
.section-heading { font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 700; }
.section-intro { margin-top: 8px; max-width: 40rem; color: var(--muted); }

/* Tool cards */
.tool-grid { display: grid; gap: 16px; margin-top: 22px; }
@media (min-width: 560px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 20px; text-decoration: none; color: var(--text); }
.tool-card .tool-ico { width: 44px; height: 44px; border-radius: 14px; }
.tool-card .tool-ico svg { width: 22px; height: 22px; }
.tool-card h3 { font-size: 17.5px; font-weight: 650; line-height: 1.25; }
.tool-card p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.tool-card .go { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--brand); }
.tool-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.kind-tag { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); font-size: 11.5px; font-weight: 600; color: var(--brand); }

/* Prose */
.prose { max-width: 46rem; }
.prose > h2 { margin-top: 52px; font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 700; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font-size: 1.2rem; font-weight: 650; }
.prose p { margin-top: 16px; font-size: 17px; line-height: 1.72; }
.prose ul, .prose ol { margin: 16px 0 0; padding-left: 1.3rem; }
.prose li { margin-top: 10px; padding-left: 4px; font-size: 17px; line-height: 1.65; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; color: var(--heading); }
.prose .formula { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); border-left: 3px solid var(--brand); background: var(--surface); box-shadow: var(--shadow-sm); font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--heading); }
.table-wrap { margin-top: 20px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.table-wrap th:first-child, .table-wrap td:first-child { min-width: 8rem; }
.table-wrap thead th { background: var(--brand-soft); font-size: 14px; font-weight: 600; color: var(--heading); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.callout { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 36px; padding: 22px; border-radius: 20px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, rgba(60, 214, 159, .2), transparent 60%), linear-gradient(160deg, #164540, #0B2421); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), var(--shadow); }
.prose .callout p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.prose .callout a.btn { color: #0E2826; text-decoration: none; background: #fff; }
.prose a.btn-primary { color: var(--brand-ink); text-decoration: none; }

/* FAQ */
.faq { margin-top: 16px; border-radius: 20px; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; font-size: 16.5px; font-weight: 600; line-height: 1.4; color: var(--heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); font-family: var(--font-display); font-size: 20px; font-weight: 500; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; }
.faq .answer p { margin: 0; font-size: 16px; line-height: 1.65; }
.faq .answer p + p { margin-top: 10px; }

/* Related links */
.related-grid { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.rel-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; text-decoration: none; color: var(--text); }
.rel-card strong { display: block; font-size: 15px; font-weight: 600; color: var(--heading); line-height: 1.35; }
.rel-card small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.rel-card:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Articles */
.article-head { max-width: 48rem; }
.article-head h1 { margin-top: 18px; font-size: clamp(2rem, 4.8vw, 3.1rem); font-weight: 750; line-height: 1.04; letter-spacing: -0.03em; }
.article-dek { margin-top: 16px; font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.55; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
.article-layout > * { min-width: 0; }
.toc { padding: 18px 20px; border-radius: 18px; }
.toc-title { font-size: 14px; font-weight: 600; color: var(--heading); }
.toc ol { margin: 10px 0 0; padding-left: 1.2rem; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.toc li { margin-top: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--heading); text-decoration: underline; }
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 46rem) 16rem; justify-content: space-between; gap: 56px; }
  .toc { order: 2; position: sticky; top: 96px; align-self: start; }
  .article-body { order: 1; }
}
.guide-list { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.guide-row a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: 20px; text-decoration: none; }
@media (min-width: 640px) { .guide-row a { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; } }
.guide-thumb { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-sm); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.guide-row a:hover .guide-thumb { transform: perspective(600px) rotateY(-6deg) scale(1.02); }
.guide-text { display: block; padding: 2px 6px 4px; }
.article-cover { display: block; width: 100%; max-width: 46rem; height: auto; margin-top: 22px; border-radius: 22px; box-shadow: var(--shadow); }
.guide-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; }
.guide-row .guide-title { margin-top: 6px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 650; line-height: 1.25; }
.guide-row a:hover .guide-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-dek { max-width: 42rem; margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--muted); }

.form-note { font-size: 14px !important; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; padding: 0 0 20px; }
.has-calc .site-footer { padding-bottom: 96px; }
.footer-card { padding: 34px 24px 22px; border-radius: 26px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 0.8fr; } }
.footer-blurb { max-width: 22rem; margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-col h2 { font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--heading); }
.footer-col ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.footer-col a { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--heading); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }


/* ==========================================================================
   Motion
   ========================================================================== */
/* Slowly drifting colour fields behind the glass */
body::before { animation: drift 28s ease-in-out infinite alternate; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3vmax, 2vmax, 0) scale(1.05); }
  100% { transform: translate3d(2vmax, -2vmax, 0) scale(1.02); }
}

/* Shimmering gradient headline */
.hero h1 .grad { background-image: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 35%, var(--brand) 70%, var(--brand-2) 100%); background-size: 220% auto; animation: shimmer 7s linear infinite; }
@keyframes shimmer { to { background-position: -220% center; } }

/* Hero intro: slide in without hiding the headline */
.hero .eyebrow { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero .lede { animation: rise .7s .08s cubic-bezier(.2, .8, .2, 1) both; }
.hero .updated { animation: rise .7s .14s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.float-badge .face { animation: wobble 9s ease-in-out infinite; }
.fb-2 .face { animation-delay: -2s; } .fb-3 .face { animation-delay: -4s; } .fb-4 .face { animation-delay: -6s; }
@keyframes wobble { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
.float-badge { animation: bob 6s ease-in-out infinite, pop-in .8s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes pop-in { from { opacity: 0; scale: .6; } }

/* Scroll reveal (only when JavaScript is running) */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* Results */
.seg { animation: grow .9s cubic-bezier(.22, 1, .36, 1) both; transform-origin: left center; }
@keyframes grow { from { transform: scaleX(0); } }
.pill.pulse { animation: pulse .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pulse { 50% { transform: scale(1.12); } }
.summary .hero-value { transition: color .3s ease; }
.gauge-num { transition: color .4s ease; }

/* Buttons: light sweep on hover */
.btn-primary, .btn-light, .act { position: relative; overflow: hidden; }
.btn-primary::after, .btn-light::after, .act::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); }
.btn-primary:hover::after, .btn-light:hover::after, .act:hover::after { transform: translateX(120%); transition: transform .8s ease; }

/* Cards */
.tool-card, .rel-card, .guide-row a { transition: box-shadow .3s ease, border-color .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.tool-card:hover, .rel-card:hover, .guide-row a:hover { box-shadow: var(--shadow-lg), inset 0 1px 0 var(--border-hi); border-color: var(--brand-soft); }
.tool-ico { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background-color .3s; }
.tool-card:hover .tool-ico, .rel-card:hover .tool-ico, .mega a:hover .tool-ico { transform: perspective(300px) rotateY(-22deg) rotateX(12deg) translateY(-2px) scale(1.08); }
.go { display: inline-flex; align-items: center; gap: 6px; }
.go::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform .3s ease; }
.tool-card:hover .go::after { transform: translateX(4px) rotate(45deg); }

/* Menus */
.mega:not([hidden]) { animation: drop-in .2s ease-out; }
.nav.open { animation: drop-in .2s ease-out; }
@keyframes drop-in { from { opacity: 0; margin-top: -8px; } }
.theme-toggle svg { animation: spin-in .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes spin-in { from { opacity: 0; transform: rotate(-90deg) scale(.6); } }

/* FAQ: smooth open and close where the browser supports it */
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq summary { transition: color .2s; }
.faq summary:hover { color: var(--brand); }

/* Chips and segments give a little tactile feedback */
.chip:active, .segmented span:active, .act:active, .btn:active { transform: scale(.97); }


/* ==========================================================================
   Extra motion (v11)
   ========================================================================== */
/* Glow behind the hero card */
.card-glow { position: absolute; left: -30px; top: -20px; width: 260px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(47, 212, 155, .45), transparent); filter: blur(8px); animation: glow 4s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 50% { opacity: .45; transform: scale(1.15); } }

/* Mini coins orbiting the card */
.orbit { position: absolute; left: 100px; top: 70px; width: 0; height: 0; transform-style: preserve-3d; animation: orbit 9s linear infinite; }
@keyframes orbit { from { transform: rotateX(-14deg) rotateY(0deg); } to { transform: rotateX(-14deg) rotateY(360deg); } }
.mcoin { position: absolute; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF3B0, #F7C843 45%, #D99A1E 80%); box-shadow: inset 0 0 0 3px #E9B23A, 0 4px 8px rgba(0, 0, 0, .2); }
.mc1 { transform: rotateY(0deg) translateZ(150px); }
.mc2 { transform: rotateY(120deg) translateZ(150px); }
.mc3 { transform: rotateY(240deg) translateZ(150px); }

/* Profit pop-ups rising from the card */
.plus { position: absolute; left: 150px; top: -40px; transform: translateZ(40px); padding: 3px 9px; border-radius: 999px; background: rgba(63, 214, 127, .92); color: #06281C; font-family: var(--font-display); font-size: 13px; font-weight: 800; white-space: nowrap; opacity: 0; box-shadow: 0 6px 14px -6px rgba(14, 143, 104, .8); animation: rise-fade 6s ease-out infinite; pointer-events: none; }
.pl2 { left: 30px; animation-delay: 2s; }
.pl3 { left: 100px; animation-delay: 4s; }
@keyframes rise-fade { 0% { opacity: 0; translate: 0 12px; scale: .8; } 12% { opacity: 1; scale: 1; } 40% { opacity: 1; } 55%, 100% { opacity: 0; translate: 0 -36px; } }

/* Twinkling sparkles */
.spark { position: absolute; width: 14px; height: 14px; background: var(--brand-2); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: twinkle 3.6s ease-in-out infinite; pointer-events: none; }
.sp1 { left: 120px; top: 24px; }
.sp2 { right: 120px; top: 92px; width: 10px; height: 10px; background: #FFD166; animation-delay: .9s; }
.sp3 { left: 4px; top: 150px; width: 11px; height: 11px; background: #A99BFF; animation-delay: 1.8s; }
.sp4 { right: 10px; bottom: 30px; animation-delay: 2.7s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* Mini card value swap */
.mini-card .mc-label, .mini-card .mc-value { transition: opacity .3s ease, translate .3s ease; }
.mini-card.swap .mc-label, .mini-card.swap .mc-value { opacity: 0; translate: 0 -6px; }

/* 3D icons float gently in the tool grid */
.tool-grid .ico3d { animation: ico-float 5s ease-in-out infinite; }
.tool-grid .tool-card:nth-child(3n+2) .ico3d { animation-delay: -1.7s; }
.tool-grid .tool-card:nth-child(3n+3) .ico3d { animation-delay: -3.4s; }
@keyframes ico-float { 50% { translate: 0 -4px; rotate: -5deg; } }

/* Section headings draw an accent line when they scroll in */
.section-heading::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transform-origin: left center; }
.js .reveal.section-heading::after { transform: scaleX(0); transition: transform .9s .25s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in.section-heading::after { transform: scaleX(1); }

/* Result flashes when profit goes up or down */
.hero-value.flash-up { animation: flash-up .7s ease; }
.hero-value.flash-down { animation: flash-down .7s ease; }
@keyframes flash-up { 30% { text-shadow: 0 0 22px rgba(63, 214, 127, .9), 0 2px 0 rgba(0, 0, 0, .18); } }
@keyframes flash-down { 30% { text-shadow: 0 0 22px rgba(255, 123, 128, .9), 0 2px 0 rgba(0, 0, 0, .18); } }

/* Click ripple */
.chip { position: relative; overflow: hidden; }
.ripple { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: currentColor; opacity: .28; pointer-events: none; animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { transform: scale(24); opacity: 0; } }

/* Reading progress bar on guides */
.read-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 80; height: 3px; pointer-events: none; }
.read-progress span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 0 8px var(--brand-2); }

/* Covers: slow zoom on hover */
.article-cover { transition: transform .8s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.article-cover:hover { transform: perspective(900px) rotateX(2deg) scale(1.01); box-shadow: var(--shadow-lg); }

/* ---------- Motion + touch preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
  [data-tilt] { transform: none !important; }
}

/* ---------- Print (PDF fallback) ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000; }
  body::before, .site-header, .site-footer, .hero-art, .actions, .sponsor-slot, .float-bar, .section, .content-wrap, .tip, .chips, .reset-row, .preset-note, .breadcrumb, .compare .btn-light, .toast, .skip-link { display: none !important; }
  .glass, .summary { background: #fff !important; color: #000 !important; box-shadow: none !important; border: 1px solid #bbb !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .summary *, .summary .hero-value { color: #000 !important; text-shadow: none !important; }
  [data-tilt] { transform: none !important; }
  .calc-grid { display: block; }
  .results { margin-top: 12px; }
  .hero { padding: 0 0 8px; }
}

/* ---------- Embed ---------- */
.embed-section { padding-top: 28px; }
.embed-mini { max-width: 46rem; border-radius: 16px; }
.embed-mini summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.embed-mini summary::-webkit-details-marker { display: none; }
.embed-sum { flex: 1; min-width: 0; }
.embed-sum strong { display: block; font-size: 15px; font-weight: 600; color: var(--heading); }
.embed-sum small { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.embed-chev { flex: none; color: var(--muted); transition: transform .2s; }
.embed-mini[open] .embed-chev { transform: rotate(180deg); }
.embed-body { padding: 0 16px 16px; }
.embed-body p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.embed-code { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg); color: var(--heading); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; resize: vertical; }
.embed-body .btn { margin-top: 10px; padding: 8px 14px; font-size: 14px; }
body.embed { padding-top: 12px; }
.embed-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.embed-title { font-size: 14px; font-weight: 500; color: var(--muted); }
.embed-foot { margin: 18px 0 24px; text-align: center; font-size: 13px; color: var(--muted); }
.embed-foot a { color: var(--brand); }
.embed .calc-grid > .col-results { top: 12px; }

/* ---------- App + sharing ---------- */
.nav-app { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--brand); text-decoration: none; background: var(--brand-soft); }
.nav-app:hover, .nav-app.is-current { color: var(--brand-ink); background: var(--brand); }
@media (max-width: 959px) { .nav-app { margin: 4px 0 0; padding: 12px 14px; font-size: 16px; } }
.app-pill-row { margin-top: 14px; }
.app-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--heading); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .2s; }
.app-pill svg { color: #3DDC84; }
.app-pill:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn-whatsapp { background: linear-gradient(180deg, #3BDB76, #1DAA4F); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -8px #1DAA4F; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.act--wa { background: rgba(37, 211, 102, .16); border-color: rgba(37, 211, 102, .45); }
.act--wa:hover { background: rgba(37, 211, 102, .28); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg); font-size: 14px; font-weight: 600; color: var(--heading); text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--brand); }
.share-btn.wa { border-color: rgba(37, 211, 102, .5); color: #128C4A; }
:root[data-theme="dark"] .share-btn.wa { color: #4ADE80; }
.footer-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.app-hero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .app-hero { grid-template-columns: minmax(0, 1fr) 300px; } }
.app-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.app-meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.phone-wrap { display: flex; justify-content: center; perspective: 1100px; }
.phone { width: 230px; padding: 9px; border-radius: 38px; background: linear-gradient(160deg, #22302E, #0A1211); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 40px 70px -30px rgba(10, 40, 36, .7); transform: rotateY(-16deg) rotateX(6deg); animation: phone-float 7s ease-in-out infinite; }
.phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
@keyframes phone-float { 50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-10px); } }
code { padding: 2px 6px; border-radius: 6px; background: var(--brand-soft); font-size: .85em; overflow-wrap: anywhere; }

/* ==========================================================================
   Performance: lighter effects on phones and touch screens
   ========================================================================== */
@media (hover: none), (max-width: 960px) {
  /* Frosted-glass blur is the most expensive effect on phones; use solid panels instead */
  .glass, .header-bar, .mega, .nav, .fb-3 .face, .toc, .faq { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .glass { background: var(--surface-strong); }
  .header-bar { background: var(--surface-solid); }
  /* Keep the colour fields still, and stop decorative loops that repaint every frame */
  body::before { animation: none; }
  .hero h1 .grad { animation: none; }
  .tool-grid .ico3d { animation: none; }
  .card-glow { display: none; }
  /* Tilt only runs with a mouse, so don't reserve GPU layers for it */
  [data-tilt] { will-change: auto; }
  .summary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 18px 34px -20px rgba(10, 40, 36, .6); }
}
/* The 3D scene pauses whenever it is scrolled out of view */
.scene.paused, .scene.paused * { animation-play-state: paused !important; }
/* Let the browser skip rendering long sections until they come near the screen */
.section, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
