/* Excedentes calculator pages. Everything is scoped to .ex so generic rules in
   application.css (.bar, .p, .lead, footer, table, h1...) do not leak in. */
.ex {
  --ink: #0b1f23;
  --ink-2: #15303a;
  --paper: #f3f5f0;
  --card: #ffffff;
  --text: #0e2226;
  --mute: #4d6367;
  --line: #b5c4be;
  --cv: #e2552f;
  --cv-soft: #fde9e1;
  --ok: #136b4b;
  --ok-soft: #ddf3e8;
  --warn: #7a5200;
  --warn-soft: #fff0c7;
  --stale: #a8321c;
  --stale-soft: #fbe2da;
  --accent: #ffb400;
  --accent-ink: #2a1d00;
  --accent-soft: #fff3d0;
  --glow: rgba(255, 180, 0, 0.3);
  background: var(--paper);
  color: var(--text);
  color-scheme: light;
  font: 400 16px/1.55 var(--b);
  min-height: 100vh;
}
.ex *, .ex *::before, .ex *::after { box-sizing: border-box; }
.ex p, .ex ul, .ex ol, .ex dl, .ex dd { margin: 0; }
.ex h1, .ex h2, .ex h3 { font-family: var(--d); line-height: 1.12; letter-spacing: -0.02em; margin: 0; color: inherit; }
.ex h1 { font-weight: 800; font-size: clamp(2.3rem, 4.8vw, 3.7rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 17ch; margin-top: 14px; margin-bottom: 16px; }
.ex h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ex h3 { font-weight: 800; font-size: 1.08rem; line-height: 1.25; }
.ex :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.ex-hero :focus-visible { outline-color: #fff; }
.ex [hidden] { display: none !important; }
.ex-wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.ex-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.ex-top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; height: 68px; }
.ex-logo { display: flex; align-items: center; gap: 10px; font: 800 1.2rem var(--d); letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.ex-sun { width: 20px; height: 20px; border-radius: 50%; background: #ffb400; box-shadow: 0 0 0 4px #fff1c7; }
.ex-nav { display: flex; gap: 4px; }
.ex-nav a { padding: 8px 12px; border-radius: 9px; color: var(--mute); font-size: 0.9rem; text-decoration: none; }
.ex-nav a:hover { color: var(--text); background: #e4eae5; }
.ex-nav a[aria-current="page"] { color: var(--text); background: #e4eae5; font-weight: 600; }

/* Hero */
.ex-hero { position: relative; isolation: isolate; overflow: hidden; padding: 26px 0 48px; background: var(--ink); color: #fff; }
.ex-hero::before { content: ""; position: absolute; top: -20%; right: -10%; width: 70%; height: 90%; z-index: -1; background: radial-gradient(closest-side, var(--glow), transparent); }
.ex-topo { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.ex-topo path { fill: none; stroke: #fff; stroke-opacity: 0.09; stroke-width: 1.3; }
.ex-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; font-size: 0.86rem; color: rgba(255, 255, 255, 0.7); }
.ex-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.ex-crumbs a { color: rgba(255, 255, 255, 0.88); text-decoration: none; }
.ex-crumbs a:hover { text-decoration: underline; }
.ex-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr); align-items: end; gap: 36px; margin-top: 18px; }
.ex-kicker { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.8); }
.ex-mark { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 800 0.85rem/1 var(--d); letter-spacing: 0.02em; }
.ex-mark.is-logo { height: auto; padding: 4px 10px; border: 1px solid var(--line); background: #fff; }
.ex-mark.is-logo img { display: block; width: auto; height: 24px; }
.ex-lead { max-width: 50ch; margin-top: 14px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.82); }
.ex-facts { padding: 20px 22px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 20px; background: rgba(255, 255, 255, 0.07); }
.ex-facts h2 { margin-bottom: 12px; font: 600 0.95rem/1.2 var(--b); letter-spacing: 0; color: rgba(255, 255, 255, 0.75); }
.ex-facts dl { display: grid; gap: 12px; }
.ex-facts dl > div { display: grid; gap: 2px; }
.ex-facts dt { font-size: 0.82rem; color: rgba(255, 255, 255, 0.66); }
.ex-facts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font: 800 1.45rem/1.15 var(--d); }
.ex-facts dd small { font: 400 0.85rem var(--b); color: rgba(255, 255, 255, 0.7); }
.ex-facts-link { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 0.92rem; font-weight: 600; }
.ex-chip { display: inline-block; padding: 5px 9px; border-radius: 99px; font: 600 0.78rem/1 var(--b); vertical-align: 2px; }
.ex-chip-ok { background: var(--ok-soft); color: var(--ok); }
.ex-chip-warn { background: var(--warn-soft); color: var(--warn); }
.ex-chip-stale { background: var(--stale-soft); color: var(--stale); }

/* Calculator console */
.ex-console { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); margin-top: 30px; overflow: hidden; border-radius: 26px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); }
.ex-console-inputs { display: grid; align-content: start; gap: 22px; min-width: 0; padding: 28px 30px; }
.ex-console-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ex-console h2 { font-size: 1.35rem; }
.ex-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--mute); }
.ex-preset { min-height: 38px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font: 600 0.84rem var(--b); cursor: pointer; }
.ex-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.ex-field { display: grid; gap: 8px; min-width: 0; }
.ex-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ex-field-head label { font: 600 1rem var(--b); }
.ex-help { font-size: 0.9rem; color: var(--mute); }
.ex-input { display: inline-flex; align-items: center; gap: 6px; min-width: 150px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.ex-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.ex-input input { width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: 800 1.35rem/1.2 var(--d); text-align: right; font-variant-numeric: tabular-nums; }
.ex-input input:focus { outline: none; }
.ex-input > span { white-space: nowrap; font-size: 0.85rem; color: var(--mute); }
.ex-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; --fill: 20%; }
.ex-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--fill), #e3e9e4 var(--fill)); }
.ex-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border: 4px solid var(--ink); border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.ex-range::-moz-range-track { height: 8px; border-radius: 99px; background: #e3e9e4; }
.ex-range::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.ex-range::-moz-range-thumb { width: 18px; height: 18px; border: 4px solid var(--ink); border-radius: 50%; background: #fff; }
.ex-range:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 99px; }
.ex-reference { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ex-reference legend { margin-bottom: 2px; padding: 0; font: 600 1rem var(--b); }
.ex-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-seg-btn { display: grid; gap: 2px; min-height: 60px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font: 600 0.9rem var(--b); text-align: left; cursor: pointer; }
.ex-seg-btn b { font: 800 1.05rem var(--d); }
.ex-seg-btn small { font-size: 0.78rem; font-weight: 400; color: var(--mute); }
.ex-seg-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ex-advanced { padding-top: 14px; border-top: 1px solid var(--line); }
.ex-advanced > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 0.95rem; font-weight: 600; list-style: none; cursor: pointer; }
.ex-advanced > summary::-webkit-details-marker { display: none; }
.ex-advanced > summary::after { content: "+"; margin-left: auto; font: 800 1.2rem/1 var(--d); color: var(--mute); }
.ex-advanced[open] > summary::after { content: "−"; }
.ex-advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 12px; }
.ex-advanced-grid label { display: grid; gap: 6px; min-width: 0; font-size: 0.92rem; font-weight: 600; }
.ex-advanced-grid small { font-size: 0.82rem; font-weight: 400; color: var(--mute); }
.ex-warning { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 0.9rem; font-weight: 600; }
.ex-assumptions { display: grid; gap: 4px; margin-top: 14px; padding-left: 18px; font-size: 0.88rem; color: var(--mute); }

