/*# source: assets/css/core/tokens.css */
/*
  MetricLab Design Tokens
  Phase 1 extraction layer.

  These tokens are the shared foundation for new UI primitives. Legacy
  variables from base.css and ui-system-v2.css remain mapped below so older
  pages can continue using their existing class names and custom properties.
*/

:root {
  color-scheme: light;

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-section: clamp(var(--space-xl), 6vw, var(--space-3xl));
  --space-card: var(--space-lg);

  /* Radii */
  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;
  --radius-card: var(--radius-lg);
  --radius-panel: var(--radius-md);

  /* Containers */
  --ml-container: 72rem;
  --ml-container-wide: 82rem;
  --ml-container-narrow: 52rem;
  --ml-container-readable: 42rem;
  --container-compact: 38.75rem;
  --container-default: 56.25rem;
  --container-wide: 73.75rem;
  --ml-container-padding: clamp(1rem, 4vw, 2rem);

  /* Mobile layout */
  --mobile-container-padding: clamp(0.9rem, 4vw, 1.15rem);
  --mobile-section-gap: clamp(1.7rem, 7vw, 2.45rem);
  --mobile-stack-gap: 0.85rem;
  --mobile-card-gap: 0.8rem;
  --mobile-card-padding: clamp(1rem, 4.5vw, 1.25rem);
  --mobile-hero-padding-start: clamp(1.35rem, 7vw, 2.2rem);
  --mobile-hero-padding-end: clamp(1.75rem, 8vw, 2.5rem);

  /* Colors: backgrounds and surfaces */
  --ml-bg: rgb(247 249 252);
  --ml-surface: rgb(255 255 255);
  --ml-surface-alt: rgb(241 245 249);
  --ml-surface-elevated: rgb(255 255 255);

  /* Colors: text */
  --ml-text: rgb(15 23 42);
  --ml-text-muted: rgb(71 85 105);
  --ml-text-soft: rgb(100 116 139);
  --ml-text-inverse: rgb(255 255 255);

  /* Colors: borders */
  --ml-border: rgb(217 226 239);
  --ml-border-soft: rgb(232 238 247);
  --border-soft: var(--ml-border-soft);
  --border-strong: var(--ml-border);

  /* Colors: actions and states */
  --ml-primary: rgb(37 99 235);
  --ml-primary-hover: rgb(29 78 216);
  --ml-on-primary: rgb(255 255 255);
  --ml-danger: rgb(220 38 38);
  --ml-danger-hover: rgb(185 28 28);
  --ml-positive: rgb(22 101 52);
  --ml-negative: rgb(153 27 27);
  --primary: var(--ml-primary);
  --primary-hover: var(--ml-primary-hover);
  --primary-foreground: var(--ml-on-primary);
  --text-inverse: var(--ml-on-primary);

  /* Shadows */
  --ml-shadow: 0 18px 45px rgb(15 23 42 / 0.1);
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.08);
  --shadow-md: 0 14px 35px rgb(15 23 42 / 0.1);
  --shadow-lg: 0 24px 70px rgb(15 23 42 / 0.14);
  --shadow-soft: var(--shadow-sm);
  --shadow-card: var(--shadow-md);
  --shadow-glow: 0 18px 42px
    color-mix(in srgb, var(--ml-primary) 18%, transparent);
  --shadow-focus: 0 0 0 3px rgb(37 99 235 / 0.22);

  /* Typography */
  --font-base: system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;
  --text-xs: clamp(0.78rem, 0.75rem + 0.12vw, 0.84rem);
  --text-sm: clamp(0.88rem, 0.84rem + 0.16vw, 0.96rem);
  --text-md: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
  --text-xl: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.45rem + 2.4vw, 3.5rem);
  --text-hero: clamp(2.35rem, 1.55rem + 4vw, 4.35rem);

  --font-size-xs: var(--text-xs);
  --font-size-sm: var(--text-sm);
  --font-size-md: var(--text-md);
  --font-size-lg: var(--text-lg);
  --font-size-xl: var(--text-xl);
  --font-size-2xl: var(--text-2xl);

  --line-tight: 1.08;
  --line-snug: 1.25;
  --line-normal: 1.6;
  --line-relaxed: 1.75;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --tracking-tight: -0.03em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;

  /* Component sizing */
  --btn-height-sm: 2.5rem;
  --btn-height-md: 3rem;
  --btn-height-lg: 3.35rem;
  --btn-padding-x-sm: 1rem;
  --btn-padding-x-md: 1.25rem;
  --btn-padding-x-lg: 1.5rem;

  /* Motion */
  --transition-fast: 0.15s ease;
  --transition-default: 0.22s ease;
  --transition-base: var(--transition-default);
  --transition-surface: var(--transition-default);

  /* Z-index */
  --z-base: 0;
  --z-card-active: 1;
  --z-sticky: 20;
  --z-header: 50;
  --z-dropdown: 60;
  --z-modal: 100;

  /* Legacy and cross-layer aliases */
  --bg-color: var(--ml-bg);
  --bg: var(--ml-bg);
  --card: var(--ml-surface);
  --text-color: var(--ml-text);
  --text: var(--ml-text);
  --muted: var(--ml-text-muted);
  --border: var(--ml-border);
  --border-color: var(--ml-border);
  --radius: var(--radius-md);
  --link-color: var(--ml-primary);
  --bg-soft: var(--ml-surface-alt);
  --text-muted: var(--ml-text-muted);
  --color-surface: var(--ml-surface);
  --color-surface-soft: var(--ml-surface-alt);
  --color-surface-elevated: var(--ml-surface-elevated);
  --color-text: var(--ml-text);
  --color-text-muted: var(--ml-text-muted);
  --color-border: var(--ml-border);
  --color-border-soft: var(--ml-border-soft);
  --color-primary: var(--ml-primary);
  --color-primary-dark: var(--ml-primary-hover);
  --danger: var(--ml-danger);
  --danger-hover: var(--ml-danger-hover);
  --positive: var(--ml-positive);
  --negative: var(--ml-negative);
  --cta-bg: var(--ml-primary);
  --cta-bg-hover: var(--ml-primary-hover);
  --cta-text: var(--ml-on-primary);
}

@media (width <= 640px) {
  :root {
    --ml-container-padding: var(--mobile-container-padding);
  }
}

