/*
  Cybintec "Signal" theme: a datasheet look with one blue signal line through the page.
  Brand: docs/cybintec_brand_pack (graphite #12161C, cool gray, soft white, blue only as the functional accent,
  Manrope; mono only for technical labels). Everything is CSS on plain semantic content (header/h1, .lead, .cta,
  section > h2 + ul): editors keep editing ordinary text, no script is needed to read any of it.
*/
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sg-graphite: #12161c;
  --sg-gray: #8e96a3;
  --sg-soft: #f5f7fa;
  --sg-white: #fff;
  --sg-blue: #3b82f6;          /* brand accent: lines, nodes, large graphics, text on graphite (4.8:1) */
  --sg-blue-text: #2563eb;     /* text and buttons on light surfaces (>= 4.5:1) */
  --sg-focus-dark: #93c5fd;
  --sg-muted-on-light: #4b5563;
  --sg-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sg-content: 70rem;
  --sg-rail-x: .4rem;
  --sg-rail-gap: .6rem;
  /* The brand C ring (open aperture) as a mask, so one shape serves the hero, the chip and the buttons. */
  --sg-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='140 140 744 744'%3E%3Cpath fill-rule='evenodd' d='M512 140C306.551 140 140 306.551 140 512C140 717.449 306.551 884 512 884C631.473 884 737.783 827.646 805.865 740.093C835.332 702.201 828.525 647.691 790.663 618.257C752.801 588.823 698.213 595.624 668.746 633.516C632.5 680.127 575.868 710 512 710C402.653 710 314 621.347 314 512C314 402.653 402.653 314 512 314C575.868 314 632.5 343.873 668.746 390.484C698.213 428.376 752.801 435.177 790.663 405.743C828.525 376.309 835.332 321.799 805.865 283.907C737.783 196.354 631.473 140 512 140Z'/%3E%3C/svg%3E");

  /* Colour roles. Light is the default; dark follows the system setting until the visitor picks one with the
     toggle (html[data-scheme]). Header, hero and footer are graphite in both schemes. */
  color-scheme: light dark;
  --sg-bg: var(--sg-white);
  --sg-alt: var(--sg-soft);
  --sg-card: var(--sg-white);
  --sg-text: var(--sg-graphite);
  --sg-muted: var(--sg-muted-on-light);
  --sg-line: #d5dbe5;
  --sg-label: #1d4ed8;
  --sg-chip: var(--sg-graphite);
  --sg-hero: var(--sg-graphite);
  --sg-accent: var(--sg-blue-text);
  /* Abstract backdrop (one image per page, see body[data-backdrop]): a fixed layer behind the content. The page
     bands are see-through, the alternate band is a light tint, so the picture stays a quiet background. */
  --sg-glass-alt: color-mix(in srgb, var(--sg-alt) 62%, transparent);

  --ds-text: var(--sg-text);
  --ds-bg: var(--sg-bg);
  --ds-surface: var(--sg-alt);
  --ds-accent: var(--sg-accent);
  --ds-footer-bg: var(--sg-graphite);
  --ds-footer-text: var(--sg-soft);
  --ds-muted: var(--sg-gray);
  --ds-muted-on-light: var(--sg-muted);
  --ds-font: "Manrope", "Inter", system-ui, Arial, sans-serif;
}
/* Dark scheme: graphite page, slightly lighter surfaces; text and accent chosen for >= 4.5:1 on every surface. */
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --sg-bg: #12161c; --sg-alt: #171c24; --sg-card: #1c222b; --sg-text: #f5f7fa; --sg-muted: #a3abb8;
    --sg-line: #2c3440; --sg-label: #60a5fa; --sg-chip: #2c3440; --sg-hero: #0d1015; --sg-accent: #60a5fa;
    --sg-glass-alt: color-mix(in srgb, var(--sg-alt) 55%, transparent);
  }
}
:root[data-scheme="dark"] {
  --sg-bg: #12161c; --sg-alt: #171c24; --sg-card: #1c222b; --sg-text: #f5f7fa; --sg-muted: #a3abb8;
  --sg-line: #2c3440; --sg-label: #60a5fa; --sg-chip: #2c3440; --sg-hero: #0d1015; --sg-accent: #60a5fa;
    --sg-glass-alt: color-mix(in srgb, var(--sg-alt) 55%, transparent);
}
@media (min-width: 76rem) {
  :root { --sg-rail-gap: 1.5rem; --sg-rail-x: calc(50% - var(--sg-content) / 2 - var(--sg-rail-gap)); }
}

