/* Static guide pages — same "room at night" look as the 3D simulator */
:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #131d35;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #e2e8f0;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(251, 191, 36, 0.12);
  --sky: #7dd3fc;
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  font: 400 16px/1.65 var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(251, 191, 36, 0.13), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100vh;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #fde68a; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img, svg { max-width: 100%; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--accent); color: #111; border-radius: 8px; }
.skip:focus { left: 16px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand__icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #020617;
  box-shadow: 0 6px 18px -6px rgba(251, 191, 36, 0.6);
}
.brand__icon svg { width: 19px; height: 19px; }
.brand__name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand__name span { font-size: 10px; font-weight: 600; padding: 1px 5px; margin-left: 4px; border-radius: 4px; color: #fcd34d; background: rgba(251, 191, 36, 0.18); border: 1px solid rgba(251, 191, 36, 0.3); vertical-align: 2px; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current='page'] { color: #fff; background: var(--surface); }
.lang { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; flex: none; }
.lang a { padding: 3px 7px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: 7px; }
.lang a:hover { color: #fff; }
.lang a[aria-current='true'] { color: #020617; background: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 0;
  font: 600 14px/1.2 var(--font); text-decoration: none; cursor: pointer;
  color: #020617; background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 8px 24px -10px rgba(251, 191, 36, 0.7);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { color: #020617; transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(251, 191, 36, 0.85); }
.btn svg { width: 16px; height: 16px; }
.btn--header { padding: 8px 12px; font-size: 13px; flex: none; }

@media (max-width: 900px) {
  .site-header__inner { flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; width: 100%; margin: 0 -4px; }
  .lang { margin-left: auto; }
}
@media (max-width: 480px) {
  .btn--header span { display: none; }
  .btn--header { padding: 8px 10px; }
}

/* ---- Main ---- */
main { max-width: 780px; margin: 0 auto; padding: 24px 16px 48px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
h1 { margin: 0 0 14px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; color: #fff; text-wrap: balance; }
h2 { margin: 44px 0 14px; font-size: clamp(21px, 3.2vw, 26px); line-height: 1.25; letter-spacing: -0.01em; color: #fff; text-wrap: balance; }
h3 { margin: 24px 0 8px; font-size: 18px; color: #fff; }
p, ul, ol { margin: 0 0 14px; color: var(--text-soft); }
li { margin-bottom: 6px; }
strong { color: #fff; font-weight: 600; }
.lead { font-size: 18px; color: var(--text-soft); }
.updated { margin: -4px 0 22px; font-size: 13px; color: var(--muted); }

.answer {
  position: relative; margin: 24px 0 8px; padding: 18px 20px 18px 22px;
  border-radius: var(--radius); background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.6) 60%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 18px 40px -24px rgba(251, 191, 36, 0.55);
}
.answer__label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.answer p { margin: 0; color: var(--text); font-size: 17px; }

.toc { margin: 22px 0 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.toc strong { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }
.toc a { color: var(--text-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: rgba(2, 6, 23, 0.4); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td strong { color: var(--accent); }
tbody tr:hover td { background: rgba(51, 65, 85, 0.18); }
td a { font-weight: 600; }
.table-wrap small { color: var(--muted); }
@media (max-width: 600px) {
  table { font-size: 14px; }
  th, td { padding: 9px 10px; }
  thead th { white-space: normal; font-size: 11px; letter-spacing: 0.02em; }
  td.num { white-space: normal; }
}
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--k); box-shadow: 0 0 10px var(--k); vertical-align: -1px; }

.formula {
  padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border-strong);
  font: 600 15px/1.5 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; color: #fde68a; overflow-x: auto;
}

/* Calculator */
.calc { margin: 18px 0; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8); }
.calc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.calc__field { display: grid; gap: 5px; min-width: 0; }
.calc__field--wide { grid-column: 1 / -1; }
.calc label, .calc legend { font-size: 13px; font-weight: 600; color: var(--muted); }
.calc input, .calc select {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px;
  font: 500 16px/1.2 var(--font); color: #fff;
  background: var(--bg); border: 1px solid var(--border-strong);
}
.calc input:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.calc fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc__walls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.calc__walls label {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 8px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg); color: var(--text-soft); font-size: 14px;
}
.calc__walls input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc__walls label:has(input:checked) { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.calc__walls label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc__walls i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.25); flex: none; }
.calc__out { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calc__stat { padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.calc__stat span { display: block; font-size: 12px; color: var(--muted); }
.calc__stat b { display: block; margin-top: 2px; font-size: 22px; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc__stat--main { border-color: rgba(251, 191, 36, 0.45); background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), var(--bg)); }
.calc__stat--main b { color: var(--accent); font-size: 26px; }
.calc__stat small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.calc__bulbs { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--text-soft); }
.calc__try { grid-column: 1 / -1; justify-self: start; }
.calc noscript p { margin: 12px 0 0; color: var(--muted); }
@media (max-width: 600px) {
  .calc { padding: 16px; }
  .calc__out { grid-template-columns: 1fr 1fr; }
  .calc__stat--main { grid-column: 1 / -1; }
}

.care { margin: 36px 0 0; padding: 18px 20px; border-radius: var(--radius); background: rgba(56, 189, 248, 0.06); border: 1px solid rgba(125, 211, 252, 0.28); }
.care h2 { margin-top: 0; font-size: 20px; color: var(--sky); }
.care ul { margin-bottom: 0; }
.sources { font-size: 14px; color: var(--muted); }
.refs { font-size: 14px; padding-left: 22px; }
.refs li { margin-bottom: 10px; }
.refs small { color: var(--muted); }

.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.faq summary { padding: 14px 18px; cursor: pointer; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 14px; margin: 0; }

.cta {
  margin: 44px 0 0; padding: 24px; border-radius: 20px; text-align: center;
  background: radial-gradient(400px 160px at 50% 0%, rgba(251, 191, 36, 0.18), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
}
.cta h2 { margin: 0 0 8px; }
.cta p { max-width: 520px; margin: 0 auto 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.cards a {
  display: block; height: 100%; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 15px;
}
.cards a:hover { border-color: rgba(251, 191, 36, 0.5); color: #fff; }
.cards small { display: block; margin-top: 2px; font-weight: 400; font-size: 13px; color: var(--muted); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: rgba(2, 6, 23, 0.6); }
.site-footer__inner { max-width: 1080px; margin: 0 auto; padding: 28px 16px 24px; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 24px; font-size: 14px; position: relative; }
.site-footer h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 4px; }
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { color: var(--muted); font-size: 14px; }
.site-footer .credit { align-self: end; }
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; }
  .site-footer .credit { grid-column: 1 / -1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Author credit (versão compacta) — vestido no tema "cômodo à noite" ---- */
.credit {
  --credit-card-bg: rgba(15, 23, 42, 0.96);               /* slate-900, vidro escuro */
  --credit-card-fg: #e2e8f0;                              /* slate-200 */
  --credit-card-border: 1px solid rgba(51, 65, 85, 0.9);  /* slate-700 */
  --credit-card-shadow: 0 20px 50px rgba(2, 6, 23, 0.7);
  --credit-card-radius: 14px;
  --credit-hover-bg: rgba(51, 65, 85, 0.55);
  --credit-muted: #94a3b8;                                /* slate-400 */
  --credit-accent: #fbbf24;                               /* amber-400 */
  --credit-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --credit-font-hand: 'Caveat', cursive;
  --credit-pen: #fcd34d;
  --credit-bulb: #fbbf24;
  --credit-bulb-hot: #fef3c7;
  --credit-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --credit-z: 60;

  position: relative;
  display: flex;
  align-items: center;
}

/* Só a cabecinha */
.credit__toggle {
  display: grid; place-items: center; padding: 2px; margin: 0;
  background: none; border: 0; border-radius: 999px; cursor: pointer;
}
.credit__head {
  width: 30px; height: auto; opacity: 0.9; transform-origin: 50% 90%;
  transition: opacity 0.2s;
}
.credit__toggle:hover .credit__head,
.credit__toggle[aria-expanded='true'] .credit__head {
  opacity: 1; animation: credit-nod 0.6s ease-in-out infinite alternate;
}
@keyframes credit-nod {
  from { transform: rotate(-6deg); }
  to { transform: rotate(5deg) translateY(-1px); }
}

.credit__toggle:focus-visible,
.credit__menu a:focus-visible,
.credit__insp:focus-visible,
.inspiration__back:focus-visible { outline: 2px solid var(--credit-accent); outline-offset: 2px; }

/* Cartões (menu e nota) abrem acima da cabeça */
.credit__card,
.inspiration__note {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: var(--credit-z);
  color: var(--credit-card-fg); background: var(--credit-card-bg);
  border: var(--credit-card-border); border-radius: var(--credit-card-radius);
  box-shadow: var(--credit-card-shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform-origin: 90% 100%;
  animation: credit-pop 0.2s var(--credit-ease);
}
.credit__card[hidden],
.inspiration__note[hidden] { display: none; }
@keyframes credit-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.95); }
  to { opacity: 1; transform: none; }
}

.credit__card { min-width: 180px; padding: 10px 6px 6px; }
.credit__by {
  display: block; padding: 0 10px 8px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  font-family: var(--credit-font-mono); font-size: 10.5px; letter-spacing: 0.05em;
  white-space: nowrap; color: var(--credit-muted);
}
.credit__menu { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.credit__menu a,
.credit__insp {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px;
  font: 500 13px/1.2 'Inter', system-ui, sans-serif; color: inherit; text-align: left;
  text-decoration: none; background: none; border: 0; border-radius: 8px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.credit__menu a:hover,
.credit__menu a:focus-visible,
.credit__insp:hover,
.credit__insp:focus-visible { background: var(--credit-hover-bg); color: #fff; }
.credit__menu a svg { width: 16px; height: 16px; flex: none; fill: currentColor; transition: fill 0.15s; }
.credit__menu a:hover svg,
.credit__menu a:focus-visible svg { fill: var(--credit-accent); }

/* Lâmpada sempre acesa, respirando; brilha forte no hover */
.inspiration__bulb { width: 16px; height: 16px; flex: none; overflow: visible; transition: transform 0.3s var(--credit-ease); }
.inspiration__bulb path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inspiration__bulb .bulb-glass {
  fill: var(--credit-bulb); stroke: var(--credit-bulb);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--credit-bulb) 75%, transparent));
  animation: bulb-breathe 2.8s ease-in-out infinite;
}
@keyframes bulb-breathe { 50% { filter: drop-shadow(0 0 8px var(--credit-bulb)); } }
.credit__insp:hover,
.credit__insp:focus-visible { color: var(--credit-bulb-hot); text-shadow: 0 0 8px color-mix(in srgb, var(--credit-bulb) 70%, transparent); }
.credit__insp:hover .inspiration__bulb,
.credit__insp:focus-visible .inspiration__bulb { transform: scale(1.2) rotate(-8deg); }
.credit__insp:hover .bulb-glass,
.credit__insp:focus-visible .bulb-glass {
  fill: var(--credit-bulb-hot); stroke: var(--credit-bulb-hot); animation: none;
  filter: drop-shadow(0 0 5px var(--credit-bulb-hot)) drop-shadow(0 0 14px var(--credit-bulb));
}

/* Nota da inspiração: "iluminada" pela lâmpada */
.inspiration__note {
  width: min(360px, calc(100vw - 32px)); padding: 16px 18px 12px;
  background:
    radial-gradient(120% 70% at 85% 115%, rgba(251, 191, 36, 0.14), transparent 60%),
    var(--credit-card-bg);
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow: var(--credit-card-shadow), 0 10px 36px -12px rgba(251, 191, 36, 0.25);
}
.inspiration__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.inspiration__eyebrow {
  font-family: var(--credit-font-mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--credit-accent);
}
.inspiration__back {
  padding: 2px 6px; font-family: var(--credit-font-mono); font-size: 10.5px; color: var(--credit-muted);
  background: none; border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.inspiration__back:hover { color: #fff; }
.inspiration__note p { margin: 0 0 8px; font-size: 13px; line-height: 1.55; color: #cbd5e1; }
.inspiration__sign {
  display: block; text-align: right; font-family: var(--credit-font-hand); font-weight: 600;
  font-size: 26px; line-height: 1; color: var(--credit-pen);
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

/* Celular/tablet: a nota vira painel fixo embaixo da tela */
@media (max-width: 900px) {
  .inspiration__note {
    position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    width: auto; max-width: 520px; max-height: calc(100dvh - 110px); margin-inline: auto; overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .credit__toggle .credit__head { animation: none !important; }
  .inspiration__bulb .bulb-glass, .credit__card, .inspiration__note { animation: none; }
}
