:root {
  color-scheme: dark;
  --bg: #030711;
  --bg-2: #06101d;
  --surface: #0c1627;
  --soft: #101e33;
  --text: #eaf2ff;
  --heading: #f8fbff;
  --muted: #a5b7d2;
  --line: #273a54;
  --outline: #647c9e;
  --blue: #5b8cff;
  --violet: #7c5cff;
  --accent: #8cc8ff;
  --selection: #172e4c;
  --interactive-accent: #c9b5ff;
  --interactive-edge: #ad8cff;
  --interactive-selection: #2b2047;
  --radius: 22px;
  --max: 1120px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-2: #eef2f8;
    --surface: #ffffff;
    --soft: #f0f4fb;
    --text: #172033;
    --heading: #0b1324;
    --muted: #53627a;
    --line: #ccd7e7;
    --outline: #627591;
    --blue: #3f68d8;
    --violet: #6547d8;
    --accent: #185d9a;
    --selection: #e2eeff;
    --interactive-accent: #5935ba;
    --interactive-edge: #6945cf;
    --interactive-selection: #eee7ff;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --soft: #f0f4fb;
  --text: #172033;
  --heading: #0b1324;
  --muted: #53627a;
  --line: #ccd7e7;
  --outline: #627591;
  --blue: #3f68d8;
  --violet: #6547d8;
  --accent: #185d9a;
  --selection: #e2eeff;
  --interactive-accent: #5935ba;
  --interactive-edge: #6945cf;
  --interactive-selection: #eee7ff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: radial-gradient(ellipse at 18% 25%, color-mix(in srgb, var(--blue) 13%, transparent), transparent 30rem) top / 100% 44rem no-repeat,
    radial-gradient(ellipse at 82% 15%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 27rem) top / 100% 42rem no-repeat,
    var(--bg);
  color: var(--text);
  font: 1rem/1.7 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent); text-underline-offset: .2em; }
button { font: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, strong { color: var(--heading); }
h1, h2, h3 { margin: 0; }
ol, ul { margin: 0; padding: 0; }

:focus-visible, :is(.org-node, .choice-controls label):has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .75rem;
  transform: translateY(calc(-100% - 1rem));
  padding: .6rem 1rem;
  border-radius: .75rem;
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.site-header {
  padding: 58px 20px 20px;
  text-align: center;
}
.site-header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.brand { display: block; width: min(100%, 430px); border-radius: 18px; }
.brand picture, .brand img { display: block; }
.brand img { width: 100%; height: auto; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 12%, transparent)); }
.site-navigation-bar, .site-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.site-navigation-bar {
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--outline) 16%, transparent);
}
.site-nav a, .theme-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
}
.site-nav a:is(:hover, :focus-visible), .site-nav a[aria-current], .theme-button:is(:hover, :focus-visible) {
  border-color: var(--line);
  background: var(--selection);
  color: var(--heading);
}
.site-nav a[aria-current] {
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 16%, transparent), color-mix(in srgb, var(--violet) 12%, transparent));
}
.theme-button { flex: 0 0 42px; width: 42px; height: 42px; padding: 0; background: var(--soft); border-color: var(--outline); cursor: pointer; }
.theme-button[hidden] { display: inline-flex !important; visibility: hidden; }
.theme-button svg { width: 18px; height: 18px; }
.theme-button[aria-pressed="true"] .theme-sun, .theme-button[aria-pressed="false"] .theme-moon { display: none; }

@media (max-width: 900px) {
  .site-navigation-bar { width: 100%; flex-wrap: nowrap; }
  .site-nav { flex: 1; }
}

@media (max-width: 760px) {
  .site-header { padding-top: 30px; }
  .brand { width: min(100%, 310px); }
  .site-nav { flex-wrap: nowrap; gap: 4px; }
  .site-nav a { padding-inline: clamp(7px, 1.6vw, 12px); font-size: .86rem; }
}

@media (max-width: 520px) {
  .site-header { padding: 42px 10px 18px; }
  .site-header-inner { width: min(var(--max), calc(100% - 20px)); gap: 14px; }
  .brand { width: min(100%, 300px); }
  .site-navigation-bar { flex-wrap: wrap; border-radius: 22px; }
  .site-nav { flex: 1 1 100%; flex-wrap: wrap; }
  .site-nav a { flex: 1 1 calc(33.333% - 8px); min-height: 36px; padding-inline: 8px; }
}

