/* Ascent Digital Tools — shared styles (Docs/DESIGN_SYSTEM.md).
   Owner-selected palette (design correction, 2026-10-22): cobalt #3155D9, violet #8057D9, turquoise #27B9B1, off-white #F7F8FF.
   Colour roles: cobalt = primary actions and links; violet = emphasis (labels, highlights, steps, secondary actions, focus);
   turquoise = supporting accents (icons, badges, tiles, decoration). Turquoise is never used for text or behind white text;
   its text shade is #0B6964. Tool stylesheets repeat the token values they need because their contrast tests read them;
   tests/site/ checks that every colour in site/ is an approved token. Measured contrast: Docs/DESIGN_SYSTEM.md. */
:root {
  --ink: #0F172A;            /* text: 17.85:1 on white, 16.85:1 on --bg */
  --muted: #475569;          /* hints: 7.58:1 on white, 7.15:1 on --bg, ≥ 6.55:1 on every tint */
  --bg: #F7F8FF;             /* owner-selected soft off-white */
  --surface: #FFFFFF;
  --tint: #EAF0FF;           /* cobalt tint */
  --primary: #3155D9;        /* cobalt: white text 6.12:1; as text 6.12:1 on white, 5.78:1 on --bg */
  --primary-hover: #2443B8;  /* approved cobalt hover: white text 8.17:1 */
  --violet: #8057D9;         /* violet: white text 4.90:1; as text 4.90:1 on white, 4.63:1 on --bg */
  --violet-ink: #6A3FC8;     /* approved violet text on violet tint: 5.75:1 on --violet-soft */
  --violet-soft: #F1ECFC;
  --teal: #27B9B1;           /* turquoise: fills and decoration only (2.42:1 with white); --ink on it 7.36:1 */
  --teal-ink: #0B6964;       /* approved turquoise text: 6.52:1 on white, 5.87:1 on --teal-soft */
  --teal-soft: #E3F7F6;
  --field-line: #64748B;     /* field borders 4.76:1 on white, 4.49:1 on --bg */
  --line: #E2E8F0;           /* decorative lines only */
  --focus: #8057D9;          /* violet 3px ring with a 2px white gap: 4.90:1 on white, 4.63:1 on --bg */
  --success-ink: #166534;
  --success-bg: #DCFCE7;
  --error-ink: #B42318;
  --error-bg: #FEF3F2;
  --warning-ink: #8A4B00;
  --warning-bg: #FFFAEB;
  --disabled-ink: #64748B;
  --disabled-bg: #E2E8F0;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 8px 28px rgba(49, 85, 217, .08);
  --shadow-hover: 0 14px 34px rgba(128, 87, 217, .16);
  --gradient-brand: linear-gradient(90deg, var(--primary), var(--violet) 55%, var(--teal));
  --max: 1120px;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
body > main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Skip link: hidden until focused. */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--surface); color: var(--primary); padding: 10px 14px; border-radius: 8px; font-weight: 650; }
.skip-link:focus { top: 8px; box-shadow: var(--shadow); }