[data-theme="dark"],
html.dark {
  color-scheme: dark;

  --ml-bg: rgb(7 17 31);
  --ml-surface: rgb(15 27 45);
  --ml-surface-alt: rgb(17 31 52);
  --ml-surface-elevated: rgb(22 36 58);
  --ml-text: rgb(237 244 255);
  --ml-text-muted: rgb(181 196 216);
  --ml-text-soft: rgb(143 162 187);
  --ml-text-inverse: rgb(7 17 31);
  --ml-border: rgb(148 163 184 / 0.22);
  --ml-border-soft: rgb(148 163 184 / 0.14);
  --border-soft: var(--ml-border-soft);
  --border-strong: var(--ml-border);
  --ml-primary: rgb(96 165 250);
  --ml-primary-hover: rgb(59 130 246);
  --ml-on-primary: rgb(7 17 31);
  --ml-danger: rgb(239 68 68);
  --ml-danger-hover: rgb(220 38 38);
  --ml-positive: rgb(74 222 128);
  --ml-negative: rgb(248 113 113);
  --primary: var(--ml-primary);
  --primary-hover: var(--ml-primary-hover);
  --primary-foreground: var(--ml-on-primary);
  --text-inverse: var(--ml-on-primary);
  --ml-shadow: 0 22px 60px rgb(0 0 0 / 0.34);

  --bg-color: var(--ml-bg);
  --bg: var(--ml-bg);
  --card: var(--ml-surface);
  --text-color: var(--ml-text);
  --text: var(--ml-text);
  --muted: var(--ml-text-muted);
  --border: var(--ml-border);
  --border-color: var(--ml-border);
  --bg-soft: var(--ml-surface-alt);
  --link-color: var(--ml-primary);
  --text-muted: var(--ml-text-muted);
  --color-surface: var(--ml-surface);
  --color-surface-soft: var(--ml-surface-alt);
  --color-surface-elevated: var(--ml-surface-elevated);
  --color-text: var(--ml-text);
  --color-text-muted: var(--ml-text-muted);
  --color-border: var(--ml-border);
  --color-border-soft: var(--ml-border-soft);
  --color-primary: var(--ml-primary);
  --color-primary-dark: var(--ml-primary-hover);
  --danger: var(--ml-danger);
  --danger-hover: var(--ml-danger-hover);
  --positive: var(--ml-positive);
  --negative: var(--ml-negative);
  --cta-bg: var(--ml-primary);
  --cta-bg-hover: var(--ml-primary-hover);
  --cta-text: var(--ml-on-primary);

  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.28);
  --shadow-md: 0 14px 35px rgb(0 0 0 / 0.32);
  --shadow-lg: 0 24px 70px rgb(0 0 0 / 0.42);
  --shadow-soft: var(--shadow-sm);
  --shadow-card: var(--shadow-md);
  --shadow-glow: 0 18px 42px
    color-mix(in srgb, var(--ml-primary) 20%, transparent);
  --shadow-focus: 0 0 0 3px rgb(96 165 250 / 0.28);
}
/*# source: assets/css/core/layout.css */
.ml-container,
.ml-container-wide,
.ml-container-narrow,
.content-shell {
  width: min(100% - (var(--ml-container-padding) * 2), var(--ml-container));
  margin-inline: auto;
}

.ml-container-wide {
  width: min(
    100% - (var(--ml-container-padding) * 2),
    var(--ml-container-wide)
  );
}

.ml-container-narrow,
.content-shell {
  max-width: var(--ml-container-narrow);
}

.ml-readable {
  max-width: var(--ml-container-readable, 42rem);
}

.section-shell,
.ml-section {
  padding-block: var(
    --ml-section-padding,
    var(--space-section, clamp(var(--space-xl), 6vw, var(--space-3xl)))
  );
}

.ml-stack,
.stack-md {
  display: flex;
  flex-direction: column;
  gap: var(--ml-stack-gap, var(--space-lg));
}

.stack-sm,
.stack-lg {
  display: flex;
  flex-direction: column;
}

.stack-sm {
  gap: var(--space-sm);
}

.stack-lg {
  gap: var(--space-xl);
}

.ml-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ml-cluster-gap, var(--space-sm));
  align-items: var(--ml-cluster-align, center);
  justify-content: var(--ml-cluster-justify, flex-start);
  min-width: 0;
}

.ml-grid,
.ml-grid-2,
.ml-grid-auto,
.grid-2,
.grid-3,
.grid-auto {
  display: grid;
  gap: var(--ml-grid-gap, var(--space-lg));
  min-width: 0;
}

/* Card grids must not establish a clipping boundary around lifted cards. */
:is(
  .ml-grid,
  .ml-grid-2,
  .ml-grid-auto,
  .grid-2,
  .grid-3,
  .grid-auto,
  .tools-grid,
  .hub-grid
) {
  overflow: visible;
}

.ml-grid,
.grid-auto {
  grid-template-columns: 1fr;
}

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

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

.ml-grid-auto,
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.ml-surface {
  border: 1px solid var(--ml-border);
  border-radius: var(--radius-panel, var(--radius-md));
  background: var(--ml-surface);
  color: var(--ml-text);
}

.tool-shell--compact {
  --tool-shell-max: var(--container-compact);
}

.tool-shell--default {
  --tool-shell-max: var(--container-default);
}

.tool-shell--wide {
  --tool-shell-max: var(--container-wide);
}

.heading-xl,
.heading-lg,
.heading-md {
  color: var(--ml-text);
  font-weight: var(--weight-extrabold, 800);
  letter-spacing: var(--tracking-tight, -0.03em);
  text-wrap: balance;
}

.heading-xl {
  font-size: var(--text-2xl);
  line-height: var(--line-tight);
}

.heading-lg {
  font-size: var(--text-xl);
  line-height: var(--line-snug);
}

.heading-md {
  font-size: var(--text-lg);
  line-height: var(--line-snug);
}

.text-muted {
  color: var(--ml-text-muted);
}

.text-soft {
  color: var(--ml-text-soft);
}

.text-micro {
  color: var(--ml-text-muted);
  font-size: var(--text-xs);
  line-height: var(--line-normal);
}

@media (max-width: 720px) {
  .section-shell,
  .ml-section {
    padding-block: var(
      --mobile-section-gap,
      clamp(var(--space-lg), 10vw, var(--space-2xl))
    );
  }

  .stack-sm,
  .stack-md,
  .stack-lg,
  .ml-stack {
    gap: var(--mobile-stack-gap, var(--space-md));
  }

  .ml-grid,
  .ml-grid-2,
  .ml-grid-auto,
  .grid-2,
  .grid-3,
  .grid-auto {
    gap: var(--mobile-card-gap, var(--space-md));
  }

  .ml-grid-2,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .ml-cluster {
    gap: var(--mobile-stack-gap, var(--space-sm));
  }
}
/*# source: assets/css/core/mobile.css */
html {
  overflow-x: clip;
}

body {
  min-width: 320px;
  overflow-x: clip;
}

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