/* ---------- abstract backdrop: a fixed, semi-transparent picture behind the page (decoration only) ---------- */
/* The pictures are luminous blue lines on near-black. Dark page: used as they are. Light page: inverted, so they become
   faint blue lines on white. The opacity of each picture is computed from its brightest pixels so that the smallest text
   colours keep 4.5:1 on top (the images phase of the E2E suite measures it on the real rendering). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--sg-backdrop-img, none) center / cover no-repeat;
  opacity: var(--sg-backdrop-a-light, .12); filter: invert(1) hue-rotate(180deg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) body::before { opacity: var(--sg-backdrop-a-dark, .12); filter: none; }
}
:root[data-scheme="dark"] body::before { opacity: var(--sg-backdrop-a-dark, .12); filter: none; }
/*BACKDROP-MAP-START*/
body { --sg-backdrop-img: url("../img/bg-default.ff545766.webp"); --sg-backdrop-a-light: 0.15; --sg-backdrop-a-dark: 0.14; }
body[data-backdrop="home"], .backdrop[data-for="home"], .panel-anchor[data-for="home"] + article { --sg-backdrop-img: url("../img/bg-home.844d190c.webp"); --sg-backdrop-a-light: 0.16; --sg-backdrop-a-dark: 0.14; }
body[data-backdrop="services"], .backdrop[data-for="services"], .panel-anchor[data-for="services"] + article { --sg-backdrop-img: url("../img/bg-services.7a7707e8.webp"); --sg-backdrop-a-light: 0.22; --sg-backdrop-a-dark: 0.21; }
body[data-backdrop="expertise"], .backdrop[data-for="expertise"], .panel-anchor[data-for="expertise"] + article { --sg-backdrop-img: url("../img/bg-expertise.1926ec81.webp"); --sg-backdrop-a-light: 0.25; --sg-backdrop-a-dark: 0.24; }
body[data-backdrop="about"], .backdrop[data-for="about"], .panel-anchor[data-for="about"] + article { --sg-backdrop-img: url("../img/bg-about.1d65c3d9.webp"); --sg-backdrop-a-light: 0.22; --sg-backdrop-a-dark: 0.21; }
body[data-backdrop="contact"], .backdrop[data-for="contact"], .panel-anchor[data-for="contact"] + article { --sg-backdrop-img: url("../img/bg-contact.17075e90.webp"); --sg-backdrop-a-light: 0.14; --sg-backdrop-a-dark: 0.13; }
body[data-backdrop="privacy"], .backdrop[data-for="privacy"], .panel-anchor[data-for="privacy"] + article { --sg-backdrop-img: url("../img/bg-privacy.39b4c671.webp"); --sg-backdrop-a-light: 0.19; --sg-backdrop-a-dark: 0.17; }
body[data-backdrop="insights"], .backdrop[data-for="insights"], .panel-anchor[data-for="insights"] + article { --sg-backdrop-img: url("../img/bg-insights.8e2523ec.webp"); --sg-backdrop-a-light: 0.15; --sg-backdrop-a-dark: 0.14; }
/*BACKDROP-MAP-END*/

/* ---------- header and footer: graphite surfaces, inverse logo ---------- */
.site-header { background: var(--sg-graphite); color: var(--sg-soft); border-bottom: 1px solid rgb(245 247 250 / .12); padding: .9rem 0; }
.site-header .brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--sg-soft); text-decoration: none; }
.site-header .brand-icon { display: block; flex: none; }
.site-header .wordmark { font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; line-height: 1; }
.main-nav a, .lang-switcher a { color: var(--sg-soft); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--sg-blue); }
.lang-switcher { gap: 0; border: 1px solid rgb(245 247 250 / .28); border-radius: 999px; padding: .15rem; font-size: .9rem; }
.lang-switcher a, .lang-switcher .lang-current { padding: .15rem .7rem; border-radius: 999px; min-height: 24px; text-decoration: none; }
.lang-switcher .lang-current { background: var(--sg-soft); color: var(--sg-graphite); }
.site-header a:focus-visible, .site-footer a:focus-visible, main > article > .cta a:focus-visible { outline-color: var(--sg-focus-dark); }

