/* ===== BEGIN hm-article v2 (HomeMart blog design system) — source: homemart/content_creation/design/v2 — added 2026-09-28 ===== */
/* ==========================================================================
   HomeMart article design system v2 — "calm technical editorial"
   Scope: everything lives under body .hm-article, so it cannot leak into the theme.
   Deploy once to Journal3 (catalog/view/theme/journal3/stylesheet/custom.css
   or Journal → Skins → Custom CSS). Articles then carry only class names.
   Font: Onest (Cyrillic-first). Loaded by the <link> in the post template / custom code.
   ========================================================================== */

body .hm-article {
  /* Tokens */
  --hm-ink: #16212B;          /* headings */
  --hm-text: #36424D;         /* body */
  --hm-muted: #6A7680;        /* meta, captions */
  --hm-faint: #95A0A8;
  --hm-line: #E5E9ED;         /* hairlines */
  --hm-surface: #F6F8F9;      /* quiet panels */
  --hm-surface-2: #EEF2F4;
  --hm-accent: #0E7FB5;       /* links, focus (theme sky blue, darkened for AA) */
  --hm-accent-soft: #E8F4FA;
  --hm-brand: #DD0E1C;        /* HomeMart red: tiny accents + warnings only */
  --hm-field: #A86A12;        /* "От практиката" signature */
  --hm-field-soft: #FBF4E8;
  --hm-ok: #1F7A4D;
  --hm-ok-soft: #EAF5EF;
  --hm-warn-soft: #FCEEEE;
  --hm-radius: 14px;
  --hm-radius-sm: 10px;
  --hm-shadow: 0 1px 2px rgba(22,33,43,.04), 0 8px 24px -12px rgba(22,33,43,.12);
  --hm-measure: 680px;
  --hm-font: "Onest", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  container-type: inline-size;
  container-name: hmarticle;
  font-family: var(--hm-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--hm-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body .hm-article .hm-table, body .hm-article .hm-scale, body .hm-article .hm-result, body .hm-article .hm-case-verdict { font-variant-numeric: tabular-nums; }

/* ----- Layout: side TOC rail on wide containers, single column otherwise ----- */
body .hm-article .hm-layout { display: block; }
body .hm-article .hm-main { max-width: var(--hm-measure); margin: 0 auto; }
body .hm-article .hm-rail { display: none; }

@container hmarticle (min-width: 940px) {
  body .hm-article .hm-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, var(--hm-measure));
    gap: 48px;
    justify-content: center;
  }
  body .hm-article .hm-main { margin: 0; grid-column: 2; grid-row: 1; }
  body .hm-article .hm-rail { grid-column: 1; grid-row: 1; }
  body .hm-article .hm-rail { display: block; }
  body .hm-article .hm-toc--inline { display: none; }
}

/* ----- Typography ----- */
body .hm-article h2, body .hm-article h3 {
  font-family: var(--hm-font);
  color: var(--hm-ink);
  letter-spacing: -0.015em;
  font-weight: 650;
}
body .hm-article h2 {
  font-size: 28px; line-height: 1.25;
  margin: 72px 0 16px;
  scroll-margin-top: 96px;
}
body .hm-article h3 { font-size: 20px; line-height: 1.35; margin: 36px 0 10px; font-weight: 600; }
body .hm-article p { margin: 0 0 18px; }
body .hm-article strong { color: var(--hm-ink); font-weight: 600; }
body .hm-article a {
  color: var(--hm-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(14,127,181,.35);
  transition: text-decoration-color .15s;
}
body .hm-article a:hover { text-decoration-color: currentColor; }
body .hm-article a:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 2px; border-radius: 3px; }
body .hm-article ul, body .hm-article ol { margin: 0 0 20px; padding-left: 1.2em; }
body .hm-article li { margin: 0 0 8px; padding-left: .2em; }
body .hm-article li::marker { color: var(--hm-faint); }

/* Section number eyebrow on H2 (renderer adds <span class="hm-h-num">01</span>) */
body .hm-article .hm-h-num {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  color: var(--hm-faint);
  margin-bottom: 6px;
}

