/* Tool Page v5 — Premium Design */

/* ============================================
   NHS CALCULATORS — PREMIUM TOOL PAGE
   Design: Clinical Precision meets Warmth
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette */
  --nhs:       #005EB8;
  --nhs-dark:  #003087;
  --nhs-navy:  #001a4d;
  --teal:      #00A499;
  --yellow:    #FFB81C;
  --green:     #00823B;
  --pink:      #AE2573;

  /* Surface */
  --bg:        #F4F7FC;
  --surface:   #FFFFFF;
  --surface-2: #F0F4FB;
  --border:    #E2E8F4;
  --border-2:  #C8D4EC;

  /* Text */
  --text-1:    #0A1628;
  --text-2:    #3D5A8A;
  --text-3:    #6B82A8;
  --text-inv:  #FFFFFF;

  /* Type */
  --display: 'DM Serif Display', Georgia, serif;
  --body:    'DM Sans', system-ui, sans-serif;

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(0,46,120,0.06);
  --shadow-md: 0 4px 20px rgba(0,46,120,0.10);
  --shadow-lg: 0 12px 48px rgba(0,46,120,0.14);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   NAV
   ========================================== */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  background: var(--nhs); color: white;
  font-weight: 700; font-size: 11px;
  padding: 4px 9px; border-radius: 6px;
  letter-spacing: 1px;
}
.logo-name {
  font-family: var(--display);
  font-size: 18px; color: var(--text-1);
}
.logo-name span { color: var(--nhs); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: var(--text-3); text-decoration: none;
  padding: 6px 12px; border-radius: var(--r-sm);
  transition: all .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--nhs); background: var(--surface-2); }
.nav-pill {
  background: var(--nhs) !important; color: white !important;
  border-radius: 20px !important;
}
.nav-pill:hover { background: var(--nhs-dark) !important; }
.nav-badge {
  font-size: 11px; font-weight: 600;
  color: var(--teal); background: #E0F5F3;
  padding: 3px 10px; border-radius: 20px;
}

/* ==========================================
   BREADCRUMB
   ========================================== */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center;
  gap: 8px; font-size: 12px;
}
.breadcrumb a { color: var(--text-3); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--nhs); }
.breadcrumb .sep { color: var(--border-2); }
.breadcrumb .current { color: var(--text-2); font-weight: 500; }

/* ==========================================
   HERO — The unique part
   Split: left=context, right=live calculator
   ========================================== */
.tool-hero {
  background: var(--nhs-navy);
  position: relative;
  overflow: hidden;
  padding: 3.5rem 2.5rem 4rem;
}

/* Geometric background pattern */
.tool-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 50% 30%, rgba(0,94,184,0.45) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(0,164,153,0.15) 0%, transparent 50%),
    radial-gradient(ellipse 30% 40% at 90% 80%, rgba(174,37,115,0.1) 0%, transparent 50%);
}

/* Decorative grid lines */
.tool-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.tool-hero .hero-inner {
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* LEFT — Identity */
.tool-hero .hero-left {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.25rem;
}

.tool-hero .hero-live {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-size: 11px; font-weight: 600;
  padding: 5px 13px; border-radius: 20px;
  margin-bottom: 0.875rem;
  letter-spacing: 0.3px;
  justify-content: center;
}
.tool-hero .live-pulse {
  width: 6px; height: 6px;
  background: #4ADE80; border-radius: 50%;
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.tool-hero .hero-title {
  font-family: var(--display);
  font-size: 2.4rem; font-weight: 400;
  color: white; line-height: 1.15;
  margin-bottom: 0.875rem;
  letter-spacing: -0.5px;
}
.hero-title em {
  font-style: italic;
  color: var(--yellow);
}



/* TAGS */
.tool-hero .hero-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tool-hero .hero-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 12px; padding: 4px 11px;
  border-radius: 20px;
}
.hero-tag::before { content: '✓'; color: #4ADE80; font-size: 10px; font-weight: 700; }

/* RIGHT — Calculator card floating */
.hero-right { padding: 0; }

/* ==========================================
   CALCULATOR CARD — The star of the show
   ========================================== */
.calc-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,46,120,0.25), 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
}

