/* ClearPic Check · Insights, editorial system (v2, 16 Nov 2026)
   One stylesheet for the hub, the long-form article and the entry previews.
   Self-contained: does not load common.css or guide.css.

   Type      Space Grotesk (display) · DM Sans (text) · JetBrains Mono (data).
             Same three faces as clearpic.ai. Words quoted from a register
             file (lang="ru") are set in the mono face: DM Sans has no
             Cyrillic, and mono marks them as copied verbatim.
   Colour    clearpic.ai ink #0A0F1C on #FAFBFC, one accent (cobalt #1B4FE0).
             Colour carries meaning only: a link, the current item, or the one
             row in a chart that is a different kind of thing.
   Grid      12 columns, 24px gutter. Labels sit in columns 1–3, content
             starts at column 4. Nothing is centred.
   Band      The site header and the page title sit on the dark ink band,
             the same surface as the first screen of the landing.
   Themes    The page is always light. Tokens are light-dark() pairs so the
             ink band can flip them with color-scheme: dark. */

:root {
  /* Light only, like clearpic.ai and the rest of Check. The one dark surface
     is .band, which opts into the dark half of every light-dark() token. */
  color-scheme: light;

  --paper: light-dark(#fafbfc, #0a0f1c);
  --surface: light-dark(#f0f2f7, #121826);
  --ink: light-dark(#0a0f1c, #f4f6fb);
  --ink-2: light-dark(#454c64, #b9c1d6);
  --ink-3: light-dark(#5a6278, #8b93ab);
  --rule: light-dark(#e2e5ee, #232b3f);
  --accent: light-dark(#1b4fe0, #93b4f5);
  --accent-wash: light-dark(#e6ecfc, #14204a);
  --on-ink: light-dark(#fafbfc, #0a0f1c);

  --display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 1.5rem;
  --edge: clamp(1.25rem, 4vw, 3rem);
  --measure: 35.5rem; /* ≈ 68 characters of 18px DM Sans, measured */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-align: start;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Primitives ---------- */

.wrap {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--edge);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.grid > * {
  grid-column: 1 / -1;
}

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Text link: underlined, the underline darkens on hover */
.link,
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--ink-3);
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

.link:hover,
.prose a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.btn {
  display: inline-block;
  min-block-size: 2.75rem;
  padding: 0.7rem 1.25rem;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  border: 1px solid var(--ink);
  border-radius: 4px;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
}

.skip-link:not(:focus-visible) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

/* ---------- Site header ---------- */

.site-head {
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.site-head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand span {
  font-weight: 400;
  color: var(--ink-3);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  font-size: 0.875rem;
}

.site-nav a,
.site-nav button {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.site-nav button {
  font: inherit;
  background: none;
  border-inline: 0;
  border-top: 0;
  padding-inline: 0;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav button:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.site-nav [aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Hub masthead ---------- */

.mast {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
  row-gap: 2.5rem;
  align-items: end;
}

.display {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.mast .label {
  margin-bottom: 1.25rem;
}

.mast .dek {
  margin-top: 1.75rem;
}

.dek {
  max-width: 36rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.byline {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Definition list used for "facts at a glance" (masthead, article rail) */
.facts {
  border-top: 1px solid var(--ink);
}

.facts > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.45;
}

.facts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.1rem;
}

/* ---------- Sections (hub) ---------- */

.sec {
  padding-block: 0 clamp(3.5rem, 7vw, 6rem);
}

.sec-head {
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  row-gap: 0.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.sec-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.sec-note {
  margin-top: 0.6rem;
  max-width: 34rem;
  color: var(--ink-2);
}

/* ---------- Entry previews ----------
   Two shapes, on purpose: the lead entry carries a piece of the document,
   index entries carry one number. Neither has an icon or a "read more". */

.entry-title {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.12;
  text-wrap: balance;
}

.entry-title a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 200ms ease;
}

.entry-title a:hover,
.entry-title a:focus-visible {
  background-size: 100% 1px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.entry-meta li + li::before {
  content: "/";
  margin-right: 1.25rem;
  color: var(--rule);
}

.lead {
  row-gap: 2.5rem;
}

.lead .entry-title {
  margin-top: 1rem;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
}

.lead-desc {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: 1.125rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

/* The document excerpt that sits beside the lead entry */
.excerpt {
  padding: 1.25rem 1.5rem 1rem;
  background: var(--surface);
  border-top: 2px solid var(--ink);
}

.excerpt .label,
.excerpt-title {
  display: block;
}

.excerpt-title {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
}

.excerpt ol {
  margin-top: 1rem;
  counter-reset: line;
}

.excerpt li {
  counter-increment: line;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.excerpt li::before {
  content: counter(line, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-top: 0.15rem;
}

.excerpt b {
  display: block;
  font-weight: 600;
}

.excerpt span {
  color: var(--ink-2);
}

.excerpt-more {
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.index > li {
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
  row-gap: 0.75rem;
  align-items: start;
}

.index > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.index .entry-title {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
}

.index-desc {
  margin-top: 0.6rem;
  max-width: 30rem;
  color: var(--ink-2);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.stat b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 3.25rem;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.stat span {
  max-width: 11rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-2);
}

/* ---------- Figures, tables, charts ---------- */

.fig {
  margin-block: 2.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
}

.sec .fig {
  margin-block: 0;
}

.fig-title {
  display: block;
  margin-top: 0.4rem;
  max-width: 34rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

.fig-note {
  margin-top: 0.9rem;
  max-width: var(--measure);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  max-inline-size: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
}

th,
td {
  padding: 0.85rem 1.5rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: start;
  vertical-align: top;
  font-weight: 400;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

thead th {
  padding-block: 0 0.6rem;
  border-bottom-color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

tbody th {
  font-weight: 600;
  color: var(--ink);
}

tbody td {
  color: var(--ink-2);
}

.guide-table tbody th {
  width: 36%;
  min-width: 9rem;
}

/* Registers table on the hub */
.reg-table td,
.reg-table tbody th {
  padding-block: 1.1rem;
}

.reg-table .price {
  min-width: 11rem;
}

.reg-table .status {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Horizontal bar: a 6px rule whose length is the value. The value is always
   printed next to it, so the bar never carries the number alone. */
.bar {
  display: block;
  height: 6px;
  margin-top: 0.5rem;
  background: linear-gradient(var(--rule), var(--rule)) 0 50% / 100% 1px no-repeat;
}

.bar i {
  display: block;
  width: calc(var(--v) * 1%);
  height: 100%;
  background: var(--ink-3);
  transform-origin: 0 50%;
}

.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-wash);
  border-radius: 2px;
}

/* Coverage matrix: shape first, colour second */
.matrix td {
  white-space: nowrap;
}

.mark {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.5rem;
  border: 1.5px solid currentColor;
}

.yes {
  color: var(--ink);
}

.yes .mark {
  background: currentColor;
}

.no {
  color: var(--ink-3);
}

/* ---------- Article ---------- */

.art-head {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
  row-gap: 2.5rem;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.crumb ol {
  display: contents;
}

.crumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--rule);
}

.art-head .display {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  max-width: 17ch;
}

.art-head .dek {
  margin-top: 1.75rem;
  max-width: var(--measure);
}

.art-body {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);
  row-gap: 3rem;
  align-items: start;
}

.toc-title {
  margin-bottom: 0.75rem;
}

.toc ol {
  border-left: 1px solid var(--rule);
  scroll-target-group: auto;
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-2);
  transition: color 150ms ease, border-color 150ms ease;
}

.toc a:hover,
.toc a[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--accent);
}

.toc a[aria-current="true"] {
  font-weight: 600;
}

.slip {
  margin-top: 2.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
}

.slip-name {
  margin-top: 0.4rem;
  font-weight: 600;
  line-height: 1.35;
}

.slip-price {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.slip ul {
  margin-block: 0.9rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.slip li {
  padding-block: 0.45rem;
  border-top: 1px solid var(--rule);
}

.slip .btn {
  width: 100%;
  text-align: center;
}

.slip-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.pricelist a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pricelist a:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.prose section {
  scroll-margin-top: 1.5rem;
}

.prose section + section {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.prose h2 {
  max-width: var(--measure);
  margin-bottom: 1.1rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose p,
.prose .guide-list {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.68;
  color: var(--ink-2);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.prose p + p,
.prose .fig + p {
  margin-top: 1.15rem;
}

.prose section > p:first-of-type {
  color: var(--ink);
}

.prose .guide-list li {
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
}

.prose .fig p {
  font-size: 0.8125rem;
}

/* ---------- Article end ---------- */

.end {
  padding-block: 0 clamp(4rem, 8vw, 6rem);
}

.order-band {
  padding-block: 2rem;
  border-block: 1px solid var(--ink);
  row-gap: 1.25rem;
  align-items: center;
}

.order-band h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.order-band p {
  margin-top: 0.4rem;
  color: var(--ink-2);
}

.more {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* ---------- Footer ---------- */

.site-foot {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.site-foot .grid {
  row-gap: 2rem;
}

.site-foot h2 {
  margin-bottom: 0.6rem;
}

.site-foot li + li {
  margin-top: 0.3rem;
}

.site-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.foot-legal {
  color: var(--ink-3);
  line-height: 1.55;
}

/* ---------- Columns ---------- */

@media (min-width: 62rem) {
  .col-label { grid-column: 1 / span 3; }
  .col-main { grid-column: 4 / -1; }
  .col-text { grid-column: 4 / span 6; }
  .col-side { grid-column: 10 / -1; }

  .mast-main { grid-column: 1 / span 8; }
  .mast-facts { grid-column: 10 / -1; }

  .lead-text { grid-column: 1 / span 7; }
  .lead-fig { grid-column: 9 / -1; }

  .art-rail {
    grid-column: 1 / span 3;
    position: sticky;
    top: 2rem;
    padding-right: 1.5rem;
  }

  .prose { grid-column: 4 / -1; }

  /* Title first in the DOM, facts column to its left on wide screens */
  .art-head > * { grid-row: 1; }
  .art-head .col-main { grid-column: 4 / span 8; }
  .art-facts { align-self: end; }

  .band-text { grid-column: 4 / span 6; }
  .band-action { grid-column: 10 / -1; justify-self: end; }

  .foot-brand { grid-column: 1 / span 3; }
  .foot-col { grid-column: span 2; }
  .foot-legal { grid-column: span 3; }
}

@media (max-width: 61.99rem) {
  .toc { display: none; }
  .slip { margin-top: 0; }
  .facts > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

/* ---------- Motion ----------
   One gesture: content settles as it enters the viewport. Scroll-driven, so
   nothing plays on its own; decorative, so no script fallback. */

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* Movement only, no fade: text and tables are never drawn half-transparent,
       and the price bars are always their true length. */
    @keyframes settle {
      from {
        transform: translateY(0.5rem);
      }
    }

    .reveal {
      animation: settle linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 25%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .bar i,
  .yes .mark {
    background: CanvasText;
  }

  .btn {
    border: 1px solid ButtonText;
  }
}

@media print {
  .reveal {
    animation: none !important;
  }

  .site-nav,
  .toc,
  .skip-link {
    display: none;
  }
}

/* ---------- Brand alignment with clearpic.ai (16 Nov 2026) ---------- */

/* Display face: Space Grotesk 600, tight tracking, as on the landing */
.display,
.sec-title,
.entry-title,
.fig-title,
.excerpt-title,
.prose h2,
.order-band h2,
.slip-price {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.display {
  letter-spacing: -0.035em;
}

.fig-title,
.excerpt-title {
  letter-spacing: -0.02em;
}

.stat b {
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* Words copied from a register file */
[lang="ru"],
[lang="tg"] {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}

tbody th[lang="ru"],
.excerpt b[lang="ru"] {
  font-weight: 500;
}

/* The ink band: header + title on the landing's dark surface, in both themes.
   color-scheme: dark flips every light-dark() token inside it. */
.band {
  color-scheme: dark;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(60% 110% at 85% 40%, #000, transparent 75%);
  mask-image: radial-gradient(60% 110% at 85% 40%, #000, transparent 75%);
  pointer-events: none;
}

.band > * {
  position: relative;
}

/* Kicker in the band carries the cobalt square from the landing's map legend */
.band .mast-main > .label::before,
.band .col-main > .label::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.6rem;
  background: #1b4fe0;
}

.band .facts {
  border-top-color: var(--ink-3);
}

.art-body,
main > .sec:first-of-type {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- Review fixes (17 Nov 2026) ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand img {
  flex: none;
}

/* One row-header style for every table; register words only change face */
tbody th[lang="ru"],
.excerpt b[lang="ru"] {
  font-weight: 600;
}

tbody th[lang="ru"] {
  font-size: 0.9em;
}

/* Inside running text a register word keeps the paragraph's face (system
   Cyrillic): mono mid-sentence read like code. Tables and the excerpt keep mono. */
.prose p [lang],
.dek [lang],
.lead-desc [lang] {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

.dek {
  max-width: var(--measure);
}

/* Separators readable: rules, not near-invisible slashes */
.entry-meta li + li::before,
.crumb li + li::before {
  color: var(--ink-3);
}

/* Targets at least 24px tall */
.site-foot li a,
.crumb a,
.slip-note a,
.excerpt-more a,
.pricelist a {
  display: inline-block;
  padding-block: 0.25rem;
}

.pricelist a {
  display: flex;
}

/* Hub hierarchy: section head > lead title > index titles */
.sec-title {
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem);
}

.lead .entry-title {
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem);
}

.index .entry-title {
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
}

.stat b {
  font-size: 2.5rem;
}

.excerpt-more {
  padding-top: 0.5rem;
}

/* Scroll region exists only when the table overflows (set by insights.js) */
.table-wrap[role="region"] {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent);
}

.table-wrap[role="region"]:focus-visible {
  -webkit-mask-image: none;
  mask-image: none;
}

/* Grid texture matched to the landing hero */
.band::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}

@media (min-width: 62rem) {
  .lead-text {
    display: flex;
    flex-direction: column;
  }

  .lead-actions {
    margin-top: auto;
  }

  .art-facts {
    align-self: start;
    margin-top: 3.4rem;
  }

  .art-rail {
    max-block-size: calc(100dvh - 4rem);
    overflow-y: auto;
  }
}

/* Phones and tablets: the article comes first */
@media (max-width: 61.99rem) {
  .art-facts {
    display: none;
  }

  .art-rail {
    order: 2;
  }

  .prose {
    order: 1;
  }
}

/* Phones: each table row becomes a small card, every value labelled */
@media (max-width: 47.99rem) {
  .fig table,
  .fig tbody,
  .fig tr,
  .fig tbody th,
  .fig td {
    display: block;
    width: auto;
    min-width: 0;
  }

  .fig thead {
    display: none;
  }

  .fig tr {
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--rule);
  }

  .fig tbody th,
  .fig td {
    padding: 0;
    border: 0;
  }

  .fig tbody th {
    margin-bottom: 0.35rem;
  }

  .fig td + td,
  .fig tbody th + td {
    margin-top: 0.3rem;
  }

  .fig td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  .matrix td {
    white-space: normal;
  }

  .reg-table .price {
    min-width: 0;
  }

  .reg-table .bar {
    max-width: 14rem;
  }
}

/* ---------- Hub: an index of posts (17 Nov 2026) ----------
   No prices, no order buttons. Each card is framed; its cover says at a
   glance what the post is about, in English: a country (flag, name, three
   facts) or a piece of data (the matrix, the offices). */

.mast--quiet {
  padding-block: clamp(2rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3rem);
}

.mast--quiet .display {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
}

.mast--quiet .dek {
  margin-top: 1rem;
  max-width: 46rem;
  font-size: 1.0625rem;
}

.mast--quiet .byline {
  margin-top: 1rem;
}

.hub {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
}

.posts {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.post {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 200ms ease;
}

.post:hover,
.post:has(.post-title a:focus-visible) {
  border-color: var(--ink);
}

.post:has(.post-title a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.post-cover {
  padding: 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  transition: background-color 200ms ease;
}

.post:hover .post-cover {
  background: var(--accent-wash);
}

.post-body {
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.post-title {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.post-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-title a:focus-visible {
  outline: none;
}

.post:hover .post-title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-desc {
  margin-top: 0.6rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

.post--feature .post-title {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  letter-spacing: -0.03em;
}

.post--feature .post-desc {
  font-size: 1.125rem;
}

/* Flags (flag-icons): sized by font-size, 4:3, hairline edge for white fields */
.flag,
.flag-sm {
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(10, 15, 28, 0.12);
}

.flag {
  font-size: 2.5rem;
}

.flag-sm {
  font-size: 0.9rem;
}

/* Country cover: flag, name, three facts */
.cover-country {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cover-country-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.cover-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem var(--gutter);
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}

.cover-facts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cover-facts dd {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink);
}

/* Matrix cover: four files x three facts, filled = printed */
.cm {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(2.75rem, 1fr));
  column-gap: 0.75rem;
  align-items: center;
  row-gap: 0.65rem;
  font-size: 0.9375rem;
  color: var(--ink);
}

.cm-h {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-3);
}

.cm-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cm-sq {
  justify-self: center;
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--ink-3);
}

.cm-sq.on {
  background: var(--ink);
  border-color: var(--ink);
}

/* Offices cover: who keeps which register */
.cover-offices > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--ink);
}

.cover-offices > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.cover-offices > div:last-child {
  padding-bottom: 0;
}

.co-flags {
  display: flex;
  gap: 0.4rem;
}

.co-flags .flag-sm {
  font-size: 1.1rem;
}

/* Overflow posts (7th onward): a plain list */
.post-list {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--ink);
}

.post-list a {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.pl-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pl-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.post-list a:hover .pl-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hub-foot {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
}

/* From tablet up: the feature runs full width, cover beside text, and the
   other posts sit in rows below it (pairs, then threes on wide screens). */
@media (min-width: 48rem) {
  .post--feature {
    flex-direction: row;
  }

  .post--feature .post-cover {
    flex: 0 0 50%;
    justify-content: space-between;
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .post--feature .post-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .post--side,
  .post--row {
    grid-column: span 6;
  }
}

@media (min-width: 62rem) {
  .post--row {
    grid-column: span 4;
  }

  .post--feature .post-cover {
    flex-basis: 55%;
    padding: 2.25rem 2.5rem;
  }

  .post--feature .post-body {
    padding: 2.25rem 2.5rem;
  }

  .post--feature .flag {
    font-size: 3.5rem;
  }

  .post--feature .cover-country-name {
    font-size: clamp(2.75rem, 1.5rem + 2.4vw, 3.75rem);
  }

  .post-list a {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.cm-h {
  text-wrap: balance;
  line-height: 1.3;
}

.cm-name {
  white-space: nowrap;
}

.cm-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.cm-key .cm-sq {
  margin-left: 0.6rem;
}

.cm-key .cm-sq:first-child {
  margin-left: 0;
}

/* ---------- Articles in the card style (17 Nov 2026) ----------
   The article header carries the same cover as the post's card, as a light
   card on the ink band: the card "opens" into the article. The order slip
   and "More from Insights" use the same framed cards as the hub. */

.art-cover {
  color-scheme: light; /* light tokens inside the dark band */
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #232b3f;
}

.art-cover .post-cover {
  border-bottom: 0;
}

.art-cover .cover-country-name {
  font-size: clamp(2rem, 1.5rem + 1.4vw, 2.75rem);
}

.art-cover .flag {
  font-size: 3rem;
}

.slip {
  padding: 1.25rem 1.25rem 1.1rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  border-radius: 4px;
}

.more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.more .posts {
  margin: 0;
}

@media (max-width: 47.99rem) {
  .art-cover {
    display: none;
  }
}

@media (min-width: 48rem) and (max-width: 61.99rem) {
  .art-cover {
    max-width: 32rem;
  }
}

@media (min-width: 62rem) {
  .art-head .col-main {
    grid-column: 1 / span 7;
  }

  .art-cover {
    grid-column: 8 / -1;
    align-self: end;
  }

  .slip {
    margin-top: 2rem;
  }
}

/* ---------- Country deep dive (17 Nov 2026) ----------
   Long-form template. Prose keeps the reading measure; editorial blocks
   (figures, steps, cards, callouts) take the full article width.
   Colour carries meaning only: red marks a red flag, cobalt a link. */

:root {
  --flag: #b42318; /* red flag text and rule, 6.4:1 on white */
  --flag-wash: #fdf1f0;
}

.dd-draftbar {
  margin: 0;
  padding-block: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #f4c47a;
  border-bottom: 1px solid var(--rule);
}

.dd-title {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  max-width: 22ch;
}

.dd-suffix {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dd-prose > * + * {
  margin-top: 2.5rem;
}

.dd-prose section > * + * {
  margin-top: 1.15rem;
}

.dd-prose section > .fig,
.dd-prose section > .dd-cards,
.dd-prose section > .dd-callout,
.dd-prose section > .dd-defs {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.dd-intro p + p {
  margin-top: 1.15rem;
}

/* In short: the box under the intro */
.dd-takeaways {
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  border-radius: 4px;
}

.dd-takeaways ol {
  margin-top: 0.75rem;
  counter-reset: take;
}

.dd-takeaways li {
  counter-increment: take;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  line-height: 1.5;
}

.dd-takeaways li:first-child {
  border-top: 0;
}

.dd-takeaways li::before {
  content: counter(take, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-top: 0.2rem;
}

/* Stats: big numbers, label underneath, source in the figure note */
.dd-statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.5rem var(--gutter);
  margin-top: 1.5rem;
}

.dd-statgrid > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.dd-statgrid dd {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.dd-statgrid dt {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* Compare: two systems, side by side */
.dd-compare-table thead th {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.dd-compare-table tbody th {
  width: 22%;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 1.05rem;
}

.dd-compare-table td {
  width: 39%;
  color: var(--ink);
}

/* Steps: a numbered process */
.dd-steplist {
  margin-top: 1.5rem;
  counter-reset: step;
}

.dd-steplist li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 0.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}

.dd-steplist li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-3);
}

.dd-steplist li:first-child::before {
  color: var(--accent);
}

.dd-steplist b {
  font-weight: 600;
  color: var(--ink);
}

.dd-steplist p {
  margin-top: 0.25rem;
  font-size: 1rem;
  color: var(--ink-2);
}

/* Definitions: what a document contains */
.dd-defs {
  border-top: 1px solid var(--ink);
}

.dd-defs > div {
  display: grid;
  gap: 0.25rem var(--gutter);
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.dd-defs dt {
  font-weight: 600;
  color: var(--ink);
}

.dd-defs dd {
  color: var(--ink-2);
  line-height: 1.55;
}

/* Cards: entity types */
.dd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gutter);
}

.dd-card {
  padding: 1.1rem 1.25rem 1.25rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.dd-card-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dd-card h3 {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.dd-card p:last-child {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.dd-card.is-flag {
  border-top: 2px solid var(--flag);
}

.dd-card.is-flag .dd-card-tag {
  color: var(--flag);
}

/* Callouts: red flag (meaning: risk) and note (neutral) */
.dd-callout {
  max-width: var(--measure);
  padding: 1rem 1.25rem 1.1rem;
  border-left: 3px solid var(--ink-3);
  background: var(--surface);
}

.dd-callout.is-red-flag {
  border-left-color: var(--flag);
  background: var(--flag-wash);
}

.dd-callout-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.dd-callout-kind {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.is-red-flag .dd-callout-kind {
  color: var(--flag);
}

.dd-prose .dd-callout p:not(.dd-callout-title) {
  margin-top: 0.4rem;
  font-size: 1rem;
  color: var(--ink);
}

/* Resources: where else to look */
.dd-reslist {
  margin-top: 1.5rem;
}

.dd-reslist li {
  display: grid;
  gap: 0.35rem var(--gutter);
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}

.dd-reslist b {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.dd-addr {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.dd-reslist p {
  font-size: 1rem;
  color: var(--ink-2);
}

/* Timeline */
.dd-timeline-list {
  margin-top: 1.5rem;
  border-left: 1px solid var(--rule);
}

.dd-timeline-list li {
  position: relative;
  display: grid;
  gap: 0.35rem var(--gutter);
  padding: 0 0 1.5rem 1.5rem;
}

.dd-timeline-list li::before {
  content: "";
  position: absolute;
  left: -0.3125rem;
  top: 0.3rem;
  width: 0.5625rem;
  height: 0.5625rem;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.dd-when {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dd-timeline-list b {
  font-weight: 600;
  color: var(--ink);
}

.dd-timeline-list div p {
  margin-top: 0.25rem;
  font-size: 1rem;
  color: var(--ink-2);
}

@media (min-width: 48rem) {
  .dd-defs > div,
  .dd-reslist li {
    grid-template-columns: 14rem minmax(0, 1fr);
  }

  .dd-timeline-list li {
    grid-template-columns: 9rem minmax(0, 1fr);
  }
}

/* Phones: compare stacks like the other figures */
@media (max-width: 47.99rem) {
  .dd-compare-table thead {
    display: none;
  }

  .dd-compare-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  .dd-compare-table tbody th,
  .dd-compare-table td {
    width: auto;
  }
}

/* Deep dive: block text keeps its own size inside .prose */
.dd-prose .dd-takeaways .label,
.dd-prose .dd-card-tag {
  max-width: none;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--ink-3);
}

.dd-prose .dd-takeaways .label {
  font-size: 0.75rem;
}

.dd-prose .dd-card.is-flag .dd-card-tag {
  color: var(--flag);
}

.dd-prose .dd-card p:last-child,
.dd-prose .dd-steplist p,
.dd-prose .dd-reslist p,
.dd-prose .dd-timeline-list div p {
  max-width: none;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.dd-prose .dd-card p:last-child {
  font-size: 0.9375rem;
}

.dd-prose .dd-when {
  max-width: none;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-3);
}

.dd-prose .dd-callout-title {
  max-width: none;
  font-size: 1rem;
  color: var(--ink);
}

.dd-prose .dd-steplist p,
.dd-prose .dd-reslist p {
  max-width: 40rem;
}

@media (min-width: 48rem) {
  .dd-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Long contents list: order card first, contents sticky on its own */
@media (min-width: 62rem) {
  .dd-page .art-body {
    align-items: stretch;
  }

  .dd-page .art-rail {
    position: static;
    max-block-size: none;
    overflow: visible;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
  }

  .dd-page .art-rail .slip {
    margin: 0 0 2.5rem;
  }

  .dd-page .toc {
    position: sticky;
    top: 2rem;
    max-block-size: calc(100dvh - 4rem);
    overflow-y: auto;
  }
}

/* ---------- Support widget (support.js) ----------
   Same look as on the rest of Check (common.css), restated with these tokens
   because the Insights pages do not load common.css. */

.support-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: #0a0f1c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font: 600 0.8125rem/1.2 var(--sans);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.support-fab:hover {
  background: #1a2030;
}

.support-fab svg {
  flex-shrink: 0;
}

.support-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
}

.support-overlay.is-open {
  display: flex;
}

.support-dialog {
  width: 100%;
  max-width: 420px;
  margin: 16px;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
}

.support-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--rule);
}

.support-dialog-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.support-dialog-close {
  padding: 0 2px;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}

.support-dialog-close:hover {
  color: var(--ink);
}

.support-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px 24px;
}

.support-dialog-body label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.support-dialog-body label em {
  font-style: normal;
  color: var(--ink-3);
}

.support-dialog-body input,
.support-dialog-body textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font: 0.875rem/1.4 var(--sans);
  color: var(--ink);
  background: #fff;
  resize: none;
  transition: border-color 150ms ease;
}

.support-dialog-body input:focus-visible,
.support-dialog-body textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--ink);
}

.support-dialog-body textarea {
  height: 100px;
}

.support-dialog-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 20px;
}

.support-submit-btn {
  width: 100%;
  padding: 11px;
  background: #0a0f1c;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font: 600 0.9375rem/1.3 var(--sans);
  cursor: pointer;
}

.support-submit-btn:hover {
  background: #1a2030;
}

.support-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.support-success-msg {
  display: none;
  padding: 28px 24px;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

.support-error-msg {
  display: none;
  font-size: 0.8125rem;
  color: #b42318;
}

@media (max-width: 600px) {
  .support-fab {
    bottom: 16px;
    right: 16px;
    padding: 9px 14px;
  }

  .support-overlay {
    align-items: flex-end;
  }

  .support-dialog {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 90dvh;
    margin: 0;
    border-radius: 16px 16px 0 0;
  }

  .support-dialog-body {
    flex: 1;
    overflow-y: auto;
  }

  .support-dialog-body textarea {
    height: 80px;
  }
}

/* Keep the last lines of the page clear of the fixed Support button */
.site-foot {
  padding-bottom: 5.5rem;
}

/* ---------- Site header and footer, shared with every page (17 Nov 2026) ----------
   Markup comes from chrome.py and is identical to the rest of check.clearpic.ai.
   These rules restate common.css for it, because Insights pages do not load
   common.css. Keep them in step with common.css. */

:root {
  --edge: 24px; /* = common.css --container-padding */
}

.wrap {
  max-width: 1100px; /* = common.css --container-max */
  padding-inline: var(--edge);
}

.site-footer .container,
.cp-nav .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.cp-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 58px;
  background: rgba(10, 15, 28, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cp-nav .container {
  width: 100%;
}

.cp-nav .nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cp-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.cp-nav .logo-mark {
  display: block;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
}

.cp-nav .logo-word {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.cp-nav .logo-beta {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(27, 79, 224, 0.16);
  border: 1px solid rgba(27, 79, 224, 0.32);
  color: #93b4f5;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cp-nav .back-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.cp-nav .back-link:hover,
.cp-nav .portal-link-btn:hover {
  color: #fff;
}

.cp-nav .portal-link-btn {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cp-nav .nav-insights[aria-current="page"] {
  color: #fff;
}

.cp-nav .cart-count-badge {
  margin-left: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff;
  color: #0a0f1c;
  font-size: 11px;
  font-weight: 600;
}

.cp-nav :focus-visible {
  outline-color: #93b4f5;
}

/* The ink band now starts under the sticky header */
.band > .site-head {
  display: none;
}

.site-footer {
  margin-top: 0;
  padding: 60px 0 40px;
  background: #070b14;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  line-height: 1.5;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 200px repeat(5, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.site-footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.site-footer .footer-logo img {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.site-footer .footer-logo-word {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.site-footer .footer-brand p {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.35);
}

.site-footer .footer-heading {
  margin-bottom: 16px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.site-footer .footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-footer .footer-col a {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer .footer-col a:hover,
.site-footer .footer-bottom a:hover {
  color: #fff;
}

.site-footer .footer-legal-text {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer .footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer .footer-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: border-color 0.2s;
}

.site-footer .footer-badge:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.site-footer .footer-badge-flag {
  flex-shrink: 0;
  width: 20px;
  height: 15px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.site-footer .footer-badge-label {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.site-footer .footer-badge-name {
  display: block;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer .footer-bottom span {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
}

.site-footer .footer-bottom a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer :focus-visible {
  outline-color: #93b4f5;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 48px 0 32px;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --edge: 16px;
  }

  .cp-nav {
    height: auto;
    min-height: 58px;
    padding-block: 10px;
  }

  .cp-nav .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cp-nav .nav-inner {
    gap: 10px;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .cp-nav .logo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .cp-nav .logo-word {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cp-nav .logo-beta {
    display: none;
  }

  .cp-nav .nav-links {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .cp-nav .back-link {
    font-size: 0;
    line-height: 1;
  }

  .cp-nav .back-link::before {
    content: "←";
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
  }

  /* "My orders" → "Orders"; Insights keeps its own label */
  .cp-nav .nav-links > a.portal-link-btn:not(#navCartLink):not(.nav-insights) {
    font-size: 0;
    line-height: 1;
    white-space: nowrap;
  }

  .cp-nav .nav-links > a.portal-link-btn:not(#navCartLink):not(.nav-insights)::after {
    content: "Orders";
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
  }

  .cp-nav .nav-insights {
    font-size: 12px;
  }

  .cp-nav #navCartLink {
    gap: 4px !important;
    font-size: 0 !important;
    line-height: 1;
    white-space: nowrap;
  }

  .cp-nav #navCartLink .cart-count-badge {
    margin-left: 0;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .cp-nav .logo-word {
    display: none;
  }
}
