/* Shared interaction polish and the 2026 editorial refresh. */
:where(html) {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:where(body) {
  overflow-x: hidden;
}

:where(a, button, input, select, textarea) {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease,
    box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, currentColor 35%, transparent);
  outline-offset: 3px;
}

.site-header .header-inner {
  min-height: 66px;
}

.site-header .site-nav > a {
  position: relative;
}

.site-header .site-nav > a::after {
  position: absolute;
  right: 0;
  bottom: -.2rem;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.site-header .site-nav > a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.history-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  width: 100%;
}

.history-item {
  display: block;
  width: 100%;
  min-width: 0;
  padding: .9rem;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  font: inherit;
  text-align: left;
}

button.history-item {
  cursor: pointer;
}

button.history-item:hover {
  border-color: currentColor;
  transform: translateY(-2px);
}

.history-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.history-item-head strong,
.history-load {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.history-item-head time {
  font-size: .7rem;
  opacity: .65;
}

.history-summary {
  margin: .4rem 0 .6rem;
  font-size: .9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-values {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
}

.history-values div {
  display: inline-flex;
  gap: .3rem;
  max-width: 100%;
  padding: .22rem .45rem;
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-size: .72rem;
}

.history-values dt {
  opacity: .65;
}

.history-values dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-load {
  display: block;
  margin-top: .65rem;
}

.history-clear {
  margin-top: .8rem;
}

.history-clear:disabled {
  cursor: not-allowed;
  opacity: .4;
}

/* BankFile — quiet financial editorial rather than a terminal dashboard. */
html[data-site="bankfile"] {
  --bg: #10251d;
  --panel: #19352a;
  --ink: #f5f0e6;
  --muted: #bac7bd;
  --acid: #d8f487;
  --line: #395849;
}

html[data-site="bankfile"] body {
  background:
    radial-gradient(circle at 83% 8%, rgba(216,244,135,.12), transparent 25rem),
    radial-gradient(circle at 15% 70%, rgba(219,180,116,.08), transparent 28rem),
    var(--bg);
}

html[data-site="bankfile"] .site-header {
  border-bottom-color: rgba(245,240,230,.12);
  background: rgba(16,37,29,.82);
  backdrop-filter: blur(18px);
}

html[data-site="bankfile"] .brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--acid);
  color: #10251d;
}

html[data-site="bankfile"] .ledger-hero {
  min-height: 670px;
  padding-top: 7rem;
  padding-bottom: 6rem;
  gap: clamp(3rem, 7vw, 7rem);
}

html[data-site="bankfile"] .ledger-hero h1,
html[data-site="bankfile"] .tool-hero h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .95;
}

html[data-site="bankfile"] .ledger-hero > div > p:not(.eyebrow) {
  max-width: 690px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.75;
}

