@import url("../shared/ep-como-usar.css");
:root {
  color-scheme: light;
  --navy: #111816;
  --navy-soft: #26332f;
  --blue: #087f5b;
  --chart-blue: #191f1d;
  --chart-blue-dark: #16a476;
  --chart-blue-light: #8ed7bf;
  --chart-orange: #087f5b;
  --chart-orange-light: #a8e3cf;
  --ink: #24302c;
  /* Texto secundário sobre fundo CLARO. 4,55:1 contra o branco, que é o piso
   * da WCAG AA para texto abaixo de 18,7 px — e todo uso deste token é de 10 a
   * 12 px. Já esteve em #65736e (3,06:1) e, por uma correção que ignorou o
   * contexto, em #848f8b (3,34:1): clarear resolveu o único uso sobre fundo
   * escuro e piorou as dezenas sobre fundo claro. O fundo escuro passou a ter
   * token próprio, `--muted-escuro`. */
  --muted: #677971;
  /* Texto secundário sobre fundo ESCURO — a faixa de saídas e os cartões de
   * resultado. Clareado, e não escurecido: a direção da correção vem de
   * comparar a luminância do texto com a do fundo. 4,55:1 sobre #0b2b21. */
  --muted-escuro: #848f8b;
  --line: #d8e1dd;
  --surface: #ffffff;
  --background: #f3f6f8;
  --warning-bg: #fff6e8;
  --warning: #88520a;
  --shadow: 0 16px 44px rgb(17 24 22 / 9%);
  font-family: var(--ep-fonte);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font-weight: 400; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px max(24px, calc((100vw - 1420px) / 2));
  border-bottom: 1px solid var(--line);
  background: white;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
/* O simbolo EP em SVG. O azulejo com "EP" escrito saiu daqui; o porque
   esta em app/components/marca.tsx. */
.brand-mark {
  display: block;
  width: auto;
  height: 38px;
  background: none;
  border-radius: 0;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; font-weight: 650; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.prototype-badge {
  padding: 6px 10px;
  border: 1px solid #b9d9ce;
  border-radius: 999px;
  background: #eef8f4;
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding: 54px max(24px, calc((100vw - 1420px) / 2)) 66px;
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px),
    radial-gradient(circle at 88% 10%, rgb(22 164 118 / 24%), transparent 27%),
    linear-gradient(122deg, #0b100f, #19352c);
  background-size: 36px 36px, 36px 36px, auto, auto;
  color: white;
}
.eyebrow { margin: 0 0 11px; color: #79d0b2; font-size: 10px; font-weight: 650; letter-spacing: .15em; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(35px, 4.8vw, 62px); font-weight: 600; line-height: 1.02; letter-spacing: -.04em; }
.hero > div > p:not(.eyebrow) { max-width: 700px; margin: 19px 0 0; color: #d0ddd8; font-size: 17px; line-height: 1.55; }
.method-summary { display: grid; grid-template-columns: repeat(2, 190px); border: 1px solid rgb(255 255 255 / 15%); border-radius: 14px; overflow: hidden; }
.method-summary > div { display: flex; gap: 12px; padding: 17px; background: rgb(255 255 255 / 7%); }
.method-summary > div + div { border-left: 1px solid rgb(255 255 255 / 15%); }
.method-summary span { color: #79d0b2; font-size: 10px; }
.method-summary p { margin: 0; color: #c4d3ce; font-size: 11px; line-height: 1.45; }
.method-summary strong { display: block; margin-bottom: 2px; color: white; font-size: 13px; font-weight: 550; }

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  gap: 24px;
  width: min(1420px, calc(100% - 48px));
  margin: -30px auto 60px;
}
.input-panel, .results-panel { border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.input-panel { align-self: start; border-top: 4px solid var(--navy); }
.results-panel { border-top: 4px solid var(--chart-blue); }
.input-panel form, .results-panel { padding: 25px; }
.panel-heading, .results-heading, .chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
h2, h3 { margin: 0; color: var(--navy); font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
.panel-heading p, .results-heading p, .chart-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 550; white-space: nowrap; }

fieldset { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
legend { width: 100%; padding: 0 0 9px; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.field-help { margin: 10px 0 4px; color: var(--muted); font-family: Georgia, serif; font-size: 13px; }
label { display: block; min-width: 0; margin-top: 12px; color: #394a44; font-size: 11px; font-weight: 550; }
input, select {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid #c8d4dd;
  border-radius: 8px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
}

/* Checkbox e radio NÃO são campo de texto, e a regra acima os transformava em
 * lajotas de 42 px de altura por 100 % de largura. Cada produto que reparou
 * aplicou o próprio remendo local — `.canvas-rodape input[type=checkbox]` em
 * quatro produtos de rede, `.editor-table` em vigas —, e por isso o defeito
 * seguiu vivo em todos os outros: 35 caixas em 20 produtos. */
input[type="checkbox"], input[type="radio"] {
  display: inline-block; width: 15px; height: 15px; min-width: 15px; flex: 0 0 auto;
  margin: 0; padding: 0; vertical-align: middle; accent-color: #0e6b4f; cursor: pointer;
}
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { cursor: pointer; }
select { appearance: auto; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(8 127 91 / 12%); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.input-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-top: 6px; border: 1px solid #c8d4dd; border-radius: 8px; overflow: hidden; }
.input-with-unit:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(8 127 91 / 12%); }
.input-with-unit input { min-width: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.input-with-unit span { padding: 0 10px; color: var(--muted); font-size: 10px; font-weight: 500; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 9px; font-size: 12px; font-weight: 600; }
.primary-button { width: 100%; margin-top: 22px; border: 0; background: var(--blue); color: white; }
.primary-button:hover { background: #066b4c; }
.secondary-button { padding: 0 14px; border: 1px solid #b9cbc5; background: white; color: var(--navy); white-space: nowrap; }
.secondary-button:hover { background: #f3f7fa; }
.form-errors { margin-top: 18px; padding: 12px 14px; border-left: 3px solid #b42a2a; border-radius: 5px; background: #fff1f1; color: #862222; font-size: 11px; line-height: 1.5; }
.form-errors ul { margin: 5px 0 0; padding-left: 17px; }

.results-panel { min-width: 0; }
.results-heading { margin-bottom: 20px; }
.method-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; padding: 5px; border-radius: 11px; background: #e9efec; }
.method-tabs button { position: relative; padding: 12px 15px 12px 19px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; }
.method-tabs button::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 8px; width: 3px; border-radius: 4px; background: transparent; }
.method-tabs button[aria-selected="true"] { background: var(--navy); color: white; box-shadow: 0 4px 13px rgb(17 24 22 / 20%); }
.method-tabs button[aria-selected="true"]::before { background: var(--chart-blue-light); }
.method-tabs span, .method-tabs small { display: block; }
.method-tabs span { font-size: 13px; font-weight: 600; }
.method-tabs small { margin-top: 3px; font-size: 10px; font-weight: 400; }
.result-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; border-radius: 12px; background: var(--navy); }
.result-card { min-width: 0; padding: 18px 20px; border: 0; border-right: 1px solid rgb(255 255 255 / 14%); border-radius: 0; background: transparent; }
.result-card:last-child { border-right: 0; }
.result-card.featured { background: rgb(22 164 118 / 13%); }
.result-card > span { display: block; color: #a9bdcc; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; }
.result-card strong { display: block; margin-top: 11px; color: white; font-size: clamp(27px, 3vw, 38px); font-weight: 550; letter-spacing: -.04em; white-space: nowrap; }
.result-card.featured strong { color: #67d5af; }
.result-card strong small { margin-left: 4px; color: #b9cbd8; font-size: 11px; font-weight: 400; letter-spacing: 0; }
/* Nota do cartão. O padrão só previa rótulo, valor e unidade; quem acrescentou
 * uma linha de explicação herdava a tinta quase preta do corpo da página, e ela
 * ficava com contraste 1,5 sobre o cartão escuro — ilegível, e do tipo que não
 * salta numa captura. Medido: #93a8a4 sobre #111816 dá 6,4. */
.result-card > small {
  display: block; margin-top: 7px; color: #93a8a4;
  font-size: 11.5px; line-height: 1.45; letter-spacing: 0; font-weight: 400;
}
.result-card .time-result { font-size: clamp(18px, 2.3vw, 26px); }

.chart-card { position: relative; margin-top: 13px; padding: 22px; border: 1px solid #ccd8d3; border-radius: 12px; background: white; box-shadow: inset 0 4px 0 var(--chart-blue-dark); }
.chart-heading { align-items: center; }
.chart-heading h3, .chart-heading p { font-family: var(--ep-fonte); font-weight: 300; }
.chart-heading h3 { letter-spacing: -.01em; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: #4c5d57; font-family: var(--ep-fonte); font-size: 12.5px; font-weight: 300; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { display: inline-block; flex: 0 0 auto; }
.bar-swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--chart-blue); }
.line-swatch { position: relative; width: 16px; height: 2px; background: var(--chart-orange); }
.line-swatch::after { content: ""; position: absolute; left: 6px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--chart-orange); }
.chart { min-height: 360px; margin-top: 15px; font-family: var(--ep-fonte); font-synthesis: none; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-plot-bg { fill: #fbfcfc; }
.chart-grid { stroke: #d8e1dd; stroke-width: 1.15; stroke-dasharray: 3 5; }
.chart-axis { stroke: var(--chart-blue); stroke-width: 1.8; }
.chart-label { fill: #52605b; font-family: var(--ep-fonte); font-size: 14px; font-weight: 300; }
.chart-title-label { fill: #151b19; font-family: var(--ep-fonte); font-size: 14.5px; font-weight: 700; }
.cumulative-area { fill: var(--chart-blue-dark); opacity: .055; }
.peak-band { fill: var(--chart-blue-dark); opacity: .045; }
.peak-guide { stroke: var(--chart-blue-dark); stroke-width: 1.4; stroke-dasharray: 4 5; opacity: .8; }
.rain-bar { fill: var(--chart-blue); }
.rain-bar.peak { fill: var(--chart-blue-dark); }
.cumulative-line { fill: none; stroke: var(--chart-orange); stroke-width: 3.8; stroke-linecap: round; stroke-linejoin: round; }
.cumulative-point { fill: white; stroke: var(--chart-orange); stroke-width: 2.4; }
.peak-badge { fill: var(--chart-blue-dark); }
.peak-label { fill: white; font-family: var(--ep-fonte); font-size: 10.5px; font-weight: 700; letter-spacing: .09em; }

.method-note { margin-top: 12px; padding: 14px 16px; border-left: 4px solid var(--chart-blue-dark); background: #edf7f3; color: #334b43; font-size: 11.5px; line-height: 1.6; }
.method-note strong { color: var(--navy); font-weight: 600; }
.warning { display: flex; gap: 10px; margin-top: 10px; padding: 13px 15px; border: 1px solid #eed3a1; border-radius: 9px; background: var(--warning-bg); color: var(--warning); font-size: 10.5px; line-height: 1.5; }
.warning[hidden] { display: none; }
.warning > span { display: grid; place-items: center; flex: 0 0 21px; width: 21px; height: 21px; border-radius: 50%; background: #f3d492; font-weight: 650; }
.warning p { margin: 1px 0 0; }

.calculation-memory { margin-top: 14px; padding: 20px; border: 1px solid #cbd8e0; border-radius: 12px; background: #f4f7f8; }
.memory-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; }
.memory-toolbar h3 { margin-top: 3px; font-size: 20px; }
.memory-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.memory-eyebrow { color: var(--chart-blue); font-size: 9px; font-weight: 600; letter-spacing: .14em; }
.memory-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.memory-actions .primary-button { width: auto; margin: 0; padding: 0 15px; }
.word-personalization { margin-bottom: 14px; overflow: hidden; border: 1px solid #bfcfc9; border-radius: 10px; background: white; }
.word-personalization summary { position: relative; padding: 15px 44px 15px 16px; color: var(--navy); font-size: 12px; font-weight: 600; }
.word-personalization summary::after { content: "+"; position: absolute; top: 12px; right: 16px; color: var(--blue); font-size: 18px; font-weight: 400; }
.word-personalization[open] summary::after { content: "−"; }
.word-personalization summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; font-weight: 400; }
.personalization-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-top: 1px solid #e2e8e5; background: #f1f8f5; }
.personalization-intro p { margin: 0; color: #3b5149; font-size: 10.5px; line-height: 1.5; }
.personalization-intro span { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #b8ddd0; border-radius: 999px; background: white; color: var(--blue); font-size: 9px; font-weight: 600; }
.personalization-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 2px 16px 16px; }
.personalization-section-title { grid-column: 1 / -1; margin: 16px 0 0; padding-bottom: 7px; border-bottom: 1px solid #e2e8e5; color: var(--navy); font-size: 9px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.registration-field, .logo-customization { grid-column: 1 / -1; }
.logo-customization { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: stretch; margin-top: 12px; padding: 14px; border: 1px solid #d5e0dc; border-radius: 9px; background: #fbfcfc; }
.logo-preview { display: flex; min-height: 112px; padding: 14px; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #afc6bd; border-radius: 8px; background: white; color: var(--navy); text-align: center; }
.logo-preview span { color: var(--chart-blue-dark); font-size: 31px; font-weight: 700; letter-spacing: -.05em; }
.logo-preview small { margin-top: 1px; color: var(--navy); font-size: 7px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.logo-preview img { display: block; max-width: 100%; max-height: 86px; object-fit: contain; }
.logo-controls > strong { color: var(--navy); font-size: 12px; font-weight: 600; }
.logo-controls > p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 10px; }
.logo-upload { display: inline-flex; min-height: 36px; margin: 0; padding: 0 12px; align-items: center; border-radius: 8px; background: var(--navy); color: white; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.logo-upload:hover { background: #26332f; }
.logo-upload input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.logo-actions .text-button { font-size: 10px; }
#logo-file-name { display: block; margin-top: 8px; color: #53635e; font-size: 9.5px; overflow-wrap: anywhere; }
.logo-spec { margin-top: 9px !important; padding-top: 8px; border-top: 1px solid #e4ebe8; }
.logo-spec strong { color: var(--ink); font-weight: 600; }
.logo-spec code { color: var(--blue); font-family: inherit; font-weight: 600; }
.personalization-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-top: 1px solid #dce5e1; background: #f7f9f8; }
.word-help { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.personalization-footer .word-button { width: auto; min-width: 235px; margin: 0; padding-inline: 16px; }
.memory-sheet { overflow: hidden; border: 1px solid #c7d3cf; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgb(17 24 22 / 7%); }
.memory-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; background: var(--navy); color: white; }
.memory-sheet-header span { color: #79d0b2; font-size: 8px; font-weight: 550; letter-spacing: .15em; }
.memory-sheet-header h4 { margin: 3px 0 0; font-size: 18px; font-weight: 500; }
.memory-sheet-header b { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(255 255 255 / 30%); border-radius: 50%; color: #79d0b2; font-size: 13px; font-weight: 600; }
.memory-section { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 12px; padding: 18px 20px; border-bottom: 1px solid #dce4e9; }
.memory-section:last-child { border-bottom: 0; }
.memory-index { color: var(--chart-blue); font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.memory-section h4 { margin: 0 0 11px; color: var(--navy); font-size: 14px; font-weight: 600; }
.memory-section p { margin: 10px 0 0; color: #4d6070; font-size: 10.5px; line-height: 1.6; }
.memory-section strong { color: var(--ink); font-weight: 600; }
.memory-section a { color: var(--blue); }
.memory-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid #dce4e9; border-radius: 6px; background: #dce4e9; }
.memory-inputs > div { min-width: 0; padding: 10px 12px; background: #fbfcfd; }
.memory-inputs > div:last-child { grid-column: 1 / -1; }
.memory-inputs dt { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.memory-inputs dd { margin: 4px 0 0; color: var(--ink); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.memory-equation { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 7px; }
.memory-equation > span { padding-top: 7px; color: var(--muted); font-size: 9px; }
.memory-equation code { display: block; margin-bottom: 4px; padding: 7px 10px; border-left: 2px solid var(--chart-blue-light); background: #f1f5f3; color: #263832; font-family: var(--ep-fonte); font-size: 10px; line-height: 1.5; white-space: normal; }
.memory-table-wrap { max-height: 280px; margin-top: 12px; overflow: auto; border: 1px solid #d8e1e7; border-radius: 6px; }
.memory-table th, .memory-table td { padding: 7px 9px; font-size: 9px; }
.memory-result { padding: 10px 12px; border-left: 3px solid var(--chart-blue-dark); background: #edf8f4; color: #154638 !important; font-size: 11px !important; }

.data-table, .about-methods { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: white; overflow: hidden; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.data-table summary, .about-methods summary { position: relative; padding: 15px 42px 15px 16px; color: var(--navy); font-size: 12px; font-weight: 600; }
.data-table summary::after, .about-methods summary::after { content: "+"; position: absolute; top: 12px; right: 16px; color: var(--blue); font-size: 18px; font-weight: 400; }
.data-table[open] summary::after, .about-methods[open] summary::after { content: "−"; }
.data-table summary small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 400; }
.table-wrap { max-height: 330px; overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; margin-inline: auto; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 13px; border-bottom: 1px solid #e5ebef; text-align: center; font-weight: 400; }
th { position: sticky; top: 0; background: #eef3f6; color: var(--navy); font-size: 9px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tr.peak-row td { background: #ecf8f3; color: #096a4d; font-weight: 550; }
.about-methods > div { padding: 0 16px 14px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.about-methods p { margin: 8px 0 0; }
.about-methods strong { color: var(--ink); font-weight: 600; }
.about-methods a { color: var(--blue); }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px max(24px, calc((100vw - 1420px) / 2)); border-top: 1px solid var(--line); background: white; color: var(--muted); font-size: 10px; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 25px; padding-inline: max(24px, calc((100vw - 820px) / 2)); }
  .method-summary { justify-self: start; }
  .workspace { grid-template-columns: 1fr; width: min(820px, calc(100% - 32px)); }
}

@media (max-width: 680px) {
  .site-header { min-height: 66px; padding-inline: 16px; }
  .prototype-badge, .brand small { display: none; }
  .hero { padding: 40px 18px 57px; }
  .hero h1 { font-size: 39px; }
  .hero > div > p:not(.eyebrow) { font-size: 15px; }
  .method-summary { grid-template-columns: 1fr; width: 100%; }
  .method-summary > div + div { border-top: 1px solid rgb(255 255 255 / 15%); border-left: 0; }
  .workspace { width: calc(100% - 20px); margin-top: -24px; }
  .input-panel form, .results-panel { padding: 18px; }
  .results-heading { display: block; }
  .results-heading .secondary-button { margin-top: 13px; }
  .result-cards { grid-template-columns: 1fr 1fr; }
  .result-card:first-child { grid-column: 1 / -1; }
  .chart-heading { display: block; }
  .chart-legend { justify-content: flex-start; margin-top: 11px; }
  .chart { min-height: 290px; }
  .calculation-memory { padding: 14px; }
  .memory-toolbar { display: block; }
  .memory-actions { justify-content: flex-start; margin-top: 12px; }
  .memory-section { grid-template-columns: 28px minmax(0, 1fr); padding: 15px; }
  .memory-inputs { grid-template-columns: 1fr; }
  .memory-inputs > div:last-child { grid-column: auto; }
  .memory-equation { grid-template-columns: 1fr; gap: 2px; }
  .memory-equation > span { padding-top: 2px; }
  .personalization-grid { grid-template-columns: 1fr; }
  .personalization-intro, .personalization-footer { align-items: flex-start; flex-direction: column; }
  .logo-customization { grid-template-columns: 1fr; }
  .personalization-footer .word-button { width: 100%; min-width: 0; }
}

@media (max-width: 430px) {
  .field-grid, .four-columns { grid-template-columns: 1fr 1fr; }
  .panel-heading { display: block; }
  .panel-heading .text-button { margin-top: 8px; }
  .method-tabs { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
  .result-card:first-child { grid-column: auto; }
  .result-card { border-right: 0; border-bottom: 1px solid rgb(255 255 255 / 14%); }
  .result-card:last-child { border-bottom: 0; }
  footer { display: block; }
  footer span { display: block; margin: 4px 0; }
}

/* --- Infiltração: escoamento, figuras do método e memória ------------------ */
.runoff-swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--chart-blue-light); border: 1px solid var(--chart-blue-dark); }
.runoff-bar { fill: var(--chart-blue-light); stroke: var(--chart-blue-dark); stroke-width: .6; }
.chart-axis { stroke: var(--line); stroke-width: 1.2; }
.chart-axis-title { fill: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.method-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 22px; margin: 14px 0 0; }
.method-figures div { display: flex; flex-direction: column; gap: 2px; }
.method-figures dt { color: var(--muted); font-size: .82rem; }
.method-figures dd { margin: 0; font-weight: 500; color: var(--ink); }

tbody tr.is-selected { background: color-mix(in srgb, var(--chart-orange) 8%, transparent); }
tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--chart-orange); }

.memory-text { margin: 0; padding: 20px 22px; background: var(--navy); color: #eef4f1; border-radius: 12px; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.62; white-space: pre-wrap; overflow-x: auto; }

.about-methods section { padding: 12px 0; border-top: 1px solid var(--line); }
.about-methods section:first-child { border-top: 0; }
.about-methods code { background: var(--background); padding: 2px 6px; border-radius: 4px; font-size: .86rem; }
.about-methods .reference { color: var(--muted); font-size: .82rem; }

/* --- Tempo de concentração: comparação entre métodos ---------------------- */
.chart-row-label { font-size: 12px; fill: var(--ink); }
.chart-value-label { font-size: 11px; fill: var(--muted); }
.method-summary { flex-wrap: wrap; }
.ep-status-ok { color: var(--chart-orange); font-weight: 600; display: block; }
.ep-status-out { color: var(--warning); font-weight: 600; display: block; }
tbody td small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.45; }

/* ------------------------------------------------------------------ */
/* Técnicas compensatórias — área de trabalho, canvas e verificações   */
/* ------------------------------------------------------------------ */

.technique-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.technique-picker button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font: inherit;
  color: var(--ink);
}

.technique-picker button strong { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.technique-picker button small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.technique-picker button:hover { border-color: var(--chart-blue-light); }

.technique-picker button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: var(--shadow);
}

.technique-picker button[aria-pressed="true"] strong { color: #fff; }
.technique-picker button[aria-pressed="true"] small { color: #a8e3cf; }

.canvas-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.canvas-toolbar .zoom-group { display: flex; align-items: center; gap: 6px; }

.canvas-toolbar button {
  min-width: 30px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
}

.canvas-toolbar button:hover { border-color: var(--chart-blue-dark); color: var(--chart-blue-dark); }
.canvas-toolbar output { font-size: 12px; color: var(--muted); min-width: 46px; text-align: center; }

.device-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(180deg, #fbfdfc 0%, #f4f8f6 100%);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.canvas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 11px;
  color: var(--muted);
}

.canvas-legend span { display: inline-flex; align-items: center; gap: 6px; }
.canvas-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; border: 1px solid rgb(17 24 22 / 18%); }

.output-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.output-strip > div > span { display: block; font-size: 10px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.output-strip > div > strong { font-size: 14px; font-weight: 500; }
.output-strip .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.check-list { display: flex; flex-direction: column; gap: 8px; }

.check-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(88px, .7fr)) minmax(120px, .9fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--chart-blue-dark);
  border-radius: 10px;
}

.check-row.is-review { border-left-color: #c0392b; background: #fff8f7; }
.check-row.is-na { border-left-color: var(--line); }
.check-row h4 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.check-row p { margin: 3px 0 0; font-size: 11px; color: var(--muted); line-height: 1.4; }
.check-row .metric span { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.check-row .metric strong { font-size: 14px; font-weight: 500; }
.check-row .metric small { font-size: 11px; color: var(--muted); margin-left: 2px; }

.check-bar { height: 5px; border-radius: 3px; background: #e6efeb; overflow: hidden; margin-top: 5px; }
.check-bar b { display: block; height: 100%; background: var(--chart-blue-dark); }
.check-row.is-review .check-bar b { background: #c0392b; }

.check-status { font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.check-status.ok { color: var(--chart-blue-dark); }
.check-status.review { color: #c0392b; }
.check-status.na { color: var(--muted); }

.warning-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 4px; }

.warning-item {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #f0dcbb;
  background: var(--warning-bg);
  font-size: 12px;
  line-height: 1.45;
  color: var(--warning);
}

.warning-item.is-block { border-color: #edc4bd; background: #fdf3f1; color: #97331f; }
.warning-item strong { display: block; font-size: 12px; font-weight: 500; margin-bottom: 2px; }

.layer-table td.swatch-cell { width: 26px; }
.layer-table i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgb(17 24 22 / 18%); }

.tab-strip {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab-strip button {
  border: 0;
  background: none;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

/* A ABA SELECIONADA, COM CONTRASTE DE TEXTO — e não só de cor de marca.
 *
 * `--chart-blue-dark` dá 3,18:1 sobre o branco, e o piso da WCAG para texto
 * de 13 px é 4,5:1. A cor servia para a BARRA embaixo da aba, que é
 * decoração e não precisa de contraste de texto; para o rótulo, não servia.
 * A barra continua na cor da marca; o texto escurece. O auditor de interface
 * pegou isso em dois produtos, e o segundo já tinha a correção escrita na
 * própria folha — de onde se conclui que o lugar dela era aqui. */
.tab-strip button[aria-selected="true"] { color: #0e6b4f; border-bottom-color: var(--chart-blue-dark); }

.tab-panel[hidden] { display: none; }

.sweep-chart { width: 100%; height: auto; display: block; }

@media (max-width: 1100px) {
  .check-row { grid-template-columns: 1fr 1fr; }
  .check-row .metric:nth-child(4) { grid-column: span 2; }
}

/* O input de arquivo é acionado pelo botão "Importar projeto"; o controle nativo
   fica fora do fluxo visual. */
#import-file { display: none; }

.output-strip .actions .primary-button { flex: 0 0 auto; }

/* O cálculo acompanha cada edição do formulário. Sem uma confirmação explícita,
   o botão de calcular parece não fazer nada, porque o resultado já está na tela
   quando ele é acionado. */
.primary-button.is-confirmed {
  background: var(--chart-blue-dark);
  border-color: var(--chart-blue-dark);
}

.result-cards.is-refreshed .result-card {
  animation: ep-card-refresh 1.1s ease-out;
}

@keyframes ep-card-refresh {
  0% { box-shadow: 0 0 0 2px rgb(22 164 118 / 55%); }
  100% { box-shadow: 0 0 0 2px rgb(22 164 118 / 0%); }
}

@media (prefers-reduced-motion: reduce) {
  .result-cards.is-refreshed .result-card { animation: none; }
}


/* ------------------------------------------------------------------ */
/* Correções de acabamento                                            */
/* ------------------------------------------------------------------ */

/* Um span vazio de unidade continuava reservando 20 px de cada campo. Nas
   quatro colunas da equação IDF isso bastava para cortar "819,67". */
.input-with-unit span:empty { display: none; }

.field-grid.four-columns { gap: 8px; }
.field-grid.four-columns .input-with-unit input { padding-left: 8px; padding-right: 8px; }

/* `.primary-button` nasce com largura total porque é o botão de enviar do
   formulário. Dentro da faixa de saídas isso o jogava sozinho para uma segunda
   linha, esticado, desalinhado dos demais. */
.output-strip .actions button {
  width: auto;
  margin-top: 0;
  flex: 0 0 auto;
  padding: 0 14px;
}

/* ALINHAMENTO DOS CAMPOS DA GRADE.
 *
 * O label era `display: block`, então o campo começava onde o texto acabasse:
 * "Garantia temporal pretendida" ocupa duas linhas, "Anos mínimos de série"
 * ocupa uma, e os dois campos da mesma linha saíam em alturas diferentes.
 *
 * Coluna flexível com o campo empurrado para o fim resolve sem depender de o
 * rótulo caber numa linha — que é uma condição que nenhum texto em português
 * respeita por muito tempo. O `:not(.checkbox)` preserva a caixa de marcação,
 * que é deitada de propósito. */
.field-grid label:not(.checkbox) { display: flex; flex-direction: column; gap: 5px; }
.field-grid label:not(.checkbox) > .input-with-unit,
.field-grid label:not(.checkbox) > input,
.field-grid label:not(.checkbox) > select,
.field-grid label:not(.checkbox) > textarea { margin-top: auto; }

/* Últimos dois tokens secundários acertados no piso de contraste.
 *
 * `#7d9389` sobre branco dava 3,28:1; `#65736e` sobre o verde escuro da faixa
 * de saídas dava 3,06:1. O segundo é texto CLARO sobre fundo escuro, e por isso
 * foi CLAREADO, não escurecido — a primeira tentativa escureceu os dois, o que
 * levou o rótulo da faixa a 1,38:1, pior que estava. A direção da correção vem
 * de comparar a luminância do texto com a do fundo, e não de supor. */