/* ----- Header strip (first thing in the body; Journal3 renders H1 above) ----- */
body .hm-article .hm-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  font-size: 14px; color: var(--hm-muted);
  padding: 0 0 22px; margin: 0 0 28px;
  border-bottom: 1px solid var(--hm-line);
}
body .hm-article .hm-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hm-brand);
}
body .hm-article .hm-reviewer { display: inline-flex; align-items: center; gap: 10px; }
body .hm-article .hm-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--hm-surface-2); color: var(--hm-ink);
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; object-fit: cover; flex: none;
}
body .hm-article .hm-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
body .hm-article .hm-header-meta > * + *::before { content: "·"; margin: 0 10px; color: var(--hm-faint); }
body .hm-article .hm-header .hm-reviewer { margin-left: auto; }
@container hmarticle (max-width: 640px) {
  body .hm-article .hm-header .hm-reviewer { margin-left: 0; flex-basis: 100%; }
  body .hm-article .hm-header-meta { gap: 4px 14px; }
  body .hm-article .hm-header-meta > * + *::before { content: none; }
}

/* ----- Накратко: the answer, set as a lead, not an alert box ----- */
body .hm-article .hm-tldr {
  position: relative;
  font-size: 20px; line-height: 1.6; color: var(--hm-ink);
  padding: 0 0 0 22px; margin: 0 0 32px;
  border-left: 3px solid var(--hm-accent);
}
body .hm-article .hm-tldr::before {
  content: "\041D\0430\043A\0440\0430\0442\043A\043E"; /* Накратко */
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hm-accent); margin-bottom: 8px;
}
body .hm-article .hm-tldr-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hm-accent); margin-bottom: 8px;
}

/* ----- Key numbers: a "scale" of values ----- */
body .hm-article .hm-scale {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius);
  overflow: hidden; margin: 0 0 12px; background: #fff;
}
body .hm-article .hm-scale-item { padding: 16px 16px 14px; border-left: 1px solid var(--hm-line); }
body .hm-article .hm-scale-item:first-child { border-left: 0; }
body .hm-article .hm-scale-value { display: block; font-size: 24px; font-weight: 650; color: var(--hm-ink); letter-spacing: -0.02em; line-height: 1.2; }
body .hm-article .hm-scale-unit { font-size: 14px; font-weight: 500; color: var(--hm-muted); }
body .hm-article .hm-scale-label { display: block; font-size: 14px; color: var(--hm-muted); margin-top: 4px; }
body .hm-article .hm-scale-bar { height: 4px; background: var(--hm-surface-2); border-radius: 4px; margin-top: 12px; overflow: hidden; }
body .hm-article .hm-scale-bar > i { display: block; height: 100%; background: var(--hm-accent); border-radius: 4px; }
body .hm-article .hm-scale-note { font-size: 14px; color: var(--hm-muted); margin: 0 0 32px; }
@container hmarticle (max-width: 560px) {
  body .hm-article .hm-scale { grid-template-columns: 1fr 1fr; }
  body .hm-article .hm-scale-item:nth-child(3) { border-left: 0; }
  body .hm-article .hm-scale-item:nth-child(n+3) { border-top: 1px solid var(--hm-line); }
}

/* ----- TOC: sticky rail on desktop, collapsible on mobile ----- */
body .hm-article .hm-toc { font-size: 14px; }
body .hm-article .hm-rail .hm-toc { position: sticky; top: 96px; }
body .hm-article .hm-toc-title {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hm-faint); margin: 0 0 12px;
}
body .hm-article .hm-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hm-line); }
body .hm-article .hm-toc li { margin: 0; padding: 0; }
body .hm-article .hm-toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--hm-muted); text-decoration: none; line-height: 1.4;
}
body .hm-article .hm-toc a:hover { color: var(--hm-ink); }
body .hm-article .hm-toc a[aria-current="true"] { color: var(--hm-ink); border-left-color: var(--hm-accent); font-weight: 500; }
body .hm-article .hm-progress { height: 2px; background: var(--hm-line); margin: 18px 0 0; border-radius: 2px; overflow: hidden; }
body .hm-article .hm-progress > i { display: block; height: 100%; width: 0; background: var(--hm-accent); transition: width .1s linear; }

