/* Инокс Гид — журнал о нержавеющей стали
   Идея: цвета побежалости (соломенный → бронзовый → фиолетовый → синий → голубой) — фирменная шкала.
   Каждая рубрика окрашена своим цветом побежалости, новости — «горячие». Шов-градиент под шапкой
   на страницах статей превращается в индикатор прочтения. Глубокий синий — цвет отпущенной стали. */
:root {
  --navy: #0d1a3a;
  --navy-2: #142553;
  --navy-3: #1d3370;
  --on-navy: #f1f4fb;
  --on-navy-2: #c3cde4;
  --on-navy-3: #93a2c4;
  --paper: #ffffff;
  --mist: #f0f3f9;
  --ink: #0e1628;
  --ink-2: #3a475f;
  --ink-3: #5c6880;
  --line: #dde3ee;
  --link: #1f4fd1;
  --link-hover: #12379e;
  --cta: #f6b638;
  --cta-hover: #ffc75c;
  --cta-ink: #1c1505;
  --straw: #c98a0c;
  --bronze: #c2541c;
  --violet: #7a42c8;
  --blue: #2453d6;
  --teal: #0b85a1;
  --hot: #e2402a;
  --ok: #17845a;
  --bad: #c2372a;
  --heat: linear-gradient(90deg, #f4c75e 0%, #e5903a 20%, #b45193 42%, #6a47cf 60%, #2c5fe2 80%, #7cc3ea 100%);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius-l: 16px;
  --radius: 10px;
  --radius-s: 6px;
  --wrap: 1240px;
  --measure: 70ch;
  --shadow: 0 1px 2px rgba(13, 26, 58, .06), 0 10px 28px -14px rgba(13, 26, 58, .28);
  --chip-ink: 52%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #0f1d43;
    --navy-2: #172a5c;
    --navy-3: #22397a;
    --paper: #0a1226;
    --mist: #101b35;
    --ink: #eaf0fa;
    --ink-2: #b9c5dc;
    --ink-3: #8f9dba;
    --line: #233258;
    --link: #8fb1ff;
    --link-hover: #b9cdff;
    --straw: #f0b83d;
    --bronze: #ef8a52;
    --violet: #b28cf4;
    --blue: #7fa2ff;
    --teal: #4cc3dd;
    --hot: #ff7a5c;
    --ok: #4cc58f;
    --bad: #ff8a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --chip-ink: 100%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #0f1d43;
  --navy-2: #172a5c;
  --navy-3: #22397a;
  --paper: #0a1226;
  --mist: #101b35;
  --ink: #eaf0fa;
  --ink-2: #b9c5dc;
  --ink-3: #8f9dba;
  --line: #233258;
  --link: #8fb1ff;
  --link-hover: #b9cdff;
  --straw: #f0b83d;
  --bronze: #ef8a52;
  --violet: #b28cf4;
  --blue: #7fa2ff;
  --teal: #4cc3dd;
  --hot: #ff7a5c;
  --ok: #4cc58f;
  --bad: #ff8a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --chip-ink: 100%;
  color-scheme: dark;
}

.r-marki { --c: var(--straw); }
.r-prokat { --c: var(--bronze); }
.r-truboprovod { --c: var(--violet); }
.r-obrabotka { --c: var(--blue); }
.r-korroziya { --c: var(--teal); }
.r-news { --c: var(--hot); }
.r-video { --c: var(--cta); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
[hidden] { display: none !important; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 60; border-radius: var(--radius-s); }
.skip:focus { left: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: .9375rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
}
.btn--cta { background: var(--cta); color: var(--cta-ink); }
.btn--cta:hover { background: var(--cta-hover); color: var(--cta-ink); }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--ghost:hover { color: inherit; background: rgba(127, 140, 170, .14); }

/* ---------- Masthead ---------- */
.mast { background: var(--navy); color: var(--on-navy); }
.mast__bar { display: flex; align-items: center; gap: 16px 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-navy); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--on-navy); }
.brand__tile {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 11px; overflow: hidden;
  background: linear-gradient(150deg, #f2f5f9 0%, #c3ccd7 55%, #9aa6b4 100%);
  color: #0d1a3a; font-family: var(--mono); font-weight: 700;
}
.brand__tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--heat); }
.brand__tile b { position: absolute; left: 7px; bottom: 9px; font-size: 21px; line-height: 1; letter-spacing: -.02em; }
.brand__tile i { position: absolute; right: 6px; top: 5px; font-style: normal; font-size: 10px; font-weight: 500; }
.brand__text { display: grid; gap: 2px; min-width: 0; }
.brand__name { font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: -.025em; }
.brand__tag { font-size: .8125rem; color: var(--on-navy-3); white-space: nowrap; }
.mast__date { margin: 0 0 0 auto; font-size: .875rem; color: var(--on-navy-2); white-space: nowrap; }
.mast__date::first-letter { text-transform: uppercase; }
.mast__actions { display: flex; align-items: center; gap: 10px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: var(--on-navy); border: 0; cursor: pointer; font-weight: 600; font-size: .9375rem;
}
.iconbtn:hover { background: rgba(255, 255, 255, .16); }
.iconbtn svg { width: 18px; height: 18px; flex: none; }
.mast__nav { border-top: 1px solid rgba(255, 255, 255, .09); }
.mast__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mast__nav ul::-webkit-scrollbar { display: none; }
.mast__nav a {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 13px 12px 14px;
  color: var(--on-navy-2); text-decoration: none; font-weight: 600; font-size: .9375rem;
}
.mast__nav li:first-child a { padding-left: 0; }
.mast__nav a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, transparent); flex: none; }
.mast__nav a:not([class])::before { display: none; }
.mast__nav a:hover { color: #fff; }
.mast__nav a[aria-current="page"] { color: #fff; }
.mast__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--c, var(--cta)); }
.mast__nav li:first-child a[aria-current="page"]::after { left: 0; }
.seam { height: 4px; background: var(--heat); }

