/* =====================================================
   penny dropped — pennydropped.co.uk
   Shared stylesheet
   ===================================================== */

:root {
  --brand:        #533AB7;
  --brand-light:  #EEEDFE;
  --brand-dark:   #3C3489;
  --green:        #0F6E56;
  --green-light:  #E1F5EE;
  --amber:        #854F0B;
  --amber-light:  #FAEEDA;
  --text-primary:   #1a1a1a;
  --text-secondary: #555;
  --text-tertiary:  #888;
  --border:       #e5e5e5;
  --bg:           #ffffff;
  --bg-secondary: #f7f6f3;
  --radius:       12px;
  --radius-sm:     8px;
  --max-width:    960px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font); font-size: 15px; color: var(--text-primary); background: var(--bg); line-height: 1.6; }
img   { max-width: 100%; display: block; }
a     { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout --------------------------------------- */
.container  { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.page-grid  { display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: start; }

/* ---- Site Header ---------------------------------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: flex; flex-direction: column; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1; }
.logo-text span { color: var(--brand); }
.logo-tag  { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.main-nav  { display: flex; gap: 22px; list-style: none; }
.main-nav a { font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }

/* ---- Site Footer ---------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 24px; margin-top: 60px; background: var(--bg-secondary); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-brand .logo-text { font-size: 18px; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-top: 8px; }
.footer-col h4 { font-size: 11px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 7px; text-decoration: none; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-tertiary); line-height: 1.8; }

/* ---- Buttons -------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 20px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s; font-family: var(--font); text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-outline  { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-outline:hover  { background: var(--brand-light); text-decoration: none; }

/* ---- Cards ---------------------------------------- */
.card   { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-secondary { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* ---- Badges --------------------------------------- */
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-investing { background: var(--brand-light); color: var(--brand-dark); }
.badge-mortgage  { background: var(--green-light);  color: var(--green); }
.badge-pension   { background: var(--amber-light);  color: var(--amber); }
.badge-isa       { background: #E6F1FB; color: #185FA5; }
.badge-career    { background: #FBEAF0; color: #993556; }
.badge-property  { background: #EAF3DE; color: #3B6D11; }

/* ---- Section heading ------------------------------ */
.section-heading { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.section-heading::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- Breadcrumb ----------------------------------- */
.breadcrumb { font-size: 12px; color: var(--text-tertiary); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-tertiary); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin: 0 5px; }

/* ---- Page title ----------------------------------- */
.page-title    { font-size: 30px; font-weight: 700; color: var(--text-primary); line-height: 1.25; margin-bottom: 8px; letter-spacing: -0.5px; }
.page-subtitle { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }

/* ---- Calculators ---------------------------------- */
.calc-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }

.slider-group { margin-bottom: 22px; }
.slider-group:last-child { margin-bottom: 0; }
.slider-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.slider-label-text { font-size: 13px; color: var(--text-secondary); }
.slider-value { font-size: 18px; font-weight: 700; color: var(--brand); }

input[type="range"] {
  width: 100%; height: 4px; -webkit-appearance: none; appearance: none;
  background: var(--border); border-radius: 2px; outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); cursor: pointer; border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--brand), 0 2px 4px rgba(83,58,183,0.3);
  transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand);
  cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand);
}

/* ---- Results -------------------------------------- */
.results-block { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.result-headline { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.result-main    { font-size: 44px; font-weight: 700; color: var(--green); letter-spacing: -2px; line-height: 1; margin-bottom: 4px; }
.result-caption { font-size: 12px; color: var(--text-tertiary); margin-bottom: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-box   { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.stat-label { font-size: 10px; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-value { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.stat-value.positive { color: var(--green); }
.stat-value.branded  { color: var(--brand); }
.stat-value.warning  { color: var(--amber); }

/* ---- Bar chart ------------------------------------ */
.bar-chart { margin-bottom: 4px; }
.bar-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-row-label { font-size: 11px; color: var(--text-secondary); min-width: 100px; text-align: right; line-height: 1.3; }
.bar-track { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; height: 28px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 3px; display: flex; align-items: center; padding: 0 10px; transition: width 0.35s ease; }
.bar-fill span { font-size: 11px; font-weight: 700; white-space: nowrap; }
.bar-invested { background: #E6F1FB; }
.bar-invested span { color: #0C447C; }
.bar-total    { background: var(--green-light); }
.bar-total    span { color: var(--green); }
.bar-late     { background: var(--amber-light); }
.bar-late     span { color: var(--amber); }
.bar-red      { background: #FCEBEB; }
.bar-red      span { color: #A32D2D; }

/* ---- Insight block -------------------------------- */
.insight-block { border-left: 3px solid var(--brand); background: var(--brand-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin-bottom: 16px; }
.insight-block p { font-size: 13px; color: #3C3489; line-height: 1.7; }
.insight-block strong { color: var(--brand-dark); }

/* ---- Disclaimer ----------------------------------- */
.disclaimer { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 20px; }
.disclaimer p { font-size: 11px; color: var(--text-tertiary); line-height: 1.7; }

/* ---- Ad slots ------------------------------------- */
/* Replace .ad-placeholder content with your Google AdSense <ins> tag */
.ad-slot        { margin-bottom: 16px; text-align: center; }
.ad-slot-label  { font-size: 9px; color: var(--text-tertiary); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 4px; }
.ad-placeholder { background: var(--bg-secondary); border: 1px dashed var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.ad-placeholder-300 { min-height: 250px; }
.ad-placeholder-728 { min-height: 90px; }
.ad-placeholder p { font-size: 11px; color: var(--text-tertiary); }

/* ---- Article list --------------------------------- */
.article-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background 0.1s; }
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: var(--bg-secondary); }
.article-num     { font-size: 22px; font-weight: 700; color: var(--border); min-width: 26px; line-height: 1.2; }
.article-content { flex: 1; }
.article-title   { font-size: 14px; font-weight: 500; color: var(--text-primary); line-height: 1.4; margin-bottom: 4px; }
.article-meta    { font-size: 11px; color: var(--text-tertiary); }

/* ---- Sidebar -------------------------------------- */
.sidebar-block { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.sidebar-head  { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-secondary); }
.sidebar-link  { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-primary); text-decoration: none; transition: background 0.1s; }
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { background: var(--bg-secondary); color: var(--brand); text-decoration: none; }
.sidebar-link .link-tag { font-size: 10px; color: var(--text-tertiary); display: block; margin-top: 2px; }

/* ---- Calc grid (homepage) ------------------------- */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 28px; }
.calc-card-link { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; transition: all 0.15s; }
.calc-card-link:hover { border-color: var(--brand); box-shadow: 0 3px 10px rgba(83,58,183,0.09); text-decoration: none; }
.calc-card-link .card-prefix { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.calc-card-link h3 { font-size: 15px; font-weight: 500; color: var(--text-primary); line-height: 1.4; margin-bottom: 12px; }
.calc-card-link .card-footer { display: flex; align-items: center; justify-content: space-between; }
.calc-card-link .searches { font-size: 11px; color: var(--text-tertiary); }
.calc-card-link .arrow { color: var(--brand); font-size: 16px; }

/* ---- Homepage hero -------------------------------- */
.home-hero { padding: 40px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.hero-eyebrow { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.hero-title { font-size: 42px; font-weight: 700; color: var(--text-primary); letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 14px; }
.hero-title span { color: var(--brand); }
.hero-body  { font-size: 16px; color: var(--text-secondary); line-height: 1.7; max-width: 540px; margin-bottom: 24px; }

/* ---- Search bar ----------------------------------- */
.search-box { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color 0.15s; margin-bottom: 24px; }
.search-box:focus-within { border-color: var(--brand); }
.search-icon { padding: 0 14px; color: var(--text-tertiary); flex-shrink: 0; }
.search-box input { flex: 1; padding: 13px 0; border: none; background: transparent; font-size: 14px; color: var(--text-primary); outline: none; font-family: var(--font); }
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box button { padding: 13px 22px; background: var(--brand); color: #fff; border: none; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); flex-shrink: 0; transition: background 0.15s; }
.search-box button:hover { background: var(--brand-dark); }

/* ---- Responsive ----------------------------------- */
@media (max-width: 720px) {
  .page-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-title  { font-size: 28px; letter-spacing: -0.5px; }
  .page-title  { font-size: 22px; }
  .result-main { font-size: 34px; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .stats-grid .stat-box:last-child { grid-column: span 2; }
  .calc-grid   { grid-template-columns: 1fr; }
  .bar-row-label { min-width: 70px; font-size: 10px; }
  .main-nav { display: none; }
}
