:root{
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: rgba(15,23,42,.72);
  --border: rgba(15,23,42,.10);
  --card: #ffffff;
  --primary: #4f46e5;
  --primary2: #0ea5e9;
  --success: #16a34a;
}

*{ 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";
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a{ color: inherit; text-decoration: none; }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248,250,252,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand{
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand--with-logo{
  display:flex;
  align-items:center;
  gap: 10px;
}
.brand-logo{
  width: 28px;
  height: 28px;
  display:block;
  flex: 0 0 auto;
}
.brand-text{ white-space: nowrap; }
.brand-name{ font-weight: 800; }
.brand-tld{ opacity: .88; }


.nav{
  display:flex;
  gap: 14px;
  align-items:center;
}
.nav a{
  color: rgba(15,23,42,.76);
  font-weight: 650;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a:hover{
  background: rgba(15,23,42,.06);
  color: var(--text);
}
.nav a[aria-current="page"]{
  background: rgba(79,70,229,.12);
  color: var(--text);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 750;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn-primary{
  background: var(--primary);
  color:#fff;
  box-shadow: 0 10px 22px rgba(79,70,229,.22);
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(79,70,229,.26);
}
.btn-ghost{
  background: transparent;
  border-color: rgba(15,23,42,.16);
  color: var(--text);
}
.btn-ghost:hover{
  background: rgba(15,23,42,.04);
}

/* --- Link + button color safety (prevents visited-link colors hiding button text) --- */

a.btn, a.btn:link, a.btn:visited{ text-decoration: none; }

a.btn-primary, a.btn-primary:link, a.btn-primary:visited{
  color:#fff;
  -webkit-text-fill-color:#fff;
}

a.btn-ghost, a.btn-ghost:link, a.btn-ghost:visited{
  color: var(--text);
}


/* Hero */
.hero{
  padding: 60px 0 28px;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(14,165,233,.22), transparent 60%),
    radial-gradient(900px 480px at 90% 10%, rgba(79,70,229,.20), transparent 55%);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 26px;
  align-items:start;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79,70,229,.12);
  color: var(--primary);
  font-weight: 750;
  font-size: 12px;
}

h1{
  font-size: 44px;
  line-height: 1.08;
  margin: 0 0 12px;
}
.lead{
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 62ch;
}

.cta-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.checks{
  list-style:none;
  padding:0;
  margin: 0;
  display:grid;
  gap: 10px;
}
.checks li{
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}
.checks li::before{
  content: "✓";
  position:absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 6px;
  background: rgba(22,163,74,.14);
  color: var(--success);
  font-weight: 900;
}

/* Sections */
.section{ padding: 44px 0; }
.section.alt{
  background: rgba(15,23,42,.03);
  border-top: 1px solid rgba(15,23,42,.05);
  border-bottom: 1px solid rgba(15,23,42,.05);
}

h2{ font-size: 28px; margin: 0 0 14px; }
h3{ margin: 0 0 10px; font-size: 18px; }

.card{
  background: var(--card);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}
.hero-card{ position: sticky; top: 84px; }
.card-title{ margin:0 0 8px; font-size: 20px; }
.card-subtitle{ margin:0 0 8px; font-size: 16px; color: rgba(15,23,42,.86); }

.divider{ height:1px; background: rgba(15,23,42,.08); margin: 14px 0; }

.bullets{ margin: 0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 7px 0; }

.note{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(14,165,233,.10);
  border: 1px solid rgba(14,165,233,.20);
  color: rgba(15,23,42,.88);
}

.grid-2{ display:grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3{ display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

.muted{ color: var(--muted); }
.small{ font-size: 12.5px; }

/* Prose pages */
.prose{ max-width: 75ch; }
.prose h1{ font-size: 34px; margin: 0 0 12px; }
.prose a{ color: var(--primary); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover{ opacity: .9; }

/* Footer */
.site-footer{
  padding: 34px 0;
  background: #0b1220;
  color: rgba(255,255,255,.86);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.3fr .7fr 1fr;
  gap: 18px;
  align-items:start;
}
.footer-links{ display:flex; flex-direction:column; gap: 10px; }
.footer-links a{ color: rgba(255,255,255,.80); }
.footer-links a:hover{ color: #ffffff; }
.foot-brand{ color:#ffffff; margin-bottom: 10px; }

/* Article cards */
.card-link{
  display:block;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card-link:hover{
  transform: translateY(-2px);
  border-color: rgba(79,70,229,.22);
  box-shadow: 0 14px 40px rgba(2,6,23,.10);
}
.card-kicker{
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15,23,42,.65);
}
.article-meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.section-head{
  display:flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head p{ margin: 0; }


/* Featured article */
.section.featured{
  padding-top: 26px;
  padding-bottom: 26px;
}
.featured-card{
  display:grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 16px;
  padding: 22px;
}
.featured-aside{
  background: rgba(15,23,42,.03);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 16px;
  padding: 16px;
}
.featured-meta{
  margin-top: 12px;
}


/* Article images */
.card-thumb{
  width: 100%;
  height: 128px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.02);
  margin: 0 0 12px;
}
.article-hero{
  margin: 14px 0 18px;
}
.article-hero img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.02);
}
.featured-thumb{
  width: 100%;
  height: 160px;
  object-fit: cover;
  display:block;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.02);
  margin: 0 0 12px;
}


@media (max-width: 920px){
  .header-cta{ display:none; }
  .hero-grid{ grid-template-columns: 1fr; }
  .featured-card{ grid-template-columns: 1fr; }
  .hero-card{ position: static; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  h1{ font-size: 36px; }
}


/* Mobile refinements */
@media (max-width: 680px){
  .container{ padding: 0 16px; }
  .header-inner{ flex-wrap: wrap; padding: 12px 0; }
  .nav{ width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .nav a{ padding: 8px 10px; }
  .section-head{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px){
  .brand-text{ font-size: 15px; }
  .brand-tld{ display:none; }
  .hero{ padding: 44px 0 20px; }
  h1{ font-size: 30px; }
  .lead{ font-size: 16px; }
  h2{ font-size: 22px; }
  .prose h1{ font-size: 28px; }
  .section{ padding: 34px 0; }
  .card{ padding: 16px; }
  .featured-card{ padding: 18px; }
  .cta-row .btn{ width: 100%; }
  .card-thumb{ height: 148px; }
  .featured-thumb{ height: 150px; }
}

@media (max-width: 380px){
  .container{ padding: 0 14px; }
  h1{ font-size: 28px; }
}