/* Reading progress: the heat seam fills as you read */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--heat); background-size: 100vw 100%; }

/* ---------- Chips, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; line-height: 1.2; text-decoration: none; width: fit-content;
  background: color-mix(in srgb, var(--c, var(--blue)) 13%, transparent);
  color: color-mix(in srgb, var(--c, var(--blue)) var(--chip-ink), var(--ink));
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); flex: none; }
a.chip:hover { background: color-mix(in srgb, var(--c, var(--blue)) 22%, transparent); color: color-mix(in srgb, var(--c, var(--blue)) var(--chip-ink), var(--ink)); }
.chip--dark { background: rgba(255, 255, 255, .13); color: #fff; backdrop-filter: blur(6px); }
a.chip--dark:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.r-news .chip::before, .chip.r-news::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hot) 30%, transparent); }
.badge-new {
  display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--hot); color: #fff;
  font-size: .75rem; font-weight: 700; line-height: 1.2; vertical-align: 2px;
}
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding-block: 56px; }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 24px; }
.section__title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.12; font-weight: 800; letter-spacing: -.022em; text-wrap: balance; }
.section__title a { color: inherit; text-decoration: none; }
.section__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.section__sub { margin: 6px 0 0; color: var(--ink-3); font-size: .9375rem; }
.section--navy .section__sub { color: var(--on-navy-3); }
.more-link { font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.section--navy .more-link { color: var(--cta); }

/* ---------- Cards ---------- */
.card { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card__media { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--navy-2); aspect-ratio: 16 / 9; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.035); }
.card__body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.card__title { margin: 0; font-size: 1.1875rem; line-height: 1.25; font-weight: 700; letter-spacing: -.012em; text-wrap: balance; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--link); }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .chip, .card .badge-new { position: relative; z-index: 2; }
.card__lead { margin: 0; color: var(--ink-2); font-size: .9688rem; line-height: 1.5; }
.card--l .card__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); line-height: 1.15; letter-spacing: -.02em; }
.card--l .card__lead { font-size: 1.0625rem; }
.card--wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.grid { display: grid; gap: 36px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 .card__title { font-size: 1.0625rem; }

/* Compact row: thumbnail + title */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; padding-block: 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row__media { display: block; overflow: hidden; border-radius: var(--radius-s); aspect-ratio: 16 / 10; background: var(--navy-2); }
.row__media img { width: 100%; height: 100%; object-fit: cover; }
.row__body { display: grid; gap: 4px; min-width: 0; }
.row__title { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 650; text-wrap: pretty; }
.row__title a { color: var(--ink); text-decoration: none; }
.row__title a::after { content: ""; position: absolute; inset: 0; }
.row__title a:hover { color: var(--link); }
.row time, .row .meta { font-size: .8125rem; color: var(--ink-3); }

/* ---------- Home: top ---------- */
.top { background: var(--navy); color: var(--on-navy); padding-block: 28px 44px; }
.top__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.hero { position: relative; display: block; overflow: hidden; border-radius: var(--radius-l); background: var(--navy-2); min-height: 100%; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s ease; }
.hero:hover .hero__img { transform: scale(1.025); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 15, 36, 0) 25%, rgba(8, 15, 36, .55) 55%, rgba(8, 15, 36, .94) 100%); }
.hero__body { display: grid; gap: 14px; align-content: end; height: 100%; min-height: clamp(380px, 40vw, 540px); padding: clamp(20px, 3vw, 36px); }
.hero__title { margin: 0; font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem); line-height: 1.06; font-weight: 800; letter-spacing: -.028em; text-wrap: balance; max-width: 22ch; }
.hero__title a { color: #fff; text-decoration: none; }
.hero__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.hero__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hero__lead { margin: 0; color: #dfe6f5; font-size: clamp(1rem, .95rem + .3vw, 1.1875rem); line-height: 1.45; max-width: 60ch; }
.hero .chip, .hero .badge-new { position: relative; z-index: 1; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--on-navy-2); font-size: .875rem; }

.feed { display: grid; align-content: start; gap: 0; min-width: 0; }
.feed__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.feed__title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.feed__title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 4px rgba(226, 64, 42, .25); }
.feed .rows .row { border-top-color: rgba(255, 255, 255, .1); grid-template-columns: 92px minmax(0, 1fr); }
.feed .row__title a { color: var(--on-navy); }
.feed .row__title a:hover { color: #fff; text-decoration: underline; }
.feed .row time { color: var(--on-navy-3); }
.feed .more-link { color: var(--cta); margin-top: 14px; }

/* ---------- Home: today ---------- */
.today { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .9fr); align-items: stretch; }
.panel { border-radius: var(--radius-l); padding: 24px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.panel__title { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel__note { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.fact { background: linear-gradient(160deg, color-mix(in srgb, var(--straw) 22%, var(--paper)) 0%, color-mix(in srgb, var(--bronze) 14%, var(--paper)) 100%); }
.fact__text { margin: 0; font-size: 1.1875rem; line-height: 1.45; font-weight: 600; letter-spacing: -.008em; color: var(--ink); text-wrap: pretty; }
.fact__more { font-weight: 700; font-size: .9375rem; }
.quiz { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.quiz__q { margin: 0; font-size: 1.125rem; line-height: 1.35; font-weight: 700; text-wrap: pretty; }
.quiz__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz__opt {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px;
  border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-weight: 600; font-size: .9688rem; line-height: 1.3;
}
.quiz__opt:hover:not(:disabled) { border-color: var(--blue); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--paper)); }
.quiz__opt.is-wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--paper)); }
.quiz__opt .mark { margin-left: auto; font-weight: 800; }
.quiz__why { margin: 0; font-size: .9688rem; color: var(--ink-2); }
.quiz__streak { font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.tools-panel { background: var(--navy); color: var(--on-navy); }
.tools-panel .panel__title { color: #fff; }
.toollist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.toollist a { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .07); color: var(--on-navy); text-decoration: none; }
.toollist a:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.toollist b { font-size: 1rem; }
.toollist span { font-size: .875rem; color: var(--on-navy-3); }
.toollist code { font-family: var(--mono); font-size: .8125rem; color: var(--cta); }

/* ---------- Subscribe ---------- */
.subband { position: relative; background: var(--navy); color: var(--on-navy); overflow: hidden; isolation: isolate; }
.subband::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--heat); }
.subband__img { position: absolute; inset: 0 0 0 auto; width: 46%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
.subband::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--navy) 50%, rgba(13, 26, 58, .55) 75%, rgba(13, 26, 58, .2)); }
.subband__inner { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; padding-block: 52px; }
.subband h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.subband p { margin: 0; color: var(--on-navy-2); font-size: 1.0625rem; max-width: 50ch; }
.sublist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; color: var(--on-navy); }
.sublist li { display: flex; gap: 10px; align-items: baseline; }
.sublist li::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--heat); flex: none; transform: translateY(-3px); }
.subform { display: grid; gap: 12px; min-width: 0; }
.subform__row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .45); }
.subform__row input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 14px; font: inherit; font-size: 1rem; color: #0e1628; border-radius: 999px;
}
.subform__row input::placeholder { color: #6b7590; }
.subform__row input:focus { outline: none; }
.subform__row:focus-within { box-shadow: 0 0 0 3px var(--cta), 0 10px 30px -12px rgba(0, 0, 0, .45); }
.subform__consent { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; line-height: 1.4; color: var(--on-navy-2); }
.subform__consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--cta); }
.subform__consent a { color: inherit; }
.subform__msg { margin: 0; min-height: 1.4em; font-size: .9375rem; font-weight: 600; }
.subform__msg.is-ok { color: #7ee2b0; }
.subform__msg.is-err { color: #ffb3a6; }
.subform .hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.channels { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; color: var(--on-navy-3); }
.channels a { color: var(--on-navy); font-weight: 600; }
.subcard { position: relative; overflow: hidden; border-radius: var(--radius-l); background: var(--navy); color: var(--on-navy); padding: 28px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; margin-block: 36px; }
.subcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--heat); }
.subcard h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.subcard p { margin: 0; color: var(--on-navy-2); }

