/* SEO.to — design system.

   Concept: a bright clear sky. Real sky-blue gradient with soft clouds drifting
   near the horizon, white cards floating on top with generous radii and soft
   physical shadows. Optimistic, uncomplicated, human — the internet before
   everything turned into a moody dark dashboard.

   Rules: light always, real blue (not slate), white cards, generous roundness,
   soft shadows with warmth. Diagnostics keep their own signal colours. */

@font-face {
  font-family: 'Archivo';
  font-weight: 400 800; font-style: normal; font-display: swap;
  src: url('/assets/fonts/archivo-var.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Plex Mono';
  font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/fonts/plexmono-1.woff2') format('woff2');
}
@font-face {
  font-family: 'Plex Mono';
  font-weight: 500; font-style: normal; font-display: swap;
  src: url('/assets/fonts/plexmono-2.woff2') format('woff2');
}

:root {
  --sky-0:   #1B77CC;   /* deep zenith: 4.6:1 with white, small white type passes AA */
  --sky-1:   #3E9BE8;
  --sky-2:   #7CC4F2;
  --sky-3:   #C9E9FF;   /* horizon haze */
  --card:    #FFFFFF;
  --ink:     #10263A;
  --ink-2:   #45647F;
  --ink-3:   #5A7490;   /* label grey: 4.8:1 on white, passes WCAG AA */
  --blue:    #0A6FBF;   /* link / action blue */
  --blue-dk: #075494;
  --sun:     #FFC53D;   /* warm highlight */
  --pass:    #178A4C;
  --warn:    #B06E00;
  --fail:    #C6362B;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 18px;
  --shadow: 0 1px 2px rgba(16,38,58,.08), 0 8px 20px -6px rgba(16,38,58,.18);
  --shadow-lift: 0 2px 4px rgba(16,38,58,.10), 0 18px 34px -10px rgba(16,38,58,.26);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The sky is painted on <html>, not <body>: with background-attachment:fixed the
   canvas needs the root box, otherwise it stops at the body's own width. */
html {
  -webkit-font-smoothing: antialiased; text-size-adjust: 100%; color-scheme: only light;
  min-height: 100%;
  background:
    /* clouds sit BELOW the headline zone — white type needs deep sky behind it.
       The blue stops were deepened so white headline type never sits on sky-2
       or lighter, even on short viewports. */
    radial-gradient(600px 190px at 14% 52%, rgba(255,255,255,.80) 0%, rgba(255,255,255,0) 70%),
    radial-gradient(520px 165px at 82% 44%, rgba(255,255,255,.72) 0%, rgba(255,255,255,0) 72%),
    radial-gradient(820px 240px at 50% 62%, rgba(255,255,255,.68) 0%, rgba(255,255,255,0) 74%),
    linear-gradient(180deg, var(--sky-0) 0%, var(--sky-0) 18%, var(--sky-1) 45%, var(--sky-2) 64%, var(--sky-3) 82%, #F1F9FF 93%, #F1F9FF 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}
body {
  min-height: 100%; background: transparent;
  color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 30px); }

/* ===== masthead ===== */
.mast {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 22px 0 18px;
}
.mast-logo {
  font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: #fff;
  text-decoration: none; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(16,38,58,.28);
}
.mast-logo em { font-style: normal; font-weight: 400; opacity: .82; }
.mast-nav {
  margin-left: auto; display: flex; gap: clamp(12px, 2.5vw, 22px); align-items: center;
}
.mast-nav a {
  font-family: var(--mono); font-size: 11px; color: #fff; text-decoration: none;
  letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(16,38,58,.3);
  padding: 6px 12px; border-radius: 20px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
}
.mast-nav a:hover { background: rgba(255,255,255,.32); }
@media (max-width: 620px) { .mast-nav a { font-size: 9.5px; padding: 5px 9px; letter-spacing: .06em; } }
.mast-tag {
  font-family: var(--mono); font-size: 10.5px; color: #fff; opacity: .95;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(16,38,58,.25);
}
@media (max-width: 620px) { .mast-tag { display: none; } }

/* ===== homepage ===== */
.lede { padding: clamp(20px, 4vw, 44px) 0 clamp(24px, 3vw, 36px); }.lede h1 {
  font-weight: 800; font-size: clamp(38px, 6.6vw, 78px); line-height: 1;
  letter-spacing: -0.04em; max-width: 20ch; color: #fff; text-wrap: balance;
  text-shadow: 0 2px 10px rgba(16,38,58,.22);
}
.lede h1 em { font-style: normal; opacity: .72; }
.lede p {
  margin-top: 20px; font-family: var(--mono); font-size: 11.5px; color: var(--ink);
  max-width: max-content; letter-spacing: 0.02em; line-height: 1.7;
  background: rgba(255,255,255,.85); padding: 11px 16px; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.20);
}

/* ===== cards ===== */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 470px)  { .grid { grid-template-columns: 1fr; } }

.cell {
  display: flex; flex-direction: column; text-decoration: none;
  padding: 20px 20px 18px; min-height: 186px;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .16s ease;
}
.cell-num {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.14em;
}
.cell h2 {
  font-weight: 800; font-size: 19px; line-height: 1.15; letter-spacing: -0.025em;
  margin: 14px 0 8px; color: var(--ink);
}
.cell p { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.cell-arrow {
  margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 10.5px;
  color: var(--blue); font-weight: 500; letter-spacing: 0.1em;
}
.cell:hover, .cell:focus-visible {
  transform: translateY(-4px); box-shadow: var(--shadow-lift); outline: none;
}
.cell:active { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .cell { transition: none; } }

/* learn cells read differently from tool cells: warm tag for guides, green for case studies */
.cell.guide { border-top: 3px solid var(--sun); }
.cell.guide .cell-num { color: #8A5600; }
.cell.case { border-top: 3px solid var(--pass); }
.cell.case .cell-num { color: var(--pass); }
.cell-top { display: flex; align-items: center; gap: 10px; }
.cell-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.cell-ico svg { width: 19px; height: 19px; }
.cell.guide .cell-ico { background: #EAF4FC; color: var(--blue); }
.cell.case .cell-ico { background: #EAF7EF; color: var(--pass); }
.cell-tag {
  margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ===== hub filters: search + tag chips ===== */
.filters { margin: 6px 0 20px; }
.hub-search {
  width: 100%; max-width: 560px; background: var(--card); border: 0; border-radius: 14px;
  box-shadow: var(--shadow); font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  padding: 13px 16px; outline: none;
}
.hub-search::placeholder { color: var(--ink-3); }
.hub-search:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  border: 1px solid #E7EFF6; background: var(--card); color: var(--ink-2);
  font-family: var(--sans); font-weight: 600; font-size: 12.5px; padding: 7px 14px;
  border-radius: 20px; cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.hub-count {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 12px; width: max-content; max-width: 100%;
  background: rgba(255,255,255,.9); padding: 8px 12px; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.18);
}
.hub-empty {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 26px; color: var(--ink-2); font-size: 15px; margin-bottom: 40px;
}

/* ===== learn banners: big CTA cards for guides and case studies ===== */
.banners {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 0 0 clamp(40px, 6vw, 72px);
}
@media (max-width: 900px) { .banners { grid-template-columns: 1fr; } }
.banner {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: clamp(24px, 3.5vw, 34px) clamp(20px, 3vw, 32px);
  border-top: 5px solid var(--sun);
  display: flex; flex-direction: column; align-items: flex-start;
}
.banner.case { border-top-color: var(--pass); }
.banner-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
  color: #8A5600; background: #FDF0D9;
}
.banner.case .banner-tag { color: var(--pass); background: #EAF7EF; }
.banner h2 {
  font-weight: 800; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.03em;
  color: var(--ink); margin: 14px 0 6px;
}
.banner p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); max-width: 58ch; margin-bottom: 20px; }
.banner-btn {
  display: inline-block; margin-top: auto; text-decoration: none;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 13px;
  letter-spacing: .06em; padding: 14px 24px; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(10,111,191,.35);
  transition: background .14s ease, transform .14s ease;
}
.banner-btn:hover { background: var(--blue-dk); transform: translateY(-1px); }
.banner-btn:active { transform: scale(.98); }

/* ===== tool page ===== */
.tool-head { padding: clamp(16px, 3vw, 34px) 0 20px; }
.tool-head .crumb {
  font-family: var(--mono); font-size: 10.5px; color: #fff; opacity: .85;
  text-decoration: none; letter-spacing: 0.14em; text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(16,38,58,.25);
}
.tool-head .crumb:hover { text-decoration: underline; }
.tool-head h1 {
  font-weight: 800; font-size: clamp(32px, 5.2vw, 58px); line-height: 1.02;
  letter-spacing: -0.038em; margin-top: 10px; max-width: 19ch; color: #fff;
  text-wrap: balance; text-shadow: 0 2px 10px rgba(16,38,58,.22);
}
.tool-head h1 em { font-style: normal; opacity: .72; }
.tool-head .sub {
  margin-top: 13px; font-size: 15px; color: var(--ink); max-width: 72ch;
  line-height: 1.65;
  /* dark ink on a translucent white chip: body-size text cannot hold AA
     contrast as white-on-sky, so the subhead reads as a caption card */
  background: rgba(255,255,255,.9); padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.18);
}

.runbar {
  display: flex; margin: 12px 0 8px; background: var(--card);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; padding: 6px;
}
.runbar + .runbar { margin-top: 0; }
.runbar input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 14px; padding: 12px 14px; outline: none;
}
.runbar input::placeholder { color: var(--ink-3); }
.runbar button {
  border: 0; border-radius: 10px; cursor: pointer; background: var(--blue); color: #fff;
  font-family: var(--sans); font-weight: 800; font-size: 12px; letter-spacing: 0.1em;
  padding: 0 26px; transition: background .14s ease, transform .14s ease;
}
.runbar button:hover { background: var(--blue-dk); }
.runbar button:active { transform: scale(.97); }
.runbar button:disabled { opacity: .55; cursor: wait; }
.hint {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink);
  margin-bottom: 24px; letter-spacing: 0.03em;
  /* dark ink on a translucent white chip: stays readable when it scrolls
     down into the pale horizon of the sky */
  background: rgba(255,255,255,.88); padding: 9px 14px; border-radius: 10px;
  width: max-content; max-width: 100%;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.18);
}

