/* Profikom's technical pages use the original Tallyfold theme and panel components. */
:root {
  --brand-amber: #eb980e;
  --paper: var(--bg);
  --surface: var(--panel);
  --white: #fff;
  --ink: var(--text);
  --accent-fg: var(--btn-text);
  --accent-tint: var(--accent-bg);
  --accent-hover: var(--btn-hover);
  --accent-text: var(--accent);
  --blue-dark: var(--accent);
  --ice: var(--accent-bg);
  --dark-surface: var(--panel);
  --dark-line: var(--line);
  --dark-muted: var(--muted);
  --font: var(--sans);
  --display: var(--sans);
  --gutter: var(--pad);
  --radius-control: 4px;
  --motion-feedback: 160ms;
  --motion-enter: 240ms;
  --ease: cubic-bezier(.23,1,.32,1);
}
.tally-site {
  --content-inset: clamp(18px, 2.6vw, 36px);
  --section-space: clamp(36px, 6vw, 84px);
  font-size: var(--f-md);
  color: var(--text);
  line-height: 1.55;
}
.tally-site .wrap { width: min(calc(100% - 2 * var(--pad)), calc(1360px - 2 * var(--pad))); }
.tally-site :where(main a:not(.button,.btn,.go), .photo-credits a) { color: var(--accent); }
.tally-site :where(main p a, main li a, main dd a, .link, .photo-credits a) { text-decoration: underline; }
.tally-site main { background: var(--bg); }
.tally-site main :where(h1,h2,h3,h4) { font-family: var(--sans); font-weight: 500; }
.tally-site main h1 { font-size: clamp(32px, 5.1vw, 66px); line-height: 1.03; letter-spacing: -.035em; }
.tally-site main h2 { font-size: var(--f-3xl); line-height: 1.12; letter-spacing: -.024em; }
.tally-site main h3 { font-size: var(--f-xl); }
.tally-site main :where(.lede,.head > p) { font-size: var(--f-lg); line-height: 1.48; color: var(--muted); }
.tally-site main :where(.eyebrow,.blog-meta,.caption,.schedule-header > span,.error-status) { font-family: var(--mono); }
.tally-site main :where(ol,ul):not([role="list"],.grid,.docs ul,.schedule-rows,.case-gallery,.proof-list,.article-toc ul,.home-document ul) { padding-inline-start: 1.3rem; }
.tally-site main :where(.editorial-rules,.solution-timeline,.reference-links,.blog-prose ul,.blog-prose ol,.technical-content ul) { list-style: revert; }
.tally-site main :where(ul):not([class],[role="list"]) { list-style: disc; }
.tally-site main :where(ol):not([class],[role="list"]) { list-style: decimal; }
.tally-site [hidden] { display: none !important; }
.tally-site .bar .shell { gap: 16px; }
.tally-site .bar .nav { margin-inline-start: 8px; }
.tally-site .nav [aria-current], .tally-site .sheet [aria-current] { background: var(--accent-bg); color: var(--accent); }
.tally-site .logo img { width: clamp(102px, 13vw, 145px); height: auto; }
.tally-site .profikom-logo { position: relative; }
[data-theme="dark"] .profikom-logo {
  /* The area between the mark and wordmark in the official transparent PNG. */
  --logo-split: 23%;
}
[data-theme="dark"] .profikom-logo img {
  clip-path: inset(0 calc(100% - var(--logo-split)) 0 0);
}
[data-theme="dark"] .profikom-logo::after {
  position: absolute;
  inset: 0;
  background: url("/assets/img/profikom-official.png") center / 100% 100% no-repeat;
  clip-path: inset(0 0 0 var(--logo-split));
  filter: brightness(0) invert(1);
  pointer-events: none;
  content: "";
}
.tally-site .menu { border: 0; margin: 0; }
.tally-site .menu summary { min-height: 36px; padding: 0 12px; }
.tally-site .menu summary::after { content: none; }
.tally-site .menu > .sheet { margin: 0; }
.tally-site .menu[open] > .sheet a { color: var(--text); }
.tally-site .menu[open] > .sheet a.btn-main { color: var(--btn-text); }
html:not(.js) .theme { display: none; }
.tally-site .block .tag { color: var(--accent); }
.tally-site .tally-home .hero-title { align-content: center; }
.tally-site .tally-home .hero h1 { font-size: var(--f-hero); line-height: .98; max-width: none; }
.tally-site .tally-home .head h2 { font-size: var(--f-4xl); }
.tally-site .tally-home .section { padding-block: 0; }
.tally-site .card > p, .tally-site .story > p, .tally-site .tally-desk p { color: var(--muted); }
.tally-site .home-document { margin-top: var(--g); }
.tally-site .tally-photo { padding-block: var(--p1) 0; }
.tally-photo img, .desk-photo img { width: 100%; height: auto; aspect-ratio: 2; object-fit: cover; }
.tally-photo img { aspect-ratio: 1.85; object-position: 50% 48%; }
.tally-desk { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); align-items: center; gap: var(--p3); }
.tally-desk .go { margin-top: var(--p2); }
.cta-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tally-site .faq > .link { margin-block: var(--p1) var(--p2); }
.tally-site .faq summary { padding-inline-end: var(--p3); }
.tally-site .faq details { border: 0; }
.tally-site .faq details + details { border-top: 1px solid var(--line-soft); }
.tally-site .faq .details-panel p { margin: 0; }
.chamber-art { padding: clamp(10px, 2.8vw, 34px) clamp(3px, 2vw, 28px) 0; }
.chamber-art svg { display: block; width: 100%; height: auto; }
.chamber-labels { display: grid; grid-template-columns: 1fr 1.2fr 1fr; padding: 0 var(--pad) 12px; color: var(--muted); text-align: center; }
.profikom-chamber .frame { stroke: var(--illos-line); }
.profikom-chamber .muted { stroke: var(--tick); }
.profikom-chamber .signal { stroke: var(--illos-accent); }
.profikom-chamber .panel { fill: var(--accent-bg); }
.profikom-chamber .instrument { fill: var(--panel); }
@media (prefers-reduced-motion: no-preference) {
  .profikom-chamber .pulse { stroke-dasharray: 9 155; animation: signal-trace 3.6s linear infinite; animation-play-state: var(--illos-play, running); }
}
@keyframes signal-trace { to { stroke-dashoffset: -328; } }

