/* mobile: prevent horizontal overflow */
html { overflow-x: clip; }
body { overflow-x: clip; }

html { background: var(--bg); }

    html { scrollbar-width: thin; scrollbar-color: var(--blue-l) var(--bg); scroll-behavior: smooth; color-scheme: dark; }
    [data-theme="light"] { color-scheme: light; }
    ::-webkit-scrollbar { width: 13px; height: 13px; background: var(--bg); }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, var(--blue-l), var(--blue));
      border-radius: 10px; border: 3px solid var(--bg); background-clip: padding-box;
    }
    ::-webkit-scrollbar-thumb:hover { background: var(--blue-l); background-clip: padding-box; }
    :root {
      --bg: #030508; --bg-card-s: #080d1c;
      --blue: #0549F9; --blue-l: #3d7eff; --blue-ll: #6da0ff;
      --blue-dim: rgba(5,73,249,0.12);
      --white: #FEFCFE; --muted: rgba(254,252,254,0.62);
      --border: rgba(5,73,249,0.18); --border-h: rgba(5,73,249,0.5);
      --fh: 'Space Grotesk', sans-serif; --fb: 'DM Sans', sans-serif; --r: 12px;
      --shadow-sm: rgba(0,0,0,0.28);
    }
    [data-theme="light"] {
      --bg: #F2F1ED; --bg-card-s: #FFFFFF;
      --white: #1D2433; --muted: rgba(23,29,43,0.7);
      --border: rgba(60,66,84,0.14); --border-h: rgba(47,91,196,0.45);
      --blue-dim: rgba(5,73,249,0.06);
      --blue: #2456DE; --blue-l: #3E70EE; --blue-ll: #2456DE;
      --shadow-sm: rgba(43,58,103,0.1);
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      background: var(--bg); color: var(--white); font-family: var(--fb);
      line-height: 1.7; overflow-x: hidden; min-height: 100vh;
      display: flex; flex-direction: column;
    }
    body::before {
      content: ''; position: fixed; inset: 0;
      background-image: radial-gradient(circle, rgba(5,73,249,0.07) 1px, transparent 1px);
      background-size: 38px 38px; pointer-events: none; z-index: 0;
    }
    [data-theme="light"] body::before { background-image: radial-gradient(circle, rgba(5,73,249,0.045) 1px, transparent 1px); }
    nav {
      position: sticky; top: 0; z-index: 200; height: 68px;
      display: flex; align-items: center; justify-content: space-between; padding: 0 5%;
      background: rgba(3,5,8,0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
      border-bottom: 1px solid var(--border);
    }
    [data-theme="light"] nav { background: rgba(242,241,237,0.92); border-bottom-color: rgba(5,73,249,0.1); }
    .nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
    .nav-logo-img { width: 34px; height: 34px; border-radius: 50%; background: url('images/favicon.png') center / contain no-repeat; flex-shrink: 0; }
    .nav-logo-name { font-family: var(--fh); font-weight: 700; font-size: 1.05rem; color: var(--white); }
    .nav-logo-name em { color: var(--blue-l); font-style: normal; }
    .back-link {
      display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
      font-size: 0.88rem; font-weight: 600; color: var(--blue-l);
      padding: 9px 16px; border: 1px solid var(--border); border-radius: 8px;
      min-height: 44px; transition: border-color 0.2s, color 0.2s;
    }
    .back-link:hover { border-color: var(--blue); color: var(--white); }
    main { position: relative; z-index: 1; flex: 1; max-width: 820px; margin: 0 auto; padding: 72px 5% 96px; width: 100%; }
    .doc-tag {
      display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 600;
      color: var(--blue-l); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px;
    }
    .doc-tag::before { content: '</> '; opacity: 0.7; }
    h1 { font-family: var(--fh); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.12; margin-bottom: 12px; }
    .doc-updated { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
    .doc-lede { font-size: 1.05rem; color: var(--muted); line-height: 1.75; margin-bottom: 8px; text-wrap: pretty; }
    h2 {
      font-family: var(--fh); font-size: 1.25rem; font-weight: 600;
      margin: 44px 0 12px; padding-top: 28px; border-top: 1px solid var(--border);
    }
    h2 .h2-num { color: var(--blue-l); font-weight: 700; margin-right: 10px; }
    section:first-of-type h2 { border-top: none; padding-top: 0; margin-top: 36px; }
    p { color: var(--muted); margin-bottom: 14px; text-wrap: pretty; }
    p strong, li strong { color: var(--white); }
    a.inline { color: var(--blue-l); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
    a.inline:hover { border-bottom-color: var(--blue-l); }
    ul { color: var(--muted); margin: 0 0 14px; padding-left: 20px; }
    li { margin-bottom: 8px; }
    .doc-callout {
      display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin: 24px 0;
      background: var(--blue-dim); border: 1px solid var(--border); border-radius: var(--r);
      font-size: 0.92rem; color: var(--blue-ll); font-weight: 500; line-height: 1.6;
    }
    .doc-binding {
      padding: 18px 20px; margin: 28px 0; border-radius: var(--r);
      background: var(--blue-dim); border: 1px solid var(--border-h);
    }
    .doc-binding p { color: var(--white); margin: 0; font-size: 0.95rem; }
    footer {
      position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 28px 5%;
      display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    }
    .foot-copy { font-size: 0.78rem; color: var(--muted); }
    .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
    .foot-links a { font-size: 0.78rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
    .foot-links a:hover { color: var(--white); }
    .theme-toggle-fab {
      position: fixed; bottom: 28px; right: 28px; z-index: 300; width: 48px; height: 48px;
      border-radius: 50%; background: var(--bg-card-s); border: 1px solid var(--border);
      color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 20px var(--shadow-sm); transition: all 0.25s;
    }
    .theme-toggle-fab:hover { color: var(--blue-l); border-color: var(--blue); transform: translateY(-2px); }
    @media (max-width: 600px) {
      nav { padding: 0 4%; }
      .nav-logo-name { font-size: 0.95rem; }
      main { padding: 48px 5% 72px; }
      footer { flex-direction: column; align-items: flex-start; }
    }
  

/* externalized inline styles */
.u0{width:18px !important; height:18px !important;}
.u1{color:var(--muted) !important; font-weight:400 !important;}
.u2{width:15px !important; height:15px !important;}
.u3{width:18px !important; height:18px !important; flex-shrink:0 !important; margin-top:1px !important;}
.u4{width:16px !important; height:16px !important;}


/* Reserve scrollbar gutter so nav/content do not shift between short and tall pages */
html { scrollbar-gutter: stable; }


/* page-to-page transition: sequential fade via a solid overlay (opaque at first paint -> no flash) */
.page-fx {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  pointer-events: none; opacity: 1; will-change: opacity;
  animation: pfxReveal 0.1s ease forwards;
}
@keyframes pfxReveal { from { opacity: 1; } to { opacity: 0; } }
.page-fx.pfx-leave { animation: pfxCover 0.1s ease forwards; }
@keyframes pfxCover { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .page-fx, .page-fx.pfx-leave { animation: none; opacity: 0; }
}
