/* ============================================================
   TekproAI — swp.css  v2.0  [FLUID TYPOGRAPHY + RESPONSIVE]
   SWP Calculator (swp-calculator.html)
   
   Typography: all use CSS custom properties with clamp()
   Minimum font size: 12px — never goes below
   ============================================================ */

:root {
  --bg:          #F8F9FA;
  --surface:     #FFFFFF;
  --surface2:    #F3F4F6;
  --glass:       rgba(255, 255, 255, 0.94);

  --green:       #00C853;
  --green-text:  #006B32;
  --green-dim:   rgba(0, 200, 83, 0.10);
  --green-mid:   rgba(0, 200, 83, 0.25);
  --green-glow:  0 0 16px rgba(0, 200, 83, 0.18);
  --gold:        #E67F00;
  --red:         #C62828;
  --accent2:     #007A3A;

  --text:   #111827;
  --text2:  #374151;
  --muted:  #6B7280;
  --muted2: #9CA3AF;

  --border:   #E5E7EB;
  --border-g: rgba(0, 200, 83, 0.35);

  --f-display: 'Bebas Neue', sans-serif;
  --f-body:    'Outfit', sans-serif;
  --f-mono:    'DM Mono', monospace;

  /* ── FLUID TYPOGRAPHY — min 12px always ── */
  --fs-hero:    clamp(52px,  11vw,  100px);
  --fs-h1:      clamp(36px,  6vw,   62px);
  --fs-h2:      clamp(19px,  3vw,   24px);
  --fs-h3:      clamp(16px,  2.2vw, 20px);
  --fs-body:    clamp(14px,  1.5vw, 16px);
  --fs-label:   clamp(13px,  1.3vw, 14px);
  --fs-mono:    clamp(13px,  1.2vw, 14px);
  --fs-small:   clamp(12px,  1.1vw, 13px);
  --fs-badge:   12px;
  --fs-nav:     clamp(12px,  1.1vw, 13px);
  --fs-btn:     clamp(16px,  2vw,   20px);
  --fs-eyebrow: clamp(10px,  1vw,   12px);

  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-pill: 100px;
  --r-card: 12px;
}

/* ── Reset + Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--f-body); font-size: var(--fs-body);
  min-height: 100vh; overflow-x: hidden;
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% 10%, rgba(0, 200, 83, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 90% 85%, rgba(0, 160, 82, 0.03) 0%, transparent 55%),
    linear-gradient(160deg, #F0F7F2 0%, #F8F9FA 50%, #F2F7F4 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 200, 83, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 83, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* ── Page wrapper ── */
.page { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; padding: 0 clamp(12px, 3vw, 20px) 64px; }

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */

/* ══════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════ */
.page-header { text-align: center; margin-bottom: clamp(22px, 3.5vw, 30px); }
.eyebrow { font-family: var(--f-mono); font-size: var(--fs-eyebrow); color: var(--green-text); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 10px; }
.eyebrow span { display: inline-block; width: 20px; height: 1px; background: var(--green); vertical-align: middle; margin: 0 8px; }
.page-title { font-family: var(--f-display); font-size: var(--fs-hero); line-height: 0.9; letter-spacing: 2px; color: var(--text); margin-bottom: 8px; }
.page-title .g { color: var(--green); }
.page-sub { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.5px; line-height: 1.6; }

/* ══════════════════════════════════════
   MODE TOGGLE
══════════════════════════════════════ */
.mode-toggle, .tabs {
  display: flex; gap: 6px; margin-bottom: clamp(16px, 3vw, 24px); flex-wrap: wrap;
}
.mtab, .tab {
  padding: clamp(9px, 1.8vw, 12px) clamp(16px, 3vw, 22px);
  font-family: var(--f-mono); font-size: var(--fs-small);
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mtab.on, .tab.on { background: var(--green-dim); border-color: var(--border-g); color: var(--green-text); font-weight: 600; }
.mtab:not(.on):hover, .tab:not(.on):hover { border-color: var(--border-g); color: var(--text); }

/* ══════════════════════════════════════
   ALERT BANNER
══════════════════════════════════════ */
.alert-banner {
  display: none; gap: 10px; padding: clamp(12px, 2vw, 16px) 16px;
  border-radius: var(--r-lg); margin-bottom: 16px;
  font-family: var(--f-mono); font-size: var(--fs-label); line-height: 1.6;
  align-items: flex-start;
}
.alert-banner.show  { display: flex; animation: fadeUp 0.3s ease both; }
.alert-banner.warn  { background: rgba(198, 40, 40, 0.07); border: 1px solid rgba(198, 40, 40, 0.22); color: #B91C1C; }
.alert-banner.good  { background: rgba(0, 200, 83, 0.07); border: 1px solid var(--border-g); color: var(--green-text); }
.alert-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.card {
  background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: clamp(16px, 3vw, 22px); margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 83, 0.22), transparent);
}
.section-title, .ctitle {
  font-family: var(--f-mono); font-size: var(--fs-small);
  color: var(--green-text); letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.section-title::after, .ctitle::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ══════════════════════════════════════
   INPUTS
══════════════════════════════════════ */
.fgrid, .inputs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2vw, 14px); margin-bottom: 14px; }
.fgroup, .input-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.flabel, .input-group label {
  font-family: var(--f-mono); font-size: var(--fs-badge);
  color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase;
}
.flabel em { color: var(--green-text); font-style: normal; }
.iwrap, .input-wrap { position: relative; }
.iwrap .unit, .input-wrap .unit-right {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); pointer-events: none;
}

