:root {
  --green: #1dd19b;
  --green-dark: #087d60;
  --purple: #8b69fd;
  --yellow: #ffc418;
  --red: #ff5840;
  --ink: #20232d;
  --muted: #68707f;
  --line: #e5e7eb;
  --soft: #f6f8fa;
  --panel: #ffffff;
  --nav: #11151b;
  --nav-muted: #aeb6c3;
  --max: 760px;
  font-family: "Comfortaa", "Arial Rounded MT Bold", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #fff; }
button, input { font: inherit; }
a { color: var(--green-dark); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .8rem 1rem;
  color: #fff;
  background: var(--nav);
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 230px;
  grid-template-rows: 72px 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 230px;
  align-items: center;
  min-height: 72px;
  padding: 0 1.5rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.brand img { width: 118px; height: auto; display: block; }
.brand-divider { width: 2px; height: 26px; background: var(--green); }
.brand-product { font-size: .82rem; color: var(--muted); }
.module-label { justify-self: start; font-weight: 700; font-size: .92rem; }
.language-picker { position: relative; justify-self: stretch; width: 100%; max-width: 220px; }
.language-trigger { display: grid; grid-template-columns: 20px 1fr 18px; align-items: center; gap: .75rem; width: 100%; min-height: 46px; padding: .7rem .85rem; border: 1px solid #d9dde3; border-radius: .85rem; color: var(--ink); background: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(28,37,50,.04); font: 600 .82rem/1.2 Arial, sans-serif; text-align: left; }
.language-trigger:hover { border-color: #b9c0ca; box-shadow: 0 5px 16px rgba(28,37,50,.08); }
.language-trigger:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.language-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.language-chevron { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .18s ease; }
.language-trigger[aria-expanded="true"] .language-chevron { transform: rotate(180deg); }
.language-menu { position: absolute; top: calc(100% + .45rem); right: 0; z-index: 50; width: 100%; padding: .35rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; box-shadow: 0 14px 34px rgba(28,37,50,.16); }
.language-menu button { display: block; width: 100%; padding: .68rem .75rem; border: 0; border-radius: .5rem; color: var(--muted); background: transparent; cursor: pointer; font: 600 .8rem/1.2 Arial, sans-serif; text-align: left; }
.language-menu button:hover, .language-menu button.active { color: var(--ink); background: var(--soft); }
.language-menu button.active::after { content: "✓"; float: right; color: var(--green-dark); font-weight: 700; }
.version-label { padding: .42rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; color: var(--muted); }
.menu-button { display: none; }

.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 1.6rem 1rem 1.2rem 1.4rem;
  color: #fff;
  background: var(--nav);
}
.sidebar-intro { padding: 0 .7rem 1.2rem; border-bottom: 1px solid #29303a; }
.sidebar-intro p:last-child { margin: .4rem 0 0; color: var(--nav-muted); font: 400 .79rem/1.55 Arial, sans-serif; }
.eyebrow { margin: 0; color: var(--green-dark); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; }
.sidebar .eyebrow { color: var(--green); }
.nav-group { margin-top: 1.35rem; }
.nav-group-title { margin: 0 .7rem .45rem; color: #798391; font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; }
.nav-link { display: block; padding: .62rem .7rem; margin: .12rem 0; border-radius: .5rem; color: var(--nav-muted); text-decoration: none; font-size: .79rem; line-height: 1.35; }
.nav-link:hover { color: #fff; background: #1e252e; }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(29,209,155,.22), rgba(139,105,253,.08)); box-shadow: inset 3px 0 0 var(--green); }
.sidebar-foot { display: flex; gap: .55rem; align-items: flex-start; margin: 1.6rem .7rem 0; padding-top: 1rem; border-top: 1px solid #29303a; color: #8e98a6; font: 400 .72rem/1.45 Arial, sans-serif; }
.evidence-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: .18rem; border-radius: 50%; background: var(--green); }

main { min-width: 0; padding: 3.2rem clamp(2rem, 6vw, 5.8rem) 5rem; }
#article { max-width: var(--max); margin: 0 auto; }
.article-kicker { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.article-kicker .section-name { font-size: .72rem; color: var(--purple); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.article-kicker .divider { width: 28px; height: 2px; background: var(--green); }
h1 { margin: 0; max-width: 720px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.08; letter-spacing: -.035em; }
.lede { margin: 1.1rem 0 1.5rem; max-width: 720px; color: var(--muted); font: 400 1.08rem/1.7 Arial, sans-serif; }
.meta-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0 2.4rem; }
.tag { display: inline-flex; align-items: center; padding: .42rem .65rem; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: #4f5868; font: 600 .72rem/1 Arial, sans-serif; }
.tag.confirmed { color: #08654e; background: #e8fbf5; border-color: #b8eedf; }
.tag.caution { color: #805600; background: #fff8dd; border-color: #f3dda0; }
.tag.pending { color: #6547c9; background: #f1edff; border-color: #d7cdfd; }

.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; margin: 1.4rem 0 2.5rem; }
.role-card { position: relative; display: block; min-height: 160px; padding: 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); text-decoration: none; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.role-card:hover { transform: translateY(-2px); border-color: #b9c0ca; box-shadow: 0 14px 34px rgba(28,37,50,.09); }
.role-card::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 84px; height: 84px; border: 14px solid var(--accent, var(--green)); border-radius: 50%; opacity: .18; }
.role-card span { display: block; margin-bottom: .8rem; color: var(--accent, var(--green-dark)); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.role-card strong { display: block; max-width: 88%; font-size: 1rem; line-height: 1.45; }
.role-card p { margin: .55rem 0 0; max-width: 88%; color: var(--muted); font: 400 .84rem/1.5 Arial, sans-serif; }

.content-section { margin-top: 2.8rem; scroll-margin-top: 94px; }
.content-section h2 { margin: 0 0 .9rem; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.02em; }
.content-section h3 { margin: 1.6rem 0 .6rem; font-size: 1rem; line-height: 1.4; }
.content-section p, .content-section li { color: #3f4856; font: 400 .98rem/1.75 Arial, sans-serif; }
.content-section ul, .content-section ol { padding-left: 1.25rem; }
.content-section li + li { margin-top: .45rem; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { position: relative; min-height: 46px; padding-left: 3rem; margin-top: 1rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: .02rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; color: #fff; background: var(--nav); font: 700 .75rem Arial, sans-serif; box-shadow: 4px 4px 0 var(--green); }

.callout { margin: 1.5rem 0; padding: 1rem 1.1rem; border-left: 4px solid var(--green); border-radius: 0 .7rem .7rem 0; background: #effcf8; }
.callout.warning { border-color: var(--yellow); background: #fffaf0; }
.callout.testing { border-color: var(--purple); background: #f6f3ff; }
.callout strong { display: block; margin-bottom: .3rem; font-size: .82rem; }
.callout p { margin: 0; font-size: .9rem; line-height: 1.6; }

.ui-map { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font: 400 .88rem/1.5 Arial, sans-serif; }
.ui-map th { padding: .7rem .75rem; text-align: left; color: #5d6673; background: var(--soft); border-bottom: 1px solid var(--line); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.ui-map td { padding: .78rem .75rem; vertical-align: top; border-bottom: 1px solid var(--line); color: #394250; }
.feature-link { color: var(--green-dark); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.feature-link:hover { color: #055e49; text-decoration-thickness: 2px; }
.interface-label { display: inline-flex; align-items: center; padding: .12rem .38rem; border: 1px solid #dfe3e8; border-radius: .3rem; color: #303744; background: #f7f8fa; font-weight: 700; line-height: 1.35; }

.product-screen { margin: 1.1rem 0 1.8rem; }
.screenshot-button { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid #d9dde3; border-radius: .9rem; background: #fff; cursor: zoom-in; box-shadow: 0 12px 30px rgba(28,37,50,.09); }
.screenshot-button img { display: block; width: 100%; height: auto; }
.screenshot-button:hover, .screenshot-button:focus-visible { border-color: var(--green); box-shadow: 0 16px 38px rgba(28,37,50,.14); outline: none; }
.zoom-hint { position: absolute; right: .7rem; bottom: .7rem; padding: .45rem .65rem; border-radius: .45rem; color: #fff; background: rgba(17,21,27,.88); font: 700 .7rem/1 Arial, sans-serif; }
.product-screen figcaption { margin-top: .7rem; color: var(--muted); font: 400 .78rem/1.55 Arial, sans-serif; }

.image-dialog { width: min(96vw, 1680px); max-width: none; padding: 0; overflow: hidden; border: 0; border-radius: .8rem; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.image-dialog::backdrop { background: rgba(8,12,18,.78); }
.image-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; color: #fff; background: var(--nav); font: 700 .78rem/1 Arial, sans-serif; }
.image-dialog-toolbar button { padding: .45rem .7rem; border: 1px solid #4a535f; border-radius: .4rem; color: #fff; background: #232a33; cursor: pointer; }
.image-dialog img { display: block; width: 100%; height: auto; max-height: calc(94vh - 52px); object-fit: contain; background: #eef1f4; }

.metric-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: .7rem; margin: 1.2rem 0 1.8rem; }
.metric { padding: 1rem; border-radius: .8rem; background: var(--soft); border-top: 3px solid var(--accent, var(--green)); }
.metric b { display: block; margin-bottom: .35rem; font-size: .82rem; }
.metric span { color: var(--muted); font: 400 .76rem/1.4 Arial, sans-serif; }

.flow { display: grid; grid-template-columns: repeat(4,1fr); gap: .55rem; margin: 1.2rem 0; }
.flow-item { position: relative; min-height: 105px; padding: .9rem; border: 1px solid var(--line); border-radius: .75rem; }
.flow-item:not(:last-child)::after { content: "›"; position: absolute; right: -.46rem; top: 40%; z-index: 2; width: .9rem; text-align: center; color: var(--purple); background: #fff; font-size: 1.2rem; }
.flow-item b { display: block; color: var(--green-dark); font-size: .75rem; }
.flow-item span { display: block; margin-top: .45rem; color: var(--muted); font: 400 .76rem/1.45 Arial, sans-serif; }

.on-this-page { position: sticky; top: 72px; height: calc(100vh - 72px); padding: 3.2rem 1.5rem 1.5rem 0; overflow: auto; }
.toc-title { margin: 0; color: var(--ink); font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
#toc { margin-top: 1rem; border-left: 2px solid var(--line); }
.toc-link { display: block; margin-left: -2px; padding: .55rem .7rem; border-left: 2px solid transparent; border-radius: 0 .45rem .45rem 0; color: var(--muted); text-decoration: none; font: 400 .78rem/1.45 Arial, sans-serif; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.toc-link:hover { color: var(--green-dark); }
.toc-link.active { color: var(--ink); border-left-color: var(--green); background: linear-gradient(90deg, rgba(29,209,155,.12), rgba(29,209,155,0)); font-weight: 700; }
.review-card { margin-top: 1.8rem; padding: .9rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--soft); }
.review-card strong { font-size: .72rem; }
.review-card p { margin: .35rem 0 0; color: var(--muted); font: 400 .72rem/1.45 Arial, sans-serif; }
.article-footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font: 400 .82rem/1.5 Arial, sans-serif; }
.article-footer-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1rem; }
.article-footer a { font-weight: 700; text-decoration: none; }
.legal-links { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; margin-top: 1rem; }
.legal-links a { color: #4f5868; text-decoration: underline; text-decoration-color: #c8cdd4; text-underline-offset: .18em; }
.legal-links a:hover { color: var(--green-dark); text-decoration-color: currentColor; }
.copyright { margin: .8rem 0 0; color: #7a8390; font-size: .75rem; }

.scrim { display: none; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 260px minmax(0,1fr); }
  .topbar { grid-template-columns: 260px 1fr auto; }
  .language-picker { width: 190px; }
  .on-this-page { display: none; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .topbar { grid-template-columns: auto 1fr auto; gap: .8rem; height: 64px; padding: 0 1rem; }
  .menu-button { display: inline-flex; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--ink); background: #fff; font-size: .74rem; }
  .brand { gap: .45rem; }
  .brand img { width: 88px; }
  .brand-divider, .brand-product, .module-label { display: none; }
  .version-label { font-size: .62rem; }
  .language-picker { width: auto; min-width: 158px; }
  .language-trigger { min-height: 42px; padding: .6rem .7rem; gap: .55rem; font-size: .75rem; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: min(86vw, 310px); height: 100vh; transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; z-index: 30; background: rgba(5,9,14,.52); }
  .scrim.open { display: block; }
  main { padding: 2.4rem 1.25rem 4rem; }
  .role-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-item:not(:last-child)::after { content: "↓"; right: auto; left: 48%; top: auto; bottom: -.85rem; }
  .ui-map { font-size: .78rem; }
}

@media (max-width: 430px) {
  .language-picker { min-width: 0; width: 48px; }
  .language-trigger { display: flex; justify-content: center; width: 48px; padding: .6rem; }
  .language-trigger #languageCurrent, .language-chevron { display: none; }
  .language-menu { right: 0; width: 180px; }
  .article-footer-main { display: block; }
  .article-footer-main a { display: block; margin-top: .45rem; }
}

@media print {
  .topbar, .sidebar, .on-this-page, .scrim, .image-dialog, .zoom-hint { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  #article { max-width: none; }
  a { color: inherit; text-decoration: none; }
  .role-card, .callout, .metric, .flow-item, .product-screen { break-inside: avoid; }
}
