/* Canonical Editorial «Тушь G2» Stylesheet for https://nodo.to (Wave C420 / ADR-166) */
/* Zero external CDN requests, strict even 2n px controls/frames, full light/dark & RTL support. */

:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --sheet: #FFFFFF;
  --ink: #191919;
  --muted: #64615E;
  --line: #E9E8E6;
  --tile: #F4F3F2;
  --hover: #EFEEEB;
  --focus: #2376BA;
  --action: #076FC7;
  --action-text: #076FC7;
  --action-ink: #FFFFFF;
  --accent: #076FC7;
  --accent-ink: #FFFFFF;
  --example-bg: #EDF5FB;
  --selection-bg: #CCE6FA;
  --selection-ink: #191919;
  --shadow-popup: 0 7px 18px rgba(0, 0, 0, 0.08);
  --shadow-card: none;
  --diagram-stroke: #B7B6B2;
  --diagram-line: #AAA9A5;
  --status-done-bg: #E6F4EC;
  --status-done-ink: #135D36;
  --status-progress-bg: #E7F1FC;
  --status-progress-ink: #0C4E8A;
  --status-todo-bg: #EFEFEA;
  --status-todo-ink: #4A4844;
  --prio-high-bg: #FCECEB;
  --prio-high-ink: #9E241C;
  --prio-med-bg: #FBF2E3;
  --prio-med-ink: #7F4E00;
  --prio-low-bg: #EFEFEA;
  --prio-low-ink: #4A4844;
  --header: 64px;
  --font: 'Inter', 'Inter Fallback', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --mono: 'Geist Mono', 'Geist Mono Fallback', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}

:root:lang(ar) {
  --font: 'Inter', 'Noto Sans Arabic', 'Inter Fallback', 'Noto Sans Arabic Fallback', 'Geeza Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --mono: 'Geist Mono', 'Noto Sans Arabic', 'Geist Mono Fallback', 'Noto Sans Arabic Fallback', ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root:lang(zh) {
  --font: 'Inter', 'Inter Fallback', ui-sans-serif, -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

:root:not(:lang(ar)) a[hreflang="ar"] {
  font-family: system-ui, -apple-system, 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #191919;
    --sheet: #191919;
    --ink: #F0EFED;
    --muted: #ADA9A3;
    --line: rgba(255, 255, 243, 0.12);
    --tile: #222220;
    --hover: #2C2C2A;
    --focus: #3B93EB;
    --action: #1F75CB;
    --action-text: #60A5FA;
    --action-ink: #FFFFFF;
    --accent: #3B93EB;
    --accent-ink: #FFFFFF;
    --example-bg: rgba(35, 131, 226, 0.16);
    --selection-bg: rgba(59, 147, 235, 0.35);
    --selection-ink: #F0EFED;
    --shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-card: none;
    --diagram-stroke: #5C5A55;
    --diagram-line: #7A7770;
    --status-done-bg: rgba(46, 160, 98, 0.22);
    --status-done-ink: #7BE0A8;
    --status-progress-bg: rgba(59, 147, 235, 0.22);
    --status-progress-ink: #8CC6FF;
    --status-todo-bg: #2A2A27;
    --status-todo-ink: #C9C5BE;
    --prio-high-bg: rgba(235, 87, 87, 0.22);
    --prio-high-ink: #FF9D97;
    --prio-med-bg: rgba(235, 173, 59, 0.22);
    --prio-med-ink: #F6CB7A;
    --prio-low-bg: #2A2A27;
    --prio-low-ink: #C9C5BE;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191919;
  --sheet: #191919;
  --ink: #F0EFED;
  --muted: #ADA9A3;
  --line: rgba(255, 255, 243, 0.12);
  --tile: #222220;
  --hover: #2C2C2A;
  --focus: #3B93EB;
  --action: #1F75CB;
  --action-text: #60A5FA;
  --action-ink: #FFFFFF;
  --accent: #3B93EB;
  --accent-ink: #FFFFFF;
  --example-bg: rgba(35, 131, 226, 0.16);
  --selection-bg: rgba(59, 147, 235, 0.35);
  --selection-ink: #F0EFED;
  --shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-card: none;
  --diagram-stroke: #5C5A55;
  --diagram-line: #7A7770;
  --status-done-bg: rgba(46, 160, 98, 0.22);
  --status-done-ink: #7BE0A8;
  --status-progress-bg: rgba(59, 147, 235, 0.22);
  --status-progress-ink: #8CC6FF;
  --status-todo-bg: #2A2A27;
  --status-todo-ink: #C9C5BE;
  --prio-high-bg: rgba(235, 87, 87, 0.22);
  --prio-high-ink: #FF9D97;
  --prio-med-bg: rgba(235, 173, 59, 0.22);
  --prio-med-ink: #F6CB7A;
  --prio-low-bg: #2A2A27;
  --prio-low-ink: #C9C5BE;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); overflow-x: clip; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
svg { display: block; flex: none; }
code, pre { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--selection-bg); color: var(--selection-ink); }
[hidden] { display: none !important; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 20;
  top: 12px;
  inset-inline-start: 12px;
  padding: 8px 14px;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--focus);
  border-radius: 8px;
}

