/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */

:root {
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    Roboto, Helvetica, Arial, sans-serif;

  --color-text: #0f172a;
  --color-text-soft: #475569;
  --color-muted: #64748b;
  --color-subtle: #94a3b8;

  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #eff6ff;

  --color-border: rgba(203, 213, 225, 0.88);
  --color-border-soft: rgba(226, 232, 240, 0.92);
  --color-surface: rgba(255, 255, 255, 0.78);

  --page-max: 1680px;
  --content-max: 1220px;
  --chart-max: 1120px;

  --radius-sm: 13px;
  --radius-md: 20px;
  --radius-lg: 26px;

  --shadow-card: 0 20px 60px rgba(15, 23, 42, 0.07);
  --shadow-card-hover: 0 28px 65px rgba(15, 23, 42, 0.11);
}


/* =========================================================
   2. BASE AND QUARTO RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;

  color: var(--color-text);
  background: #f8fafc;

  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.nav-link {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

a {
  text-underline-offset: 0.2em;
}

#particles-js {
  position: fixed;
  z-index: 0;
  inset: 0;

  pointer-events: none;

  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

#quarto-content,
.navbar,
main,
.page-content {
  position: relative;
  z-index: 1;
}

.quarto-title-block {
  display: none;
}

#quarto-content.page-columns {
  display: block;
}

main.content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.landing-page {
  position: relative;
  z-index: 1;

  width: 100%;
  overflow: clip;
}


/* =========================================================
   3. NAVBAR
   ========================================================= */

.navbar-brand {
  margin: 0;
  padding: 0;
}

.navbar-brand img {
  width: auto;
  max-height: 30px;
}

@media (min-width: 992px) {
  .navbar > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
  }

  .navbar-collapse {
    flex-grow: 0;
  }

  .navbar-nav {
    gap: 1.35rem;
    margin: 0;
    padding: 0;
  }
}


/* =========================================================
   4. HERO
   ========================================================= */

.landing-hero {
  display: grid;
  grid-template-columns: minmax(480px, 0.82fr) minmax(650px, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 5rem);

  width: min(calc(100% - 3rem), var(--page-max));
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: clamp(3rem, 6vh, 5rem) 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.landing-hero h1 {
  max-width: 780px;
  margin: 0;

  color: var(--color-text);

  font-size: clamp(3rem, 5vw, 5.6rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.068em;
}

.hero-highlight {
  color: var(--color-primary);
}

#hero-typing-title.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.075em;
  height: 0.78em;
  margin-left: 0.09em;
  background: var(--color-primary);
  animation: hero-caret-blink 0.8s step-end infinite;
}

@keyframes hero-caret-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero-typing-title.is-typing::after {
    display: none;
    animation: none;
  }
}

.hero-description {
  max-width: 680px;
  margin: 2rem 0 0;

  color: var(--color-text);

  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  font-weight: 450;
  line-height: 1.65;
  letter-spacing: -0.02em;
}

/* Observable statistical laboratories */
.observable-stat-lab {
  margin: 2rem 0 4rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.observable-lab-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
}

.observable-stat-lab h3 {
  margin: 2.5rem 0 0.8rem;
  color: var(--color-text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.observable-stat-lab figure,
.observable-stat-lab svg {
  max-width: 100%;
  height: auto;
}

.observable-lab-summary {
  margin-top: 2rem;
}

.observable-dashboard {
  margin: 2rem 0 4rem;
}

.observable-dashboard-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
  padding: 1.1rem;
  background: rgba(239, 246, 255, 0.82);
  border: 1px solid rgba(147, 197, 253, 0.55);
  border-radius: var(--radius-md);
}

.observable-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.observable-dashboard-panel {
  min-width: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.observable-dashboard-panel figure,
.observable-dashboard-panel svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.observable-dashboard-results {
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .observable-lab-controls {
    grid-template-columns: 1fr;
  }

  .observable-dashboard-controls,
  .observable-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;

  margin-top: 2.2rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;

  min-height: 54px;
  padding: 0.85rem 1.35rem;

  border-radius: 14px;

  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.hero-button-primary {
  color: #ffffff;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);

  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.hero-button-primary:hover {
  color: #ffffff;
  background: var(--color-primary-dark);

  transform: translateY(-2px);

  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.32);
}

.hero-button-secondary {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-button-secondary:hover {
  color: var(--color-primary);
  background: #ffffff;

  transform: translateY(-2px);
}

.hero-visual {
  position: relative;

  width: 100%;
  max-width: var(--chart-max);
  min-width: 0;
  margin: 0;
  justify-self: end;
}


/* =========================================================
   5. RADIAL BI CHART
   ========================================================= */

.dashboard-chart,
.radial-bi-dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;

  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  overflow: visible;
}

.chart-heading {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;

  padding: 0 1rem;
}

.chart-heading > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.chart-heading span {
  color: #344054;

  font-size: 0.82rem;
  font-weight: 700;
}

.chart-heading small {
  color: var(--color-subtle);

  font-size: 0.61rem;
  line-height: 1.35;
}

.chart-period {
  flex: 0 0 auto;

  padding: 0.26rem 0.58rem;

  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;

  font-size: 0.62rem;
  font-weight: 700;
}

.radial-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;

  margin: 0.3rem 0 0;
}

.radial-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;

  color: var(--color-muted);

  font-size: 0.56rem;
}

.radial-legend span::before {
  content: "";

  width: 8px;
  height: 8px;

  border-radius: 2px;
}

.radial-legend .legend-cost::before {
  background: #a8b3c5;
}

.radial-legend .legend-revenue::before {
  background: #2563eb;
}

.radial-legend .legend-forecast::before {
  background: #22c7e8;
}

.radial-product-chart,
.radial-bi-dashboard .observablehq,
.radial-bi-dashboard .cell,
.radial-bi-dashboard .cell-output,
.radial-bi-dashboard .cell-output-display {
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;

  overflow: visible;
}

.radial-chart-wrapper {
  position: relative;

  width: 100%;
  max-width: var(--chart-max);
  margin: 0 auto;
}

.radial-role-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;

  margin: 0 auto 0.35rem;
  padding: 0 0.5rem;
}

.radial-role-button {
  appearance: none;
  padding: 0.48rem 0.78rem;

  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;

  font: inherit;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1;

  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.radial-role-button:hover {
  color: var(--color-primary);
  border-color: rgba(37, 99, 235, 0.42);
  transform: translateY(-1px);
}

.radial-role-button:focus-visible {
  outline: 3px solid rgba(34, 199, 232, 0.28);
  outline-offset: 2px;
}

.radial-role-button.is-active {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

@media (max-width: 560px) {
  .radial-role-filter {
    justify-content: flex-start;
  }

  .radial-role-button {
    flex: 1 1 calc(50% - 0.42rem);
  }
}

.radial-chart-wrapper svg {
  display: block;

  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;

  overflow: visible;
}

.radial-bi-dashboard .chart-note {
  max-width: 520px;
  margin: 0 auto;

  color: var(--color-muted);

  font-size: 0.56rem;
  line-height: 1.4;
  text-align: center;
}


/* ---------- Tooltip ---------- */

.radial-tooltip {
  position: absolute;
  z-index: 30;

  width: min(260px, calc(100% - 12px));
  padding: 0.82rem;

  color: #334155;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 14px;

  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.17);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  pointer-events: none;

  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);

  transition:
    opacity 0.14s ease,
    visibility 0.14s ease,
    transform 0.14s ease;
}

