:root {
  color-scheme: light;
  --navy-950: #0b2133;
  --navy-900: #15344f;
  --navy-800: #1e4668;
  --teal-800: #126856;
  --teal-700: #157b65;
  --teal-100: #dff2eb;
  --teal-50: #eff9f5;
  --amber-700: #a15b05;
  --amber-100: #fff0c6;
  --amber-50: #fff9e9;
  --red-700: #a63b32;
  --red-100: #fbe3df;
  --red-50: #fff5f3;
  --blue-100: #dceafa;
  --ink: #18232d;
  --muted: #63717d;
  --line: #d9e1e5;
  --canvas: #eef2f4;
  --paper: #ffffff;
  --shadow: 0 16px 45px rgba(18, 40, 58, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(21, 123, 101, 0.06), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(21, 123, 101, 0.28);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px clamp(18px, 3vw, 44px);
  background: rgba(11, 33, 51, 0.97);
  color: #fff;
  box-shadow: 0 4px 22px rgba(6, 23, 36, 0.2);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: linear-gradient(135deg, #1a8f75, #b8d9c9);
  color: var(--navy-950);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 1px;
  color: #b9c9d5;
  font-size: 0.76rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-resource {
  color: #dce9ee;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.topbar-resource:hover,
.topbar-resource:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.version-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
  color: #c9d6de;
  font-size: 0.75rem;
  font-weight: 700;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 9px 14px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

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

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

.button-primary {
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 123, 101, 0.2);
}

.button-primary:hover {
  background: var(--teal-800);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #b8cbc8;
  background: #fff;
  color: var(--teal-800);
  box-shadow: 0 7px 18px rgba(18, 104, 86, 0.08);
}

.button-secondary:hover {
  border-color: #8eb7ae;
  background: var(--teal-50);
}

.button-secondary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  gap: 22px;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 22px clamp(16px, 2.5vw, 38px) 44px;
}

.app-shell > *,
.form-grid > *,
.cost-grid > *,
.results-panel,
.input-panel {
  min-width: 0;
}

.input-panel {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  scrollbar-color: #a7b4bc transparent;
  scrollbar-width: thin;
}

.panel-heading {
  display: grid;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 20px 14px;
}

.panel-intro > p:last-child {
  max-width: 245px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.4;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-700);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 7px;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h3 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}

.analysis-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  border-radius: 999px;
  background: var(--teal-50);
  padding: 6px 9px;
  color: var(--teal-800);
  font-size: 0.7rem;
  font-weight: 750;
}

.analysis-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.analysis-badge.is-current span {
  background: var(--teal-700);
  box-shadow: 0 0 0 4px rgba(21, 123, 101, 0.1);
}

.analysis-badge.is-pending,
.analysis-badge.is-stale {
  background: var(--amber-50);
  color: #805008;
}

.analysis-badge.is-pending span,
.analysis-badge.is-stale span {
  background: #c8790a;
  box-shadow: 0 0 0 4px rgba(200, 121, 10, 0.12);
}

.input-panel details {
  border-top: 1px solid var(--line);
}

.input-panel summary,
.method-note summary {
  list-style: none;
}

.input-panel summary::-webkit-details-marker,
.method-note summary::-webkit-details-marker {
  display: none;
}

.input-panel summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 44px 14px 20px;
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 850;
}

.input-panel summary > span:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 0.72rem;
  font-weight: 900;
}

.input-panel summary strong,
.input-panel summary small {
  display: block;
}

.input-panel summary strong {
  font-size: 0.9rem;
}

.input-panel summary small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 580;
}

.input-panel summary::after {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7a8a95;
  border-bottom: 2px solid #7a8a95;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 150ms ease;
}

.input-panel details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 10px;
  padding: 4px 20px 20px;
}

.cost-block {
  display: grid;
  gap: 14px;
  border: 1px solid #d6e0e3;
  border-radius: 14px;
  background: #fbfdfd;
  padding: 15px;
}

.cost-block > header {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #e2e9eb;
  padding-bottom: 11px;
}

.cost-block > header strong {
  color: var(--navy-900);
  font-size: 0.88rem;
}

.cost-block > header small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 580;
  line-height: 1.35;
}

.cost-grid {
  padding: 0;
}

.form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #44535e;
  font-size: 0.875rem;
  font-weight: 720;
}

.precedent-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d7e0e4;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #44535e;
  font-size: 0.875rem;
  font-weight: 720;
}

.financial-validation {
  margin-top: 6px;
  border-color: #e4c781;
  background: var(--amber-50);
}

.financial-validation > span {
  display: grid;
  gap: 3px;
}

.financial-validation small {
  color: #72511d;
  font-weight: 600;
}

.precedent-toggle {
  display: inline-flex;
  min-width: 116px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.precedent-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 2px solid var(--red-700);
  border-radius: 50%;
  background: var(--red-50);
  color: var(--red-700);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.precedent-toggle.is-confirmed .precedent-icon {
  border-color: var(--teal-700);
  background: var(--teal-100);
  color: var(--teal-800);
}

.precedent-state {
  font-size: 0.76rem;
  font-weight: 760;
}

.precedent-toggle.is-pending .precedent-state {
  color: var(--red-700);
}

.precedent-toggle.is-confirmed .precedent-state {
  color: var(--teal-800);
}

.precedent-toggle:focus-visible {
  border-radius: 22px;
  outline: 3px solid rgba(20, 117, 115, 0.22);
  outline-offset: 3px;
}

.precedent-field.field-error {
  border-color: var(--red-700);
  background: var(--red-50);
  box-shadow: 0 0 0 3px rgba(166, 59, 50, 0.1);
}

.form-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 720;
}

.info-button {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--teal-700);
  border-radius: 50%;
  background: transparent;
  color: var(--teal-700);
  font: 800 0.75rem/1 Georgia, serif;
  cursor: pointer;
}

.info-button:hover,
.info-button[aria-expanded="true"] {
  background: var(--teal-700);
  color: #fff;
}

.info-button:focus-visible {
  outline: 3px solid rgba(20, 117, 115, 0.22);
  outline-offset: 2px;
}