.site-footer { padding: 3rem 0 0; overflow: hidden; border-top: 1px solid rgb(245 247 250 / .12); }
.site-footer .slogan { font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem); font-weight: 700; letter-spacing: -.01em; margin: 0 0 1.25rem; }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.site-footer .footer-nav a { color: var(--sg-soft); }
/* Oversized cropped wordmark: decoration only, generated content is not read or contrast-checked as text. */
.site-footer .container::after {
  content: "cybintec"; display: block; margin: 1.5rem 0 -.18em; white-space: nowrap; overflow: hidden;
  font-weight: 800; font-size: clamp(4rem, 19vw, 16rem); line-height: .85; letter-spacing: -.045em; color: rgb(245 247 250 / .07);
}

/* ---------- page frame: a full-bleed grid with one readable column ---------- */
main {
  display: grid; padding: 0; position: relative;
  grid-template-columns: [full-start] minmax(1rem, 1fr) [content-start] minmax(0, var(--sg-content)) [content-end] minmax(1rem, 1fr) [full-end];
}
main > * { grid-column: full-start / full-end; }
main > article { display: grid; grid-template-columns: subgrid; isolation: isolate; counter-reset: net; }
main > article > * { grid-column: content-start / content-end; margin: 0; }
/* Everything is see-through so the page backdrop shows; only the hero band (below) and the cards are solid. */
main > article > p, main > article > ul { max-width: 46rem; }
main > article > :not(header):not(section):not(.lead):not(.cta) { padding-block: 1rem; }
main > article > :not(header):not(section):not(.lead):not(.cta):nth-child(2) { padding-top: clamp(2rem, 5vw, 3.5rem); }
main > article > :last-child:not(section) { padding-bottom: clamp(2.5rem, 6vw, 5rem); }

/* ---------- hero: graphite band behind the title, the lead and the first call to action ---------- */
main > article::before, main > article::after {
  content: ""; z-index: -1; grid-column: full-start / full-end; grid-row: 1; pointer-events: none;
}
main > article::before {
  background:
    linear-gradient(rgb(245 247 250 / .05) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, rgb(245 247 250 / .05) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(rgb(13 16 21 / .58), rgb(13 16 21 / .58)),
    var(--sg-backdrop-img, none) right center / cover no-repeat,
    var(--sg-hero);
}
/* Contrast tools cannot see the band (a pseudo-element) and would read white text on the page colour: a gradient on the
   hero elements makes them report "needs review" instead of a false violation. The real contrast of the hero text and
   of the backdrop is checked by the images phase of the E2E suite (tests/WebLoom.E2E/ImageTests.cs). */
main > article > header, main > article > header + .lead, main > article > header + .lead + .cta {
  background-image: linear-gradient(transparent, transparent);
}
/* The brand ring, cropped by the band at the right edge and mirrored, so its opening faces the text. */
main > article::after {
  background: rgb(245 247 250 / .06);
  -webkit-mask: var(--sg-ring) no-repeat left -9rem bottom -13rem / min(75vw, 36rem) auto;
  mask: var(--sg-ring) no-repeat left -9rem bottom -13rem / min(75vw, 36rem) auto;
  transform: scaleX(-1);
}
main > article:has(> header + .lead)::before, main > article:has(> header + .lead)::after { grid-row: 1 / span 2; }
main > article:has(> header + .lead + .cta)::before, main > article:has(> header + .lead + .cta)::after { grid-row: 1 / span 3; }

main > article > header { grid-row: 1; display: grid; grid-template-columns: subgrid; grid-column: full-start / full-end; position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }
main > article > header > * { grid-column: content-start / content-end; }
main > article > header:has(+ .lead) { padding-bottom: 1.25rem; }
main > article > header::before {
  content: "CYBINTEC"; grid-column: content-start / content-end; margin-bottom: 1.25rem;
  font: 500 .8rem/1 var(--sg-mono); letter-spacing: .28em; color: var(--sg-gray);
}
main > article > header::after {
  content: "+"; position: absolute; top: 1rem; right: max(1rem, calc(50% - var(--sg-content) / 2)); font: 300 1.5rem/1 var(--sg-mono); color: rgb(142 150 163 / .6);
}
main > article > header h1 {
  margin: 0; max-width: 17ch; color: var(--sg-white);
  font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance;
}
main > article > header + .lead { grid-row: 2; color: var(--sg-soft); font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); max-width: 40rem; padding-bottom: clamp(2rem, 5vw, 3.5rem); }
main > article > header + .lead:has(+ .cta) { padding-bottom: 1.5rem; }
main > article > header + .lead + .cta { grid-row: 3; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: none; }
main > article > .cta .button.secondary { color: var(--sg-soft); border-color: var(--sg-soft); }