html[data-site="bankfile"] .eyebrow {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

html[data-site="bankfile"] .ledger-hero pre {
  position: relative;
  gap: 1rem;
  overflow: visible;
  padding: 3.2rem 2.6rem 2.5rem;
  border: 0;
  border-radius: 4px 24px 24px 24px;
  background: #f6f0e4;
  box-shadow: 0 28px 70px rgba(0,0,0,.3);
  color: #183128;
  transform: rotate(2deg);
}

html[data-site="bankfile"] .ledger-hero pre::before {
  position: absolute;
  top: 1.2rem;
  left: 2.6rem;
  content: "PRIVATE VIEW";
  color: #63756b;
  font: 700 .65rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .16em;
}

html[data-site="bankfile"] .ledger-hero pre::after {
  position: absolute;
  right: -18px;
  bottom: 28px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  content: "LOCAL";
  background: #d8f487;
  color: #10251d;
  font: 900 .64rem/64px ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .12em;
  text-align: center;
  transform: rotate(-8deg);
}

html[data-site="bankfile"] .ledger-hero pre b {
  color: #315e34;
}

html[data-site="bankfile"] .button {
  border-radius: 999px;
  padding: .95rem 1.35rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

html[data-site="bankfile"] .section-heading h2 {
  max-width: 700px;
  font: 500 clamp(2.4rem, 5vw, 4.5rem)/1 Georgia, serif;
  letter-spacing: -.04em;
}

html[data-site="bankfile"] .section-heading input {
  border-radius: 999px;
  background: rgba(6,20,14,.55);
}

html[data-site="bankfile"] .category-block h3 {
  font: 800 .72rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

html[data-site="bankfile"] .tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  border: 0;
}

html[data-site="bankfile"] .tool-list a {
  grid-template-columns: 52px 1fr auto;
  gap: .85rem;
  padding: 1.35rem;
  border: 1px solid rgba(245,240,230,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

html[data-site="bankfile"] .tool-list a small {
  grid-column: 2 / -1;
  line-height: 1.55;
}

html[data-site="bankfile"] .tool-list a:hover {
  border-color: var(--acid);
  background: rgba(216,244,135,.08);
  color: var(--ink);
  transform: translateY(-4px);
}

html[data-site="bankfile"] .privacy-callout {
  border: 0;
  border-radius: 24px;
  background: var(--acid);
  color: #10251d;
}

html[data-site="bankfile"] .privacy-callout p,
html[data-site="bankfile"] .privacy-callout strong {
  color: #10251d;
}

/* Barcode — clean Swiss utility with friendlier scale and motion. */
html[data-site="barcode"] {
  --paper: #f4f1e9;
  --ink: #101828;
  --acid: #d8ff50;
  --blue: #3656d4;
}

html[data-site="barcode"] body {
  background:
    radial-gradient(circle at 92% 22%, rgba(54,86,212,.08), transparent 22rem),
    var(--paper);
  color: var(--ink);
}

html[data-site="barcode"] .site-header {
  border-bottom: 0;
  background: rgba(244,241,233,.84);
  backdrop-filter: blur(18px);
}

html[data-site="barcode"] .brand-mark {
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--acid);
}

html[data-site="barcode"] .hero {
  min-height: 690px;
  gap: clamp(3rem, 8vw, 8rem);
  padding-top: 6rem;
  padding-bottom: 6rem;
}

html[data-site="barcode"] .hero h1 {
  max-width: 680px;
  margin-top: .55rem;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 760;
  letter-spacing: -.065em;
  line-height: .91;
  text-transform: none;
}

html[data-site="barcode"] .hero-lead {
  max-width: 650px;
  color: #4b5362;
  font-size: 1.14rem;
  line-height: 1.75;
}

html[data-site="barcode"] .eyebrow {
  color: var(--blue);
}

html[data-site="barcode"] .button {
  border-radius: 999px;
}

html[data-site="barcode"] .button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 7px 0 var(--acid);
}

html[data-site="barcode"] .button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 0 var(--acid);
}

html[data-site="barcode"] .trust-chip {
  color: var(--blue);
}

html[data-site="barcode"] .scan-card {
  padding: 2.4rem;
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(25,36,68,.18);
  transform: rotate(2.5deg);
}

html[data-site="barcode"] .scan-card::before {
  position: absolute;
  inset: -12px 15px 12px -15px;
  z-index: -1;
  border-radius: 28px;
  content: "";
  background: var(--blue);
  transform: rotate(-4deg);
}

html[data-site="barcode"] .scan-card > span:last-child {
  border-radius: 999px;
  background: var(--acid);
}

html[data-site="barcode"] .section-heading h2 {
  max-width: 780px;
  font-size: clamp(2.7rem, 5vw, 5rem);
  letter-spacing: -.055em;
  line-height: .95;
  text-transform: none;
}

html[data-site="barcode"] .tool-search input {
  border: 1px solid #c9cccf;
  border-radius: 999px;
  background: #fff;
}

html[data-site="barcode"] .tool-grid {
  gap: 1rem;
}

html[data-site="barcode"] .tool-card {
  border-color: #d6d5d0;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
}

html[data-site="barcode"] .tool-card:hover {
  border-color: var(--blue);
  box-shadow: 0 16px 40px rgba(54,86,212,.12);
  transform: translateY(-5px);
}

html[data-site="barcode"] .tool-card > b {
  color: var(--blue);
}

/* CCTV — cinematic planning studio. */
html[data-site="cctv"] {
  --paper: #1a1e1c;
  --ink: #f7f4ec;
  --muted: #bdbdb7;
  --bg: #111413;
  --panel: #1a1e1c;
  --line: #3a403d;
  --red: #ff6b4a;
  --accent: #ff6b4a;
}

html[data-site="cctv"] body {
  background:
    radial-gradient(circle at 18% 16%, rgba(255,107,74,.13), transparent 26rem),
    radial-gradient(circle at 84% 54%, rgba(210,180,107,.07), transparent 32rem),
    var(--bg);
  color: var(--ink);
}

html[data-site="cctv"] .site-header {
  border-color: rgba(255,255,255,.1);
  background: rgba(17,20,19,.84);
  backdrop-filter: blur(18px);
}

html[data-site="cctv"] .brand,
html[data-site="cctv"] .site-nav > a,
html[data-site="cctv"] .nav-toggle {
  color: var(--ink);
}

html[data-site="cctv"] .nav-toggle {
  border: 1px solid #69736f;
  background: #1a1e1c;
}

html[data-site="cctv"] .nav-toggle:hover,
html[data-site="cctv"] .nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  background: #252a28;
}

