:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #252a2e;
  --muted: #6a7178;
  --line: #d8d1c5;
  --blue: #245a7a;
  --green: #36725a;
  --amber: #a06023;
  --red: #93413d;
  --shadow: 0 18px 45px rgba(37, 42, 46, 0.08);
  --sidebar-width: 292px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body.feedback-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  padding: 24px;
  background: #20282b;
  color: #f6f1e8;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #f6f1e8;
  color: #20282b;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf8;
  font-weight: 800;
}

.mobile-menu-lines {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.mobile-menu-lines::before {
  position: absolute;
  inset: 3px 0 auto;
  height: 2px;
  background: currentColor;
  content: "";
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3,
.panel p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.15;
}

.brand p {
  color: #bfc5c3;
  font-size: 13px;
}

.category-nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #edf0ec;
  text-align: left;
}

.nav-label,
.module-nav-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button:hover,
.nav-button.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.nav-button,
.module-nav-button,
.mobile-menu-button,
.brand-mark,
.source-box,
.search-field input,
.form-field input,
.form-field select,
.panel select,
.icon-button,
.text-button,
.panel,
.module-card,
.home-hero,
.home-need-card,
.home-category-button,
.result-item,
.calc-note,
.module-help,
.pump-hero,
.pump-section,
.pump-card {
  border-radius: var(--radius);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf0ec;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  transform: none !important;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.nav-icon-text {
  display: block;
  transform: none !important;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.nav-button[data-category="air-ventilation"],
.module-nav-button[data-category="air-ventilation"],
.module-card[data-category="air-ventilation"],
.home-need-card[data-category="air-ventilation"] {
  --module-accent: #4f7d8c;
}

.nav-button[data-category="overview"] {
  --module-accent: #f6f1e8;
}

.nav-button[data-category="eau-reseaux"],
.nav-button[data-category="eau-réseaux"],
.module-nav-button[data-category="eau-reseaux"],
.module-nav-button[data-category="eau-réseaux"],
.module-card[data-category="eau-reseaux"],
.module-card[data-category="eau-réseaux"],
.home-need-card[data-category="eau-reseaux"],
.home-need-card[data-category="eau-réseaux"] {
  --module-accent: #236f9a;
}

.nav-button[data-category="energie"],
.nav-button[data-category="énergie"],
.module-nav-button[data-category="energie"],
.module-nav-button[data-category="énergie"],
.module-card[data-category="energie"],
.module-card[data-category="énergie"],
.home-need-card[data-category="energie"],
.home-need-card[data-category="énergie"] {
  --module-accent: #b36b00;
}

.nav-button[data-category="fluides"],
.module-nav-button[data-category="fluides"],
.module-card[data-category="fluides"],
.home-need-card[data-category="fluides"] {
  --module-accent: #7a5c9e;
}

.nav-button[data-category="thermique"],
.module-nav-button[data-category="thermique"],
.module-card[data-category="thermique"],
.home-need-card[data-category="thermique"] {
  --module-accent: #93413d;
}

.nav-button[data-category="utilitaires"],
.module-nav-button[data-category="utilitaires"],
.module-card[data-category="utilitaires"],
.home-need-card[data-category="utilitaires"] {
  --module-accent: #68717c;
}

.nav-button .nav-icon {
  color: var(--module-accent, currentColor);
}

.nav-count {
  color: #c6cec9;
  font-size: 12px;
}

.nav-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.7;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.nav-group.is-expanded .nav-chevron {
  transform: rotate(-135deg);
}

.nav-chevron.is-empty {
  visibility: hidden;
}

.module-subnav {
  display: none;
  gap: 2px;
  padding: 2px 0 6px 32px;
}

.nav-group.is-expanded .module-subnav {
  display: grid;
}

.module-nav-button {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #cdd4d1;
  text-align: left;
}

.module-nav-button:hover,
.module-nav-button.is-selected {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fffdf8;
}

.module-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--module-accent, var(--blue));
}

.module-status-dot.ready {
  background: #70b58f;
}

.module-status-dot.draft {
  background: #d7a259;
}

.module-status-dot.backlog {
  background: #82909a;
}

.source-box {
  display: grid;
  gap: 0;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #c9d0cd;
}

.mobile-source-box {
  display: none;
}

.source-box strong {
  color: #fffdf8;
}

.source-box-section {
  display: block;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.35;
}

.source-box-section:first-child {
  border-top: 0;
}

.source-kicker,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.source-kicker {
  color: #d7b46a;
}

.credit-line {
  color: #bfc5c3;
}

.credit-line a {
  color: #fffdf8;
  font-weight: 800;
  text-decoration: none;
}

.credit-line a:hover {
  color: #d7b46a;
  text-decoration: underline;
}