body .hm-article details.hm-toc--inline {
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius-sm);
  padding: 0 16px; margin: 0 0 36px; background: #fff;
}
body .hm-article details.hm-toc--inline summary {
  list-style: none; cursor: pointer; padding: 14px 0;
  font-weight: 600; color: var(--hm-ink); display: flex; justify-content: space-between; align-items: center;
}
body .hm-article details.hm-toc--inline summary::-webkit-details-marker { display: none; }
body .hm-article details.hm-toc--inline summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--hm-muted); border-bottom: 2px solid var(--hm-muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
body .hm-article details.hm-toc--inline[open] summary::after { transform: rotate(225deg) translateY(-2px); }
body .hm-article details.hm-toc--inline ol { border-left: 0; padding-bottom: 12px; }
body .hm-article details.hm-toc--inline a { padding-left: 0; border: 0; }

/* ----- Tables: hairline, no heavy header; decision tables stack on mobile ----- */
body .hm-article .hm-table-wrap { margin: 28px 0; overflow-x: auto; }
body .hm-article table.hm-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
body .hm-article .hm-table th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hm-muted); padding: 0 14px 10px 0; border-bottom: 1px solid var(--hm-ink);
}
body .hm-article .hm-table td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--hm-line); vertical-align: top; }
body .hm-article .hm-table td:first-child { color: var(--hm-ink); font-weight: 600; white-space: nowrap; }
body .hm-article .hm-table tr:last-child td { border-bottom: 0; }

/* Decision table = list of if→then rows */
body .hm-article .hm-decision { margin: 28px 0; border-top: 1px solid var(--hm-ink); }
body .hm-article .hm-decision-head, body .hm-article .hm-decision-row {
  display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 20px;
}
body .hm-article .hm-decision-head {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hm-muted); padding: 10px 0;
}
body .hm-article .hm-decision-row { padding: 16px 0; border-top: 1px solid var(--hm-line); font-size: 15px; line-height: 1.5; }
body .hm-article .hm-decision-if { color: var(--hm-ink); }
body .hm-article .hm-decision-then { color: var(--hm-ink); font-weight: 600; position: relative; padding-left: 26px; }
body .hm-article .hm-decision-then::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 2px; background: var(--hm-accent);
}
body .hm-article .hm-decision-then::after {
  content: ""; position: absolute; left: 8px; top: calc(.5em - 3px); width: 6px; height: 6px;
  border-top: 2px solid var(--hm-accent); border-right: 2px solid var(--hm-accent); transform: rotate(45deg);
}
body .hm-article .hm-decision-why { color: var(--hm-muted); }
@container hmarticle (max-width: 640px) {
  body .hm-article table.hm-table, body .hm-article .hm-table tbody, body .hm-article .hm-table tr, body .hm-article .hm-table td { display: block; width: 100%; }
  body .hm-article .hm-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body .hm-article .hm-table tr { padding: 14px 0; border-bottom: 1px solid var(--hm-line); }
  body .hm-article .hm-table tbody tr:first-child { border-top: 1px solid var(--hm-ink); }
  body .hm-article .hm-table td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 42% 1fr; gap: 12px; }
  body .hm-article .hm-table td::before { content: attr(data-label); font-size: 13px; color: var(--hm-muted); }
  body .hm-article .hm-table td:first-child { display: block; font-size: 17px; padding-bottom: 6px; }
  body .hm-article .hm-table td:first-child::before { content: none; }
  body .hm-article .hm-decision-head { display: none; }
  body .hm-article .hm-decision-row { grid-template-columns: 1fr; gap: 4px; }
  body .hm-article .hm-decision-why { font-size: 14px; }
  body .hm-article .hm-table td:first-child { white-space: normal; }
}

/* ----- Callouts ----- */
body .hm-article .hm-callout {
  position: relative; margin: 32px 0; padding: 20px 22px 20px 56px;
  border-radius: var(--hm-radius); background: var(--hm-surface);
}
body .hm-article .hm-callout > :last-child { margin-bottom: 0; }
body .hm-article .hm-callout::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 22px; height: 22px;
  background: currentColor; -webkit-mask: var(--hm-icon) center/contain no-repeat; mask: var(--hm-icon) center/contain no-repeat;
  color: var(--hm-muted);
}
body .hm-article .hm-callout-title { display: block; font-weight: 600; color: var(--hm-ink); margin: 0 0 6px; }
body .hm-article .hm-callout ul { margin-bottom: 0; }