html[data-site="cctv"] .brand small {
  color: var(--muted);
}

html[data-site="cctv"] .site-nav select {
  border-color: #69736f;
  background: #f7f4ec;
  color: #171817;
}

html[data-site="cctv"] .brand-mark {
  border-radius: 50%;
  background: var(--accent);
  color: #171817;
}

html[data-site="cctv"] .scene-hero {
  min-height: 690px;
  padding-top: 6rem;
  padding-bottom: 6rem;
  gap: clamp(3rem, 7vw, 7rem);
}

html[data-site="cctv"] .scene-hero > div:last-child {
  order: -1;
}

html[data-site="cctv"] .scene-hero h1,
html[data-site="cctv"] .tool-hero h1 {
  max-width: 700px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .94;
}

html[data-site="cctv"] .tool-hero,
html[data-site="cctv"] .tool-hero h1 {
  color: var(--ink);
}

html[data-site="cctv"] .tool-hero > p:last-child,
html[data-site="cctv"] .breadcrumbs {
  color: var(--muted);
}

html[data-site="cctv"] .breadcrumbs a {
  color: var(--ink);
}

html[data-site="cctv"] .scene-hero > div:last-child > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

html[data-site="cctv"] .frame {
  min-height: 410px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 70% 30%, #48534e, #202522 62%);
  box-shadow: 0 34px 80px rgba(0,0,0,.45);
  transform: rotate(1.5deg);
}

html[data-site="cctv"] .frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.08) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: cctvSweep 6s ease-in-out infinite;
}

html[data-site="cctv"] .frame .target {
  border-width: 2px;
  border-radius: 30% 30% 18% 18%;
  box-shadow: 0 0 30px rgba(255,107,74,.16);
}

html[data-site="cctv"] .button {
  border-radius: 999px;
}

html[data-site="cctv"] .section-heading h2 {
  font: 500 clamp(2.6rem, 5vw, 4.8rem)/1 Georgia, serif;
  letter-spacing: -.04em;
}

html[data-site="cctv"] .tool-search input {
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--ink);
}

html[data-site="cctv"] .tool-grid {
  gap: .9rem;
}

html[data-site="cctv"] .tool-card {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: rgba(255,255,255,.04);
}

html[data-site="cctv"] .tool-card:hover {
  border-color: var(--accent);
  background: rgba(255,107,74,.07);
  transform: translateY(-5px);
}

html[data-site="cctv"] .tool-card p,
html[data-site="cctv"] .tool-card small {
  color: var(--muted);
}

html[data-site="cctv"] :is(.input-card, .output-card, .history, .article, .faq) {
  border-color: #46504c;
  background: var(--panel);
  color: var(--ink);
}

html[data-site="cctv"] .output-card {
  background: #0d100f;
}

html[data-site="cctv"] :is(.input-card, .output-card) h2,
html[data-site="cctv"] .eyebrow,
html[data-site="cctv"] .input-card label b {
  color: var(--accent);
}

html[data-site="cctv"] .input-card label span,
html[data-site="cctv"] :is(.history, .article, .faq) h2,
html[data-site="cctv"] .article aside a,
html[data-site="cctv"] .guide-body :is(h2, h3, strong),
html[data-site="cctv"] .faq summary {
  color: var(--ink);
}

