/* Tompkins Software Systems company site
   One stylesheet for every page. Mobile first; the desktop layout widens the same
   structure rather than switching to a different one. */

/* ---------- Fonts (self-hosted, SIL Open Font License; see assets/fonts) ---------- */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4Variable-Roman.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/PublicSans-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/PublicSans-Italic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
/* Montserrat: headings and the wordmark, matching the logo */
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Brand colors: steel gray with the logo's blues. See brand.html.
     steel = dark grounds (bands, footer); blue = buttons and links; sky = accent lines and highlights. */
  --steel-950: #10151b;
  --steel-900: #171e27;
  --steel-800: #1f2833;
  --steel-700: #263241;
  --steel-600: #5f6b7a;
  --steel-100: #e7ebf0;
  --blue-800: #003a6b;
  --blue-700: #004a88;
  --blue-600: #0a5ca3;
  --blue-500: #2a78c2;
  --blue-50: #edf3f9;
  --sky-800: #005a80;
  --sky-700: #00729f;
  --sky-500: #00a8e6;
  --sky-400: #29b9ef;
  --sky-300: #84d5f5;

  --paper: #f7f8fa;
  --surface: #ffffff;
  --stone-100: #eef1f4;
  --stone-200: #e0e5eb;
  --stone-300: #c7cfd8;
  --ink: #161d26;
  --ink-2: #364150;
  --muted: #5a6574;

  /* Buttons: the fill, its hover, and the ink on it; --on-sky is the ink on any sky fill */
  --btn-bg: #004a88;
  --btn-bg-hover: #003a6b;
  --btn-ink: #ffffff;
  --on-sky: #06131c;
  --tint-line: #c3d6ea;
  --tint-sky: #e4f5fc;
  --tint-sky-line: #a9dcf1;

  --text-on-dark: #f2f5f8;
  --muted-on-dark: #aab6c4;
  --rule-on-dark: rgba(242, 245, 248, 0.16);

  /* Status colors stay semantic: green for done or on track, amber for at risk */
  --ok: #1e7b4a;
  --ok-ink: #17643b;
  --warn: #8a5d00;
  --warn-ink: #7a5200;
  --danger: #a3372b;

  --font-display: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1120px;
  --gutter: 20px;
  --radius: 6px;
  --radius-lg: 10px;
  --measure: 66ch;
  --shadow: 0 1px 2px rgba(16, 22, 30, 0.06), 0 2px 8px rgba(16, 22, 30, 0.05);
  --focus: 0 0 0 3px rgba(42, 120, 194, 0.35);
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Pages crossfade into each other in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--blue-800); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: inherit;
}
h1 { font-size: clamp(1.85rem, 1.25rem + 2.6vw, 2.9rem); line-height: 1.1; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem); }
h3 { font-size: 1.15rem; }
/* Montserrat has no italic here: emphasis in headings is color, not slant */
h1 em, h2 em, h3 em { font-style: normal; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }

p, ul, ol, dl { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.3em; }
strong { font-weight: 600; }
small, .small { font-size: 0.9rem; }
hr { border: 0; border-top: 1px solid var(--stone-200); margin: 2rem 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; background: var(--stone-100); padding: 0.1em 0.35em; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--sky-400); color: var(--on-sky); padding: 0.5rem 0.9rem;
  border-radius: var(--radius); font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ---------- Labels, badges, buttons ---------- */
.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin: 0 0 0.75rem;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--sky-400); }

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18em 0.6em;
  border-radius: 999px;
  border: 1px solid var(--stone-300);
  color: var(--ink-2);
  background: var(--stone-100);
  vertical-align: middle;
  white-space: nowrap;
}
.badge-ok { background: var(--blue-50); border-color: var(--tint-line); color: var(--blue-700); }
.badge-brass { background: var(--tint-sky); border-color: var(--tint-sky-line); color: var(--sky-800); }
.badge-dark { background: var(--steel-900); border-color: var(--steel-900); color: var(--text-on-dark); }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
  padding: 0.78em 1.25em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); color: var(--btn-ink); }