.radial-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.radial-tooltip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;

  padding-bottom: 0.6rem;

  border-bottom: 1px solid #eef2f7;
}

.radial-tooltip-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.radial-tooltip-header strong {
  color: var(--color-text);

  font-size: 0.78rem;
  line-height: 1.2;
}

.radial-tooltip-header > div > span {
  color: var(--color-subtle);

  font-size: 0.56rem;
}

.radial-tooltip-status {
  flex: 0 0 auto;

  padding: 0.22rem 0.42rem;

  border-radius: 999px;

  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.radial-tooltip-current {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.62rem 0;
}

.radial-tooltip-current > span {
  color: var(--color-muted);

  font-size: 0.58rem;
}

.radial-tooltip-current > strong {
  color: var(--color-primary);

  font-size: 0.9rem;
  line-height: 1;
}

.radial-tooltip-current small {
  color: var(--color-subtle);

  font-size: 0.48rem;
  font-weight: 500;
}

.radial-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.radial-tooltip-grid > div {
  padding: 0.46rem;

  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 9px;
}

.radial-tooltip-grid span {
  display: block;
  margin-bottom: 0.1rem;

  color: var(--color-subtle);

  font-size: 0.49rem;
}

.radial-tooltip-grid strong {
  display: block;

  color: #334155;

  font-size: 0.63rem;
}

.radial-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 0.52rem;
  padding-top: 0.52rem;

  border-top: 1px solid #eef2f7;
}

.radial-tooltip-footer span {
  color: var(--color-muted);

  font-size: 0.54rem;
}

.radial-tooltip-footer strong {
  font-size: 0.66rem;
}

.tooltip-positive {
  color: #15803d !important;
}

.radial-tooltip-status.tooltip-positive {
  background: #f0fdf4;
}

.tooltip-negative {
  color: #dc2626 !important;
}

.radial-tooltip-status.tooltip-negative {
  background: #fef2f2;
}


/* =========================================================
   6. SHARED SECTION STYLES
   ========================================================= */

.landing-section {
  width: min(calc(100% - 3rem), var(--content-max));
  margin: 0 auto;
  padding: 7rem 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 3rem;
}

.section-heading-centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0.8rem 0 0;
  text-align: center;
  color: var(--color-text);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 730;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.section-heading p {
  max-width: 700px;
  margin: 1.2rem auto 0;
  text-align: center;
  color: var(--color-muted);

  font-size: 1.08rem;
}

.section-label {
  display: inline-flex;

  color: var(--color-primary);

  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* =========================================================
   7. ABOUT
   ========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: stretch;
  gap: 3rem;
}

.about-content {
  padding: clamp(2rem, 4vw, 3.2rem);

  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-card);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.about-content p {
  color: var(--color-text-soft);
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-lead {
  color: var(--color-text) !important;

  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.025em;
}

.about-feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: clamp(2rem, 4vw, 3rem);

  color: #ffffff;
  background: linear-gradient(
    145deg,
    #1d4ed8,
    #2563eb 55%,
    #4f46e5
  );
  border-radius: var(--radius-lg);

  box-shadow: 0 25px 65px rgba(37, 99, 235, 0.25);
}

.about-feature-number {
  color: rgba(255, 255, 255, 0.35);

  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1;
}

.about-feature h3 {
  margin-bottom: 0.8rem;

  color: #ffffff;

  font-size: 1.6rem;
}

.about-feature p {
  margin-bottom: 0;

  color: rgba(255, 255, 255, 0.78);

  font-size: 0.98rem;
}


/* =========================================================
   8. SERVICES
   ========================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  grid-column: span 2;

  min-height: 330px;
  padding: 2rem;

  background: var(--color-surface);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;

  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.065);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

}
.service-card:nth-child(4),
.service-card:nth-child(5) {
  grid-column: span 3;
}

.service-card:hover {
  border-color: rgba(147, 197, 253, 0.95);

  transform: translateY(-7px);

  box-shadow: var(--shadow-card-hover);
}

.service-number {
  margin-bottom: 2.2rem;

  color: var(--color-primary);

  font-size: 0.78rem;
  font-weight: 600;
}

.service-card h3 {
  margin: 0 0 1rem;
  text-align: left;
  color: var(--color-text);
  font-size: 2rem;
}

.service-card p {
  color: var(--color-muted);
  text-align: left;
  font-size: 0.96rem;
}

.service-list {
  display: grid;
  gap: 0.72rem;

  margin: 1.35rem 0 0;
  padding: 0;

  color: var(--color-muted);
  list-style: none;
}

.service-list li {
  position: relative;
  margin: 0;
  padding-left: 1.45rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.service-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;

  width: 0.48rem;
  height: 0.48rem;

  background: #2563eb;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.service-tags,
.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-tags {
  margin-top: 1.6rem;
}

.service-tags span,
.tool-pills span {
  display: inline-flex;

  color: #1e3a8a;
  background: var(--color-primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 999px;

  font-weight: 600;
}

.service-tags span {
  padding: 0.42rem 0.65rem;

  font-size: 0.72rem;
}


/* =========================================================
   9. TOOLS
   ========================================================= */

.tools-section {
  width: 100%;
  margin: 0;
  padding: 7rem max(1.5rem, calc((100vw - var(--content-max)) / 2));

  background: linear-gradient(
    180deg,
    rgba(238, 242, 255, 0.4),
    rgba(248, 250, 252, 0.9)
  );
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.tools-section > .section-heading {
  margin-right: auto;
  margin-left: auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;

  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.tool-box {
  min-height: 360px;
  padding: 2.1rem;

  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;

  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.tool-box:hover {
  transform: translateY(-7px);

  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.13);
}

.tool-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  margin-bottom: 1.7rem;

  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 14px;

  font-size: 0.92rem;
  font-weight: 650;
}

.tool-box h3 {
  margin: 0 0 1.6rem;

  color: var(--color-text);

  font-size: 1.45rem;
  line-height: 1.25;
}

.tool-pills {
  gap: 0.75rem;
}

.tool-pills span {
  padding: 0.55rem 0.9rem;

  font-size: 0.92rem;
  font-weight: 500;
}


/* =========================================================
   10. CONTACT
   ========================================================= */

.contact-section {
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;

  width: min(calc(100% - 3rem), var(--content-max));
  margin: 7rem auto;
  padding: clamp(2.5rem, 6vw, 5rem);

  color: #ffffff;
  background: linear-gradient(
    135deg,
    #0f172a,
    #172554 55%,
    #1e3a8a
  );
  border-radius: 32px;

  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.25);
}

.contact-content {
  position: relative;
  z-index: 2;

  max-width: 700px;
}

.section-label-light {
  color: #93c5fd;
}