/* All text inputs unified */
input[type=number], input[type=text], select, textarea, .finput {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 40px 12px 14px;
  color: var(--text); font-family: var(--f-mono); font-size: 16px; /* 16px: prevent iOS zoom */
  outline: none; transition: all 0.2s; -webkit-appearance: none;
}
input[type=number]:focus, select:focus, textarea:focus, .finput:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--muted2); }
select, select.finput { padding-right: 14px; cursor: pointer; }

/* Range sliders */
.rwrap { display: flex; flex-direction: column; gap: 6px; }
.rrow  { display: flex; align-items: center; gap: 10px; }
input[type=range] {
  width: 100%; -webkit-appearance: none; height: 4px;
  border-radius: 2px; background: var(--border); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--accent2));
  cursor: pointer; border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: none; }
.rval {
  font-family: var(--f-display); font-size: clamp(20px, 3vw, 24px);
  color: var(--green-text); min-width: 56px; text-align: right; line-height: 1;
}

/* Toggle row */
.toggle-row, .trow {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(12px, 2vw, 16px); background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; transition: all 0.2s; margin-bottom: 14px; gap: 12px;
}
.toggle-row:hover, .trow:hover { border-color: var(--border-g); }
.toggle-label, .tlabel { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--text2); line-height: 1.5; }
.toggle-label strong, .tlabel strong { color: var(--text); display: block; margin-bottom: 2px; font-size: var(--fs-label); }
.toggle-switch, .tswitch {
  width: 42px; height: 24px; background: var(--border); border-radius: 12px;
  position: relative; transition: background 0.2s; flex-shrink: 0;
}
.toggle-switch::after, .tswitch::after {
  content: ''; position: absolute; width: 18px; height: 18px; background: #fff;
  border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on, .tswitch.on { background: var(--green); }
.toggle-switch.on::after, .tswitch.on::after { transform: translateX(18px); }

/* CTA button */
.update-btn, .cbtn {
  width: 100%; padding: clamp(13px, 2.5vw, 16px);
  background: linear-gradient(135deg, var(--green), var(--accent2));
  border: none; border-radius: var(--r-md);
  font-family: var(--f-display); font-size: var(--fs-btn);
  letter-spacing: 3px; color: #000; cursor: pointer;
  transition: all 0.2s; margin-top: 6px;
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.22);
}
.update-btn:hover, .cbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 200, 83, 0.32); }

/* ══════════════════════════════════════
   RESULTS
══════════════════════════════════════ */
.rgrid, .summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.rcard, .s-stat {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: clamp(11px, 2vw, 14px) 12px;
  text-align: center; transition: border-color 0.2s;
}
.rcard.hi, .s-stat.hi { border-color: var(--border-g); background: rgba(0, 200, 83, 0.05); }
.rlabel, .s-stat-label {
  font-family: var(--f-mono); font-size: var(--fs-badge);
  color: var(--muted); letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 5px; display: block;
}
.rval, .s-stat-val { font-family: var(--f-display); font-size: clamp(18px, 3vw, 26px); color: var(--text); line-height: 1; display: block; }
.rval.g, .s-stat-val.green  { color: var(--green-text); font-weight: 600; }
.rval.au, .s-stat-val.orange { color: var(--gold); }
.rval.rd { color: var(--red); }
.rsub { font-family: var(--f-mono); font-size: var(--fs-badge); color: var(--muted); margin-top: 3px; display: block; }

/* Stat pills */
.spills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.spill  { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: clamp(8px, 1.5vw, 12px); }
.spill-l { font-family: var(--f-mono); font-size: var(--fs-badge); color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 4px; display: block; }
.spill-v { font-family: var(--f-display); font-size: clamp(18px, 3vw, 22px); color: var(--green-text); line-height: 1; display: block; }

