/* CalcWorks — site styles, shared by every page. Pages with extras load
   their own stylesheet on top (demo.css on the home page, /transfer/styles.css
   on the transfer page). */

:root {
  --ink: #060a17;             /* dark bands: header, heroes, footer */
  --ink-2: #0d1428;
  --ink-line: rgba(255, 255, 255, .1);
  --on-ink: #e6e9f2;
  --on-ink-muted: #a3aec7;
  --text: #0b1020;
  --text-muted: #4b5568;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --line: #e3e7ef;
  --green: #34d399;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --accent: #10b981;
  --accent-strong: #047857;
  --accent-soft: #d1fae5;
  --link: #4f46e5;
  --grad: linear-gradient(110deg, #34d399 0%, #22d3ee 48%, #a78bfa 100%);
  --grad-soft: linear-gradient(110deg, rgba(52, 211, 153, .16), rgba(34, 211, 238, .14) 50%, rgba(167, 139, 250, .18));
  --warn-bg: #fff7ed;
  --warn-line: #fdba74;
  --warn-text: #7c2d12;
  --ph: #fde68a;              /* unfilled placeholders */
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 16, 32, .05), 0 12px 32px -12px rgba(11, 16, 32, .18);
  --glow: 0 10px 40px -10px rgba(52, 211, 153, .55), 0 10px 40px -14px rgba(167, 139, 250, .5);
  --max: 1180px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e9f2;
    --text-muted: #9aa5bd;
    --bg: #080c19;
    --bg-soft: #0c1324;
    --line: #1c2541;
    --accent: #34d399;
    --accent-strong: #6ee7b7;
    --accent-soft: #063f30;
    --link: #a5b4fc;
    --warn-bg: #2a1a0c;
    --warn-line: #9a4b14;
    --warn-text: #fed7aa;
    --ph: #854d0e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.03em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -.015em; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd { padding: .05em .4em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); color: var(--text); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Placeholders that must be filled in before launch: deliberately loud. */
.ph { background: var(--ph); color: inherit; padding: 0 .25em; border-radius: 4px; font-weight: 600; }

.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------- Header (always dark, so it sits on the hero bands) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 10, 23, .78);
  backdrop-filter: saturate(170%) blur(14px); -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--on-ink);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.logo img { width: 32px; height: 32px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--on-ink-muted); text-decoration: none; padding: 8px 13px; border-radius: 999px; font-size: .95rem; font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.nav .btn { margin-left: 10px; color: #04140f; }
.nav .btn:hover { color: #04140f; }
.nav-toggle { display: none; margin-left: auto; background: rgba(255, 255, 255, .06); border: 1px solid var(--ink-line); border-radius: 10px; padding: 7px 12px; color: var(--on-ink); font: inherit; font-size: .95rem; cursor: pointer; }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch;
         padding: 12px 20px 20px; background: var(--ink); border-bottom: 1px solid var(--ink-line); box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .nav .btn { margin: 10px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font: 700 1rem/1.2 var(--font); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #04140f; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); box-shadow: 0 14px 44px -10px rgba(52, 211, 153, .7), 0 14px 44px -14px rgba(167, 139, 250, .65); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: inherit; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
main .btn-ghost { border-color: var(--line); background: var(--bg); }
main .hero .btn-ghost, main .cta-panel .btn-ghost { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Dark bands: hero and page heroes ---------- */
.hero, .page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(38% 42% at 18% 28%, rgba(52, 211, 153, .32), transparent 70%),
    radial-gradient(40% 46% at 82% 22%, rgba(139, 92, 246, .34), transparent 70%),
    radial-gradient(44% 40% at 60% 92%, rgba(34, 211, 238, .26), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(3%, -4%, 0) rotate(6deg); }
}
.hero h1, .page-hero h1 { color: #fff; }
.hero .lead, .page-hero .lead { color: #c3cbe0; }
.hero a:not(.btn), .page-hero a:not(.btn) { color: #a5f3fc; }
.lead { font-size: 1.2rem; max-width: 36em; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero .fine { font-size: .9rem; color: var(--on-ink-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font: 700 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-strong);
}
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--grad); }
.hero .eyebrow, .page-hero .eyebrow, .cta-panel .eyebrow { color: #6ee7b7; }
.page-hero .wrap { padding-top: 72px; padding-bottom: 60px; }
.page-hero .lead { font-size: 1.18rem; max-width: 44em; }

/* Plain two-column hero (kept for pages that use .hero without the demo). */
.hero > .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
@media (max-width: 880px) {
  .hero > .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero-art { max-width: 340px; margin: 0 auto; }
}

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.dark { background: var(--ink); color: var(--on-ink); position: relative; isolation: isolate; overflow: hidden; }
section.dark h2, section.dark h3 { color: #fff; }
section.dark p, section.dark .section-head p { color: var(--on-ink-muted); }
section.dark a:not(.btn) { color: #a5f3fc; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.12rem; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } section { padding: 60px 0; } }

.card {
  position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box;
  box-shadow: var(--shadow), 0 18px 40px -20px rgba(34, 211, 238, .45); }
.card h3 { margin-top: 16px; }
.card p { color: var(--text-muted); margin: 0; }
.icon-badge {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); color: #04140f; box-shadow: 0 8px 20px -8px rgba(34, 211, 238, .6);
}
.icon-badge svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Big-number strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 26px 24px; }
.stat b { display: block; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; margin-bottom: 8px; }
.stat span { color: var(--text-muted); font-size: .97rem; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; } }

.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px 26px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 14px; background: var(--grad); color: #04140f; font-weight: 800; font-size: 1.15rem; box-shadow: 0 8px 20px -8px rgba(52, 211, 153, .6); }
.step p { color: var(--text-muted); margin: 0; }
section.dark .step { background: rgba(255, 255, 255, .04); border-color: var(--ink-line); box-shadow: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 32px; margin: 12px 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad); }
.check-list li::after { content: ""; position: absolute; left: 6px; top: calc(.3em + 5px); width: 8px; height: 5px;
  border-left: 2px solid #04140f; border-bottom: 2px solid #04140f; transform: rotate(-45deg); }

.notice { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); border-radius: var(--radius); padding: 20px 22px; }
.notice strong { color: inherit; }
.notice p:last-child { margin: 0; }
.panel { border-radius: var(--radius); padding: 26px; background: var(--bg); border: 1px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box; box-shadow: var(--shadow); }
.panel p:last-child { margin-bottom: 0; }

.specs { width: 100%; border-collapse: collapse; font-size: .97rem; }
.specs th, .specs td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th { width: 34%; color: var(--text-muted); font-weight: 600; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); margin-bottom: 10px; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.3em; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 22px 18px; color: var(--text-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; max-width: 560px; }
.form p { margin: 0; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  font: 400 1rem/1.4 var(--font); padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.form textarea { min-height: 140px; resize: vertical; }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text-muted); }
.form .check input { margin-top: .3em; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.form .fine { font-size: .88rem; color: var(--text-muted); margin: 0; }
.hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.cta-panel {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--on-ink); border-radius: 28px; padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start;
  box-shadow: 0 30px 80px -30px rgba(34, 211, 238, .45);
}
.cta-panel::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 70% at 0% 0%, rgba(52, 211, 153, .3), transparent 70%),
              radial-gradient(50% 70% at 100% 100%, rgba(139, 92, 246, .35), transparent 70%); }
.cta-panel h2 { color: #fff; }
.cta-panel p { color: #c3cbe0; }
.cta-panel .form label { color: var(--on-ink); }
.cta-panel .form .check, .cta-panel .form .fine { color: var(--on-ink-muted); }
.cta-panel .form input[type="text"], .cta-panel .form input[type="email"] { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #fff; }
.cta-panel a:not(.btn) { color: #a5f3fc; }
@media (max-width: 880px) { .cta-panel { grid-template-columns: 1fr; padding: 32px 22px; border-radius: 22px; } }

/* ---------- Legal / long-form pages ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose .updated { color: var(--text-muted); font-size: .95rem; }
.toc { border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; background: var(--bg-soft); margin: 24px 0; }
.toc ol { margin: 0; }
.legal-index { list-style: none; padding: 0; display: grid; gap: 12px; }
.legal-index a { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); background: var(--bg); font-weight: 650; transition: border-color .2s, transform .2s; }
.legal-index a:hover { border-color: var(--accent); transform: translateX(3px); }
.legal-index span { display: block; color: var(--text-muted); font-size: .95rem; margin-top: 2px; font-weight: 400; }

figure { margin: 0; }
figure img { border-radius: var(--radius); display: block; }
figcaption { color: var(--text-muted); font-size: .9rem; margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 64px 0 32px; font-size: .95rem; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .8; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 9px 0; }
.site-footer a { color: #c3cbe0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo { color: #fff; }
.site-footer .small { border-top: 1px solid var(--ink-line); margin-top: 44px; padding-top: 22px; font-size: .85rem; }
.site-footer .small p { margin: 0 0 8px; }
@media (max-width: 880px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- About: what's inside ---------- */
.inside { position: relative; border-radius: 24px; padding: 30px; background: var(--ink); color: var(--on-ink); overflow: hidden; isolation: isolate; box-shadow: 0 30px 60px -30px rgba(34, 211, 238, .5); }
.inside::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 100% 0%, rgba(139, 92, 246, .35), transparent 70%), radial-gradient(60% 50% at 0% 100%, rgba(52, 211, 153, .3), transparent 70%); }
.inside .eyebrow { color: #6ee7b7; }
.inside-list { list-style: none; counter-reset: in; margin: 0; padding: 0; display: grid; gap: 14px; }
.inside-list li { position: relative; padding: 14px 16px 14px 58px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--ink-line); }
.inside-list li::before { counter-increment: in; content: "0" counter(in); position: absolute; left: 16px; top: 14px; font: 800 1rem/1.4 var(--mono); }
.inside-list li::before { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.inside-list b { display: block; color: #fff; }
.inside-list span { color: var(--on-ink-muted); font-size: .95rem; }
.inside-note { margin: 18px 0 0; }
.inside-note a { color: #a5f3fc; font-weight: 600; }
