:root{
  --bg: #ffffff;
  --text: #0b1220;
  --muted: #586174;
  --border: #e7ebf3;
  --card: #ffffff;
  --shadow: 0 10px 26px rgba(18, 26, 40, 0.06);
  --brand: #6d28d9;          /* purple */
  --brand-hover: #5b21b6;
  --radius: 18px;
  --radius-lg: 22px;
  --max: 1040px;
}

/* --- Global top nav (injected into #site-nav) --- */
.sc-nav{
  border-bottom:1px solid rgba(127,127,127,.35);
  background:rgba(127,127,127,.04);
}
.sc-nav-inner{
  max-width:1100px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.sc-brand{
 font-size: 1.35rem;       /* larger */
  font-weight: 900;         /* bold */
  letter-spacing: -0.5px;   /* tighter feel */
  text-decoration: none;
  color: #5b21b6;           /* your purple */
  opacity: 1;               /* remove nav fade */;
}

.sc-brand:visited{
  color: #4f46e5;
}

.sc-brand:hover{
  opacity: 0.9;
  text-decoration: none;
}

.sc-links{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.sc-links li{margin:0;padding:0;}
.sc-links a{
  text-decoration:none;
  color:inherit;
  opacity:.9;
}
.sc-links a:visited{color:inherit;}
.sc-links a:hover{text-decoration:underline;opacity:1;}


*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* Global links */
a{
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
a:hover{
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Page wrapper used on older pages */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px 56px;
}

/* NAV - shared via nav.html injected into #site-nav */
#site-nav{
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

/* nav.html uses: <nav class="nav"><div class="nav-inner">... */
.nav-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.nav-left a,
.nav-left a:visited{
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  text-decoration: none;
  color: var(--brand);
}
.nav-left a:hover{
  color: var(--brand-hover);
  text-decoration: none;
  opacity: 0.9;
}

/* Nav links - locked styling so page-level link rules cannot change them */
.nav-links{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.nav-links a,
.nav-links a:visited{
  font-weight: 600;
  color: var(--text);
  opacity: 0.88;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
}
.nav-links a:hover{
  opacity: 1;
  background: rgba(109,40,217,0.08);
  text-decoration: none;
}

/* Active state - nav.js sets aria-current="page" and may also set .active */
.nav-links a.active,
.nav-links a[aria-current="page"]{
  opacity: 1;
  background: rgba(109,40,217,0.12);
  color: var(--text);
  font-weight: 800;
}

/* Mobile nav layout */
@media (max-width: 720px){
  .nav-inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links{
    justify-content: flex-start;
    gap: 12px;
  }
}

/* HEADERS */
h1{
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.06;
  margin: 26px 0 10px;
  letter-spacing: -0.6px;
}
.subhead{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 16px;
}
.last-updated{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

/* CARDS */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h2, .card h3{
  margin: 0 0 10px;
  font-size: 18px;
}
.card p{ margin: 0; color: var(--muted); }
.card .title-link{
  display: inline-block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 800;
}

/* SECTIONS + GRID */
.section-title{
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 800;
}
.hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0 14px;
}

.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 860px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* HERO IMAGE (Christmas page etc) */
.hero-image{
  width: 100%;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  margin: 18px 0 14px;
}

/* COUNTDOWN */
.countdown-shell{ padding: 18px; }

/* Countdown grid (single authoritative version, includes the old hard-fix behaviour) */
#countdown{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* If countdown.js wraps boxes in an extra div, flatten it without breaking */
#countdown > div{
  display: contents;
}

.countdown-box{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: #fff;
  width: auto;
  margin: 0;
}
.countdown-label{
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 6px;
}
.countdown-value{
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -0.4px;
  margin: 0;
}
.countdown-note{
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 920px){
  #countdown{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  #countdown{ grid-template-columns: 1fr; }
}

/* Tool cards used on All Tools and Financial Tools pages */
.tool-card{
  display: block;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 16px;
  padding: 18px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.tool-card:hover{
  border-color: #d8e4ff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
  text-decoration: none;
}
.tool-card h3{ margin: 0 0 8px 0; }
.tool-card p{ margin: 0; color: #334155; }

.link-list{
  margin: 10px 0 0 0;
  padding-left: 18px;
}
.link-list li{ margin: 8px 0; }

/* FOOTER */
.footer{
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
