:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #141821;
  --muted: #475467;
  --border: #d9dee8;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --success: #067647;
  --shadow: 0 18px 50px rgba(20, 24, 33, .08);
  --radius: 22px;
  --max: 1120px;
}

[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: #121826;
  --surface-2: #1a2233;
  --text: #f5f7fb;
  --muted: #cbd5e1;
  --border: #2d3748;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --danger: #f97066;
  --danger-bg: #2a1212;
  --success: #32d583;
  --shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, var(--surface-2), var(--bg) 42%);
  color: var(--text);
  min-height: 100vh;
}

body.is-fullscreen-tool {
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

button, input, select { font: inherit; }

button { cursor: pointer; }

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 999;
}

.skip-link:focus { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}

.brand span {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a, .nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700;
}

.nav a:hover, .nav a.active, .nav button:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.hero {
  padding: 42px 0 22px;
  text-align: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 0 10px;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 5.6rem);
  line-height: .95;
  letter-spacing: -0.075em;
}

.lead {
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
  max-width: 760px;
}

.section {
  padding: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 18px;
  min-height: 50px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

[data-theme="dark"] .btn.primary { color: #06111f; }

.btn.primary:hover { background: var(--primary-hover); }

.btn.ghost {
  background: transparent;
  box-shadow: none;
}

.btn.danger {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger), transparent 60%);
}

.input-group {
  display: grid;
  gap: 7px;
}

.input-group label {
  color: var(--muted);
  font-weight: 750;
  font-size: .92rem;
}

.input-group input,
.input-group select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 1.05rem;
}

.input-group input:focus,
.input-group select:focus,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary), transparent 65%);
  outline-offset: 2px;
}

.tool-note {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.site-footer {
  padding: 36px 0 48px;
  color: var(--muted);
  text-align: center;
}

.text-content {
  padding: 24px;
  line-height: 1.7;
  color: var(--muted);
}

.text-content h2, .text-content h3 {
  color: var(--text);
  letter-spacing: -0.04em;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.tool-link {
  padding: 18px;
  display: grid;
  gap: 8px;
  min-height: 124px;
  transition: transform .15s ease, border-color .15s ease;
}

.tool-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary), var(--border) 55%);
}

.tool-link strong {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.tool-link span { color: var(--muted); line-height: 1.45; }

@media (max-width: 860px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .nav { justify-content: flex-start; }
  .grid.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.timers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .container { width: min(100% - 22px, var(--max)); }
  .hero { padding-top: 28px; }
  .nav a, .nav button { padding: 8px 10px; font-size: .92rem; }
  .grid.tools, .grid.timers { grid-template-columns: 1fr; }
}


.install-app {
  display: inline-flex;
}

.install-app[hidden] {
  display: none !important;
}

.quick-timer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.badge {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-weight: 800;
  font-size: .88rem;
}

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav a, .nav button {
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 20px, var(--max));
  }

  .hero {
    padding: 28px 0 12px;
  }

  .section {
    padding: 14px 0;
  }

  .card, .display-wrap, .btn, .input-group input, .input-group select, .checkbox-row {
    border-radius: 14px;
  }

  .quick-timer {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .text-content {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* refinamentos de interface */
.meta-note{font-size:.925rem;color:var(--muted);line-height:1.5}.footer-links{display:flex;gap:1rem;flex-wrap:wrap;margin-top:.75rem}.footer-links a{color:inherit}.seo-links{display:flex;gap:.75rem;flex-wrap:wrap}.seo-links a{font-weight:700}.qa-list{display:grid;gap:.75rem}.qa-list label{display:flex;gap:.6rem;align-items:flex-start}.qa-list input{margin-top:.25rem}.compact-text{max-width:780px}.hidden{display:none!important}
@media (max-width:480px){.brand span{display:none}.hero h1{font-size:clamp(2rem,12vw,3rem)}.nav{gap:.4rem}.nav a,.nav button{padding:.65rem .75rem}.footer-links{display:grid}}


/* polimento competitivo */
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
}
.hero-actions .btn { min-width: 190px; }
.home-focus {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: stretch;
}
.home-panel {
  padding: clamp(20px, 4vw, 34px);
}
.home-panel h2 {
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.045em;
  font-size: clamp(1.55rem, 4vw, 2.5rem);
}
.home-panel p { margin: 0; color: var(--muted); line-height: 1.65; }
.home-panel .quick-timer { margin-top: 18px; }
.feature-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.feature-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface);
}
.feature-item strong { display: block; color: var(--text); margin-bottom: 4px; }
.feature-item span { color: var(--muted); line-height: 1.45; }
.intent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.intent-links a {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 10px 13px;
  font-weight: 850;
  color: var(--text);
}
.intent-links a:hover { border-color: var(--primary); }
.mobile-sticky-cta {
  display: none;
}
.status-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1.55;
}
.status-card strong { color: var(--text); }
.copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.copy-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 16px;
  line-height: 1.55;
}
.copy-card strong { display:block; color:var(--text); margin-bottom:6px; }
.copy-card span { color:var(--muted); }
@media (max-width: 860px) {
  .home-focus { grid-template-columns: 1fr; }
  .copy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { min-width: 0; }
  .mobile-sticky-cta {
    display: grid;
    position: sticky;
    bottom: 10px;
    z-index: 15;
    width: min(100% - 20px, var(--max));
    margin: 0 auto 12px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mobile-sticky-cta .btn { min-height: 48px; box-shadow: var(--shadow); }
}


/* SEO, mobile e utilidades */
.faq-block details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 14px 16px;
  margin-top: 10px;
}
.faq-block summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--text);
}
.faq-block details p {
  margin: 10px 0 0;
}
.nav a.active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}
[data-copy-link], [data-copy-time] { white-space: nowrap; }
@media (max-width: 620px) {
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .controls-row { grid-template-columns: 1fr; }
  .faq-block details { padding: 13px; }
}