body .hm-article .hm-callout--tip { background: var(--hm-accent-soft); }
body .hm-article .hm-callout--tip::before { color: var(--hm-accent); --hm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V17h6v-.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }

body .hm-article .hm-callout--note::before { --hm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }

body .hm-article .hm-callout--warning { background: var(--hm-warn-soft); }
body .hm-article .hm-callout--warning::before { color: var(--hm-brand); --hm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }

body .hm-article .hm-callout--notneeded { background: var(--hm-ok-soft); }
body .hm-article .hm-callout--notneeded::before { color: var(--hm-ok); --hm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E"); }

/* Signature: field note from HomeMart practice */
body .hm-article .hm-field {
  margin: 40px 0; padding: 26px 28px;
  background: var(--hm-field-soft); border-radius: var(--hm-radius);
  position: relative;
}
body .hm-article .hm-field-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hm-field);
  margin-bottom: 12px;
}
body .hm-article .hm-field-eyebrow::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9l-3.8 3.8z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9l-3.8 3.8z'/%3E%3C/svg%3E") center/contain no-repeat;
}
body .hm-article .hm-field blockquote { margin: 0; font-size: 19px; line-height: 1.6; color: var(--hm-ink); }
body .hm-article .hm-field blockquote p { margin: 0 0 12px; }
body .hm-article .hm-field figcaption { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--hm-muted); }
body .hm-article .hm-field figcaption strong { display: block; color: var(--hm-ink); font-weight: 600; }
body .hm-article .hm-field .hm-avatar { width: 40px; height: 40px; background: #fff; color: var(--hm-field); }

/* ----- Evidence markers: quiet inline labels, not pills ----- */
body .hm-article .hm-ev {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1; color: var(--hm-muted);
  white-space: nowrap; vertical-align: 1px; margin: 0 2px;
}
body .hm-article .hm-ev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hm-faint); }
body .hm-article .hm-ev--measured { color: var(--hm-field); }
body .hm-article .hm-ev--measured::before { background: var(--hm-field); }
body .hm-article .hm-ev--declared::before { background: var(--hm-ink); }
body .hm-article .hm-ev--regulation { color: var(--hm-accent); }
body .hm-article .hm-ev--regulation::before { background: var(--hm-accent); }
body .hm-article .hm-ev--rule::before { background: transparent; border: 1.5px solid var(--hm-faint); width: 5px; height: 5px; }

body .hm-article .hm-tool:empty { display: none; }

/* ----- Interactive widget shell (progressively enhanced by hm-article.js) ----- */
body .hm-article .hm-tool {
  margin: 36px 0; border: 1px solid var(--hm-line); border-radius: var(--hm-radius);
  background: #fff; box-shadow: var(--hm-shadow); overflow: hidden;
}
body .hm-article .hm-tool-head { padding: 20px 24px 0; }
body .hm-article .hm-tool-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hm-accent); }
body .hm-article .hm-tool-title { font-size: 20px; font-weight: 650; color: var(--hm-ink); margin: 4px 0 0; letter-spacing: -0.01em; }
body .hm-article .hm-tool-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 20px 24px 24px; }
body .hm-article .hm-tool-body[hidden] { display: none; }
body .hm-article .hm-field-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--hm-ink); margin-bottom: 8px; }
body .hm-article .hm-field-label output { font-weight: 650; }
body .hm-article .hm-tool select {
  width: 100%; padding: 10px 12px; margin: 0 0 18px; font: inherit; font-size: 15px; color: var(--hm-ink);
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius-sm); background: #fff;
}
body .hm-article input[type="range"] { width: 100%; accent-color: var(--hm-accent); margin: 0 0 18px; }
body .hm-article .hm-checks { display: grid; gap: 8px; }
body .hm-article .hm-check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; }
body .hm-article .hm-check-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--hm-accent); flex: none; }
body .hm-article .hm-result {
  background: var(--hm-surface); border-radius: var(--hm-radius-sm); padding: 20px;
  display: flex; flex-direction: column; justify-content: center; min-height: 200px;
}
body .hm-article .hm-result-label { font-size: 13px; color: var(--hm-muted); }
body .hm-article .hm-result-value { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: var(--hm-ink); line-height: 1.1; margin: 6px 0 2px; }
body .hm-article .hm-result-sub { font-size: 15px; color: var(--hm-ink); font-weight: 500; }
body .hm-article .hm-result-notes { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; color: var(--hm-muted); line-height: 1.5; }
body .hm-article .hm-result-notes li { padding-left: 16px; position: relative; margin-bottom: 6px; }
body .hm-article .hm-result-notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--hm-accent); }
body .hm-article .hm-tool-foot { padding: 12px 24px; border-top: 1px solid var(--hm-line); font-size: 13px; color: var(--hm-muted); background: var(--hm-surface); }
@container hmarticle (max-width: 640px) {
  body .hm-article .hm-tool-body { grid-template-columns: 1fr; gap: 20px; padding: 16px 18px 20px; }
  body .hm-article .hm-tool-head { padding: 18px 18px 0; }
}