html[data-site="cctv"] :is(.input-card, .tool-search) input,
html[data-site="cctv"] .input-card select,
html[data-site="cctv"] .input-card textarea {
  border-color: #69736f;
  background: #f7f4ec;
  color: #171817;
  caret-color: #171817;
}

html[data-site="cctv"] .input-card :is(input, select, textarea)::placeholder {
  color: #626863;
}

html[data-site="cctv"] .button.ghost {
  border-color: #69736f;
  background: transparent;
  color: var(--ink);
}

html[data-site="cctv"] .button.ghost:hover {
  border-color: var(--accent);
  background: rgba(255,107,74,.1);
}

html[data-site="cctv"] .history-item {
  border-color: #515b57;
  background: #242927;
  color: var(--ink);
}

html[data-site="cctv"] .history-item :is(time, dt) {
  color: #c7cfca;
}

html[data-site="cctv"] .history-values div {
  background: #313734;
  color: var(--ink);
}

html[data-site="cctv"] .history-empty,
html[data-site="cctv"] .article p,
html[data-site="cctv"] .faq p,
html[data-site="cctv"] .guide-body {
  color: #d2d7d3;
}

html[data-site="cctv"] :is(.note, blockquote),
html[data-site="cctv"] .article blockquote {
  border-left-color: var(--accent);
  background: #252a28;
  color: #f7f4ec;
}

html[data-site="cctv"] :is(.note, blockquote) p {
  color: #d2d7d3;
}

html[data-site="cctv"] .faq details,
html[data-site="cctv"] .guide-body :is(th, td) {
  border-color: #515b57;
}

html[data-site="cctv"] .article aside a:hover,
html[data-site="cctv"] .faq summary:hover {
  color: var(--accent);
}

html[data-site="cctv"] .manifesto {
  border-radius: 28px;
  background: var(--accent);
  color: #171817;
}

/* Firmware — calm, precise, luminous. */
html[data-site="firmware"] {
  --bg: #071510;
  --panel: #0c2119;
  --ink: #eefbf3;
  --muted: #a7bdb1;
  --line: #254c3d;
  --mint: #79f2b1;
}

html[data-site="firmware"] body {
  background:
    radial-gradient(circle at 74% 18%, rgba(75,207,142,.13), transparent 28rem),
    radial-gradient(circle at 12% 62%, rgba(72,126,255,.08), transparent 28rem),
    var(--bg);
}

html[data-site="firmware"] .site-header {
  border-color: rgba(255,255,255,.09);
  background: rgba(7,21,16,.82);
  backdrop-filter: blur(18px);
}

html[data-site="firmware"] .brand-mark {
  border-radius: 12px;
  background: var(--mint);
  color: #071510;
}

html[data-site="firmware"] .hero {
  min-height: 690px;
  padding-top: 6rem;
  padding-bottom: 6rem;
  gap: clamp(3rem, 8vw, 8rem);
}

html[data-site="firmware"] .hero h1,
html[data-site="firmware"] .tool-hero h1 {
  max-width: 700px;
  font-weight: 650;
  letter-spacing: -.06em;
  line-height: .93;
}

html[data-site="firmware"] .hero-lead {
  max-width: 650px;
  font-size: 1.1rem;
  line-height: 1.75;
}

html[data-site="firmware"] .hero-terminal {
  overflow: hidden;
  border: 1px solid rgba(121,242,177,.35);
  border-radius: 22px;
  background: rgba(3,13,9,.72);
  box-shadow: 0 35px 90px rgba(0,0,0,.42), 0 0 80px rgba(121,242,177,.06);
  transform: perspective(900px) rotateY(-4deg) rotateZ(1deg);
}

html[data-site="firmware"] .hero-terminal::after {
  position: absolute;
  right: -55px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(121,242,177,.25);
  border-radius: 50%;
  content: "";
}

html[data-site="firmware"] .button {
  border-radius: 999px;
}

html[data-site="firmware"] .button.primary {
  box-shadow: 0 8px 30px rgba(121,242,177,.2);
}