/* RTL Typography & Directional Icons */
:root[dir="rtl"] h1,
:root[dir="rtl"] h2,
:root[dir="rtl"] h3,
:root[dir="rtl"] .eyebrow,
:root[dir="rtl"] .button,
:root[dir="rtl"] .badge {
  letter-spacing: 0 !important;
}
:root[dir="rtl"] .eyebrow,
:root[dir="rtl"] .hero-meta,
:root[dir="rtl"] .wb-head,
:root[dir="rtl"] .badge,
:root[dir="rtl"] .tier-alt,
:root[dir="rtl"] .changelog-meta {
  font-family: var(--font);
}
.dir-arrow {
  display: inline-flex;
  align-items: center;
}
:root[dir="rtl"] .dir-arrow {
  transform: scaleX(-1);
}
bdi[dir="ltr"],
code[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Top Navigation Header (64px desktop > 840px; 104px two-row mobile <= 840px) */
.site-header {
  height: var(--header);
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: 72px;
  height: 36px;
  min-height: 36px;
  flex: none;
}
.brand img {
  display: block;
  width: 72px;
  height: 28px;
  object-fit: contain;
  object-position: left center;
}
:root[dir="rtl"] .brand img {
  object-position: right center;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img { filter: invert(1) brightness(0.95); }
}
:root[data-theme="dark"] .brand img { filter: invert(1) brightness(0.95); }
.brand:hover { text-decoration: none; }

.header-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.header-nav a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  background: var(--tile);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  justify-content: end;
  gap: 10px;
  font-size: 14px;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-cta { display: contents; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.button:hover { background: var(--tile); text-decoration: none; }
.button.primary {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-ink);
}
.button.primary:hover { opacity: 0.9; background: var(--action); }
.button.lg {
  min-height: 44px;
  height: auto;
  max-width: 100%;
  padding: 10px 18px;
  font-size: 15px;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
  border-radius: 10px;
}

.header-actions .login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 500;
}
.header-actions .login:hover { background: var(--tile); text-decoration: none; }
.header-actions .primary {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
}

.language { position: relative; }
.language summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  list-style: none;
}
.language summary::-webkit-details-marker { display: none; }
.language summary:hover { background: var(--tile); }
.language summary svg { width: 16px; height: 16px; }
.language summary svg:last-child { width: 12px; height: 12px; }
.language[open] summary svg:last-child { transform: rotate(180deg); }
.language .language-code { white-space: nowrap; }
.language ul {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  bottom: auto;
  inset-inline-end: 0;
  inset-inline-start: auto;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-popup);
}
.language li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.language li a:hover,
.language li a[aria-current="true"] {
  background: var(--tile);
  text-decoration: none;
  font-weight: 600;
}
.language .lang-code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: isolate;
}