.source-link {
  width: 100%;
  color: #d7b46a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.source-link:hover {
  color: #fffdf8;
  text-decoration: underline;
}

.workspace {
  grid-column: 2;
  min-width: 0;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 24px;
}

.topbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.topbar h2 {
  font-size: 28px;
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-field input,
.form-field input,
.form-field select,
.panel select {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
}

.search-field input {
  width: min(34vw, 360px);
}

.search-field input:focus,
.form-field input:focus,
.form-field select:focus,
.panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 90, 122, 0.14);
}

.form-field input[readonly] {
  background: #ede8dd;
  color: var(--muted);
  cursor: not-allowed;
}

.icon-button,
.text-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
}

.icon-button {
  width: 42px;
  font-size: 18px;
}

.text-button {
  padding: 8px 12px;
  font-weight: 700;
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  font-size: 23px;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.panel-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel h3 {
  font-size: 18px;
}

.count-pill,
.status-pill,
.source-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: #f7f3ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  max-height: 680px;
  overflow: auto;
}

.module-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-left: 4px solid var(--module-accent, var(--line));
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.module-card:hover,
.module-card.is-selected {
  background: #fff8ec;
}

.module-card h4 {
  margin: 0;
  font-size: 16px;
}

.module-card p {
  color: var(--muted);
  font-size: 13px;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.home-landing {
  display: grid;
  gap: 22px;
  padding: 18px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--line);
  background: #fff8ec;
}

.home-hero-copy {
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: start;
}

.home-hero h3,
.home-section-head h3,
.home-browse h3 {
  margin: 0;
}

.home-hero h3 {
  max-width: min(100%, 1100px);
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.02;
}

.home-hero p {
  max-width: min(100%, 1080px);
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.home-primary {
  border-color: rgba(36, 90, 122, 0.35);
  background: #245a7a;
  color: #fffdf8;
}

.home-primary:hover {
  background: #1e4c67;
}

.home-privacy-note {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(185, 123, 32, 0.28);
  border-left: 5px solid var(--accent);
  background: #fff8ec;
}

.home-privacy-note strong {
  color: var(--text);
  font-size: 18px;
}

.home-privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

@media (min-width: 1280px) {
  .home-hero {
    padding: 32px 42px;
  }

  .home-hero-copy {
    justify-items: center;
    text-align: center;
  }

  .home-hero h3,
  .home-hero p {
    max-width: none;
  }

  .home-actions {
    justify-content: center;
  }
}

.home-needs {
  display: grid;
  gap: 14px;
}

.home-section-head {
  display: grid;
  gap: 2px;
}

.home-need-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-need-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--module-accent, var(--line));
  background: #fffdf8;
  color: inherit;
  text-align: left;
}

.home-need-card:hover {
  border-color: rgba(36, 90, 122, 0.42);
  background: #f8fbf8;
}