/* ---------- Rubric blocks on home ---------- */
.rblock { padding-block: 48px; border-top: 1px solid var(--line); }
.rblock:first-of-type { border-top: 0; }
.rblock__head { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.rblock__name { margin: 0; display: flex; align-items: center; gap: 14px; font-size: clamp(1.4rem, 1.15rem + .9vw, 1.85rem); font-weight: 800; letter-spacing: -.022em; line-height: 1.1; }
.rblock__name::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--c); flex: none; }
.rblock__name a { color: var(--ink); text-decoration: none; }
.rblock__name a:hover { color: var(--link); }
.rblock__title { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.rblock__count { color: var(--ink-3); font-size: .9375rem; font-weight: 600; }
.rblock__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.rblock:nth-of-type(even) .rblock__grid > .card { order: 2; }

/* ---------- Grade explorer ---------- */
.grades { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.grades__intro h2 { margin: 0 0 10px; }
.grades__intro p { margin: 0 0 20px; color: var(--ink-2); max-width: 52ch; }
.grade-groups { display: grid; gap: 12px; margin: 0 0 24px; }
.grade-group { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: 10px; align-items: start; }
.grade-group__name { font-size: .8125rem; font-weight: 600; color: var(--ink-3); padding-top: 9px; }
.grade-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; min-width: 0; }
.grade-tabs button {
  font: 700 .9063rem/1 var(--mono); padding: 10px 12px; border-radius: 999px; cursor: pointer; min-height: 38px;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--line);
}
.grade-tabs button:hover { border-color: var(--blue); }
.grade-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: inset 0 -3px 0 var(--cta); }
.chem { display: grid; gap: 12px; margin: 0; }
.chem__row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 6.8rem; align-items: center; gap: 10px; }
.chem__el { font-family: var(--mono); font-weight: 700; }
.chem__track { position: relative; height: 14px; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 999px; overflow: hidden; }
.chem__fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; transition: left .35s ease, width .35s ease; background: var(--heat); background-size: 300% 100%; }
.chem__row[data-el="Cr"] .chem__fill { background-position: 0 0; }
.chem__row[data-el="Ni"] .chem__fill { background-position: 50% 0; }
.chem__row[data-el="Mo"] .chem__fill { background-position: 75% 0; }
.chem__row[data-el="Mn"] .chem__fill { background-position: 100% 0; }
.chem__fill.is-max { opacity: .75; }
.chem__val { font-size: .875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.chem__scale { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 6.8rem; gap: 10px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chem__scale span:nth-child(2) { display: flex; justify-content: space-between; }
.grades__panel { background: var(--paper); border-radius: var(--radius-l); padding: 24px; display: grid; gap: 20px; min-width: 0; box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 20px; margin: 0; font-size: .9688rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; }
.grades__links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; font-size: .9688rem; font-weight: 600; }
.grades__links span { color: var(--ink-3); font-weight: 400; }
.grades__note { font-size: .8125rem; color: var(--ink-3); margin: 0; }

/* ---------- Video ---------- */
.vthumb {
  position: relative; display: block; width: 100%; max-width: 100%; border-radius: var(--radius); overflow: hidden; border: 0; padding: 0; cursor: pointer;
  background: var(--navy-2); color: #fff; text-align: left; aspect-ratio: 16 / 9;
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(8, 15, 36, .6)); }
.vthumb__play { position: absolute; left: 16px; bottom: 14px; z-index: 1; width: 56px; height: 56px; border-radius: 50%; background: var(--cta); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.vthumb__play::after { content: ""; margin-left: 5px; border-left: 17px solid var(--cta-ink); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.vthumb__dur { position: absolute; right: 12px; bottom: 12px; z-index: 1; background: rgba(8, 12, 24, .82); color: #fff; font: 600 12px/1 var(--font); padding: 6px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.vthumb:hover .vthumb__play { background: var(--cta-hover); }
.video-frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.section--navy .card__title a { color: var(--on-navy); }
.section--navy .card__title a:hover { color: #fff; text-decoration: underline; }
.section--navy .card__lead { color: var(--on-navy-2); }
.section--navy .meta { color: var(--on-navy-3); }
.timecodes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.timecodes li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 10px; }
.timecodes time { font-family: var(--mono); font-size: .875rem; color: var(--ink-3); padding-top: 2px; }

/* ---------- Page heads ---------- */
.crumbs { font-size: .8125rem; color: var(--on-navy-3); padding-top: 20px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--on-navy-2); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: var(--on-navy-3); display: inline-block; max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.phead { background: var(--navy); color: var(--on-navy); padding-bottom: 40px; }
.phead h1 { margin: 16px 0 12px; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); line-height: 1.07; font-weight: 800; letter-spacing: -.028em; text-wrap: balance; max-width: 24ch; }
.phead p { margin: 0; color: var(--on-navy-2); font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.5; max-width: 62ch; }
.phead--img { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 56px; }
.phead--img .phead__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.phead--img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13, 26, 58, .96) 30%, rgba(13, 26, 58, .7) 65%, rgba(13, 26, 58, .35)); }
.phead--img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c, var(--cta)); }
.phead__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--on-navy-2); font-size: .9375rem; font-weight: 600; }
.chipnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chipnav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.chipnav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--cta)); }
.chipnav a:hover { background: rgba(255, 255, 255, .17); color: #fff; }

/* ---------- Article ---------- */
.art-hero { background: var(--navy); color: var(--on-navy); padding-bottom: 110px; }
.art-hero__in { max-width: 920px; }
.art-hero h1 { margin: 16px 0 14px; font-size: clamp(2rem, 1.25rem + 2.7vw, 3.25rem); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.art-hero .lead { margin: 0 0 20px; font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.5; color: var(--on-navy-2); max-width: 64ch; }
.art-hero .meta { color: var(--on-navy-3); }
.art-hero .chip { background: rgba(255, 255, 255, .1); color: #fff; margin-top: 18px; }
.art-cover { margin-top: -86px; }
.art-cover img { width: 100%; border-radius: var(--radius-l); aspect-ratio: 16 / 7; object-fit: cover; box-shadow: var(--shadow); background: var(--navy-2); }
.art-layout { display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr) 280px; padding-block: 40px 10px; }
.prose { max-width: var(--measure); min-width: 0; font-size: 1.0625rem; line-height: 1.68; }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose > p:first-child { font-size: 1.1875rem; line-height: 1.6; }
.prose h2 { margin: 2em 0 0; font-size: clamp(1.4rem, 1.2rem + .7vw, 1.75rem); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; scroll-margin-top: 20px; }
.prose h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; margin-bottom: 14px; background: var(--c, var(--blue)); }
.prose h3 { margin: 1.6em 0 0; font-size: 1.1875rem; line-height: 1.3; font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--c, var(--ink-3)); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose .formula {
  font-family: var(--mono); font-size: .9375rem; background: var(--mist); border-left: 4px solid var(--c, var(--blue));
  padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; overflow-x: auto; white-space: nowrap;
}
.prose .note { background: color-mix(in srgb, var(--c, var(--blue)) 9%, var(--paper)); border-radius: var(--radius); padding: 16px 20px; }
.prose .note p { margin: 0; }
.prose .note p + p { margin-top: .6em; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.prose .table-wrap { margin-top: 1.5em; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; font-variant-numeric: tabular-nums; line-height: 1.4; }
caption { caption-side: top; text-align: left; padding: 14px 16px 10px; font-weight: 700; font-size: .9375rem; color: var(--ink); }
th, td { padding: 10px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: .875rem; white-space: nowrap; border-top: 0; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--mist) 70%, transparent); }
td:first-child { font-weight: 600; }
.aside { min-width: 0; }
.aside__sticky { position: sticky; top: 24px; display: grid; gap: 22px; }
.toc { font-size: .9375rem; }
.toc h2 { font-size: .8125rem; font-weight: 700; color: var(--ink-3); margin: 0 0 10px; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--c, var(--blue)); }
.toc time { display: block; font-size: .8125rem; color: var(--ink-3); }
.mini-sub { border-radius: var(--radius); padding: 18px; background: var(--mist); display: grid; gap: 10px; font-size: .9375rem; }
.mini-sub b { font-size: 1rem; }
.mini-sub p { margin: 0; color: var(--ink-2); }
.mini-sub .btn { justify-self: start; min-height: 40px; padding: 8px 16px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; }
.share__label { font-weight: 700; margin-right: 6px; }
.share a, .share button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font-weight: 600; font-size: .875rem; text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--blue); color: var(--ink); }
.faq { max-width: var(--measure); padding-top: 26px; }
.faq h2 { margin: 0 0 14px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.faq details { border-radius: var(--radius); background: var(--mist); }
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 700; list-style: none; position: relative; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.4rem; font-weight: 500; color: var(--c, var(--blue)); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 18px; color: var(--ink-2); }
.sources { max-width: var(--measure); font-size: .9375rem; color: var(--ink-2); margin-top: 28px; padding: 18px 20px; border-radius: var(--radius); background: var(--mist); }
.sources h2 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.sources ul { margin: 0; padding-left: 1.2em; }
.after { padding-block: 48px 8px; border-top: 1px solid var(--line); margin-top: 24px; }
.after__grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.after__grid .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 28px 22px; }
.after__grid .card__title { font-size: 1.0625rem; }
.after h2 { margin: 0 0 18px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.015em; }