.theme-toggle,
.mobile-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  flex: none;
}
.theme-toggle:hover, .mobile-menu:hover { background: var(--tile); }
.theme-toggle svg, .mobile-menu svg { width: 18px; height: 18px; }
.theme-toggle .theme-icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-sun { display: inline-flex; }
}
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline-flex; }
:root[data-theme="light"] .theme-toggle .theme-icon-moon { display: inline-flex; }
:root[data-theme="light"] .theme-toggle .theme-icon-sun { display: none; }

.mobile-menu { display: none; }
.mobile-menu[aria-expanded="false"] .menu-icon-close,
.mobile-menu[aria-expanded="true"] .menu-icon-open { display: none; }

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header);
  inset-inline: 0;
  bottom: 0;
  z-index: 9;
  padding: 20px 16px 32px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  overflow-y: auto;
}
.mobile-drawer.open { display: block; }
.mobile-drawer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.mobile-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--tile);
  border: 0;
  font-size: 16px;
  font-weight: 500;
}
.mobile-drawer a:hover,
.mobile-drawer a[aria-current="page"] {
  background: var(--hover);
  text-decoration: none;
}

.mobile-drawer-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.mobile-drawer .mobile-drawer-cta a {
  justify-content: center;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 8px;
}
.mobile-drawer .mobile-drawer-cta a.login {
  border: 1px solid var(--line);
  background: var(--sheet);
  color: var(--ink);
}
.mobile-drawer .mobile-drawer-cta a.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
}
.mobile-drawer .mobile-drawer-cta a.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.site-menu-open { overflow: hidden; }

@media (max-width: 1220px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 0 16px;
  }
}

@media (max-width: 1040px) {
  .header-nav { gap: 6px; font-size: 13px; }
  .header-nav a { padding: 0 8px; }
}

@media (max-width: 980px) {
  .site-header { gap: 8px; padding: 0 12px; }
  .header-nav { gap: 2px; font-size: 12px; }
  .header-nav a { padding: 0 6px; }
  .header-actions { gap: 6px; font-size: 13px; }
  .header-tools { gap: 6px; }
  .language summary { padding: 0 7px; gap: 4px; font-size: 12px; }
  .header-actions .login { padding: 0 7px; font-size: 13px; }
  .header-actions .primary { padding: 0 10px; font-size: 13px; }
}

@media (max-width: 840px) {
  :root { --header: 56px; }
  .site-header {
    height: var(--header);
    min-height: var(--header);
    grid-template-columns: auto 1fr;
    grid-template-rows: 56px;
    row-gap: 0;
    column-gap: 8px;
    padding: 0 12px;
    align-items: center;
  }
  .brand { grid-column: 1; grid-row: 1; width: 72px; height: 36px; min-height: 36px; }
  .brand img { width: 72px; height: 28px; }
  .header-nav { display: none; }
  .header-actions {
    display: contents;
  }
  .header-tools {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 6px;
  }
  .header-cta {
    display: none;
  }
  .language summary { padding: 0 8px; gap: 4px; }
  .mobile-menu { display: inline-flex; }
}

/* Main Page Containers & Typography */
main {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 56px 0 88px;
}
main.narrow { width: min(100% - 32px, 860px); }

h1, h2, h3, p { margin: 0; }
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--action-text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.01em;
}

.hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 52px;
  padding-top: 8px;
}
.hero h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.hero-sub {
  margin: 18px auto 0;
  max-width: 660px;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.48;
  color: var(--muted);
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.hero-meta {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.section { margin-top: 80px; }
.section-head {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 28px;
  text-align: center;
}
.section-head h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-head p {
  margin: 10px auto 0;
  max-width: 680px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
.section-head .entry-actions {
  justify-content: center;
}

/* 1 Entity -> 13 Live Views Interactive Workbench */
.workbench {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  overflow: hidden;
}
.wb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--tile);
}
.wb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wb-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.wb-tab:hover { background: var(--hover); color: var(--ink); }
.wb-tab[aria-selected="true"] {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
}
.wb-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
}
.wb-reset {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
  font-size: 12px;
  font-weight: 500;
}
.wb-reset:hover { background: var(--tile); }