/* ---------- aperture buttons: the ring inside the button turns on hover and focus ---------- */
.button { display: inline-flex; align-items: center; gap: .55rem; padding: .7rem 1.3rem; }
.button::before {
  content: ""; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: var(--sg-ring) center / contain no-repeat; mask: var(--sg-ring) center / contain no-repeat;
  transition: transform .5s ease;
}
.button:hover::before, .button:focus-visible::before { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .button::before { transition: none; } }

/* ---------- sections: surface rhythm, a node and a net label for every heading ---------- */
main > article > section {
  position: relative; grid-column: full-start / full-end; display: grid; grid-template-columns: subgrid;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
main > article > section > * { grid-column: content-start / content-end; margin: 0; }
main > article > section > * + * { margin-top: 1.25rem; }
main > article > section:nth-of-type(even) { background: var(--sg-glass-alt); }
main > article > section > p { max-width: 46rem; }
main > article > section > h2 {
  position: relative; font-size: clamp(1.6rem, 1rem + 2vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -.015em;
}
main > article > section > h2::before {
  content: counter(net, decimal-leading-zero); counter-increment: net; display: block; margin-bottom: .5rem;
  font: 500 .8rem/1 var(--sg-mono); letter-spacing: .22em; color: var(--sg-label);
}
main > article > section > h2::after {
  content: ""; position: absolute; top: -.05rem; left: calc(-1 * var(--sg-rail-gap) - 5px); width: 12px; height: 12px;
  border-radius: 50%; background: var(--sg-bg); border: 2px solid var(--sg-label);
}

/* The signal: a faint trace per section that lights up while the section scrolls into view. */
main > article > section::before, main > article > section::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--sg-rail-x); width: 2px; pointer-events: none;
}
main > article > section::before { background: rgb(59 130 246 / .28); }
main > article > section::after { background: var(--sg-blue); transform-origin: top; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > article > section::after { transform: scaleY(0); animation: sg-fill linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
  }
}
@keyframes sg-fill { to { transform: scaleY(1); } }

/* ---------- lists: a parts table with hairlines and numbered cells ---------- */
main > article > section > ul {
  list-style: none; padding: 0; counter-reset: part;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0; padding: 1px 0 0 1px;
}
/* Every cell has its own border and overlaps its neighbours by 1 px, so an empty cell stays empty (a grid background would fill it). */
main > article > section > ul > li { background: var(--sg-card); padding: 1.25rem 1.4rem 1.5rem; counter-increment: part; border: 1px solid var(--sg-line); margin: -1px 0 0 -1px; }
main > article > section > ul > li::before {
  content: counter(part, decimal-leading-zero); display: block; margin-bottom: .75rem;
  font: 500 .75rem/1 var(--sg-mono); letter-spacing: .2em; color: var(--sg-muted);
}
main > article > section > ul > li > strong {
  display: block; margin-bottom: .4rem; font: 600 .85rem/1.3 var(--sg-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sg-text);
}