html[data-site="firmware"] .section-heading h2 {
  max-width: 720px;
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  letter-spacing: -.05em;
  line-height: .98;
}

html[data-site="firmware"] .tool-search input {
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}

html[data-site="firmware"] .tool-card {
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}

html[data-site="firmware"] .tool-card:hover {
  border-color: var(--mint);
  background: rgba(121,242,177,.07);
  transform: translateY(-5px);
}

/* Packaging — tactile, warm and typographic. */
html[data-site="packaging"] {
  --paper: #f5eee2;
  --ink: #29231c;
  --muted: #6c6257;
  --line: #d8c6af;
  --accent: #c84a2d;
  --accent-2: #8c4d22;
}

html[data-site="packaging"] body {
  background:
    radial-gradient(circle at 82% 13%, rgba(200,74,45,.09), transparent 26rem),
    linear-gradient(90deg, rgba(80,55,30,.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 72px 100%, auto;
}

html[data-site="packaging"] .site-header {
  border-color: rgba(80,55,30,.12);
  background: rgba(245,238,226,.84);
  backdrop-filter: blur(18px);
}

html[data-site="packaging"] .brand-mark {
  box-shadow: 0 6px 18px rgba(200,74,45,.18);
}

html[data-site="packaging"] .pack-hero {
  min-height: 680px;
  padding-top: 6rem;
  padding-bottom: 6rem;
  gap: clamp(3rem, 8vw, 8rem);
}

html[data-site="packaging"] .pack-hero h1,
html[data-site="packaging"] .tool-hero h1 {
  max-width: 720px;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .92;
}

html[data-site="packaging"] .hero-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

html[data-site="packaging"] .button {
  border-radius: 999px;
}

html[data-site="packaging"] .pack-visual {
  filter: drop-shadow(0 30px 28px rgba(83,48,22,.22));
  transform: rotate(-2deg);
}

html[data-site="packaging"] .box-face {
  border-color: #834916;
}

html[data-site="packaging"] .section-heading h2 {
  max-width: 830px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1;
}

html[data-site="packaging"] .tool-search input {
  box-shadow: 0 8px 24px rgba(80,55,30,.06);
}

html[data-site="packaging"] .tool-card {
  border-radius: 22px;
  background: rgba(255,252,247,.8);
  box-shadow: 0 10px 30px rgba(80,55,30,.04);
}

html[data-site="packaging"] .tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 45px rgba(100,55,25,.11);
  transform: translateY(-5px) rotate(-.3deg);
}

/* Pneumatic — airy and approachable instead of a dark control panel. */
html[data-site="pneumatic"] {
  --ink: #102c38;
  --muted: #58717a;
  --bg: #eaf5f2;
  --panel: #f8fcfa;
  --line: #b8d5d0;
  --accent: #087f78;
  --hot: #e6803b;
}

html[data-site="pneumatic"] body {
  background:
    radial-gradient(circle at 80% 16%, rgba(41,173,165,.18), transparent 25rem),
    radial-gradient(circle at 15% 65%, rgba(255,255,255,.9), transparent 30rem),
    var(--bg);
  color: var(--ink);
}

html[data-site="pneumatic"] .site-header {
  border-color: rgba(16,44,56,.1);
  background: rgba(234,245,242,.84);
  backdrop-filter: blur(18px);
}

html[data-site="pneumatic"] .brand-mark {
  border-color: var(--accent);
  background: #fff;
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(8,127,120,.12);
}

html[data-site="pneumatic"] .site-nav select,
html[data-site="pneumatic"] input,
html[data-site="pneumatic"] select,
html[data-site="pneumatic"] textarea {
  border-color: var(--line);
  background: rgba(255,255,255,.74);
  color: var(--ink);
}

html[data-site="pneumatic"] .air-hero {
  min-height: 680px;
  padding-top: 6rem;
  padding-bottom: 6rem;
  gap: clamp(3rem, 8vw, 8rem);
}

html[data-site="pneumatic"] .air-hero h1,
html[data-site="pneumatic"] .tool-hero h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .94;
}

html[data-site="pneumatic"] .air-hero p,
html[data-site="pneumatic"] .tool-hero > p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

html[data-site="pneumatic"] .button {
  border-radius: 999px;
}

