/* Shared finish for every guide page. Each page keeps its own inline base
   styles (so a guide still reads if this file fails to load); this layer
   adds the editorial polish on top: hero glow, one continuous reading
   column, a sticky contents rail, refined tables, calculator and CTA. */

:root{
  --navy-glow:rgba(59,104,186,.38);
  --navy-line:rgba(147,180,234,.22);
  --glass:rgba(9,9,11,.72);
}

/* ------------------------------------------------ reading progress */
.g-progress{
  position:fixed;inset:0 0 auto 0;height:2px;z-index:60;
  background:linear-gradient(90deg,#3B68BA,#93B4EA 60%,#DCE6F7);
  transform-origin:0 50%;transform:scaleX(0);
  pointer-events:none;
}

/* ------------------------------------------------ header */
.site-head{
  position:sticky;top:0;z-index:50;
  background:var(--glass);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.wordmark{letter-spacing:-.01em;font-weight:600}
.disc{box-shadow:0 0 0 1px rgba(147,180,234,.35),0 6px 18px -6px var(--navy-glow)}
.head-link{transition:color .15s ease}

/* ------------------------------------------------ hero */
article>.panel:first-child,
main>.panel:first-child,
main>section:first-child{
  isolation:isolate;
  padding-top:clamp(4rem,11vw,7.5rem);
  padding-bottom:clamp(3rem,8vw,5rem);
  background:
    radial-gradient(60rem 28rem at 50% -8rem,var(--navy-glow),transparent 70%),
    radial-gradient(28rem 18rem at 85% 10%,rgba(147,180,234,.08),transparent 70%),
    var(--ground);
  border-bottom:1px solid var(--rule);
}
article>.panel:first-child::before,
main>section:first-child::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:56px 56px;
  -webkit-mask-image:radial-gradient(ellipse 70% 60% at 50% 0%,#000 30%,transparent 75%);
          mask-image:radial-gradient(ellipse 70% 60% at 50% 0%,#000 30%,transparent 75%);
}
.h1,.h1-guide{
  background:linear-gradient(180deg,#FFFFFF 30%,#B9C3D6);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  letter-spacing:-.04em;
}
.h1-guide{font-size:clamp(2.25rem,6.6vw,3.6rem);line-height:1.04}
article>.panel:first-child .lead{max-width:38rem;font-size:clamp(1.05rem,2.6vw,1.25rem)}
article>.panel:first-child .tiny{
  display:inline-flex;align-items:center;gap:10px;margin-top:26px;
  padding:6px 12px;border:1px solid var(--rule);border-radius:999px;
  background:rgba(255,255,255,.02);letter-spacing:.08em;
}
@media (max-width:520px){
  article>.panel:first-child .tiny{font-size:.66rem;border-radius:12px;letter-spacing:.06em}
}
.back a{color:var(--muted);text-decoration:none;font-size:.9rem;transition:color .15s ease}
.back a:hover{color:var(--ink)}
.eyebrow{background:rgba(17,17,19,.8);border-color:var(--navy-line)}

/* ------------------------------------------------ one reading column */
article>.panel:not(:first-child):not(.p-ink){
  background:var(--ground);
  border-top:0;
  padding-top:clamp(1.5rem,4vw,2.5rem);
  padding-bottom:clamp(1.5rem,4vw,2.5rem);
}
article>.panel:nth-child(2){padding-top:clamp(3rem,8vw,4.5rem)}
.prose>p,.prose li{color:#B4B4BD;font-size:1.06rem;line-height:1.75}
.prose a{color:#B7CDF2;text-decoration-color:rgba(183,205,242,.35);text-decoration-thickness:1px;transition:text-decoration-color .15s ease}
.prose a:hover{text-decoration-color:#B7CDF2}
.h2-guide{
  scroll-margin-top:88px;
  margin-top:clamp(2.75rem,6vw,3.75rem) !important;
  padding-top:clamp(2.25rem,5vw,3rem);
  border-top:1px solid var(--rule);
  font-size:clamp(1.55rem,4vw,2.1rem) !important;
  letter-spacing:-.03em;
}
.prose .h2-guide:first-child{border-top:0;padding-top:0}
.prose ul.plain li::marker,.prose ol.plain li::marker{color:#93B4EA}

/* ------------------------------------------------ formula + tables */
.formula{
  position:relative;
  padding:20px 22px;
  border-radius:14px;
  border:1px solid var(--navy-line);
  background:linear-gradient(180deg,rgba(22,32,51,.65),rgba(17,17,19,.9));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 20px 40px -24px rgba(0,0,0,.8);
}
.formula p{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:.92rem;letter-spacing:-.01em;color:#DCE6F7}
.tbl{
  border:1px solid var(--rule);border-radius:14px;
  border-collapse:separate;border-spacing:0;overflow:hidden;
  background:var(--paper);
}
.tbl th{background:#141417;padding:12px 16px;border-bottom:1px solid var(--rule)}
.tbl td{padding:12px 16px}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl tbody tr:hover td{background:rgba(255,255,255,.015)}
.tbl .tot td{color:var(--ink);font-weight:600;background:#13151B;border-top:1px solid var(--navy-line)}

/* ------------------------------------------------ calculators / tools */
.calc.card,form.card,.tool.card{
  position:relative;
  padding:clamp(20px,4vw,30px);
  border-radius:18px;
  border:1px solid var(--navy-line);
  background:
    radial-gradient(40rem 14rem at 0% 0%,rgba(59,104,186,.14),transparent 70%),
    linear-gradient(180deg,#121318,#0E0E11);
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 30px 60px -30px rgba(0,0,0,.9),0 0 0 1px rgba(0,0,0,.4);
}
.calc input,.card input,.card select,.card textarea{
  background:#09090B !important;border:1px solid #2A2A30 !important;border-radius:10px !important;
  color:#FAFAFA !important;transition:border-color .15s ease,box-shadow .15s ease;
}
.calc input:focus,.card input:focus,.card select:focus,.card textarea:focus{
  outline:none;border-color:#93B4EA !important;box-shadow:0 0 0 3px rgba(147,180,234,.18);
}
.calc-out{border-radius:12px;overflow:hidden}
.calc-out .v{font-variant-numeric:tabular-nums;font-size:1.05rem;color:#FAFAFA}
.calc-out p:last-child .v{color:#B7CDF2;font-size:1.2rem}

/* ------------------------------------------------ example replies */
.ex{
  border:1px solid var(--rule);border-radius:14px;
  background:linear-gradient(180deg,#121214,#0F0F11);
  padding:18px 20px;
}
.ex .reply{
  border-left:2px solid #93B4EA;padding-left:14px;color:#D4D4DA !important;
}

/* ------------------------------------------------ checklist */
.checks{border:1px solid var(--rule);border-radius:14px;background:var(--paper);padding:6px 18px !important}
.checks li{padding:13px 0 13px 34px !important}
.checks li:last-child{border-bottom:0}
.checks li::before{
  left:2px !important;top:15px !important;width:18px !important;height:18px !important;
  border:0 !important;transform:none !important;border-radius:6px;
  background:rgba(147,180,234,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393B4EA' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ------------------------------------------------ CTA */
article>.panel.p-ink{
  background:
    radial-gradient(50rem 22rem at 50% 120%,rgba(59,104,186,.30),transparent 70%),
    #09090B;
  border-top:1px solid var(--rule);
}
.cta.card{
  padding:clamp(26px,5vw,44px);
  border-radius:22px;
  border:1px solid var(--navy-line);
  background:linear-gradient(180deg,#141B2B,#0E1117);
  box-shadow:0 40px 80px -40px rgba(0,0,0,.9),inset 0 1px 0 rgba(255,255,255,.06);
}
.btn{border-radius:10px;font-weight:550;letter-spacing:-.005em;transition:transform .15s ease,background-color .15s ease,border-color .15s ease,color .15s ease}
.btn:hover{transform:translateY(-1px)}
.btn-gold{background:#FAFAFA !important;border-color:#FAFAFA !important;color:#09090B !important;box-shadow:0 8px 24px -10px rgba(147,180,234,.6)}
.btn-gold:hover{background:#E4E4E7 !important;border-color:#E4E4E7 !important}

/* ------------------------------------------------ contents rail (built by guides.js) */
.g-toc{display:none}
@media (min-width:1180px){
  .g-toc{
    display:block;position:fixed;top:120px;
    left:calc(50% + 24.5rem);width:230px;max-height:calc(100vh - 160px);overflow:auto;
    padding:4px 0 4px 16px;border-left:1px solid var(--rule);
    opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease;
    pointer-events:none;
  }
  .g-toc.on{opacity:1;transform:none;pointer-events:auto}
  .g-toc p{margin:0 0 10px;font-size:.7rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
  .g-toc a{
    display:block;padding:6px 0;font-size:.84rem;line-height:1.35;color:#8B8B95;text-decoration:none;
    transition:color .15s ease;position:relative;
  }
  .g-toc a:hover{color:#E4E4E7}
  .g-toc a.cur{color:#FAFAFA}
  .g-toc a.cur::before{content:"";position:absolute;left:-17px;top:6px;bottom:6px;width:2px;background:#93B4EA;border-radius:2px}
}

/* ------------------------------------------------ guides index */
.glist{display:grid !important;gap:16px !important;list-style:none;padding:0;margin-top:40px}
@media (min-width:860px){.glist{grid-template-columns:1fr 1fr}}
.glist .card{
  position:relative;display:flex;flex-direction:column;height:100%;
  padding:28px 26px 26px;border-radius:18px;text-decoration:none;
  border:1px solid var(--rule);
  background:linear-gradient(180deg,#131316,#0E0E10);
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.glist .card::after{
  content:"Read the guide \2192";margin-top:auto;padding-top:22px;
  font-size:.88rem;font-weight:550;color:#B7CDF2;
}
.glist .card:hover{
  transform:translateY(-3px);border-color:var(--navy-line);
  box-shadow:0 30px 60px -30px rgba(0,0,0,.9),0 0 0 1px rgba(147,180,234,.12),0 18px 50px -30px var(--navy-glow);
}
.glist .card .h3{font-size:clamp(1.2rem,2.4vw,1.4rem);margin-top:6px}
.glist .card .tiny{color:#93B4EA}

/* ------------------------------------------------ footer */
.site-foot{border-top:1px solid var(--rule);background:#050506}

@media (prefers-reduced-motion:reduce){
  .btn,.glist .card,.g-toc{transition:none}
  .btn:hover,.glist .card:hover{transform:none}
}