.btn-brass { background: var(--sky-400); color: var(--on-sky); border-color: var(--sky-400); }
.btn-brass:hover { background: var(--sky-300); border-color: var(--sky-300); color: var(--on-sky); }
.btn-outline { background: transparent; color: var(--blue-700); border-color: var(--blue-600); }
.btn-outline:hover { background: var(--blue-50); color: var(--blue-800); }
.btn-ghost { background: transparent; color: var(--text-on-dark); border-color: rgba(243, 244, 238, 0.45); }
.btn-ghost:hover { background: rgba(243, 244, 238, 0.1); color: #fff; border-color: #fff; }
.btn-small { font-size: 0.9rem; padding: 0.55em 0.95em; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--stone-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark { width: auto; height: 40px; flex: none; }
/* Wordmark: TSS, the everyday name, in the logo's Montserrat */
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: 0.02em; color: var(--blue-700); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; border: 1.5px solid var(--stone-300); color: var(--ink);
  border-radius: var(--radius); padding: 0.5em 0.8em; font: inherit; font-weight: 600; font-size: 0.92rem;
  cursor: pointer;
}
.nav-toggle .bars { display: inline-block; width: 16px; height: 12px; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after, .nav-toggle .bars span {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars span { top: 5px; }
.nav-toggle .bars::after { top: 10px; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--stone-200);
  box-shadow: 0 12px 24px rgba(16, 22, 30, 0.08);
}
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem var(--gutter) 1rem; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 0.8rem 0; text-decoration: none; color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--stone-200);
}
.site-nav a[aria-current="page"] { color: var(--blue-700); font-weight: 600; }
.site-nav a.btn, .site-nav a.btn[aria-current="page"] { color: var(--btn-ink); }
.site-nav a.btn:hover { color: var(--btn-ink); }
.site-nav li.nav-cta { padding-top: 0.9rem; }
.site-nav li.nav-cta a { border: 0; text-align: center; }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: block; position: static; background: transparent; border: 0; box-shadow: none;
  }
  .site-nav ul { display: flex; align-items: center; gap: 1.4rem; padding: 0; }
  .site-nav a { padding: 0.4rem 0; border: 0; font-size: 0.97rem; position: relative; white-space: nowrap; }
  .site-nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--sky-500); transform: scaleX(0); transform-origin: left; transition: transform 0.15s ease;
  }
  .site-nav a:not(.btn):hover::after, .site-nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
  .site-nav li.nav-cta { padding: 0; margin-left: 0.4rem; }
  .site-nav li.nav-cta a { padding: 0.45rem 0.95rem; }
}

/* In-page anchors land below the sticky header (67px: 66px row and its border).
   A jump to a full-width section puts its top edge at the header's bottom edge, so its own
   padding shows. The home page sets this on the page itself for its one-section-per-screen
   scrolling; cards that are sections (the families on Our products) keep their own margin. */
main [id]:not(section) { scroll-margin-top: 84px; }
body:not(.home) main > section[id] { scroll-margin-top: 67px; }

/* ---------- Swipe rows: on phones, card groups scroll sideways instead of stacking ----------
   site.js adds the dots after each .swipe row; each page's stylesheet sets the width
   below which its rows swipe and shows the dots there. */
.swipe-dots { display: none; justify-content: center; gap: 0.15rem; margin-top: 0.35rem; }
.swipe-dots button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.swipe-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--stone-300); transition: width 0.2s ease, background 0.2s ease; }
.swipe-dots button[aria-current="true"]::before { width: 22px; background: var(--blue-700); }
.on-dark .swipe-dots button::before { background: rgba(255, 255, 255, 0.3); }
.on-dark .swipe-dots button[aria-current="true"]::before { background: var(--sky-400); }
.swipe::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .swipe-dots button::before { transition: none; } }
/* A row swipes below the width its second class names: swipe-880, swipe-720 or swipe-640.
   A row that scrolls sideways must never also scroll up and down, even by a pixel (a tilted card
   or a lifted one adds a little height): a vertical swipe that starts on such a row would move the
   row instead of the page. Rows are padded so nothing is cut off by the clip. */