.wb-stage {
  padding: 20px;
  min-height: 400px;
}
:root:not(.js-ready) .wb-interactive { display: none; }
:root.js-ready .wb-nojs { display: none; }

.wb-nojs {
  padding: 20px;
}
.wb-capture {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tile);
}
.wb-nojs-caption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Workbench Table */
.wb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wb-table th,
.wb-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: middle;
}
.wb-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.wb-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-inline-end: 8px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .wb-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .wb-tabs::-webkit-scrollbar { display: none; }
  .wb-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
.wb-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  height: auto;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wb-pill:hover { filter: brightness(0.95); }
.wb-pill[data-status="done"] { background: var(--status-done-bg); color: var(--status-done-ink); }
.wb-pill[data-status="progress"] { background: var(--status-progress-bg); color: var(--status-progress-ink); }
.wb-pill[data-status="todo"] { background: var(--status-todo-bg); color: var(--status-todo-ink); }
.wb-pill[data-priority="high"] { background: var(--prio-high-bg); color: var(--prio-high-ink); }
.wb-pill[data-priority="medium"] { background: var(--prio-med-bg); color: var(--prio-med-ink); }
.wb-pill[data-priority="low"] { background: var(--prio-low-bg); color: var(--prio-low-ink); }

/* Workbench Document View */
.wb-doc-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wb-doc-card {
  padding: 18px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
.wb-doc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wb-doc-title { font-size: 16px; font-weight: 600; }
.wb-doc-note { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.wb-doc-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Workbench Board View */
.wb-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 760px) {
  .wb-board { grid-template-columns: minmax(0, 1fr); }
}
.wb-col {
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
.wb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.wb-col-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.wb-card {
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
}
.wb-card-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.wb-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* Workbench Gantt & Graph SVG (exact even 2n x 2n px dimensions, C420-QA-06) */
.wb-svg-frame {
  width: 100%;
  overflow-x: auto;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
  padding: 14px;
}
.wb-svg {
  direction: ltr;
  width: 880px;
  height: auto;
  max-width: none;
  margin: 0 auto;
}
.wb-svg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Brand Film Theater (exact even integer 16:9 poster + edge-to-edge 16:9 stage above 44px HUD, canonical light paper in both themes) */
.film-card {
  max-width: 962px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.film-stage {
  position: relative;
  width: 960px;
  height: 540px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
}
.film-stage.film-active {
  height: 584px;
}
@media (max-width: 1020px) {
  .film-card { max-width: 642px; }
  .film-stage { width: 640px; height: 360px; }
  .film-stage.film-active { width: 640px; height: 404px; }
}
@media (max-width: 720px) {
  .film-card { max-width: 450px; }
  .film-stage { width: 448px; height: 252px; }
  .film-stage.film-active { width: 448px; height: 296px; }
}
@media (max-width: 530px) {
  .film-card { max-width: 322px; }
  .film-stage { width: 320px; height: 180px; }
  .film-stage.film-active { width: 320px; height: 224px; }
}
@media (max-width: 369px) {
  .film-card { max-width: 258px; }
  .film-stage { width: 256px; height: 144px; }
  .film-stage.film-active { width: 256px; height: 188px; }
}
.film-poster-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
}
.film-poster-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.film-poster-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center;
}
.film-poster-light {
  opacity: 1;
}
.film-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 24px;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.06), transparent 34%);
}
@media (max-width: 530px) {
  .film-play-overlay { padding: 8px 12px 10px; }
  .film-play-overlay .button.lg { min-height: 36px; padding: 6px 14px; font-size: 13px; }
}
.film-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}
.film-iframe[hidden] {
  display: none;
}
.film-error-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: #ffffff;
  color: #111111;
}
.film-error-overlay p {
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #111111;
}
.film-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.film-bar > [data-film-close] {
  margin-inline-start: auto;
}
.film-bar p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 720px;
}
:root:not(.js-ready) .film-play-btn { display: none; }
:root.js-ready .film-nojs-note { display: none; }
:root.js-ready .film-bar:not(:has([data-film-close]:not([hidden]))) { display: none; }

