/*
Theme Name: TI-108 Calculator Online
Theme URI: https://ti108calculator.com
Author: TI108Calculator
Description: Free Texas Instruments TI-108 Calculator Online
Version: 4.0.0
License: GNU General Public License v2 or later
Text Domain: ti108calculator
*/

/* ============================================================
   DESIGN TOKENS
   Physical TI-108 exact colors from product photos:
   - Body: medium blue #4a7fd4 / #3668c0
   - Top panel: dark navy #1a2f6e
   - Digit keys: white/off-white
   - Operator keys (+−×÷): orange-yellow
   - Memory keys (MRC M- M+): teal/cyan-green
   - Clear keys (CE C): red/coral
   - Equal key: large, blue
   - Display: grey-green LCD
   - Solar strip: dark with silver cells
============================================================ */
:root {
  /* ---- Physical TI-108 hardware palette ---- */
  --ti-body:          #3d6db5;
  --ti-body-lt:       #4d80cc;
  --ti-body-dk:       #2a509a;
  --ti-top:           #1a2f6e;
  --ti-top-dk:        #111e4a;
  --ti-bottom-edge:   #1d3a82;
  --ti-side-rib:      #152d72;

  --ti-display-bezel: #1a2f6e;
  --ti-display-inner: #c8cca0;   /* classic LCD greenish-grey */
  --ti-display-text:  #1a2500;
  --ti-display-dim:   #b8bc90;

  --ti-solar-bg:      #1c1c1c;
  --ti-solar-line:    #2e2e2e;
  --ti-solar-cell:    #111;
  --ti-solar-shine:   #3a3a3a;

  /* Key colors - exact physical TI-108 */
  --k-white:    #f0f0f0;
  --k-white-h:  #ffffff;
  --k-white-sh: #a8a8a8;
  --k-white-tx: #111111;

  --k-orange:   #e8920a;      /* operators: + - x ÷ */
  --k-orange-h: #f5a520;
  --k-orange-sh:#a85e00;
  --k-orange-tx:#ffffff;

  --k-teal:     #00897b;      /* memory: MRC M- M+ */
  --k-teal-h:   #00a693;
  --k-teal-sh:  #005a52;
  --k-teal-tx:  #ffffff;

  --k-red:      #d32f2f;      /* clear: CE C */
  --k-red-h:    #e53935;
  --k-red-sh:   #8b0000;
  --k-red-tx:   #ffffff;

  --k-blue-eq:  #1a4fb5;      /* equals */
  --k-blue-eq-h:#2060d0;
  --k-blue-eq-sh:#0a2d6e;
  --k-blue-eq-tx:#ffffff;

  --k-fn-color: #1a4fb5;      /* √ % ± text color on white keys */

  /* ---- Site palette ---- */
  --s-bg:       #f4f6f9;
  --s-white:    #ffffff;
  --s-dark:     #0f1b35;
  --s-navy:     #1a2f6e;
  --s-blue:     #1a4fb5;
  --s-blue-lt:  #e8f0fe;
  --s-text:     #1a1a2e;
  --s-text-sec: #4a5568;
  --s-text-mu:  #718096;
  --s-border:   #e2e8f0;
  --s-green:    #00897b;

  /* Typography */
  --f-ui:   'Inter', system-ui, -apple-system, sans-serif;
  --f-mono: 'Courier New', monospace;
  --f-key:  Arial, Helvetica, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ============================================================ BASE ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--f-ui);
  background: var(--s-bg);
  color: var(--s-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--s-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
h1,h2,h3,h4 { line-height: 1.2; }
p { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link {
  position: absolute; top: -999px; left: 16px;
  background: var(--s-blue); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 600; z-index: 9999;
  transition: top .15s;
}
.skip-link:focus { top: 16px; }

/* ============================================================
   HEADER
============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--s-white);
  border-bottom: 1px solid var(--s-border);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--s-blue);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .55rem; font-weight: 900;
  color: #fff; line-height: 1.15; text-align: center;
  letter-spacing: -.3px;
}
.logo-text {
  font-size: .95rem; font-weight: 700;
  color: var(--s-text); line-height: 1.1;
}
.logo-text small {
  display: block; font-size: .6rem;
  font-weight: 400; color: var(--s-text-mu);
  letter-spacing: .04em;
}
.nav {
  display: flex; gap: 2px; align-items: center;
}
.nav a {
  font-size: .84rem; font-weight: 500;
  color: var(--s-text-sec);
  padding: 6px 13px; border-radius: var(--radius-md);
  transition: background .12s, color .12s;
}
.nav a:hover, .nav a.active {
  background: var(--s-blue-lt); color: var(--s-blue);
  text-decoration: none;
}
.menu-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--s-text-sec); border-radius: 2px; transition: .2s;
}

/* ============================================================
   HERO — calculator above the fold
   Max viewport height used so calc is ALWAYS visible on landing
============================================================ */
.hero {
  background: linear-gradient(170deg, #0f1b35 0%, #1a2f6e 55%, #2050a8 100%);
  padding: 28px 0 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 20%, rgba(74,127,212,.25) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.9);
  font-size: .73rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 13px; border-radius: 99px;
  margin-bottom: 14px;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px;
  background: #4ade80; border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }

.hero h1 {
  font-size: clamp(1.6rem, 3.8vw, 2.5rem);
  font-weight: 800; color: #fff;
  margin-bottom: 10px; letter-spacing: -.02em;
}
.hero h1 span { color: #93c5fd; }
.hero-sub {
  font-size: .95rem; color: rgba(255,255,255,.72);
  max-width: 520px; margin: 0 auto 16px; line-height: 1.6;
}
.hero-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
  margin-bottom: 24px;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.82);
  font-size: .73rem; font-weight: 500;
  padding: 3px 11px; border-radius: 99px;
}
.pill::before {
  content: '✓'; font-size: .65rem;
  color: #4ade80; font-weight: 700;
}

/* The tool card — white card, sits at bottom of hero, always above fold */
.tool-card {
  background: var(--s-white);
  border-radius: 20px 20px 0 0;
  padding: 32px 28px 40px;
  width: 100%;
  max-width: 820px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.22);
  margin: 0 auto;
}

/* ============================================================
   CALCULATOR LAYOUT inside tool-card
============================================================ */
.calc-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* ============================================================
   TI-108 PHYSICAL CALCULATOR — PIXEL PERFECT
   Based on actual product photographs:
   - Blue plastic body with rounded bottom corners
   - Dark navy top with "TEXAS INSTRUMENTS" and "TI-108"
   - Multi-cell solar strip below brand
   - Green-grey LCD in dark bezel
   - Row 1: MRC(teal) M-(teal) M+(teal) CE(red) C(red) — 5 keys
   - Row 2: √(white+blue) %(white+blue) ±(white+blue) ÷(orange) — 4 keys
   - Row 3: 7 8 9(white) ×(orange) — 4 keys
   - Row 4: 4 5 6(white) −(orange) — 4 keys
   - Row 5: 1 2 3(white) +(orange) — 4 keys
   - Row 6: 0(white wide) .(white) =(blue LARGE) — 3 keys, = spans 2
============================================================ */
.ti108 {
  position: relative;
  width: 252px;
  flex-shrink: 0;

  /* Blue plastic body */
  background: linear-gradient(170deg,
    #4d82d0 0%,
    #3d6db5 30%,
    #3060a8 65%,
    #2a509a 100%
  );
  border-radius: 8px 8px 20px 20px;
  padding: 0 0 18px 0;

  /* Physical 3D effect */
  box-shadow:
    0 8px 0 #1e3a82,
    0 10px 28px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.25),
    inset -1px 0 0 rgba(0,0,0,.15),
    inset 1px 0 0 rgba(255,255,255,.1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Side grooves/ribs (texture on physical device) */
.ti108::before,
.ti108::after {
  content: '';
  position: absolute;
  top: 24px; bottom: 24px;
  width: 5px;
  background: repeating-linear-gradient(
    0deg,
    #1e3575 0px, #1e3575 3px,
    #2a4898 3px, #2a4898 6px
  );
  border-radius: 3px;
  box-shadow: inset 0 0 3px rgba(0,0,0,.4);
}
.ti108::before { left: -4px; border-radius: 3px 0 0 3px; }
.ti108::after  { right: -4px; border-radius: 0 3px 3px 0; }

/* ---- TOP BRAND PANEL ---- */
.ti-top {
  background: linear-gradient(180deg, #0e1f56 0%, #152470 50%, #0e1f56 100%);
  border-radius: 8px 8px 0 0;
  padding: 9px 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,.3);
}
.ti-brand-txt {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .46rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #90aee0;
}
.ti-model-txt {
  font-family: Arial Black, Arial, sans-serif;
  font-size: .88rem;
  font-weight: 900;
  color: #f0c040;
  letter-spacing: .06em;
}

/* ---- SOLAR PANEL ---- */
.ti-solar {
  margin: 0 12px 8px;
  height: 14px;
  background: #111;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #000;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,.8),
    0 1px 0 rgba(255,255,255,.08);
  display: flex;
  gap: 1.5px;
  padding: 1.5px 2px;
}
.ti-solar-cell {
  flex: 1;
  background: linear-gradient(160deg, #1e1e1e 0%, #0a0a0a 50%, #1e1e1e 100%);
  border-radius: 1px;
  position: relative;
}
.ti-solar-cell::after {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 0;
  height: 40%;
  background: rgba(255,255,255,.04);
  border-radius: 1px;
}

/* ---- LCD DISPLAY BEZEL + SCREEN ---- */
.ti-display-bezel {
  margin: 0 12px 10px;
  background: #0e1f56;
  border-radius: 5px;
  padding: 6px;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,.5),
    0 1px 0 rgba(255,255,255,.07);
}
.ti-display-screen {
  background: var(--ti-display-inner);
  border-radius: 3px;
  padding: 5px 8px 4px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
  overflow: hidden;

  box-shadow:
    inset 0 2px 8px rgba(0,0,0,.2),
    inset 0 0 0 1px rgba(0,0,0,.12);
}
/* LCD glare */
.ti-display-screen::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, transparent 100%);
  border-radius: 3px 3px 0 0;
  pointer-events: none;
}
/* Small M / E indicators */
.ti-disp-flags {
  position: absolute; top: 4px; left: 6px;
  display: flex; gap: 4px;
}
.ti-flag {
  font-family: var(--f-mono);
  font-size: .52rem;
  font-weight: 700;
  color: var(--ti-display-text);
  opacity: .15;
  transition: opacity .12s;
  letter-spacing: 0;
}
.ti-flag.lit { opacity: 1; }