/* Result panel */
.ex-result { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 28px 30px 24px; background: var(--ink); color: #fff; }
.ex-result::before { content: ""; position: absolute; right: -25%; bottom: -35%; z-index: -1; width: 90%; height: 80%; background: radial-gradient(closest-side, var(--glow), transparent); }
.ex-result-label { font: 600 0.95rem/1.3 var(--b); color: rgba(255, 255, 255, 0.8); }
.ex-result-total { margin-top: 4px; font: 800 clamp(2.6rem, 5vw, 3.9rem)/1 var(--d); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ex-result-total output { display: inline-block; }
.ex-result-sub { margin-top: 8px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.72); }
.ex-result-sub span { font-weight: 600; color: #fff; }
.ex-split { display: grid; gap: 10px; }
.ex-split-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }
.ex-split-row b { font-weight: 600; white-space: nowrap; color: #fff; }
.ex-bar { display: flex; height: 14px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.ex-bar i { display: block; height: 100%; transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ex-bar .is-consumo { background: rgba(255, 255, 255, 0.4); }
.ex-bar .is-compensado { background: var(--accent); }
.ex-bar .is-sobrante { background: repeating-linear-gradient(135deg, #fff 0 4px, rgba(255, 255, 255, 0.35) 4px 8px); }
.ex-legend-2 { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; list-style: none; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); }
.ex-legend-2 span { display: inline-flex; align-items: center; gap: 7px; }
.ex-legend-2 i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.ex-legend-2 .is-compensado { background: var(--accent); }
.ex-legend-2 .is-sobrante { background: repeating-linear-gradient(135deg, #fff 0 3px, rgba(255, 255, 255, 0.35) 3px 6px); }
.ex-rows { display: grid; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.ex-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.ex-rows dt { font-size: 0.92rem; color: rgba(255, 255, 255, 0.8); }
.ex-rows dd { text-align: right; }
.ex-rows dd span { display: block; font: 800 1.2rem/1.1 var(--d); }
.ex-rows dd small { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.66); }
.ex-result-note { margin-top: auto; font-size: 0.8rem; color: rgba(255, 255, 255, 0.66); }

/* Readable controls: borders are dark enough for WCAG 1.4.11 (3:1) on white. */
.ex-input { border: 2px solid #5f7470; }
.ex-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent); }
.ex-preset { border: 1.5px solid #5f7470; }
.ex-seg-btn { border: 1.5px solid #5f7470; }
.ex-estrato-option span { border: 1.5px solid #5f7470; }
.ex-estrato-option input:disabled + span { opacity: 0.4; cursor: not-allowed; border-style: dashed; }
.ex-range::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--fill), #cfd8d3 var(--fill)); }
.ex-range::-moz-range-track { background: #cfd8d3; }

/* Tooltips: native <details>, so they work with keyboard, touch and no JavaScript. */
.ex-tip { position: relative; display: inline-block; margin-left: 6px; vertical-align: middle; font-weight: 400; }
.ex-tip summary { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 0.8rem/1 var(--b); cursor: pointer; list-style: none; opacity: 0.85; }
.ex-tip summary::-webkit-details-marker { display: none; }
.ex-tip summary:hover, .ex-tip[open] summary { opacity: 1; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ex-tip p { position: absolute; z-index: 10; top: calc(100% + 8px); left: -6px; width: min(300px, 80vw); padding: 12px 14px; border-radius: 12px; background: #fff; color: var(--text); font: 400 0.85rem/1.45 var(--b); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.ex-facts .ex-tip p { color: var(--text); }
/* Open upward when a tooltip sits against a clipping container's bottom edge. */
.ex-tip.is-up p { top: auto; bottom: calc(100% + 8px); }
.ex-label-tip { display: inline-flex; align-items: center; }
.ex-facts-note { margin-top: 12px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); }
.ex-explain { margin-top: 24px; margin-bottom: 32px; padding: 18px 20px; border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; background: var(--card); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ex-explain p { color: var(--text); font-size: 0.97rem; }

/* Section rhythm and contrast: alternate tinted sections and lift cards with a clear border and shadow. */
.ex-body > section:nth-of-type(even) { background: #e4ebe6; }
.ex-card, .ex-steps li, .ex-faq details, .ex-table, .ex-others a, .ex-other, .ex-cta, .ex-formula { box-shadow: 0 1px 3px rgba(11, 31, 35, 0.12); }
.ex-table tr.is-selected td { background: #ffe9a8 !important; font-weight: 600; }
.ex-tariff-note { margin-top: 18px; }
.ex-console-inputs { position: relative; z-index: 2; }
.ex-tip[open] p { z-index: 20; }
.ex-facts-text { margin-top: 8px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }
.ex-fixed-value { font: 800 1.25rem/1.2 var(--d); color: var(--text); white-space: nowrap; }
.ex-fixed-label { display: inline-flex; align-items: center; font: 600 1rem var(--b); }

/* Estrato selector */
.ex-estrato { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ex-estrato legend { margin-bottom: 2px; padding: 0; font: 600 1rem var(--b); }
.ex-estrato-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ex-estrato-option { position: relative; display: block; }
.ex-estrato-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ex-estrato-option span { display: grid; place-items: center; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: 800 1.1rem/1 var(--d); cursor: pointer; }
.ex-estrato-option input:checked + span { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ex-estrato-option input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Supporting sections */
.ex-body { background: var(--paper); }
.ex-section { padding: 64px 0; border-top: 1px solid var(--line); }
.ex-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; padding: 0; list-style: none; }
.ex-steps li { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.ex-step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font: 800 1rem/1 var(--d); }
.ex-steps h3 { margin: 14px 0 8px; }
.ex-steps p { font-size: 0.95rem; color: var(--mute); }
.ex-steps strong { color: var(--text); }
.ex-formula { margin-top: 16px; padding: 20px 24px; border-radius: 18px; background: var(--ink); color: #fff; }
.ex-formula strong { color: var(--accent); }
.ex-formula-ex { margin-top: 8px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.78); }
.ex-stack { display: flex; height: 46px; margin-top: 24px; margin-bottom: 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.ex-stack > span { display: block; min-width: 2px; }
.ex-seg-g { background: #0e4d57; color: #fff; }
.ex-seg-t { background: #3f7fd8; color: #fff; }
.ex-seg-d { background: #2a9d8f; color: #fff; }
.ex-seg-cv { background: #e2552f; color: #fff; }
.ex-seg-pr { background: #e9b949; color: #1d1600; }
.ex-seg-r { background: #7d5fb8; color: #fff; }
.ex-stack > span { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px; overflow: hidden; white-space: nowrap; font-size: 0.78rem; line-height: 1.25; }
.ex-stack > span b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ex-stack > span small { font-size: 0.82rem; font-weight: 700; }
.ex-stack { min-height: 64px; }
.ex-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.ex-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 0.92rem; }
.ex-legend li i { width: 12px; height: 12px; border-radius: 4px; }
.ex-legend li b { font: 800 1rem var(--d); }
.ex-legend li.is-cv { border-color: var(--cv); background: var(--cv-soft); }
.ex-callout { margin-top: 16px; padding: 14px 16px; border-left: 4px solid var(--cv); border-radius: 0 14px 14px 0; background: var(--cv-soft); font-size: 0.95rem; }
.ex-callout.is-spaced, .ex-normativa.is-spaced { margin-top: 28px; }
.ex-callout.is-pending { border-left-color: var(--stale); background: var(--stale-soft); }
.ex-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.ex-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.ex-card ul { display: grid; gap: 6px; margin-top: 10px; padding-left: 20px; }
.ex-pending-text { margin-top: 8px; color: var(--stale); font-weight: 600; }
.ex-faq { display: grid; gap: 10px; margin-top: 22px; }
.ex-faq details { padding: 0 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.ex-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; font: 600 1.02rem/1.3 var(--b); list-style: none; cursor: pointer; }
.ex-faq summary::-webkit-details-marker { display: none; }
.ex-faq summary::after { content: "+"; font: 800 1.4rem/1 var(--d); color: var(--mute); }
.ex-faq details[open] summary::after { content: "−"; }
.ex-faq details p { max-width: 70ch; padding: 0 0 18px; color: var(--mute); }
.ex-table { width: 100%; margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; border-collapse: separate; border-spacing: 0; background: var(--card); font-size: 0.94rem; }
.ex-table th, .ex-table td { width: auto; padding: 14px 18px; border: 0; text-align: left; }
.ex-table th { background: #e9efea; color: var(--mute); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ex-table tbody tr:nth-child(odd) td { background: #fff; }
.ex-table tbody tr:nth-child(even) td { background: #f5f8f4; }
.ex-table td b { font: 800 1rem var(--d); }
.ex-table a, .ex-normativa a { color: #0f4c81; text-underline-offset: 3px; }
.ex-normativa { margin-top: 16px; font-size: 0.9rem; color: var(--mute); }
.ex-others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.ex-other { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 18px 20px; border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 18px; background: var(--card); color: var(--text); text-decoration: none; }
.ex-other:hover { border-color: var(--accent); }
.ex-other .ex-mark { grid-row: span 3; }
.ex-other-name { font-weight: 600; }
.ex-other-name small { font-weight: 400; color: var(--mute); }
.ex-other strong { font: 800 1.5rem/1.1 var(--d); }
.ex-other > small { font-size: 0.85rem; color: var(--mute); }
.ex-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.ex-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font: 600 0.95rem var(--b); text-decoration: none; }
.ex-btn:hover { background: var(--ink-2); }
.ex-foot { padding: 34px 0 60px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--mute); }
.ex-foot p + p { margin-top: 8px; }
.ex-foot-nav a { color: var(--mute); text-underline-offset: 3px; }
.ex-foot-nav a:hover { color: var(--blue); }

@media (max-width: 980px) {
  .ex-hero-grid, .ex-console { grid-template-columns: 1fr; }
  .ex-steps { grid-template-columns: 1fr; }
  .ex-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ex-top-row { height: auto; padding: 12px 0; }
  .ex-nav { order: 3; width: 100%; }
  .ex-hero { padding: 18px 0 36px; }
  .ex-console-inputs, .ex-result { padding: 22px 20px; }
  .ex-advanced-grid, .ex-others, .ex-seg, .ex-legend { grid-template-columns: 1fr; }
  .ex-section { padding: 48px 0; }
  .ex-table thead { display: none; }
  .ex-table, .ex-table tbody, .ex-table tr, .ex-table td { display: block; width: 100%; }
  .ex-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .ex-table td { padding: 4px 0; border: 0; background: none !important; }
  .ex-table td::before { content: attr(data-label); display: block; font-size: 0.78rem; color: var(--mute); }
}