html[data-site="pneumatic"] .primary {
  background: var(--accent);
  color: #fff;
}

html[data-site="pneumatic"] .gauge {
  width: 300px;
  border: 14px solid #fff;
  background: rgba(255,255,255,.42);
  box-shadow: 0 0 0 1px rgba(8,127,120,.12), 0 35px 70px rgba(17,76,78,.16);
}

html[data-site="pneumatic"] .gauge::after {
  position: absolute;
  inset: -42px;
  z-index: -1;
  border: 1px dashed rgba(8,127,120,.25);
  border-radius: 50%;
  content: "";
  animation: airOrbit 24s linear infinite;
}

html[data-site="pneumatic"] .section-heading h2 {
  max-width: 760px;
  font: 500 clamp(2.6rem, 5vw, 4.8rem)/1 Georgia, serif;
  letter-spacing: -.045em;
}

html[data-site="pneumatic"] .tool-search input {
  border-radius: 999px;
  background: rgba(255,255,255,.8);
}

html[data-site="pneumatic"] .tool-card,
html[data-site="pneumatic"] .work-panel,
html[data-site="pneumatic"] .history-panel,
html[data-site="pneumatic"] .article-layout,
html[data-site="pneumatic"] .faq-section {
  border-color: rgba(8,127,120,.16);
  border-radius: 20px;
  background: rgba(255,255,255,.68);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(17,76,78,.055);
}

html[data-site="pneumatic"] .tool-card:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-5px);
}

html[data-site="pneumatic"] .metric {
  border-color: var(--line);
  background: #eaf5f2;
}

html[data-site="pneumatic"] .note {
  border-left-color: var(--hot);
  background: #dceee9;
  color: #173b43;
}

html[data-site="pneumatic"] .note strong {
  color: #173b43;
}

html[data-site="pneumatic"] .note p {
  color: #49666c;
}

html[data-site="pneumatic"] .site-footer {
  border-color: rgba(255,255,255,.1);
  background: #102c38;
  color: #fff;
}

html[data-site="pneumatic"] .site-footer .footer-bottom,
html[data-site="pneumatic"] .site-footer p {
  color: #bdd0d4;
}

@keyframes cctvSweep {
  0%, 25% { transform: translateX(-110%); }
  65%, 100% { transform: translateX(110%); }
}

@keyframes airOrbit {
  to { transform: rotate(1turn); }
}