@media (max-width: 879px) {
  .swipe.swipe-880 { display: flex; gap: 0.9rem; position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0.5rem var(--gutter) 0.6rem; scroll-padding-inline: var(--gutter); }
  .swipe.swipe-880 > * { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
  .swipe.swipe-880 + .swipe-dots { display: flex; }
}
@media (max-width: 719px) {
  .swipe.swipe-720 { display: flex; gap: 0.9rem; position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0.5rem var(--gutter) 0.6rem; scroll-padding-inline: var(--gutter); }
  .swipe.swipe-720 > * { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
  .swipe.swipe-720 + .swipe-dots { display: flex; }
}
@media (max-width: 639px) {
  .swipe.swipe-640 { display: flex; gap: 0.9rem; position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0.5rem var(--gutter) 0.6rem; scroll-padding-inline: var(--gutter); }
  .swipe.swipe-640 > * { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; }
  .swipe.swipe-640 + .swipe-dots { display: flex; }
}

/* ---------- Touch phones: nothing moves inside the page while the page itself moves ----------
   Fade-ins, the drifting map and the parallax are for mice. On a phone every section is a swipe
   away, and anything animating during that swipe reads as stutter. */
@media (max-width: 879px) and (hover: none) and (pointer: coarse) {
  .rv { opacity: 1; translate: none; transition: none; }
  .band-dark::before { transform: none; will-change: auto; }
}

/* ---------- Dark bands: hero and page heads ---------- */
.band-dark {
  background: linear-gradient(180deg, var(--steel-900), var(--steel-950));
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
/* The survey map that runs through the site: contour lines drawn once (assets/img/contours.svg) */
.band-dark::before { content: ""; position: absolute; left: 0; right: 0; top: -18%; bottom: -18%; pointer-events: none; background: url("../img/contours.svg") center / cover no-repeat; opacity: 0.22; }
.band-dark > .wrap { position: relative; }
.band-dark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--sky-500), var(--sky-300) 40%, var(--sky-500));
}
.band-dark h1, .band-dark h2 { color: #fff; }
.band-dark a:not(.btn) { color: var(--sky-300); }
.band-dark a:not(.btn):hover { color: #fff; }
.band-dark .lede { color: var(--muted-on-dark); }

.hero { padding: 3rem 0 3.25rem; }
.hero-grid { display: grid; gap: 2rem; }
.hero-copy h1 { max-width: 18ch; }
.lede { font-size: 1.15rem; line-height: 1.55; max-width: 56ch; color: var(--ink-2); }

.fact-panel {
  background: var(--steel-800);
  border: 1px solid var(--rule-on-dark);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  align-self: start;
}
.fact-panel h2 { font-size: 0.78rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-400); margin-bottom: 0.9rem; }
.fact-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.25rem; margin: 0; font-size: 0.97rem; }
.fact-panel dt { color: var(--muted-on-dark); }
.fact-panel dd { margin: 0; color: #fff; font-weight: 500; }
.fact-panel dd a { color: var(--sky-300); }

@media (min-width: 880px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: center; }
}

.page-head { padding: 2.5rem 0 2.75rem; }
.page-head h1 { max-width: 20ch; }
.page-head .lede { max-width: 60ch; }
@media (min-width: 880px) { .page-head { padding: 3.5rem 0 3.75rem; } }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-tint { background: var(--stone-100); }
.section-green { background: var(--blue-50); }
@media (min-width: 880px) { .section { padding: 4.25rem 0; } }

.section-head { margin-bottom: 1.75rem; max-width: 62ch; }
.section-head .num {
  display: inline-block; font-family: var(--font-display); font-weight: 600; color: var(--sky-700);
  font-size: 0.95rem; letter-spacing: 0.04em; margin-bottom: 0.35rem;
}
.section-head .num::after { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--sky-500); margin: 0 0 0.25em 0.6em; vertical-align: middle; }
.section-head h2 { margin-bottom: 0.4rem; }
.section-head p { color: var(--ink-2); }

.grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--surface);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--blue-500); translate: 0 -3px; box-shadow: 0 10px 24px rgba(16, 22, 30, 0.1); }

/* ---------- Motion that runs through the whole site ---------- */
.rv { opacity: 0; translate: 0 16px; transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; translate: none; }
.read-line { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--sky-500), var(--sky-300)); pointer-events: none; transition: width 0.12s linear; }
.band-dark::before { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.site-nav a:not(.btn) { position: relative; }
@media (min-width: 880px) {
  .site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--sky-500); transition: right 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .site-nav a:not(.btn):hover::after, .site-nav a:not(.btn)[aria-current="page"]::after { right: 0; }
}
.brand .mark { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.btn { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, translate 0.2s ease, box-shadow 0.2s ease; }
.btn:hover { translate: 0 -1px; box-shadow: 0 6px 16px rgba(16, 22, 30, 0.12); }
.btn:active { translate: 0 0; box-shadow: none; }
.prose a, .sectors a, .card p a { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; text-decoration-color: transparent; transition: background-size 0.25s ease; }
.prose a:hover, .sectors a:hover, .card p a:hover { background-size: 100% 1px; }
.band-dark .product-hero-meta .badge, .page-head .badge { animation: badge-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.band-dark .product-hero-meta .badge:nth-child(2) { animation-delay: 0.08s; }
.band-dark .product-hero-meta .badge:nth-child(3) { animation-delay: 0.16s; }
.band-dark .product-hero-meta .badge:nth-child(4) { animation-delay: 0.24s; }
@keyframes badge-in { 0% { opacity: 0; translate: 0 8px; } 100% { opacity: 1; translate: none; } }
.page-head h1, .page-head .lede, .page-head .actions, .phero-copy h1, .phero-copy .lede, .phero-copy .actions, .tool-head h1, .tool-head .lede { animation: head-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.page-head .lede, .phero-copy .lede, .tool-head .lede { animation-delay: 0.1s; }
.page-head .actions, .phero-copy .actions { animation-delay: 0.2s; }
@keyframes head-in { 0% { opacity: 0; translate: 0 14px; } 100% { opacity: 1; translate: none; } }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; translate: none; transition: none; }
  .read-line { display: none; }
  .band-dark::before { transform: none; }
  .card:hover, .btn:hover { translate: none; }
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-2); }
.card .card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.card .card-link { margin-top: auto; padding-top: 0.5rem; font-weight: 600; text-decoration: none; }
.card .card-link::after { content: " \2192"; }
.card .card-link:hover { text-decoration: underline; }
.card-kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-700); }

/* Two-column prose layout used on the long pages */
.split { display: grid; gap: 2rem; }
.split > * { min-width: 0; }   /* a wide row inside (a swipe row, a table) scrolls instead of widening the page */
@media (min-width: 880px) { .split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; align-items: start; } }
.sidebar-note {
  background: var(--surface); border: 1px solid var(--stone-200); border-left: 4px solid var(--sky-500);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; font-size: 0.97rem;
}
.sidebar-note h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.sidebar-note ul { padding-left: 1.1em; }

.prose h2 { margin-top: 2.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6rem; }
.prose > p, .prose > ul, .prose > ol { max-width: var(--measure); }
.prose table { max-width: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; background: var(--surface); }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--stone-200); vertical-align: top; }
th { font-weight: 600; background: var(--stone-100); color: var(--ink); font-size: 0.9rem; letter-spacing: 0.02em; }
tr:last-child td { border-bottom: 0; }
.table-wrap table { border: 1px solid var(--stone-200); border-radius: var(--radius); overflow: hidden; }

/* ---------- Definition rows (specs, how to buy) ---------- */
.spec { display: grid; grid-template-columns: 1fr; gap: 0.35rem 1.5rem; margin: 0; }
.spec dt { font-weight: 600; color: var(--ink); }
.spec dd { margin: 0 0 0.9rem; color: var(--ink-2); }
.contact-email { overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .spec { grid-template-columns: 11rem 1fr; }
  .spec dd { margin-bottom: 0.6rem; }
}