/* ---------- "pinout": the home list drawn as a chip with four pins ---------- */
@media (min-width: 52rem) {
  section.pinout > ul {
    grid-template-columns: minmax(0, 1fr) minmax(7rem, 11rem) minmax(0, 1fr); column-gap: 3.5rem; row-gap: 1.5rem; align-items: center;
    background: none; border: 0; margin-top: 2.5rem; padding: 0;
  }
  section.pinout > ul > li { position: relative; border: 1px solid var(--sg-line); border-radius: .5rem; margin: 0; }
  section.pinout > ul > li:nth-child(1) { grid-column: 1; grid-row: 1; }
  section.pinout > ul > li:nth-child(2) { grid-column: 3; grid-row: 1; }
  section.pinout > ul > li:nth-child(3) { grid-column: 1; grid-row: 2; }
  section.pinout > ul > li:nth-child(4) { grid-column: 3; grid-row: 2; }
  section.pinout > ul > li::after {
    content: ""; position: absolute; top: 50%; width: 3.5rem; height: 12px; transform: translateY(-50%); pointer-events: none;
    background: linear-gradient(var(--sg-blue), var(--sg-blue)) 0 50% / 100% 2px no-repeat;
  }
  section.pinout > ul > li:nth-child(odd)::after { left: 100%; background-image: radial-gradient(circle at 0 50%, var(--sg-blue) 0 4px, transparent 4.5px), linear-gradient(var(--sg-blue), var(--sg-blue)); background-size: 100% 100%, 100% 2px; background-position: 0 0, 0 50%; background-repeat: no-repeat; }
  section.pinout > ul > li:nth-child(even)::after { right: 100%; background-image: radial-gradient(circle at 100% 50%, var(--sg-blue) 0 4px, transparent 4.5px), linear-gradient(var(--sg-blue), var(--sg-blue)); background-size: 100% 100%, 100% 2px; background-position: 0 0, 0 50%; background-repeat: no-repeat; }
  /* the chip: graphite body, concentric hairline, the open ring in its middle */
  section.pinout > ul::before {
    content: ""; grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 100%; aspect-ratio: 1; border-radius: .9rem;
    background: var(--sg-chip); outline: 1px solid var(--sg-gray); outline-offset: .45rem;
  }
  section.pinout > ul::after {
    content: ""; grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: center; width: 46%; aspect-ratio: 1;
    background: var(--sg-soft); -webkit-mask: var(--sg-ring) center / contain no-repeat; mask: var(--sg-ring) center / contain no-repeat;
  }
}
@media (max-width: 51.99rem) {
  section.pinout > ul { background: none; border: 0; border-left: 2px solid var(--sg-blue); border-radius: 0; gap: 1rem; padding-left: 1rem; margin-left: .1rem; }
  section.pinout > ul > li { border: 1px solid var(--sg-line); border-radius: .5rem; margin: 0; }
}