main,
section,
article,
aside,
header,
footer,
nav,
div,
li,
.card,
.ml-card,
[class*="grid"],
[class*="container"],
[class*="shell"] {
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img,
video,
canvas {
  height: auto;
}

p,
li,
h1,
h2,
h3,
h4,
h5,
h6,
a,
button,
input,
textarea,
select,
summary {
  overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

a[class*="btn"],
button[class*="btn"],
.kf-button,
.kf-btn,
.btn,
.btn-landing,
.ml-btn {
  min-width: 0;
  white-space: normal;
  text-wrap: balance;
}

[class*="grid"] {
  max-width: 100%;
}

@media (max-width: 640px) {
  body {
    text-size-adjust: 100%;
  }

  .page-content {
    padding-top: var(--mobile-section-gap, var(--space-lg));
    padding-bottom: calc(var(--mobile-section-gap, var(--space-lg)) * 2);
  }

  .page-content,
  .container,
  .landing-container,
  .kf-shell,
  .kf-container {
    padding-inline: max(
      var(--mobile-container-padding, 1rem),
      env(safe-area-inset-left)
    );
  }

  .card,
  .ml-card,
  .tool,
  .surface-card,
  .benefit-card,
  .value-item,
  .orc-card,
  .ml-flow-box,
  .price-section {
    margin-bottom: var(--mobile-card-gap, var(--space-sm));
    padding: var(--mobile-card-padding, var(--space-md));
  }

  .ml-grid,
  .ml-grid-2,
  .ml-grid-auto,
  .value-grid,
  .tools-grid,
  .benefits-grid,
  .orc-list,
  .kf-problem-list,
  .kf-benefits,
  .kf-included,
  .kf-flow,
  .kf-hero-grid {
    grid-template-columns: 1fr;
    gap: var(--mobile-card-gap, var(--space-md));
  }

  .hero-actions,
  .cta-group,
  .cta-center,
  .ml-tool-actions,
  .tool-actions,
  .ml-cluster {
    align-items: stretch;
    gap: var(--mobile-card-gap, var(--space-sm));
    row-gap: var(--mobile-stack-gap, var(--space-sm));
    margin-top: var(--mobile-stack-gap, var(--space-sm));
  }

  .hero-actions > *,
  .cta-group > *,
  .cta-center > *,
  .ml-tool-actions > *,
  .tool-actions > * {
    width: 100%;
  }
}
/*# source: assets/css/core/buttons.css */
/* ==================================================
   BUTTON EXTENSION LAYER
   Canonical global .btn styles live in base.css.
   This file keeps product/landing-specific .ml-btn helpers
   plus shared form field utilities for pages that load core/*.
================================================== */

.ml-btn {
  min-height: var(--btn-height-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  max-width: 100%;
  padding: 0.75rem var(--btn-padding-x-md);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--weight-bold, 700);
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.ml-btn {
  border-radius: var(--radius-pill);
}

.ml-btn:hover {
  transform: translateY(-1px);
}

.ml-btn:active {
  transform: translateY(0);
}

.ml-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.ml-btn:disabled,
.ml-btn[disabled],
.ml-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
  transform: none;
}

.ml-btn-primary {
  background: var(--ml-primary);
  border-color: var(--ml-primary);
  color: var(--ml-on-primary);
  box-shadow: var(--shadow-soft, var(--shadow-sm));
}

.ml-btn-primary:hover {
  background: var(--ml-primary-hover);
  border-color: var(--ml-primary-hover);
  color: var(--ml-on-primary);
}

.ml-btn-secondary {
  background: var(--ml-surface);
  border-color: var(--ml-border);
  color: var(--ml-text);
}

.ml-btn-secondary:hover {
  background: var(--ml-surface-alt);
  color: var(--ml-text);
}

.ml-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ml-text);
  box-shadow: none;
}

.ml-btn-ghost:hover {
  background: color-mix(in srgb, var(--ml-primary) 8%, transparent);
  color: var(--ml-text);
  box-shadow: none;
}

.ml-btn-sm,
.ml-btn-small {
  min-height: var(--btn-height-sm);
  padding-inline: var(--btn-padding-x-sm);
  font-size: var(--text-xs);
}

.ml-btn-large {
  min-height: var(--btn-height-lg);
  padding-inline: var(--btn-padding-x-lg);
  font-size: var(--text-md);
}

.ml-btn-block {
  width: 100%;
}

/* ==================================================
   BUTTON REGRESSION GUARDS
   Button-like anchors own their presentation. Contextual link styles
   must not reintroduce decoration or visited-link treatment.
================================================== */

:where(
  a.btn,
  a.ml-btn,
  a.btn-pill,
  a.workflow-step,
  a.btn-landing,
  a.kf-btn,
  a.kf-button,
  a.guia-btn,
  a.bp-btn,
  a.cta-button
),
:where(
  a.btn,
  a.ml-btn,
  a.btn-pill,
  a.workflow-step,
  a.btn-landing,
  a.kf-btn,
  a.kf-button,
  a.guia-btn,
  a.bp-btn,
  a.cta-button
):is(:visited, :hover, :focus, :active) {
  text-decoration: none;
}

:where(
  .btn,
  .ml-btn,
  .btn-pill,
  .workflow-step,
  .btn-landing,
  .kf-btn,
  .kf-button,
  .guia-btn,
  .bp-btn,
  .cta-button
):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

:where(
    .btn,
    .ml-btn,
    .btn-pill,
    .btn-landing,
    .kf-btn,
    .kf-button,
    .guia-btn,
    .bp-btn,
    .cta-button
  )
  > :is(span, strong, em, small) {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

:where(
    .btn,
    .ml-btn,
    .btn-pill,
    .btn-landing,
    .kf-btn,
    .kf-button,
    .guia-btn,
    .bp-btn,
    .cta-button
  )
  > :is(svg, img) {
  flex: 0 0 auto;
  align-self: center;
  vertical-align: middle;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

@media (max-width: 640px) {
  .ml-btn {
    width: 100%;
    min-height: var(--btn-height-lg);
    padding-inline: var(--btn-padding-x-sm);
  }
}
/*# source: assets/css/core/cards.css */
/* MetricLab Design System: Card System
   Sole owner of canonical ml-card components and variants. Legacy card
   aliases remain supported while generated pages migrate additively. */
:root {
  --card-padding: var(--space-lg);
  --card-padding-mobile: var(--mobile-card-padding, var(--space-md));
  --card-gap: var(--space-sm);
  --card-radius: var(--surface-card-radius, var(--radius-lg));
  --card-border: var(
    --surface-card-border,
    1px solid var(--border-strong, var(--ml-border))
  );
  --card-surface: var(--surface-card-bg, var(--ml-surface));
  --card-shadow: var(--surface-shadow, var(--shadow-soft, var(--shadow-sm)));
  --card-hover-shadow: var(
    --surface-shadow-hover,
    var(--shadow-card, var(--shadow-md))
  );
  --card-header-gap: var(--space-sm);
  --card-footer-gap: var(--space-md);
  --card-group-gap: var(--space-lg);
  --card-hover-transform: var(--surface-hover-transform, translateY(-1px));
}

.card,
.card,
.ml-card,
.ml-panel,
.ml-surface-panel,
.info-card,
.feature-card,
.cta-card,
.surface-card,
.benefit-card,
.value-item,
.orc-card,
.ml-flow-box,
.price-section {
  border: var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-surface);
  color: var(--ml-text);
  box-shadow: var(--card-shadow);
  min-width: 0;
}

.card {
  width: 100%;
  margin-bottom: var(--space-lg);
  padding: var(--card-padding);
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.card:hover {
  border-color: color-mix(
    in srgb,
    var(--primary) 18%,
    var(--surface-card-border-color)
  );
  box-shadow: var(--card-hover-shadow);
}

.card p {
  margin-bottom: 0.75rem;
}

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

.card {
  width: 100%;
  margin-bottom: var(--space-lg);
  padding: var(--card-padding);
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.card:hover {
  border-color: color-mix(
    in srgb,
    var(--primary) 18%,
    var(--surface-card-border-color)
  );
  box-shadow: var(--card-hover-shadow);
}

.card p {
  margin-bottom: 0.75rem;
}

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

.ml-card,
.ml-panel,
.ml-surface-panel {
  padding: var(--ml-card-padding, var(--card-padding));
}

.ml-card {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.ml-card__header,
.ml-card__body,
.ml-card__actions,
.ml-card__footer {
  min-width: 0;
}

.ml-card__header {
  display: flex;
  gap: var(--card-header-gap);
  align-items: flex-start;
}

.ml-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.ml-card__actions,
.ml-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-top: var(--card-footer-gap);
}

.ml-card__title,
.ml-card__description,
.ml-card__meta {
  margin: 0;
}

.ml-card__title {
  color: var(--ml-text);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold, 700);
  line-height: var(--line-snug);
}

.ml-card__description {
  color: var(--ml-text-muted);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
}

.ml-card__meta {
  color: var(--ml-text-soft);
  font-size: var(--text-xs);
  line-height: var(--line-normal);
}

.ml-card__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.5rem;
  min-height: 2.5rem;
  color: var(--ml-primary);
}

.ml-card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--card-group-gap);
  align-items: stretch;
  overflow: visible;
}