/* páginas por intenção e usabilidade */
.intent-pages p { color: var(--muted); line-height: 1.7; }
.tool-note strong { color: var(--text); }
@media (max-width: 420px) {
  .time-display { font-size: clamp(3rem, 20vw, 5.3rem); }
  .brand span { display: none; }
  .nav { gap: 6px; }
  .nav a, .nav button { padding: 8px 9px; }
}
@supports (height: 100dvh) {
  body.is-fullscreen .display-wrap { min-height: 100dvh; }
}


/* consentimento e publicação */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.consent-banner strong { display: block; margin-bottom: 4px; }
.consent-banner span { color: var(--muted); line-height: 1.45; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.release-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.release-card { padding: 18px; }
.release-card strong { display: block; margin-bottom: 6px; }
.release-card span { color: var(--muted); line-height: 1.45; }
.interval-progress { width: 100%; accent-color: var(--primary); height: 14px; }
.workout-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
@media (max-width: 720px) {
  .consent-banner { align-items: stretch; flex-direction: column; }
  .consent-actions { justify-content: stretch; }
  .consent-actions .btn { width: 100%; }
  .release-grid { grid-template-columns: 1fr; }
}


/* v11 audit cleanup */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 3px; }
.ad-slot { min-height: 0; }
@media print {
  .site-header, .mobile-sticky-cta, .consent-banner, .ad-slot, .fullscreen-controls { display: none !important; }
  body { background: #fff; color: #111; }
  .card { box-shadow: none; }
}


/* Hotfix v15: contraste reforçado para Lighthouse */
.copy-card span,
.faq-block details p,
.text-content p,
details p {
  color: var(--muted);
}

/* v18: correção de vazamento horizontal no mobile */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

main,
.section,
.container,
.card,
.tool-card,
.tool-shell,
.display-wrap,
.quick-timer,
.grid,
.presets,
.inputs-row,
.controls-row,
.settings-grid {
  min-width: 0;
  max-width: 100%;
}

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

.btn,
.preset-btn,
.input-group input,
.input-group select,
.checkbox-row,
.nav a,
.nav button {
  min-width: 0;
}

@supports not (overflow-x: clip) {
  html,
  body { overflow-x: hidden; }
}

/* v19 hotfix: respiro no menu superior mobile */
@media (max-width: 860px) {
  .site-header {
    overflow-x: clip;
  }

  .header-inner {
    gap: 12px;
    padding: 14px 0 16px;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 10px;
    margin: 0 -2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .nav a,
  .nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    padding: 10px 14px;
    line-height: 1.1;
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .nav {
    gap: 9px;
    padding-bottom: 11px;
  }

  .nav a,
  .nav button {
    padding: 10px 13px;
    font-size: .93rem;
  }
}

/* v22: footer community link */
.site-footer .footer-links a[target="_blank"] {
  font-weight: 700;
}