.contact-content h2 {
  margin: 0.8rem 0 1rem;

  color: #ffffff;

  font-size: clamp(2.4rem, 4vw, 4.2rem);
  font-weight: 730;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.contact-content p {
  margin: 0;

  color: rgba(255, 255, 255, 0.72);

  font-size: 1.05rem;
}

.contact-actions {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  gap: 0.85rem;

  min-width: 210px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;

  min-height: 52px;
  padding: 0.8rem 1.2rem;

  border-radius: var(--radius-sm);

  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
}

.contact-button-primary {
  color: var(--color-text);
  background: #ffffff;
}

.contact-button-primary:hover {
  color: var(--color-text);
  background: #dbeafe;
}

.contact-button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-button-secondary:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.contact-decoration {
  position: absolute;

  border-radius: 50%;

  filter: blur(2px);
}

.back-to-top-wrap {
  display: flex;
  justify-content: center;

  width: min(calc(100% - 2rem), var(--content-max));
  margin: -2rem auto 4rem;
}

.back-to-top-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  min-height: 48px;
  padding: 0.7rem 1.05rem;

  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);

  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;

  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.back-to-top-button span {
  font-size: 1.05rem;
}

.back-to-top-button:hover {
  color: var(--color-primary-dark);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
  transform: translateY(-2px);
}

.back-to-top-button:focus-visible {
  outline: 3px solid rgba(34, 199, 232, 0.3);
  outline-offset: 3px;
}

.contact-decoration-one {
  top: -180px;
  right: -120px;

  width: 420px;
  height: 420px;

  background: rgba(59, 130, 246, 0.2);
}

.contact-decoration-two {
  bottom: -220px;
  left: 20%;

  width: 390px;
  height: 390px;

  background: rgba(99, 102, 241, 0.16);
}


/* =========================================================
   11. RESPONSIVE
   ========================================================= */

@media (min-width: 1600px) {
  :root {
    --page-max: 1760px;
    --chart-max: 1180px;
  }

  .landing-hero {
    grid-template-columns: minmax(500px, 0.78fr) minmax(760px, 1.22fr);
  }

  .landing-hero h1 {
    font-size: clamp(4.5rem, 4.7vw, 6rem);
  }
}