/* ---------- Timeline (updates) ---------- */

/* ---------- Values list ---------- */
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: value; }
.values li { padding: 1.1rem 1.2rem 1.1rem 3.4rem; background: var(--surface); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); position: relative; margin: 0; }
.values li::before {
  counter-increment: value; content: counter(value, decimal-leading-zero);
  position: absolute; left: 1.15rem; top: 1.05rem; font-family: var(--font-display); font-weight: 600; color: var(--sky-700); font-size: 1.05rem;
}
.values h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.values p { margin: 0; color: var(--ink-2); }
@media (min-width: 880px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } .values li:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* ---------- Sector list ---------- */
.sectors { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.sectors li { margin: 0; display: grid; grid-template-columns: 10px 1fr; gap: 0.9rem; align-items: start; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--stone-200); border-radius: var(--radius); }
.sectors li::before { content: ""; width: 10px; height: 10px; margin-top: 0.45em; border-radius: 2px; background: var(--blue-600); grid-row: 1 / span 2; }
.sectors strong, .sectors span { grid-column: 2; }
.sectors strong { display: block; }
.sectors span { color: var(--ink-2); font-size: 0.97rem; }
@media (min-width: 640px) { .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .sectors.swipe > li { align-content: start; } }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--stone-200); border-left: 4px solid var(--blue-600); background: var(--surface);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.callout.brass { border-left-color: var(--sky-500); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Newsletter band ---------- */
.band-news { background: var(--steel-100); border-top: 1px solid #cfdcd4; border-bottom: 1px solid #cfdcd4; }
.band-news .wrap { display: grid; gap: 1.25rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.band-news h2 { margin-bottom: 0.3rem; }
.band-news p { color: var(--ink-2); max-width: 52ch; }
@media (min-width: 880px) { .band-news .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3rem; } }

/* ---------- Forms ---------- */
form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="email"], textarea, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--stone-300); border-radius: var(--radius); padding: 0.7em 0.85em; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue-500); box-shadow: var(--focus); outline: none; }
textarea { min-height: 7.5rem; resize: vertical; }
.inline-form { display: flex; flex-direction: column; gap: 0.6rem; }
.inline-form input { flex: 1 1 auto; }
@media (min-width: 540px) { .inline-form { flex-direction: row; } .inline-form .btn { flex: none; } }
.form-note { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; }
form + .form-note, .form-note + form { margin-top: 0.75rem; }
/* Fingers: small buttons still get a 40 px target */
@media (pointer: coarse) { .btn-small { min-height: 40px; } }
.form-status { margin-top: 0.75rem; font-size: 0.95rem; font-weight: 500; color: var(--blue-700); }
.form-status[hidden] { display: none; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Product page bits ---------- */
.product-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.feature-list li { margin: 0; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--stone-200); border-radius: var(--radius); }
.feature-list strong { display: block; margin-bottom: 0.15rem; }
.feature-list span { color: var(--ink-2); font-size: 0.97rem; }
@media (min-width: 720px) { .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Color swatches (brand page) ---------- */
.swatches { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatches li { margin: 0; border: 1px solid var(--stone-200); border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: 0.9rem; }
.swatches .chip { height: 64px; }
.swatches .label { padding: 0.6rem 0.75rem; }
.swatches .label strong { display: block; }
.swatches .label code { background: transparent; padding: 0; font-size: 0.85rem; }
.type-sample { border: 1px solid var(--stone-200); border-radius: var(--radius); background: var(--surface); padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.type-sample .big { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.1; margin: 0 0 0.35rem; }
.logo-sheet { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 1.5rem; }
.logo-sheet figure { margin: 0; border: 1px solid var(--stone-200); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.logo-sheet .tile { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; min-height: 150px; }
.logo-sheet .tile.dark { background: var(--steel-900); }
.logo-sheet figcaption { padding: 0.6rem 0.8rem; font-size: 0.88rem; border-top: 1px solid var(--stone-200); display: flex; justify-content: space-between; gap: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--steel-950); color: var(--muted-on-dark); margin-top: auto; }
.site-footer a { color: var(--text-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--sky-300); text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding: 3rem 0 2.25rem; }
.footer-brand .brand { color: var(--text-on-dark); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 1rem 0 0; max-width: 34ch; font-size: 0.95rem; }
.footer-brand .badge { margin-top: 1rem; }
.footer-col h3 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sky-400); margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0; font-size: 0.95rem; }
.footer-col li a { display: inline-block; padding: 0.3rem 0; }
.footer-bottom { border-top: 1px solid var(--rule-on-dark); padding: 1.25rem 0 1.5rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-bottom p { margin: 0; }
/* One-line footer for the customer product pages (footer: minimal) */
.site-footer-min .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.25rem; font-size: 0.85rem; }
.site-footer-min p { margin: 0; }
.site-footer-min p + p { display: flex; gap: 1.25rem; }
.footer-col ul + h3 { margin-top: 1.4rem; }
.site-footer .footer-col h3 a { color: inherit; text-decoration: none; }
.site-footer .footer-col h3 a:hover { color: var(--sky-300); text-decoration: underline; }
.footer-col li.f-fam > a { font-weight: 600; }
.footer-col li.f-fam ul { list-style: none; margin: 0.45rem 0 0; padding: 0 0 0 0.85rem; border-left: 1px solid var(--rule-on-dark); }
.footer-col li.f-fam ul li { margin: 0 0 0.35rem; font-size: 0.92rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; } }
/* Phones: the four link groups fold up behind their headings (site.js adds the buttons and the folded class) */
@media (max-width: 639px) {
  .site-footer.folded .footer-grid { gap: 0; padding: 2.25rem 0 1.5rem; }
  .site-footer.folded .footer-brand { padding-bottom: 1.5rem; }
  .site-footer.folded .footer-col h3, .site-footer.folded .footer-col ul + h3 { margin: 0; border-top: 1px solid var(--rule-on-dark); }
  .site-footer.folded .footer-col ul { padding-bottom: 1rem; }
  .f-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; margin: 0; padding: 0.4rem 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: pointer; }
  .f-toggle svg { flex: none; transition: transform 0.2s ease; }
  .f-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .f-toggle:focus-visible { outline: 3px solid var(--sky-400); outline-offset: 2px; }
}