.breadcrumb { margin-block: .15rem .85rem; font-size: .82rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: .65rem; list-style: none; }
.breadcrumb li + li::before { content: '/'; margin-inline-end: .65rem; }
.breadcrumb a { display: inline-block; min-height: 1.5rem; padding-block: .12rem; }

@media (max-width: 520px) {
  .breadcrumb ol { column-gap: .3rem; }
  .breadcrumb li + li::before { margin-inline-end: .3rem; }
}

.hero {
  max-width: 820px;
  margin-inline: auto;
  padding-bottom: 24px;
  text-align: center;
}
.hero h1 {
  margin: 0 auto 16px;
  font-size: clamp(1.72rem, 4vw, 2.8rem);
  font-weight: 760;
  line-height: 1.16;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent); }
@supports (background-clip: text) {
  .hero h1 span {
    background: linear-gradient(100deg, var(--heading), var(--accent) 48%, var(--violet));
    background-clip: text;
    color: transparent;
  }
}
.hero p { max-width: 700px; margin: 0 auto; color: var(--text); font-size: clamp(1rem, 2.25vw, 1.14rem); line-height: 1.78; }

.article-layout { display: grid; gap: 1.7rem; align-items: start; margin-block: 1.45rem 4rem; }
.article-index { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.article-index summary { display: flex; flex-wrap: wrap; gap: .2rem .6rem; min-height: 2.75rem; padding: .65rem .85rem; }
.index-current:empty { display: none; }
.index-current { font-size: .8rem; color: var(--accent); font-weight: 600; }
.article-index nav { padding: 0 .45rem .55rem; }
.article-index ol { list-style: none; }
.article-index a {
  display: block;
  border-inline-start: 2px solid transparent;
  border-radius: .35rem;
  padding: .38rem .6rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.4;
  text-decoration: none;
}
.article-index a:hover, .article-index a[aria-current] { background: var(--selection); color: var(--accent); }
.article-index a[aria-current] { border-inline-start-color: var(--accent); font-weight: 700; }

.article-body { min-width: 0; }
.article-body p { max-width: 76ch; }
:is(.intro, .article-section) > p { text-align: justify; hyphens: auto; }
.intro { padding-inline-start: 1rem; border-inline-start: 2px solid var(--accent); }
.intro p:last-child, .article-section > p:last-child { margin-bottom: 0; }
.article-section { margin-top: clamp(1.9rem, 4.5vw, 3.25rem); padding-top: clamp(1.3rem, 3vw, 2rem); border-top: 1px solid var(--line); scroll-margin-top: .8rem; }
.article-section h2 {
  margin-bottom: .8rem;
  font-size: clamp(1.42rem, 3vw, 2.12rem);
  font-weight: 750;
  line-height: 1.19;
  letter-spacing: -.027em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

details summary {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .95rem;
  color: var(--heading);
  font-weight: 680;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '';
  width: .54rem;
  height: .54rem;
  flex: 0 0 auto;
  margin: 0 .18rem .2rem auto;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
details[open] > summary::after { margin-bottom: -.2rem; transform: rotate(225deg); }
details summary h3 { font: inherit; }

:is(.dimensions, .org-figure, .choices, .fronts, .faq) {
  --accent: var(--interactive-accent);
  --selection: var(--interactive-selection);
}
.dimensions { display: grid; align-items: start; gap: .65rem; margin-block: 1rem 1.25rem; }
.dimension, .faq details {
  border: 1px solid var(--outline);
  border-radius: .9rem;
  background: var(--surface);
}
.dimension summary { min-height: 3.2rem; }
.dimension[open], .faq details[open] { border-color: var(--accent); }
:is(.dimension, .faq details) summary:hover { color: var(--accent); }
:is(.dimension, .faq details) > p { margin: 0; padding: 0 .95rem .95rem; }

.org-figure, .choices {
  margin: 1.25rem 0;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.org-fieldset, .choices { min-inline-size: 0; }
.org-fieldset { margin: 0; padding: 0; border: 0; }
:is(.org-fieldset, .choices) legend { padding-inline: .25rem; color: var(--heading); font-weight: 720; font-size: .92rem; }
.org-map {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(4rem, 1fr);
  align-items: center;
  margin-block: .45rem;
  border-radius: .9rem;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--interactive-edge) 12%, transparent), transparent 76%), var(--bg-2);
}
.org-edges { position: absolute; width: 100%; height: 100%; inset: 0; z-index: -1; pointer-events: none; }
.org-orbit { fill: none; stroke: var(--outline); stroke-width: 1; stroke-dasharray: 4 6; opacity: .6; }
.org-edges path { fill: none; stroke: var(--outline); stroke-width: 1.25; }
.org-edges [data-edge] { stroke: var(--interactive-edge); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.org-edges--wide { display: none; }
.org-node {
  display: grid;
  grid-row: var(--row);
  grid-column: var(--column-compact);
  place-items: center;
  justify-self: center;
  width: calc(100% - .8rem);
  max-width: 13.5rem;
  min-height: 3.2rem;
  padding: .48rem .32rem;
  border: 1px solid var(--outline);
  border-radius: .75rem;
  text-align: center;
  font-size: clamp(.75rem, 2vw, .94rem);
  font-weight: 680;
  line-height: 1.24;
  overflow-wrap: anywhere;
  position: relative;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.org-hub {
  max-width: 15.5rem;
  min-height: 3.45rem;
  background: var(--soft);
  border-width: 2px;
  color: var(--heading);
  font-size: clamp(.88rem, 2.1vw, 1.08rem);
}
.org-governance {
  margin: .3rem auto .7rem;
  max-width: 34rem;
  padding: .5rem .8rem;
  border: 1px solid var(--outline);
  border-radius: .75rem;
  background: var(--soft);
  color: var(--heading);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}
.org-node::after {
  content: '';
  position: absolute;
  inset: .35rem .35rem auto auto;
  width: .3rem;
  height: .3rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}
.org-node:has(:checked)::after { opacity: 1; }
@media (hover: hover) {
  .org-node:hover { border-color: var(--text); }
}
.choice-controls label:hover { border-color: var(--accent); color: var(--accent); }
.org-node input, .choice-controls input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.org-node:has(:checked), .choice-controls label:has(:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--selection);
  color: var(--accent);
}
.org-context, .choice-panels {
  display: grid;
  border-radius: .65rem;
  border-inline-start: 2px solid var(--accent);
  background: var(--soft);
  padding: .75rem;
  font-size: .94rem;
}
.org-context p, .choice-panels p { margin: 0; }
.org-context { background: var(--soft); border-inline-start-color: var(--outline); }
.org-figure:has(.org-node input:checked) .org-context {
  background: color-mix(in srgb, var(--selection) 65%, var(--surface));
  border-inline-start-color: var(--accent);
}
.org-context strong { display: block; margin-bottom: .22rem; color: var(--accent); }
.org-empty { grid-area: 1 / 1; color: var(--muted); }
.org-figure:has(.org-node input:checked) .org-empty { visibility: hidden; }
.org-context [data-context], .choice-panel { grid-area: 1 / 1; visibility: hidden; }
.org-figure:has([value="nucleo"]:checked) [data-context="nucleo"],
.org-figure:has([value="estrategia"]:checked) [data-context="estrategia"],
.org-figure:has([value="pessoas"]:checked) [data-context="pessoas"],
.org-figure:has([value="dados"]:checked) [data-context="dados"],
.org-figure:has([value="processos"]:checked) [data-context="processos"],
.org-figure:has([value="conhecimento"]:checked) [data-context="conhecimento"],
.org-figure:has([value="tecnologia"]:checked) [data-context="tecnologia"] { visibility: visible; animation: org-context-in var(--org-motion, 0s) ease-out; }
.org-map:has([value="nucleo"]:checked) [data-edge],
.org-map:has([value="estrategia"]:checked) [data-edge="estrategia"],
.org-map:has([value="pessoas"]:checked) [data-edge="pessoas"],
.org-map:has([value="dados"]:checked) [data-edge="dados"],
.org-map:has([value="processos"]:checked) [data-edge="processos"],
.org-map:has([value="conhecimento"]:checked) [data-edge="conhecimento"],
.org-map:has([value="tecnologia"]:checked) [data-edge="tecnologia"] { opacity: 1; }
.org-text { margin-top: .6rem; }
.org-text summary { padding-inline: .28rem; }
.org-text p { margin: .45rem .3rem; }
.org-text dl { margin: .45rem .3rem .9rem; }
.org-text dl > div + div { margin-top: .5rem; }
.org-text dt { color: var(--heading); font-weight: 720; }
.org-text dd { margin: 0; }
.org-reset {
  min-height: 2.75rem;
  margin-block: 0 .45rem;
  padding-inline: .7rem;
  border: 1px solid var(--outline);
  border-radius: .65rem;
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  visibility: hidden;
}
.org-controls:has(.org-node input:checked) .org-reset { visibility: visible; }

.choice-controls { display: grid; gap: .45rem; margin: .25rem 0 .65rem; }
.choice-controls label {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  padding: .52rem .6rem;
  border: 1px solid var(--outline);
  border-radius: .65rem;
  color: var(--text);
  background: var(--bg-2);
  font-weight: 650;
  font-size: .88rem;
  line-height: 1.25;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.choices--maturidade .choice-label span { display: block; margin-bottom: .2rem; color: var(--accent); font-size: .76rem; }
.choices--maturidade label:has(~ label input:checked) { border-inline-start: 3px solid var(--accent); }
.choices:has([value="1"]:checked) [data-panel="1"],
.choices:has([value="2"]:checked) [data-panel="2"],
.choices:has([value="3"]:checked) [data-panel="3"],
.choices:has([value="4"]:checked) [data-panel="4"],
.choices:has([value="5"]:checked) [data-panel="5"] { visibility: visible; }

.fronts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; list-style: none; padding: 1px; border-radius: .9rem; background: var(--line); }
.fronts li { display: grid; place-items: center; min-height: 3.1rem; padding: .4rem; background: var(--surface); color: var(--accent); text-align: center; font-weight: 720; border-radius: .8rem; }
.faq { display: grid; gap: .55rem; }
.faq summary { min-height: 3rem; }

#proximo-passo { padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.site-footer { border-top: 1px solid var(--line); padding: 22px 20px 34px; text-align: center; }
.site-footer nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.footer-nav { gap: 10px; margin-bottom: 16px; }
.footer-social { gap: 14px; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
}
.footer-nav a { min-height: 34px; padding-inline: 12px; font-size: .86rem; }
.footer-social a { width: 38px; height: 38px; }
.footer-social svg { width: 19px; height: 19px; fill: currentColor; }
.site-footer a:is(:hover, :focus-visible) { color: var(--heading); background: var(--selection); border-color: var(--outline); }
.site-footer .footer-shield-link {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.footer-shield-link svg { width: 28px; height: 28px; }
.site-footer .footer-shield-link:is(:hover, :focus-visible) { background: transparent; color: var(--heading); }

@media (max-width: 640px) {
  .footer-nav { gap: 8px; }
  .footer-nav a:not(.footer-shield-link) { flex: 1 1 calc(50% - 8px); }
}

@media (min-width: 35rem) {
  .dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fronts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 43rem) {
  .org-figure, .choices { padding: 1.1rem; }
  .org-map { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(4.25rem, 1fr); }
  .org-node { grid-column: var(--column); }
  .org-edges--compact { display: none; }
  .org-edges--wide { display: block; }
  .choices--maturidade .choice-controls { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .choices--maturidade label:has(~ label input:checked) { border-inline-start-width: 1px; border-block-start: 3px solid var(--accent); }
  .choices--segmentos .choice-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .article-layout { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 2.2rem; margin-top: 2.1rem; }
  .article-index { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
  .article-index summary { margin: 0 .15rem; }
  .index-current { display: none; }
  .dimensions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.site-nav a, .theme-button, .choice-controls label, .article-index a) {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
  }
  .org-figure { --org-motion: .16s; }
  .org-node { transition: background-color var(--org-motion), color var(--org-motion), border-color var(--org-motion), box-shadow var(--org-motion); }
  .org-edges [data-edge] { transition: opacity var(--org-motion) ease-out; }
  .site-footer a { transition: transform .22s ease, color .22s ease, background-color .22s ease, border-color .22s ease; }
  .site-footer a:hover { transform: translateY(-2px); }
}

@keyframes org-context-in {
  from { opacity: .55; }
  to { opacity: 1; }
}

@media (forced-colors: active) {
  .hero h1 span { background: none; color: CanvasText; }
  .org-edges path { stroke: GrayText; }
  .org-edges [data-edge] { stroke: Highlight; }
  .org-node:has(:checked), .choice-controls label:has(:checked), .article-index a[aria-current] { border: 2px solid Highlight; }
}

@supports not selector(:has(*)) {
  .org-context, .choice-controls { display: none; }
  .choice-panels { display: block; }
  .choice-panel { visibility: visible; }
  .choice-panel + .choice-panel { margin-top: .7rem; }
}