@media (max-width: 1280px) {
  .landing-hero {
    grid-template-columns: minmax(420px, 0.9fr) minmax(560px, 1.1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 1180px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;

    width: min(calc(100% - 3rem), 1000px);
    min-height: auto;
    padding-top: 5rem;
  }

  .hero-copy {
    max-width: 850px;
    margin: 0 auto;

    text-align: center;
  }

  .hero-description {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    max-width: 950px;
    margin: 0 auto;

    justify-self: center;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5) {
    grid-column: auto;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .landing-hero,
  .landing-section,
  .contact-section {
    width: min(calc(100% - 2rem), var(--content-max));
  }

  .landing-hero {
    padding: 3.5rem 0 4rem;
  }

  .landing-hero h1 {
    font-size: clamp(2.5rem, 13vw, 4.5rem);
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-button {
    width: 100%;
  }

  .chart-heading {
    padding: 0 0.35rem;
  }

  .radial-legend {
    padding: 0 0.35rem;
  }

  .radial-tooltip {
    width: min(245px, calc(100% - 12px));
  }

  .about-grid,
  .services-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .landing-section {
    padding: 5rem 0;
  }

  .service-card {
    min-height: auto;
  }

  .tools-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .contact-section {
    flex-direction: column;
    align-items: stretch;

    margin-top: 5rem;
    margin-bottom: 5rem;
    padding: 2rem;

    border-radius: 24px;
  }

  .contact-actions {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .landing-hero {
    width: min(calc(100% - 1.25rem), var(--content-max));
  }

  .landing-hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.35rem);
  }

  .chart-heading span {
    font-size: 0.74rem;
  }

  .chart-heading small {
    font-size: 0.54rem;
  }

  .chart-period {
    font-size: 0.56rem;
  }

  .radial-tooltip {
    width: min(225px, calc(100% - 10px));
    padding: 0.68rem;
  }

  .radial-tooltip-grid {
    gap: 0.3rem;
  }

  .about-content,
  .about-feature,
  .service-card,
  .tool-box {
    padding: 1.5rem;
    border-radius: 20px;
  }
}


/* =========================================================
   12. ABOUT PAGE
   ========================================================= */

.about-page {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: clip;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);

  width: min(calc(100% - 3rem), var(--content-max));
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: clamp(4rem, 8vh, 7rem) 0;
}

.profile-hero-copy h1 {
  margin: 0.45rem 0 0.4rem;
  color: var(--color-text);
  font-size: clamp(4rem, 8vw, 7.5rem);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.profile-kicker,
.profile-cta > div > span {
  display: inline-flex;
  align-items: center;

  color: var(--color-primary);

  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-role {
  margin: 0 0 1.7rem;
  color: var(--color-primary);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.profile-lead {
  max-width: 720px;
  margin-bottom: 1.2rem;
  color: var(--color-text);
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.03em;
}

.profile-hero-copy > p:not(.profile-role):not(.profile-lead) {
  max-width: 700px;
  color: var(--color-muted);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.profile-actions p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0;
}

.profile-photo-wrap {
  position: relative;
  width: min(100%, 470px);
  margin: 0 auto;
  padding: 0.7rem;

  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border-soft);
  border-radius: 34px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.profile-photo-wrap p {
  margin: 0;
}

.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 32%;
  border-radius: 26px;
}

.profile-photo-caption {
  padding: 0.85rem 0.7rem 0.2rem;
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
}

.profile-section,
.profile-process-section {
  width: min(calc(100% - 3rem), var(--content-max));
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 8rem) 0;
}

.profile-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.profile-principle,
.profile-expertise-grid article,
.profile-process article {
  padding: clamp(1.6rem, 3vw, 2.3rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.profile-principle > span,
.profile-process article > span {
  display: block;
  margin-bottom: 2rem;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 750;
}

.profile-principle h3,
.profile-expertise-grid h3,
.profile-process h3 {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  font-size: 1.35rem;
}

.profile-principle p,
.profile-expertise-grid p,
.profile-process p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.profile-expertise-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.profile-expertise-intro {
  position: sticky;
  top: 110px;
}

.profile-expertise-intro h2 {
  margin: 1rem 0 1.2rem;
  color: var(--color-text);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 730;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.profile-expertise-intro p {
  color: var(--color-muted);
}

.profile-expertise-grid {
  display: grid;
  gap: 1.25rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.4rem;
}

.profile-tags span {
  display: inline-flex;
  padding: 0.38rem 0.62rem;
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
  border: 1px solid rgba(147, 197, 253, 0.55);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
}

.profile-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.profile-process article {
  min-height: 260px;
}

.profile-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;

  width: min(calc(100% - 3rem), var(--content-max));
  margin: 2rem auto 6rem;
  padding: clamp(2rem, 5vw, 4rem);

  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 72%, #22c7e8 140%);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.profile-cta > div {
  max-width: 760px;
}

.profile-cta > div > span {
  color: #93c5fd;
}

.profile-cta h2 {
  margin: 0.7rem 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.profile-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.profile-cta > p {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 980px) {
  .profile-hero,
  .profile-expertise-section {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    min-height: auto;
  }

  .profile-photo-wrap {
    width: min(100%, 560px);
  }

  .profile-expertise-intro {
    position: static;
  }

  .profile-principles,
  .profile-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .profile-hero,
  .profile-section,
  .profile-process-section,
  .profile-cta {
    width: min(calc(100% - 2rem), var(--content-max));
  }

  .profile-hero-copy h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .profile-principles,
  .profile-process {
    grid-template-columns: 1fr;
  }

  .profile-process article {
    min-height: auto;
  }

  .profile-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ---------- Simple about page ---------- */

.about-page-simple {
  position: relative;
  z-index: 1;
  width: 100%;
}

.simple-about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);

  width: min(calc(100% - 3rem), var(--content-max));
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: clamp(4rem, 8vh, 7rem) 0;
}

.simple-about-copy h1 {
  margin: 0.55rem 0 0.35rem;
  color: var(--color-text);
  font-size: clamp(3.8rem, 7vw, 6.8rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.simple-about-role {
  margin: 0 0 1.8rem;
  color: var(--color-primary);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 650;
}

.simple-about-lead {
  max-width: 760px;
  margin-bottom: 1.25rem;
  color: var(--color-text);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: -0.025em;
}

.simple-about-copy > p:not(.simple-about-role):not(.simple-about-lead) {
  max-width: 760px;
  color: var(--color-muted);
}

.simple-about-photo {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border-soft);
  border-radius: 30px;
  box-shadow: var(--shadow-card);
}

.simple-about-photo p {
  margin: 0;
}

.simple-about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 32%;
  border-radius: 23px;
}

@media (max-width: 880px) {
  .simple-about {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .simple-about-photo {
    width: min(100%, 560px);
  }
}

@media (max-width: 620px) {
  .simple-about {
    width: min(calc(100% - 2rem), var(--content-max));
    gap: 2.5rem;
  }
}


/* =========================================================
   13. PORTFOLIO
   ========================================================= */

.portfolio-page {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: clip;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  align-items: end;
  gap: clamp(2.5rem, 7vw, 7rem);
  width: min(calc(100% - 3rem), var(--content-max));
  min-height: min(72svh, 720px);
  margin: 0 auto;
  padding: clamp(5rem, 10vh, 8rem) 0 clamp(4rem, 8vh, 6.5rem);
}

.portfolio-kicker,
.portfolio-eyebrow,
.portfolio-dialog-type {
  margin: 0 0 1rem;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.portfolio-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(3.3rem, 7.2vw, 7rem);
  font-weight: 780;
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.portfolio-hero h1 span {
  display: block;
  color: var(--color-primary);
}

.portfolio-intro {
  max-width: 760px;
  margin: 2rem 0 0;
  color: var(--color-text-soft);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

.portfolio-hero-aside {
  display: flex;
  align-items: flex-end;
  gap: 1.15rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--color-border);
}

.portfolio-hero-number {
  color: var(--color-primary);
  font-size: clamp(3rem, 5vw, 4.8rem);
  font-weight: 760;
  line-height: 0.82;
  letter-spacing: -0.08em;
}

.portfolio-hero-aside p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.portfolio-hero-aside strong {
  color: var(--color-text);
  font-weight: 650;
}

.portfolio-browser {
  width: min(calc(100% - 3rem), var(--page-max));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem);
  background: rgba(248, 250, 252, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: clamp(24px, 3vw, 42px);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(15px);
}

.portfolio-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.portfolio-toolbar h2,
.portfolio-note h2 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.055em;
}

.portfolio-filter-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.portfolio-filter {
  padding: 0.7rem 1rem;
  color: var(--color-text-soft);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    transform 180ms ease;
}

.portfolio-filter:hover,
.portfolio-filter:focus-visible {
  color: var(--color-primary);
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.portfolio-filter.is-active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.portfolio-count {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.76rem;
  line-height: 1;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.65rem);
}

.portfolio-card {
  min-width: 0;
}

.portfolio-card[hidden] {
  display: none;
}

.portfolio-card.is-revealed {
  animation: portfolio-reveal 480ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.portfolio-card-open {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.055);
  cursor: pointer;
  transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.portfolio-card-open:hover,
.portfolio-card-open:focus-visible {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-7px);
}

.portfolio-card-open:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.portfolio-card-media,
.portfolio-card-body,
.portfolio-card-type,
.portfolio-card-title,
.portfolio-card-text,
.portfolio-card-stack {
  display: block;
}

.portfolio-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.28 / 1;
  background: #eef2f7;
}

.portfolio-card-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.42) 100%);
  opacity: 0.55;
  transition: opacity 260ms ease;
}

.portfolio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 13%;
  transform: scale(1.015);
  transition: transform 600ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.portfolio-card-media--middle img {
  object-position: center 28%;
}

.portfolio-card-media--wide img {
  object-position: center;
}

.portfolio-card-open:hover .portfolio-card-media img,
.portfolio-card-open:focus-visible .portfolio-card-media img {
  transform: scale(1.06);
}

.portfolio-card-index {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.portfolio-card-action {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.portfolio-card-open:hover .portfolio-card-action,
.portfolio-card-open:focus-visible .portfolio-card-action {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card-body {
  padding: 1.4rem 1.45rem 1.5rem;
}

.portfolio-card-type {
  margin-bottom: 0.55rem;
  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.portfolio-card-title {
  color: var(--color-text);
  font-size: clamp(1.15rem, 1.7vw, 1.48rem);
  font-weight: 730;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.portfolio-card-text {
  min-height: 4.8em;
  margin-top: 0.7rem;
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.portfolio-card-stack {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  color: var(--color-subtle);
  border-top: 1px solid var(--color-border-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.45;
}

.portfolio-card-stack b {
  margin-right: 0.45rem;
  color: var(--color-primary);
}

.portfolio-note {
  width: min(calc(100% - 3rem), 920px);
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 10rem) 0;
  text-align: center;
}

.portfolio-note > p:not(.portfolio-eyebrow) {
  max-width: 760px;
  margin: 1.5rem auto 2rem;
  color: var(--color-text-soft);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.portfolio-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
  transition: background 180ms ease, transform 180ms ease;
}

.portfolio-cta:hover,
.portfolio-cta:focus-visible {
  color: #fff;
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

body.portfolio-dialog-open {
  overflow: hidden;
}

.portfolio-dialog {
  width: min(calc(100% - 2rem), 1180px);
  max-width: none;
  max-height: min(90svh, 860px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(15, 23, 42, 0.28);
}

.portfolio-dialog[open] {
  animation: portfolio-dialog-in 260ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.portfolio-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.portfolio-dialog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  min-height: min(78svh, 760px);
}

.portfolio-dialog-close {
  position: absolute;
  z-index: 4;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0 0 0.16rem;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 50%;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.portfolio-dialog-visual {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  overflow: auto;
  background: #edf2f8;
}

.portfolio-dialog-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 700px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.12));
}

.portfolio-dialog-copy {
  align-self: center;
  max-height: 90svh;
  padding: clamp(2.25rem, 5vw, 4.5rem);
  overflow-y: auto;
}

.portfolio-dialog-copy h2 {
  margin: 0 0 1.4rem;
  color: var(--color-text);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.portfolio-dialog-description {
  margin: 0 0 2rem;
  color: var(--color-text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.portfolio-dialog-detail {
  padding: 1rem 0;
  border-top: 1px solid var(--color-border-soft);
}

.portfolio-dialog-detail > span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-subtle);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-dialog-detail p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
}

.portfolio-dialog-note {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1rem;
  color: var(--color-muted);
  background: var(--color-primary-soft);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  line-height: 1.5;
}

.portfolio-dialog-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.45rem;
  padding: 0.78rem 1.1rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
  transition: background 180ms ease, transform 180ms ease;
}

.portfolio-dialog-link:hover,
.portfolio-dialog-link:focus-visible {
  color: #fff;
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

@keyframes portfolio-reveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes portfolio-dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .portfolio-filter-wrap {
    align-items: flex-start;
  }

  .portfolio-filters {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .portfolio-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .portfolio-hero-aside {
    max-width: 330px;
  }

  .portfolio-dialog {
    width: min(calc(100% - 1rem), 720px);
    max-height: calc(100svh - 1rem);
    overflow-y: auto;
    border-radius: 22px;
  }

  .portfolio-dialog-shell {
    grid-template-columns: 1fr;
  }

  .portfolio-dialog-visual {
    min-height: min(52svh, 520px);
  }

  .portfolio-dialog-copy {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .portfolio-hero,
  .portfolio-note {
    width: min(calc(100% - 2rem), var(--content-max));
  }

  .portfolio-hero {
    padding-top: 4rem;
  }

  .portfolio-hero h1 {
    font-size: clamp(3.2rem, 16.5vw, 5rem);
  }

  .portfolio-browser {
    width: calc(100% - 1rem);
    padding: 2rem 0.8rem 1rem;
    border-radius: 24px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-filter-wrap {
    width: 100%;
  }

  .portfolio-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: calc(100vw - 2.6rem);
    padding-bottom: 0.35rem;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .portfolio-filter {
    flex: 0 0 auto;
  }

  .portfolio-card-text {
    min-height: auto;
  }

  .portfolio-dialog-visual {
    min-height: 48svh;
    padding: 1rem;
  }

  .portfolio-dialog-copy {
    padding: 2rem 1.25rem;
  }
}


/* =========================================================
   14. STATISTICAL PROJECT CASE STUDIES
   ========================================================= */

.project-case {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 3rem), 1160px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(6rem, 10vw, 9rem);
  color: var(--color-text);
}

.project-case-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.project-case-nav p,
.project-pagination p {
  margin: 0;
}

.project-back,
.project-case-nav a,
.project-pagination a {
  color: var(--color-text-soft);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.project-back:hover,
.project-case-nav a:hover,
.project-pagination a:hover {
  color: var(--color-primary);
}

.project-number {
  color: var(--color-subtle);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-case-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 90% 8%, rgba(37, 99, 235, 0.13), transparent 35%),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(15px);
}

.project-kicker {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-case-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.9rem, 7vw, 6rem);
  font-weight: 780;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.project-case-hero > p:not(.project-kicker) {
  max-width: 830px;
  margin: 1.7rem 0 0;
  color: var(--color-text-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 2rem;
}

.project-tech p {
  display: contents;
}

.project-tech-primary,
.project-tech-item {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.67rem;
  font-weight: 700;
}

.project-tech-primary {
  color: #fff;
  background: var(--color-primary);
}

.project-tech-item {
  color: var(--color-text-soft);
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--color-border-soft);
}

.project-disclaimer {
  margin: 1rem 0 clamp(4rem, 8vw, 7rem);
  padding: 1rem 1.2rem;
  color: var(--color-text-soft);
  background: rgba(239, 246, 255, 0.82);
  border: 1px solid rgba(147, 197, 253, 0.46);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.project-disclaimer p {
  margin: 0;
}

.project-case > h2 {
  max-width: 900px;
  margin: clamp(4.5rem, 9vw, 7rem) 0 1.25rem;
  padding-top: 0;
  color: var(--color-text);
  border: 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.project-case > h2 + p,
.project-case > p {
  max-width: 900px;
  color: var(--color-text-soft);
}

.project-case .cell {
  margin: 1.6rem 0 2.4rem;
}

.project-case .sourceCode {
  border-color: var(--color-border-soft);
  border-radius: var(--radius-md);
}

.project-case pre.sourceCode {
  padding: 1rem 1.15rem;
  background: rgba(248, 250, 252, 0.94);
}

.project-case .cell-output-display {
  max-width: 100%;
  overflow-x: auto;
}

.project-case .cell-output-display > p {
  margin: 0;
}

.project-case .gt_table {
  font-family: var(--font-sans) !important;
}

.project-case figure {
  margin: 2rem 0 2.8rem;
}

.project-case figure img,
.project-case .cell-output-display img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.project-takeaway {
  margin: clamp(4rem, 8vw, 6rem) 0 0;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border-soft);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.05);
}

.project-takeaway h3 {
  margin: 0 0 0.65rem;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 720;
}

.project-takeaway p {
  margin: 0;
  color: var(--color-text-soft);
}

.project-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.project-pagination p:last-child {
  text-align: right;
}

/* =========================================================
   15. OBSERVABLE / OJS PROJECT VISUALIZATIONS
   ========================================================= */

.project-case .observablehq,
.project-case .observablehq .cell,
.project-case .observablehq .cell-output,
.project-case .observablehq .cell-output-display,
.project-case .observable-project {
  width: 100%;
  max-width: none;
}

.project-case .observablehq .cell-output-display {
  overflow: visible;
}

.observable-project {
  overflow: hidden;
  margin: 1.75rem 0 3rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: clamp(20px, 3vw, 32px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.11);
}

/* Advanced analytical portfolio labs --------------------------------------- */
.analysis-lab {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.analysis-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0 2.5rem;
}

.analysis-summary > div {
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.analysis-summary span {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.analysis-summary strong {
  display: block;
  margin-top: 0.32rem;
  color: #0f172a;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  line-height: 1.05;
}

.analysis-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 3rem;
  padding: 1rem;
  background: rgba(239, 246, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
}

.analysis-index a {
  padding: 0.58rem 0.8rem;
  color: #334155;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.analysis-index a:hover {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.4);
}

.lab-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0 3rem;
}

.lab-chart-grid .observablehq,
.lab-chart-grid .cell-output-display {
  display: contents;
}

.lab-chart-card {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.075);
}

.lab-chart-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  padding: 1.2rem 1.25rem 0.65rem;
}

.lab-chart-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.03rem;
  line-height: 1.25;
}

.lab-chart-card header p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.45;
}

.lab-chart-index {
  display: grid;
  width: 2.05rem;
  height: 2.05rem;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 800;
}

.lab-live-badge,
.lab-static-badge {
  padding: 0.34rem 0.48rem;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.lab-static-badge {
  color: #6d28d9;
  background: #ede9fe;
}

.lab-chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  min-height: 3.15rem;
  padding: 0.35rem 1.25rem 0.75rem;
}

.lab-select,
.lab-range {
  display: grid;
  gap: 0.25rem;
  min-width: 145px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-select select {
  max-width: 240px;
  padding: 0.46rem 1.9rem 0.46rem 0.62rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.72rem;
  text-transform: none;
}

.lab-range input {
  width: min(230px, 62vw);
  accent-color: #2563eb;
}

.lab-chart-host {
  min-height: 300px;
  padding: 0.25rem 0.85rem 1rem;
  overflow-x: auto;
}

.lab-chart-host figure,
.lab-chart-host svg {
  display: block;
  margin: 0 auto;
  font-family: inherit;
}

.lab-chart-card--wide {
  grid-column: 1 / -1;
}

.lab-static-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 3rem;
}

.lab-static-card {
  padding: 1.1rem;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .065);
}

.lab-static-card > p:first-child {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.lab-static-card .cell-output-display img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.analysis-method {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(135deg, rgba(15,23,42,.98), rgba(30,64,175,.94));
  border-radius: 22px;
  color: #dbeafe;
}

.analysis-method h3 {
  color: #fff;
}

.analysis-method code {
  color: #67e8f9;
}

.source-note {
  padding: 1rem 1.15rem;
  background: rgba(240, 253, 250, .78);
  border-left: 4px solid #14b8a6;
  border-radius: 0 14px 14px 0;
  color: #334155;
  font-size: .86rem;
}

@media (max-width: 900px) {
  .analysis-summary,
  .lab-static-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .analysis-summary,
  .lab-chart-grid,
  .lab-static-grid {
    grid-template-columns: 1fr;
  }

  .lab-chart-card--wide {
    grid-column: auto;
  }

  .lab-chart-card > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .lab-live-badge,
  .lab-static-badge {
    grid-column: 2;
    justify-self: start;
  }

  .lab-chart-host {
    min-height: 250px;
  }
}

.observable-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.observable-toolbar h3 {
  margin: 0.25rem 0 0;
  color: var(--color-text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 740;
}

.observable-eyebrow {
  margin: 0;
  color: var(--color-subtle);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.observable-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.observable-pills button,
.observable-reset {
  appearance: none;
  min-height: 38px;
  padding: 0.5rem 0.92rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 690;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.observable-pills button:hover,
.observable-pills button:focus-visible,
.observable-reset:hover,
.observable-reset:focus-visible {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.observable-pills button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
}

.observable-live-metric {
  display: grid;
  flex: 0 0 auto;
  min-width: 150px;
  text-align: right;
}

.observable-live-metric strong {
  color: #0f172a;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.05em;
}

.observable-live-metric span {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 650;
}

.observable-stage {
  position: relative;
  overflow: hidden;
  padding: clamp(0.65rem, 2vw, 1.25rem);
  background:
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.1), transparent 31%),
    linear-gradient(160deg, #f8fbff 0%, #eef4ff 100%);
}

.observable-stage--network {
  background:
    radial-gradient(circle at 48% 48%, rgba(34, 211, 238, 0.13), transparent 31%),
    linear-gradient(160deg, #f8fbff 0%, #f1f5ff 100%);
}

.observable-stage--sunburst {
  display: grid;
  place-items: center;
}

.observable-stage--sunburst .observable-chart {
  width: min(100%, 790px);
}

.observable-chart,
.observable-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.observable-chart text {
  font-family: var(--font-sans);
}

.observable-grid .tick line {
  stroke: #cbd5e1;
  stroke-opacity: 0.7;
}

.observable-grid .domain {
  display: none;
}

.observable-axis-label {
  fill: #475569;
  font-size: 13px;
  font-weight: 680;
}

.observable-brush .selection {
  fill: #2563eb;
  fill-opacity: 0.1;
  stroke: #2563eb;
  stroke-width: 2;
  stroke-dasharray: 8 5;
}

.observable-tip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 0.3rem;
  width: min(250px, calc(100% - 2rem));
  padding: 0.8rem 0.9rem;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.22);
  font-size: 0.74rem;
  line-height: 1.4;
  pointer-events: none;
  backdrop-filter: blur(9px);
}

.observable-tip[hidden] {
  display: none;
}

.observable-tip strong {
  color: #ffffff;
  font-size: 0.8rem;
}

.observable-instruction {
  margin: 0;
  padding: 0.9rem clamp(1.15rem, 3vw, 1.8rem) 1.15rem;
  color: #64748b;
  background: #ffffff;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.78rem;
}

.observable-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.observable-kpis > div {
  display: grid;
  gap: 0.3rem;
  padding: 1rem clamp(0.8rem, 2vw, 1.35rem);
  background: rgba(255, 255, 255, 0.96);
}

.observable-kpis span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.observable-kpis strong {
  color: #0f172a;
  font-size: clamp(1.15rem, 2.5vw, 1.75rem);
  font-weight: 780;
}

@media (max-width: 620px) {
  .project-case {
    width: min(calc(100% - 1.5rem), 1160px);
  }

  .project-case-hero {
    padding: 2rem 1.25rem;
    border-radius: 24px;
  }

  .project-case-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .project-disclaimer {
    margin-bottom: 3.5rem;
  }

  .project-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-pagination p:last-child {
    text-align: left;
  }

  .observable-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .observable-live-metric {
    min-width: 0;
    text-align: left;
  }

  .observable-reset {
    width: 100%;
  }

  .observable-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .observable-stage {
    overflow-x: auto;
    padding: 0.35rem;
  }

  .observable-project--sankey .observable-chart,
  .observable-project--network .observable-chart {
    width: 760px;
    max-width: none;
  }

  .observable-project--scatter .observable-chart {
    width: 690px;
    max-width: none;
  }

  .observable-project--sunburst .observable-chart {
    width: min(100%, 620px);
  }
}


/* =========================================================
   16. ACCESSIBILITY AND REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   17. FREEDMAN STATISTICS IN R SERIES
   ========================================================= */

.freedman-chapter,
.freedman-series-page {
  --freedman-navy: #071a3d;
  --freedman-blue: #2563eb;
  --freedman-cyan: #22d3ee;
  --freedman-orange: #f97316;
}

.freedman-chapter .project-case-hero,
.freedman-series-page .project-case-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 20%, rgba(34, 211, 238, .2), transparent 26%),
    radial-gradient(circle at 68% 110%, rgba(249, 115, 22, .18), transparent 34%),
    linear-gradient(135deg, #071a3d 0%, #123b7a 58%, #2563eb 100%);
  color: #fff;
}

.freedman-chapter .project-case-hero::after,
.freedman-series-page .project-case-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -52% 35%;
  height: 85%;
  border: 2px solid rgba(255, 255, 255, .13);
  border-radius: 50% 50% 0 0;
  transform: rotate(-4deg);
  pointer-events: none;
}

.freedman-chapter .project-case-hero h1,
.freedman-series-page .project-case-hero h1,
.freedman-chapter .project-case-hero > p,
.freedman-series-page .project-case-hero > p {
  color: #fff;
}

.freedman-chapter .project-kicker,
.freedman-series-page .project-kicker {
  color: #a5f3fc;
}

.freedman-chapter .project-tech-item,
.freedman-series-page .project-tech-item {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .1);
  color: #eff6ff;
}

.freedman-roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 44px;
}

.freedman-roadmap-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 128px;
  padding: 20px;
  border: 1px solid #dbe5f4;
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
}

.freedman-roadmap-item > span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.freedman-roadmap-item strong {
  display: block;
  margin-bottom: 7px;
  color: #0f172a;
  font-size: .98rem;
}

.freedman-roadmap-item p {
  margin: 0;
  color: #64748b;
  font-size: .88rem;
  line-height: 1.55;
}

.freedman-series-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 28px 0 52px;
}

.freedman-series-stats > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 130px;
  padding: 22px;
  border: 1px solid #dbe5f4;
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
}