/* ----- Example cards ----- */
body .hm-article .hm-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 32px; }
body .hm-article .hm-case {
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: 18px 18px 16px;
  display: flex; flex-direction: column; background: #fff;
}
body .hm-article .hm-case-room { font-size: 14px; color: var(--hm-muted); line-height: 1.45; }
body .hm-article .hm-case-room strong { display: block; font-size: 16px; color: var(--hm-ink); margin-bottom: 2px; }
body .hm-article .hm-case-verdict { font-size: 24px; font-weight: 700; color: var(--hm-ink); letter-spacing: -0.02em; margin: 14px 0 6px; }
body .hm-article .hm-case p { font-size: 14px; line-height: 1.55; margin: 0; }
@container hmarticle (max-width: 640px) { body .hm-article .hm-cases { grid-template-columns: 1fr; } }

/* ----- Checklist ----- */
body .hm-article .hm-checklist { list-style: none; padding: 0; margin: 20px 0 28px; counter-reset: hmcheck; }
body .hm-article .hm-checklist li {
  counter-increment: hmcheck; position: relative;
  padding: 14px 0 14px 44px; margin: 0; border-top: 1px solid var(--hm-line);
}
body .hm-article .hm-checklist li:last-child { border-bottom: 1px solid var(--hm-line); }
body .hm-article .hm-checklist li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 22px; height: 22px;
  border: 1.5px solid var(--hm-faint); border-radius: 6px; background: #fff;
}
body .hm-article .hm-checklist li.is-done::before { background: var(--hm-ok); border-color: var(--hm-ok); }
body .hm-article .hm-checklist li.is-done::after {
  content: ""; position: absolute; left: 8px; top: 18px; width: 5px; height: 10px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
body .hm-article .hm-checklist.is-interactive li { cursor: pointer; }
body .hm-article .hm-checklist li.is-done { color: var(--hm-muted); }

/* ----- FAQ: native accordion ----- */
body .hm-article .hm-faq { margin: 12px 0 32px; border-top: 1px solid var(--hm-line); }
body .hm-article .hm-faq details { border-bottom: 1px solid var(--hm-line); }
body .hm-article .hm-faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-size: 17px; font-weight: 600; color: var(--hm-ink); line-height: 1.4;
}
body .hm-article .hm-faq summary::-webkit-details-marker { display: none; }
body .hm-article .hm-faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--hm-muted), var(--hm-muted)) center/14px 2px no-repeat,
              linear-gradient(var(--hm-muted), var(--hm-muted)) center/2px 14px no-repeat;
  transition: transform .2s;
}
body .hm-article .hm-faq details[open] summary::after { transform: rotate(45deg); }
body .hm-article .hm-faq .hm-faq-a { padding: 0 40px 18px 0; margin: 0; }