.ml-card--feature,
.ml-card--tool,
.ml-card--use-case,
.ml-card--result,
.ml-card--affiliate,
.ml-card--faq,
.ml-card--cta,
.ml-card--status {
  --ml-card-padding: var(--card-padding);
}

.ml-card--tool {
  color: inherit;
  text-decoration: none;
}

.ml-card--result .ml-card__title {
  font-size: var(--text-sm);
}

.ml-card--result .ml-card__body {
  gap: var(--card-header-gap);
}

.ml-card--affiliate,
.ml-card--cta {
  border-color: var(
    --surface-workflow-border-color,
    color-mix(in srgb, var(--ml-primary) 26%, var(--ml-border))
  );
  background: var(
    --surface-workflow-bg,
    color-mix(in srgb, var(--ml-primary) 7%, var(--ml-surface))
  );
}

.ml-card--faq {
  gap: 0;
}

.ml-card--faq > summary {
  min-height: 2.75rem;
  cursor: pointer;
}

.ml-card--status .ml-card__header {
  align-items: center;
}

.ml-panel,
.ml-surface-panel {
  border-radius: var(--surface-panel-radius, var(--radius-panel));
}

.ml-card :is(h1, h2, h3, h4, h5, h6),
.ml-panel :is(h1, h2, h3, h4, h5, h6),
.ml-surface-panel :is(h1, h2, h3, h4, h5, h6),
.info-card :is(h1, h2, h3, h4, h5, h6),
.feature-card :is(h1, h2, h3, h4, h5, h6),
.cta-card :is(h1, h2, h3, h4, h5, h6),
.surface-card :is(h1, h2, h3, h4, h5, h6),
.benefit-card :is(h1, h2, h3, h4, h5, h6),
.value-item :is(h1, h2, h3, h4, h5, h6),
.orc-card :is(h1, h2, h3, h4, h5, h6),
.ml-flow-box :is(h1, h2, h3, h4, h5, h6),
.price-section :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ml-text);
}

.ml-card :is(p, li, small),
.ml-panel :is(p, li, small),
.ml-surface-panel :is(p, li, small),
.info-card :is(p, li, small),
.feature-card :is(p, li, small),
.cta-card :is(p, li, small),
.surface-card :is(p, li, small),
.benefit-card :is(p, li, small),
.orc-card :is(p, li, small),
.ml-flow-box :is(p, li, small),
.price-section :is(p, li, small),
.ml-card .muted,
.surface-card .muted {
  color: var(--ml-text-muted);
}

.ml-card-compact {
  --ml-card-padding: var(--space-md);
}

.ml-card-static {
  box-shadow: var(--surface-shadow, var(--shadow-soft, var(--shadow-sm)));
}

.ml-card-interactive {
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--transition-surface, var(--transition-default)),
    border-color var(--transition-surface, var(--transition-default)),
    box-shadow var(--transition-surface, var(--transition-default));
}

.ml-card-interactive:hover {
  border-color: color-mix(in srgb, var(--ml-primary) 32%, var(--ml-border));
  box-shadow: var(--card-hover-shadow);
  transform: var(--card-hover-transform);
}

.ml-card-interactive:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Keep active cards above adjacent grid items without escaping local UI layers. */
:is(
  .ml-card-interactive,
  .ml-card-group > .ml-card,
  .ml-grid > :is(.card, .ml-card),
  .tools-grid > :is(.card, .ml-card),
  .hub-grid > :is(.card, .ml-card)
) {
  position: relative;
}

:is(
  .ml-card-interactive,
  .ml-card-group > .ml-card,
  .ml-grid > :is(.card, .ml-card),
  .tools-grid > :is(.card, .ml-card),
  .hub-grid > :is(.card, .ml-card)
):is(:hover, :focus-visible, :focus-within) {
  z-index: var(--z-card-active);
}

.info-card,
.feature-card,
.cta-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
}

.result-label,
.ml-card .result-label {
  color: var(--ml-text-muted);
  font-size: var(--result-label-size, var(--text-xs));
  font-weight: 750;
  letter-spacing: var(--result-label-tracking, var(--tracking-wide));
  line-height: var(--line-snug);
  text-transform: uppercase;
}

.result-value,
.ml-card .result-value {
  color: var(--ml-text);
  font-size: var(--result-value-size, clamp(2rem, 5vw, 3.35rem));
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: var(--result-value-tracking, -0.055em);
  line-height: 0.98;
}

.result-meta,
.ml-card .result-meta {
  color: var(--ml-text-muted);
  font-size: var(--text-xs);
  line-height: var(--line-normal);
}

.cta-card {
  border-color: var(
    --surface-workflow-border-color,
    color-mix(
      in srgb,
      var(--ml-primary) 26%,
      var(--border-strong, var(--ml-border))
    )
  );
  background: var(
    --surface-workflow-bg,
    color-mix(in srgb, var(--ml-primary) 7%, var(--ml-surface))
  );
  box-shadow: var(--surface-shadow-hover, var(--shadow-card, var(--shadow-md)));
  text-align: center;
}

.feature-card,
.info-card {
  border-color: var(--border-soft, var(--ml-border-soft));
}

.ml-card-header,
.ml-card-content,
.ml-card-actions {
  padding: var(--space-lg);
}

.ml-card-header + .ml-card-content,
.ml-card-content + .ml-card-actions {
  padding-top: 0;
}

.ml-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* Informational badges. `.feature-pill` remains as a legacy alias. */
.ml-badge,
.feature-pill.ml-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--border-soft, var(--ml-border-soft));
  border-radius: var(--radius-pill);
  background: var(--ml-surface-alt);
  color: var(--ml-text-muted);
  box-shadow: none;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: var(--line-snug);
  text-align: start;
  white-space: normal;
}