/* Interactive Product Explainers Showcase (Wave C442 — exact even 2n x 2n px, 0px CLS) */
.site-explainer-card {
  max-width: 834px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.site-explainer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-explainer-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 13px/1.3 var(--sans);
  cursor: pointer;
  text-align: start;
}
.site-explainer-tab:hover {
  border-color: var(--ink);
}
.site-explainer-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.site-explainer-tab-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  opacity: 0.78;
  direction: ltr;
  unicode-bidi: isolate;
}
.site-explainer-stage {
  position: relative;
  width: 832px;
  height: 532px;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #f7f7f5;
}
@media (max-width: 1020px) {
  .site-explainer-card { max-width: 642px; }
  .site-explainer-stage { width: 640px; height: 426px; }
}
@media (max-width: 720px) {
  .site-explainer-card { max-width: 450px; }
  .site-explainer-stage { width: 448px; height: 352px; }
}
@media (max-width: 530px) {
  .site-explainer-card { max-width: 338px; }
  .site-explainer-stage { width: 336px; height: 290px; }
}
@media (max-width: 369px) {
  .site-explainer-card { max-width: 288px; }
  .site-explainer-stage { width: 286px; height: 262px; }
}
.site-explainer-preview {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #f7f7f5;
}
.site-explainer-preview[hidden] {
  display: none;
}
.site-explainer-preview.is-loading .site-explainer-poster-btn,
.site-explainer-preview.is-loading .site-explainer-play-pill {
  opacity: 0.78;
  cursor: progress;
}
.site-explainer-poster-btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #f7f7f5;
  cursor: pointer;
  overflow: hidden;
  text-align: inherit;
}
.site-explainer-poster-btn:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: -2px;
}
.site-explainer-poster {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f7f7f5;
  transition: transform 0.28s ease;
}
.site-explainer-poster-btn:hover .site-explainer-poster {
  transform: scale(1.014);
}
.site-explainer-meta {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #37352f;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.08);
}
@media (max-width: 530px) {
  .site-explainer-meta { top: 8px; inset-inline-start: 8px; font-size: 11px; padding: 3px 8px; }
}
.site-explainer-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2;
}
.site-explainer-iframe.is-ready {
  opacity: 1;
  pointer-events: auto;
}
.site-explainer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.site-explainer-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 40px;
  gap: 10px;
}
@media (max-width: 640px) {
  .site-explainer-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 16px;
  }
  .site-explainer-bar > a {
    justify-self: start;
  }
  .site-explainer-bar-actions {
    min-height: 40px;
  }
}
.site-explainer-nojs {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.site-explainer-nojs p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.site-explainer-nojs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.site-explainer-nojs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
:root:not(.js-ready) .site-explainer-play-btn { pointer-events: none; cursor: default; }
:root:not(.js-ready) .site-explainer-tabs { display: none; }
:root.js-ready .site-explainer-nojs { display: none; }
:lang(ar) .site-explainer-preview h3 { letter-spacing: 0; }

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 980px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: minmax(0, 1fr); }
}
.bento-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 0;
  border-radius: 16px;
  background: var(--tile);
  transition: background-color 0.16s ease;
}
.bento-card:hover {
  background: var(--hover);
}
.bento-shot-frame {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.bento-svg {
  width: 288px;
  height: 180px;
  max-width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: top left;
  background: var(--paper);
}
:root[data-theme="dark"] .bento-shot {
  filter: brightness(0.92) contrast(1.02);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bento-shot {
    filter: brightness(0.92) contrast(1.02);
  }
}
@media (max-width: 1120px) and (min-width: 981px) {
  .bento-svg { width: 240px; height: 150px; }
}
@media (max-width: 740px) and (min-width: 641px) {
  .bento-svg { width: 240px; height: 150px; }
}
@media (max-width: 400px) {
  .bento-svg { width: 240px; height: 150px; }
}
.bento-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.bento-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.bullet-list {
  margin: 14px 0 0;
  padding-inline-start: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.48;
}

/* Cloud vs Self-Host Split */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 760px) {
  .split-grid { grid-template-columns: minmax(0, 1fr); }
}
.panel-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 0;
  border-radius: 16px;
  background: var(--tile);
}
@media (max-width: 480px) {
  .panel-card { padding: 20px; }
}
.panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-card-head h3 { font-size: 22px; font-weight: 700; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  align-self: flex-start;
}
.badge.live { background: var(--status-done-bg); color: var(--status-done-ink); border-color: transparent; }
.panel-actions { margin-top: auto; padding-top: 8px; }