.freedman-series-stats strong {
  color: #2563eb;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.freedman-series-stats span {
  margin-top: 10px;
  color: #64748b;
  font-size: .86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.freedman-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 54px;
}

.freedman-index-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 24px;
  border: 1px solid #dbe5f4;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 246, 255, .78));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
  color: inherit;
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.freedman-index-card:hover,
.freedman-index-card:focus-visible {
  transform: translateY(-5px);
  border-color: #93c5fd;
  box-shadow: 0 24px 54px rgba(37, 99, 235, .14);
}

.freedman-index-card > span {
  color: #2563eb;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.freedman-index-card > strong {
  margin-top: 10px;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.25;
}

.freedman-index-card-copy {
  display: block;
  margin: 14px 0 18px;
  color: #64748b;
  font-size: .9rem;
  line-height: 1.55;
}

.freedman-index-card small {
  margin-top: auto;
  color: #f97316;
  font-weight: 800;
}

.portfolio-card-media--freedman {
  background: #071a3d;
}

.portfolio-card--freedman .portfolio-card-type {
  color: #1d4ed8;
}

.portfolio-card--d3 .portfolio-card-type {
  color: #0891b2;
}

@media (max-width: 900px) {
  .freedman-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .freedman-series-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .freedman-roadmap,
  .freedman-index-grid,
  .freedman-series-stats {
    grid-template-columns: 1fr;
  }

  .freedman-roadmap-item {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: auto;
    padding: 16px;
  }

  .freedman-index-card {
    min-height: 0;
  }
}