/* ===== results ===== */
.out { margin: 6px 0 44px; }
.status-line {
  font-family: var(--mono); font-size: 12.5px; padding: 14px 16px; border-radius: 14px;
  background: var(--card); color: var(--ink-2); box-shadow: var(--shadow);
}
.status-line.err { color: var(--fail); }

.readout {
  margin-top: 14px; border-radius: var(--r); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.readout-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 12px 18px; color: var(--ink-3); border-bottom: 1px solid #E7EFF6;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.readout-body { overflow-x: auto; }

table.t { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
table.t th {
  text-align: left; font-weight: 500; color: var(--ink-3); font-size: 9.5px;
  letter-spacing: .15em; text-transform: uppercase; padding: 9px 18px;
  border-bottom: 1px solid #E7EFF6;
}
table.t td { padding: 9px 18px; border-bottom: 1px solid #F0F5F9; vertical-align: top; word-break: break-word; color: var(--ink-2); }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #F7FBFE; }
table.t td.num { text-align: right; white-space: nowrap; }

.kv { display: grid; grid-template-columns: minmax(140px, 210px) 1fr; font-family: var(--mono); font-size: 12px; }
.kv > div { padding: 9px 18px; border-bottom: 1px solid #F0F5F9; word-break: break-word; color: var(--ink-2); }
.kv > div:nth-child(odd) { color: var(--ink-3); border-right: 1px solid #F0F5F9; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-right: 0; border-bottom: 0; padding-bottom: 0; }
}

.big-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px;
  margin-top: 14px;
}
.big-stat {
  padding: 16px 18px 17px; border-radius: 15px; background: var(--card); box-shadow: var(--shadow);
}
.big-stat b {
  display: block; font-weight: 800; font-size: 33px; line-height: 1;
  letter-spacing: -0.035em; color: var(--ink);
}
.big-stat span {
  display: block; margin-top: 6px; font-family: var(--mono); font-size: 9px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
}
.big-stat.good b { color: var(--pass); }
.big-stat.bad  b { color: var(--fail); }
.big-stat.warn b { color: var(--warn); }

.pill {
  display: inline-block; font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .09em; padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.pill.ok   { color: #0F6B3A; background: #DFF5E8; }
.pill.bad  { color: #A32B22; background: #FDE6E3; }
.pill.warn { color: #8A5600; background: #FDF0D9; }
.pill.mut  { color: var(--ink-2); background: #EEF4F9; }

.finding {
  display: grid; grid-template-columns: 74px 1fr; padding: 12px 18px; font-size: 14px;
  line-height: 1.5; border-bottom: 1px solid #F0F5F9; color: var(--ink-2);
}
.finding:last-child { border-bottom: 0; }
.finding .sev { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .12em; padding-top: 4px; }
.finding.pass .sev { color: var(--pass); }
.finding.warn .sev { color: var(--warn); }
.finding.fail .sev { color: var(--fail); }
.finding code, .ref code, pre.code {
  font-family: var(--mono); background: #EEF4F9; padding: 1px 5px; border-radius: 4px;
  font-size: 11.5px; color: var(--ink);
}
pre.code {
  font-size: 11.5px; line-height: 1.6; padding: 16px; overflow-x: auto;
  white-space: pre-wrap; word-break: break-word; display: block; background: #F7FAFD;
}

.serp { max-width: 600px; padding: 18px; font-family: arial, sans-serif; }
.serp .s-url { color: #202124; font-size: 12px; line-height: 1.3; }
.serp .s-url span { color: #4d5156; }
.serp .s-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 2px 0 3px; }
.serp .s-desc { color: #4d5156; font-size: 14px; line-height: 1.58; }
.meter { height: 5px; background: #E7EFF6; border-radius: 3px; margin-top: 6px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--pass); }
.meter.over i { background: var(--fail); }

.ogcard { max-width: 480px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); margin: 18px; }
.ogcard img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; display: block; background: #EEF4F9; }
.ogcard .og-host { font-family: var(--mono); font-size: 10px; color: var(--ink-3); padding: 10px 14px 0; letter-spacing: .12em; text-transform: uppercase; }
.ogcard .og-title { font-weight: 700; font-size: 15px; padding: 3px 14px; letter-spacing: -0.01em; }
.ogcard .og-desc { font-size: 13px; color: var(--ink-2); padding: 0 14px 12px; }

/* ===== reference — a white sheet on the sky ===== */
.ref {
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 3.5vw, 40px); margin-bottom: 22px;
}
.ref h2 { font-weight: 800; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.03em; margin-bottom: 12px; color: var(--ink); }
.ref h3 { font-weight: 800; font-size: 14.5px; margin: 22px 0 6px; color: var(--ink); }
.ref p, .ref li { font-size: 15px; color: var(--ink-2); max-width: 72ch; }
.ref ul { padding-left: 1.15em; }
.ref li { margin: 5px 0; }
.ref table.t { border: 1px solid #E7EFF6; border-radius: 12px; overflow: hidden; margin-top: 10px; }
.ref .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 38px; }
@media (max-width: 760px) { .ref .cols { grid-template-columns: 1fr; } }
/* the related-tools grid sits on sky, not on the sheet */
.ref .grid { margin-bottom: 0; }

/* ===== footer ===== */
footer {
  padding: 20px 0 36px; display: flex; flex-wrap: wrap; gap: 9px 22px; align-items: baseline;
}
footer .f-logo { font-weight: 800; font-size: 15px; letter-spacing: -0.03em; text-decoration: none; text-transform: uppercase; color: var(--ink); }
footer .f-logo em { font-style: normal; font-weight: 400; color: var(--ink-3); }
footer a { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); text-decoration: none; letter-spacing: .04em; }
footer a:hover { color: var(--blue); text-decoration: underline; }
footer .f-note { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-left: auto; letter-spacing: .04em; }
@media (max-width: 700px) { footer .f-note { margin-left: 0; } }

.hide { display: none !important; }
.dl-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: .09em; cursor: pointer;
  border: 0; border-radius: 20px; padding: 6px 12px; color: #fff; background: var(--blue);
}
.dl-btn:hover { background: var(--blue-dk); }

/* ===== guides ===== */

/* homepage guides strip: one wide lead card, then the guide cells */
.guides-strip { margin: 4px 0 clamp(40px, 6vw, 72px); }
.strip-title {
  font-weight: 800; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.035em;
  color: var(--ink); margin: 0 0 8px;
}
.strip-sub { font-family: var(--mono); font-size: 11px; color: var(--ink); max-width: 70ch; margin-bottom: 20px; }
.guides-strip .grid { margin-bottom: 0; }
.strip-all {
  display: inline-block; margin-top: 18px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--blue); background: var(--card); padding: 10px 16px; border-radius: 20px;
  box-shadow: var(--shadow);
}
.strip-all:hover { color: var(--blue-dk); box-shadow: var(--shadow-lift); }
.cell .cell-word { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: .06em; }

/* guide page head */
.g-head .g-meta {
  margin-top: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); width: max-content; max-width: 100%;
  background: rgba(255,255,255,.9); padding: 8px 12px; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.18);
}
.g-head .g-meta b { font-weight: 500; color: var(--blue-dk); }

/* the guide sheet: long-form prose on the white card */
.article { padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 52px); }
.article > p, .article li { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); max-width: 74ch; }
.article > p { margin: 0 0 1.35em; }
.article > p:first-child { font-size: 18px; color: var(--ink); }
.article h2 {
  font-weight: 800; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15;
  letter-spacing: -0.03em; color: var(--ink); margin: 2.4em 0 .7em; padding-top: .4em;
  border-top: 2px solid #E7EFF6; scroll-margin-top: 28px;
}
.article h2:first-of-type { border-top: 0; margin-top: .6em; }
.article h3 {
  font-weight: 800; font-size: 18px; letter-spacing: -0.015em; color: var(--ink);
  margin: 1.8em 0 .5em; scroll-margin-top: 28px;
}
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.article li { margin: .5em 0; }
.article a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article a:hover { color: var(--blue-dk); }
.article code, .article pre.code { font-size: 13px; }
.article blockquote {
  margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--sun);
  background: #FFFBF0; border-radius: 0 12px 12px 0; color: var(--ink);
  font-size: 15.5px; line-height: 1.65;
}
.article table.t { margin: 0 0 1.6em; font-size: 12.5px; }
.article table.t td { line-height: 1.6; }
.article .callout {
  margin: 1.6em 0; padding: 14px 18px; border-radius: 12px; font-size: 15px;
  line-height: 1.65; color: var(--ink);
}
.article .callout b { font-weight: 800; }
.article .callout.tip  { background: #EAF4FC; border: 1px solid #BFDDF2; }
.article .callout.warn { background: #FDF0D9; border: 1px solid #F2D9A8; }
.article .callout.pro  { background: #EAF7EF; border: 1px solid #C2E5CF; }

/* table of contents */
.toc {
  background: #F7FAFD; border: 1px solid #E7EFF6; border-radius: 14px;
  padding: 20px 24px; margin: 6px 0 8px;
}
.toc-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; }
.toc li { margin: 7px 0; break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.toc a:hover { color: var(--blue); text-decoration: underline; }
.toc .toc-num { font-family: var(--mono); font-size: 10px; color: var(--blue); margin-right: 9px; }
@media (max-width: 680px) { .toc ol { columns: 1; } }

/* FAQ section on guides */
.article .faq { margin-top: 2.6em; border-top: 2px solid #E7EFF6; padding-top: .4em; }
.article .faq h3 { margin-top: 1.6em; }
.article .faq p { margin-bottom: 1.2em; }

/* prev / next guide navigation */
.guide-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 22px;
}
.guide-nav a {
  display: block; text-decoration: none; background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 16px 20px;
}
.guide-nav .gn-dir { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.guide-nav .gn-title { display: block; margin-top: 6px; font-weight: 800; font-size: 15px; color: var(--ink); letter-spacing: -0.015em; }
.guide-nav a:hover { box-shadow: var(--shadow-lift); }
.guide-nav a:hover .gn-title { color: var(--blue); }
.guide-nav .next { text-align: right; }
@media (max-width: 680px) { .guide-nav { grid-template-columns: 1fr; } }

/* ===== course ===== */
.banner.course { border-top-color: var(--blue-dk); }
.banner.course .banner-tag { color: var(--blue-dk); background: #EAF4FC; }

.course-progress { margin: 0 0 26px; }
.cp-bar { height: 10px; background: var(--card); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.cp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--pass)); border-radius: 8px; transition: width .4s ease; }
.cp-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); margin-top: 8px; width: max-content; max-width: 100%;
  background: rgba(255,255,255,.9); padding: 8px 12px; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16,38,58,.10), 0 6px 16px -6px rgba(16,38,58,.18);
}

.mods { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.mod-row {
  display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 20px 22px; transition: transform .14s ease, box-shadow .14s ease;
}
.mod-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.mod-num { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--blue); flex: 0 0 auto; }
.mod-main { flex: 1; min-width: 0; }
.mod-main h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.mod-main h2 a { color: var(--ink); text-decoration: none; }
.mod-main h2 a:hover { color: var(--blue); }
.mod-main p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.mod-meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--ink-3); margin-top: 8px !important; text-transform: uppercase; }
.mod-status {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em;
  padding: 6px 12px; border-radius: 20px; white-space: nowrap;
  color: var(--ink-2); background: #EEF4F9;
}
.mod-status.pass { color: #0F6B3A; background: #DFF5E8; }
.mod-status.fail { color: #8A5600; background: #FDF0D9; }
.mod-status.open { color: var(--blue); background: #EAF4FC; }
.g-ref { display: inline-block; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; margin: 2px 10px 2px 0; }
.g-ref:hover { color: var(--blue-dk); }
.g-ref-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.reading li { margin: 10px 0; }

/* ===== quiz ===== */
.quiz-shell { margin: 22px 0; }
.quiz-sub { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }
.quiz-result {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 16px 18px;
  border-radius: 14px; margin-bottom: 22px; font-weight: 700; font-size: 15px;
}
.quiz-result.pass { background: #DFF5E8; color: #0F6B3A; }
.quiz-result.fail { background: #FDF0D9; color: #8A5600; }
.quiz-result .banner-btn { font-size: 12px; padding: 10px 18px; margin-left: auto; }
.quiz-q { padding: 20px 0; border-bottom: 1px solid #E7EFF6; }
.quiz-q:last-of-type { border-bottom: 0; }
.quiz-q h3 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin: 0 0 12px; line-height: 1.4; }
.quiz-q .qn { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: .12em; margin-right: 8px; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts button {
  text-align: left; border: 1px solid #E7EFF6; background: #FBFDFF; border-radius: 12px;
  padding: 12px 14px; font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink-2);
  cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.quiz-opts button:hover { border-color: var(--blue); }
.quiz-opts button.picked { border-color: var(--blue); background: #EAF4FC; color: var(--ink); }
.quiz-opts button.right { border-color: var(--pass); background: #EAF7EF; color: #0F6B3A; }
.quiz-opts button.wrong { border-color: var(--fail); background: #FDE6E3; color: #A32B22; }
.quiz-opts button:disabled { cursor: default; opacity: .9; }
.quiz-why {
  margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
  background: #F7FAFD; border: 1px solid #E7EFF6; border-radius: 10px; padding: 10px 14px;
}
.quiz-why b { color: var(--ink); }
.quiz-submit { margin-top: 22px; }

/* ===== certificate ===== */
.cert {
  position: relative; background: #FFFFFF; border: 2px solid var(--ink); border-radius: 6px;
  padding: 28px 30px 26px; margin: 0 auto 26px; max-width: 940px;
  box-shadow: 0 2px 4px rgba(16,38,58,.08), 0 18px 40px -14px rgba(16,38,58,.3);
}
.cert::before {
  content: ""; position: absolute; inset: 12px; border: 3px solid var(--sun); border-radius: 4px;
  pointer-events: none;
}
.cert::after {
  content: ""; position: absolute; inset: 18px; border: 1px solid rgba(16,38,58,.35); border-radius: 3px;
  pointer-events: none;
}
.cert-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #E7EFF6; }
.cert-brand { display: flex; align-items: center; gap: 12px; }
.cert-brand svg { width: 44px; height: 44px; border-radius: 9px; }
.cert-word { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; color: var(--ink); text-transform: uppercase; }
.cert-word b { font-weight: 800; color: var(--blue); }
.cert-issuer { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.cert-title {
  text-align: center; font-weight: 800; font-size: clamp(22px, 3.4vw, 34px);
  letter-spacing: .18em; text-transform: uppercase; color: #075494;
  margin: 30px 0 34px; font-variant: small-caps;
}
.cert-lead { text-align: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.cert-name {
  text-align: center; font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-weight: 700; font-size: clamp(38px, 6vw, 58px); color: var(--ink); margin: 6px 0 10px;
  line-height: 1.15; overflow-wrap: anywhere;
}
.cert-line { width: 300px; max-width: 60%; height: 3px; background: var(--sun); margin: 14px auto 18px; border-radius: 2px; }
.cert-body { text-align: center; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); max-width: 640px; margin: 0 auto; font-style: italic; }
.cert-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; padding-top: 18px; border-top: 1px solid #E7EFF6; }
.cert-meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; line-height: 1.7; }
.cert-meta b { display: block; color: var(--ink-2); letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.cert-seal { display: flex; align-items: center; justify-content: center; }
.cert-seal svg { width: 56px; height: 56px; }
.cert-sig { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 180px; }
.sig-line { display: block; width: 180px; border-bottom: 1px solid var(--ink-2); margin-top: 22px; }
.sig-cap { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.cert-verify {
  text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--ink-3); margin-top: 20px; padding-top: 14px; border-top: 1px solid #E7EFF6;
  text-transform: uppercase;
}
.cert-invalid { text-align: center; }
.cert-invalid .cert-title { margin-bottom: 14px; }
.cert-actions { max-width: 940px; margin: 0 auto 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cert-actions .ok-note { flex: 1 1 260px; font-size: 14px; color: var(--ink-2); }
.cert-actions .banner-btn { border: 0; cursor: pointer; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html { background: #fff !important; }
  body { background: #fff; }
  .mast, .tool-head, footer, .cert-actions, .hub-search, .chips, .hub-count, .hub-empty { display: none !important; }
  .cert { max-width: none; box-shadow: none; margin: 0; }
}

/* ===== raw input forms (generator tools) ===== */
.raw-wrap { margin: 12px 0 8px; }
.raw-area {
  width: 100%; min-height: 120px; background: var(--card); border: 0; border-radius: 14px;
  box-shadow: var(--shadow); font-family: var(--mono); font-size: 13px; color: var(--ink);
  padding: 14px 16px; resize: vertical; outline: none; line-height: 1.6;
}
.raw-area:focus-visible, .raw-field:focus-visible, .raw-select:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.raw-field {
  width: 100%; background: var(--card); border: 0; border-radius: 14px; box-shadow: var(--shadow);
  font-family: var(--mono); font-size: 14px; color: var(--ink); padding: 13px 16px; outline: none;
}
.raw-field::placeholder, .raw-area::placeholder { color: var(--ink-3); }
.raw-select {
  width: 100%; background: var(--card); border: 0; border-radius: 14px; box-shadow: var(--shadow);
  font-family: var(--sans); font-weight: 600; font-size: 13.5px; color: var(--ink); padding: 12px 16px; outline: none;
}
.raw-check { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.raw-check input { accent-color: var(--blue); width: 16px; height: 16px; }
.runbtn {
  border: 0; border-radius: 10px; cursor: pointer; background: var(--blue); color: #fff;
  font-family: var(--sans); font-weight: 800; font-size: 12px; letter-spacing: .1em;
  padding: 13px 26px; justify-self: start; transition: background .14s ease;
}
.runbtn:hover { background: var(--blue-dk); }
.runbtn:active { transform: scale(.97); }
.raw-copy {
  font-family: var(--mono); font-size: 10px; letter-spacing: .09em; cursor: pointer;
  border: 0; border-radius: 20px; padding: 6px 12px; color: #fff; background: var(--blue);
}
.raw-copy:hover { background: var(--blue-dk); }

.raw-preview { max-width: 220px; border-radius: 12px; box-shadow: var(--shadow); display: block; }
.raw-range { width: 100%; max-width: 320px; accent-color: var(--blue); }