@media (max-width: 850px) {
  .site-header .header-inner {
    min-height: 58px;
  }

  .history-items,
  html[data-site="bankfile"] .tool-list {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-site="bankfile"] .ledger-hero,
  html[data-site="barcode"] .hero,
  html[data-site="cctv"] .scene-hero,
  html[data-site="firmware"] .hero,
  html[data-site="packaging"] .pack-hero,
  html[data-site="pneumatic"] .air-hero {
    width: min(100% - 24px, 1180px);
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: auto;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
    margin-inline: auto;
    overflow: hidden;
  }

  html[data-site="bankfile"] .ledger-hero > *,
  html[data-site="barcode"] .hero > *,
  html[data-site="cctv"] .scene-hero > *,
  html[data-site="firmware"] .hero > *,
  html[data-site="packaging"] .pack-hero > *,
  html[data-site="pneumatic"] .air-hero > * {
    min-width: 0;
    width: min(100%, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  html[data-site="bankfile"] .ledger-hero h1,
  html[data-site="barcode"] .hero h1,
  html[data-site="cctv"] .scene-hero h1,
  html[data-site="firmware"] .hero h1,
  html[data-site="packaging"] .pack-hero h1,
  html[data-site="pneumatic"] .air-hero h1,
  html[data-site="bankfile"] .ledger-hero p,
  html[data-site="barcode"] .hero p,
  html[data-site="cctv"] .scene-hero p,
  html[data-site="firmware"] .hero p,
  html[data-site="packaging"] .pack-hero p,
  html[data-site="pneumatic"] .air-hero p {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  html[data-site="bankfile"] .ledger-hero pre,
  html[data-site="barcode"] .scan-card,
  html[data-site="cctv"] .frame,
  html[data-site="firmware"] .hero-terminal {
    width: min(100%, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  html[data-site="cctv"] .scene-hero > div:last-child {
    order: 0;
  }

  html[data-site="cctv"] .frame {
    min-height: 300px;
  }

  html[data-site="pneumatic"] .site-nav {
    background: #eaf5f2;
  }

  html[data-site="pneumatic"] .nav-toggle {
    border-color: var(--line);
    color: var(--ink);
  }
}

@media (max-width: 540px) {
  html[data-site="bankfile"] .ledger-hero h1,
  html[data-site="barcode"] .hero h1,
  html[data-site="cctv"] .scene-hero h1,
  html[data-site="firmware"] .hero h1,
  html[data-site="packaging"] .pack-hero h1,
  html[data-site="pneumatic"] .air-hero h1 {
    font-size: clamp(2.7rem, 13vw, 3.7rem);
  }

  html[data-site="bankfile"] .ledger-hero pre::after {
    display: none;
  }

  html[data-site="barcode"] .scan-card {
    transform: none;
  }

  html[data-site="pneumatic"] .gauge {
    width: 220px;
  }
}

/* Tool pages: keep the working area close to the header and avoid oversized
   editorial spacing around calculators, history and supporting content. */
article[data-tool-id] > .tool-hero {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: clamp(.85rem, 2vw, 1.35rem);
}

article[data-tool-id] {
  max-width: 100%;
  overflow-x: hidden;
}

article[data-tool-id] > *,
article[data-tool-id] .tool-workspace > *,
article[data-tool-id] .workspace > *,
article[data-tool-id] .console > * {
  min-width: 0;
}

article[data-tool-id] .tool-heading {
  gap: 1rem;
  margin-top: 1rem;
}

article[data-tool-id] .tool-hero h1 {
  max-width: 100%;
  margin-top: .25rem;
  margin-bottom: .65rem;
  overflow-wrap: anywhere;
}

article[data-tool-id] .tool-hero > p:last-child,
article[data-tool-id] .tool-heading p:last-child {
  margin-bottom: 0;
}

article[data-tool-id] > :is(.tool-workspace, .workspace, .console) {
  margin-top: 0;
  padding-top: .45rem;
  padding-bottom: 1.35rem;
}

article[data-tool-id] .work-panel {
  min-height: 0;
}

article[data-tool-id] .result-empty {
  min-height: 280px;
}

article[data-tool-id] > .wt_t_b_bt {
  width: min(1180px, calc(100% - 36px)) !important;
  margin: .25rem auto .75rem;
  padding: 0;
  overflow: hidden;
}

article[data-tool-id] > :is(.history-panel, .history) {
  margin-top: .75rem;
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
}

article[data-tool-id] > :is(.article-layout, .article) {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  gap: clamp(1.5rem, 4vw, 3rem);
}

article[data-tool-id] > :is(.faq-section, .faq) {
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

@media (max-width: 850px) {
  article[data-tool-id] > .tool-hero {
    padding-top: 1.25rem;
    padding-bottom: .7rem;
  }

  article[data-tool-id] .tool-heading {
    margin-top: .7rem;
  }

  article[data-tool-id] .tool-hero h1 {
    font-size: clamp(2.1rem, 8.2vw, 2.5rem);
  }

  article[data-tool-id] .breadcrumbs {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  article[data-tool-id] :is(.work-panel, .input-card, .output-card, .source, .report) {
    width: 100%;
    min-width: 0;
  }

  article[data-tool-id] .tool-icon.large {
    width: 52px;
    height: 52px;
    margin-bottom: .55rem;
  }

  article[data-tool-id] > :is(.tool-workspace, .workspace, .console) {
    padding-top: .3rem;
    padding-bottom: 1rem;
  }

  article[data-tool-id] .result-empty {
    min-height: 190px;
  }

  article[data-tool-id] > .wt_t_b_bt {
    width: min(100% - 24px, 1180px) !important;
    margin-top: .15rem;
    margin-bottom: .6rem;
  }

  article[data-tool-id] > :is(.history-panel, .history),
  article[data-tool-id] > :is(.article-layout, .article),
  article[data-tool-id] > :is(.faq-section, .faq) {
    margin-top: .75rem;
    padding-top: 1.1rem;
    padding-bottom: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(html) { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