.ml-badge-coming-soon {
  border-color: var(--ml-border);
}

:is(.card-copy, .hub-card > p, .feature-card > p, .roadmap-card > p)
  + .ml-badge {
  margin-top: var(--space-sm);
}

:is(.ml-card-content, .card-copy-group) + .ml-badge {
  margin-top: var(--space-md);
}

@media (max-width: 640px) {
  .ml-card-header,
  .ml-card-content,
  .ml-card-actions {
    padding: var(--mobile-card-padding, var(--space-md));
  }

  .ml-card,
  .ml-panel,
  .ml-surface-panel {
    padding: var(--card-padding-mobile);
  }

  .ml-card-actions > * {
    flex: 1 1 100%;
  }

  .info-card,
  .feature-card,
  .cta-card {
    gap: var(--mobile-stack-gap, var(--space-sm));
    padding: var(--card-padding-mobile);
  }

  .ml-card__actions,
  .ml-card__footer {
    align-items: stretch;
  }

  .ml-card__actions > :is(button, .btn, .ml-btn),
  .ml-card__footer > :is(button, .btn, .ml-btn) {
    width: 100%;
  }

  .result-value,
  .ml-card .result-value {
    font-size: var(--result-value-mobile-size, clamp(1.8rem, 11vw, 2.7rem));
  }
}
/*# source: assets/css/components/ambient-background.css */
/* MetricLab Design System: Ambient Background
   One decorative, page-level lighting system shared by every locale and product. */
:root {
  --ml-ambient-blue: 37 99 235;
  --ml-ambient-cyan: 6 182 212;
  --ml-ambient-radius: 28rem;
  --ml-ambient-radius-lower: 28rem;
  --ml-ambient-blue-opacity: 0.055;
  --ml-ambient-cyan-opacity: 0.045;
  --ml-ambient-lower-opacity: 0.022;
  --ml-ambient-left-x: 27%;
  --ml-ambient-right-x: 73%;
  --ml-ambient-top-y: 9rem;
  --ml-ambient-lower-x: 54%;
  --ml-ambient-lower-y: 70%;
}

html.dark {
  --ml-ambient-blue-opacity: 0.09;
  --ml-ambient-cyan-opacity: 0.07;
  --ml-ambient-lower-opacity: 0.032;
}

.app-shell {
  position: relative;
  isolation: isolate;
}

.app-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline: clamp(2rem, 7vw, 6rem);
  background:
    radial-gradient(
      circle var(--ml-ambient-radius) at var(--ml-ambient-left-x)
        var(--ml-ambient-top-y),
      rgb(var(--ml-ambient-blue) / var(--ml-ambient-blue-opacity)),
      transparent 72%
    ),
    radial-gradient(
      circle var(--ml-ambient-radius) at var(--ml-ambient-right-x)
        var(--ml-ambient-top-y),
      rgb(var(--ml-ambient-cyan) / var(--ml-ambient-cyan-opacity)),
      transparent 72%
    ),
    radial-gradient(
      circle var(--ml-ambient-radius-lower) at var(--ml-ambient-lower-x)
        var(--ml-ambient-lower-y),
      rgb(var(--ml-ambient-blue) / var(--ml-ambient-lower-opacity)),
      transparent 74%
    );
  pointer-events: none;
}

/* Approved exceptions may change intensity and radius only. */
.ml-ambient-subtle {
  --ml-ambient-blue-opacity: 0.04;
  --ml-ambient-cyan-opacity: 0.032;
  --ml-ambient-lower-opacity: 0.016;
  --ml-ambient-radius: 25rem;
  --ml-ambient-radius-lower: 25rem;
}

@media (max-width: 900px) {
  :root {
    --ml-ambient-radius: 15rem;
    --ml-ambient-radius-lower: 16rem;
    --ml-ambient-left-x: 32%;
    --ml-ambient-right-x: 68%;
  }
}

@media (max-width: 640px) {
  :root {
    --ml-ambient-radius: 10rem;
    --ml-ambient-radius-lower: 11rem;
    --ml-ambient-left-x: 35%;
    --ml-ambient-right-x: 65%;
    --ml-ambient-top-y: 7rem;
  }
}

@media (forced-colors: active), (prefers-reduced-transparency: reduce) {
  .app-shell::before {
    content: none;
  }
}
/*# source: assets/css/menu.css */
/* ============================
   Navigation & Header Components
   Consolidated: All nav, header, footer styles
   This file contains ALL global navigation components
============================ */

/* 0JrQu9Cw0LDRgtGDINCx0LDRgNCw0LTQsCDQvdC40LrRgtC+ */

/* ============================
   Site Header
============================ */

.site-header {
  --header-pill-radius: 999px;
  --header-pill-radius-sm: 14px;
  --header-panel-radius: 18px;
  --header-pill-height: 42px;
  --header-pill-x: 14px;
  --header-action-gap: 0.45rem;
  --header-locale-width: 62px;
  --header-locale-padding-start: 11px;
  --header-locale-padding-end: 22px;
  --header-pill-bg: color-mix(in srgb, var(--card) 82%, var(--bg-color));
  --header-pill-border: color-mix(in srgb, var(--border) 84%, transparent);
  --header-pill-hover: color-mix(in srgb, var(--primary) 9%, var(--card));
  --header-pill-active: color-mix(in srgb, var(--primary) 12%, var(--card));
  --header-pill-shadow: 0 1px 4px rgb(15 23 42 / 3%);
  --header-pill-shadow-hover: 0 2px 8px rgb(15 23 42 / 5%);
  --header-control-surface: var(--header-pill-bg);
  --header-control-border: var(--header-pill-border);
  --header-control-shadow: var(--header-pill-shadow);
  --header-control-shadow-hover: var(--header-pill-shadow-hover);
  --header-focus-ring: 0 0 0 3px
    color-mix(in srgb, var(--primary) 16%, transparent);
  --header-control-transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg-header) 94%, var(--bg-color));
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  box-shadow: 0 1px 8px rgb(15 23 42 / 3%);
  backdrop-filter: blur(6px);
}

[data-theme="dark"] .site-header,
html.dark .site-header {
  --header-control-surface: color-mix(in srgb, var(--card) 88%, white 4%);
  --header-control-border: color-mix(in srgb, var(--border) 78%, transparent);
  --header-control-shadow: 0 1px 3px rgb(0 0 0 / 24%);
  --header-control-shadow-hover: 0 6px 18px rgb(0 0 0 / 24%);

  background: color-mix(in srgb, var(--bg-header) 95%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(0.75rem, 1.4vw, var(--space-lg));
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--header-pill-height);
  height: var(--header-pill-height);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-header);
  text-decoration: none;
  padding: 0 var(--header-pill-x);
  border-radius: var(--header-pill-radius);
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  box-shadow: var(--header-pill-shadow);
  transition: var(--header-control-transition);
}

.logo:hover {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  transform: translateY(-1px);
  box-shadow: var(--header-pill-shadow-hover);
}

.logo:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: var(--header-focus-ring);
}

