/* Acclaira article kit (aeo-toolchain/article-kit, 17 Oct 2026) - base mechanics for every client article page.
   Each site's own stylesheet SKINS this: it sets the tokens below on :root and overrides what its design needs, so
   the "On this page" list and the tables look native to that site. Never below 12px (design_gate type floor).
   Tokens: --ak-ink --ak-muted --ak-rule --ak-accent --ak-surface --ak-tint --ak-zebra --ak-radius --ak-top
           --ak-side --ak-gap --ak-ui-font */

/* ---- layout: article column + sticky side column (wide screens only) ---- */
.ak-layout { display: block; }
.ak-aside { display: none; }
@media (min-width: 1100px) {
  .ak-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--ak-side, 264px);
    column-gap: var(--ak-gap, 64px);
    align-items: start;
  }
  .ak-layout > .ak-main { min-width: 0; }
  .ak-aside { display: block; align-self: stretch; }
  .ak-aside__inner {
    position: sticky;
    top: var(--ak-top, 96px);
    max-height: calc(100vh - var(--ak-top, 96px) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-bottom: 8px;
  }
}

[data-ak-article] :is(h2, h3)[id] { scroll-margin-top: calc(var(--ak-top, 96px) + 20px); }
@media (prefers-reduced-motion: no-preference) {
  html:has([data-ak-toc]) { scroll-behavior: smooth; }
}