/* ----- CTA: a "next step" card, not an ad slab ----- */
body .hm-article .hm-cta {
  margin: 48px 0; padding: 28px; border-radius: var(--hm-radius);
  background: var(--hm-ink); color: #D6DEE4;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
body .hm-article .hm-cta-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8FD3F2; }
body .hm-article .hm-cta-title { font-size: 22px; font-weight: 650; color: #fff; margin: 6px 0 8px; letter-spacing: -0.01em; line-height: 1.3; }
body .hm-article .hm-cta p { margin: 0; font-size: 15px; line-height: 1.6; }
body .hm-article .hm-cta-actions { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
body .hm-article a.hm-btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; background: #fff; color: var(--hm-ink); transition: transform .15s, background .15s;
}
body .hm-article a.hm-btn:hover { transform: translateY(-1px); }
body .hm-article a.hm-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
body .hm-article a.hm-btn--ghost:hover { box-shadow: inset 0 0 0 1px #fff; }
@container hmarticle (max-width: 640px) {
  body .hm-article .hm-cta { grid-template-columns: 1fr; padding: 22px; }
  body .hm-article .hm-cta-actions { min-width: 0; }
}

/* ----- Related ----- */
body .hm-article .hm-related { margin: 56px 0 0; }
body .hm-article .hm-related-title { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hm-faint); margin: 0 0 14px; }
body .hm-article .hm-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; padding: 0; margin: 0; }
body .hm-article .hm-related-grid li { margin: 0; padding: 0; }
body .hm-article .hm-related-grid a {
  display: flex; justify-content: space-between; gap: 16px; align-items: center; height: 100%;
  padding: 16px 18px; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-sm);
  color: var(--hm-ink); text-decoration: none; font-weight: 500; line-height: 1.4; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
body .hm-article .hm-related-grid a:hover { border-color: #C9D2D9; box-shadow: var(--hm-shadow); }
body .hm-article .hm-related-grid a::after { content: "→"; color: var(--hm-accent); flex: none; }
body .hm-article .hm-related-kicker { display: block; font-size: 12px; color: var(--hm-muted); font-weight: 500; margin-bottom: 2px; }
@container hmarticle (max-width: 560px) { body .hm-article .hm-related-grid { grid-template-columns: 1fr; } }

/* ----- Figure ----- */
body .hm-article .hm-figure { margin: 32px 0; }
body .hm-article .hm-figure img { display: block; width: 100%; height: auto; border-radius: var(--hm-radius); }
body .hm-article .hm-figure figcaption { font-size: 14px; color: var(--hm-muted); margin-top: 10px; }

/* ----- Author / review box ----- */
body .hm-article .hm-byline {
  display: flex; gap: 16px; align-items: flex-start; margin: 48px 0 0; padding: 22px 0 0;
  border-top: 1px solid var(--hm-line); font-size: 14px; color: var(--hm-muted); line-height: 1.55;
}
body .hm-article .hm-byline .hm-avatar { width: 48px; height: 48px; font-size: 15px; }
body .hm-article .hm-byline strong { color: var(--hm-ink); font-size: 15px; }
body .hm-article .hm-evidence-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }

/* ----- Draft mode: placeholders are visible ONLY in preview renders ----- */
body .hm-article .hm-todo {
  display: inline; background: repeating-linear-gradient(-45deg, #FFF5CC, #FFF5CC 6px, #FFEFB0 6px, #FFEFB0 12px);
  color: #7A5A00; font-size: .9em; padding: 1px 6px; border-radius: 4px; outline: 1px dashed #D9A900;
}

/* ----- Mobile type ----- */
@container hmarticle (max-width: 560px) {
  body .hm-article { font-size: 16.5px; }
  body .hm-article h2 { font-size: 24px; margin-top: 56px; }
  body .hm-article .hm-tldr { font-size: 18px; padding-left: 16px; }
  body .hm-article .hm-field { padding: 22px 20px; }
  body .hm-article .hm-field blockquote { font-size: 17px; }
  body .hm-article .hm-callout { padding: 18px 18px 18px 50px; }
  body .hm-article .hm-callout::before { left: 16px; top: 20px; }
}

@media (prefers-reduced-motion: reduce) { body .hm-article * { transition: none !important; } }
@media print {
  body .hm-article .hm-rail, body .hm-article .hm-tool, body .hm-article .hm-toc--inline { display: none !important; }
  body .hm-article .hm-faq details { display: block; }
}

/* ----- Theme guard: neutralise Journal3's global table/form styles inside articles ----- */
body .hm-article table.hm-table, body .hm-article table.hm-table tr, body .hm-article table.hm-table tbody tr:nth-child(odd), body .hm-article table.hm-table tbody tr:nth-child(even), body .hm-article table.hm-table th, body .hm-article table.hm-table td { background: transparent !important; box-shadow: none !important; }
body .hm-article table.hm-table { border: 0 !important; margin: 0 !important; }
body .hm-article table.hm-table th { border: 0 !important; border-bottom: 1px solid var(--hm-ink) !important; padding: 0 14px 10px 0 !important; }
body .hm-article table.hm-table td { border: 0 !important; border-bottom: 1px solid var(--hm-line) !important; padding: 14px 14px 14px 0 !important; }
body .hm-article table.hm-table tr:last-child td { border-bottom: 0 !important; }
body .hm-article .hm-tool select {
  border: 1px solid var(--hm-line) !important; border-radius: var(--hm-radius-sm) !important;
  padding: 10px 12px !important; height: auto !important; min-height: 44px; background-color: #fff !important;
  box-shadow: none !important; font-size: 15px !important; color: var(--hm-ink) !important;
}
@container hmarticle (max-width: 640px) {
  body .hm-article table.hm-table td { border-bottom: 0 !important; padding: 2px 0 !important; }
  body .hm-article table.hm-table td:first-child { padding-bottom: 6px !important; }
  body .hm-article table.hm-table tr { border-bottom: 1px solid var(--hm-line) !important; }
}

/* ----- Steps (numbered procedure) ----- */
body .hm-article ol.hm-steps { list-style: none; padding: 0; margin: 24px 0 28px; counter-reset: hmstep; }
body .hm-article ol.hm-steps li { counter-increment: hmstep; position: relative; padding: 2px 0 18px 48px; margin: 0; }
body .hm-article ol.hm-steps li::before {
  content: counter(hmstep); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--hm-surface-2); color: var(--hm-ink); font-weight: 650; font-size: 15px; line-height: 32px; text-align: center;
}
body .hm-article ol.hm-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--hm-line); }

/* ----- Pros / cons ----- */
body .hm-article .hm-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
body .hm-article .hm-pc { border-radius: var(--hm-radius); padding: 18px 20px; background: var(--hm-surface); }
body .hm-article .hm-pc--pro { background: var(--hm-ok-soft); }
body .hm-article .hm-pc--con { background: var(--hm-warn-soft); }
body .hm-article .hm-pc-title { display: block; font-weight: 650; color: var(--hm-ink); margin-bottom: 8px; }
body .hm-article .hm-pc ul { margin: 0; padding-left: 1.1em; }
@container hmarticle (max-width: 640px) { body .hm-article .hm-proscons { grid-template-columns: 1fr; } }

/* ----- Quote ----- */
body .hm-article blockquote.hm-quote { margin: 32px 0; padding: 0 0 0 22px; border-left: 3px solid var(--hm-line); font-size: 19px; line-height: 1.6; color: var(--hm-ink); }
body .hm-article blockquote.hm-quote p { margin: 0 0 8px; }
body .hm-article blockquote.hm-quote cite { display: block; font-style: normal; font-size: 14px; color: var(--hm-muted); }

/* ----- Titles rendered as div (theme p-rules must not apply) ----- */
body .hm-article div.hm-cta-title, body .hm-article div.hm-toc-title, body .hm-article div.hm-related-title { display: block; }
body .hm-article div.hm-cta-title { font-size: 22px !important; line-height: 1.3; }

/* ----- 2026-09-29 layout fixes: scale adapts to 2–4 items; long first-column labels wrap ----- */
body .hm-article .hm-scale { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
body .hm-article .hm-scale-item { border-left: 1px solid var(--hm-line); }
body .hm-article table.hm-table td:first-child { white-space: normal; min-width: 11em; }
body .hm-article table.hm-table th { white-space: normal; }
@container hmarticle (max-width: 560px) {
  body .hm-article .hm-scale { grid-template-columns: 1fr 1fr; }
}

/* ===== END hm-article v2 ===== */