.logo:active,
.nav__link:active,
.nav-trigger:active {
  transform: translateY(0);
}

/* ============================
   Main Navigation
============================ */

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

@media (width <= 1024px) {
  .main-nav {
    overflow: auto hidden;
    white-space: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }
}

.nav__link {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-header);
  min-height: var(--header-pill-height);
  height: var(--header-pill-height);
  padding: 0 var(--header-pill-x);
  border-radius: var(--header-pill-radius);
  border: 1px solid var(--header-pill-border);
  background: var(--header-pill-bg);
  white-space: nowrap;
  text-decoration: none;
  transition: var(--header-control-transition);
  display: inline-flex;
  align-items: center;
}

.nav__link:hover {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 20%, var(--border));
  color: var(--primary);
  box-shadow: var(--header-pill-shadow-hover);
  transform: translateY(-1px);
}

.nav__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: var(--header-focus-ring);
}

.nav__link--highlight {
  color: var(--primary);
  font-weight: 700;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-color: color-mix(in srgb, var(--primary) 16%, transparent);
}

.nav-group {
  position: relative;
}

.nav-trigger {
  min-height: var(--header-pill-height);
  height: var(--header-pill-height);
  background: var(--header-pill-bg);
  border: 1px solid var(--header-pill-border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-header);
  padding: 0 var(--header-pill-x);
  border-radius: var(--header-pill-radius);
  white-space: nowrap;
  box-shadow: var(--header-pill-shadow);
  transition: var(--header-control-transition);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  outline: none;
}

.nav-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: var(--header-focus-ring);
}

.nav-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentcolor;
  opacity: 0.6;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.nav-trigger:hover,
.nav-group:hover .nav-trigger {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  color: var(--primary);
  box-shadow: var(--header-pill-shadow-hover);
  transform: translateY(-1px);
}

.nav-group.is-open .nav-trigger {
  background: var(--header-pill-active);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  color: var(--primary);
}

.nav-group.is-open .nav-trigger::after {
  transform: rotate(180deg);
  opacity: 1;
}

html.dark .nav-trigger:hover {
  background: rgb(255 255 255 / 10%);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}

/* ============================
   Dropdown
============================ */

.nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 100;
  min-width: 232px;
  max-width: min(320px, calc(100vw - 2rem));
  max-height: min(72vh, 560px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--header-panel-radius);
  padding: 0.45rem;
  box-shadow:
    0 18px 42px rgb(15 23 42 / 12%),
    0 2px 8px rgb(15 23 42 / 6%);
  transition:
    opacity var(--transition-base),
    transform var(--transition-base),
    visibility 0s linear var(--transition-base);
  pointer-events: none;
}

.nav-group.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.nav-group::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
}

.nav-dropdown a {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 9px 12px 9px 13px;
  border-radius: var(--header-pill-radius-sm);
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  position: relative;
  overflow: hidden;
  outline: none;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  box-shadow: none;
  background: transparent;
  will-change: transform, opacity;
}

.nav-dropdown__item {
  display: block;
}

.nav-dropdown__title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.nav-dropdown__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.nav-dropdown__item--primary:not(.active) .nav-dropdown__title {
  font-weight: 700;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
  border-left-color: color-mix(in srgb, var(--primary) 62%, transparent);
  box-shadow: 0 1px 0 rgb(15 23 42 / 3%);
  transform: translateY(-1px);
}

.nav-dropdown a:hover .nav-dropdown__meta,
.nav-dropdown a:focus-visible .nav-dropdown__meta {
  color: color-mix(in srgb, var(--primary) 78%, var(--muted));
}

.nav-dropdown a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--header-pill-radius-sm);
}

.nav-dropdown a.active {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-left-color: var(--primary);
  font-weight: 500;
  color: var(--primary);
  transform: none;
}

.nav-dropdown a.active .nav-dropdown__title {
  font-weight: 700;
}

.nav-dropdown a.active .nav-dropdown__meta {
  color: color-mix(in srgb, var(--primary) 78%, var(--muted));
}

/* ============================
   Nav Section Separator
============================ */

.nav-section {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 10px 12px var(--space-xs);
  margin-top: var(--space-xs);
}

/* ============================
   Header Actions
============================ */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--header-action-gap);
}

.header-actions button,
.site-header .theme-toggle,
.site-header .dark-toggle,
.header-actions select {
  min-height: var(--header-pill-height);
  height: var(--header-pill-height);
  border-radius: var(--header-pill-radius);
  border: 1px solid var(--header-control-border);
  background: var(--header-control-surface);
  box-shadow: var(--header-control-shadow);
  box-sizing: border-box;
}

.header-actions button,
.site-header .theme-toggle,
.site-header .dark-toggle {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-header);
  padding: 0;
  transition: var(--header-control-transition);
  position: relative;
  width: var(--header-pill-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions .lang-selector:not(.locale-switcher),
.header-actions > select {
  width: var(--header-locale-width);
  min-width: var(--header-locale-width);
}

.header-actions .lang-selector:not(.locale-switcher) {
  border-radius: var(--header-pill-radius);
  overflow: hidden;
}

.header-actions > select,
.header-actions .lang-selector select {
  padding: 0 var(--header-locale-padding-end) 0
    var(--header-locale-padding-start);
  width: 100%;
  min-width: var(--header-locale-width);
  text-align: center;
  text-align-last: center;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-header);
  cursor: pointer;
  transition: var(--header-control-transition);
  appearance: auto;
  color-scheme: light;
}

.header-actions .lang-selector select,
#langSelect {
  border-radius: var(--header-pill-radius);
  border-color: var(--header-control-border);
  background-color: var(--header-control-surface);
  box-shadow: var(--header-control-shadow);
}

.header-actions .locale-switcher {
  position: relative;
  width: var(--header-locale-width);
  min-width: var(--header-locale-width);
  overflow: visible;
}