/* ---------- error pages: the signal line breaks ---------- */
main > .error-page { grid-column: content-start / content-end; padding-block: clamp(3rem, 10vw, 7rem); }
main > .error-page::before {
  content: ""; display: block; height: 2px; max-width: 28rem; margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--sg-blue) 0 38%, transparent 38% 46%, var(--sg-blue) 46% 100%);
}
main > .error-page h1 { margin: 0 0 1rem; font-size: clamp(2.25rem, 1.2rem + 4vw, 4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
main > .error-page[data-error="404"] h1::before, main > .error-page[data-error="500"] h1::before {
  display: block; margin-bottom: 1rem; font: 500 .8rem/1 var(--sg-mono); letter-spacing: .28em; color: var(--sg-label);
}
main > .error-page[data-error="404"] h1::before { content: "404 / NO SIGNAL"; }
main > .error-page[data-error="500"] h1::before { content: "500 / SYSTEM FAULT"; }

/* ---------- contact form on the same surfaces ---------- */
.contact-form form { max-width: 40rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { border-radius: .4rem; }

.note { color: var(--sg-muted); }
.form-errors { background: var(--sg-card); color: var(--sg-text); }

.legal-review {
  border-left: .2rem solid var(--sg-blue); padding: 1rem 1.25rem;
  background: var(--sg-alt); color: var(--sg-text);
}

/* ---------- copy vocabulary of the content release: facts line, article meta, stack lines, deliverables, tables ---------- */
/* Small lines inside the hero band (home: the facts under the buttons; articles: author, date and reading time above the lead). */
.cta .facts { display: block; margin-top: 1.5rem; font: 500 .8rem/1.5 var(--sg-mono); letter-spacing: .08em; color: var(--sg-soft); }
.lead .meta { display: block; margin-bottom: .9rem; font: 500 .8rem/1.4 var(--sg-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sg-gray); }
/* Cards that end with a technology line (home: one card per service). */
main > article > section > ul > li > code {
  display: block; margin-top: .75rem; font: 500 .75rem/1.5 var(--sg-mono); letter-spacing: .02em; color: var(--sg-label); background: none; padding: 0;
}
main > article > section > p.deliverables { max-width: 46rem; padding-left: 1rem; border-left: 2px solid var(--sg-line); color: var(--sg-muted); font-size: .95rem; }
main > article > section > p.deliverables strong { color: var(--sg-text); }
main > article > section > p.footnote, main > article > section > p.related { font-size: .875rem; color: var(--sg-muted); }
main > article > section > p.related a { color: var(--sg-accent); }

/* Tables (engagement formats, technology stack, legal tables): hairlines like the cards; stacked rows on narrow screens. */
main > article > section > table {
  width: 100%; max-width: none; border-collapse: collapse; background: var(--sg-card); color: var(--sg-text);
  border: 1px solid var(--sg-line); font-size: .95rem; overflow-wrap: anywhere;
}
main > article > section > table th, main > article > section > table td { padding: .85rem 1.1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--sg-line); }
main > article > section > table thead th { border-top: 0; font: 600 .75rem/1.3 var(--sg-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sg-muted); }
main > article > section > table tbody th { font-weight: 700; width: 24%; }
main > article > section > table code { font: 500 .85rem/1.4 var(--sg-mono); background: none; padding: 0; }
@media (max-width: 40rem) {
  main > article > section > table, main > article > section > table tbody, main > article > section > table tr,
  main > article > section > table th, main > article > section > table td { display: block; width: auto; }
  main > article > section > table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  main > article > section > table tbody tr { border-top: 1px solid var(--sg-line); padding-block: .5rem; }
  main > article > section > table tbody tr:first-child { border-top: 0; }
  main > article > section > table th, main > article > section > table td, main > article > section > table tbody th { border: 0; padding: .3rem 1.1rem; width: auto; }
}

/* Legal lines in the footer. */
.site-footer .legal { margin: 1.25rem 0 .75rem; font-size: .9rem; line-height: 1.6; color: var(--ds-muted); }
.site-footer .legal a { color: var(--sg-soft); }

/* ---------- colour scheme toggle (shown only when the script runs; without it the system setting applies) ---------- */
.scheme-toggle {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 24px; padding: .25rem .75rem; cursor: pointer;
  font: 600 .8rem/1.2 var(--sg-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--sg-soft); background: transparent; border: 1px solid rgb(245 247 250 / .28); border-radius: 999px;
}
.scheme-toggle[hidden] { display: none; }
.scheme-toggle:focus-visible { outline: 3px solid var(--sg-focus-dark); outline-offset: 2px; }
.scheme-toggle::before {
  content: ""; width: .9rem; height: .9rem; border-radius: 50%; border: 2px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%); transition: transform .4s ease;
}
.scheme-toggle[aria-pressed="true"]::before { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .scheme-toggle::before { transition: none; } }
.site-header .container { gap: .75rem 1rem; }
.header-tools { display: flex; align-items: center; gap: .75rem; }

/* ---------- Windows high-contrast: system colours, structure kept ---------- */
@media (forced-colors: active) {
  body::before { display: none; }
  main > article { background: Canvas; }
  main > article::before { background: Canvas; border-bottom: 1px solid CanvasText; }
  main > article::after { display: none; }
  main > article > header h1, main > article > header + .lead, main > article > header::before { color: CanvasText; }
  main > article > section::before, main > article > section::after { background: Highlight; }
  .site-header, .site-footer { background: Canvas; color: CanvasText; border-color: CanvasText; }
  .site-footer .container::after { color: GrayText; }
  .button::before { background: ButtonText; }
}
