/* ServiceTagPro theme. Colours come from the ServiceTag icon pack (web/static/brand/: the
   ServiceTagPro mark, and the free ServiceTag app's mark beside it): warm ivory #F7F5EF,
   ServiceTag blue #1F4E78, slate #52606A, with the wordmark navy for text.
   Every pairing below meets WCAG AA in both schemes. */
:root {
  color-scheme: light;
  --bg: #f7f5ef;          /* ivory */
  --surface: #ffffff;
  --surface-alt: #efece3; /* ivory, one step deeper: alternate bands */
  --fg: #14304d;          /* wordmark navy */
  --muted: #52606a;       /* slate */
  --accent: #1f4e78;      /* ServiceTag blue */
  --on-accent: #ffffff;
  --border: rgb(20 48 77 / 14%);
  --ok: #1a7f37;
  --fail: #b42318;
  --radius: .75rem;
  --shadow: 0 1px 2px rgb(20 48 77 / 6%), 0 8px 24px rgb(20 48 77 / 6%);
  --glow: rgb(31 78 120 / 16%);
  --grid-dot: rgb(20 48 77 / 11%);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1a24;
    --surface: #16232f;
    --surface-alt: #13202b;
    --fg: #eef1f4;
    --muted: #a9b4bd;
    --accent: #8db7df;
    --on-accent: #0f1a24;
    --border: rgb(238 241 244 / 12%);
    --ok: #4ac26b;
    --fail: #ff7b72;
    --shadow: none;
    --glow: rgb(141 183 223 / 14%);
    --grid-dot: rgb(238 241 244 / 8%);
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: .5rem; top: -4rem; z-index: 1; padding: .5rem .75rem; background: var(--surface); border: 2px solid var(--accent); }
.skip-link:focus { top: .5rem; }
main:focus { outline: none; }