.field-help {
  position: static;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #b9ccd0;
  border-radius: 8px;
  background: #f8fbfb;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.field-help a,
.inline-guide-link,
.financing-note a,
.scenario-definitions a {
  color: var(--teal-800);
  font-weight: 800;
  text-underline-offset: 2px;
}

.field-help[hidden] {
  display: none;
}

.form-grid label > span:first-child {
  min-height: 18px;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cfd8dd;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.form-grid input[data-money] {
  font-variant-numeric: tabular-nums;
}

.form-grid input:hover,
.form-grid select:hover {
  border-color: #9cabb5;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--teal-700);
}

.derived-field {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  border: 1px solid #d7e0e4;
  border-radius: 10px;
  background: #f3f6f7;
  padding: 9px 10px;
  color: #4c5c66;
  font-size: 0.9rem;
  font-weight: 700;
}

.water-project-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #cbd9dc;
  border-radius: 12px;
  background: #f8fbfb;
  padding: 12px;
}

.production-system-note {
  border-left: 3px solid var(--teal-700);
  border-radius: 0 9px 9px 0;
  background: var(--teal-50);
  padding: 9px 11px;
  color: #3f555b;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
}

[data-system-panel][hidden] {
  display: none;
}

.water-project-heading,
.water-project-values {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.water-project-heading > div {
  display: grid;
  gap: 2px;
}

.water-project-eyebrow {
  color: var(--teal-700);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.water-project-heading strong {
  color: var(--navy-900);
  font-size: 0.82rem;
}

.water-project-heading output {
  color: var(--teal-800);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.water-project-heading .water-peak-output {
  color: var(--navy-950);
  font-size: 1rem;
}

.water-project-values > span {
  display: grid;
  flex: 1;
  gap: 2px;
  border-radius: 9px;
  background: #fff;
  padding: 9px 10px;
}

.water-project-values small,
.water-project-summary > p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.water-project-values strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.water-project-summary > p {
  margin: 0;
}

.water-result-state {
  border-radius: 7px;
  background: var(--teal-100);
  padding: 5px 8px;
  color: var(--teal-800);
  font-size: 0.68rem;
  font-weight: 780;
}

.water-result-state.is-pending,
.water-result-state.is-stale {
  background: var(--amber-100);
  color: #805008;
}

.advanced-setting {
  border-top: 1px solid #dce6e8;
  padding-top: 8px;
}

.advanced-setting summary {
  color: var(--navy-900);
  font-size: 0.75rem;
  font-weight: 800;
}

.advanced-setting label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.water-confirmation {
  background: #fff;
}

.inline-guide-link {
  display: inline-block;
  margin-top: 9px;
  font-size: 0.72rem;
}

@media (max-width: 420px) {
  .water-project-heading,
  .water-project-values {
    flex-direction: column;
  }

  .water-project-heading output {
    text-align: left;
  }
}

.form-grid label.field-error > span:first-child {
  color: var(--red-700);
}

.form-grid [aria-invalid="true"] {
  border-color: var(--red-700);
  background: var(--red-50);
  box-shadow: 0 0 0 3px rgba(166, 59, 50, 0.1);
}

.form-grid em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.35;
}

.commercial-factor-field > label {
  color: #44535e;
  font-size: 0.875rem;
  font-weight: 720;
}

.commercial-factor-field[hidden] {
  display: none;
}

.factor-summary {
  border-left: 3px solid var(--teal-700);
  border-radius: 0 8px 8px 0;
  background: var(--teal-50);
  padding: 8px 10px;
  color: var(--teal-800);
  font-size: 0.75rem;
  font-weight: 720;
  line-height: 1.4;
}

.factor-guide {
  border: 1px solid #cbd9dc;
  border-radius: 10px;
  background: #f8fbfb;
}

.factor-guide summary {
  padding: 9px 11px;
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.factor-guide > div {
  border-top: 1px solid #dce6e8;
  padding: 10px 12px 12px;
  color: #4c5c66;
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1.45;
}

.factor-guide p {
  margin-bottom: 8px;
}

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

.factor-guide ul {
  margin: 0 0 9px;
  padding-left: 18px;
}

.factor-guide li + li {
  margin-top: 4px;
}

.field-wide {
  grid-column: 1 / -1;
}

.input-with-unit {
  position: relative;
  display: block;
}

.input-with-unit input {
  padding-right: 65px;
}

.money-short-unit input {
  padding-right: 38px;
}

.input-with-unit small {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #6f7d87;
  font-size: 0.68rem;
  font-weight: 650;
  pointer-events: none;
  transform: translateY(-50%);
}

.form-divider {
  border-top: 1px dashed #cbd5da;
  padding-top: 11px;
  color: var(--teal-800);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.financing-fields {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #b8cfca;
  border-radius: 16px;
  background: #f4faf8;
}

.financing-fields[hidden],
.financing-result-card[hidden],
#financeGraceField[hidden] {
  display: none;
}

#financeFrequencyField[hidden] {
  display: none;
}

.financing-note {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #176b5b;
  background: #e6f2ef;
  border-radius: 10px;
}

.financing-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b8cbc8;
  border-radius: 12px;
  background: var(--teal-50);
  padding: 12px;
}

.financing-entry-copy {
  display: grid;
  flex: 1 1 180px;
  gap: 3px;
}

.financing-entry-copy strong {
  color: var(--navy-900);
  font-size: 0.84rem;
}

.financing-entry-copy p {
  margin: 0;
  color: #48635e;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
}

.financing-entry .button {
  flex: 0 0 auto;
}

.financing-note p {
  margin: 0;
  color: #395b55;
}

.financing-grid {
  padding: 0;
}

.financing-result-card {
  grid-column: 1 / -1;
  border-color: #8ebbb1;
}

.finance-schedule-wrap {
  margin-top: 1rem;
}

.capital-turnover {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: clamp(1rem, 2.2vw, 1.4rem);
  border: 1px solid #9fc8be;
  border-radius: 17px;
  background: linear-gradient(145deg, #f8fcfb 0%, #e9f5f1 100%);
}

.capital-turnover-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.capital-turnover-heading h4 {
  margin: 0.15rem 0 0;
  color: #15344f;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.turnover-badge {
  flex: 0 0 auto;
  padding: 0.32rem 0.62rem;
  border: 1px solid #8ebbb1;
  border-radius: 999px;
  background: #fff;
  color: #176b5b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.turnover-kpis > div {
  display: grid;
  align-content: start;
  gap: 0.38rem;
  min-height: 112px;
  padding: 0.9rem;
  border: 1px solid #c8ded9;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
}

.turnover-kpis span {
  color: #506b66;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.turnover-kpis strong {
  color: #15344f;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.15;
}

.turnover-kpis small {
  color: #526762;
  font-size: 0.75rem;
  line-height: 1.35;
}

.turnover-kpis .turnover-kpi-emphasis {
  border-color: #6ca899;
  background: #fff;
  box-shadow: inset 0 4px 0 #176b5b;
}

.turnover-details {
  margin-top: 0;
  border-top-color: #b8d5ce;
}

.turnover-eligibility {
  display: grid;
  gap: 0.22rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid #b17716;
  border-radius: 10px;
  background: #fff7e7;
  color: #6a4a13;
}

.turnover-eligibility[data-status="confirmed"] {
  border-left-color: #176b5b;
  background: #e4f3ef;
  color: #26564c;
}

.turnover-eligibility[data-status="blocked"] {
  border-left-color: #a33a31;
  background: #fff0ed;
  color: #7a302a;
}

.turnover-eligibility span {
  line-height: 1.45;
}

.turnover-disclaimer {
  margin: 0;
  color: #5e706c;
  font-size: 0.78rem;
  line-height: 1.5;
}

.finance-schedule-wrap td small {
  display: block;
  margin-top: 0.2rem;
  color: #176b5b;
  font-weight: 700;
}

.finance-schedule-wrap tr.is-within-cycle {
  background: #f0f8f6;
}

.finance-cash-reading {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #eef3f2;
  color: #294842;
  font-weight: 650;
}

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

@media (max-width: 560px) {
  .capital-turnover-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .turnover-badge {
    align-self: flex-start;
  }

  .turnover-kpis {
    grid-template-columns: 1fr;
  }
}

.update-button {
  display: flex;
  position: sticky;
  z-index: 4;
  bottom: 12px;
  width: calc(100% - 40px);
  align-items: center;
  justify-content: center;
  margin: 2px 20px 20px;
  box-shadow: 0 9px 24px rgba(18, 104, 86, 0.24);
}

.update-button.is-ready-for-analysis {
  animation: ready-for-analysis 1.8s ease-in-out infinite;
  outline: 3px solid rgba(255, 193, 69, 0.72);
  outline-offset: 3px;
}

@keyframes ready-for-analysis {
  0%,
  100% {
    box-shadow: 0 9px 24px rgba(18, 104, 86, 0.24), 0 0 0 0 rgba(255, 193, 69, 0.42);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 12px 30px rgba(18, 104, 86, 0.34), 0 0 0 8px rgba(255, 193, 69, 0);
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .update-button.is-ready-for-analysis {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 193, 69, 0.28), 0 9px 24px rgba(18, 104, 86, 0.24);
  }
}

.results-panel {
  min-width: 0;
}

.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.report-actions > span {
  color: var(--muted);
  font-size: 0.75rem;
}

.print-report {
  display: none;
}

.validation-box {
  margin-bottom: 14px;
  border: 1px solid #e9b9b1;
  border-radius: 13px;
  background: var(--red-50);
  padding: 13px 16px;
  color: #7d2d27;
  font-weight: 650;
}

.analysis-state-notice {
  margin-bottom: 14px;
  border: 1px solid #abd4c6;
  border-radius: 13px;
  background: var(--teal-50);
  padding: 12px 15px;
  color: var(--teal-800);
  font-size: 0.82rem;
  font-weight: 750;
}

.analysis-state-notice.is-stale {
  border-color: #e4c781;
  background: var(--amber-50);
  color: #7d4a07;
}

.results-panel.analysis-stale .decision-card,
.results-panel.analysis-stale .metrics-grid,
.results-panel.analysis-stale .tabs,
.results-panel.analysis-stale .tab-panel {
  opacity: 0.68;
}

.results-panel.analysis-stale .tab-panel,
.results-panel.analysis-stale .tabs {
  pointer-events: none;
  user-select: none;
}

.validation-box strong {
  display: block;
  margin-bottom: 4px;
  color: #6f241e;
}

.validation-box ul {
  margin: 0;
  padding-left: 20px;
}

.validation-box li + li {
  margin-top: 3px;
}

.results-panel.has-validation-errors .metrics-grid,
.results-panel.has-validation-errors .tabs,
.results-panel.has-validation-errors .tab-panel {
  opacity: 0.48;
  filter: grayscale(0.35);
  pointer-events: none;
  user-select: none;
}

.decision-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 172px;
  overflow: hidden;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(20, 54, 78, 0.08);
  border-radius: 22px;
  padding: clamp(24px, 3.2vw, 40px);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.decision-status-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 1.45rem;
  font-weight: 900;
}

.decision-card.status-go .decision-status-icon {
  color: var(--teal-800);
}

.decision-card.status-pending .decision-status-icon,
.decision-card.status-limit .decision-status-icon {
  color: var(--amber-700);
}

.decision-card.status-review .decision-status-icon {
  color: var(--red-700);
}

.decision-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  content: "";
}

.decision-card::after {
  position: absolute;
  top: -100px;
  right: -70px;
  width: 300px;
  height: 300px;
  border: 54px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.decision-card.status-review {
  background: linear-gradient(125deg, #fff 56%, var(--red-100));
}

.decision-card.status-review::before {
  background: var(--red-700);
}

.decision-card.status-pending,
.decision-card.status-limit {
  background: linear-gradient(125deg, #fff 56%, var(--amber-100));
}

.decision-card.status-pending::before,
.decision-card.status-limit::before {
  background: var(--amber-700);
}

.decision-card.status-go {
  background: linear-gradient(125deg, #fff 56%, var(--teal-100));
}

.decision-card.status-go::before {
  background: var(--teal-700);
}

.decision-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.decision-copy #decisionMessage {
  margin-bottom: 0;
  color: #4e5d67;
  font-size: 1rem;
}

.decision-next-action {
  display: grid;
  justify-items: start;
  gap: 5px;
  margin-top: 15px;
  border-left: 3px solid currentColor;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--navy-900);
}

.decision-next-action > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.decision-next-action strong {
  max-width: 720px;
  font-size: 0.88rem;
}

.button-action,
.gate-action-button {
  border: 0;
  border-radius: 8px;
  background: var(--navy-900);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.button-action {
  min-height: 36px;
  margin-top: 4px;
  padding: 7px 11px;
  font-size: 0.76rem;
}

.decision-context {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 7px;
  text-align: right;
}

.decision-context span {
  color: #5d6b75;
  font-size: 0.78rem;
  font-weight: 700;
}

.decision-primary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.decision-primary-actions .button {
  min-width: 150px;
}

.decision-context strong {
  max-width: 220px;
  color: var(--navy-950);
  font-size: 0.93rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-card,
.result-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(18, 40, 58, 0.045);
}

.metric-card {
  display: grid;
  min-height: 126px;
  align-content: space-between;
  border-radius: 15px;
  padding: 17px;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.metric-card.metric-met {
  border-color: #acd4c6;
  background: linear-gradient(135deg, #ffffff 18%, var(--teal-100));
  box-shadow: 0 10px 30px rgba(21, 123, 101, 0.1);
}

.metric-card.metric-not-met {
  border-color: #e8b7b0;
  background: linear-gradient(135deg, #ffffff 18%, var(--red-100));
  box-shadow: 0 10px 30px rgba(166, 59, 50, 0.09);
}

.metric-card > span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--navy-950);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.metric-card small {
  color: #687681;
  font-size: 0.72rem;
  font-weight: 620;
}

.metric-breakdown {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.metric-breakdown small:last-child {
  font-weight: 760;
}

.metric-card.metric-met small {
  color: var(--teal-800);
}

.metric-card.metric-not-met small {
  color: var(--red-700);
}

.tabs {
  position: sticky;
  z-index: 12;
  top: 72px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin: 12px 0;
  border-bottom: 1px solid #cbd6dc;
  border-radius: 12px 12px 0 0;
  padding-top: 8px;
  background: rgba(238, 242, 244, 0.96);
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.tab {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 12px 15px;
  color: #65737d;
  font-size: 0.85rem;
  font-weight: 790;
}

.tab::after {
  position: absolute;
  right: 13px;
  bottom: -1px;
  left: 13px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.tab:hover {
  color: var(--navy-900);
}

.tab.is-active {
  color: var(--teal-800);
}

.tab.is-active::after {
  background: var(--teal-700);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  min-width: 0;
  border-radius: var(--radius);
  padding: 20px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.card-heading > small {
  max-width: 320px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: right;
}

.status-pill,
.gate-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.status-pill {
  padding: 6px 9px;
}

.status-pill.pass,
.gate-badge.pass {
  background: var(--teal-100);
  color: var(--teal-800);
}

.status-pill.pending,
.status-pill.limit,
.gate-badge.pending,
.gate-badge.limit {
  background: var(--amber-100);
  color: var(--amber-700);
}

.status-pill.fail,
.gate-badge.fail {
  background: var(--red-100);
  color: var(--red-700);
}

.data-list {
  margin: 0;
}

.data-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #edf0f2;
  padding: 10px 0;
}

.data-list > div:first-child {
  border-top: 0;
}

.data-list dt {
  color: #62707a;
  font-size: 0.875rem;
  font-weight: 620;
}

.data-list dd {
  margin: 0;
  color: var(--navy-950);
  font-size: 0.88rem;
  font-weight: 820;
  text-align: right;
}

.gates-card {
  margin-top: 12px;
  border-color: #cbd9df;
  box-shadow: 0 12px 30px rgba(12, 39, 58, 0.08);
}

.gates-card .card-heading {
  margin-bottom: 18px;
}

.gates-lead {
  margin: 5px 0 0;
  color: #65737e;
  font-size: 0.82rem;
}

.priority-gates {
  display: grid;
  gap: 10px;
}

.priority-gates:empty {
  display: none;
}

.priority-gate {
  display: grid;
  grid-template-columns: auto minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(135px, 0.75fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #efc8c4;
  border-radius: 14px;
  padding: 15px 17px;
  background: #fff8f7;
}

.priority-gate-pendente,
.priority-gate-limite {
  border-color: #ead392;
  background: #fffbef;
}

.priority-gate-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #fde7e4;
  color: var(--red-700);
  font-weight: 900;
}

.priority-gate-title {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.priority-gate-title > strong {
  color: var(--navy-950);
  font-size: 0.94rem;
}

.priority-gate-reading {
  display: grid;
  gap: 7px;
  margin: 0;
  border-left: 1px solid #ced9de;
  padding-left: 16px;
}

.priority-gate-reading div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.priority-gate-reading dt,
.priority-gate-reading dd {
  margin: 0;
  font-size: 0.78rem;
}

.priority-gate-reading dt { color: #5a6974; }
.priority-gate-reading dd { color: var(--navy-950); font-weight: 850; text-align: right; }

.priority-gate-gap {
  display: grid;
  gap: 3px;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fde7e4;
  color: var(--red-700);
  text-align: center;
}

.priority-gate-gap span { font-size: 0.68rem; font-weight: 780; }
.priority-gate-gap strong { font-size: 0.82rem; }

.priority-gate > p {
  grid-column: 2 / 5;
  margin: 0;
  color: #52616c;
  font-size: 0.76rem;
  line-height: 1.45;
}

.passed-gates {
  margin-top: 12px;
  border: 1px solid #cbdbe3;
  border-radius: 14px;
  background: #fff;
}

.passed-gates summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  cursor: pointer;
  list-style: none;
}

.passed-gates summary::-webkit-details-marker { display: none; }
.passed-gates summary::after { content: "+"; color: var(--navy-900); font-weight: 900; }
.passed-gates[open] summary::after { content: "−"; }
.passed-gates summary > span:nth-child(2) { display: grid; gap: 3px; }
.passed-gates summary strong { color: var(--navy-950); font-size: 0.88rem; }
.passed-gates summary small { color: #61717c; font-size: 0.72rem; }
.passed-gates-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #ddf3eb; color: var(--teal-800); font-weight: 900; }

.passed-gates-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #e5ecef;
  padding: 12px 17px 15px;
}

.passed-gates-list > div { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; border-radius: 9px; background: #f5faf8; padding: 9px; }
.passed-gates-list > div > span { grid-row: 1 / 3; color: var(--teal-700); font-weight: 900; }
.passed-gates-list strong { font-size: 0.75rem; }
.passed-gates-list small { color: #61717c; font-size: 0.67rem; }

.review-drawer-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(10, 27, 41, 0.56);
}

.review-drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(430px, 100vw);
  height: 100dvh;
  border-left: 1px solid #c9d6dc;
  background: #fff;
  box-shadow: -18px 0 45px rgba(10, 28, 42, 0.22);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.review-drawer.is-open { transform: translateX(0); }
.review-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e1e8eb; padding: 24px; }
.review-drawer-header h3 { margin: 3px 0 6px; color: var(--navy-950); font-size: 1.08rem; }
.review-drawer-header p:last-child { margin: 0; color: #60707b; font-size: 0.78rem; }
.review-drawer-close { border: 0; background: transparent; color: var(--navy-900); cursor: pointer; font-size: 1.45rem; line-height: 1; }
.review-drawer-body { overflow-y: auto; padding: 22px 24px; }
.review-coverage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.review-coverage > div { display: grid; gap: 4px; border-radius: 10px; padding: 11px; background: #f4f7f8; }
.review-coverage span { color: #61717c; font-size: 0.66rem; }
.review-coverage strong { color: var(--navy-950); font-size: 0.95rem; }
.review-coverage-gap { background: #fff0ee !important; }
.review-coverage-gap strong { color: var(--red-700); }
.review-drawer-heading { margin: 24px 0 10px; color: var(--navy-950); font-size: 0.75rem; font-weight: 850; }
.review-drawer-fields { display: grid; gap: 8px; }
.review-drawer-fields button { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; border: 1px solid #d9e3e7; border-radius: 10px; padding: 12px; background: #fff; color: var(--navy-950); cursor: pointer; text-align: left; }
.review-drawer-fields button:hover, .review-drawer-fields button:focus-visible { border-color: var(--teal-600); background: #f2faf7; outline: 0; }
.review-drawer-fields button span { display: grid; gap: 3px; }
.review-drawer-fields strong { font-size: 0.78rem; }
.review-drawer-fields small { color: #65747e; font-size: 0.68rem; line-height: 1.35; }
.review-drawer-fields b { font-size: 1.2rem; }
.review-confirmation-note { margin: 12px 0 0; border-radius: 8px; padding: 10px 12px; background: #eef6fb; color: #35566d; font-size: 0.7rem; }
.review-drawer-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; border-top: 1px solid #e1e8eb; padding: 16px 24px; }
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  border-bottom: 1px solid #cad5db;
  padding: 10px 9px;
  background: #f3f6f7;
  color: #52616c;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  border-bottom: 1px solid #e9eef0;
  padding: 11px 9px;
  color: #34434d;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.gates-card tbody tr:hover td,
#scenariosPanel tbody tr:hover td {
  background-color: rgba(239, 249, 245, 0.45);
}

.gate-row-fail td {
  background: rgba(255, 245, 243, 0.72);
}

.gate-row-pendente td,
.gate-row-limite td {
  background: rgba(255, 249, 233, 0.72);
}

.gate-action-cell {
  min-width: 220px;
}

.gate-action-cell > span {
  display: block;
  line-height: 1.4;
}

.gate-action-button {
  margin-top: 8px;
  padding: 7px 9px;
  font-size: 0.72rem;
}

.gate-action-button:hover,
.button-action:hover {
  background: var(--teal-800);
}

.field-focus-highlight {
  border-radius: 11px;
  outline: 4px solid rgba(21, 123, 101, 0.2);
  outline-offset: 4px;
}

.scenario-definitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid #d8e3e5;
  border-radius: 11px;
  background: #f8fbfb;
  padding: 11px 12px;
}

.scenario-definitions p {
  margin: 0;
  color: #52616c;
  font-size: 0.74rem;
  line-height: 1.45;
}

.scenario-definitions a {
  font-size: 0.72rem;
  white-space: nowrap;
}

td strong {
  color: var(--navy-950);
}

.gate-badge {
  min-width: 104px;
  padding: 5px 8px;
}

.gate-badge::before {
  margin-right: 5px;
  font-size: 0.78rem;
}

.gate-badge.pass::before {
  content: "✓";
}

.gate-badge.pending::before {
  content: "!";
}

.gate-badge.limit::before {
  content: "≈";
}

.gate-badge.fail::before {
  content: "×";
}

.method-note {
  margin-top: 12px;
  border: 1px solid #cbdbe3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  padding: 0 17px;
}

.method-note summary {
  position: relative;
  padding: 14px 28px 14px 0;
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.method-note summary::after {
  position: absolute;
  top: 14px;
  right: 2px;
  content: "+";
  color: var(--teal-700);
  font-size: 1.1rem;
}

.method-note[open] summary::after {
  content: "−";
}

.method-note p {
  margin: 0 0 15px;
  color: #5b6973;
  font-size: 0.8rem;
}

.fine-print {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.matrix-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.legend-good {
  background: #96d2bd;
}

.legend-mid {
  background: #f3d67e;
}

.legend-bad {
  background: #eba99f;
}

.sensitivity-table th,
.sensitivity-table td {
  min-width: 105px;
  text-align: center;
}

.sensitivity-table th:first-child,
.sensitivity-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 145px;
  text-align: left;
}

.sensitivity-table td:first-child {
  background: #fff;
  font-weight: 760;
}

.sensitivity-cell.good {
  background: var(--teal-100);
  color: #0c5e4b;
}

.sensitivity-cell.mid {
  background: var(--amber-100);
  color: #7c4a08;
}

.sensitivity-cell.bad {
  background: var(--red-100);
  color: #873128;
}

.sensitivity-cell.is-base {
  box-shadow: inset 0 0 0 3px var(--navy-800);
  font-weight: 900;
}

.action-plan {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-progress {
  display: grid;
  min-width: 170px;
  gap: 7px;
  justify-items: end;
}

.plan-progress strong {
  color: var(--teal-800);
  font-size: 0.75rem;
}

.plan-progress-track {
  display: block;
  width: 170px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ecef;
}

.plan-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal-700);
  transition: width 180ms ease;
}

.action-plan li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 124px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e8edef;
  padding: 12px 0;
  transition: background-color 160ms ease;
}

.action-plan li:first-child {
  border-top: 0;
}

.action-plan li > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 0.74rem;
  font-weight: 900;
}

.action-plan strong,
.action-plan small {
  display: block;
}

.action-plan strong {
  color: var(--navy-950);
  font-size: 0.875rem;
}

.action-plan small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.action-plan em {
  color: #74818a;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 720;
  text-align: right;
}

.plan-status {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d3dce1;
  border-radius: 9px;
  background: #fff;
  padding: 7px 30px 7px 9px;
  color: #7c4a08;
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-status:focus {
  border-color: var(--teal-700);
}

.action-plan li.is-complete {
  background: linear-gradient(90deg, rgba(220, 243, 234, 0.55), transparent 72%);
}

.action-plan li.is-complete > span {
  background: var(--teal-700);
  color: #fff;
}

.action-plan li.is-complete .plan-status {
  border-color: #9bcdbb;
  background: #f1fbf7;
  color: #0c5e4b;
}

.responsibility-note {
  display: flex;
  gap: 7px;
  margin-top: 15px;
  border-left: 4px solid var(--navy-800);
  padding: 12px 14px;
  color: #5e6c76;
  font-size: 0.74rem;
}

.responsibility-note strong {
  flex: 0 0 auto;
  color: var(--navy-900);
}

.noscript {
  margin: 20px;
  border-radius: 12px;
  background: var(--red-100);
  padding: 14px;
  color: var(--red-700);
  font-weight: 700;
}

body.is-initializing .topbar,
body.is-initializing .app-shell,
body.is-initializing .feedback-fab {
  visibility: hidden;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.scenario-identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  color: #e9f1f4;
  font-size: 0.74rem;
  font-weight: 800;
}

.dirty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffc45d;
  box-shadow: 0 0 0 3px rgba(255, 196, 93, 0.16);
}

.scenario-notice {
  margin: 0 20px 14px;
  border: 1px solid #e8cf8d;
  border-radius: 11px;
  background: var(--amber-50);
  padding: 10px 12px;
  color: #7d4a07;
  font-size: 0.77rem;
  font-weight: 700;
}

.step-status {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #eef2f4;
  color: #6a7882;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.step-status.in-progress {
  background: var(--amber-100);
  color: #805008;
}

.step-status.complete {
  background: var(--teal-100);
  color: var(--teal-800);
}

.step-status.review {
  background: var(--red-100);
  color: var(--red-700);
}

.results-empty-state {
  display: none;
}

.results-panel.is-empty > :not(.results-empty-state):not(.validation-box) {
  display: none !important;
}

.results-panel.is-empty .results-empty-state {
  display: grid;
  min-height: min(680px, calc(100vh - 140px));
  place-content: center;
  justify-items: start;
  border: 1px dashed #b8c8ce;
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 15%, rgba(21, 123, 101, 0.1), transparent 22rem),
    #f9fbfb;
  padding: clamp(26px, 7vw, 82px);
  color: var(--muted);
}

.results-empty-state h2 {
  margin: 5px 0 8px;
  color: var(--navy-900);
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  letter-spacing: -0.04em;
}

.results-empty-state > p {
  max-width: 620px;
  margin: 0;
}

.empty-state-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-size: 1.6rem;
  font-weight: 900;
}

.empty-state-steps {
  display: grid;
  gap: 10px;
  margin: 25px 0 18px;
  padding: 0;
  list-style: none;
}

.empty-state-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.empty-state-steps span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #c8d5d9;
  border-radius: 8px;
  background: #fff;
  color: var(--teal-800);
  font-size: 0.74rem;
}

.empty-state-progress {
  border-radius: 999px;
  background: #e9eff1;
  padding: 6px 10px;
  color: #4b5b66;
  font-size: 0.75rem;
  font-weight: 800;
}

.scenario-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(82vh, 780px);
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(7, 25, 39, 0.28);
}

.scenario-list-dialog {
  width: min(900px, calc(100% - 28px));
}

.scenario-dialog::backdrop {
  background: rgba(7, 25, 39, 0.62);
  backdrop-filter: blur(3px);
}

.scenario-dialog > form,
.scenario-dialog > section {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.scenario-dialog label {
  display: grid;
  gap: 6px;
  color: #3f4e58;
  font-size: 0.78rem;
  font-weight: 800;
}

.scenario-dialog input,
.scenario-dialog textarea {
  width: 100%;
  border: 1px solid #cbd6da;
  border-radius: 11px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
}

.scenario-dialog textarea {
  resize: vertical;
}

.dialog-header,
.dialog-actions,
.scenario-list-toolbar,
.feedback-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dialog-header h2,
.dialog-header p,
.scenario-list-toolbar p,
.scenario-dialog > section > p {
  margin: 0;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #edf2f3;
  color: var(--navy-900);
  font-size: 1.45rem;
}

.dialog-actions {
  justify-content: flex-end;
}

.scenario-dialog .button-ghost,
.scenario-card .button-ghost {
  border-color: #cbd6da;
  background: #f7f9f9;
  color: var(--navy-900);
}

.dialog-message {
  min-height: 1.1em;
  margin: 0;
  color: var(--red-700);
  font-size: 0.78rem;
  font-weight: 700;
}

.dialog-message.success {
  color: var(--teal-800);
}

.scenario-list-toolbar p {
  color: var(--muted);
  font-size: 0.78rem;
}

.scenario-list {
  display: grid;
  gap: 10px;
}

.scenario-list-empty,
.scenario-list-loading {
  border: 1px dashed #c7d3d7;
  border-radius: 14px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.scenario-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid #d7e0e3;
  border-radius: 14px;
  background: #fbfdfd;
  padding: 15px;
}

.scenario-card h3,
.scenario-card p {
  margin: 0;
}

.scenario-card h3 {
  color: var(--navy-900);
  font-size: 0.98rem;
}

.scenario-card-meta,
.scenario-card-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 5px !important;
  color: var(--muted);
  font-size: 0.73rem;
}

.scenario-card-code,
.scenario-card-status {
  border-radius: 999px;
  background: #e9eff1;
  padding: 3px 7px;
  color: #40515d;
  font-size: 0.68rem;
  font-weight: 850;
}

.scenario-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 7px;
}

.scenario-card-actions .button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.73rem;
}

.feedback-reference {
  align-items: stretch;
  border: 1px solid #cbd9dc;
  border-radius: 13px;
  background: #f6f9f9;
  padding: 12px;
}

.feedback-reference strong {
  align-self: center;
  color: var(--navy-900);
  font-size: 0.8rem;
}

.feedback-fab {
  position: fixed;
  z-index: 18;
  right: 20px;
  bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: var(--navy-900);
  padding: 10px 15px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(11, 33, 51, 0.24);
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .app-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }

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

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

@media (max-width: 1040px) {
  .topbar {
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-resource,
  .version-pill,
  .topbar-actions .button {
    flex: 0 1 auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    padding-inline: clamp(12px, 2.5vw, 24px);
  }

  .input-panel {
    position: static;
    width: 100%;
    max-height: none;
  }

  .update-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .decision-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .decision-context {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .priority-gate {
    grid-template-columns: auto minmax(180px, 1.25fr) minmax(170px, 1fr) minmax(135px, 0.75fr) auto;
  }

  .tabs {
    top: 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px 14px;
  }

  .version-pill {
    display: none;
  }

  .topbar {
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-resource {
    flex: 1 1 42%;
    font-size: 0.7rem;
  }

  .topbar-actions .button {
    flex: 1 1 auto;
  }

  .scenario-identity {
    max-width: 100%;
  }

  .button-ghost {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.75rem;
  }

  .app-shell {
    padding: 14px 11px 30px;
  }

  .decision-primary-actions,
  .decision-primary-actions .button {
    width: 100%;
  }

  .priority-gate {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .priority-gate-reading,
  .priority-gate-gap,
  .priority-gate > p,
  .priority-gate > .gate-action-button {
    grid-column: 1 / -1;
  }

  .priority-gate-reading {
    border-top: 1px solid #ced9de;
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .passed-gates-list { grid-template-columns: 1fr; }
  .review-drawer-header, .review-drawer-body { padding: 18px; }
  .review-drawer-actions { padding: 14px 18px; }
  .review-coverage { grid-template-columns: 1fr; }

  .report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions > span {
    order: 2;
    text-align: center;
  }

  .report-actions .button {
    width: 100%;
  }

  .panel-heading,
  .result-card,
  .decision-card {
    padding: 18px;
  }

  .decision-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .decision-status-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 1.15rem;
  }

  .decision-context {
    grid-column: 1;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 3px 18px 18px;
  }

  .field-wide {
    grid-column: auto;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric-card {
    min-height: 118px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 1.15rem;
  }

  .card-heading {
    flex-direction: column;
  }

  .card-heading > small {
    text-align: left;
  }

  .plan-progress {
    width: 100%;
    justify-items: start;
  }

  .plan-progress-track {
    width: 100%;
  }

  .matrix-legend {
    justify-content: flex-start;
  }

  .scenario-definitions {
    grid-template-columns: 1fr;
  }

  .scenario-definitions a {
    white-space: normal;
  }

  .action-plan li {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .action-plan em {
    grid-column: 2;
    text-align: left;
  }

  .plan-status {
    grid-column: 2;
    width: min(100%, 180px);
  }

  .responsibility-note {
    flex-direction: column;
  }

  .scenario-card {
    grid-template-columns: 1fr;
  }

  .scenario-card-actions {
    justify-content: flex-start;
  }

  .dialog-actions,
  .feedback-reference {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-fab {
    right: 12px;
    bottom: 12px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #18232d;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .topbar,
  .app-shell,
  .noscript,
  .scenario-dialog,
  .feedback-fab {
    display: none !important;
  }

  .print-report {
    display: block;
  }

  .print-report * {
    box-sizing: border-box;
  }

  .print-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid #157b65;
    padding-bottom: 10px;
  }

  .print-header h1 {
    margin: 0 0 3px;
    font-size: 19pt;
  }

  .print-header p,
  .print-header time {
    margin: 0;
    color: #63717d;
    font-size: 8.5pt;
  }

  .print-header time {
    text-align: right;
  }

  .print-decision {
    margin: 12px 0;
    border: 1px solid #acd4c6;
    border-left: 6px solid #157b65;
    border-radius: 8px;
    background: #eff9f5;
    padding: 11px 13px;
  }

  .print-decision.review {
    border-color: #e8b7b0;
    border-left-color: #a63b32;
    background: #fff5f3;
  }

  .print-decision.pending {
    border-color: #edd28a;
    border-left-color: #a15b05;
    background: #fff9e9;
  }

  .print-decision h2 {
    margin: 0 0 4px;
    font-size: 14pt;
  }

  .print-decision p {
    margin: 2px 0;
  }

  .print-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin: 10px 0 13px;
  }

  .print-kpi {
    border: 1px solid #cbd6dc;
    border-radius: 7px;
    padding: 8px;
  }

  .print-kpi strong,
  .print-kpi span,
  .print-kpi small {
    display: block;
  }

  .print-kpi span,
  .print-kpi small {
    color: #63717d;
    font-size: 7.5pt;
  }

  .print-kpi strong {
    margin: 4px 0 2px;
    color: #0b2133;
    font-size: 12pt;
  }

  .print-section {
    break-inside: avoid;
    margin-top: 12px;
  }

  .print-section h2 {
    margin: 0 0 6px;
    border-bottom: 1px solid #cad5db;
    padding-bottom: 4px;
    color: #15344f;
    font-size: 11pt;
  }

  .print-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
  }

  .print-summary-grid dl {
    margin: 0;
  }

  .print-summary-grid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf0f2;
    padding: 3px 0;
  }

  .print-summary-grid dt {
    color: #52616c;
  }

  .print-summary-grid dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.5pt;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #d9e1e5;
    padding: 4px 5px;
    vertical-align: top;
  }

  .print-table th {
    background: #eef2f4;
    color: #34434d;
    font-size: 7pt;
    letter-spacing: 0;
    text-transform: none;
  }

  .print-status {
    font-weight: 800;
    white-space: nowrap;
  }

  .print-plan {
    margin: 0;
    padding-left: 20px;
  }

  .print-plan li {
    break-inside: avoid;
    border-bottom: 1px solid #edf0f2;
    padding: 4px 0;
  }

  .print-plan strong,
  .print-plan span {
    display: block;
  }

  .print-plan span {
    color: #63717d;
    font-size: 8pt;
  }

  .print-disclaimer {
    margin-top: 12px;
    border-top: 1px solid #cad5db;
    padding-top: 7px;
    color: #63717d;
    font-size: 7pt;
  }
}

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

/* Guia dos indicadores */
.guide-page {
  background: #f3f6f7;
}

.guide-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: var(--navy-950);
  color: #fff;
  box-shadow: 0 4px 22px rgba(6, 23, 36, 0.2);
}

.guide-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.guide-brand strong,
.guide-brand small {
  display: block;
}

.guide-brand small {
  color: #b9c9d5;
  font-size: 0.74rem;
}

.guide-topbar nav {
  display: flex;
  gap: 18px;
}

.guide-topbar nav a {
  color: #dce9ee;
  font-size: 0.8rem;
  font-weight: 780;
  text-decoration: none;
}

.guide-topbar nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 980px);
  justify-content: center;
  gap: 28px;
  padding: 30px clamp(16px, 4vw, 54px) 70px;
}

.guide-nav {
  position: sticky;
  top: 102px;
  display: grid;
  align-self: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(18, 40, 58, 0.05);
}

.guide-nav strong {
  margin-bottom: 6px;
  color: var(--navy-950);
  font-size: 0.78rem;
}

.guide-nav a {
  border-radius: 7px;
  padding: 6px 7px;
  color: #52616c;
  font-size: 0.75rem;
  font-weight: 680;
  text-decoration: none;
}

.guide-nav a:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}

.guide-content {
  min-width: 0;
}

.guide-hero,
.guide-section,
.guide-footer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 40, 58, 0.045);
}

.guide-hero {
  padding: clamp(26px, 5vw, 52px);
  background: linear-gradient(135deg, #fff 58%, var(--teal-100));
}

.guide-hero h1 {
  max-width: 720px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

.guide-hero > p:last-child {
  max-width: 740px;
  margin: 18px 0 0;
  color: #52616c;
  font-size: 1rem;
}

.guide-section {
  margin-top: 16px;
  padding: clamp(22px, 4vw, 36px);
  scroll-margin-top: 92px;
}

.guide-section h2 {
  margin-bottom: 13px;
  color: var(--navy-950);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.guide-section h3 {
  margin: 24px 0 8px;
}

.guide-section > p {
  color: #4e5d67;
}

.guide-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid #dce4e7;
  border-radius: 12px;
}

.guide-table-wrap th,
.guide-table-wrap td {
  min-width: 150px;
  white-space: normal;
}

.guide-table-wrap th:first-child,
.guide-table-wrap td:first-child {
  min-width: 175px;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: guide-step;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) 1fr;
  gap: 18px;
  border-top: 1px solid #e5ebed;
  padding-top: 10px;
}

.guide-steps li:first-child {
  border-top: 0;
}

.guide-steps strong {
  color: var(--navy-900);
}

.guide-steps span {
  color: #596873;
}

.guide-callout {
  border-left: 4px solid var(--teal-700);
  border-radius: 0 10px 10px 0;
  background: var(--teal-50);
  padding: 13px 15px;
}

.guide-flow,
.guide-decision-grid,
.conversion-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

.guide-flow > div,
.guide-decision-grid article,
.conversion-grid article {
  border: 1px solid #dce5e7;
  border-radius: 12px;
  background: #f9fbfb;
  padding: 15px;
}

.guide-flow > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
}

.guide-flow > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 9px;
  background: var(--teal-700);
  color: #fff;
  font-weight: 850;
}

.guide-flow p,
.guide-decision-grid p,
.conversion-grid p {
  margin: 3px 0 0;
  color: #596873;
  font-size: 0.82rem;
}

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

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

.conversion-grid article {
  display: grid;
  gap: 5px;
}

.conversion-grid span {
  color: var(--teal-800);
  font-size: 1.05rem;
  font-weight: 850;
}

.formula-card {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  border-radius: 12px;
  background: var(--navy-950);
  padding: 16px;
}

.formula-card code {
  overflow-wrap: anywhere;
  color: #e5f5ee;
  font-size: 0.86rem;
}

.guide-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 20px;
}

.guide-footer span {
  color: var(--muted);
  font-size: 0.8rem;
}

.guide-footer .button {
  text-decoration: none;
}

.market-panel {
  display: grid;
  gap: 12px;
  margin: 0 16px 16px;
  border: 1px solid rgba(21, 91, 84, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(232, 246, 241, 0.9), rgba(244, 249, 247, 0.95));
  padding: 14px;
  overflow: hidden;
}

.market-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.market-panel-header div,
.market-card {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.market-panel-header strong {
  color: var(--navy-950);
}

.market-panel-header small,
.market-card small,
.market-note,
.market-status {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.market-status,
.market-note {
  margin: 0;
  font-size: 0.8rem;
}

.market-status.is-error {
  color: var(--red-700, #9d2f2f);
}

.market-stale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-stale-actions[hidden] {
  display: none;
}

.input-with-unit select {
  min-width: 4.5rem;
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.market-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid rgba(21, 91, 84, 0.16);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.market-card > span,
.market-card > small,
.market-card > .market-contract-label,
.market-card > select {
  grid-column: 1;
}

.market-card > strong,
.market-card > .market-use {
  grid-column: 2;
}

.market-card > strong {
  grid-row: 1 / span 2;
  align-self: center;
  max-width: 11rem;
  text-align: right;
  white-space: nowrap;
}

.market-card > .market-use {
  grid-row: 3 / span 2;
  align-self: stretch;
  width: min(10rem, 100%);
  min-width: 0;
}

.market-card > span,
.market-contract-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.market-card > strong {
  color: var(--teal-800);
  font-size: 1.08rem;
}

.market-card select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.market-use {
  margin-top: 6px;
  border: 1px solid var(--teal-700);
  border-radius: 9px;
  background: transparent;
  padding: 8px 10px;
  color: var(--teal-800);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.market-use:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 860px) {
  .guide-shell {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-nav strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .market-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .market-panel {
    margin-inline: 10px;
    padding: 12px;
  }

  .market-card {
    grid-template-columns: 1fr;
  }

  .market-card > span,
  .market-card > strong,
  .market-card > small,
  .market-card > .market-contract-label,
  .market-card > select,
  .market-card > .market-use {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    text-align: left;
    white-space: normal;
  }

  .guide-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-topbar nav {
    width: 100%;
    justify-content: space-between;
  }

  .guide-nav,
  .guide-flow,
  .guide-decision-grid,
  .conversion-grid,
  .guide-footer,
  .guide-steps li {
    grid-template-columns: 1fr;
  }

  .guide-footer .button {
    justify-self: start;
  }
}
