/* =====================================================================
   DOSIK TECHNOLOGY · PAGE CSS · ARTICLE (/knowledge/{slug}): photo-in-glass hero, reading progress, numbered tips, recap, end CTA, help card
   Load after inner.css, on that page only.
   ===================================================================== */


.ahero .page-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.ahero .h1 { font-size: clamp(2rem, 1.25rem + 2.2vw, 3.2rem); line-height: 1.12; }
.ahero__lead { font-size: var(--fz-lead); line-height: 1.75; color: var(--text-2); max-width: 640px; }
.meta-line .badge { min-height: 26px; }
/* the photo inside the front glass layer (decorative) */
.pglass__photo { opacity: .96; }
.pglass--photo .pglass__l--2 { filter: drop-shadow(0 28px 30px rgba(6, 18, 43, .35)); }
/* reading progress — CSS scroll-driven (no JS); absent where unsupported or when motion is off */
.readbar { position: fixed; z-index: calc(var(--z-header) + 1); top: 0; inset-inline: 0; height: 3px; pointer-events: none; display: none; }
.readbar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, var(--teal-500), var(--sky-400) 60%, var(--navy-500)); transform-origin: 100% 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    html:not(.a11y-still) .readbar { display: block; }
    html:not(.a11y-still) .readbar::before { animation: readGrow linear both; animation-timeline: scroll(root block); }
  }
}
@keyframes readGrow { to { transform: scaleX(1); } }
.reading--article { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); }
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; }
.prose--article { font-size: 1.125rem; max-width: 44rem; }
.prose--article > .callout:first-of-type + h2 { margin-top: 1.4em; }
.article > .recap, .article > .endcta { max-width: 44rem; }
.tip { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: baseline; }
.tip__n {
  font: var(--fw-bold) clamp(2.2rem, 1.6rem + 1.8vw, 3.2rem)/.9 var(--f-display);
  color: transparent; -webkit-text-stroke: 1.5px var(--teal-650);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; opacity: .9;
}
.prose h2.tip { margin-top: 2.2em; font-size: clamp(1.3rem, 1.1rem + .7vw, 1.75rem); }
.prose figure { margin-block: 1.6em; padding: 14px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.prose figure img { border-radius: 12px; margin-inline: auto; }
.prose .callout { margin-block: 1.4em; }
.help-card { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 22px; border-radius: var(--r-l); color: var(--on-night-2);
  background: radial-gradient(80% 70% at 100% 0%, rgba(42, 174, 162, .32), transparent 60%), var(--night-2); }
.help-card strong { font: var(--fw-semibold) 1.15rem/1.3 var(--f-display); color: var(--on-night); }
.help-card p { font-size: var(--fz-sm); line-height: 1.6; }
.help-card .cluster { --cluster-gap: 8px; }
.recap { margin-top: 2.2em; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.recap h2 { margin-top: 0 !important; }
.recap ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; counter-reset: rc; }
.recap ol > li { position: relative; padding-inline-start: 2.4em; line-height: 1.55; color: var(--text); }
.recap ol > li::before { counter-increment: rc; content: counter(rc); position: absolute; inset-inline-start: 0; top: .05em; width: 1.75em; height: 1.75em; display: grid; place-items: center; border-radius: 9px; background: var(--accent-tint); color: var(--link); font: var(--fw-semibold) .82rem/1 var(--f-display); }
.endcta { margin-top: 2em; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px 22px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-xl); background: linear-gradient(135deg, color-mix(in srgb, var(--teal-500) 10%, #fff), #fff 60%); border: 1px solid color-mix(in srgb, var(--teal-500) 28%, #fff); }
.endcta .glyph { --gs: 64px; filter: drop-shadow(0 12px 16px rgba(11, 40, 70, .18)); }
.endcta p { margin: 0; }
.endcta .cluster { grid-column: 1 / -1; }
html.a11y-contrast .readbar { display: none; }
html.a11y-contrast :is(.recap, .endcta) { background: #fff; border: 2px solid #000; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.a11y-contrast :is(.help-card) { background: #000 !important; border-color: #fff; }
html.a11y-contrast .tip__n { background: none; color: #000; -webkit-text-fill-color: #000; -webkit-text-stroke: 0; }
@media (max-width: 960px) {
  .ahero .page-hero__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 4px; }
  .reading--article { grid-template-columns: minmax(0, 1fr); }
  .reading--article .reading__aside { order: 2; position: static; }
}
@media (max-width: 640px) {
  .recap ol { grid-template-columns: minmax(0, 1fr); }
  .endcta { grid-template-columns: minmax(0, 1fr); }
  .endcta .glyph { display: none; }
  .tip { column-gap: 12px; }
}

/* ---------- generalised to every article (stage 3): the content-plus guides ----------
   The rules above are the reference, unchanged. These add what the eight guides need: technical strings, the checklist
   recap, a headed end-CTA card, the editor's note of an older article and long tables of contents. */
/* technical strings (DNS records, tags, header names): isolated LTR, the site font with tabular figures. One box: a record
   that fits the line moves to a line of its own rather than splitting into two boxes that read as two values; a record
   longer than the column wraps inside its box */
.article code, .recap code {
  display: inline-block; max-width: 100%;
  padding: .05em .38em; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line);
  font: var(--fw-medium) .92em/1.5 var(--f-display); font-variant-numeric: tabular-nums; color: var(--text);
  overflow-wrap: anywhere;
}
/* the checklist recap: native checkboxes the reader can tick (nothing is saved or sent; works without JS) */
.recap__intro { margin-top: 10px; color: var(--text-2); line-height: 1.7; }
.recap__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; margin-top: 18px; }
.recap__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.55; color: var(--text); cursor: pointer; }
.recap__item input {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border-radius: 7px; cursor: pointer;
  border: 1.5px solid var(--field-line); background: var(--field-bg); display: grid; place-items: center;
  transition: background-color var(--t-1), border-color var(--t-1);
}
.recap__item input::after { content: ""; width: 11px; height: 6px; border-inline-start: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--t-2) var(--e-spring); }
.recap__item input:checked { background: var(--teal-700); border-color: var(--teal-700); }
.recap__item input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.recap__item:hover input:not(:checked) { border-color: var(--field-line-hover); }
/* a guide's closing section in the end-CTA card: its heading, then the paragraphs */
.endcta > div:not(.cluster) { display: grid; gap: 8px; }
.endcta__h { font: var(--fw-semibold) clamp(1.12rem, 1.04rem + .3vw, 1.3rem)/1.35 var(--f-display); color: var(--text); }
/* the editor's note inside an older article: marked as an editorial insertion, not part of the original text */
.callout--edit { background: var(--bg-2); border: 1.5px dashed color-mix(in srgb, var(--navy-500) 45%, #fff); }
.callout--edit > .ico { color: var(--navy-500); }
.callout--edit a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
/* a long table of contents scrolls inside the sticky aside, so the help card below it stays in view */
.reading--article .toc--desk { max-height: max(220px, calc(100vh - var(--hdr-h) - 330px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.a11y-contrast .article code, html.a11y-contrast .recap code { background: #fff; border: 1.5px solid #000; color: #000; }
html.a11y-contrast .recap__item input { border: 2px solid #000; background: #fff; }
html.a11y-contrast .recap__item input:checked { background: #000; }
html.a11y-contrast .callout--edit { background: #fff; border: 2px dashed #000; }
@media (max-width: 640px) {
  .recap__list { grid-template-columns: minmax(0, 1fr); }
}
