/* Shared styles for the inner pages (services and guides). The home page keeps its own styles in
   index.html; these match its tokens, type and header so the site reads as one. */
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --navy: #112027; --navy-2: #1B2E37; --red: #D6351F; --mist: #F0F1F3;
  --white: #FFFFFF; --slate: #55626B; --line: #D5DADE;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--mist); color: var(--navy);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.6; font-weight: 500;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
p { margin: 0; }
.wrap { width: min(80rem, 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: 0.5rem 1rem; z-index: 99; }

/* ---------- Header and menu (shared with the home page) ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(240, 241, 243, 0.94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1rem; }
.brand { line-height: 0; }
.brand img { height: 2.2rem; width: auto; }
.nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.95rem; font-weight: 700; }
.nav a { text-decoration: none; }
.nav a:not(.pill):hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.pill { background: var(--navy); color: var(--white); padding: 0.6rem 1.1rem; border-radius: 2px; }
.pill:hover { background: var(--navy-2); }
.menu-btn { display: none; }
@media (max-width: 72rem) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; border: 2px solid var(--navy); border-radius: 2px;
    background: transparent; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer;
  }
  .menu-btn i { width: 0.7rem; height: 0.7rem; background: var(--navy); transition: transform 0.25s, background-color 0.25s; }
  .menu-btn[aria-expanded="true"] i { transform: rotate(45deg); background: var(--red); }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.5rem 1.5rem; background: var(--mist); box-shadow: 0 1px 0 var(--line), 0 18px 30px -20px rgba(17, 32, 39, 0.35);
    font-size: 1.15rem;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
  .nav .pill { margin-top: 1rem; text-align: center; border-bottom: 0; }
}

/* ---------- Page hero ---------- */
.crumbs { padding-top: 1.5rem; font-size: 0.9rem; font-weight: 700; color: var(--slate); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { margin-inline: 0.5rem; color: var(--red); }
.page-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); }
.page-hero .wrap { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 0.98; letter-spacing: -0.045em; max-width: 15ch; }
.page-hero .lede { margin-top: 1.6rem; max-width: 52ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--slate); }
.page-hero .meta { margin-top: 1.4rem; font-size: 0.92rem; font-weight: 700; color: var(--slate); }
/* The mark, opened: the page's one piece of decoration */
.hero-mark { width: 100%; max-width: 15rem; justify-self: end; }
.hero-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .page-hero h1, .page-hero .lede { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .page-hero .lede { animation-delay: 0.08s; }
  .hero-mark .l1 { animation: part-l 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
  .hero-mark .l2 { animation: part-r 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
  .hero-mark .sq { transform-box: fill-box; transform-origin: center; animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(1.2rem); } }
@keyframes part-l { from { transform: translate(14px, -9px); } }
@keyframes part-r { from { transform: translate(-14px, 9px); } }
@keyframes pop { from { transform: scale(0); } }

/* ---------- Body copy ---------- */
.body { padding-bottom: clamp(4rem, 9vw, 7rem); }
.body .wrap { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.toc { position: sticky; top: 6rem; font-size: 0.95rem; }
.toc strong { display: block; margin-bottom: 0.8rem; font-weight: 800; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.toc a { text-decoration: none; color: var(--slate); font-weight: 600; }
.toc a:hover { color: var(--navy); text-decoration: underline; }
.prose { max-width: 44rem; font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 3.2rem; font-size: clamp(1.7rem, 3vw, 2.3rem); display: flex; gap: 0.9rem; align-items: baseline; scroll-margin-top: 6rem; }
.prose h2::before { content: ""; flex: none; width: 0.7rem; height: 0.7rem; background: var(--red); transform: translateY(-0.2em); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; font-size: 1.3rem; letter-spacing: -0.02em; }
.prose p, .prose li { color: #26343B; }
.prose strong { color: var(--navy); font-weight: 800; }
.prose a { text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; font-weight: 700; }
.prose ul, .prose ol { padding-left: 0; list-style: none; display: grid; gap: 0.7rem; }
.prose ul > li { display: grid; grid-template-columns: 0.7rem 1fr; gap: 0.9rem; }
.prose ul > li::before { content: ""; width: 0.5rem; height: 0.5rem; margin-top: 0.62em; background: var(--navy); }
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.9rem; }
.prose ol > li::before { content: counter(step); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; background: var(--navy); color: var(--white); font-weight: 800; font-size: 0.95rem; }
.prose ol > li:last-child::before { background: var(--red); }
/* A boxed note, for the one thing on a page that matters most */
.note { padding: 1.4rem 1.6rem; background: var(--white); border-left: 4px solid var(--red); }
.note p + p { margin-top: 0.7rem; }
/* Sources under a guide */
.sources { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.95rem; }
.sources h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.sources h2::before { display: none; }
.sources ol { counter-reset: none; gap: 0.5rem; }
.sources ol > li { display: block; color: var(--slate); }
.sources ol > li::before { display: none; }
.sources a { font-weight: 600; word-break: break-word; }
.updated { font-size: 0.95rem; color: var(--slate); }

/* Cards linking to other pages */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { display: block; padding: 1.4rem 1.5rem 1.6rem; background: var(--white); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.card:hover { border-color: var(--navy); transform: translateY(-2px); }
.card strong { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.card span { display: block; margin-top: 0.5rem; color: var(--slate); font-size: 1rem; line-height: 1.5; }
.card::after { content: ""; display: block; width: 0.6rem; height: 0.6rem; margin-top: 1.1rem; background: var(--red); }

/* ---------- Talk to us ---------- */
.cta { background: var(--navy); color: var(--white); padding-block: clamp(4rem, 9vw, 6.5rem); }
.cta .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem 4rem; align-items: end; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; }
.cta p { margin-top: 1.2rem; color: rgba(255, 255, 255, 0.75); font-size: 1.15rem; max-width: 46ch; }
.btn { display: inline-block; padding: 1rem 1.45rem; font-weight: 800; text-decoration: none; border: 2px solid var(--white); border-radius: 2px; background: var(--white); color: var(--navy); }
.btn:hover { background: transparent; color: var(--white); }

/* ---------- Footer (shared with the home page) ---------- */
.site-foot { background: var(--mist); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.95rem; }
.site-foot .cols { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2rem; }
.site-foot img { height: 2rem; width: auto; display: block; }
.site-foot .about { margin-top: 1rem; color: var(--slate); max-width: 28ch; }
.site-foot h2 { font-size: 0.95rem; letter-spacing: 0; margin-bottom: 0.9rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-foot ul a { text-decoration: none; color: var(--slate); font-weight: 600; }
.site-foot ul a:hover { color: var(--navy); text-decoration: underline; }
.site-foot .base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--slate); }

@media (max-width: 60rem) {
  .page-hero .wrap, .body .wrap, .cta .wrap { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .toc { position: static; padding: 1.2rem 1.4rem; background: var(--white); border: 1px solid var(--line); }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .site-foot .cols > div:first-child { grid-column: 1 / -1; }
}