/* Chart */
.chart-wrap   { position: relative; height: clamp(200px, 30vw, 270px); margin-bottom: 8px; }
.chart-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.legend-item  { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); }
.ldot         { width: 10px; height: 4px; border-radius: 2px; flex-shrink: 0; }

/* Summary bar */
.summary-bar { display: flex; border-radius: 6px; overflow: hidden; height: 7px; margin-bottom: 6px; }
.bar-corpus, .bar-invested { background: rgba(0, 200, 83, 0.3); }
.bar-interest, .bar-gains  { background: linear-gradient(90deg, var(--green), var(--accent2)); }
.bar-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.bl-item { display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); }
.bl-dot  { width: 10px; height: 6px; border-radius: 3px; flex-shrink: 0; }

/* ══════════════════════════════════════
   TABLE
══════════════════════════════════════ */
.table-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
  font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0.5px;
}
.table-toggle:hover { border-color: var(--border-g); color: var(--green-text); }
.table-toggle .arrow, .table-toggle .caret { transition: transform 0.25s; font-size: 12px; }
.table-toggle.open .arrow, .table-toggle.open .caret { transform: rotate(180deg); }
.table-body-wrap, .amort-wrap {
  display: none; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.table-body-wrap.show, .amort-wrap.show { display: block; }

table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: var(--fs-small); }
thead { background: var(--surface2); }
th { padding: clamp(8px, 1.5vw, 11px) clamp(8px, 1.5vw, 11px); text-align: right; color: var(--green-text); letter-spacing: 1px; font-size: var(--fs-badge); text-transform: uppercase; white-space: nowrap; font-weight: 500; }
th:first-child { text-align: left; }
td { padding: clamp(7px, 1.3vw, 9px) clamp(8px, 1.5vw, 11px); text-align: right; border-top: 1px solid var(--border); color: var(--text); font-size: var(--fs-small); }
td:first-child { text-align: left; color: var(--muted); }
tr:hover td { background: rgba(0, 200, 83, 0.025); }
.trow-total td, .trow-zero:last-child td { background: rgba(0, 200, 83, 0.07); color: var(--green-text); border-top: 2px solid rgba(0, 200, 83, 0.28); font-weight: 600; }
tr.trow-zero td { background: rgba(198, 40, 40, 0.06); color: var(--red); }
.yr-row { cursor: pointer; }
.yr-row td:first-child { color: var(--green-text); font-weight: 600; }
.mo-rows { display: none; }
.mo-rows.open { display: table-row-group; }
.mo-rows td { font-size: var(--fs-small); padding-left: 20px; }
.prepay-row td { color: var(--green-text) !important; }
tfoot tr td { background: rgba(0, 200, 83, 0.07); color: var(--green-text); border-top: 2px solid rgba(0, 200, 83, 0.28); font-weight: 600; }

/* ══════════════════════════════════════
   COMPARISON CARDS
══════════════════════════════════════ */
.comp-area { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.comp-card, .ccard { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(12px, 2vw, 16px); transition: all 0.2s; }
.comp-card.highlight, .ccard.win { border-color: var(--border-g); background: rgba(0, 200, 83, 0.05); box-shadow: 0 4px 20px rgba(0, 200, 83, 0.07); }
.comp-header, .chead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.comp-label, .cname { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--text2); letter-spacing: 0.5px; }
.tag, .cbadge { font-family: var(--f-mono); font-size: var(--fs-badge); padding: 4px 10px; border-radius: var(--r-pill); letter-spacing: 0.5px; }
.tag-gray { background: rgba(107, 114, 128, 0.1); color: var(--muted); }
.tag-green, .cbadge { background: var(--green-dim); color: var(--green-text); }
.cs { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.cs-val { font-family: var(--f-body); font-size: var(--fs-label); font-weight: 700; color: var(--text); }
.cs-val.orange { color: var(--gold); }
.cs-lbl, .ckey { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); }
.crow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cval { font-family: var(--f-mono); font-size: var(--fs-label); color: var(--text); }
.cval.g { color: var(--green-text); }
.saving-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 7px; }
.saving-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--green), var(--accent2)); }
.saving-text { font-family: var(--f-mono); font-size: var(--fs-badge); color: var(--muted); }