/* Shell */
.site-header, .site-footer { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: .75rem 1rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.site-footer { border-top: 1px solid var(--border); }
.brand { display: inline-flex; gap: .5rem; align-items: center; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; text-decoration: none; color: var(--fg); }
.brand img { display: block; border-radius: .45rem; }
.content { max-width: 56rem; margin: 0 auto; padding: 1rem; }
.full-bleed > .messages { max-width: 68rem; margin: 1rem auto 0; padding: 0 1rem; }

/* Shared elements */
.muted { color: var(--muted); }
.choice { display: block; margin: .25rem 0; }
.inline { display: inline; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
button.primary, a.button { display: inline-block; background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); border-radius: .5rem; padding: .55rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
a.button.secondary { background: transparent; color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin: 1rem 0; }
.card h2, .card h3 { margin-top: 0; }
.status dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.status .ok { color: var(--ok); } .status .fail { color: var(--fail); }
.htmx-indicator { opacity: 0; transition: opacity .2s; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.messages { list-style: none; padding: 0; } .messages li { padding: .5rem .75rem; border-left: 3px solid var(--accent); background: var(--surface); margin-bottom: .5rem; }

/* Public homepage (#97) */
.band { padding: 3.5rem 0; }
.band.alt { background: var(--surface-alt); }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
.narrow > * { max-width: 46rem; }  /* readable lines, same left edge as the wide sections */
.band h2 { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
/* Hero: binder-paper dot grid and a brand-blue glow behind the art, both fading out
   before they reach the text. */
.hero { position: relative; overflow: hidden; padding: 3.5rem 0 4.5rem; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero::before { background: radial-gradient(circle at 1px 1px, var(--grid-dot) 1.2px, transparent 0) 0 0 / 22px 22px; -webkit-mask-image: linear-gradient(to left, #000 10%, transparent 75%); mask-image: linear-gradient(to left, #000 10%, transparent 75%); }
.hero::after { background: radial-gradient(34rem 26rem at 82% 45%, var(--glow), transparent 70%); }
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { margin: .5rem 0 1rem; font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.4rem); letter-spacing: -.02em; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero h1 { background: linear-gradient(100deg, var(--fg) 35%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .hero h1::selection { -webkit-text-fill-color: var(--fg); }
}
@media (forced-colors: active) { .hero h1 { background: none; -webkit-text-fill-color: currentColor; } }
.hero .eyebrow::before { content: ""; display: inline-block; width: 1.75rem; height: 2px; margin-right: .6rem; vertical-align: middle; background: var(--accent); }
.lead strong { color: var(--accent); }
/* The art: the asset at the centre, the people around it linked to it, knowledge radiating. */
.hero-art { display: none; position: relative; width: 23rem; aspect-ratio: 1; }
.hero-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-art img { position: absolute; left: 50%; top: 50%; width: 42%; height: auto; transform: translate(-50%, -50%); border-radius: 22%; filter: drop-shadow(0 18px 30px rgb(20 48 77 / 24%)); }
.hero-art .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.hero-art .ring-1 { stroke-opacity: .3; }
.hero-art .ring-2 { stroke-opacity: .28; stroke-dasharray: 1 8; stroke-linecap: round; stroke-width: 3; }
.hero-art .ring-3 { stroke-opacity: .1; stroke-width: 1; }
.hero-art .links line { stroke: var(--accent); stroke-opacity: .18; stroke-width: 1.5; }
.hero-art .node { fill: var(--accent); }
.hero-art .node-slate { fill: var(--muted); }
.hero-art .halo { fill: var(--accent); fill-opacity: .12; animation: breathe 5s ease-in-out infinite; }
.hero-art .halo:nth-child(4n+3) { animation-delay: -2.5s; }
.hero-art .spark { fill: var(--accent); fill-opacity: .5; }
.hero-art .links, .hero-art .orbit, .hero-art .ring-2 { transform-origin: 200px 200px; animation: drift 120s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { fill-opacity: .26; } }
@media (prefers-reduced-motion: reduce) { .hero-art .links, .hero-art .orbit, .hero-art .ring-2, .hero-art .halo { animation: none; } }
@media (max-width: 51.99rem) {  /* no art on narrow screens: keep the texture off the copy */
  .hero::before { -webkit-mask-image: linear-gradient(to bottom left, #000, transparent 40%); mask-image: linear-gradient(to bottom left, #000, transparent 40%); }
  .hero::after { background: radial-gradient(20rem 14rem at 100% 0%, var(--glow), transparent 70%); }
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr auto; gap: 3rem; }
  .hero-art { display: block; }
}
.eyebrow, .kicker { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.kicker { font-size: .75rem; margin-bottom: .25rem; }
.lead { font-size: 1.2rem; max-width: 42rem; }
.note { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.grid > .card { margin: 0; }
.grid .card h3 { color: var(--accent); }
/* Each product card carries its app icon at the right of its heading. */
.app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.app-icon { flex: none; width: 64px; height: 64px; border-radius: 22%; box-shadow: var(--shadow); }
.layers .card { border-top: 4px solid var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.chips li { padding: .3rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .95rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.points li { position: relative; padding-left: 1.5rem; }
.points li::before { content: ""; position: absolute; left: .25rem; top: .6em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
/* The call to action keeps the brand blue in both schemes. */
.cta-band { background: #1f4e78; color: #ffffff; }
.cta-band a { color: #ffffff; }
.cta-band a.button { background: #f7f5ef; border-color: #f7f5ef; color: #14304d; }
/* "Choose your path" cards (#97): the whole card is the link, stretched from its heading. */
svg.icon { width: 1.5rem; height: 1.5rem; }
.paths { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 1rem; }
.path-card { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.path-card:hover, .path-card:focus-within { transform: translateY(-2px); border-color: var(--accent); }
.path-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.path-card h3 { margin: 0; font-size: 1.1rem; }
.path-card h3 a { color: var(--fg); text-decoration: none; }
.path-card h3 a:focus-visible { outline: none; }
.path-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.path-card p { margin: 0; color: var(--muted); }
.path-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .75rem; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.path-more { margin-top: auto; padding-top: .25rem; color: var(--accent); font-weight: 600; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .path-card { transition: none; } .path-card:hover, .path-card:focus-within { transform: none; } }
/* Audience pages: the audience's icon on the brand tile at the centre of the hero art. */
.hero-tile { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; transform: translate(-50%, -50%); border-radius: 22%; background: #f7f5ef; color: #1f4e78; box-shadow: 0 18px 30px rgb(20 48 77 / 24%); }
.hero-tile svg.icon { width: 52%; height: auto; aspect-ratio: 1; stroke-width: 1.5; }
/* An illustrative story, told as a timeline. */
.story { list-style: none; margin: 1.5rem 0 0; padding: 0; position: relative; display: grid; gap: 1.25rem; }
.story::before { content: ""; position: absolute; left: .5rem; top: .6rem; bottom: .6rem; width: 2px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.story li { position: relative; padding-left: 2.25rem; }
.story li::before { content: ""; position: absolute; left: 0; top: .3rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--surface-alt); border: 3px solid var(--accent); }
.story strong { display: block; color: var(--accent); }
/* What a ServiceTag is, in one line (#97). */
.tag-hint { display: flex; gap: .6rem; align-items: flex-start; max-width: 42rem; margin: 1.25rem 0 0; padding: .7rem .9rem; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: .6rem; background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: .95rem; }
.tag-hint-icon { flex: none; color: var(--accent); line-height: 0; padding-top: .1rem; }
.tag-hint a { white-space: nowrap; font-weight: 600; }
.guides .kicker { margin-bottom: -.25rem; }
.path-card.is-current { border-color: var(--accent); box-shadow: none; }
.path-card.is-current:hover { transform: none; }
/* Guides: readable long-form text. */
.guide-hero { padding-bottom: 2.5rem; }
.guide-body { padding-top: 2rem; }
.prose h2 { margin: 2.25rem 0 .5rem; font-size: 1.4rem; }
.prose h3 { margin: 1.5rem 0 .25rem; font-size: 1.1rem; color: var(--accent); }
.prose li { margin-bottom: .35rem; }
.callout { margin: 1.5rem 0; padding: 1rem 1.15rem; border-left: 4px solid var(--accent); border-radius: .5rem; background: var(--surface); }
.table-scroll { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--surface); border-radius: .5rem; overflow: hidden; }
.prose th, .prose td { padding: .6rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.flow { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1.4rem; }
.flow li { position: relative; margin: 0; padding: .55rem .9rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); font-weight: 600; }
.flow li + li::before { content: "↓"; position: absolute; top: -1.35rem; left: 1.1rem; line-height: 1.3rem; color: var(--accent); font-weight: 700; }
.roadmap { margin-top: 1.5rem; }
.badge { display: inline-block; margin-right: .4rem; padding: .1rem .55rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: .1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