/* Extended Workbench Views (List, Calendar, Chart) + More Views Footer */
.wb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.wb-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.wb-list-row:last-child { border-bottom: 0; }
.wb-list-main { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.wb-list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wb-list-owner { font-size: 13px; color: var(--muted); }
.wb-list-prog { font-size: 12px; color: var(--muted); min-width: 34px; text-align: end; }

.wb-calendar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  .wb-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wb-cal-cell {
  min-height: 108px;
  padding: 10px;
  border-radius: 10px;
  background: var(--tile);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wb-cal-day {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.wb-cal-events { display: flex; flex-direction: column; gap: 5px; }
.wb-cal-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.25;
  text-align: start;
  background: var(--status-todo-bg);
  color: var(--status-todo-ink);
}
.wb-cal-item[data-status="done"] { background: var(--status-done-bg); color: var(--status-done-ink); }
.wb-cal-item[data-status="progress"] { background: var(--status-progress-bg); color: var(--status-progress-ink); }
.wb-cal-key { font-family: var(--mono); font-size: 10px; opacity: 0.85; }
.wb-cal-name { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.wb-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 16px;
}
@media (max-width: 760px) {
  .wb-chart-grid { grid-template-columns: minmax(0, 1fr); }
}
.wb-chart-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--tile);
  display: grid;
  gap: 12px;
  align-content: start;
}
.wb-chart-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.wb-chart-label { font-weight: 500; color: var(--ink); }
.wb-chart-val { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: end; }
.wb-chart-entity { display: grid; gap: 6px; }
.wb-chart-entity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.wb-chart-progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  background: var(--hover);
}
.wb-chart-progress::-webkit-progress-bar { background: var(--hover); border-radius: 999px; }
.wb-chart-progress::-webkit-progress-value { background: var(--muted); border-radius: 999px; transition: width 0.2s ease; }
.wb-chart-progress[data-status="progress"]::-webkit-progress-value { background: var(--action); }
.wb-chart-progress[data-status="done"]::-webkit-progress-value { background: var(--status-done-ink); }
.wb-chart-progress::-moz-progress-bar { background: var(--muted); border-radius: 999px; }
.wb-chart-progress[data-status="progress"]::-moz-progress-bar { background: var(--action); }
.wb-chart-progress[data-status="done"]::-moz-progress-bar { background: var(--status-done-ink); }