.tally-site main:not(.tally-home) .section,
.tally-site main:not(.tally-home) .solution-story,
.tally-site main:not(.tally-home) .page-hero,
.tally-site main:not(.tally-home) .case-intro,
.tally-site main:not(.tally-home) .cta-band { background: var(--bg); border: 0; }
.tally-site main:not(.tally-home) :is(.editorial-heading,.blog-hero,.case-title-block,.request-intro,.data-intro,.error-content),
.tally-site main:not(.tally-home) :is(.section-head,.blog-toc) { min-width: 0; }
.tally-site main:not(.tally-home) .editorial-heading { padding-block-start: 0; }
.tally-site main:not(.tally-home) :is(.solution-overview,.retrofit-overview,.reference-wrap,.technical-reading,.blog-page) { padding-top: var(--g); }
.tally-site .cta-band { padding-block: var(--p3) 0; }
.tally-site .cta-band .wrap { padding: var(--content-inset); }
.tally-site .cta-band .wrap a.button { background: var(--btn); border-color: var(--btn); color: var(--btn-text); }
.tally-site .cta-band .wrap a.button:hover { background: var(--btn-hover); }
.tally-site :is(.button,.btn-main) { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.tally-site .button {
  min-height: 44px; padding: 8px 18px; border-radius: 6px;
  font: 500 var(--f-sm)/1.25 var(--sans);
  background: var(--btn); border-color: var(--btn); color: var(--btn-text);
}
.tally-site .button:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.tally-site :is(.button-secondary,.button--secondary) { background: transparent; border-color: var(--line); color: var(--text); }
.tally-site :is(.button-secondary,.button--secondary):hover { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
.tally-site .request-layout { gap: var(--g); }
.tally-site .request-intro, .tally-site .request-aside { padding: var(--content-inset); }
.tally-site .request-card { --field-line: var(--tick); --form-error: var(--illos-alert); border-radius: 4px; }
.tally-site .request-card textarea, .tally-site .request-card input:not([type="radio"]) { background: var(--bg); color: var(--text); }
.tally-site .request-scenarios label { background: var(--bg); }
.tally-site .request-scenarios label:has(input:checked) { background: var(--accent-bg); }
.tally-site .request-card .request-scenarios label { color: var(--text); }
.tally-site .request-card .request-scenarios label:has(input:checked) { color: var(--accent); }
.tally-site .home-document-record { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.tally-site .home-document-record :is(dt,dd,a) { color: var(--text); }
.tally-site .home-document-record dl > div { border-color: var(--line); }
.tally-site .home-document-photo { background: var(--panel); }
.tally-site .home-document-photo figcaption { color: var(--muted); }
.tally-site thead th { background: var(--accent-bg); }
.tally-site .schedule-band { color: var(--text); }
.tally-site .schedule-ripen { --band-fill: var(--accent-bg); --band-line: var(--accent); }
.tally-site .schedule-store { --band-fill: var(--bg); --band-line: var(--tick); }
.tally-site .schedule-check { --band-fill: var(--line-soft); --band-line: var(--soft); }
.tally-site .schedule-ship { --band-fill: var(--btn); --band-line: var(--btn); color: var(--btn-text); }
.tally-site :is(.engineering-links,.blog-prose,.technical-content) { min-width: 0; }
.tally-site .article-figure { border-color: var(--line); }
.tally-site :is(.solution-story,.audience-hero) .section-head h2 { font-size: var(--f-3xl); }
.tally-site .tally-well { padding: var(--content-inset); }
.tally-site .tally-well > h1 { max-width: 21ch; }

@media (max-width: 1023px) {
  .tally-desk { grid-template-columns: 1fr; gap: var(--p2); }
  .cta-actions { justify-content: flex-start; }
  .tally-site main h1 { font-size: clamp(32px, 5.9vw, 55px); }
}
@media (max-width: 480px) {
  .tally-site .chamber-labels { font-size: 9px; padding-inline: 4px; gap: 4px; }
  .tally-site .faq summary { font-size: var(--f-md); }
  .tally-site .hero-actions { align-items: flex-start; }
}

@font-face {
  font-family: "Profikom Mono Cyrillic";
  src: url("/assets/fonts/ibm-plex-mono-cyrillic-500.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
:root {
  --sans: "Inter", "Fixel Text", system-ui, sans-serif;
  --mono: "Geist Mono", "Profikom Mono Cyrillic", ui-monospace, monospace;
}
.tally-site .blog-list { padding-inline: var(--content-inset); }
.tally-site .blog-list > li:last-child { border-bottom: 0; }
.tally-site .blog-topic { font: 500 var(--f-xs)/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.tally-site .blog-controls { max-width: 100%; }
.tally-site .blog-control-query input { background: var(--panel); }
.tally-site svg.sf-connections {
  --_ground: var(--illos-ground);
  --_ink: var(--illos-ink);
  --_line: var(--illos-line);
  --_faint: var(--illos-faint);
  --_accent: var(--illos-accent);
  --_accent-dim: var(--illos-accent-dim);
  --_alert: var(--illos-alert);
}

.tally-site .request-quick-contacts { padding-inline-start: 0; }
.tally-site .request-quick-contacts a { overflow-wrap: anywhere; }
@media (max-width: 350px) {
  .tally-site .request-quick-contacts { grid-template-columns: minmax(0, 1fr); }
}

/* Utility pages keep one working surface and a plain information column. */
.tally-site .request-intake .request-layout {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: clamp(28px, 6vw, 84px);
  row-gap: 28px;
}
.tally-site .request-intake .request-intro,
.tally-site .request-intake .request-aside { padding: 0; }
.tally-site .request-intro h1 { font-size: clamp(34px, 4.1vw, 56px); max-width: none; }
.tally-site .request-direct { border-top: 1px solid var(--line); padding-block-start: 14px; }
.tally-site .request-direct h2 { font-size: var(--f-lg); }
.tally-site .request-direct address { margin-top: var(--p1); }
.tally-site .request-quick-contacts { grid-template-columns: 1fr; margin-block: 6px 0; gap: 0; }
.tally-site .request-quick-contacts a { display: inline-flex; min-block-size: 36px; border: 0; background: transparent; padding: 1px 0; }
.tally-site .request-quick-contacts a:hover { text-decoration: underline; }
.tally-site .request-card .request-scenarios { gap: 6px; }
.tally-site .request-card .request-scenarios label { min-block-size: 44px; }
.tally-site .request-card .request-contact { padding-block-start: 10px; border-top: 1px solid var(--line); }
.tally-site .request-card .request-contact legend { padding-inline-end: 10px; }
.tally-site .request-form-head:has(.visually-hidden:only-child) { display: contents; }
.tally-site .request-form-head .visually-hidden:focus-visible {
  position: static; width: auto; height: auto; clip-path: none; white-space: normal;
}
.tally-site .request-draft :is(.button-secondary,.request-edit) { min-block-size: 44px; }
.tally-site .data-intro .button { margin-top: var(--p2); }
.tally-site .request-notice { background: transparent; border-top: 1px solid var(--line); }
.tally-site .data-row { padding-inline: 0; }
.tally-site .data-row h2 { font-size: var(--f-lg); }
.tally-site .error-layout { padding-inline: clamp(0px, 2vw, 24px); }
.tally-site .error-routes ul { padding-inline-start: 0; }
@media (max-width: 800px) {
  .tally-site .request-intake .request-layout { grid-template-columns: minmax(0, 1fr); row-gap: var(--p2); }
  .tally-site .request-intro .lede { max-width: 54ch; }
}

.tally-site .menu .sheet {
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (pointer: coarse) {
  .tally-site .menu summary { min-height: 44px; }
}

/* Technical drawings use the same line weights and signal colours as the main chamber. */
.blueprint-lead {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(22px, 4vw, 62px);
  margin-bottom: var(--p3);
}
.tally-site .blueprint-lead > header { margin: 0; }
.tally-site .blueprint-figure { padding: 0; }
.blueprint-stage {
  padding: clamp(8px, 2vw, 22px);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--tick) 28%, transparent) .7px, transparent 1.2px);
  background-size: 14px 14px;
  background-position: center;
}
.blueprint-stage .tally-blueprint {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tally-blueprint :is(path, rect, circle, ellipse, polygon, line, polyline) { vector-effect: non-scaling-stroke; }
.tally-blueprint .blueprint-line { stroke: var(--illos-line); }
.tally-blueprint .blueprint-muted { stroke: var(--tick); opacity: .72; }
.tally-blueprint .blueprint-fill { fill: var(--accent-bg); stroke: var(--illos-line); }
.tally-blueprint .blueprint-accent, .tally-blueprint .blueprint-trace { stroke: var(--illos-accent); }
.tally-blueprint .blueprint-point, .profikom-chamber .blueprint-point { fill: var(--brand-amber); stroke: none; }
.blueprint-figure figcaption { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.storage-visual { display: grid; gap: var(--g); min-width: 0; }
.storage-visual .storage-photo img { aspect-ratio: 2.2; object-fit: cover; }
.monitoring-map > .blueprint-stage { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.monitoring-map > .blueprint-stage svg { max-width: 760px; margin: 0 auto; }
@media (max-width: 860px) {
  .blueprint-lead { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .tally-blueprint .blueprint-trace {
    stroke-dasharray: 8 135;
    animation: blueprint-travel 3.4s linear infinite;
    animation-play-state: var(--illos-play, running);
  }
}
@keyframes blueprint-travel { to { stroke-dashoffset: -286; } }

/* FAQ stays in the document and uses the native disclosure control on every page. */
.tally-site .content-faq {
  margin-block: clamp(30px, 5vw, 68px);
  padding-block-start: var(--p2);
  border-block-start: 1px solid var(--line);
}
.tally-site .content-faq:not(.content-faq-inline):not(.content-faq-article) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: var(--p2) clamp(24px, 5vw, 70px);
}
.tally-site .content-faq-inline { margin: 0; padding: 0; border: 0; }
.tally-site .content-faq-inline h2,
.tally-site .content-faq-article h2 { margin-block-end: var(--p1); }
.tally-site .faq-items { min-width: 0; }
.tally-site .faq-items details { border-block-end: 0; }
.tally-site .faq-items details:last-child { border-block-end: 1px solid var(--line); }
.tally-site .faq-items summary {
  min-height: 52px;
  padding-block: 12px;
  padding-inline-end: 2.25rem;
  font-size: var(--f-md);
  line-height: 1.4;
  text-wrap: pretty;
}
.tally-site .faq-items summary:hover { color: var(--accent); }
.tally-site .faq-items .details-panel p { max-width: 64ch; padding-inline-end: .5rem; }
.tally-site .case-context { padding-block: var(--p3); background: var(--bg); }
.case-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--p2) clamp(24px, 5vw, 70px);
}
.case-context-grid h2 { margin-block-end: .55rem; }
.case-context-grid p { color: var(--muted); }
.case-reference { grid-column: 1 / -1; }
.case-quick-links { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; }

@media (max-width: 50rem) {
  .tally-site .content-faq:not(.content-faq-inline):not(.content-faq-article),
  .case-context-grid { grid-template-columns: minmax(0, 1fr); }
  .tally-site .faq-items summary { min-height: 48px; }
}

/* Editorial illustrations explain the section inline and keep the labels as selectable text. */
.tally-site .editorial-blueprint {
  --blueprint-outline: #717780;
  margin-block: var(--p2);
}
[data-theme="dark"] .tally-site .editorial-blueprint { --blueprint-outline: #a8adb6; }
.tally-site .editorial-blueprint :is(.blueprint-line,.blueprint-fill) { stroke: var(--blueprint-outline); }
.tally-site .editorial-blueprint .blueprint-stage {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--tick) 22%, transparent) .7px, transparent 1.2px);
}
.blueprint-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  color: var(--ink);
  font: 400 var(--f-xs)/1.35 var(--sans);
  text-align: center;
  text-wrap: balance;
}
.tally-site .solution-blueprint-lead .editorial-blueprint { margin-block: 0; }
@media (max-width: 40rem) {
  .tally-site .editorial-blueprint .blueprint-stage { padding-inline: 8px; }
  .tally-site .editorial-blueprint figcaption { padding: 10px 12px; }
  .blueprint-key { font-size: 11px; gap: .3rem; }
}