/* Colour accent strip at top */
.calc-card-accent {
  height: 4px;
  background: linear-gradient(90deg, #e91e8c, #005EB8, #00A499);
}

.calc-card-body { padding: 1.75rem; }

.calc-card-title {
  font-size: 14px; font-weight: 700;
  color: var(--text-1); margin-bottom: 2px;
}
.calc-card-sub {
  font-size: 12px; color: var(--text-3);
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* YEAR SWITCHER */
.year-tabs {
  display: flex; gap: 4px;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 3px; margin-bottom: 1.25rem;
}
.year-tab {
  flex: 1; padding: 7px 10px;
  border: none; background: transparent;
  border-radius: 6px;
  font-family: var(--body);
  font-size: 12px; font-weight: 500;
  color: var(--text-3); cursor: pointer;
  transition: all .15s;
}
.year-tab.active {
  background: var(--surface);
  color: var(--nhs); font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* FORM FIELDS */
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.calc-form.cols1 { grid-template-columns: 1fr; }
.form-field label {
  font-size: 10px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.8px;
  display: block; margin-bottom: 5px;
}
.form-field input, .form-field select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--body);
  font-size: 14px; color: var(--text-1);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B82A8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.form-field input:focus, .form-field select:focus {
  border-color: var(--nhs);
  box-shadow: 0 0 0 3px rgba(0,94,184,0.1);
}

/* CALCULATE BUTTON */
.calc-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--nhs) 0%, #0072d4 100%);
  color: white; border: none;
  border-radius: var(--r-md);
  font-family: var(--body);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center;
  justify-content: center; gap: 8px;
  margin-bottom: 1rem;
  position: relative; overflow: hidden;
}
.calc-submit::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.calc-submit:hover::after { background: rgba(255,255,255,0.08); }
.calc-submit:active { transform: scale(0.99); }