/* ══════════════════════════════════════
   MF SECTION
══════════════════════════════════════ */
.mf-section { margin-bottom: 16px; }
.mf-sub-text { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.mf-verdict { padding: clamp(12px, 2vw, 16px); border-radius: var(--r-lg); text-align: center; margin-bottom: 16px; border: 1px solid var(--border); }
.mf-verdict.prepay-wins { background: rgba(0, 200, 83, 0.07); border-color: var(--border-g); }
.mf-verdict.mf-wins     { background: rgba(230, 127, 0, 0.07); border-color: rgba(230, 127, 0, 0.25); }
.mf-verdict-title { font-family: var(--f-body); font-size: var(--fs-h2); font-weight: 700; color: var(--text); margin-bottom: 5px; }
.mf-verdict-sub   { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); }
.mf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.mf-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(12px, 2vw, 16px); }
.mf-card.winner { border-color: var(--border-g); background: rgba(0, 200, 83, 0.04); }
.mf-card-title { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.mf-stat { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.mf-stat-label { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); }
.mf-stat-val { font-family: var(--f-body); font-size: var(--fs-label); font-weight: 700; color: var(--text); }
.mf-stat-val.green { color: var(--green-text); }
.mf-result { display: none; }
.mf-result.show { display: block; animation: fadeUp 0.3s ease both; }
.mf-note { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); line-height: 1.7; padding: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); margin-top: 10px; }
.mf-calc-btn, .mf-btn {
  width: 100%; padding: 14px; background: transparent;
  border: 1.5px solid var(--green); border-radius: var(--r-md);
  font-family: var(--f-body); font-size: var(--fs-h3); font-weight: 700;
  color: var(--green-text); cursor: pointer; transition: all 0.2s;
}
.mf-calc-btn:hover, .mf-btn:hover { background: var(--green-dim); box-shadow: var(--green-glow); }