/* Main number on LCD */
.ti-disp-num {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ti-display-text);
  text-align: right;
  line-height: 1;
  letter-spacing: .06em;
  max-width: 100%;
  word-break: break-all;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.ti-disp-num.err { color: #8b0000; font-size: 1.1rem; }

/* ---- KEYPAD WRAPPER ---- */
.ti-pad {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---- KEY ROW GRIDS ---- */
.krow { display: grid; gap: 5px; }
.krow-5  { grid-template-columns: repeat(5, 1fr); }
.krow-4  { grid-template-columns: repeat(4, 1fr); }
.krow-bot { grid-template-columns: 1fr 1fr 2fr; }/* 0 . = */

/* ---- BASE KEY STYLE ---- */
.k {
  border: none;
  cursor: pointer;
  border-radius: 5px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2px;
  line-height: 1.1;
  font-family: var(--f-key);
  font-weight: 700;
  position: relative;
  transition: transform .07s, filter .07s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Physical key look: raised with bottom shadow */
  box-shadow: 0 3px 0 rgba(0,0,0,.35), 0 4px 6px rgba(0,0,0,.25);
}
.k:active, .k.pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 2px 3px rgba(0,0,0,.2);
}
.k:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* White digit keys */
.k-w {
  background: linear-gradient(175deg, #f8f8f8 0%, #e4e4e4 100%);
  color: var(--k-white-tx);
  box-shadow: 0 3px 0 var(--k-white-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: .85rem;
}
.k-w:hover { background: linear-gradient(175deg, #fff 0%, #ececec 100%); }

/* Orange operator keys (+−×÷) */
.k-op {
  background: linear-gradient(175deg, #f5a020 0%, #d97e08 100%);
  color: #fff;
  box-shadow: 0 3px 0 var(--k-orange-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: 1.05rem;
}
.k-op:hover { background: linear-gradient(175deg, #ffb030 0%, #e88e10 100%); }

/* Teal memory keys */
.k-mem {
  background: linear-gradient(175deg, #00a896 0%, #007a6e 100%);
  color: #fff;
  box-shadow: 0 3px 0 var(--k-teal-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: .65rem;
}
.k-mem:hover { background: linear-gradient(175deg, #00baa8 0%, #009080 100%); }

/* Red clear keys */
.k-cl {
  background: linear-gradient(175deg, #e53935 0%, #b71c1c 100%);
  color: #fff;
  box-shadow: 0 3px 0 var(--k-red-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: .65rem;
}
.k-cl:hover { background: linear-gradient(175deg, #f44336 0%, #c62828 100%); }

/* Blue equals key — large, prominent */
.k-eq {
  background: linear-gradient(175deg, #2060d8 0%, #1040a8 100%);
  color: #fff;
  box-shadow: 0 3px 0 var(--k-blue-eq-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: 1.4rem;
  font-weight: 900;
  height: 42px;
}
.k-eq:hover { background: linear-gradient(175deg, #2e70e8 0%, #1550c0 100%); }

/* Function keys (√ % ±) — white body, blue text */
.k-fn {
  background: linear-gradient(175deg, #f8f8f8 0%, #e4e4e4 100%);
  color: var(--k-fn-color);
  box-shadow: 0 3px 0 var(--k-white-sh), 0 4px 6px rgba(0,0,0,.28);
  font-size: .9rem;
  font-weight: 900;
}
.k-fn:hover { background: linear-gradient(175deg, #fff 0%, #ececec 100%); }

/* Key sub-label (small text below main) */
.k-sub {
  display: block;
  font-size: .4rem;
  font-weight: 400;
  letter-spacing: .04em;
  margin-top: 1px;
  opacity: .8;
  line-height: 1;
}

/* ============================================================
   SIDE HELP PANEL
============================================================ */
.calc-side {
  flex: 1;
  min-width: 210px;
  max-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-box {
  background: var(--s-bg);
  border: 1px solid var(--s-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.ib-label {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--s-blue); margin-bottom: 8px;
}
.ib-body {
  font-size: .82rem; color: var(--s-text-sec); line-height: 1.6;
}
.sc-list { display: flex; flex-direction: column; gap: 5px; }
.sc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: var(--s-text-sec);
}
.sc-row kbd {
  font-family: var(--f-mono); font-size: .72rem;
  background: var(--s-white); border: 1px solid #cdd6e0;
  border-radius: 4px; padding: 2px 7px; color: var(--s-text);
}

/* ============================================================
   CONTENT SECTIONS
============================================================ */
.section { padding: 64px 0; }
.section--white { background: var(--s-white); }
.section--grey  { background: var(--s-bg); }
.section--dark  {
  background: linear-gradient(135deg, #0f1b35 0%, #1a2f6e 100%);
}
.sec-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}
.sec-tag {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--s-blue); display: block; margin-bottom: 8px;
}
.sec-h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 800; color: var(--s-text);
  margin-bottom: 10px; letter-spacing: -.02em;
}
.section--dark .sec-h2 { color: #fff; }
.sec-p {
  font-size: .96rem; color: var(--s-text-sec); line-height: 1.7; margin: 0;
}
.section--dark .sec-p { color: rgba(255,255,255,.68); }

/* Feature grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feat-card {
  background: var(--s-white);
  border: 1px solid var(--s-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: box-shadow .2s, transform .2s;
}
.feat-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-3px); }
.feat-icon { font-size: 1.5rem; margin-bottom: 10px; }
.feat-title { font-size: .95rem; font-weight: 700; color: var(--s-text); margin-bottom: 6px; }
.feat-desc { font-size: .85rem; color: var(--s-text-sec); line-height: 1.65; margin: 0; }

/* Steps grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  text-align: center; padding: 26px 16px 22px;
  background: var(--s-white);
  border: 1px solid var(--s-border);
  border-radius: var(--radius-lg);
  position: relative; counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute; top: -13px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 26px;
  background: var(--s-blue); color: #fff;
  font-size: .76rem; font-weight: 800; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 1.6rem; margin-bottom: 9px; }
.step-title { font-size: .9rem; font-weight: 700; color: var(--s-text); margin-bottom: 5px; }
.step-desc { font-size: .8rem; color: var(--s-text-sec); line-height: 1.6; margin: 0; }

/* ============================================================
   FAQ
============================================================ */
.faq-tabs {
  display: flex; flex-wrap: wrap; gap: 7px;
  justify-content: center; margin-bottom: 24px;
}
.faq-tab {
  font-size: .8rem; font-weight: 600;
  padding: 6px 16px; border-radius: 99px;
  border: 1.5px solid var(--s-border);
  background: var(--s-white); color: var(--s-text-sec);
  cursor: pointer; transition: .12s; font-family: var(--f-ui);
}
.faq-tab:hover, .faq-tab.active {
  background: var(--s-blue); color: #fff; border-color: var(--s-blue);
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-list[hidden] { display: none; }
.faq-item {
  border: 1px solid var(--s-border); border-radius: var(--radius-md);
  overflow: hidden; background: var(--s-white); transition: border-color .12s;
}
.faq-item:hover { border-color: #93c5fd; }
.faq-item.open  { border-color: var(--s-blue); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between;
  align-items: center; gap: 12px;
  padding: 14px 18px; background: none; border: none;
  cursor: pointer; text-align: left;
  font-family: var(--f-ui); font-size: .9rem; font-weight: 600;
  color: var(--s-text); transition: background .12s;
}
.faq-q:hover { background: var(--s-blue-lt); }
.faq-q svg { flex-shrink: 0; transition: transform .25s; color: var(--s-blue); width: 16px; height: 16px; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-in {
  padding: 12px 18px 16px;
  font-size: .855rem; color: var(--s-text-sec); line-height: 1.75;
  border-top: 1px solid var(--s-border);
}

/* ============================================================
   CTA BANNER
============================================================ */
.cta {
  background: linear-gradient(135deg, #0f1b35 0%, #1a4fb5 100%);
  padding: 60px 0; text-align: center;
}
.cta h2 { font-size: clamp(1.3rem,2.8vw,1.85rem); font-weight: 800; color: #fff; margin-bottom: 10px; }
.cta p  { color: rgba(255,255,255,.7); margin-bottom: 26px; font-size: .96rem; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--s-blue);
  font-weight: 800; font-size: .9rem; font-family: var(--f-ui);
  padding: 12px 28px; border-radius: 99px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.3); text-decoration: none; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer { background: var(--s-dark); padding: 44px 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 32px;
}
.footer-brand p {
  font-size: .82rem; color: rgba(255,255,255,.45);
  margin-top: 10px; line-height: 1.7;
}
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text small { color: rgba(255,255,255,.35); }
.footer-col-h {
  font-size: .68rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 12px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.footer-col ul a {
  font-size: .82rem; color: rgba(255,255,255,.5);
  text-decoration: none; transition: color .12s;
}
.footer-col ul a:hover { color: rgba(255,255,255,.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 18px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: .75rem; color: rgba(255,255,255,.28); margin: 0; }
.footer-bottom a { font-size: .75rem; color: rgba(255,255,255,.3); text-decoration: none; transition: color .12s; }
.footer-bottom a:hover { color: rgba(255,255,255,.65); }
.footer-links { display: flex; gap: 16px; }

/* ============================================================
   PRIVACY / TERMS page
============================================================ */
.legal-page {
  background: var(--s-white);
  min-height: 60vh;
  padding: 60px 0 80px;
}
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}
.legal-content h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; color: var(--s-text); }
.legal-content .updated {
  font-size: .8rem; color: var(--s-text-mu);
  margin-bottom: 32px; display: block;
}
.legal-content h2 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--s-text); margin: 28px 0 8px;
}
.legal-content p { font-size: .92rem; color: var(--s-text-sec); line-height: 1.8; margin-bottom: 14px; }
.legal-content ul { margin: 8px 0 14px 20px; }
.legal-content ul li {
  font-size: .92rem; color: var(--s-text-sec);
  line-height: 1.7; margin-bottom: 4px; list-style: disc;
}
.legal-content a { color: var(--s-blue); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .feat-grid  { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column;
    position: fixed; inset: 58px 0 0;
    background: var(--s-white);
    padding: 16px 20px; z-index: 199;
    gap: 3px; border-top: 1px solid var(--s-border);
    overflow-y: auto;
  }
  .nav.open a { font-size: .95rem; padding: 10px 14px; border-radius: var(--radius-md); }
  .menu-btn { display: flex; }
  .tool-card { padding: 20px 14px 32px; border-radius: 16px 16px 0 0; }
  .calc-layout { gap: 20px; }
  .calc-side { max-width: 100%; width: 100%; min-width: unset; }
  .feat-grid  { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 500px) {
  .steps-grid { grid-template-columns: 1fr; }
  .ti108 { width: 232px; }
  .ti-disp-num { font-size: 1.7rem; }
  .k { height: 34px; }
  .k-eq { height: 38px; }
  .hero h1 { font-size: 1.5rem; }
}

/* Above-fold guarantee: hero never exceeds viewport */
@media (min-height: 600px) {
  .hero {
    min-height: 0;
  }
}
