/* ============================================
   UKFinanceCalculator  ·  Shared Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 0.75rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}

.site-logo:hover { text-decoration: none; }
.site-logo:hover .logo-finance { color: var(--primary-dark); }
.site-logo:hover .logo-uk { background-color: #1d4ed8; }

.logo-uk {
  background-color: #2563eb;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 3px 7px 3px 7px;
  border-radius: 5px 0 0 5px;
  margin-right: 0;
  transition: background-color 0.15s;
}

.logo-finance {
  background: var(--text);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 3px 7px;
  border-radius: 0 5px 5px 0;
  transition: color 0.15s;
}

.logo-sep {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 5px;
  font-weight: 400;
}

.logo-calc {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-flag {
  font-size: 1rem;
  margin-left: 5px;
}

/* Footer logo override */
.footer-logo.site-logo .logo-uk { background: #3b82f6; }
.footer-logo.site-logo .logo-finance { background: #1e3a5f; }
.footer-logo.site-logo .logo-calc { color: #cbd5e1; }
.footer-logo.site-logo .logo-sep { color: #475569; }

/* ---- Search Bar ---- */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.42rem 0.75rem 0.42rem 2rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: #fff;
}

.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 2000;
  overflow: hidden;
  max-height: 380px;
  overflow-y: auto;
}

.search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s;
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.active { background: #eff6ff; color: var(--primary); text-decoration: none; }

.sri-icon { font-size: 1rem; flex-shrink: 0; }
.sri-label { flex: 1; font-weight: 500; }
.sri-type {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
  font-weight: 500;
}

.search-no-results {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-all-tools {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary) !important;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1.5px solid var(--primary);
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-all-tools:hover {
  background: #eff6ff;
  text-decoration: none !important;
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--primary);
  background: #eff6ff;
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
  border-radius: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.mobile-nav a:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.25rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p { font-size: 0.85rem; }

.footer-col h4 {
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.footer-col a:hover { color: #f1f5f9; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.25rem;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.8;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff;
  padding: 4rem 1.25rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 540px;
  margin: 0 auto 1.75rem;
}

.hero-cta {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  transition: transform 0.15s, box-shadow 0.15s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  text-decoration: none;
  color: var(--primary-dark);
}

/* ============================================
   TOOL GRID (Landing Page)
   ============================================ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 2rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.12);
  border-color: var(--primary);
}

/* Entire card is clickable via the use-link stretch */
.tool-card a.use-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
  margin-top: 0.25rem;
}

.tool-card a.use-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}

.tool-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
}

/* Why Us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.why-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.why-box .why-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.why-box h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.why-box p { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* ============================================
   PAGE LAYOUT (Calculator Pages)
   ============================================ */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 { font-size: 1.75rem; margin-bottom: 0.4rem; }
.page-header p { color: var(--muted); }

.page-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.input-wrap {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
  font-size: 0.95rem;
}

.input-wrap .input-prefix + input {
  padding-left: 1.75rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
  font-size: 0.85rem;
}

.input-wrap .input-suffix ~ input {
  padding-right: 2rem;
}

/* Toggle / Checkbox */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.toggle-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.toggle-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

/* Radio tabs */
.radio-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.radio-tabs input[type="radio"] { display: none; }
.radio-tabs label {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.radio-tabs input[type="radio"]:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================
   SLIDER
   ============================================ */
.slider-group { margin-bottom: 1.1rem; }
.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.slider-group label span {
  color: var(--primary);
  font-weight: 700;
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-full { width: 100%; }

/* ============================================
   RESULT COMPONENTS
   ============================================ */
.result-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}

.result-hero-label {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.result-hero-value {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.result-hero-sub {
  font-size: 0.9rem;
  opacity: 0.8;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.result-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.result-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-box-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.result-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.result-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ============================================
   INSIGHT BOX
   ============================================ */
.insight-box {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}

.insight-green {
  background: #ecfdf5;
  border-color: var(--success);
  color: #065f46;
}

.insight-amber {
  background: #fffbeb;
  border-color: var(--warning);
  color: #92400e;
}

.insight-red {
  background: #fef2f2;
  border-color: var(--danger);
  color: #991b1b;
}

.insight-blue {
  background: #eff6ff;
  border-color: var(--primary);
  color: #1e40af;
}

/* ============================================
   TABS
   ============================================ */
.tab-group {
  margin-bottom: 1.25rem;
}

.tab-list {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================
   BREAKDOWN TABLE
   ============================================ */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.breakdown-table th {
  background: var(--bg);
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

.breakdown-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table tr:hover td { background: #f8fafc; }

.breakdown-table .total-row td {
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid var(--border);
}

/* ============================================
   BADGE
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-green { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* ============================================
   CHART WRAPPER
   ============================================ */
.chart-wrap {
  position: relative;
  margin: 1.25rem 0;
  max-height: 280px;
}

.chart-wrap canvas { max-height: 280px; }

/* ============================================
   INTERLINK BAR
   ============================================ */
.interlink-bar {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.interlink-bar h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.interlink-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interlink-grid a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.15s;
}

.interlink-grid a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

/* ============================================
   AD SLOTS
   ============================================ */
.ad-slot {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  background: #fafafa;
  margin: 1rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot-leaderboard { min-height: 90px; }
.ad-slot-rectangle { min-height: 250px; }

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.faq-section h2 { margin-bottom: 1.25rem; }

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.faq-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.faq-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ============================================
   DYNAMIC ROWS (net worth / debt snowball)
   ============================================ */
.dynamic-row {
  display: grid;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dynamic-row input, .dynamic-row select {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
  background: #fff;
  font-family: inherit;
}

.dynamic-row input:focus, .dynamic-row select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-remove {
  background: none;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-remove:hover { background: #fee2e2; }

.btn-add {
  background: #eff6ff;
  border: 1px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  width: 100%;
  margin-top: 0.5rem;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-add:hover { background: #dbeafe; }

/* ============================================
   COMPARISON TABLE
   ============================================ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.compare-table th {
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.compare-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.compare-table .highlight td { background: #eff6ff; font-weight: 600; }

/* ============================================
   PAYOFF LIST
   ============================================ */
.payoff-list {
  list-style: none;
  margin: 0.75rem 0;
}

.payoff-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.payoff-list li:last-child { border-bottom: none; }

.payoff-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================
   COPY BUTTON
   ============================================ */
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  font-family: inherit;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* VAT display */
.vat-display {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.vat-row.vat-gross {
  background: #eff6ff;
  border-color: var(--primary);
}

.vat-row-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.vat-row-value { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.vat-row.vat-gross .vat-row-value { color: var(--primary); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.35s ease forwards; }
.slide-up { animation: slideUp 0.45s ease forwards; }

/* ============================================
   RESPONSIVE  ·  MOBILE
   ============================================ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1400px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  /* Let search bar fill all remaining header space when nav is hidden */
  .search-wrap { flex: 1; max-width: 480px; min-width: 0; }
}

@media (max-width: 768px) {
  /* Hide logo text on mobile  ·  keep just the "UK Finance" pill */
  .logo-sep, .logo-calc, .logo-flag { display: none; }
  .search-wrap { max-width: none; }
  .search-results { min-width: 240px; left: 0; right: 0; }

  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }

  .tool-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-grid-3 { grid-template-columns: 1fr 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; }

  h1 { font-size: 1.5rem; }

  .section { padding: 2rem 1rem; }
  .page-wrap { padding: 1.25rem 1rem; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .result-grid-3 { grid-template-columns: 1fr; }
  .tab-list { flex-wrap: wrap; }
  .tab-btn { font-size: 0.78rem; padding: 0.4rem 0.7rem; }
}

/* ============================================
   SMART RELATED TOOLS STRIP
   ============================================ */
.related-strip {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-top: 2px solid #dbeafe;
  border-bottom: 2px solid #dbeafe;
  padding: 1.5rem 0;
  margin: 1.5rem 0;
}
.related-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.related-strip-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.related-strip-cards {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.related-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #dbeafe;
  border-radius: 12px;
  padding: 10px 16px 10px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(37,99,235,0.07);
}
.related-chip:hover {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.15);
  text-decoration: none;
}
.related-chip-icon { font-size: 1.15rem; line-height: 1; }
.related-chip-label { flex: 1; }
.related-chip-arrow {
  font-size: 0.85rem;
  color: var(--primary);
  opacity: 0.5;
  margin-left: 2px;
  transition: opacity 0.18s, transform 0.18s;
}
.related-chip:hover .related-chip-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ============================================
   FLOATING QUICK-JUMP WIDGET (bottom right)
   ============================================ */
#quick-jump {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
#quick-jump-toggle {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s;
}
#quick-jump-toggle:hover { background: var(--primary-dark); transform: translateY(-1px); }
#quick-jump-menu {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 0.75rem;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 210px;
  max-height: 380px;
  overflow-y: auto;
}
#quick-jump-menu.open { display: flex; }
#quick-jump-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
}
#quick-jump-menu a:hover { background: #eff6ff; color: var(--primary); }
#quick-jump-menu .jump-group {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 6px 10px 2px;
}
@media (max-width: 600px) {
  #quick-jump { bottom: 16px; right: 12px; }
  #quick-jump-menu { min-width: 180px; }
}

/* ============================================
   SHARE BAR
   ============================================ */
.share-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.share-bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.share-bar-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 0 1 auto;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  color: var(--text);
  font-family: inherit;
}
.share-btn:hover { transform: translateY(-1px); text-decoration: none; }
.share-btn.copy    { border-color: var(--primary); color: var(--primary); }
.share-btn.copy:hover { background: #eff6ff; }
.share-btn.copy.copied { border-color: var(--success); color: var(--success); background: #f0fdf4; }
.share-btn.whatsapp { border-color: #25d366; color: #25d366; }
.share-btn.whatsapp:hover { background: #f0fdf8; }
.share-btn.twitter { border-color: #1d9bf0; color: #1d9bf0; }
.share-btn.twitter:hover { background: #eff6ff; }
.share-btn.email   { border-color: var(--muted); color: var(--muted); }
.share-btn.email:hover { background: var(--bg); color: var(--text); }
.share-btn.pdf     { border-color: #dc2626; color: #dc2626; }
.share-btn.pdf:hover { background: #fef2f2; }

/* PDF print styles */
@media print {
  .site-header, .site-footer, .related-strip,
  #quick-jump, #pwa-banner, .share-bar,
  .interlink-bar, .faq-section, .disclaimer,
  .page-header p, nav, .hamburger { display: none !important; }
  body { background: #fff; }
  .page-wrap { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .print-header { display: block !important; }
}
.print-header {
  display: none;
  text-align: center;
  padding: 1rem 0 0.5rem;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 1rem;
}
.print-header h2 { color: var(--primary); font-size: 1.1rem; }
.print-header p  { color: var(--muted); font-size: 0.8rem; margin: 0; }