.wb-more-views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--tile);
  font-size: 13px;
  color: var(--muted);
}
.wb-more-label { font-weight: 500; color: var(--ink); }
.wb-more-list { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wb-more-link {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  font-weight: 600;
  color: var(--action-text);
}

/* Closing Editorial CTA */
.closing-cta {
  padding: 44px 32px;
  border-radius: 20px;
  background: var(--tile);
  text-align: center;
}
.closing-cta h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.closing-cta p {
  margin: 12px auto 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
@media (max-width: 560px) {
  .closing-cta { padding: 30px 20px; }
}

/* Pricing Page */
.pricing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
:root:not(.js-ready) .pricing-controls { display: none; }
.seg-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.seg-btn {
  min-height: 36px;
  height: auto;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}
.seg-btn:hover { background: var(--hover); }
@media (max-width: 580px) {
  .pricing-controls {
    padding: 12px;
    gap: 10px;
  }
  .seg-group {
    width: 100%;
  }
  .seg-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }
}
.seg-btn[aria-pressed="true"] {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-ink);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1020px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .pricing-grid { grid-template-columns: minmax(0, 1fr); }
}
.tier-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
.tier-card.featured {
  box-shadow: inset 0 0 0 2px var(--action);
}
.tier-price { font-size: 28px; font-weight: 700; line-height: 1.15; }
:root[dir="rtl"] .tier-price:not(.tier-price--custom) { direction: ltr; unicode-bidi: isolate; text-align: end; }
.tier-price--custom { font-size: clamp(20px, 1.75vw, 24px); overflow-wrap: break-word; }
.tier-sub { font-size: 13px; color: var(--muted); }
.tier-alt { font-size: 12px; font-family: var(--mono); color: var(--muted); }
.tier-alt-part { display: inline-block; white-space: nowrap; }
.tier-card .panel-actions {
  margin-top: auto;
  padding-top: 12px;
}
.tier-card .panel-actions .button.lg {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}
.notice-box {
  margin: 18px 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--example-bg);
  font-size: 14px;
  line-height: 1.5;
}