/* RESULT PANEL */
.calc-result {
  display: none;
  background: linear-gradient(135deg, var(--nhs-navy) 0%, var(--nhs-dark) 100%);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
  display: none;
}
.calc-result::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.calc-result.show { display: flex; align-items: center; gap: 1.5rem; animation: resultIn .3s ease; flex-wrap: wrap; }
@keyframes resultIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-main { flex-shrink: 0; }
.result-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 4px;
}
.result-amount {
  font-family: var(--display);
  font-size: 2.6rem; font-weight: 400;
  color: white; line-height: 1;
  margin-bottom: 4px;
}
.result-sub { font-size: 12px; color: rgba(255,255,255,0.55); }
.result-breakdown {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 8px; flex: 1;
}
.rb-item {
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.rb-label { font-size: 10px; color: rgba(255,255,255,0.45); margin-bottom: 2px; }
.rb-val { font-size: 13px; font-weight: 600; color: white; }
.rb-val.neg { color: #FCA5A5; }
.rb-val.pos { color: #86EFAC; }

/* ACTION BUTTONS */
.calc-actions {
  display: flex; gap: 6px; margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.action-btn {
  flex: 1; padding: 8px 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--body); font-size: 11px;
  font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center;
  justify-content: center; gap: 5px;
}
.action-btn:hover { border-color: var(--nhs); color: var(--nhs); }

/* ==========================================
   MAIN PAGE LAYOUT
   ========================================== */
.page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 4rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.5rem;
  align-items: start;
}
.page-main { min-width: 0; }
.page-sidebar { position: sticky; top: 80px; }

/* ==========================================
   CONTENT SECTIONS
   ========================================== */
.tool-section {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.25rem;
  transition: border-color .2s;
}
.tool-section:hover { border-color: var(--border-2); }

/* H2 — clean, no icon box clutter */
.tool-section h2 {
  font-family: var(--display);
  font-size: 1.3rem; font-weight: 400;
  color: var(--text-1);
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  line-height: 1.3;
}
.tool-section h2 .sec-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.tool-section h3 {
  font-size: 14px; font-weight: 700;
  color: var(--text-1);
  margin: 1.5rem 0 0.6rem;
}
.tool-section p {
  font-size: 14px; color: var(--text-2);
  line-height: 1.8; margin-bottom: 0.9rem;
}
.tool-section p:last-child { margin-bottom: 0; }
.tool-section strong { color: var(--text-1); font-weight: 600; }

/* PHASE CARDS */
.phase-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin: 1.25rem 0;
}
.phase-card {
  border-radius: var(--r-md);
  padding: 1.25rem; border: 1px solid;
  position: relative; overflow: hidden;
}
.phase-card::after {
  content: attr(data-phase);
  position: absolute; bottom: -10px; right: -4px;
  font-family: var(--display); font-size: 5rem;
  font-weight: 400; opacity: 0.05; color: currentColor;
  line-height: 1; pointer-events: none;
}
.pc-1 { background: #EFF6FF; border-color: #BFDBFE; color: var(--nhs); }
.pc-2 { background: #F0FDF4; border-color: #BBF7D0; color: var(--green); }
.pc-3 { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.pc-4 { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.pc-num { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; opacity: 0.7; }
.pc-weeks { font-family: var(--display); font-size: 1.25rem; margin-bottom: 4px; }
.pc-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 5px; }
.pc-desc { font-size: 12px; color: var(--text-2); line-height: 1.55; }

/* RATE COMPARE */
.rate-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 1.25rem 0; }
.rc { border-radius: var(--r-md); padding: 1.25rem; border: 1px solid; }
.rc-curr { background: #EFF6FF; border-color: #BFDBFE; }
.rc-next { background: #F0FDF4; border-color: #BBF7D0; }
.rc-year { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.rc-curr .rc-year { color: var(--nhs); }
.rc-next .rc-year { color: var(--green); }
.rc-amount { font-family: var(--display); font-size: 2.2rem; color: var(--text-1); margin-bottom: 6px; line-height: 1; }
.rc-note { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* INFO BOXES */
.ib { border-left: 3px solid; border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 13px 16px; margin: 1.25rem 0; }
.ib p { margin: 0; font-size: 13px; color: var(--text-1); line-height: 1.7; }
.ib-blue { background: #EFF6FF; border-color: var(--nhs); }
.ib-yellow { background: #FFFBEB; border-color: var(--yellow); }
.ib-teal { background: #E0F5F3; border-color: var(--teal); }

/* REF TABLE */
.ref-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 1rem 0; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--border); display: table; }
.ref-tbl th { text-align: left; padding: 9px 14px; background: var(--bg); font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.ref-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.ref-tbl tr:last-child td { border-bottom: none; }
.ref-tbl tr:hover td { background: var(--surface-2); }
.ref-tbl .bold { font-weight: 600; color: var(--text-1); }

/* CHECKLIST */
.checklist { list-style: none; }
.checklist li {
  display: flex; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-2);
  align-items: flex-start; line-height: 1.65;
}
.checklist li:last-child { border-bottom: none; }
.cl-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.cl-yes { background: #DCFCE7; color: var(--green); }
.cl-warn { background: #FEF3C7; color: #92400E; }
.cl-info { background: #EFF6FF; color: var(--nhs); }

/* SCHEDULE TABLE */
.schedule-wrap { overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--border); margin: 1rem 0; }
.schedule-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.schedule-tbl th { text-align: left; padding: 10px 16px; background: var(--bg); font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.schedule-tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text-1); }
.schedule-tbl tr:last-child td { border-bottom: none; }
.schedule-tbl tr:hover td { background: var(--surface-2); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.p-blue  { background: #EFF6FF; color: var(--nhs); }
.p-green { background: #DCFCE7; color: var(--green); }
.p-amber { background: #FEF3C7; color: #92400E; }
.p-red   { background: #FEE2E2; color: #991B1B; }

/* RESULT NOTE */
.result-note {
  font-size: 12px; color: var(--text-3);
  line-height: 1.65;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--yellow);
  margin: 1rem 0;
}

/* ==========================================
   FAQ
   ========================================== */
.faq-item {
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden; margin-bottom: 6px;
  transition: border-color .15s;
}
.faq-item:hover { border-color: var(--border-2); }
.faq-q {
  padding: 14px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  display: flex; justify-content: space-between;
  align-items: center; gap: 12px;
  user-select: none; transition: background .15s;
}
.faq-q:hover { background: var(--surface-2); }
.faq-icon {
  width: 22px; height: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--nhs);
  flex-shrink: 0; transition: all .2s;
  font-weight: 300;
}
.faq-q.open .faq-icon { background: var(--nhs); color: white; border-color: var(--nhs); transform: rotate(45deg); }
.faq-a { display: none; padding: 0 18px 14px; font-size: 13px; color: var(--text-2); line-height: 1.75; border-top: 1px solid var(--border); padding-top: 12px; }
.faq-a.open { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* RELATED TOOLS */
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 1rem; }
.related-card {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  text-decoration: none; color: inherit;
  border: 1px solid transparent;
  display: flex; gap: 10px; align-items: flex-start;
  transition: all .2s;
}
.related-card:hover { border-color: var(--nhs); background: #EFF6FF; }
.related-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.related-title { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.related-desc { font-size: 11px; color: var(--text-3); line-height: 1.4; }

/* ==========================================
   SIDEBAR
   ========================================== */
.sw {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sw h4 {
  font-size: 12px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sw-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  text-decoration: none; color: var(--text-1);
  font-size: 13px; border-bottom: 1px solid var(--border);
  transition: color .15s;
}
.sw-link:last-child { border-bottom: none; }
.sw-link:hover { color: var(--nhs); }
.sw-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.sw-arrow { margin-left: auto; color: var(--text-3); font-size: 11px; }

/* QUICK STATS widget */
.sw-stat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.sw-stat:last-child { border-bottom: none; }
.sw-stat .key { color: var(--text-3); }
.sw-stat .val { font-weight: 600; color: var(--text-1); }

/* NOTICE widgets */
.sw-notice {
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 1rem;
}
.sw-teal { background: #E0F5F3; border: 1px solid #A7E3DE; }
.sw-yellow { background: #FFFBEB; border: 1px solid #FDE68A; }
.sw-notice-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.sw-teal .sw-notice-title { color: var(--teal); }
.sw-yellow .sw-notice-title { color: #92400E; }
.sw-notice p { font-size: 12px; color: var(--text-2); margin: 0; line-height: 1.6; }

/* ==========================================
   AUTHOR CARD — bottom of page
   ========================================== */
.author-card {
  background: linear-gradient(135deg, var(--nhs-navy) 0%, #005EB8 100%);
  border-radius: var(--r-xl);
  padding: 2rem 2.5rem;
  margin-top: 1.5rem;
  position: relative; overflow: hidden;
}
.author-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.author-card::after {
  content: '';
  position: absolute; bottom: -40px; left: 40%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,164,153,0.1) 0%, transparent 70%);
}
.ac-inner { display: grid; grid-template-columns: 100px 1fr; gap: 2rem; position: relative; z-index: 2; }
.ac-avatar-col { text-align: center; }
.ac-avatar {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.6rem;
  color: white; margin: 0 auto 10px;
}
.ac-verified {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 10px; font-weight: 600;
  padding: 3px 9px; border-radius: 12px;
  display: inline-block; white-space: nowrap;
}
.ac-eyebrow { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.ac-name { font-family: var(--display); font-size: 1.8rem; color: white; line-height: 1.1; margin-bottom: 4px; }
.ac-title { font-size: 13px; color: rgba(255,255,255,0.75); font-weight: 500; margin-bottom: 10px; }
.ac-bio { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 14px; max-width: 580px; }
.ac-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ac-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 11px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.ac-history {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}
.ac-hist {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-sm); padding: 9px 13px;
  flex: 1; min-width: 160px;
}
.ac-hist strong { display: block; font-size: 12px; color: white; margin-bottom: 2px; }
.ac-hist span { font-size: 11px; color: rgba(255,255,255,0.5); }
.ac-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-date { font-size: 12px; color: rgba(255,255,255,0.4); }
.ac-link { color: var(--yellow); font-size: 12px; font-weight: 600; text-decoration: none; margin-left: auto; }
.ac-link:hover { color: white; }

/* ==========================================
   FOOTER
   ========================================== */
footer {
  background: #050E1F;
  color: rgba(255,255,255,0.55);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-dis {
  background: rgba(255,255,255,0.04);
  border-left: 3px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  font-size: 12px; line-height: 1.6;
  margin-bottom: 2rem;
  border-radius: 0 6px 6px 0;
}
.footer-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-cols h4 { color: white; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-cols a { display: block; color: rgba(255,255,255,0.45); font-size: 13px; text-decoration: none; margin-bottom: 7px; transition: color .15s; }
.footer-cols a:hover { color: white; }
.footer-brand p { font-size: 13px; margin-top: 8px; line-height: 1.7; }
.footer-bot { display: flex; justify-content: space-between; font-size: 12px; flex-wrap: wrap; gap: 8px; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media(max-width:1024px) {
  .page-wrap { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .footer-cols { grid-template-columns: 1fr 1fr 1fr; }
  .ac-inner { grid-template-columns: 1fr; text-align: center; }
  .ac-badges { justify-content: center; }
  .ac-history { justify-content: center; }
  .ac-footer { justify-content: center; }
}
@media(max-width:640px) {
  .tool-hero .hero-title { font-size: 2.2rem; }
  .calc-form { grid-template-columns: 1fr; }
  .phase-grid, .rate-compare, .related-grid { grid-template-columns: 1fr; }
  .result-breakdown { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .nav-links li:not(:last-child):not(:nth-last-child(2)) { display: none; }
}
@media(max-width:400px) {
  .hero-pills { flex-direction: column; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* =============================================
   CONTENT SECTIONS — below hero in page-wrap
   tool-sections.js moves H2 groups here
   ============================================= */
#tool-content-sections .tool-section {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 1.25rem;
}
#tool-content-sections .tool-section h2 {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}
#tool-content-sections .tool-section h2 .sec-icon {
    font-size: 20px;
    flex-shrink: 0;
}
#tool-content-sections .tool-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    margin: 1.5rem 0 0.6rem;
}
#tool-content-sections .tool-section p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 0.9rem;
}
#tool-content-sections .tool-section p:last-child { margin-bottom: 0; }
#tool-content-sections .tool-section strong { color: var(--text-1); font-weight: 600; }
#tool-content-sections .tool-section ul,
#tool-content-sections .tool-section ol {
    padding-left: 1.5rem;
    margin-bottom: 0.9rem;
}
#tool-content-sections .tool-section li {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 0.35rem;
}

/* Info boxes inside content sections */
#tool-content-sections .ib { padding: 13px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 1.25rem 0; }
#tool-content-sections .ib p { margin: 0; font-size: 13px; color: var(--text-1); line-height: 1.7; }
#tool-content-sections .ib-blue  { background: #EFF6FF; border-left: 4px solid var(--nhs); }
#tool-content-sections .ib-yellow{ background: #FFFBEB; border-left: 4px solid var(--yellow); }
#tool-content-sections .ib-teal  { background: #E0F5F3; border-left: 4px solid var(--teal); }

/* FAQ inside content sections */
#tool-content-sections .faq-item {
    background: var(--surface);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 6px;
    transition: border-color .15s;
}
#tool-content-sections .faq-item:hover { border-color: var(--border-2); }
#tool-content-sections .faq-q {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: background .15s;
}
#tool-content-sections .faq-q:hover { background: var(--surface-2); }
#tool-content-sections .faq-icon {
    width: 22px; height: 22px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--nhs);
    flex-shrink: 0; transition: all .2s;
    font-weight: 300;
}
#tool-content-sections .faq-q.open .faq-icon {
    background: var(--nhs); color: white;
    border-color: var(--nhs); transform: rotate(45deg);
}
#tool-content-sections .faq-a {
    display: none;
    padding: 12px 18px 14px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.75;
    border-top: 1px solid var(--border);
}
#tool-content-sections .faq-a.open { display: block; }

/* Shortcode output area — no card wrapper */
#calc-shortcode-output {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* nhs-calc-wrap and nhs-mat-calc take full width in hero */
#calc-shortcode-output .nhs-calc-wrap,
#calc-shortcode-output .nhs-mat-calc {
    max-width: 100%;
    margin: 0;
}
#calc-shortcode-output .nhs-calc-card,
#calc-shortcode-output .mc-card {
    border-radius: var(--r-xl);
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 4px 20px rgba(0,0,0,0.15);
}


/* =============================================
   WIDTH AND HEIGHT — DEFINITIVE OVERRIDES
   ============================================= */

/* Hero: full width, calculator centered */
.tool-hero { padding: 2rem 2.5rem 0; }
.tool-hero .hero-inner { max-width: 1100px; width: 100%; margin: 0 auto; }
.hero-left  { width: 100%; margin-bottom: 1.75rem; }

/* Calculator output: full width inside hero */
#calc-shortcode-output {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* All calculator cards fill available space */
#calc-shortcode-output .nhs-calc-wrap,
#calc-shortcode-output .nhs-mat-calc  { width: 100%; max-width: 100%; margin: 0; }
#calc-shortcode-output .nhs-calc-card,
#calc-shortcode-output .mc-card       { width: 100%; max-width: 100%; border-radius: var(--r-xl); box-shadow: 0 24px 80px rgba(0,0,0,0.25); margin-bottom: -2rem; }

/* Calculator body padding */
#calc-shortcode-output .ncc-body        { padding: 2rem 2.5rem; }
#calc-shortcode-output .nhs-mat-calc .mc-body { padding: 2rem 2.5rem; }
#calc-shortcode-output .ncc-head        { padding: 1.75rem 2.5rem; }
#calc-shortcode-output .nhs-mat-calc .mc-head { padding: 1.75rem 2.5rem; }

/* Form grids */
#calc-shortcode-output .ncc-grid     { grid-template-columns: 1fr 1fr; gap: 16px; }
#calc-shortcode-output .ncc-grid-3   { grid-template-columns: 1fr 1fr 1fr; }
#calc-shortcode-output .ncc-grid-1   { grid-template-columns: 1fr; }
#calc-shortcode-output .nhs-mat-calc .fg-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
#calc-shortcode-output .nhs-mat-calc .fg-3 { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Input and select */
#calc-shortcode-output .ncc-field input,
#calc-shortcode-output .ncc-field select,
#calc-shortcode-output .nhs-mat-calc .f input,
#calc-shortcode-output .nhs-mat-calc .f select { height: 46px; padding: 10px 14px; font-size: 14px; }

/* Buttons */
#calc-shortcode-output .ncc-btn,
#calc-shortcode-output .nhs-mat-calc .btn-calc,
#calc-shortcode-output .nhs-mat-calc .btn-next { min-height: 50px; font-size: 15px; font-weight: 600; }

/* Results: 4 cols */
#calc-shortcode-output .ncc-metrics        { grid-template-columns: repeat(4,1fr); gap: 12px; }
#calc-shortcode-output .ncc-result-hero    { grid-template-columns: repeat(3,1fr); padding: 1.5rem 2rem; gap: 1.25rem; }
#calc-shortcode-output .nhs-mat-calc .rh   { grid-template-columns: repeat(3,1fr); padding: 1.5rem 2rem; gap: 1.25rem; }

/* Content sections match hero width */
#tool-content-sections { max-width: 1100px; margin: 0 auto; width: 100%; }
#tool-content-sections .tool-section {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 2rem 2.5rem;
    margin-bottom: 1.25rem;
}
#tool-content-sections .tool-section h2 {
    font-family: var(--display);
    font-size: 1.3rem; font-weight: 400;
    color: var(--text-1);
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px; line-height: 1.3;
}
#tool-content-sections .tool-section h2 .sec-icon { font-size: 20px; flex-shrink: 0; }
#tool-content-sections .tool-section h3 { font-size: 14px; font-weight: 700; color: var(--text-1); margin: 1.5rem 0 0.6rem; }
#tool-content-sections .tool-section p  { font-size: 14px; color: var(--text-2); line-height: 1.8; margin-bottom: 0.9rem; }
#tool-content-sections .tool-section p:last-child { margin-bottom: 0; }
#tool-content-sections .tool-section strong { color: var(--text-1); font-weight: 600; }
#tool-content-sections .tool-section ul,
#tool-content-sections .tool-section ol { padding-left: 1.5rem; margin-bottom: 0.9rem; }
#tool-content-sections .tool-section li  { color: var(--text-2); font-size: 14px; line-height: 1.8; }
#tool-content-sections .ib { padding: 13px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 1.25rem 0; }
#tool-content-sections .ib p { margin: 0; font-size: 13px; color: var(--text-1); line-height: 1.7; }
#tool-content-sections .ib-blue   { background: #EFF6FF; border-left: 4px solid var(--nhs); }
#tool-content-sections .ib-yellow { background: #FFFBEB; border-left: 4px solid var(--yellow); }
#tool-content-sections .ib-teal   { background: #E0F5F3; border-left: 4px solid var(--teal); }

/* FAQ */
#tool-content-sections .faq-item { background:var(--surface);border-radius:var(--r-md);border:1px solid var(--border);overflow:hidden;margin-bottom:6px; }
#tool-content-sections .faq-q { padding:14px 18px;font-size:14px;font-weight:500;color:var(--text-1);cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;user-select:none;transition:background .15s; }
#tool-content-sections .faq-q:hover { background:var(--surface-2); }
#tool-content-sections .faq-icon { width:22px;height:22px;background:var(--bg);border:1px solid var(--border);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--nhs);flex-shrink:0;transition:all .2s; }
#tool-content-sections .faq-q.open .faq-icon { background:var(--nhs);color:white;border-color:var(--nhs);transform:rotate(45deg); }
#tool-content-sections .faq-a { display:none;padding:12px 18px 14px;font-size:13px;color:var(--text-2);line-height:1.75;border-top:1px solid var(--border); }
#tool-content-sections .faq-a.open { display:block; }

/* RESPONSIVE */
@media(max-width:960px) {
    .hero-inner,
    #calc-shortcode-output,
    #tool-content-sections { max-width: 100%; padding: 0 1.5rem; }
    .tool-hero { padding: 2.5rem 1.5rem 3rem; }
    #calc-shortcode-output { padding: 0; }
    #calc-shortcode-output .ncc-body,
    #calc-shortcode-output .nhs-mat-calc .mc-body { padding: 1.5rem; }
}
@media(max-width:700px) {
    #calc-shortcode-output .ncc-grid,
    #calc-shortcode-output .ncc-grid-3,
    #calc-shortcode-output .nhs-mat-calc .fg-2,
    #calc-shortcode-output .nhs-mat-calc .fg-3 { grid-template-columns: 1fr; }
    #calc-shortcode-output .ncc-metrics { grid-template-columns: 1fr 1fr; }
    #calc-shortcode-output .ncc-result-hero,
    #calc-shortcode-output .nhs-mat-calc .rh { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   FINAL OVERRIDE — Force correct widths
   Prevents main.css from overriding tool pages
   ============================================= */

/* Hero must be full viewport width */
.tool-hero {
    width: 100% !important;
    padding: 2rem 2.5rem 0 !important;
}

/* Hero inner — wide, centered, column layout */
.tool-hero .hero-inner {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    grid-template-columns: unset !important;
    min-height: unset !important;
}

/* Calculator output — full width */
#calc-shortcode-output {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
}

/* Calculator cards fill output area */
#calc-shortcode-output .nhs-calc-wrap,
#calc-shortcode-output .nhs-mat-calc {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
#calc-shortcode-output .nhs-calc-card,
#calc-shortcode-output .mc-card {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25) !important;
    margin-bottom: -2rem !important;
}

/* Page wrap top padding for card overlap */
.page-wrap {
    padding-top: 4rem !important;
}

/* Content sections width */
#tool-content-sections {
    max-width: 1100px !important;
    width: 100% !important;
    margin: 0 auto !important;
}