/* ---------- Listings ---------- */
.listing { padding-block: 44px 20px; }
.rubric-block + .rubric-block { margin-top: 56px; }
.rubric-block > h2 { margin: 0 0 22px; display: flex; align-items: center; gap: 14px; font-size: 1.75rem; font-weight: 800; letter-spacing: -.022em; scroll-margin-top: 16px; }
.rubric-block > h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--c); }
.rubric-block > h2 a { color: var(--ink); text-decoration: none; }
.rubric-block > h2 a:hover { color: var(--link); }
.lead-card { margin-bottom: 44px; }
.month-nav { display: grid; gap: 10px; margin: 0 0 40px; padding: 18px 20px; background: var(--mist); border-radius: var(--radius-l); }
.month-nav__row { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); gap: 10px; align-items: baseline; }
.month-nav__year { font-weight: 800; }
.month-nav__months { display: flex; flex-wrap: wrap; gap: 6px; }
.month-nav__months a { padding: 5px 11px; border-radius: 999px; background: var(--paper); color: var(--ink-2); text-decoration: none; font-size: .875rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.month-nav__months a:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hot); }
.news-month { scroll-margin-top: 16px; }
.news-month + .news-month { margin-top: 48px; }
.news-month > h2 { margin: 0 0 18px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 12px; }
.news-month > h2 span { font-size: .9375rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.nrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 980px; }
.nrow { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding-block: 20px; border-top: 1px solid var(--line); }
.nrow:first-child { border-top: 0; padding-top: 0; }
.nrow__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; background: var(--navy-2); }
.nrow__media img { width: 100%; height: 100%; object-fit: cover; }
.nrow__body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.nrow h3 { margin: 0; font-size: 1.1875rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.nrow h3 a { color: var(--ink); text-decoration: none; }
.nrow h3 a::after { content: ""; position: absolute; inset: 0; }
.nrow h3 a:hover { color: var(--link); }
.nrow p { margin: 0; color: var(--ink-2); font-size: .9688rem; }
.nrow time { font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Glossary ---------- */
.gloss-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 36px; padding: 0; list-style: none; }
.gloss-index a { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--mist); color: var(--ink-2); text-decoration: none; font-size: .875rem; font-weight: 600; }
.gloss-index a:hover { background: var(--navy); color: #fff; }
.gloss-group + .gloss-group { margin-top: 40px; }
.gloss-group > h2 { margin: 0 0 12px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.gloss { margin: 0; max-width: 860px; }
.gloss > div { padding: 16px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.gloss > div:target { background: color-mix(in srgb, var(--cta) 16%, var(--paper)); border-radius: var(--radius); padding-inline: 16px; }
.gloss dt { font-weight: 800; font-size: 1.125rem; line-height: 1.3; }
.gloss dd { margin: 6px 0 0; color: var(--ink-2); }
.gloss dd a { font-weight: 600; font-size: .9375rem; }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; padding-block: 36px; }
.calc__form { background: var(--paper); border-radius: var(--radius-l); padding: 22px; display: grid; gap: 18px; min-width: 0; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.shape-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.shape-picker legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.shape-picker label { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: .8125rem; font-weight: 600; text-align: center; background: var(--paper); line-height: 1.2; }
.shape-picker label:hover { border-color: var(--blue); }
.shape-picker input { position: absolute; opacity: 0; pointer-events: none; }
.shape-picker input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.shape-picker input:checked + label svg { stroke: #fff; }
.shape-picker input:checked + label svg .solid { fill: var(--cta); stroke: #fff; }
.shape-picker input:focus-visible + label { outline: 3px solid var(--cta); outline-offset: 2px; }
.shape-picker svg { width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 2; }
.shape-picker svg .solid { fill: color-mix(in srgb, var(--ink) 25%, transparent); stroke: var(--ink); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px 14px; align-items: end; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--paper); color: var(--ink); width: 100%; min-width: 0; font-variant-numeric: tabular-nums; min-height: 44px;
}
.field input:focus, .field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.calc__result { display: grid; gap: 18px; min-width: 0; }
.result-main { position: relative; overflow: hidden; padding: 24px; background: var(--navy); color: #fff; border-radius: var(--radius-l); }
.result-main::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--heat); }
.result-main__label { font-size: .9375rem; color: var(--on-navy-2); }
.result-main__value { font-weight: 800; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.result-main__sub { font-size: .9375rem; color: var(--on-navy-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.result-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0; font-variant-numeric: tabular-nums; }
.result-list dt { color: var(--ink-2); }
.result-list dd { margin: 0; font-weight: 700; text-align: right; }
.section-view { display: flex; gap: 16px; align-items: center; background: var(--mist); border-radius: var(--radius); padding: 14px; }
.section-view svg { width: 120px; height: 120px; flex: none; }
.section-view svg .cut { fill: color-mix(in srgb, var(--blue) 22%, transparent); stroke: var(--ink); stroke-width: 1.5; }
.section-view svg .dim { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.section-view svg text { fill: var(--ink-2); font: 11px var(--mono); }
.section-view p { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.formula-box { font-family: var(--mono); font-size: .875rem; background: var(--mist); padding: 12px 14px; border-radius: var(--radius-s); overflow-x: auto; white-space: nowrap; }
.calc__error { color: var(--bad); font-size: .9375rem; margin: 0; }
.presets { display: grid; gap: 6px; }
.presets__label { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.presets__list { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { font: 600 .8125rem/1 var(--mono); padding: 8px 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; cursor: pointer; }
.preset:hover { border-color: var(--blue); }
.preset:active { background: var(--mist); }
.fields--extra { padding-top: 14px; border-top: 1px dashed var(--line); }
.result-back { margin: 0; font-size: .9375rem; color: var(--ink-2); background: var(--mist); padding: 12px 14px; border-radius: var(--radius-s); }
.calc .result-compare.table-wrap { margin-top: 0; }
.result-compare caption { font-size: .875rem; }
.result-compare td, .result-compare th { padding: 8px 12px; }
.result-compare tr.is-current td { font-weight: 800; background: color-mix(in srgb, var(--cta) 22%, var(--paper)); }
.calc--embed { grid-template-columns: minmax(0, 1fr); padding-block: 0; }
.prose .calc--embed { margin-top: 1.5em; font-size: 1rem; line-height: 1.55; }
.calc--embed .calc__result { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: start; }
.calc--embed .result-main, .calc--embed .formula-box, .calc--embed .result-back, .calc--embed .section-view { grid-column: 1 / -1; }

/* ---------- Search ---------- */
.search { position: fixed; inset: 0; z-index: 70; background: rgba(6, 12, 28, .72); backdrop-filter: blur(4px); display: grid; align-items: start; justify-items: center; padding: max(16px, 8vh) 16px 16px; }
.search__box { width: min(720px, 100%); background: var(--paper); color: var(--ink); border-radius: var(--radius-l); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; display: grid; max-height: 84vh; grid-template-rows: auto minmax(0, 1fr) auto; }
.search__field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search__field svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search__field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.125rem; color: var(--ink); padding: 6px 0; }
.search__field input:focus { outline: none; }
.search__close { border: 0; background: var(--mist); color: var(--ink-2); border-radius: 8px; padding: 6px 10px; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.search__results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search__results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.search__results a:hover, .search__results a:focus, .search__results a.is-sel { background: var(--mist); outline: none; }
.search__results b { font-weight: 650; line-height: 1.3; }
.search__results span { font-size: .8125rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.search__results span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.search__hint { margin: 0; padding: 10px 16px 14px; font-size: .8125rem; color: var(--ink-3); border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.foot { background: var(--navy); color: var(--on-navy-2); font-size: .9375rem; margin-top: 64px; }
.foot--flush { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.foot__sub { display: grid; gap: 22px 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; padding-block: 44px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.foot__sub h2 { margin: 0 0 8px; color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.foot__sub p { margin: 0; }
.foot__grid { display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); padding-block: 40px 24px; }
.foot h3 { font-size: .8125rem; font-weight: 700; color: var(--on-navy-3); margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--on-navy); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__about p { margin: 14px 0 0; max-width: 40ch; }
.foot__fine { padding-block: 18px 30px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--on-navy-3); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.foot__fine p { margin: 0; max-width: 80ch; }

/* ---------- Simple pages ---------- */
.page-body { padding-block: 40px 10px; }
.notfound { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Cookie note ---------- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--navy); color: var(--on-navy);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; gap: 12px 18px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .9375rem; box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); }
.cookie a { color: inherit; }
.cookie button { font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--cta); color: var(--cta-ink); cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .today { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tools-panel { grid-column: 1 / -1; }
  .toollist { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .top__grid { grid-template-columns: minmax(0, 1fr); }
  .feed .rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 24px; }
  .feed .row:nth-child(2) { border-top: 0; padding-top: 0; }
  .grades { grid-template-columns: minmax(0, 1fr); }
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .aside { display: none; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .rblock__grid { grid-template-columns: minmax(0, 1fr); }
  .rblock:nth-of-type(even) .rblock__grid > .card { order: 0; }
  .subband__inner, .foot__sub, .subcard { grid-template-columns: minmax(0, 1fr); }
  .subband__img { width: 100%; opacity: .25; }
  .after__grid { grid-template-columns: minmax(0, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .mast__date { display: none; }
  .mast__actions { margin-left: auto; }
}
@media (max-width: 720px) {
  .section { padding-block: 40px; }
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .mast__nav ul { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 32px; }
  .today { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .nrow { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .nrow p { display: none; }
  .nrow h3 { font-size: 1.0313rem; }
  .art-hero { padding-bottom: 72px; }
  .art-cover { margin-top: -56px; }
  .art-cover img { aspect-ratio: 16 / 9; }
  .shape-picker label { font-size: .75rem; padding-inline: 2px; }
  .grade-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .grade-group__name { padding-top: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd + dt { margin-top: 8px; }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .brand__tag { display: none; }
  .brand__name { font-size: 1.3rem; }
  .iconbtn span { display: none; }
  .iconbtn { padding: 8px 12px; }
  .mast__bar { gap: 12px; }
  .mast__actions .btn { padding-inline: 14px; }
  .subform__row { flex-wrap: wrap; border-radius: var(--radius-l); }
  .subform__row .btn { width: 100%; }
  .hero__body { min-height: 420px; }
  .crumbs [aria-current] { max-width: 24ch; }
}
@media (max-width: 380px) {
  .brand__tile { width: 40px; height: 40px; }
  .mast__actions .btn { font-size: .875rem; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .mast, .foot, .aside, .after, .seam, .progress, .share, .subcard, .search { display: none !important; }
  .art-hero, .phead { background: none; color: #000; }
}

/* ===================== Раздел 2: рынок, аналитика, справочники ===================== */
.r-analytics { --c: var(--mint); }
.r-events { --c: var(--cta); }
:root { --mint: #0f8f66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mint: #45d19f; } }
:root[data-theme="dark"] { --mint: #45d19f; }

/* Верхняя строка шапки: котировка и справочные разделы */
.mast__top { background: rgba(0, 0, 0, .22); border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: .8125rem; }
.mast__topin { display: flex; align-items: center; gap: 8px 24px; min-height: 38px; }
.tick { display: inline-flex; align-items: baseline; gap: 8px; color: var(--on-navy-2); text-decoration: none; white-space: nowrap; flex: none; }
.tick:hover { color: #fff; }
.tick__name { color: var(--on-navy-3); }
.tick b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.tick__ch { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; gap: 3px; }
.tick--up .tick__ch { color: #6fe0a8; }
.tick--down .tick__ch { color: #ff9b86; }
.tick__date { color: var(--on-navy-3); }
.mast__util { margin-left: auto; min-width: 0; }
.mast__util ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px 18px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mast__util ul::-webkit-scrollbar { display: none; }
.mast__util a { color: var(--on-navy-2); text-decoration: none; font-weight: 600; display: block; padding: 9px 0; }
.mast__util a:hover, .mast__util a[aria-current="page"] { color: #fff; }
.mast__util a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cta); }

/* Плитки показателей */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .kpi { padding: 12px; } .kpi__note { display: none; } .ch-x, .ch-y { font-size: 24px; } .ch-last { font-size: 26px; } .chart { padding: 10px 4px 4px; } }
.kpi { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); min-width: 0; }
.kpi__name { font-size: .8125rem; font-weight: 600; color: var(--on-navy-3); }
.kpi__val { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi__ch { font-size: .875rem; font-weight: 700; color: var(--on-navy-2); font-variant-numeric: tabular-nums; }
.kpi--up .kpi__ch { color: #6fe0a8; }
.kpi--down .kpi__ch { color: #ff9b86; }
.kpi__note { font-size: .75rem; color: var(--on-navy-3); }
.kpis--light { margin-top: 28px; }
.kpis--light .kpi { background: var(--mist); box-shadow: none; border-left: 4px solid var(--c, var(--mint)); border-radius: 0 var(--radius) var(--radius) 0; }
.kpis--light .kpi__val { color: var(--ink); }
.kpis--light .kpi__name { color: var(--ink-2); font-size: .875rem; font-weight: 500; line-height: 1.35; }
.market-strip { margin-top: 30px; display: grid; gap: 14px; }
.market-strip__title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--on-navy-2); display: flex; align-items: center; gap: 10px; }
.market-strip__title::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: var(--heat); }
.market-strip .more-link, .phead .more-link { color: var(--cta); }
.phead__kpis { margin-top: 26px; }

/* График */
.chart { margin: 1.4em 0 0; padding: 16px 12px 6px; border-radius: var(--radius-l); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.chart svg { display: block; width: 100%; height: auto; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-y, .ch-x { fill: var(--ink-3); font: 500 13px var(--font); font-variant-numeric: tabular-nums; }
.ch-dot { fill: var(--paper); stroke: #6a47cf; stroke-width: 2.5; }
.ch-dot.is-part { stroke-dasharray: 3 2; }
.ch-dot.is-hl { fill: #6a47cf; }
.ch-dot:hover { fill: #6a47cf; }
.ch-last { fill: var(--ink); font: 800 15px var(--font); }
.chart-note { font-size: .8125rem; color: var(--ink-3); margin-top: .6em; }
.prose .chart-note { margin-top: .6em; }
td.up { color: var(--ok); font-weight: 700; }
td.down { color: var(--bad); font-weight: 700; }
.nicalc { margin-top: 1.4em; display: grid; gap: 14px; }
.nicalc .field { max-width: 240px; }
.nicalc td small { display: block; font-weight: 400; color: var(--ink-3); font-size: .8125rem; }
.nicalc td[data-cost] { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose--wide { max-width: 860px; }
.an-chart { margin-top: 56px; }
.an-chart h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.mini-ni { border-radius: var(--radius); padding: 16px 18px; background: var(--mist); font-size: .875rem; display: grid; gap: 8px; }
.mini-ni ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini-ni li { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.mini-ni li span:last-child { font-weight: 700; }

/* Марочник */
.grade-index td, .grade-index th { white-space: nowrap; }
.grade-index td:nth-child(2) { white-space: normal; min-width: 9rem; color: var(--ink-2); font-weight: 400; }
.grade-index td:last-child { white-space: normal; color: var(--ink-2); font-weight: 400; }
.grade-index a { text-decoration: none; }
.grade-index a:hover { text-decoration: underline; }
.chem-table th, .chem-table td { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chem-table td:first-child { font-weight: 400; }
.desig th { width: 42%; font-weight: 500; color: var(--ink-2); background: none; }
.desig td { font-weight: 700; }
.gprops { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 1.2em 0 0; }
.gprops dt { color: var(--ink-3); font-size: .9375rem; }
.gprops dd { margin: 0; }
.gnav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; border-left: 0 !important; }
.gnav a { border-left: 0 !important; padding: 5px 0 !important; font-family: var(--mono); font-size: .8125rem; }
.grade-cat { padding: 14px 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--straw) 10%, var(--paper)); }
.phead--grade h1 { font-family: var(--mono); letter-spacing: -.01em; }
.mar-chips { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mar-chips h3 { margin: 0 0 10px; font-size: .9375rem; font-weight: 700; color: var(--ink-3); }
.gchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gchips a { display: inline-block; padding: 8px 12px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); text-decoration: none; font: 700 .875rem/1 var(--mono); }
.gchips a:hover { box-shadow: inset 0 0 0 1.5px var(--straw); }

/* Стандарты */
.std-group + .std-group { margin-top: 48px; }
.std-group > h2 { margin: 0 0 16px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; scroll-margin-top: 16px; display: flex; gap: 12px; align-items: center; }
.std-group > h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--straw); }
.stds { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.std { padding: 16px 18px; border-radius: var(--radius); background: var(--mist); display: grid; gap: 6px; align-content: start; scroll-margin-top: 16px; }
.std:target { box-shadow: inset 0 0 0 2px var(--cta); }
.std__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.std__code { font-family: var(--mono); font-size: 1rem; }
.std__status { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.std__status--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.std__status--old { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.std p { margin: 0; }
.std__title { font-weight: 600; line-height: 1.35; }
.std__ru { display: block; font-weight: 400; color: var(--ink-2); font-size: .9375rem; margin-top: 2px; }
.std__scope { color: var(--ink-2); font-size: .9375rem; }
.std__arts { font-size: .8125rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Выставки */
.ev-group + .ev-group { margin-top: 48px; }
.ev-group > h2 { margin: 0 0 16px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 10px; }
.ev-group > h2 span { font-size: 1rem; color: var(--ink-3); font-weight: 600; }
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.evs--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.ev { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: var(--radius-l); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); align-items: start; }
.section--mist .ev { box-shadow: none; }
.ev__date { display: grid; justify-items: center; align-content: center; padding: 10px 4px; border-radius: var(--radius); background: var(--navy); color: #fff; text-align: center; position: relative; overflow: hidden; }
.ev__date::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--heat); }
.ev__date b { font-size: 1.75rem; line-height: 1; font-weight: 800; }
.ev__date span { font-size: .75rem; color: var(--on-navy-2); margin-top: 4px; }
.ev__body { display: grid; gap: 6px; min-width: 0; }
.ev h3 { margin: 0; font-size: 1.125rem; line-height: 1.3; font-weight: 700; }
.ev h3 a { color: var(--ink); text-decoration: none; }
.ev h3 a:hover { color: var(--link); text-decoration: underline; }
.ev p { margin: 0; }
.ev__about { color: var(--ink-2); font-size: .9375rem; }
.ev__why { font-size: .9375rem; padding-left: 12px; border-left: 3px solid var(--cta); }
.ev-group--past .ev { background: var(--mist); box-shadow: none; }
.ev-group--past .ev__date { background: var(--ink-3); }

@media (max-width: 980px) {
  .mast__date { display: none; }
}
@media (max-width: 720px) {
  .mast__topin { gap: 8px 14px; }
  .mast__util ul { -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); padding-right: 24px; }
  .tick__name { display: none; }
  .mar-chips { grid-template-columns: minmax(0, 1fr); }
  .gprops { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .gprops dd + dt { margin-top: 10px; }
  .kpi__val { font-size: 1.25rem; }
  .ev { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; }
}