/* Keep the footer at the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- Family tag on a product page hero (see family.css for the families) ---------- */
.fam-tag { display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; padding: 0.28rem 0.85rem 0.28rem 0.3rem; border-radius: 999px; border: 1px solid var(--rule-on-dark); background: rgba(243, 244, 238, 0.07); font-size: 0.84rem; font-weight: 600; letter-spacing: 0.02em; line-height: 1.2; text-decoration: none; transition: border-color 0.2s ease, background-color 0.2s ease; }
.band-dark a.fam-tag { color: var(--text-on-dark); }
.band-dark a.fam-tag:hover { color: #fff; border-color: var(--sky-400); background: rgba(243, 244, 238, 0.13); }
.fam-tag img { display: block; width: 26px; height: 26px; border-radius: 7px; }
.fam-tag.plain { padding-left: 0.85rem; }
.fam-tag .k { color: var(--muted-on-dark); font-weight: 500; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .band-news, .skip-link, .nav-toggle, .actions { display: none !important; }
  body { background: #fff; color: #000; }
  .band-dark { background: #fff; color: #000; }
  .band-dark h1 { color: #000; }
  a { color: #000; text-decoration: none; }
}

/* ======================================================================
   December 2026: spec labels, the motion switch, and forms that send
   ====================================================================== */
/* Mono for labels: JetBrains Mono (SIL OFL), already on the site for the sample apps */
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/picker/jetbrainsmono-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/picker/jetbrainsmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
:root { --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.eyebrow { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; }
.mlabel { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* The motion switch: an icon in the bar on wide screens, a full row in the phone menu */
.calm-toggle {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  font: inherit; font-weight: 500; color: var(--ink); background: transparent; cursor: pointer; text-align: left;
  border: 0; border-bottom: 1px solid var(--stone-200); padding: 0.8rem 0;
}
.calm-toggle svg { flex: none; }
.calm-toggle .cf { display: none; }
.calm-toggle[aria-pressed="true"] .cw { display: none; }
.calm-toggle[aria-pressed="true"] .cf { display: inline; }
.calm-toggle[aria-pressed="true"] { color: var(--blue-700); }
.calm-toggle:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
@media (min-width: 880px) {
  .site-nav li.nav-calm { margin-left: -0.3rem; }
  .calm-toggle { width: 36px; height: 36px; padding: 0; justify-content: center; border: 1.5px solid var(--stone-300); border-radius: 999px; color: var(--muted); }
  .calm-toggle:hover { border-color: var(--blue-500); color: var(--blue-700); }
  .calm-toggle .calm-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .calm-toggle[aria-pressed="true"] { background: var(--blue-50); border-color: var(--blue-600); }
}
body.home .calm-toggle { color: var(--text-on-dark); border-bottom-color: var(--table-rule); }
@media (min-width: 880px) {
  body.home .calm-toggle { border-color: rgba(243, 244, 238, 0.35); color: var(--muted-on-dark); }
  body.home .calm-toggle:hover { border-color: var(--sky-400); color: #fff; }
  body.home .calm-toggle[aria-pressed="true"] { background: rgba(41, 185, 239, 0.16); border-color: var(--sky-400); color: #fff; }
}
/* Motion off by choice: the same as the phone's reduce-motion setting */
html[data-calm] { scroll-behavior: auto; }
html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after { transition: none !important; animation: none !important; }
html[data-calm]::view-transition-old(root), html[data-calm]::view-transition-new(root) { animation: none; }

/* Forms with no server behind them yet hand the message to the visitor's email app */
.compose { margin-top: 1rem; padding: 1rem; border: 1px solid var(--stone-300); border-radius: var(--radius-lg); background: var(--surface); }
.compose p { margin: 0 0 0.6rem; }
.compose textarea { width: 100%; min-height: 10rem; font: 0.86rem/1.5 var(--font-mono); padding: 0.7rem; border: 1px solid var(--stone-300); border-radius: var(--radius); background: var(--paper); color: var(--ink); resize: vertical; }
.compose .actions { margin-top: 0.7rem; }


/* ======================================================================
   One dark world (December 2026, second pass)
   The company's pages are drawn on steel, with a faint drafting grid and a sky glow
   behind everything. The tokens above are pointed at dark values on body.dark (the
   build adds the class unless a page says "theme: light") and in the header on every
   page. A light piece inside a dark page (a sample app, a sheet of paper, a family's
   own card) takes the light values back with .t-light.
   ====================================================================== */
body.dark, .site-header, .t-dark {
  --paper: #0a0f14;
  --surface: #131a23;
  --stone-100: rgba(132, 213, 245, 0.055);
  --stone-200: rgba(132, 213, 245, 0.15);
  --stone-300: rgba(132, 213, 245, 0.3);
  --ink: #f2f5f8;
  --ink-2: #c6d0db;
  --muted: #97a5b5;
  --steel-600: #97a5b5;
  --steel-100: #1b242e;
  --blue-800: #ffffff;
  --blue-700: #84d5f5;
  --blue-600: #84d5f5;
  --blue-500: #29b9ef;
  --blue-50: rgba(41, 185, 239, 0.11);
  --sky-800: #84d5f5;
  --sky-700: #84d5f5;
  --ok: #58d093;
  --ok-ink: #7be0ae;
  --warn: #f0b849;
  --warn-ink: #f5c666;
  --danger: #ff9488;
  --btn-bg: #29b9ef;
  --btn-bg-hover: #84d5f5;
  --btn-ink: #06131c;
  --tint-line: rgba(132, 213, 245, 0.36);
  --tint-sky: rgba(41, 185, 239, 0.14);
  --tint-sky-line: rgba(132, 213, 245, 0.42);
  --shadow: 0 0 0 1px rgba(132, 213, 245, 0.05), 0 16px 36px rgba(0, 0, 0, 0.4);
  --focus: 0 0 0 3px rgba(41, 185, 239, 0.4);
  color-scheme: dark;
}
.t-light, body.dark .screen, body.dark .stage-app, body.dark .paper, body.dark .device, body.dark .fam-card.fam-up, body.dark .fam-block.fam-up, body.dark .sh-body, body.dark .fam-sheet, body.dark .logo-sheet .tile:not(.dark) {
  --paper: #f7f8fa;
  --surface: #ffffff;
  --stone-100: #eef1f4;
  --stone-200: #e0e5eb;
  --stone-300: #c7cfd8;
  --ink: #161d26;
  --ink-2: #364150;
  --muted: #5a6574;
  --steel-600: #5f6b7a;
  --steel-100: #e7ebf0;
  --blue-800: #003a6b;
  --blue-700: #004a88;
  --blue-600: #0a5ca3;
  --blue-500: #2a78c2;
  --blue-50: #edf3f9;
  --sky-800: #005a80;
  --sky-700: #00729f;
  --ok: #1e7b4a;
  --ok-ink: #17643b;
  --warn: #8a5d00;
  --warn-ink: #7a5200;
  --danger: #a3372b;
  --btn-bg: #004a88;
  --btn-bg-hover: #003a6b;
  --btn-ink: #ffffff;
  --tint-line: #c3d6ea;
  --tint-sky: #e4f5fc;
  --tint-sky-line: #a9dcf1;
  --shadow: 0 1px 2px rgba(16, 22, 30, 0.06), 0 2px 8px rgba(16, 22, 30, 0.05);
  --focus: 0 0 0 3px rgba(42, 120, 194, 0.35);
  color-scheme: light;
  color: var(--ink);
}

/* The ground: steel, a drafting grid, and two soft lights. One fixed layer, so nothing repaints on scroll. */
body.dark { background: var(--paper); }
body.dark::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 88% -5%, rgba(0, 168, 230, 0.13), transparent 62%),
    radial-gradient(60% 45% at -5% 105%, rgba(42, 120, 194, 0.14), transparent 60%),
    linear-gradient(rgba(132, 213, 245, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(132, 213, 245, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
}

/* The header is the same dark glass on every page, family and product pages included */
.site-header { background: rgba(10, 15, 20, 0.84); -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px); border-bottom-color: rgba(132, 213, 245, 0.14); color: var(--ink); }
.site-header .brand-name { color: #fff; }
.site-header .mark .m1 { fill: url(#hd-m1); }
.site-header .mark .m2 { fill: url(#hd-m2); }
.site-header .mark .m3 { fill: url(#hd-m3); }
.site-header .site-nav a[aria-current="page"]:not(.btn) { color: #fff; }
.site-header .site-nav.is-open { background: #0d131a; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45); }
.site-footer { border-top: 1px solid rgba(132, 213, 245, 0.12); }

/* Dark bands sit in the same world: no hard edge where one ends */
body.dark .band-dark { background: linear-gradient(180deg, rgba(23, 30, 39, 0.9), rgba(10, 15, 20, 0.35)); }
body.dark .band-dark::after { background: linear-gradient(90deg, transparent, var(--sky-500) 18%, var(--sky-300) 50%, var(--sky-500) 82%, transparent); height: 1px; opacity: 0.8; }
body.dark .section-green { background: rgba(41, 185, 239, 0.07); }
body.dark .btn-outline { border-color: rgba(132, 213, 245, 0.5); }
body.dark .btn-outline:hover { border-color: #fff; }
body.dark ::selection { background: rgba(41, 185, 239, 0.35); color: #fff; }
body.dark .logo-sheet .tile:not(.dark) { background: #ffffff; }