/* ══════════════════════════════════════
   SHARE
══════════════════════════════════════ */
.share-section { margin-bottom: 16px; }
.share-heading, .share-title { font-family: var(--f-body); font-size: var(--fs-h2); font-weight: 700; color: var(--text); margin-bottom: 14px; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btn, .sbtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: clamp(11px, 2vw, 14px); border-radius: var(--r-md);
  font-family: var(--f-body); font-size: var(--fs-label); font-weight: 600;
  cursor: pointer; border: none; transition: all 0.18s; width: 100%;
}
.share-btn.wa, .sbtn.wa { background: #25D366; color: #fff; }
.share-btn.wa:hover, .sbtn.wa:hover { background: #1ebe5d; transform: translateY(-1px); }
.share-btn.xt, .sbtn.xt { background: #111; color: #fff; border: 1px solid #333; }
.share-btn.xt:hover, .sbtn.xt:hover { background: #222; transform: translateY(-1px); }
.share-btn.li, .sbtn.li { background: #0A66C2; color: #fff; }
.share-btn.li:hover, .sbtn.li:hover { background: #0958a8; transform: translateY(-1px); }
.share-btn.cp, .sbtn.cp { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.share-btn.cp:hover, .sbtn.cp:hover { border-color: var(--green); color: var(--green-text); transform: translateY(-1px); }
.copy-ok { background: var(--green-dim) !important; color: var(--green-text) !important; border-color: var(--green) !important; }
.share-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(0, 200, 83, 0.12); border: 1px solid var(--border-g); border-radius: var(--r-pill); padding: 10px 20px; font-family: var(--f-mono); font-size: var(--fs-small); color: var(--green-text); opacity: 0; transition: all 0.3s; pointer-events: none; z-index: 9000; }
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pdf-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--r-md); font-family: var(--f-mono); font-size: var(--fs-small); cursor: pointer; border: 1px solid var(--border); color: var(--muted); background: var(--surface2); transition: all 0.2s; width: 100%; text-transform: uppercase; margin-top: 8px; }
.pdf-btn:hover { border-color: var(--border-g); color: var(--green-text); background: var(--green-dim); }

/* ══════════════════════════════════════
   FEEDBACK
══════════════════════════════════════ */
.feedback-card { margin-bottom: 16px; }
.feedback-heading { font-family: var(--f-body); font-size: var(--fs-h2); font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feedback-sub { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); margin-bottom: 16px; }
.star-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.star-label { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.stars { display: flex; gap: 6px; }
.star { font-size: clamp(22px, 4vw, 28px); cursor: pointer; color: var(--border); transition: color 0.15s; -webkit-tap-highlight-color: transparent; }
.star.active, .star.lit { color: var(--gold); }
.tag-group, .ftags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.qtag, .ftag { font-family: var(--f-mono); font-size: var(--fs-small); padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface2); color: var(--muted); cursor: pointer; transition: all 0.2s; -webkit-tap-highlight-color: transparent; }
.qtag.selected, .ftag.on { border-color: var(--border-g); color: var(--green-text); background: var(--green-dim); }
.feedback-area, .farea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 13px; color: var(--text); font-family: var(--f-body); font-size: 16px; outline: none; resize: vertical; min-height: 90px; transition: all 0.2s; margin-bottom: 10px; line-height: 1.6; }
.feedback-area:focus, .farea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.feedback-input, .finput-sm { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; color: var(--text); font-family: var(--f-body); font-size: 16px; outline: none; transition: all 0.2s; margin-bottom: 10px; }
.feedback-input:focus, .finput-sm:focus { border-color: var(--green); }
.feedback-input::placeholder, .finput-sm::placeholder { color: var(--muted2); }
.feedback-btn, .fsub { width: 100%; padding: 14px; background: transparent; border: 1.5px solid var(--green); border-radius: var(--r-md); font-family: var(--f-body); font-size: var(--fs-btn); font-weight: 600; color: var(--green-text); cursor: pointer; transition: all 0.2s; margin-top: 2px; }
.feedback-btn:hover, .fsub:hover { background: var(--green-dim); transform: translateY(-1px); }
.email-status { font-family: var(--f-mono); font-size: var(--fs-small); text-align: center; margin-top: 8px; }
.email-status.ok   { color: var(--green-text); }
.email-status.fail { color: var(--red); }
.feedback-thanks, .fthanks { display: none; text-align: center; font-family: var(--f-mono); font-size: var(--fs-label); color: var(--green-text); padding: 24px; background: var(--green-dim); border: 1px solid var(--green-mid); border-radius: var(--r-md); line-height: 1.7; }
.fthanks .fthank-icon { font-size: 36px; display: block; margin-bottom: 10px; }
.fthanks strong { display: block; font-size: var(--fs-h3); margin-bottom: 6px; color: var(--text); }
.ai-response { margin-top: 14px; background: var(--surface2); border: 1px solid rgba(0, 200, 83, 0.28); border-radius: var(--r-md); overflow: hidden; }
.ai-header { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: #F0F8F3; }
.ai-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: aiPulse 1.5s infinite; }
.ai-label { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--green-text); font-weight: 600; }
.ai-body  { padding: 14px; font-family: var(--f-mono); font-size: var(--fs-small); line-height: 1.7; color: var(--text); min-height: 40px; }
.ai-footer { padding: 6px 16px; font-family: var(--f-mono); font-size: var(--fs-badge); color: var(--muted); border-top: 1px solid var(--border); text-align: right; }

/* ══════════════════════════════════════
   TIPS
══════════════════════════════════════ */
.tips-section { margin-bottom: 16px; }
.tips { display: flex; flex-direction: column; gap: 8px; }
.tip  { display: flex; gap: 12px; align-items: flex-start; padding: clamp(10px, 2vw, 14px); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color 0.2s; }
.tip:hover { border-color: var(--border-g); }
.tip-icon, .ti { font-size: var(--fs-h3); flex-shrink: 0; margin-top: 2px; }
.tip-text, .tt { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); line-height: 1.65; }
.tip-text strong, .tt strong { color: var(--text); }

/* ── Footer ── */
.page-footer, .pfoot { text-align: center; padding-top: 28px; border-top: 1px solid var(--border); margin-top: 28px; }
.page-footer a, .pfoot a { color: var(--green-text); text-decoration: none; }
.page-footer p, .pfoot p { font-family: var(--f-mono); font-size: var(--fs-small); color: var(--muted); line-height: 2; letter-spacing: 0.3px; }

/* ── Utilities ── */
.hidden { display: none !important; }
.results-wrap { display: none; }
.results-wrap.show { display: block; animation: fadeUp 0.4s ease both; }

/* ── Animations ── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aiPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.anim { animation: fadeUp 0.4s ease both; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 600px) {
  .page        { padding: 0 12px 48px; }
  .fgrid, .inputs-grid { grid-template-columns: 1fr; }
  .rgrid, .summary-grid { grid-template-columns: 1fr 1fr; }
  .spills      { grid-template-columns: 1fr 1fr; }
  .comp-area   { grid-template-columns: 1fr; }
  .mf-cards, .mf-grid { grid-template-columns: 1fr; }
  .share-row   { grid-template-columns: 1fr 1fr; }
  .chart-wrap  { height: 200px; }
  .nav-badge   { display: none; }
  .nav-right   { gap: 6px; }
  .nav-link    { padding: 6px 10px; font-size: var(--fs-badge); }
  .mode-toggle, .tabs { flex-wrap: wrap; }
}

@media (max-width: 400px) {
  .rgrid  { grid-template-columns: 1fr; }
  .sbtn, .share-btn { font-size: var(--fs-small); padding: 11px 8px; }
}