/* Shared header: white, with the three-colour brand line underneath. */
.st-header { background: var(--surface); }
.st-header::after { content: ""; display: block; height: 3px; background: var(--gradient-brand); }
.st-header-inner { max-width: var(--max); margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.st-brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.st-brand:hover { color: var(--violet-ink); }
.st-nav ul, .st-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.st-nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.st-nav-link:hover { color: var(--violet-ink); background: var(--violet-soft); }
.st-nav-link[aria-current="page"] { color: var(--primary); background: linear-gradient(90deg, var(--violet), var(--teal)) left calc(100% - 6px) / 100% 3px no-repeat; }
/* Phones and small tablets: the brand on its own row, the five links spread across one row beneath it. */
@media (max-width: 599px) {
  .st-header-inner { padding: 8px 16px 4px; gap: 0; }
  .st-nav { width: 100%; }
  .st-nav ul { justify-content: space-between; gap: 0; flex-wrap: nowrap; }
  .st-nav-link { padding: 0 8px; }
  .st-nav li:first-child .st-nav-link { padding-left: 0; }
  .st-nav li:last-child .st-nav-link { padding-right: 0; }
}
@media (max-width: 374px) { .st-nav-link { padding: 0 4px; font-size: .9rem; } }

/* Shared footer: brand and description, then four labelled link groups (Stage 7 header and footer pass). */
.st-footer { margin-top: 56px; background: var(--surface); color: var(--muted); font-size: .92rem; }
.st-footer::before { content: ""; display: block; height: 3px; background: var(--gradient-brand); }
.st-footer-inner { max-width: var(--max); margin: 0 auto; padding: 32px 16px 36px; display: grid; gap: 28px 48px; grid-template-columns: minmax(0, 1fr); }
.st-footer-about { max-width: 46ch; }
.st-footer-brand { margin: 0 0 8px; color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.st-footer-desc { margin: 0 0 10px; line-height: 1.55; }
.st-footer-note { margin: 0; }
.st-footer-nav { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.st-footer-heading { margin: 0 0 4px; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-ink); }
.st-footer .st-footer-group ul { display: grid; gap: 0; }
.st-footer a { display: inline-flex; align-items: center; min-height: 32px; padding: 0; color: var(--primary); text-underline-offset: 3px; }
.st-footer a:hover { color: var(--violet-ink); }
.st-footer-empty { margin: 2px 0 0; font-size: .85rem; }
@media (min-width: 640px) { .st-footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .st-footer-inner { grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); }
  .st-footer-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Page container */
.st-main { width: 100%; max-width: var(--max); margin: 0 auto; padding: 32px 16px 0; }

/* Homepage hero: cobalt-to-violet gradient behind white text (≥ 4.97:1 everywhere), with a soft turquoise glow. */
.st-hero { position: relative; overflow: hidden; margin: 0 0 40px; padding: clamp(28px, 6vw, 56px); border-radius: 24px; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #FFFFFF; box-shadow: 0 18px 44px rgba(128, 87, 217, .25); }
.st-hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(39, 185, 177, .55), rgba(39, 185, 177, 0) 70%); pointer-events: none; }
.st-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: 18%; bottom: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(39, 185, 177, .35), rgba(39, 185, 177, 0) 70%); pointer-events: none; }
.st-hero > * { position: relative; }
.st-hero-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-ink); font-size: .82rem; font-weight: 750; letter-spacing: .02em; }
.st-hero-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.st-hero h1 { margin: 0 0 14px; max-width: 18ch; font-size: clamp(2rem, 5.4vw, 3.2rem); }
.st-highlight { background: linear-gradient(90deg, var(--teal), rgba(39, 185, 177, .45)) left 92% / 100% .14em no-repeat; padding-bottom: .04em; }
.st-hero p { margin: 0; max-width: 60ch; font-size: 1.08rem; color: #FFFFFF; }
.st-hero .st-hero-badge { color: var(--teal-ink); font-size: .82rem; } /* must win over .st-hero p: #0B6964 on #E3F7F6, 5.87:1 */

/* Page intro (tools directory): soft violet-to-turquoise tint panel. */
.st-page-intro { margin: 0 0 32px; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--violet-soft), var(--teal-soft)); }
.st-eyebrow { margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-ink); }
.st-page-intro h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4.5vw, 2.5rem); }
.st-page-intro p { margin: 0; max-width: 70ch; color: var(--muted); }

/* Section titles with a violet-to-turquoise accent */
.st-section-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 1.4rem; }
.st-section-title::before { content: ""; width: 28px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--violet), var(--teal)); }

/* Tool cards: 1 column on phones, 2 on tablets, 3 on desktop */
.st-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .st-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .st-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.st-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--gradient-brand); }
.st-card:hover { border-color: var(--teal); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.st-card-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px rgba(39, 185, 177, .35); }
.st-card-icon svg { width: 24px; height: 24px; }
.st-card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.st-card p { margin: 0; color: var(--muted); }
.st-card-link { margin-top: auto; padding-top: 8px; font-weight: 650; color: var(--primary); }
.st-card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); } /* whole card clickable */