/* Top-end D3 / Observable portfolio labs ------------------------------- */
.top-end-lab {
  --top-accent: #2563eb;
  --top-accent-soft: rgba(37, 99, 235, 0.11);
  position: relative;
  isolation: isolate;
  margin: 2rem 0 3.5rem;
  color: #0f172a;
}

.top-end-lab--cyan { --top-accent: #0891b2; --top-accent-soft: rgba(34, 211, 238, 0.13); }
.top-end-lab--violet { --top-accent: #7c3aed; --top-accent-soft: rgba(139, 92, 246, 0.12); }
.top-end-lab--orange { --top-accent: #ea580c; --top-accent-soft: rgba(249, 115, 22, 0.12); }

.top-end-command {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  color: #e0f2fe;
  background: radial-gradient(circle at 82% 20%, var(--top-accent-soft), transparent 30%), linear-gradient(135deg, #081225 0%, #102857 58%, #0f3b62 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.17);
}

.top-end-command h2 {
  max-width: 760px;
  margin: 0.35rem 0 0;
  color: #fff;
  font-size: clamp(1.65rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.top-end-command p {
  max-width: 780px;
  margin: 0.75rem 0 0;
  color: #bfdbfe;
  font-size: 0.9rem;
  line-height: 1.65;
}

.top-end-kicker { color: #67e8f9; font-size: 0.65rem; font-weight: 850; letter-spacing: 0.14em; }

.top-end-live {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.top-end-live i {
  width: 0.5rem;
  height: 0.5rem;
  background: #22d3ee;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.65);
  animation: top-end-pulse 1.8s infinite;
}

@keyframes top-end-pulse {
  70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.top-end-controls {
  position: sticky;
  top: 62px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem clamp(1rem, 3vw, 1.65rem);
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: 0;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.07);
}

.top-end-control {
  display: grid;
  gap: 0.3rem;
  min-width: 145px;
  margin: 0;
  color: #64748b;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.top-end-control span { min-height: 0.9rem; }
.top-end-control strong { color: var(--top-accent); }

.top-end-control select,
.top-end-control input[type="search"] {
  min-height: 2.35rem;
  max-width: 270px;
  padding: 0.47rem 2rem 0.47rem 0.65rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.73rem;
  text-transform: none;
}

.top-end-control input[type="search"] {
  padding-right: 0.65rem;
  outline: none;
}

.top-end-control input[type="search"]:focus {
  border-color: var(--top-accent);
  box-shadow: 0 0 0 3px var(--top-accent-soft);
}

.top-end-control--range { min-width: 175px; }
.top-end-control input[type="range"] { width: min(220px, 55vw); min-height: 2.35rem; accent-color: var(--top-accent); }

.top-end-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1.15rem 0 1.4rem;
}

.top-end-metrics > div {
  min-width: 0;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.top-end-metrics span,
.top-end-metrics small {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-end-metrics strong {
  display: block;
  overflow: hidden;
  margin: 0.28rem 0 0.2rem;
  color: #0f172a;
  font-size: clamp(1.1rem, 2.3vw, 1.75rem);
  line-height: 1.05;
  text-overflow: ellipsis;
}

.top-end-metrics small { color: #94a3b8; font-size: 0.55rem; letter-spacing: 0.035em; text-transform: none; }

.top-end-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.top-end-panel {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.075);
}

.top-end-panel--wide { grid-column: 1 / -1; }

.top-end-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.top-end-panel h3 { margin: 0; color: #0f172a; font-size: 1rem; line-height: 1.25; }
.top-end-panel header p { margin: 0.28rem 0 0; color: #64748b; font-size: 0.72rem; line-height: 1.45; }

.top-end-panel header > span {
  padding: 0.32rem 0.45rem;
  color: var(--top-accent);
  background: var(--top-accent-soft);
  border-radius: 8px;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.top-end-panel-host { min-height: 330px; padding: 0.8rem; overflow: auto; }
.top-end-panel-host svg,
.top-end-panel-host figure { display: block; margin: 0 auto; font-family: inherit; }

.top-end-tooltip {
  position: absolute;
  z-index: 30;
  display: grid;
  gap: 0.22rem;
  width: max-content;
  max-width: 220px;
  padding: 0.75rem 0.85rem;
  pointer-events: none;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.24);
  font-size: 0.72rem;
  line-height: 1.35;
}

.top-end-tooltip[hidden] { display: none; }
.top-end-tooltip strong,
.top-end-tooltip b,
.top-end-tooltip span { display: block; }
.top-end-tooltip strong { color: #fff; font-size: 0.8rem; }
.top-end-tooltip b { color: #67e8f9; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .top-end-live i { animation: none; }
}

@media (max-width: 900px) {
  .top-end-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-end-controls { position: relative; top: auto; }
}

@media (max-width: 700px) {
  .top-end-command { display: grid; }
  .top-end-live { justify-self: start; }
  .top-end-grid,
  .top-end-metrics { grid-template-columns: 1fr; }
  .top-end-controls { display: grid; }
  .top-end-control,
  .top-end-control select,
  .top-end-control input[type="search"],
  .top-end-control input[type="range"] { width: 100%; max-width: none; }
  .top-end-panel--wide { grid-column: auto; }
  .top-end-panel-host { min-height: 280px; }
}

/* Business intelligence dashboards ----------------------------------- */
.bi-dashboard {
  --bi-accent: #2563eb;
  --bi-accent-soft: rgba(37, 99, 235, 0.12);
  position: relative;
  isolation: isolate;
  margin: 2rem 0 3.5rem;
  color: #0f172a;
}

.bi-dashboard--violet { --bi-accent: #7c3aed; --bi-accent-soft: rgba(124, 58, 237, 0.12); }
.bi-dashboard--cyan { --bi-accent: #0891b2; --bi-accent-soft: rgba(8, 145, 178, 0.12); }
.bi-dashboard--green { --bi-accent: #15803d; --bi-accent-soft: rgba(21, 128, 61, 0.12); }
.bi-dashboard--orange { --bi-accent: #c2410c; --bi-accent-soft: rgba(194, 65, 12, 0.12); }

.bi-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.35rem);
  color: #e2e8f0;
  background:
    radial-gradient(circle at 78% 15%, var(--bi-accent-soft), transparent 28%),
    linear-gradient(135deg, #07101f 0%, #0b1d36 58%, #112d4f 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 30px 85px rgba(15, 23, 42, 0.17);
}

.bi-dashboard-kicker {
  color: #67e8f9;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.bi-dashboard-head h2 {
  max-width: 820px;
  margin: 0.4rem 0 0;
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.bi-dashboard-head p {
  max-width: 760px;
  margin: 0.8rem 0 0;
  color: #bfdbfe;
  font-size: 0.88rem;
  line-height: 1.65;
}

.bi-dashboard-state {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.15rem 0.45rem;
  min-width: 132px;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  font-size: 0.62rem;
}

.bi-dashboard-state i {
  grid-row: 1 / 3;
  width: 0.55rem;
  height: 0.55rem;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.13);
}

.bi-dashboard-state span { color: #cbd5e1; font-weight: 750; }
.bi-dashboard-state strong { color: #fff; font-size: 0.7rem; }

.bi-dashboard-toolbar {
  position: sticky;
  top: 62px;
  z-index: 14;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.7rem;
  padding: 1rem clamp(1rem, 3vw, 1.65rem);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: 0;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.075);
}

.bi-dashboard-control {
  display: grid;
  gap: 0.3rem;
  min-width: 132px;
  margin: 0;
  color: #64748b;
  font-size: 0.59rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bi-dashboard-control strong { color: var(--bi-accent); }

.bi-dashboard-control select {
  min-height: 2.4rem;
  max-width: 220px;
  padding: 0.48rem 2rem 0.48rem 0.68rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.73rem;
  text-transform: none;
}

.bi-dashboard-control--range { min-width: 175px; }
.bi-dashboard-control input[type="range"] { width: min(190px, 48vw); min-height: 2.4rem; accent-color: var(--bi-accent); }

.bi-dashboard-action {
  min-height: 2.4rem;
  padding: 0.48rem 0.78rem;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.69rem;
  font-weight: 800;
  cursor: pointer;
}

.bi-dashboard-action:hover,
.bi-dashboard-action:focus-visible { border-color: var(--bi-accent); box-shadow: 0 0 0 3px var(--bi-accent-soft); }
.bi-dashboard-action.is-primary { color: #fff; background: var(--bi-accent); border-color: var(--bi-accent); }

.bi-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 1.15rem 0 1.35rem;
}

.bi-dashboard-kpis > div {
  min-width: 0;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.bi-dashboard-kpis span,
.bi-dashboard-kpis small {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bi-dashboard-kpis strong {
  display: block;
  overflow: hidden;
  margin: 0.3rem 0 0.22rem;
  color: #0f172a;
  font-size: clamp(0.98rem, 1.55vw, 1.35rem);
  line-height: 1.05;
  text-overflow: ellipsis;
}

.bi-dashboard-kpis small { color: #94a3b8; font-size: 0.54rem; letter-spacing: 0.02em; text-transform: none; }

.bi-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bi-dashboard-panel {
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.bi-dashboard-panel--wide { grid-column: 1 / -1; }

.bi-dashboard-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.bi-dashboard-panel h3 { margin: 0; color: #0f172a; font-size: 0.98rem; line-height: 1.25; }
.bi-dashboard-panel header p { margin: 0.27rem 0 0; color: #64748b; font-size: 0.7rem; line-height: 1.45; }
.bi-dashboard-panel header > span { padding: 0.3rem 0.43rem; color: var(--bi-accent); background: var(--bi-accent-soft); border-radius: 8px; font-size: 0.54rem; font-weight: 900; letter-spacing: 0.08em; }
.bi-dashboard-panel-host { min-height: 310px; padding: 0.8rem; overflow: auto; }
.bi-dashboard-panel-host svg,
.bi-dashboard-panel-host figure { display: block; margin: 0 auto; font-family: inherit; }

.bi-funnel { display: grid; gap: 0.55rem; padding: 1rem 0.35rem; }
.bi-funnel > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.65rem;
  align-items: center;
  width: var(--funnel-width);
  min-width: 48%;
  margin: 0 auto;
  padding: 0.66rem 0.8rem;
  color: #fff;
  background: var(--funnel-color);
  border-radius: 9px;
  transition: width 260ms ease;
}
.bi-funnel span { overflow: hidden; font-size: 0.69rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.bi-funnel strong { font-size: 0.78rem; }
.bi-funnel small { font-size: 0.6rem; opacity: 0.84; }

.bi-dashboard-table-wrap { max-height: 480px; overflow: auto; }
.bi-dashboard-table { width: 100%; border-collapse: collapse; font-size: 0.67rem; }
.bi-dashboard-table th { position: sticky; top: 0; z-index: 1; padding: 0.7rem 0.55rem; color: #475569; background: #f8fafc; text-align: left; white-space: nowrap; }
.bi-dashboard-table td { padding: 0.62rem 0.55rem; border-top: 1px solid #e2e8f0; white-space: nowrap; }
.bi-dashboard-table tbody tr:hover { background: var(--bi-accent-soft); }
.bi-dashboard-table tr.has-alert td:last-child span { color: #b91c1c; background: #fee2e2; }
.bi-dashboard-table td:last-child span { display: inline-block; padding: 0.24rem 0.42rem; color: #166534; background: #dcfce7; border-radius: 999px; font-size: 0.57rem; font-weight: 850; text-transform: uppercase; }

.bi-dashboard-tooltip {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 0.2rem;
  width: max-content;
  max-width: 225px;
  padding: 0.72rem 0.82rem;
  pointer-events: none;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
  font-size: 0.7rem;
}
.bi-dashboard-tooltip[hidden] { display: none; }
.bi-dashboard-tooltip strong,
.bi-dashboard-tooltip span,
.bi-dashboard-tooltip b { display: block; }
.bi-dashboard-tooltip strong { color: #fff; }
.bi-dashboard-tooltip b { color: #67e8f9; font-size: 0.86rem; }

.seo-editorial {
  max-width: 940px;
  margin: 3rem auto 2rem;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
}
.seo-editorial h2 { margin-top: 2rem; }
.seo-editorial h2:first-child { margin-top: 0; }
.seo-editorial h3 { margin-top: 1.45rem; }
.seo-editorial p,
.seo-editorial li { color: #334155; line-height: 1.75; }
.seo-editorial .seo-author { margin-top: 2rem; padding: 1rem 1.1rem; background: #eff6ff; border-left: 4px solid #2563eb; border-radius: 10px; }
.seo-editorial .seo-author p { margin: 0.35rem 0 0; }
.seo-editorial .seo-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding: 0; list-style: none; }
.seo-editorial .seo-related a { display: block; height: 100%; padding: 0.85rem 0.95rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; font-weight: 750; text-decoration: none; }

@media (max-width: 1350px) {
  .bi-dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .bi-dashboard-toolbar { position: relative; top: auto; }
  .bi-dashboard-grid { grid-template-columns: 1fr; }
  .bi-dashboard-panel--wide { grid-column: auto; }
}

@media (max-width: 680px) {
  .bi-dashboard-head { display: grid; }
  .bi-dashboard-state { justify-self: start; }
  .bi-dashboard-toolbar { display: grid; }
  .bi-dashboard-control,
  .bi-dashboard-control select,
  .bi-dashboard-control input[type="range"],
  .bi-dashboard-action { width: 100%; max-width: none; }
  .bi-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bi-dashboard-panel-host { min-height: 280px; }
  .seo-editorial .seo-related { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .bi-dashboard-kpis { grid-template-columns: 1fr; }
}