/* ---- "On this page" ---- */
.ak-toc { font-family: var(--ak-ui-font, inherit); }
.ak-toc__label {
  margin: 0 0 14px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ak-muted, #5b6270);
}
.ak-toc__progress {
  position: relative;
  height: 2px;
  margin: 0 0 16px;
  overflow: hidden;
  background: var(--ak-rule, rgba(0, 0, 0, .12));
}
.ak-toc__progress::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--ak-progress, 0));
  background: var(--ak-accent, currentColor);
}
.ak-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
  counter-reset: ak;
}
.ak-toc__list li { margin: 0; padding: 0; }
.ak-toc__list li::before, .ak-toc__list li::marker { content: none; }
.ak-toc__list a {
  display: flex;
  gap: 10px;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  color: var(--ak-muted, #5b6270);
  font-size: .875rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.ak-toc__list a:hover { color: var(--ak-ink, #111); }
.ak-toc__list a[aria-current="true"] {
  color: var(--ak-ink, #111);
  border-left-color: var(--ak-accent, currentColor);
  font-weight: 600;
}
.ak-toc__list a:focus-visible { outline: 2px solid var(--ak-accent, currentColor); outline-offset: 2px; }
.ak-toc--num .ak-toc__list a::before {
  counter-increment: ak;
  content: counter(ak, decimal-leading-zero);
  flex: none;
  min-width: 1.6em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ak-muted, #5b6270);
  opacity: .8;
}
.ak-toc__foot { margin-top: 18px; }
.ak-toc__top {
  font-size: .8125rem;
  color: var(--ak-muted, #5b6270);
  text-decoration: none;
}
.ak-toc__top:hover { color: var(--ak-ink, #111); }
.ak-aside__extra { margin-top: 28px; }

/* phones and tablets: a folded list under the opening answer */
.ak-toc-m {
  margin: 28px 0;
  border: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
  border-radius: var(--ak-radius, 10px);
  background: var(--ak-surface, transparent);
}
.ak-toc-m > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ak-ink, #111);
}
.ak-toc-m > summary::-webkit-details-marker { display: none; }
.ak-toc-m > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.ak-toc-m[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.ak-toc-m > summary:focus-visible { outline: 2px solid var(--ak-accent, currentColor); outline-offset: 2px; }
.ak-toc-m__count { margin-left: auto; font-weight: 400; font-size: .8125rem; color: var(--ak-muted, #5b6270); }
.ak-toc-m .ak-toc__list { margin: 0 18px 16px; }
@media (min-width: 1100px) { .ak-toc-m { display: none; } }

/* ---- tables: framed, readable, scroll inside their own box on small screens ---- */
.ak-table {
  position: relative;
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
  border-radius: var(--ak-radius, 10px);
  background:
    linear-gradient(to right, var(--ak-surface, #fff) 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--ak-surface, #fff) 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0)) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0)) right / 14px 100% no-repeat scroll,
    var(--ak-surface, #fff);
}
.ak-table:focus-visible { outline: 2px solid var(--ak-accent, currentColor); outline-offset: 2px; }
.ak-table > table {
  width: 100%;
  min-width: max(100%, calc(var(--ak-cols, 1) * var(--ak-colw, 8.5rem)));
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9375rem;
  line-height: 1.5;
  background: none;
}
.ak-table > table > caption {
  caption-side: top;
  padding: 12px 16px;
  text-align: left;
  font-size: .8125rem;
  color: var(--ak-muted, #5b6270);
  border-bottom: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
}
.ak-table :is(th, td) {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
  background: none;
}
.ak-table thead :is(th, td) {
  vertical-align: bottom;
  background: var(--ak-tint, rgba(0, 0, 0, .04));
  color: var(--ak-ink, #111);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.ak-table tbody tr:nth-child(even) > * { background: var(--ak-zebra, transparent); }
.ak-table tbody tr:last-child > * { border-bottom: 0; }
.ak-table tbody th { font-weight: 600; color: var(--ak-ink, #111); }
/* tabular figures only in number cells: in Inter and similar faces `tnum` also widens the hyphen, which spaced out
   words like "high-temperature" in whole tables (17 Oct 2026) */
.ak-table .ak-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ak-table .ak-nw, .ak-toc .ak-nw { white-space: nowrap; }
.ak-table.is-scrollable :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ak-surface, #fff);
  box-shadow: inset -1px 0 0 var(--ak-rule, rgba(0, 0, 0, .12));
}
.ak-table.is-scrollable thead :is(th, td):first-child {
  background: linear-gradient(var(--ak-tint, rgba(0, 0, 0, .04)) 0 0), var(--ak-surface, #fff);
}
/* p.ak-table-hint after .ak-table: specific enough to beat a site's `.prose p` / `.article-body p` rules */
.ak-table + p.ak-table-hint {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--ak-muted, #5b6270);
}
.ak-table + p.ak-table-hint::after { content: "\2192"; }
.ak-table.is-scrollable + p.ak-table-hint { display: flex; }
.ak-table.is-scrollable.at-end + p.ak-table-hint { opacity: .55; }

/* text-heavy tables become one card per row on phones */
@media (max-width: 640px) {
  .ak-table--stack {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .ak-table--stack > table { min-width: 0; }
  .ak-table--stack > table,
  .ak-table--stack > table > tbody,
  .ak-table--stack > table > tbody > tr,
  .ak-table--stack > table > tbody > tr > :is(td, th) { display: block; width: 100%; }
  .ak-table--stack > table > caption { display: block; padding: 0 0 10px; border: 0; }
  .ak-table--stack > table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .ak-table--stack > table > tbody > tr {
    margin: 0 0 12px;
    padding: 6px 0;
    border: 1px solid var(--ak-rule, rgba(0, 0, 0, .12));
    border-radius: var(--ak-radius, 10px);
    background: var(--ak-surface, #fff);
  }
  .ak-table--stack > table > tbody > tr > * { padding: 8px 16px; border: 0; background: none; }
  .ak-table--stack tbody tr:nth-child(even) > * { background: none; }
  .ak-table--stack > table > tbody > tr > :first-child {
    padding-top: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ak-ink, #111);
  }
  .ak-table--stack [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ak-muted, #5b6270);
  }
  .ak-table--stack > table > tbody > tr > :first-child::before { content: none; }
  .ak-table--stack .ak-num { text-align: left; }
}