/* "How the tools work": one tile per accent colour */
.st-points { margin: 40px 0 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .st-points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-point { padding: 18px 20px; border-radius: var(--radius); border-left: 4px solid var(--line); }
.st-point h3 { margin: 0 0 4px; font-size: 1rem; }
.st-point p { margin: 0; color: var(--muted); font-size: .95rem; }
.st-point--cobalt { background: var(--tint); border-left-color: var(--primary); }
.st-point--cobalt h3 { color: var(--primary-hover); }
.st-point--violet { background: var(--violet-soft); border-left-color: var(--violet); }
.st-point--violet h3 { color: var(--violet-ink); }
.st-point--teal { background: var(--teal-soft); border-left-color: var(--teal); }
.st-point--teal h3 { color: var(--teal-ink); }

/* Informational pages (About, Contact, Privacy Policy, Terms of Use, 404) */
.st-content { max-width: 800px; }
.st-content { overflow-wrap: anywhere; } /* Stage 6: long unbroken strings (the email address) wrap under WCAG 1.4.12 text spacing at 320 px */
.st-panel { position: relative; overflow: hidden; margin: 0 0 20px; padding: clamp(20px, 4vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.st-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gradient-brand); }
.st-prose h2 { margin: 28px 0 8px; font-size: 1.25rem; color: var(--violet-ink); }
.st-prose h2:first-child { margin-top: 0; }
.st-prose h3 { margin: 18px 0 6px; font-size: 1.05rem; }
.st-prose p, .st-prose li { max-width: 72ch; }
.st-prose ul, .st-prose ol { padding-left: 22px; }
.st-prose li + li { margin-top: 6px; }
.st-meta { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.st-pending { padding: 1px 6px; border-radius: 6px; background: var(--warning-bg); color: var(--warning-ink); font-weight: 650; }
.st-notice { margin: 0 0 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--violet-soft); border-left: 4px solid var(--violet); }
.st-notice h2 { margin: 0 0 6px; font-size: 1.05rem; color: var(--violet-ink); }
.st-notice p, .st-notice ul { margin: 0; }
.st-notice ul { margin-top: 6px; padding-left: 22px; }
.st-facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .st-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-fact { min-width: 0; padding: 16px 18px; border-radius: var(--radius); background: var(--teal-soft); border-left: 4px solid var(--teal); }
.st-fact h3 { margin: 0 0 6px; font-size: 1rem; color: var(--teal-ink); }
.st-fact p { margin: 0; font-size: .95rem; }
.st-fact p + p { margin-top: 6px; }
.st-email-card { display: grid; gap: 6px; margin: 8px 0 20px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--tint); border-left: 4px solid var(--primary); }
.st-email-label { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 650; }
.st-email { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(1.1rem, 4vw, 1.4rem); font-weight: 750; color: var(--primary); overflow-wrap: anywhere; }
.st-email:hover { color: var(--primary-hover); }
.st-links { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.st-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--violet); color: var(--violet); font-weight: 650; text-decoration: none; background: var(--surface); }
.st-links a:hover { background: var(--violet-soft); color: var(--violet-ink); }
.st-links a.st-primary-link { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }
.st-links a.st-primary-link:hover { background: var(--primary-hover); color: #FFFFFF; }
/* Stage 6: related-tools links at the end of each tool page (SEO_CONTENT_REQUIREMENTS, tool page item 7) */
.st-related { margin: 40px 0 32px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.st-related { grid-column: 1 / -1; } /* full width where <main> is a grid (Robots.txt, Keyword Density); each tool <main> already sets the page width */
.st-related h2 { margin: 0 0 12px; font-size: 1.1rem; color: var(--violet-ink); }
.st-related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.st-related-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--violet); color: var(--violet-ink); font-weight: 650; text-decoration: none; background: var(--surface); }
.st-related-list a:hover { background: var(--violet-soft); }
/* Guides (Stage 7 infrastructure; used only once a guide is published by scripts/build-guides.js) */
.st-breadcrumbs ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .92rem; color: var(--muted); }
.st-breadcrumbs li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.st-breadcrumbs a { display: inline-flex; align-items: center; min-height: 24px; }
.st-article-header { margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.st-article-header h1 { margin: 4px 0 8px; font-size: clamp(1.7rem, 4.5vw, 2.3rem); line-height: 1.2; }
.st-article-header .st-meta { margin: 0; }
.st-article pre { overflow-x: auto; padding: 12px 14px; border-radius: var(--radius); background: var(--tint); }
.st-article blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--violet); background: var(--violet-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.st-article table { width: 100%; border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
.st-article th, .st-article td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.st-article th { background: var(--tint); }
/* Blog index (/guides/): one card per published post, newest first; the same card language as the homepage tool cards. */
.st-content-wide { max-width: none; }
.st-post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.st-post-card { min-width: 0; }
.st-post-card article { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.st-post-card article::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--gradient-brand); }
.st-post-category { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); }
.st-post-card h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.st-post-card h2 a { color: var(--ink); text-decoration: none; }
.st-post-card h2 a:hover { color: var(--violet-ink); text-decoration: underline; }
.st-post-excerpt { margin: 0; color: var(--muted); }
.st-post-card .st-meta { margin: 0; }
.st-post-more { margin-top: auto; padding-top: 6px; font-weight: 650; color: var(--primary); align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; }
@media (min-width: 640px) { .st-post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .st-post-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.st-guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.st-prose .st-guide-list, .st-prose .st-links { padding-left: 0; } /* not indented like article lists */
.st-prose .st-links li + li, .st-prose .st-guide-list li + li { margin-top: 0; } /* the row or grid gap spaces them; no extra offset */
.st-guide-list li { padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.st-guide-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.st-guide-list a { font-weight: 700; font-size: 1.05rem; }
.st-guide-list p { margin: 4px 0 0; }
.st-404-code { margin: 0; font-size: clamp(3.5rem, 14vw, 6rem); font-weight: 850; line-height: 1; color: var(--violet); letter-spacing: -.04em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .st-card:hover { transform: none; } }
@media (forced-colors: active) { .st-card, .st-point, .st-notice, .st-fact, .st-email-card { border: 1px solid CanvasText; } .st-panel::before { background: CanvasText; } .st-header::after, .st-footer::before, .st-card::before { background: CanvasText; } .st-hero::before, .st-hero::after { display: none; } }