/* Download, Self-Host & Changelog — Borderless Notion Editorial Surfaces */
.stack-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 899px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
}
.download-grid {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.download-grid--live {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.download-grid--planned {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}
@media (max-width: 960px) {
  .download-grid--planned { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .download-grid--live,
  .download-grid--planned { grid-template-columns: minmax(0, 1fr); }
}
.entry-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
.entry-card--wide {
  grid-column: 1 / -1;
}
@media (min-width: 960px) {
  .entry-card--wide .bullet-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 28px;
  }
}
@media (max-width: 480px) {
  .entry-card { padding: 20px; }
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.entry-card h2, .entry-card h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.entry-card p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.entry-actions { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.section-head .entry-actions { margin-top: 18px; padding-top: 0; }
.entry-actions .button {
  height: auto;
  max-width: 100%;
  padding: 8px 14px;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
}
.entry-actions .button > svg {
  flex-shrink: 0;
}

.changelog-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.changelog-entry {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.changelog-entry h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
}
.changelog-entry p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* Legal Document Pages — Borderless Notion Editorial Reading Measure */
.legal-nav {
  margin-bottom: 32px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
}
.legal-nav h2 { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.legal-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.entry-card .bullet-list li > a:only-child,
.legal-article li > a:only-child,
.legal-article td a[href^="mailto:"],
.legal-list a,
.registry-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  padding-block: 4px;
}
.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  background: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.legal-article {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.68;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.legal-article h1 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.2; letter-spacing: -0.024em; margin-bottom: 20px; }
.legal-article h2 { font-size: 22px; margin: 32px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-article h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-article h4, .legal-article h5, .legal-article h6 { font-size: 15px; font-weight: 600; margin: 16px 0 6px; }
.legal-article blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--line);
  background: var(--tile);
  border-radius: 8px;
  color: var(--muted);
}
.legal-article blockquote p { margin: 4px 0; }
.legal-article p { margin: 10px 0; }
.legal-article ul, .legal-article ol { margin: 10px 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.legal-article table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.legal-article th, .legal-article td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}
.footer-inner {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 20px;
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.footer-grid a {
  display: inline-flex;
  align-items: center;
  min-width: 32px;
  min-height: 32px;
  padding-block: 4px;
  padding-inline: 4px;
  overflow-wrap: anywhere;
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* 404 Page */
.missing-page {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 16px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Official MinTsifry Registry Portal (/ru/registry/**) */
.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.registry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--tile);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.16s ease;
}

.registry-card:hover {
  background: var(--hover);
  text-decoration: none;
}

.registry-card h2 {
  margin: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.registry-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.registry-card .registry-card-meta {
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--muted);
}

.legal-article pre {
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--tile);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.legal-article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  max-width: 100%;
  border-radius: 8px;
}

.legal-table-wrap:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.legal-table-wrap table {
  margin: 0;
}

.legal-table-wrap th {
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 720px) {
  .legal-article[data-registry-portal="hub"] table th:first-child,
  .legal-article[data-registry-portal="hub"] table td:first-child,
  .legal-article[data-registry-doc="stack-and-pricing"] table th:first-child,
  .legal-article[data-registry-doc="stack-and-pricing"] table td:first-child {
    min-width: 224px;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 719px) {
  .legal-article[data-registry-portal="hub"] table,
  .legal-article[data-registry-portal="hub"] tbody,
  .legal-article[data-registry-portal="hub"] tr,
  .legal-article[data-registry-portal="hub"] td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .legal-article[data-registry-portal="hub"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .legal-article[data-registry-portal="hub"] tbody tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .legal-article[data-registry-portal="hub"] tbody td {
    border: 0;
    padding: 2px 0;
    overflow-wrap: break-word;
  }
  .legal-article[data-registry-portal="hub"] tbody td:first-child {
    font-weight: 600;
    color: var(--ink);
  }
  .legal-article[data-registry-doc] .legal-table-wrap table {
    min-width: 720px;
  }
}

/* Contact / Enterprise Inquiry Form (152-FZ / 156-FZ compliant, Light/Dark + RTL) */
.contact-card {
  display: grid;
  gap: 20px;
}
.contact-head h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
}
.contact-head p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.contact-form {
  display: grid;
  gap: 16px;
}
:root:not(.js-ready) .contact-form {
  display: none;
}
.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.contact-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.contact-field label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.contact-req {
  color: var(--prio-high-ink);
}
.contact-input,
.contact-select,
.contact-textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  text-align: start;
}
.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.contact-textarea {
  min-height: 108px;
  resize: vertical;
}
.contact-input:focus-visible,
.contact-select:focus-visible,
.contact-textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 36px;
  padding: 6px 0;
}
.contact-checkbox {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--action);
  cursor: pointer;
}
.contact-consent label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.contact-consent-link {
  color: var(--action-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.contact-actions .button:disabled {
  opacity: 0.65;
  cursor: progress;
}
.contact-status {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}
.contact-status[data-state="success"] {
  background: var(--status-done-bg);
  color: var(--status-done-ink);
}
.contact-status[data-state="error"] {
  background: var(--prio-high-bg);
  color: var(--prio-high-ink);
}
.contact-nojs {
  padding: 16px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
}
.contact-nojs p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.contact-nojs-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.contact-nojs-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--action-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Print Styles for Pricing, Legal & MinTsifry Registry Documents */
@media print {
  .site-header, .mobile-drawer, .legal-nav, .pricing-controls, footer, .skip, .print-hide { display: none !important; }
  :root, body, main, .legal-article, .tier-card, .registry-card {
    background: #FFFFFF !important;
    color: #000000 !important;
    border-color: #CCCCCC !important;
    box-shadow: none !important;
  }
  main, main.narrow { width: 100% !important; max-width: none !important; padding: 0 !important; }
  .legal-article { padding: 0 !important; border: 0 !important; }
  .legal-table-wrap { overflow: visible !important; }
  .legal-table-wrap table { min-width: 0 !important; }
  .legal-article table, .legal-article pre, .registry-card { break-inside: avoid; }
}