.locale-switcher .nav-trigger {
  width: var(--header-locale-width);
  justify-content: center;
  padding: 0 var(--header-locale-padding-end) 0
    var(--header-locale-padding-start);
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

.locale-switcher .nav-dropdown {
  left: auto;
  right: 0;
  min-width: 104px;
  max-width: 120px;
}

.locale-switcher .nav-dropdown a {
  text-align: center;
  padding-inline: 14px;
  white-space: nowrap;
  word-break: keep-all;
}

.locale-switcher .nav-dropdown a.active {
  font-weight: 700;
}

.locale-switcher select {
  position: absolute;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

html.dark .header-actions > select,
html.dark .header-actions .lang-selector select {
  border-radius: var(--header-pill-radius);
  background-color: var(--header-control-surface);
  color: var(--text);
  color-scheme: dark;
}

.header-actions .lang-selector select option {
  background-color: color-mix(in srgb, var(--card) 96%, var(--bg-color));
  color: var(--text);
  font-weight: 600;
}

.header-actions .lang-selector select option:checked,
.header-actions > select option:checked {
  background-color: color-mix(in srgb, var(--primary) 14%, var(--card));
  color: var(--primary);
}

.header-actions > select:hover,
.header-actions .lang-selector select:hover {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  box-shadow: var(--header-control-shadow-hover);
}

.header-actions button:hover,
.site-header .theme-toggle:hover,
.site-header .dark-toggle:hover {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  box-shadow: var(--header-control-shadow-hover);
  transform: translateY(-1px);
}

.header-actions button:active,
.site-header .theme-toggle:active,
.site-header .dark-toggle:active {
  transform: translateY(0);
}

.header-actions button:focus-visible,
.site-header .theme-toggle:focus-visible,
.site-header .dark-toggle:focus-visible,
.header-actions select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: var(--header-focus-ring);
}

/* ============================
   Hamburguer Button
============================ */

.hamburger {
  width: var(--header-pill-height);
  height: var(--header-pill-height);
  padding: 0;
  background: var(--header-pill-bg);
  border: 1px solid var(--header-pill-border);
  border-radius: var(--header-pill-radius);
  cursor: pointer;
  min-height: unset;
  box-shadow: var(--header-pill-shadow);
  transition: var(--header-control-transition);
}

/* Seletor específico para garantir que não aparece no desktop */
.header-actions .hamburger,
.hamburger {
  display: none !important;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-header);
  border-radius: 2px;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================
   Drawer Overlay
============================ */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(2px);
  z-index: 1998;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.drawer-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ============================
   Drawer
============================ */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 1999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow: hidden;
  visibility: hidden; /* esconde completamente quando fora da tela */
}

.drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-logo {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--header-pill-radius);
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.drawer-close {
  width: 36px;
  height: 36px;
  min-height: unset;
  padding: 0;
  background: var(--header-pill-bg);
  border: 1px solid var(--header-pill-border);
  border-radius: var(--header-pill-radius);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: none;
  transition: var(--header-control-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  color: var(--primary);
  box-shadow: var(--header-pill-shadow-hover);
  transform: translateY(-1px);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-section {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 10px 12px 2px; /* compacto */
  margin-top: var(--space-xs);
}

.drawer-body a {
  display: block;
  padding: 9px 12px 9px 13px; /* compacto */
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--header-pill-radius-sm);
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  will-change: transform, opacity;
}

.drawer-body a:hover,
.drawer-body a:focus-visible {
  background: var(--header-pill-hover);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
  border-left-color: color-mix(in srgb, var(--primary) 56%, transparent);
  color: var(--primary);
  transform: translateY(-1px);
}

.drawer-body a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.drawer-body a.nav__link--highlight {
  color: var(--primary);
  font-weight: 700;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-color: color-mix(in srgb, var(--primary) 16%, transparent);
}

.drawer-body a.active {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
  transform: none;
}

.drawer-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-footer select {
  width: 100%;
  font-size: 0.9rem;
  min-height: var(--header-pill-height);
  border-radius: var(--header-pill-radius);
  border: 1px solid var(--header-pill-border);
  background: var(--header-pill-bg);
  color: var(--text);
  padding: 0 14px;
}

/* ============================
   Mobile — 768px
============================ */

@media (width <= 768px) {
  /* Esconde nav desktop */
  .main-nav {
    display: none;
  }

  /* Mostra hamburguer (está dentro do header-actions) */
  .header-actions .hamburger,
  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  /* logo | header-actions (PT + 🌙 + ☰) colado à direita */
  .header-inner {
    grid-template-columns: auto 1fr;
    gap: var(--space-sm);
  }

  .header-actions {
    gap: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .header-actions button {
    padding: 0;
    min-width: 44px;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  /* Compacta seletor de idioma mas mantém visível */
  .header-actions .lang-selector:not(.locale-switcher),
  .header-actions > select {
    width: 52px;
    min-width: 52px;
  }

  .header-actions .locale-switcher {
    width: 52px;
    min-width: 52px;
  }

  .locale-switcher .nav-trigger {
    width: 52px;
    padding: 0 19px 0 10px;
    font-size: 0.8rem;
  }

  .header-actions > select,
  .header-actions .lang-selector select {
    min-width: 44px;
    font-size: 0.8rem;
    padding: 0 18px 0 9px;
  }
}

/* ============================
   Mobile — 480px
============================ */

@media (width <= 480px) {
  .logo {
    font-size: 0.95rem;
    min-height: 40px;
    padding: 0 10px;
  }

  .header-inner {
    gap: var(--space-xs);
  }

  .header-actions button {
    min-width: 44px;
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }
}

/* ============================
Mobile — 380px
============================ */
@media (width <= 380px) {
  .logo {
    font-size: 1rem;
    padding: 0 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    max-width: 160px;
  }
}

/* ============================
   Accessibility
============================ */

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown,
  .nav-trigger,
  .nav-trigger::after,
  .nav-dropdown a,
  .header-actions button,
  .site-header .theme-toggle,
  .site-header .dark-toggle,
  .drawer,
  .drawer-overlay,
  .hamburger span {
    transition: none;
    animation: none;
  }

  .nav-group.is-open .nav-dropdown {
    transform: none;
  }
}
/*# source: assets/css/tools.css */
/* ============================
Tool System (Global)
============================ */

/* Page Shell */
.tool-page {
  background: var(--bg-color);
  color: var(--text-color);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding-top: var(--space-xl);
  padding-bottom: calc(var(--space-xl) * 1.5);
}

body:is(.tool-page, [data-tool]):not(
    .index-page,
    .banco-page,
    .orc-page,
    .kit-freelancer-page,
    .planilha-freelancer-page
  )
  .page-content {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

/* Wrapper */
.tool-wrap {
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.tool-wrap.xlarge {
  max-width: 898px;
}
.tool-wrap.large {
  max-width: 838px;
}
.tool-wrap.medium {
  max-width: 720px;
}
.tool-wrap.small {
  max-width: 638px;
}
.tool-wrap.xsmall {
  max-width: 578px;
}

.tool-page-title {
  max-width: 638px;
  margin: 0 auto var(--space-md);
  padding: 0 var(--space-lg);
  color: var(--text-header);
  text-align: center;
}

.tool-shell--compact,
.tool-wrap.tool-shell--compact {
  max-width: var(--container-compact, 620px);
}

.tool-shell--default,
.tool-wrap.tool-shell--default {
  max-width: var(--container-default, 900px);
}

.tool-shell--wide,
.tool-wrap.tool-shell--wide {
  max-width: var(--container-wide, 1180px);
}

.tool-shell--compact,
.tool-shell--default,
.tool-shell--wide {
  margin-inline: auto;
  padding-inline: clamp(var(--space-md), 3vw, var(--space-xl));
  padding-block: clamp(var(--space-lg), 4vw, var(--space-2xl));
}

/* Card */
.tool {
  background: var(--surface-card-bg);
  border: var(--surface-card-border);
  border-radius: var(--surface-card-radius);
  padding: var(--space-xl);
  box-shadow: var(--surface-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.tool > * {
  min-width: 0;
}

/* Header */
.tool-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-width: 100%;
  text-align: center;
}

/* Body */
.tool-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.tool-page .tool-body > textarea {
  min-height: 260px;
  width: 100%;
  max-width: 100%;
  resize: vertical;
}

.tool-page .tool-body > .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  width: 100%;
  justify-content: center;
}

.tool-file-status {
  width: 100%;
  margin: var(--space-xs) 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
}

/* Canonical large text workspace for browser-based tools. */
.ml-tool-workspace {
  width: min(100%, var(--ml-container-wide));
  margin-inline: auto;
}

.ml-tool-field {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
}

.ml-tool-field-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.ml-tool-label {
  color: var(--ml-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.ml-tool-counter {
  color: var(--ml-text-muted);
  font-size: var(--text-xs);
  line-height: var(--line-snug);
  font-variant-numeric: tabular-nums;
}

.tool-page .ml-tool-textarea {
  width: 100%;
  min-width: 0;
  min-height: 20rem;
  padding: var(--space-md);
  resize: vertical;
  border: 1px solid var(--ml-border);
  border-radius: var(--radius-md);
  background: var(--ml-surface);
  color: var(--ml-text);
  box-shadow: none;
  font-family: var(--font-base);
  font-size: var(--text-md);
  line-height: var(--line-normal);
}

.tool-page .ml-tool-textarea::placeholder {
  color: var(--ml-text-soft);
  opacity: 1;
}

.tool-page .ml-tool-textarea:hover {
  border-color: var(--ml-border);
  box-shadow: none;
}

.tool-page .ml-tool-textarea:focus-visible {
  outline: none;
  border-color: var(--ml-primary);
  box-shadow: var(--shadow-focus);
}

.tool-page .ml-tool-textarea-output,
.tool-page .ml-tool-textarea[readonly] {
  min-height: 17.5rem;
  background: var(--ml-surface-alt);
  color: var(--ml-text);
  cursor: text;
}

.ml-tool-field-actions,
.ml-tool-output-actions {
  --ml-cluster-gap: var(--space-sm);

  margin-top: var(--space-sm);
}

.ml-tool-helper {
  width: 100%;
  margin: var(--space-xs) 0 0;
  color: var(--ml-text-muted);
  font-size: var(--text-xs);
  line-height: var(--line-normal);
  text-align: left;
}

.ml-tool-options {
  margin-top: var(--space-lg);
}

.ml-tool-section-heading {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ml-text);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  line-height: var(--line-snug);
  letter-spacing: 0;
}

.ml-tool-primary-action {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-block: var(--space-lg);
}

.ml-tool-output-actions {
  margin-top: var(--space-sm);
}

/* Context */
.tool-context {
  margin-top: var(--space-lg);
  font-size: 0.95rem;
  color: var(--muted);
}

.tool-header ul,
.tool-context ul {
  margin: 12px auto 16px;
  padding-left: 22px;
  width: fit-content;
  max-width: 520px;
  text-align: left;
  list-style-position: outside;
}

.tool-header li,
.tool-context li {
  display: list-item;
  margin-bottom: 6px;
  line-height: 1.5;
  text-align: left;
}

/* Ferramentas hub */
.ferramentas-page .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-md);
  width: 100%;
}

.ferramentas-page .tool-grid > .card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: 0;
  color: inherit;
  text-decoration: none;
}

.ferramentas-page .tool-grid > .card::before,
.ferramentas-page .tool-grid > .card::after {
  content: none;
}

.ferramentas-page .tool-grid > .card :is(h2, h3, p) {
  margin: 0;
}

.ferramentas-page .tool-grid > .card :is(h2, h3) {
  color: var(--text-header);
  font-size: 1rem;
  line-height: 1.25;
}

.ferramentas-page .tool-grid > .card p {
  color: var(--muted);
  line-height: 1.55;
}

.ferramentas-page .tool-grid > .card:hover {
  transform: var(--surface-hover-transform);
}

.ferramentas-page .tool-grid > .card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-color: color-mix(
    in srgb,
    var(--primary) 40%,
    var(--surface-card-border-color)
  );
}

/* Main surface variants */
.surface-panel:is(.surface-panel--interactive, .surface-panel--static) {
  width: 100%;
  padding: clamp(28px, 5vw, 52px);
  border: var(--surface-card-border);
  border-radius: 24px;
  background: var(--surface-card-bg);
  box-shadow:
    var(--surface-shadow),
    0 0 24px color-mix(in srgb, var(--primary) 7%, transparent);
}

:is(
  .tool:not(.surface-panel--static),
  .surface-panel.surface-panel--interactive
) {
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

:is(
  .tool:not(.surface-panel--static),
  .surface-panel.surface-panel--interactive
):hover {
  border-color: color-mix(
    in srgb,
    var(--primary) 18%,
    var(--surface-card-border-color)
  );
  box-shadow: var(--surface-shadow-hover);
  transform: var(--surface-hover-transform);
}

html .surface-panel.surface-panel--static,
html .surface-panel.surface-panel--static:hover {
  border-color: var(--surface-card-border-color);
  box-shadow:
    var(--surface-shadow),
    0 0 24px color-mix(in srgb, var(--primary) 7%, transparent);
  cursor: default;
  transform: none;
  transition: none;
}

/* Mobile */
@media (width <= 768px) {
  .tool-page .ml-tool-textarea {
    min-height: 15rem;
    padding: var(--space-sm);
  }

  .tool-page .ml-tool-textarea-output,
  .tool-page .ml-tool-textarea[readonly] {
    min-height: 13.5rem;
  }

  :is(.ml-tool-field-actions, .ml-tool-output-actions, .ml-tool-primary-action)
    > :is(button, .btn) {
    flex: 1 1 100%;
  }

  .tool-page .tool-body > .actions > button,
  .tool-page .tool-body > .actions > .btn {
    flex: 1 1 min(100%, 12rem);
  }

  .surface-panel:is(.surface-panel--interactive, .surface-panel--static) {
    padding: var(--space-lg);
    border-radius: 20px;
  }

  .tool-wrap {
    padding-left: var(--mobile-container-padding, var(--space-md));
    padding-right: var(--mobile-container-padding, var(--space-md));
  }

  .page-content > .tool-wrap.small:not([class*="tool-shell"]) {
    width: calc(
      100% - var(--mobile-container-padding, var(--space-md)) -
        var(--mobile-container-padding, var(--space-md))
    );
    padding-left: 0;
    padding-right: 0;
  }

  .tool-page-title {
    padding-left: var(--mobile-container-padding, var(--space-md));
    padding-right: var(--mobile-container-padding, var(--space-md));
  }

  .tool {
    gap: var(--mobile-stack-gap, var(--space-md));
    padding: var(--mobile-card-padding, var(--space-lg));
  }

  .tool-shell--compact,
  .tool-shell--default,
  .tool-shell--wide {
    padding-inline: var(--mobile-container-padding, var(--space-md));
    padding-block: var(--mobile-section-gap, var(--space-lg));
  }

  .tool-context {
    margin-top: var(--mobile-stack-gap, var(--space-sm));
  }

  .ferramentas-page .tool-grid {
    gap: var(--mobile-card-gap, var(--space-sm));
  }
}