.home-need-card span {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-need-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.home-need-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.home-browse {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.home-category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.home-category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f7f3ec;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.home-category-button:hover {
  background: #fffdf8;
  border-color: rgba(160, 96, 35, 0.35);
}

.home-category-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-category-button small {
  color: var(--amber);
  font-weight: 800;
}

.status-pill.ready {
  border-color: rgba(54, 114, 90, 0.35);
  background: rgba(54, 114, 90, 0.1);
  color: var(--green);
}

.status-pill.draft {
  border-color: rgba(160, 96, 35, 0.32);
  background: rgba(160, 96, 35, 0.1);
  color: var(--amber);
}

.status-pill.backlog {
  border-color: rgba(36, 90, 122, 0.28);
  background: rgba(36, 90, 122, 0.09);
  color: var(--blue);
}

.calculator-mount {
  padding: 16px;
}

.calc-form {
  display: grid;
  gap: 16px;
}

.calc-form-actions {
  display: flex;
  justify-content: flex-end;
}

.calc-form-actions-split {
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.calc-form-actions .text-button {
  min-width: 170px;
}

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

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label,
.inline-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.result-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-left: 4px solid var(--blue);
  background: #f7f3ec;
  min-height: 76px;
}

.result-item:nth-child(2n) {
  border-left-color: var(--green);
}

.result-section {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-section:first-child {
  margin-top: 0;
}

.result-item.is-featured {
  border-left-color: var(--green);
  background: #edf6f1;
  min-height: 88px;
}

.result-item.is-featured strong {
  font-size: 22px;
}

.result-item.is-wide,
.result-item.is-note {
  grid-column: 1 / -1;
}

.result-item.is-note {
  min-height: auto;
  border-left-color: var(--amber);
  background: #fff8ec;
}

.result-item.is-note strong {
  font-size: 15px;
  line-height: 1.45;
}

.result-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-item strong {
  font-size: 19px;
}

.argus-intro,
.argus-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.argus-intro {
  border-left: 4px solid var(--amber);
  background: #fff8ec;
}

.argus-intro strong,
.argus-section h4 {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.argus-intro p,
.argus-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.argus-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}

.argus-section-head a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.argus-bar-list {
  display: grid;
  gap: 8px;
}

.argus-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 1.7fr) minmax(100px, auto) minmax(92px, auto);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.argus-bar-row strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.argus-bar-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.argus-bar-row b {
  text-align: right;
  font-size: 18px;
}

.argus-bar-row small {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.argus-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ddd1;
}

.argus-bar-track span {
  display: block;
  width: calc(var(--argus-bar) * 100%);
  height: 100%;
  margin: 0;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.argus-chart-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.argus-chart {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.argus-chart-bg {
  fill: #fff;
}

.argus-chart .argus-grid-line {
  stroke: #edf0f2;
  stroke-width: 1;
}

.argus-chart .argus-line {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.argus-chart .argus-point {
  fill: #fff;
  stroke: var(--line-color);
  stroke-width: 1.6;
}

.argus-chart text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.argus-chart .argus-axis-title {
  fill: #68717c;
  font-size: 11px;
}

.argus-chart .argus-axis-label {
  fill: #8a929b;
}

.argus-chart .argus-line-label {
  font-size: 11px;
  font-weight: 900;
}

.argus-muted {
  margin-bottom: 8px !important;
  font-size: 13px;
}

.argus-evolution-grid,
.argus-snapshot-grid {
  display: grid;
  gap: 10px;
}

.argus-evolution-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.argus-evolution-card,
.argus-snapshot-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.argus-evolution-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: center;
}

.argus-evolution-card span,
.argus-snapshot-card h5 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.argus-evolution-card strong {
  color: #c71414;
  font-size: 22px;
  line-height: 1.05;
}

.argus-evolution-card small {
  color: var(--muted);
  font-weight: 700;
}

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

.argus-snapshot-card {
  padding: 12px;
}

.argus-snapshot-card h5 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
}

.argus-snapshot-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.argus-snapshot-card div {
  min-width: 0;
}

.argus-snapshot-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.argus-snapshot-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.argus-section .simple-table-wrap {
  max-width: 100%;
}

.argus-section .simple-reference-table {
  min-width: 760px;
}

@media (max-width: 1080px) {
  .argus-bar-row {
    grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr);
  }

  .argus-bar-track {
    grid-column: 1 / -1;
  }

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

@media (max-width: 720px) {
  .argus-evolution-grid,
  .argus-snapshot-grid,
  .argus-snapshot-card dl {
    grid-template-columns: 1fr;
  }

  .argus-chart {
    min-width: 680px;
  }
}

@media (min-width: 1180px) {
  .calculator-panel .form-grid,
  .calculator-panel .result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calculator-panel .result-section,
  .calculator-panel .result-item.is-wide,
  .calculator-panel .result-item.is-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .argus-section-head,
  .argus-bar-row {
    grid-template-columns: 1fr;
  }

  .argus-section-head {
    display: grid;
  }

  .argus-bar-row b,
  .argus-bar-row small {
    text-align: left;
  }

  .argus-intro,
  .argus-section {
    padding: 13px;
  }

  .argus-chart {
    min-width: 680px;
  }
}

.calc-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid var(--amber);
  background: #fff8ec;
  color: #6e563f;
  font-size: 13px;
}

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

.module-reference-field textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.35;
}

.module-reference-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.module-print-logic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.module-print-logic-toggle input {
  width: 16px;
  height: 16px;
}

.form-field label.has-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.apparatus-row strong.has-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.field-tip::after {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  width: min(320px, calc(100vw - 40px));
  padding: 10px 12px;
  border: 1px solid rgba(32, 40, 43, 0.2);
  background: #20282b;
  color: #fffdf8;
  content: attr(data-tip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
  box-shadow: var(--shadow);
}

.field-tip:hover::after,
.field-tip:focus::after {
  display: block;
}

.pump-module {
  display: grid;
  gap: 16px;
  max-width: 100%;
  min-width: 0;
}

.pump-hero,
.pump-section,
.pump-card {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.pump-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.pump-hero > *,
.pump-section,
.pump-card,
.pump-section-head,
.pump-card-head {
  min-width: 0;
}

.pump-hero h3,
.pump-hero p,
.pump-section-head h4,
.pump-card-head h4 {
  margin: 0;
}

.pump-hero h3 {
  font-size: 26px;
  line-height: 1.12;
}

.pump-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pump-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pump-actions .text-button {
  padding: 8px 14px;
  font-weight: 800;
}

.pump-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.pump-section-head,
.pump-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.pump-section-head h4,
.pump-card-head h4 {
  font-size: 18px;
}

.pump-section-head span,
.pump-card-head span {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.pump-point-grid,
.pump-summary-table {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) repeat(2, minmax(120px, 1fr));
  gap: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
}

.pump-point-grid > *,
.pump-summary-table > * {
  min-height: 42px;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pump-point-grid > *:nth-child(3n),
.pump-summary-table > *:nth-child(3n) {
  border-right: 0;
}

.pump-point-grid > *:nth-last-child(-n + 3),
.pump-summary-table > *:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.pump-point-head,
.pump-summary-head {
  background: #f7f3ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pump-point-grid strong,
.pump-summary-table strong {
  display: flex;
  align-items: center;
  background: #fffaf1;
}

.pump-summary-table strong.is-result {
  color: var(--green);
}

.pump-point-grid input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.pump-range {
  width: 100%;
  min-height: 28px;
  padding: 0;
  accent-color: var(--blue);
}

.pump-network-grid {
  align-items: end;
}

.pump-valve-grid {
  align-items: end;
}

.pump-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.pump-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.pump-chart {
  min-height: 320px;
  overflow: auto;
}

.pump-chart-svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}

.pump-grid-line {
  stroke: rgba(37, 42, 46, 0.18);
  stroke-width: 1;
}

.pump-grid-line.is-vertical {
  stroke: rgba(37, 42, 46, 0.09);
}

.pump-axis {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.pump-axis-label,
.pump-axis-title,
.pump-legend text,
.pump-eq-label {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pump-axis-title,
.pump-eq-label {
  fill: var(--ink);
  font-weight: 900;
}

.pump-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pump-line.is-pump {
  stroke: #315fbd;
  stroke-width: 4;
}

.pump-line.is-network {
  stroke: #78a900;
  stroke-width: 4;
}

.pump-line.is-network.is-reference {
  opacity: 0.45;
  stroke-dasharray: 8 8;
}

.pump-line.is-network-total {
  stroke: var(--amber);
  stroke-width: 4;
}

.pump-point {
  fill: #fffdf8;
  stroke: #123aa3;
  stroke-width: 3;
}

.pump-equilibrium {
  fill: var(--green);
  stroke: #fffdf8;
  stroke-width: 3;
}

.pump-eq-guide {
  stroke: rgba(54, 114, 90, 0.45);
  stroke-dasharray: 7 7;
  stroke-width: 2;
}

.pump-reading {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--amber);
  background: #fff8ec;
  color: #6e563f;
}

.pump-reading strong {
  color: var(--ink);
}

.module-print-report {
  display: none;
}

@media (max-width: 900px) {
  .pump-hero,
  .pump-section-head,
  .pump-card-head {
    align-items: start;
    flex-direction: column;
  }

  .pump-section-head span,
  .pump-card-head span {
    text-align: left;
  }

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

  .pump-actions .text-button {
    flex: 1 1 160px;
  }

  .pump-visual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .field-tip::after {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .pump-module {
    gap: 12px;
    overflow: hidden;
  }

  .pump-hero,
  .pump-section,
  .pump-card {
    padding: 12px;
    overflow: hidden;
  }

  .pump-hero {
    gap: 12px;
  }

  .pump-hero h3 {
    font-size: 22px;
  }

  .pump-hero p:not(.eyebrow) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .pump-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pump-actions .text-button {
    width: 100%;
    min-width: 0;
  }

  .pump-section-head,
  .pump-card-head {
    gap: 6px;
  }

  .pump-section-head h4,
  .pump-card-head h4 {
    font-size: 17px;
  }

  .pump-section-head span,
  .pump-card-head span {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.35;
  }

  .pump-point-grid,
  .pump-summary-table {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(76px, 0.8fr) minmax(88px, 1fr) minmax(88px, 1fr);
    overflow-x: hidden;
  }

  .pump-summary-table {
    grid-template-columns: minmax(112px, 1.25fr) minmax(82px, 0.9fr) minmax(82px, 0.9fr);
  }

  .pump-point-grid > *,
  .pump-summary-table > * {
    min-height: 40px;
    padding: 8px 7px;
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .pump-point-head,
  .pump-summary-head {
    font-size: 11px;
    line-height: 1.25;
  }

  .pump-point-grid input {
    min-height: 40px;
    padding: 6px 7px;
    font-size: 16px;
  }

  .pump-chart {
    max-width: 100%;
    min-height: 260px;
  }

  .pump-chart-svg {
    min-width: 540px;
  }
}

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

  .feedback-fab,
  .feedback-overlay,
  .feedback-modal,
  .feedback-actions,
  .feedback-submit,
  .feedback-cancel,
  .feedback-close,
  .calc-form-actions,
  .pump-actions,
  .pac-actions,
  .pac-actions-split,
  .ece-pac-bridge,
  [data-generic-print],
  [data-pump-print],
  [data-pump-reset],
  [data-ece-print],
  [data-ece-zero],
  [data-ece-open-pac],
  [data-pac-print],
  [data-pac-zero],
  [data-combustion-zero],
  [data-evac-zero],
  [data-house-evac-zero],
  [data-ddv-zero],
  [data-plumbing-zero] {
    display: none !important;
  }

  details[open] > summary ~ * {
    visibility: visible !important;
  }

  details:not([open]) > summary ~ * {
    display: none !important;
  }

  body.module-print-mode {
    background: #fff !important;
    color: #111 !important;
  }

  body.module-print-mode .sidebar,
  body.module-print-mode .topbar,
  body.module-print-mode .module-panel,
  body.module-print-mode .report-panel,
  body.module-print-mode .source-box,
  body.module-print-mode .mobile-source-box,
  body.module-print-mode .calc-form-actions,
  body.module-print-mode .field-tip,
  body.module-print-mode .apparatus-row.is-print-empty,
  body.module-print-mode .feedback-fab,
  body.module-print-mode .feedback-overlay {
    display: none !important;
  }

  body.module-print-mode .app-shell,
  body.module-print-mode .workspace,
  body.module-print-mode .work-grid,
  body.module-print-mode .calculator-panel,
  body.module-print-mode .calculator-mount {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body.module-print-mode .app-shell {
    display: none !important;
  }

  body.module-print-mode .module-print-report {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111 !important;
    background: #fff !important;
  }

  body.module-print-mode .module-print-report > * {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }

  body.module-print-mode .module-print-report .calc-form-actions,
  body.module-print-mode .module-print-report .field-tip {
    display: none !important;
  }

  body.module-print-mode .panel-head,
  body.module-print-mode .calc-form,
  body.module-print-mode .result-item,
  body.module-print-mode .module-help,
  body.module-print-mode .calc-note {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  body.module-print-mode .panel-head {
    padding: 0 0 5mm !important;
    border: 0 !important;
  }

  body.module-print-mode .calc-form {
    gap: 4mm;
  }

  body.module-print-mode [data-print-logic] {
    display: block !important;
    width: 100% !important;
    margin-top: 4mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .print-module-title {
    display: block;
    padding-bottom: 5mm;
    border-bottom: 1px solid #ddd;
  }

  body.module-print-mode .print-module-title span {
    display: block;
    color: #666;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.module-print-mode .print-module-title h1 {
    margin: 1mm 0 0;
    color: #111;
    font-size: 18pt;
    line-height: 1.1;
  }

  body.module-print-mode .print-module-title p {
    margin: 1.5mm 0 0;
    color: #555;
    font-size: 10pt;
    font-weight: 800;
  }

  body.module-print-mode .form-field input,
  body.module-print-mode .form-field select,
  body.module-print-mode .form-field textarea {
    min-height: 8mm;
  }

  body.module-print-mode .print-field-value {
    display: block;
    min-height: 8mm;
    padding: 1.6mm 2mm;
    border: 1px solid #bbb;
    background: #fff !important;
    color: #111 !important;
    font-size: 9pt;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  body.module-print-mode .print-field-value.is-empty {
    color: #777 !important;
  }

  body.module-print-mode .form-grid,
  body.module-print-mode .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.module-print-mode .apparatus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }

  body.module-print-mode .apparatus-row {
    padding: 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode details.module-help:not([open]) {
    display: none !important;
  }

  body.module-print-mode .module-print-report .module-help {
    break-inside: auto;
    page-break-inside: auto;
  }

  body.module-print-mode .module-print-report .module-help:has(.simple-table-wrap),
  body.module-print-mode .module-print-report .module-help:has(.reference-table),
  body.module-print-mode .module-print-report .module-help:has(.référence-table) {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report .module-help summary {
    min-height: 0;
    padding: 2mm 0;
    border-bottom: 1px solid #ddd;
    color: #111;
    font-size: 10pt;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  body.module-print-mode .module-print-report .module-help summary::after {
    display: none;
  }

  body.module-print-mode .module-print-report .module-help-content {
    display: block;
    padding: 2mm 0 0;
    color: #333;
    break-before: avoid-page;
    page-break-before: avoid;
  }

  body.module-print-mode .module-print-report .module-help-content > h4,
  body.module-print-mode .module-print-report .module-help-content > h5,
  body.module-print-mode .module-print-report .module-help-content > p:first-child {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  body.module-print-mode .module-print-report .simple-table-wrap {
    display: block;
    width: 100%;
    overflow: visible;
    border-color: #bbb;
    break-before: avoid-page;
    break-inside: avoid;
    page-break-before: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report table,
  body.module-print-mode .module-print-report .simple-reference-table,
  body.module-print-mode .module-print-report .simple-référence-table {
    width: 100% !important;
    min-width: 0;
    table-layout: fixed;
    font-size: 8pt;
  }

  body.module-print-mode .module-print-report table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report .simple-reference-table th,
  body.module-print-mode .module-print-report .simple-reference-table td,
  body.module-print-mode .module-print-report .simple-référence-table th,
  body.module-print-mode .module-print-report .simple-référence-table td {
    padding: 1.6mm 2mm;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.module-print-mode .module-print-report .reference-table,
  body.module-print-mode .module-print-report .référence-table {
    width: 100%;
    overflow: visible;
    break-before: avoid-page;
    break-inside: avoid;
    page-break-before: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .argus-intro,
  body.module-print-mode .argus-section {
    padding: 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
    border-color: #bbb;
    background: #fff !important;
  }

  body.module-print-mode .argus-section-head {
    margin-bottom: 2mm;
  }

  body.module-print-mode .argus-bar-row {
    grid-template-columns: minmax(34mm, 1.1fr) minmax(38mm, 1.7fr) minmax(24mm, auto) minmax(24mm, auto);
    min-height: 0;
    padding: 1.6mm 2mm;
    gap: 2mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .argus-chart-wrap {
    width: 100%;
    overflow: visible;
    border-color: #bbb;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .argus-chart {
    width: 100% !important;
    min-width: 0;
  }

  body.module-print-mode .module-print-report--pump .pump-module {
    display: block !important;
    width: 100% !important;
  }

  body.module-print-mode .module-print-report--pump .pump-hero,
  body.module-print-mode .module-print-report--pump .pump-section,
  body.module-print-mode .module-print-report--pump .pump-card,
  body.module-print-mode .module-print-report--pump .pump-visual-grid,
  body.module-print-mode .module-print-report--pump #calcResults {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report--pump .pump-section,
  body.module-print-mode .module-print-report--pump .pump-card {
    padding: 3mm;
    border-color: #bbb;
    background: #fff !important;
  }

  body.module-print-mode .module-print-report--pump .pump-point-grid,
  body.module-print-mode .module-print-report--pump .pump-summary-table {
    width: 100%;
    overflow: visible;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report--pump .pump-chart,
  body.module-print-mode .module-print-report--pump .pump-chart-svg {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report--pump .pump-chart-svg {
    max-height: 90mm;
  }

  body.module-print-mode .module-print-report--houseEvac .form-grid {
    display: block !important;
  }

  body.module-print-mode .module-print-report--houseEvac .form-field {
    margin-bottom: 3mm;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-grid {
    display: table !important;
    width: 100%;
    border: 1px solid #bbb;
    border-collapse: collapse;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-row {
    display: table-row !important;
    padding: 0;
    border: 0;
    background: #fff !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-row > * {
    display: table-cell !important;
    padding: 1.6mm 2mm;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-row strong {
    width: 48%;
    color: #111;
    font-size: 8.5pt;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-row span:not(.print-field-value) {
    width: 32%;
    color: #444;
    font-size: 8pt;
  }

  body.module-print-mode .module-print-report--houseEvac .apparatus-row .print-field-value {
    width: 20%;
    min-height: 0;
    border: 0;
    background: #fff !important;
    text-align: right;
  }

}

.apparatus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.apparatus-row {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.apparatus-row strong {
  font-size: 13px;
}

.apparatus-row span {
  color: var(--muted);
  font-size: 12px;
}

.apparatus-row.is-heading {
  grid-column: 1 / -1;
  background: var(--surface);
}

.apparatus-row.is-heading strong {
  text-transform: uppercase;
  letter-spacing: 0;
}

.apparatus-row input {
  width: 100%;
}

.print-module-title {
  display: none;
}

.lookup-table {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) repeat(6, minmax(72px, 0.8fr));
  gap: 1px;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.lookup-table > * {
  min-height: 34px;
  padding: 7px 8px;
  background: var(--surface-strong);
  font-size: 12px;
}

.lookup-head {
  background: #f7f3ec;
  color: var(--muted);
  font-weight: 800;
}

.reference-table,
.référence-table {
  display: grid;
  gap: 1px;
  width: 100%;
  max-width: 100%;
  margin: 10px 0 14px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.reference-table > *,
.référence-table > * {
  min-height: 34px;
  min-width: 0;
  padding: 7px 8px;
  background: var(--surface-strong);
  font-size: 12px;
}

.reference-head,
.référence-head {
  background: #f7f3ec;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.simple-table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 10px 0 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.simple-reference-table,
.simple-référence-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  background: var(--surface-strong);
  font-size: 12px;
}

.simple-reference-table th,
.simple-reference-table td,
.simple-référence-table th,
.simple-référence-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.simple-reference-table th,
.simple-référence-table th {
  background: #f7f3ec;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.simple-reference-table tr:last-child td,
.simple-référence-table tr:last-child td {
  border-bottom: 0;
}

.simple-reference-table td:not(:first-child),
.simple-reference-table th:not(:first-child),
.simple-référence-table td:not(:first-child),
.simple-référence-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.evacuation-reference-table,
.evacuation-référence-table {
  grid-template-columns: minmax(150px, 1.4fr) minmax(110px, 1fr) repeat(3, minmax(90px, 0.8fr));
}

.plumbing-reference-table {
  grid-template-columns: minmax(220px, 1.8fr) minmax(72px, 0.5fr) repeat(3, minmax(96px, 0.7fr));
}

.plumbing-connection-table {
  grid-template-columns: minmax(240px, 1.8fr) repeat(5, minmax(92px, 0.7fr));
}

.cold-water-connection-table {
  grid-template-columns: minmax(190px, 1.5fr) repeat(6, minmax(76px, 0.7fr));
}

.evacuation-reference-table.is-compact,
.evacuation-référence-table.is-compact {
  grid-template-columns: minmax(150px, 1.4fr) minmax(130px, 1fr) minmax(80px, 0.7fr);
}

.segment-table {
  display: grid;
  grid-template-columns: 42px 82px 68px 64px 66px 66px 66px 74px 54px;
  gap: 1px;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.segment-table > * {
  min-height: 38px;
  padding: 7px 6px;
  border: 0;
  background: var(--surface-strong);
  font-size: 12px;
}

.segment-table strong,
.segment-head,
.result-head {
  display: flex;
  align-items: center;
  font-weight: 800;
}

.segment-head,
.result-head {
  background: #f7f3ec;
  color: var(--muted);
}

.segment-output {
  overflow: auto;
}

.result-table {
  display: grid;
  grid-template-columns: 42px 60px 64px 58px 62px 48px 48px 48px 52px 60px;
  gap: 1px;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--line);
}

.result-table > * {
  min-height: 34px;
  padding: 7px 6px;
  background: var(--surface-strong);
  font-size: 12px;
}

.tube-output {
  grid-template-columns: minmax(96px, 1fr) repeat(5, minmax(76px, 1fr));
}

.conversion-reference {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) repeat(3, minmax(140px, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--line);
}

.conversion-reference > * {
  min-height: 34px;
  padding: 7px 8px;
  background: var(--surface-strong);
  font-size: 12px;
}

.report-panel pre {
  margin: 0;
  min-height: 112px;
  padding: 16px;
  white-space: pre-wrap;
  color: #293034;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
}

.feedback-fab {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 253, 248, 0.32);
  border-radius: 999px;
  background: var(--blue);
  color: #fffdf8;
  box-shadow: 0 16px 38px rgba(37, 42, 46, 0.26);
  font-size: 13px;
  font-weight: 900;
}

.feedback-fab:hover {
  background: #1d4b67;
  box-shadow: 0 18px 44px rgba(37, 42, 46, 0.32);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 20, 22, 0.62);
}

.feedback-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(216, 209, 197, 0.9);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 28px 70px rgba(12, 16, 18, 0.34);
}

.feedback-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}

.feedback-close:hover {
  background: #f4f1ea;
  color: var(--ink);
}

.feedback-heading {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 24px;
  text-align: center;
}

.feedback-heading h2,
.feedback-heading p {
  margin: 0;
}

.feedback-heading h2 {
  color: #14191e;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
}

.feedback-heading p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.feedback-form {
  display: grid;
  gap: 18px;
}

.feedback-field {
  display: grid;
  gap: 8px;
  color: #14191e;
  font-weight: 900;
}

.feedback-field small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  outline: none;
}

.feedback-field input,
.feedback-field select {
  min-height: 48px;
  padding: 0 14px;
}

.feedback-field textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 90, 122, 0.13);
}

.feedback-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.feedback-submit {
  min-height: 52px;
  border: 0;
  border-radius: 9px;
  background: #245a7a;
  color: #fffdf8;
  font-weight: 950;
}

.feedback-submit:hover {
  background: #1d4b67;
}

.feedback-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.feedback-cancel {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.feedback-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.feedback-status.is-success {
  color: var(--green);
}

.feedback-status.is-error {
  color: var(--red);
}

.feedback-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    gap: 16px;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .source-box {
    display: none;
  }

  .mobile-source-box {
    order: 100;
    display: grid;
    margin: 0 0 18px;
    background: #20282b;
    color: #c9d0cd;
    border-color: rgba(32, 40, 43, 0.18);
  }

  .category-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-group.is-expanded {
    grid-column: 1 / -1;
  }

  .module-subnav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 4px 0 0;
  }

  .workspace {
    grid-column: auto;
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .search-field input {
    width: min(48vw, 420px);
  }

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

  .home-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  body {
    min-width: 320px;
  }

  button,
  input,
  select {
    font-size: 16px;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar {
    gap: 10px;
    padding: 10px;
  }

  .brand {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-menu-button {
    display: grid;
    width: 100%;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .brand p {
    display: none;
  }

  .category-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .sidebar.is-mobile-open .category-nav {
    display: grid;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-button {
    grid-template-columns: 30px minmax(0, 1fr) auto 10px;
    gap: 8px;
    min-height: 36px;
    padding: 7px 8px;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
    border-width: 1px;
  }

  .nav-count {
    font-size: 11px;
  }

  .module-subnav {
    grid-template-columns: 1fr;
  }

  .module-nav-button {
    min-height: 36px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
  }

  .workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .topbar-actions {
    align-items: end;
    flex-direction: row;
    gap: 8px;
  }

  .search-field {
    flex: 1;
  }

  .search-field input {
    width: 100%;
  }

  .search-field input,
  .form-field input,
  .form-field select,
  .panel select,
  .icon-button,
  .text-button {
    min-height: 44px;
  }

  .icon-button {
    flex: 0 0 44px;
    width: 44px;
  }

  .metrics-band {
    display: none;
  }

  .panel {
    box-shadow: none;
  }

  .panel-head {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 12px;
  }

  .work-grid {
    display: block;
  }

  .module-panel,
  .calculator-panel,
  .report-panel {
    margin-bottom: 12px;
  }

  .module-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .module-card {
    gap: 8px;
    padding: 12px;
    border-right: 0;
  }

  .module-card h4 {
    font-size: 15px;
  }

  .module-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .module-meta {
    gap: 5px;
  }

  .home-landing {
    gap: 14px;
    padding: 12px;
  }

  .home-hero {
    gap: 16px;
    padding: 16px;
  }

  .home-hero h3 {
    font-size: 28px;
    line-height: 1.08;
  }

  .home-hero p {
    font-size: 15px;
  }

  .home-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-actions .text-button {
    width: 100%;
  }

  .home-need-grid,
  .home-category-row {
    grid-template-columns: 1fr;
  }

  .home-need-card {
    min-height: 0;
    padding: 13px;
  }

  .calculator-panel {
    scroll-margin-top: 12px;
  }

  .calculator-mount {
    padding: 12px;
  }

  .calc-form {
    gap: 12px;
  }

  .calc-form-actions,
  .calc-form-actions .text-button {
    width: 100%;
  }

  .form-grid,
  .result-grid,
  .apparatus-grid {
    grid-template-columns: 1fr;
  }

  .result-item {
    min-height: auto;
    padding: 11px;
  }

  .result-item strong {
    font-size: 18px;
  }

  .result-item.is-featured strong {
    font-size: 20px;
  }

  .lookup-table,
  .reference-table,
  .référence-table,
  .result-table,
  .segment-table,
  .conversion-reference,
  .poids-gaine-table,
  .segment-output {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .report-panel {
    order: 99;
    display: block;
    margin-top: 12px;
    margin-bottom: 18px;
  }

  .report-panel pre {
    max-height: 220px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-source-box .credit-line {
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  .feedback-fab {
    top: 12px;
    right: 12px;
    bottom: auto;
    width: 42px;
    height: 42px;
    min-height: 42px;
    max-width: none;
    padding: 0;
    justify-content: center;
    font-size: 14px;
  }

  .feedback-fab span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .feedback-overlay {
    align-items: center;
    padding: 12px;
  }

  .feedback-modal {
    max-height: calc(100dvh - 24px);
    padding: 24px 18px 20px;
    border-radius: 8px;
  }

  .feedback-heading {
    margin-bottom: 20px;
  }

  .feedback-heading p {
    font-size: 15px;
  }

  .feedback-field textarea {
    min-height: 136px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    padding: 8px;
  }

  .workspace {
    padding: 8px;
  }

  .brand {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .topbar h2 {
    font-size: 21px;
  }

  .nav-button {
    grid-template-columns: 30px minmax(0, 1fr) auto 8px;
    gap: 7px;
    min-height: 34px;
    padding: 6px 7px;
  }

  .nav-icon {
    width: 26px;
    height: 26px;
    font-size: 8px;
  }

  .nav-label {
    font-size: 13px;
  }

  .status-pill,
  .source-chip,
  .count-pill {
    font-size: 11px;
  }

  .panel-head {
    padding: 10px;
  }

  .calculator-mount {
    padding: 10px;
  }
}
/* --------------------------------------------------------------------------
   Module Help Styles
   -------------------------------------------------------------------------- */
.module-help {
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.module-help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.module-help summary::-webkit-details-marker {
  display: none;
}

.module-help summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
}

.module-help[open] summary::after {
  content: "−";
}

.module-help-content {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 13px;
}

.module-help-content p {
  margin: 0;
}

.module-help-content strong {
  color: var(--ink);
}
