/* Reserve exactly the visible notice height so the last links can scroll clear. */
html { scroll-padding-bottom: var(--cookie-notice-space, 0px); }
body { padding-bottom: var(--cookie-notice-space, 0px); }
.cookie-notice {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(6%, calc((100% - 1360px) / 2)) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #10191f;
  color: #b7c7cf;
  font-size: 14px;
  line-height: 1.6;
}
.cookie-notice p { margin: 0; }
.cookie-notice a, .policy-page main a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.cookie-notice a { display: inline-block; max-width: 100%; }
.cookie-notice button {
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--cyan);
  border-radius: 3px;
  background: transparent;
  color: var(--cyan);
  font: inherit;
}
.cookie-notice button:hover { background: #26d1e716; }
.cookie-notice :focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.policy-page { background: radial-gradient(ellipse at 85% 0, #10212b, transparent 50%) var(--bg); }
.policy-header, .policy-footer { max-width: 1360px; margin: 0 auto; padding: 28px max(24px, 4%); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.policy-header { border-bottom: 1px solid var(--line); }
.policy-header > a:last-child, .policy-footer { font-size: 14px; color: #a6bac5; }
.policy-page main { max-width: 900px; margin: 0 auto; padding: 64px 28px 80px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.policy-page main h1 { font: 400 clamp(26px, 4vw, 44px)/1.35 Unbounded, Arial, sans-serif; letter-spacing: -.045em; margin: 0 0 32px; }
.policy-page main h2 { font: 500 30px/1.3 Jura, Arial, sans-serif; margin: 48px 0 20px; color: var(--text); }
.policy-page main h3 { font: 500 24px/1.4 Jura, Arial, sans-serif; margin: 36px 0 16px; color: var(--text); }
.policy-page main p, .policy-page main li { color: #b9c6cd; }
.policy-page main li + li { margin-top: 14px; }
.policy-page main code { font-size: .9em; color: #d5e9ee; }
.policy-contents { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.policy-page #cookies { scroll-margin-top: 24px; }
.policy-footer { border-top: 1px solid var(--line); flex-wrap: wrap; }
.policy-page a:hover { color: var(--cyan); }
.document-controls { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.document-languages { display: inline-flex; gap: 4px; }
.document-languages button { min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid transparent; background: transparent; color: #91a9b5; }
.document-languages button[aria-pressed="true"] { color: var(--cyan); border-color: #2e616d; background: #11252b; }
.document-footer { padding: 32px max(24px, 5.5%); border-top: 1px solid var(--line); background: #090f13; }
.document-nav { display: flex; flex-wrap: wrap; gap: 16px 28px; max-width: 1360px; margin: 0 auto; font-size: 14px; line-height: 1.7; color: #a6bac5; }
.document-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; max-width: 1360px; margin: 28px auto 0; color: #8299a5; font-size: 14px; }
.footer-contacts { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 14px; white-space: nowrap; }
.footer-telegram { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--cyan); }
.footer-telegram svg { display: block; width: 24px; height: 24px; }
.footer-email { padding: 7px 0; }
.contact-separator { flex: 0 0 auto; margin-left: -4px; color: #5b7885; font: 400 18px/1 Rubik, sans-serif; }
.document-footer .footer-contacts { margin: 0; }
.footer-capabilities { padding: 0; border: 0; background: none; font: inherit; text-align: inherit; color: inherit; }
.footer-capabilities:hover { color: var(--cyan); }
.document-edition { color: #a8bdc8; font-size: 14px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.policy-page main .document-callout { padding: 20px 24px; border-left: 3px solid var(--violet); background: #1a1c2b; color: #e1e7ec; }
.code-example { min-width: 0; max-width: 100%; margin: 24px 0 32px; border: 1px solid #29414d; border-radius: 4px; overflow: hidden; background: #0b151b; }
.code-example figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 1px solid #29414d; color: #a5c1cd; font-size: 14px; }
.code-example button { min-height: 44px; padding: 6px 12px; border: 1px solid #325763; background: transparent; color: var(--cyan); font-size: 14px; }
.code-example pre { max-width: 100%; margin: 0; padding: 20px; overflow-x: auto; font: 14px/1.7 ui-monospace, monospace; }
.policy-page main .code-example code { font: inherit; white-space: pre; overflow-wrap: normal; word-break: normal; color: #c5dce5; }
.code-example pre:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.partner-support { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 32px; padding: 28px; margin-top: 24px; border: 1px solid #29414d; background: #0a1319; }
.partner-logo { display: block; }
.partner-logo img { display: block; width: 100%; height: auto; }
.partner-support p { margin: 0; }
@media (max-width: 620px) {
  .document-page .policy-header { flex-wrap: wrap; }
  .document-controls { width: 100%; justify-content: space-between; gap: 16px; }
  .partner-support { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .partner-logo { width: min(100%, 260px); }
}
@media (max-width: 480px) {
  .cookie-notice { gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cookie-notice button { min-width: 48px; padding-inline: 10px; }
  .policy-header { align-items: flex-start; padding: 24px 20px; }
  .policy-header .brand { gap: 9px; }
  .policy-header .brand > span { font-size: 18px; }
  .policy-header > a:last-child { max-width: 90px; text-align: right; }
  .policy-page main { padding: 40px 20px 56px; }
  .policy-page main h1 { font-size: clamp(20px, 6.25vw, 26px); }
  .policy-page main h2 { font-size: 27px; }
  .policy-page main h3 { font-size: 23px; }
  .policy-page main ul { padding-left: 22px; }
}

/* RC5: targeted typography; scene labels, code and the wordmark keep their fonts. */
.hero h1, #python-title, #ai-title, #eject-title,
.footer-invitation > p, .policy-page main h1, #about-title, #sfp-title,
.primary, .nav-link, .login, .language-trigger, .language-options [role="option"],
.document-languages button, .cookie-notice button, .code-example button,
.text-link, .dialog-close {
  font-family: Jura, Arial, sans-serif;
  font-weight: 500;
}
.brand { flex-shrink: 0; white-space: nowrap; }
.brand-beta {
  flex: 0 0 auto;
  align-self: center;
  margin-left: -4px;
  padding: 1px 5px;
  border: 1px solid #46504d;
  border-radius: 6px;
  background: transparent;
  color: #a5afaa;
  font: 400 11px/1.2 Rubik, Arial, sans-serif;
  letter-spacing: 0;
}
@media (max-width: 760px) {
  .header { height: auto; min-height: 78px; flex-wrap: wrap; gap: 12px 16px; padding-block: 18px; }
}

/* RC6: readable text controls; hover keeps each button in its original place. */
.primary, .cookie-notice button, .code-example button, .text-link {
  font-size: 20px;
}
/* Navigation has its own size; footer actions inherit the surrounding link style. */
.header .nav-link, .header .login, .header .language-trigger,
.header .language-options [role="option"], .document-languages button {
  font-size: 16px;
}
#about-dialog .dialog-actions { display: flex; justify-content: flex-end; }
@media (max-width: 480px) {
  .primary { gap: 20px; max-width: 100%; }
  .primary svg { flex-shrink: 0; }
}

/* RC8: one style for section descriptions, independent of navigation and CTAs. */
.page .section-description {
  --description-line-gap: 4px;
  font: 400 16px/1.55 Rubik, Arial, sans-serif;
  letter-spacing: -.3px;
  color: #b4c4cc;
}
/* Keep the inline SFP button's existing 20px/31px metrics. */
.page .section-description .text-link { line-height: 1.55; }

/* RC9: the AI paragraphs use the same line gap as the other descriptions. */
.python-copy .section-description > span:first-child,
.eject-copy .section-description > span:first-child,
.ai-copy > .section-description:first-child {
  margin-bottom: var(--description-line-gap);
}
/* A full-width glass surface behind the existing header content. */
.header::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background: rgba(11, 16, 20, .38);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
