:root {
  --paper: #f4f1e8;
  --paper-2: #efeade;
  --panel: #fffdf7;
  --panel-2: #faf7ee;
  --line: #ddd8c8;
  --line-soft: #e9e4d5;
  --ink: #16211c;
  --ink-dim: #55605a;
  --ink-faint: #7a847c;
  --green: #256a45;
  --green-deep: #194d31;
  --green-soft: #e7efe8;
  --amber: #dca72f;
  --amber-soft: #fff3cf;
  --danger: #a3402f;
  --danger-soft: #f8e4df;
  --white: #ffffff;
  --display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 22px 60px -48px rgba(22, 33, 28, .78);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden],
.hide {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 2%, rgba(220, 167, 47, .17), transparent 26rem),
    linear-gradient(rgba(37, 106, 69, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 106, 69, .04) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(220, 167, 47, .9);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 16px;
  border-radius: 0 0 8px 8px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.app-shell {
  position: relative;
  width: min(100%, 590px);
  margin: 0 auto;
  padding: 18px 18px 64px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.brand-copy {
  min-width: 0;
}

.brand-word {
  display: block;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1;
}

.brand-word em {
  color: var(--green);
  font-style: normal;
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.net-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, .84);
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 6px 10px;
  white-space: nowrap;
}

.net-chip::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.net-chip.off {
  color: #6f4c0d;
  border-color: #d6b96c;
  background: var(--amber-soft);
}

.net-chip.off::before {
  background: var(--amber);
}

.tabs {
  position: sticky;
  z-index: 20;
  top: 8px;
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(250, 247, 238, .94);
  box-shadow: 0 8px 28px -25px rgba(22, 33, 28, .9);
  padding: 4px;
  backdrop-filter: blur(12px);
}

.tabs button {
  min-height: 43px;
  flex: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tabs button[aria-selected="true"] {
  background: var(--green);
  color: var(--white);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
}

.budget-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, .88);
  box-shadow: 0 12px 28px -28px rgba(22, 33, 28, .85);
  padding: 10px 12px;
}

.budget-context label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 600;
}

.budget-context select {
  width: auto;
  min-width: 92px;
  min-height: 44px;
  border-color: #bfcbbf;
  background: var(--green-soft);
  color: var(--green-deep);
  font-family: var(--mono);
  font-weight: 700;
  padding: 7px 28px 7px 10px;
}

.budget-context p {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.scanner-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(145deg, #286f49, #17492f);
  box-shadow: 0 24px 45px -32px rgba(25, 77, 49, .95);
  color: var(--white);
  padding: 24px;
}

.scanner-card::after {
  position: absolute;
  right: -44px;
  bottom: -58px;
  width: 155px;
  height: 155px;
  border: 20px solid rgba(220, 167, 47, .3);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #c6e5d1;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.scanner-card h1 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(31px, 9vw, 44px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .98;
}

.scanner-intro {
  position: relative;
  z-index: 1;
  max-width: 38ch;
  margin: 13px 0 20px;
  color: #e2eee6;
  font-size: 15px;
}

.scan-zone {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-main,
.btn-ghost,
.btn-mini,
.qbtn,
.rm {
  min-height: 44px;
  border-radius: 9px;
  font-weight: 650;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.btn-main {
  width: 100%;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  padding: 13px 17px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.scanner-card > .scan-zone > .btn-main {
  border-color: var(--white);
  background: var(--white);
  color: var(--green-deep);
  box-shadow: 0 13px 26px -22px rgba(0, 0, 0, .9);
}

.btn-main:hover:not(:disabled),
.btn-ghost:hover:not(:disabled),
.btn-mini:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--green-deep);
  padding: 11px 14px;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--green);
}

.btn-mini {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  padding: 8px 10px;
  font-size: 13px;
}

.btn-mini[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber);
  color: #38290c;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.opts button {
  flex: 1 1 auto;
}

.manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manual .btn-ghost {
  border-color: rgba(255, 255, 255, .5);
  background: transparent;
  color: var(--white);
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
}

input[inputmode="numeric"],
input[type="number"] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.cam {
  position: relative;
  display: none;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 12px;
  background: #000;
  aspect-ratio: 4 / 3;
}

.cam.on {
  display: block;
}

.cam video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.retic {
  position: absolute;
  inset: 17% 8%;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 8px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, .3);
}

.laser {
  position: absolute;
  top: 50%;
  right: 9%;
  left: 9%;
  height: 2px;
  background: #f3c34e;
  box-shadow: 0 0 10px rgba(243, 195, 78, .9);
  animation: sweep 2.2s ease-in-out infinite;
}

@keyframes sweep {
  0%, 100% { transform: translateY(-60px); }
  50% { transform: translateY(60px); }
}

.status {
  min-height: 24px;
  margin-top: 2px;
  color: #e5f1e9;
  font-size: 14px;
}

.status .err {
  color: #ffe3dd;
}

.result-host {
  margin-top: 14px;
}

.card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card {
  margin-top: 14px;
  padding: 19px;
}

.result-card {
  overflow: hidden;
}

.ticket-head {
  position: relative;
  display: flex;
  min-height: 120px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed #cdbf96;
  background:
    linear-gradient(120deg, rgba(37, 106, 69, .1), transparent 45%),
    var(--amber-soft);
  padding: 18px 18px 15px;
}

.product-identity {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 13px;
}

.ticket-copy {
  min-width: 0;
}

.product-thumb {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border: 1px solid rgba(31, 69, 49, .14);
  border-radius: 10px;
  background: var(--white);
  object-fit: contain;
  padding: 5px;
}

.ticket-head::after {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.tag {
  display: inline-block;
  margin-bottom: 9px;
  border-radius: 4px;
  background: var(--white);
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .085em;
  padding: 4px 7px;
  text-transform: uppercase;
}

.pname {
  margin: 0;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.pbrand {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
}

.product-meta {
  margin: 5px 0 0;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
}

.ticket-price {
  display: block;
  padding: 17px 18px 18px;
}

.ticket-price .fnote {
  margin: 8px 0 0;
}

.figure {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.figure b {
  color: var(--green-deep);
  font-family: var(--display);
  font-size: clamp(43px, 14vw, 62px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  line-height: .9;
}

.figure i {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .06em;
}

.reliability-badge {
  align-self: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  padding: 6px 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.reliability-badge.reliability-low {
  background: var(--danger-soft);
  color: var(--danger);
}

.reliability-badge.reliability-medium {
  background: var(--amber-soft);
  color: #6f4c0d;
}

.fnote {
  margin: -8px 18px 16px;
  color: var(--ink-dim);
  font-size: 14px;
}

.ticket-price .fnote {
  margin-right: 0;
  margin-left: 0;
}

.result-message {
  margin-top: 0;
  padding-top: 18px;
}

.impact-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 18px 17px;
}

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

.impact-summary > div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--panel-2);
  padding: 10px;
}

.impact-summary span,
.impact-summary strong {
  display: block;
}

.impact-summary span {
  margin-bottom: 4px;
  color: var(--ink-dim);
  font-size: 11px;
}

.impact-summary strong {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.impact-summary .impact-over strong {
  color: var(--danger);
}

.reliability-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 0 18px 17px;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: var(--green-soft);
  color: var(--ink-dim);
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.45;
}

.reliability-note strong {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.reliability-note.reliability-medium {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.reliability-note.reliability-medium strong {
  color: #6f4c0d;
}

.reliability-note.reliability-low {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.reliability-note.reliability-low strong {
  color: var(--danger);
}

.gauge {
  padding: 0 18px 17px;
}

.glab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-dim);
  font-size: 13px;
}

.glab b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gbar {
  height: 11px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 5px;
  background: var(--paper-2);
}

.gfill {
  height: 100%;
  border-radius: 5px;
  background: var(--green);
  transition: width .42s ease;
}

.gfill.w { background: var(--amber); }
.gfill.a { background: var(--danger); }

.stages {
  margin: 0 18px 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.sbar {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-2);
}

.slegend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin-top: 9px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
}

.slegend em {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: 1px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 18px 18px;
}

.row-actions > * {
  flex: 1 1 190px;
}

.result-card > .row-actions .btn-main {
  box-shadow: 0 12px 24px -20px rgba(25, 77, 49, .9);
}

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

.method-details summary {
  min-height: 48px;
  cursor: pointer;
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 14px 18px;
}

.method-body {
  padding: 0 18px 18px;
}

.compare-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.compare-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.compare-heading .eyebrow {
  color: var(--amber-deep, #7b5411);
}

.compare-heading h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.1;
}

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

.compare-product {
  display: flex;
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 11px;
}

.compare-product > div {
  min-width: 0;
}

.compare-thumb {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--white);
  object-fit: contain;
  padding: 4px;
}

.compare-product h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.compare-product p {
  overflow: hidden;
  margin: 2px 0 7px;
  color: var(--ink-dim);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-product strong,
.compare-product span,
.compare-product em {
  display: block;
}

.compare-product strong {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 13px;
}

.compare-product strong small {
  display: block;
  margin-top: 2px;
  color: var(--ink-dim);
  font-size: 9px;
  font-weight: 500;
}

.compare-product > div > span {
  margin-top: 5px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
}

.compare-reliability {
  margin-top: 7px;
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.compare-reliability.reliability-medium { color: #7b5411; }
.compare-reliability.reliability-low { color: var(--danger); }

.compare-verdict {
  margin: 12px 0 0;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green-deep);
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.compare-panel > .lvlnote {
  margin-bottom: 0;
}

.receipt {
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 12px;
}

.receipt div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}

.receipt span:first-child {
  color: var(--ink-dim);
}

.receipt span:last-child {
  max-width: 61%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lvlnote {
  margin: 13px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.empty-state {
  border: 1px dashed #cfc7b7;
  border-radius: 14px;
  background: rgba(255, 253, 247, .7);
  color: var(--ink-dim);
  padding: 20px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.section-head h2,
.panel h2,
.panel h3,
.alts h2,
.alts h3 {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.budget-pill {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 8px;
}

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

.balance-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd9cd;
  border-radius: 13px;
  background: var(--green-soft);
  padding: 14px;
}

.balance-card:first-child {
  border-color: #dec986;
  background: var(--amber-soft);
}

.balance-label,
.balance-detail {
  display: block;
}

.balance-label {
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.balance-card strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--green-deep);
  font-family: var(--display);
  font-size: clamp(22px, 6vw, 29px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-card strong small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .03em;
}

.balance-detail {
  margin-top: 7px;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.35;
}

.balance-track {
  height: 7px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .7);
}

.balance-track .gfill {
  display: block;
}

.balance-card.over {
  border-color: #d9aaa0;
  background: var(--danger-soft);
}

.balance-card.over strong {
  color: var(--danger);
}

.balance-note {
  margin: 8px 2px 0;
  color: var(--ink-dim);
  font-size: 12px;
}

.journal-meta {
  margin-top: 14px;
}

.items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.items li {
  display: grid;
  grid-template-columns: 44px 28px 44px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}

.items .nm {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.items .qt,
.items .vl {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.items .qt {
  color: var(--ink-dim);
  text-align: center;
}

.items .vl {
  font-weight: 600;
  white-space: nowrap;
}

.qbtn,
.rm {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  padding: 0;
}

.rm {
  color: var(--danger);
  font-size: 18px;
}

.card .btn-mini,
.result-card .btn-mini {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--green-deep);
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  font-family: var(--display);
  font-weight: 700;
}

.total b {
  color: var(--green-deep);
  font-family: var(--display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.msg {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
}

.err {
  color: var(--danger);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.tile {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 12px;
}

.tile span {
  display: block;
  color: var(--ink-dim);
  font-size: 12px;
}

.tile b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--green-deep);
  font-family: var(--display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.day {
  margin-top: 17px;
}

.day h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.day h3 b {
  color: var(--ink);
}

.day .items li {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.panel {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.panel .row {
  display: flex;
  gap: 9px;
  margin-top: 10px;
}

.panel .row > * {
  min-width: 0;
  flex: 1;
}

.guided-missing {
  margin: 0;
  border-top: 0;
  border-radius: 0 0 13px 13px;
  background: var(--panel-2);
  padding: 17px 18px 18px;
}

.guided-missing h3 {
  margin-top: 4px;
}

.guided-missing .msg {
  margin-bottom: 12px;
}

.guided-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, .7fr);
  gap: 9px;
}

.guided-fields label {
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.guided-fields input {
  width: 100%;
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
}

.missing-contribute {
  margin: 13px 0 0;
  font-size: 13px;
}

.missing-contribute a {
  color: var(--green-deep);
  font-weight: 700;
}

#missing-step > .panel {
  margin-top: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 13px 13px;
  background: var(--panel);
  padding: 16px 18px 18px;
}

.pick {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.pick button {
  display: flex;
  width: 100%;
  min-height: 48px;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
}

.pick button:hover {
  background: var(--green-soft);
}

.pick button span:last-child {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pick button i {
  display: block;
  margin-top: 2px;
  color: var(--ink-dim);
  font-size: 12px;
  font-style: normal;
}

.alts ol {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.alt-scope {
  margin: 6px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.alt-scope strong {
  color: var(--ink);
  font-weight: 700;
}

.alts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 14px;
}

.alts li b {
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.danger-action {
  color: var(--danger);
  border-color: #d9aaa0;
  background: var(--danger-soft);
}

.toast {
  position: fixed;
  z-index: 90;
  right: 14px;
  bottom: 16px;
  left: 14px;
  display: flex;
  width: min(440px, calc(100% - 28px));
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 15px 35px -20px rgba(0, 0, 0, .8);
  color: var(--white);
  padding: 11px 14px;
  font-size: 14px;
}

.toast button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #bce2c8;
  font-weight: 700;
  text-decoration: underline;
}

.app-footer {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.6;
  padding: 18px 4px 0;
}

.app-footer details {
  margin-bottom: 13px;
}

.app-footer summary {
  cursor: pointer;
  color: var(--green-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.app-footer p {
  margin: 9px 0;
}

.app-footer a {
  color: var(--green-deep);
}

.privacy-note {
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: var(--panel);
  padding: 10px 12px;
}

.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
}

.result-host .spin,
.card .spin {
  border-color: var(--line);
  border-top-color: var(--green);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

@media (max-width: 470px) {
  .app-shell {
    padding: 13px 12px 42px;
  }

  .budget-context {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .budget-context label {
    justify-content: space-between;
  }

  .budget-context p {
    text-align: left;
  }

  .app-header {
    margin-bottom: 13px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .brand-word {
    font-size: 21px;
  }

  .brand-copy small {
    max-width: 170px;
    font-size: 9px;
  }

  .net-chip {
    font-size: 9px;
    padding: 5px 8px;
  }

  .scanner-card {
    border-radius: 16px;
    padding: 21px 17px;
  }

  .scanner-card h1 {
    font-size: 35px;
  }

  .card {
    padding: 16px;
  }

  .items li {
    grid-template-columns: 44px 24px 44px minmax(0, 1fr) auto 44px;
    gap: 4px;
  }

  .items .vl {
    font-size: 11px;
  }

  .panel .row {
    flex-direction: column;
  }

  .reliability-badge {
    justify-self: start;
  }

  .ticket-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .impact-summary,
  .impact-summary-two,
  .compare-grid,
  .guided-fields {
    grid-template-columns: 1fr;
  }

  .reliability-note {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 360px) {
  .balance-grid {
    grid-template-columns: 1fr;
  }

  .brand-copy small {
    display: none;
  }

  .net-chip {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .items li {
    grid-template-columns: 44px 20px 44px minmax(0, 1fr) 44px;
  }

  .items .vl {
    display: none;
  }

  .product-thumb {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   EQO poche — couche visuelle applicative
   Une interface plus directe en magasin, sans perdre la palette du site.
   -------------------------------------------------------------------------- */

:root {
  --paper: #f3f2ed;
  --paper-2: #ebe9e1;
  --panel: #fffefa;
  --panel-2: #f8f7f1;
  --line: #d8d8cf;
  --line-soft: #e8e7df;
  --green: #226542;
  --green-deep: #143f2a;
  --green-soft: #e5f0e7;
  --amber: #d8a63e;
  --amber-soft: #fff2cf;
  --shadow: 0 18px 55px -38px rgba(12, 42, 27, .46), 0 2px 8px rgba(12, 42, 27, .04);
}

html {
  background: var(--green-deep);
  scroll-padding-bottom: 96px;
}

body {
  background:
    radial-gradient(circle at 18% -4%, rgba(111, 178, 132, .26), transparent 24rem),
    radial-gradient(circle at 88% 3%, rgba(216, 166, 62, .2), transparent 21rem),
    linear-gradient(180deg, #153f2b 0, #153f2b 250px, var(--paper) 250px, var(--paper) 100%);
  background-size: auto;
  line-height: 1.5;
}

.app-shell {
  width: min(100%, 720px);
  padding: 16px 20px 76px;
}

.app-header {
  min-height: 52px;
  margin-bottom: 10px;
}

.brand {
  color: #fff;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 11px;
  box-shadow: 0 9px 25px -16px rgba(0, 0, 0, .8);
}

.brand-word {
  color: #fff;
  font-size: 25px;
  letter-spacing: .01em;
}

.brand-word em {
  color: #f1c868;
}

.brand-copy small {
  color: rgba(255, 255, 255, .68);
}

.net-chip {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #fff;
  backdrop-filter: blur(12px);
}

.net-chip::before {
  background: #95d3a9;
  box-shadow: 0 0 0 3px rgba(149, 211, 169, .12);
}

.tabs {
  top: 10px;
  gap: 3px;
  margin-bottom: 12px;
  border-color: rgba(255, 255, 255, .18);
  border-radius: 15px;
  background: rgba(9, 38, 24, .44);
  box-shadow: 0 15px 34px -27px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 4px;
}

.tabs button {
  min-height: 44px;
  border-radius: 11px;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .075em;
}

.tabs button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 6px 16px -12px rgba(0, 0, 0, .75);
  color: var(--green-deep);
}

.budget-context {
  margin-bottom: 16px;
  border-color: rgba(20, 63, 42, .1);
  border-radius: 17px;
  background: rgba(255, 254, 250, .98);
  box-shadow: 0 18px 42px -31px rgba(2, 24, 13, .78);
  padding: 10px 12px 10px 15px;
}

.budget-context label {
  color: var(--ink-dim);
  font-size: 13px;
}

.budget-context select {
  min-width: 90px;
  border: 0;
  border-radius: 11px;
  background-color: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(34, 101, 66, .1);
  color: var(--green-deep);
}

.budget-context p {
  color: var(--green-deep);
  font-size: 11px;
  letter-spacing: -.01em;
}

.scanner-card {
  isolation: isolate;
  border: 1px solid rgba(20, 63, 42, .1);
  border-radius: 26px;
  background: rgba(255, 254, 250, .99);
  box-shadow: 0 30px 72px -42px rgba(3, 35, 18, .62), 0 3px 10px rgba(3, 35, 18, .05);
  color: var(--ink);
  padding: 29px 30px 27px;
}

.scanner-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--green) 0 72%, var(--amber) 72% 100%);
  content: "";
}

.scanner-card::after {
  z-index: 0;
  right: -94px;
  bottom: auto;
  top: -104px;
  width: 230px;
  height: 230px;
  border: 0;
  background: radial-gradient(circle, rgba(34, 101, 66, .1), rgba(34, 101, 66, 0) 68%);
}

.scanner-card .eyebrow {
  margin-bottom: 11px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: .17em;
}

.scanner-card h1 {
  max-width: 15ch;
  color: var(--ink);
  font-size: clamp(34px, 7.5vw, 47px);
  letter-spacing: -.045em;
  line-height: .98;
}

.scanner-intro {
  max-width: 46ch;
  margin: 14px 0 22px;
  color: var(--ink-dim);
  font-size: 16px;
}

.scan-zone {
  gap: 12px;
}

.scanner-card > .scan-zone > .btn-main {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #26724a, #174a30);
  box-shadow: 0 16px 30px -20px rgba(20, 63, 42, .9), inset 0 1px 0 rgba(255, 255, 255, .13);
  color: #fff;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  padding: 14px 17px;
  text-transform: none;
}

.scanner-card > .scan-zone > .btn-main::before {
  width: 29px;
  height: 25px;
  flex: 0 0 29px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px);
  background-clip: content-box;
  content: "";
  opacity: .9;
  padding: 5px;
}

.scanner-card > .scan-zone > .btn-main::after {
  margin-left: auto;
  content: "→";
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
}

.scanner-card.scanning > .scan-zone > .btn-main {
  background: var(--ink);
}

.scanner-card.scanning > .scan-zone > .btn-main::before {
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255, 255, 255, .1);
  background-clip: border-box;
  content: "×";
  font-size: 22px;
  padding: 0;
}

.scanner-card.scanning > .scan-zone > .btn-main::after {
  content: "";
}

.opts {
  gap: 8px;
}

.opts .btn-mini {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink-dim);
  font-size: 13px;
}

.opts .btn-mini:hover:not(:disabled) {
  border-color: #a9c3af;
  background: var(--green-soft);
  color: var(--green-deep);
}

.opts .btn-mini[aria-pressed="true"] {
  border-color: #dbbd71;
  background: var(--amber-soft);
  color: #65470e;
}

.manual {
  gap: 9px;
}

.manual .btn-ghost {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-deep);
}

input,
select {
  border-radius: 12px;
  background: #fff;
}

.cam {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--green-soft), 0 16px 35px -24px rgba(0, 0, 0, .75);
}

.retic {
  border-radius: 13px;
}

.status {
  min-height: 20px;
  color: var(--ink-dim);
}

.status .err {
  color: var(--danger);
}

.card,
.result-card,
.compare-panel {
  border-color: rgba(20, 63, 42, .1);
  border-radius: 21px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card,
.compare-panel {
  padding: 22px;
}

.card,
.compare-panel,
.result-host {
  margin-top: 18px;
}

.result-card {
  animation: result-in .28s ease-out;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.ticket-head {
  min-height: 126px;
  border-bottom: 1px solid #d5e3d8;
  background:
    radial-gradient(circle at 94% 8%, rgba(216, 166, 62, .18), transparent 9rem),
    linear-gradient(135deg, #edf5ee, #f9faf5);
  padding: 21px 21px 18px;
}

.ticket-head::after {
  display: none;
}

.product-thumb {
  width: 82px;
  height: 82px;
  flex-basis: 82px;
  border-radius: 14px;
  box-shadow: 0 10px 25px -20px rgba(20, 63, 42, .7);
  padding: 7px;
}

.tag {
  margin-bottom: 8px;
  border: 1px solid rgba(34, 101, 66, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  font-size: 9px;
  padding: 4px 8px;
}

.pname {
  color: var(--ink);
  font-size: 25px;
}

.ticket-price {
  padding: 22px 21px 20px;
}

.figure b {
  font-size: clamp(46px, 12vw, 64px);
}

.impact-summary {
  gap: 10px;
  margin: 0 21px 19px;
}

.impact-summary > div {
  border-color: rgba(20, 63, 42, .08);
  border-radius: 13px;
  background: #f7f8f3;
  padding: 12px;
}

.impact-summary span {
  font-size: 12px;
}

.impact-summary strong {
  font-size: 13px;
}

.reliability-badge {
  box-shadow: inset 0 0 0 1px rgba(34, 101, 66, .08);
}

.reliability-note {
  margin: 0 21px 19px;
  border: 0;
  border-radius: 12px;
  box-shadow: inset 3px 0 0 var(--green);
  padding: 12px 13px;
}

.reliability-note.reliability-medium {
  box-shadow: inset 3px 0 0 var(--amber);
}

.reliability-note.reliability-low {
  box-shadow: inset 3px 0 0 var(--danger);
}

.gauge {
  padding: 0 21px 20px;
}

.gbar {
  height: 9px;
  border-radius: 999px;
}

.gfill {
  border-radius: 999px;
}

.stages {
  margin: 0 21px 20px;
}

.sbar {
  border-radius: 999px;
}

.row-actions {
  gap: 10px;
  padding: 0 21px 21px;
}

.btn-main,
.btn-ghost,
.btn-mini,
.qbtn,
.rm {
  border-radius: 12px;
}

.result-card > .row-actions .btn-main {
  min-height: 49px;
  border: 0;
  background: linear-gradient(135deg, #26724a, #174a30);
}

.btn-ghost {
  background: #fff;
}

.method-details {
  background: #f8f8f4;
}

.method-details summary {
  font-size: 11px;
  padding: 16px 21px;
}

.method-body {
  padding: 0 21px 21px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -.025em;
  text-transform: none;
}

.budget-pill {
  border: 1px solid rgba(34, 101, 66, .09);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px;
}

.empty-state {
  border-color: #cfcec4;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(248, 247, 241, .7), #fff);
  padding: 24px 18px;
}

.empty-state strong {
  font-size: 20px;
}

.balance-grid {
  gap: 12px;
  margin-top: 18px;
}

.balance-card {
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, #eaf3eb, #f6faf5);
  box-shadow: inset 0 0 0 1px rgba(34, 101, 66, .1);
  padding: 17px;
}

.balance-card:first-child {
  border: 0;
  background: linear-gradient(145deg, #fff0c8, #fff9e9);
  box-shadow: inset 0 0 0 1px rgba(169, 118, 31, .13);
}

.balance-card:nth-child(2) {
  background: linear-gradient(145deg, #246b46, #153f2b);
  box-shadow: 0 16px 31px -23px rgba(20, 63, 42, .9);
}

.balance-card:nth-child(2) .balance-label,
.balance-card:nth-child(2) .balance-detail {
  color: rgba(255, 255, 255, .72);
}

.balance-card:nth-child(2) strong {
  color: #fff;
}

.balance-card strong {
  margin-top: 9px;
  font-size: clamp(25px, 6vw, 32px);
}

.balance-card:nth-child(2) .balance-track {
  background: rgba(255, 255, 255, .16);
}

.balance-card:nth-child(2) .balance-track .gfill {
  background: #a7d6b4;
}

.balance-note {
  margin-top: 10px;
}

.items li {
  border-bottom-color: var(--line-soft);
  padding-top: 10px;
  padding-bottom: 10px;
}

.qbtn,
.rm {
  border-color: var(--line-soft);
  background: #f8f8f4;
}

.qbtn:hover,
.rm:hover {
  border-color: #b7cbbc;
  background: var(--green-soft);
}

.total {
  border-radius: 14px;
  background: var(--green-soft);
  padding: 13px 14px;
}

.total b {
  font-size: 24px;
}

.tile {
  border-radius: 14px;
  background: #f7f8f3;
  padding: 14px;
}

.guided-missing,
#missing-step > .panel {
  background: #f8f8f4;
}

.pick {
  border-radius: 14px;
}

.pick button {
  padding: 12px 13px;
}

.pick button:hover {
  background: #edf5ee;
}

.compare-panel {
  overflow: hidden;
}

.compare-heading h3 {
  font-size: 25px;
}

.compare-product {
  border-radius: 14px;
  background: #f7f8f3;
  padding: 13px;
}

.compare-verdict {
  border-radius: 13px;
  padding: 13px 14px;
}

.app-footer {
  margin-top: 24px;
  border-top-color: rgba(20, 63, 42, .13);
  padding-top: 22px;
}

.privacy-note {
  border: 0;
  border-radius: 13px;
  background: rgba(255, 254, 250, .72);
  box-shadow: inset 3px 0 0 var(--green);
  padding: 12px 14px;
}

.toast {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: #112d20;
  box-shadow: 0 20px 45px -22px rgba(0, 0, 0, .8);
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 12% -3%, rgba(111, 178, 132, .24), transparent 18rem),
      radial-gradient(circle at 100% 1%, rgba(216, 166, 62, .17), transparent 15rem),
      linear-gradient(180deg, #153f2b 0, #153f2b 218px, var(--paper) 218px, var(--paper) 100%);
  }

  .app-shell {
    padding: 12px 12px calc(116px + env(safe-area-inset-bottom));
  }

  .tabs {
    position: fixed;
    z-index: 80;
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    margin: 0 auto;
    border-color: rgba(20, 63, 42, .11);
    background: rgba(255, 254, 250, .92);
    box-shadow: 0 18px 42px -18px rgba(8, 35, 21, .55), inset 0 1px 0 rgba(255, 255, 255, .7);
    backdrop-filter: blur(18px);
  }

  .tabs button {
    min-height: 52px;
    color: var(--ink-faint);
  }

  .tabs button[aria-selected="true"] {
    background: var(--green-deep);
    color: #fff;
  }

  .toast {
    bottom: calc(79px + env(safe-area-inset-bottom));
  }

  .budget-context {
    margin-top: 10px;
  }

  .scanner-card {
    border-radius: 23px;
    padding: 25px 20px 22px;
  }

  .scanner-card h1 {
    font-size: clamp(34px, 10.8vw, 43px);
  }

  .scanner-intro {
    margin-bottom: 19px;
    font-size: 15px;
  }

  .card,
  .compare-panel {
    border-radius: 19px;
    padding: 18px;
  }

  .ticket-head {
    padding: 19px 18px 17px;
  }

  .ticket-price {
    padding: 20px 18px 18px;
  }

  .impact-summary,
  .reliability-note,
  .stages {
    margin-right: 18px;
    margin-left: 18px;
  }

  .gauge {
    padding-right: 18px;
    padding-left: 18px;
  }

  .row-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .method-details summary {
    padding-right: 18px;
    padding-left: 18px;
  }

  .method-body {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Budget : le solde d’abord, la méthode à la demande. */
.result-host:focus { outline: none; }

.budget-dashboard {
  gap: 22px;
}

.budget-hero {
  border-radius: 30px;
}

.budget-hero.partial {
  background:
    radial-gradient(circle at 96% 4%, rgba(231, 180, 56, .2), transparent 12rem),
    linear-gradient(145deg, #fffefa, #edf4ef);
  padding: clamp(26px, 5vw, 40px);
}

.budget-hero.partial h1 {
  max-width: 16ch;
  margin-bottom: 20px;
}

.partial-snapshot {
  display: grid;
  width: min(100%, 420px);
  gap: 4px;
  margin: 0 0 16px;
  border-left: 5px solid var(--amber);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 255, 255, .7);
  padding: 14px 16px;
}

.partial-snapshot span {
  color: var(--ink-dim);
  font-size: 13px;
}

.partial-snapshot strong {
  color: var(--green-deep);
  font: 700 25px/1.1 var(--display);
}

.partial .step-track {
  height: 10px;
  margin: 22px 0 15px;
  background: rgba(23, 80, 50, .09);
}

.partial .explain-link {
  width: auto;
  background: rgba(255, 255, 255, .75);
}

.budget-hero.month-card {
  overflow: hidden;
  border-color: rgba(255, 255, 255, .13);
  background:
    radial-gradient(circle at 90% 4%, rgba(231, 180, 56, .19), transparent 13rem),
    linear-gradient(145deg, #0b3826, #1b6845);
  box-shadow: 0 38px 78px -40px rgba(0, 35, 18, .88), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #fff;
  padding: 22px 26px 27px;
}

.budget-hero.month-card::after {
  top: auto;
  right: -76px;
  bottom: -100px;
  width: 240px;
  height: 240px;
  border: 34px solid rgba(255, 255, 255, .035);
  background: transparent;
}

.month-card .month-nav {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

.month-card .month-nav strong {
  color: #fff;
  font-size: 17px;
}

.month-card .month-nav button {
  border-color: rgba(255, 255, 255, .17);
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.month-card .month-nav button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .38);
  color: #fff;
}

.balance-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
}

.balance-stage > span {
  color: #aee0bf;
  font-size: 14px;
  font-weight: 650;
}

.balance-stage > strong {
  color: #fff;
  font: 700 clamp(50px, 10vw, 74px)/.95 var(--display);
  letter-spacing: -.055em;
}

.balance-stage > strong small {
  color: #ffe29a;
  font-size: .23em;
  letter-spacing: .02em;
}

.balance-stage > small {
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
}

.month-card.over .balance-stage > strong { color: #ffd6cc; }

.month-card .month-gauge {
  position: relative;
  z-index: 1;
  height: 12px;
  margin: 0 0 16px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .12);
}

.month-card.good .month-gauge > span { background: linear-gradient(90deg, #7ad39a, #c3e79c); }
.month-card.warn .month-gauge > span { background: linear-gradient(90deg, #e7b438, #ffd978); }
.month-card.over .month-gauge > span { background: linear-gradient(90deg, #ff9a80, #ffd1c5); }

.balance-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.balance-meta > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 14px;
  background: rgba(255, 255, 255, .075);
  padding: 12px 13px;
}

.balance-meta span {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.balance-meta strong {
  color: #fff;
  font: 650 16px/1.2 var(--display);
}

.month-card .explain-link {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.month-card .explain-link i {
  background: rgba(255, 255, 255, .14);
}

.breakdown-card,
.months-card,
.annual-card {
  border-radius: 26px;
  padding: 26px;
}

.poste-list {
  gap: 5px;
}

.poste-row {
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 3px 11px;
  border: 0;
  border-radius: 15px;
  padding: 11px 12px;
}

.poste-row:nth-child(odd) {
  background: #f4f6f1;
}

.poste-row em {
  width: 11px;
  height: 11px;
  border-radius: 4px;
}

.poste-row > span {
  font-weight: 650;
}

.poste-row b {
  font-family: var(--sans);
  font-size: 14px;
}

.poste-share {
  height: 7px;
  margin: 6px 0 3px;
  background: #e2e6df;
}

.poste-row small {
  color: var(--ink-faint);
  font-size: 12px;
  opacity: 1;
}

.evidence-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 18px;
  border-radius: 17px;
  background: var(--green-soft);
  padding: 12px;
}

.evidence-band > div {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 3px 6px;
}

.evidence-band > div span {
  color: var(--ink-dim);
  font-size: 12px;
}

.evidence-band > div strong {
  color: var(--green-deep);
  font: 700 25px/1 var(--display);
}

.explain-link.compact {
  min-height: 48px;
  background: rgba(255, 255, 255, .7);
  font-size: 13px;
}

.tracking-disclosure {
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.tracking-disclosure summary {
  cursor: pointer;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
}

.tracking-options {
  margin-bottom: 0;
}

.months {
  margin-top: 6px;
}

.months svg {
  overflow: visible;
}

.months .month-column {
  cursor: pointer;
}

.months .bar-estimated {
  fill: #b9cec0;
  transition: fill .16s ease, opacity .16s ease;
}

.months .month-column:nth-child(even) .bar-estimated {
  fill: #c7d7cc;
}

.months .month-column.is-current .bar-estimated {
  fill: #7eac8d;
}

.months .bar-observed {
  fill: var(--green-deep);
}

.months .month-column:hover .bar-estimated,
.months .month-column:focus .bar-estimated {
  fill: var(--green-bright);
}

.months .marker-line {
  stroke: var(--amber);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.months .bar-labels text,
.months .marker-label {
  fill: var(--ink-faint);
  font: 11px var(--sans);
}

.months figcaption {
  gap: 8px 18px;
  margin: 12px 0 14px;
}

.months figcaption i {
  width: 17px;
  height: 10px;
  border-radius: 4px;
  background: #b9cec0;
}

.months figcaption .swatch-observed {
  background: var(--green-deep);
}

.months-card > .explain-link {
  margin-top: 15px;
}

.annual-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(231, 180, 56, .14), transparent 14rem),
    var(--panel);
}

.annual-card.is-positive { border-top: 6px solid var(--green); }
.annual-card.is-negative { border-top: 6px solid var(--danger); }

.annual-card .budget-pill {
  border: 0;
  background: var(--green-soft);
  color: var(--green-deep);
}

.annual-card.is-negative .budget-pill {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.annual-lines > div {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
  padding: 12px 13px;
}

.annual-lines b {
  font-family: var(--sans);
  font-size: 17px;
}

.annual-card .trajectory {
  margin: 18px 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #f6f7f2;
  padding: 10px 12px 14px;
}

.story-curve .curve-gap {
  fill: url(#budget-gap);
}

.story-curve .axis {
  stroke: #ced5cf;
}

.story-curve .curve-allocation {
  fill: none;
  stroke: var(--amber);
  stroke-width: 4;
}

.story-curve .curve-footprint {
  stroke: var(--green-deep);
  stroke-width: 3;
  stroke-dasharray: none;
}

.story-curve .curve-guide {
  stroke: rgba(17, 36, 26, .2);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.story-curve .curve-point {
  fill: var(--amber);
  stroke: #fff;
  stroke-width: 3;
}

.story-curve .curve-footprint-point {
  fill: var(--green-deep);
  stroke: #fff;
  stroke-width: 3;
}

.story-curve text {
  fill: var(--ink-faint);
  font: 11px var(--sans);
}

.story-curve .curve-direct {
  font-size: 11px;
  font-weight: 750;
}

.story-curve .curve-direct-footprint { fill: var(--green-deep); }
.story-curve .curve-direct-allocation { fill: #9a6d00; }

.story-curve .curve-readout {
  display: grid;
  grid-template-columns: .7fr 1.2fr 1.2fr;
  gap: 7px;
  margin: 2px 0 0;
}

.story-curve .curve-readout span {
  display: grid;
  gap: 2px;
  border-radius: 11px;
  background: #fff;
  padding: 9px 10px;
}

.curve-readout small {
  color: var(--ink-faint);
  font-size: 10px;
}

.curve-readout strong {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.curve-verdict {
  margin: 11px 2px 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.annual-card .year-control {
  margin: 14px 0;
  background: #e8eee9;
}

.annual-card .year-control label,
.annual-card .year-control output {
  color: var(--ink);
}

.annual-card .explain-link {
  margin-bottom: 12px;
}

.annual-card > .btn-main {
  min-height: 51px;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .budget-hero.month-card,
  .breakdown-card,
  .months-card,
  .annual-card {
    border-radius: 23px;
    padding: 21px 18px;
  }

  .balance-stage > strong {
    font-size: 53px;
  }

  .evidence-band {
    grid-template-columns: 1fr;
  }

  .annual-lines {
    grid-template-columns: 1fr;
  }

  .story-curve .curve-readout {
    grid-template-columns: 1fr 1fr;
  }

  .story-curve .curve-readout span:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 470px) {
  .budget-context {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 12px;
  }

  .budget-context label {
    justify-content: flex-start;
  }

  .budget-context p {
    text-align: right;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .brand-word {
    font-size: 22px;
  }

  .brand-copy small {
    max-width: 158px;
  }

  .net-chip {
    max-width: 130px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .product-thumb {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
  }

  .pname {
    font-size: 22px;
  }

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

@media (max-width: 365px) {
  .brand-copy small {
    display: none;
  }

  .net-chip {
    max-width: 122px;
  }

  .budget-context {
    grid-template-columns: 1fr;
  }

  .budget-context p {
    text-align: left;
  }
}

/* Parcours Budget — spécification application v1.1 */
.budget-dashboard {
  display: grid;
  gap: 16px;
}

.budget-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 63, 42, .12);
  border-radius: 24px;
  background: #fffefa;
  box-shadow: 0 20px 56px -38px rgba(16, 49, 32, .5);
  padding: clamp(22px, 4vw, 36px);
}

.budget-hero::after {
  position: absolute;
  top: -82px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(239, 181, 47, .12);
  content: "";
  pointer-events: none;
}

.budget-hero.partial {
  border-color: #d4d8d2;
  background: linear-gradient(145deg, #fffefa, #f3f5f2);
}

.budget-hero.estimated {
  color: #fff;
  background: linear-gradient(145deg, #123a27, #1f5d3d);
}

.budget-hero.estimated.negative {
  background: linear-gradient(145deg, #3e2d23, #734536);
}

.budget-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 6px 0 10px;
  font: 700 clamp(31px, 6vw, 52px)/1.02 "Space Grotesk", sans-serif;
  letter-spacing: -.045em;
}

.budget-lead {
  max-width: 680px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.budget-values {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.budget-values article {
  display: grid;
  gap: 8px;
  min-height: 108px;
  border: 1px solid rgba(20, 63, 42, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  padding: 15px;
}

.estimated .budget-values article {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
}

.budget-values span,
.position-number span,
.scenario-reference span,
.partial-position span {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.budget-values strong {
  align-self: end;
  font: 700 clamp(23px, 4vw, 32px)/1 "Space Grotesk", sans-serif;
}

.budget-values small,
.position-number small {
  font-size: .48em;
  letter-spacing: 0;
}

.scenario-reference,
.partial-position {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 18px;
  align-items: center;
  border-top: 1px solid #d9ddd7;
  padding: 15px 0;
}

.scenario-reference small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}

.partial-position strong {
  font: 700 23px/1 "Space Grotesk", sans-serif;
}

.budget-warning {
  margin: 8px 0 0;
  border-radius: 12px;
  background: #e8ece8;
  padding: 12px 14px;
  color: #405148;
  font-size: 13px;
  line-height: 1.45;
}

.position-number {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin: 24px 0;
}

.position-number strong {
  font: 700 clamp(42px, 8vw, 74px)/.95 "Space Grotesk", sans-serif;
  letter-spacing: -.05em;
}

.year-control {
  position: relative;
  z-index: 1;
  margin-top: 25px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .16);
  padding: 16px;
}

.cumulative-position {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  padding: 13px 15px;
}

.cumulative-position span { font-size: 13px; }
.cumulative-position strong { font: 700 22px/1 "Space Grotesk", sans-serif; }

.year-control > div:first-child,
.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.year-control label,
.year-control output {
  color: #fff;
  font-size: 14px;
}

.year-control input {
  width: 100%;
  margin: 16px 0 5px;
  accent-color: #efb52f;
}

.range-labels {
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
}

.trajectory {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  padding: 10px 14px 12px;
}

.trajectory svg {
  display: block;
  width: 100%;
  max-height: 230px;
}

.trajectory .axis { stroke: rgba(255, 255, 255, .2); }
.trajectory .curve-allocation { fill: none; stroke: #efb52f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trajectory .curve-footprint { stroke: #fff; stroke-width: 3; stroke-dasharray: 7 6; }
.trajectory .curve-point { fill: #efb52f; stroke: #fff; stroke-width: 3; }
.trajectory text { fill: rgba(255, 255, 255, .7); font: 10px Inter, sans-serif; }
.trajectory figcaption { display: flex; flex-wrap: wrap; gap: 12px 20px; color: rgba(255, 255, 255, .78); font-size: 12px; }
.trajectory figcaption span { display: inline-flex; gap: 7px; align-items: center; }
.trajectory figcaption i { width: 20px; height: 3px; border-radius: 5px; background: #efb52f; }
.trajectory figcaption .legend-footprint { background: #fff; }

.breakdown-card,
.budget-cart,
#profile-host,
.simulation-card {
  margin-top: 16px;
}

.breakdown {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 0;
}

.tracking-options {
  display: grid;
  gap: 9px;
  margin: 18px 0 10px;
}

.observed-note {
  margin: 15px 0 0;
  border-radius: 12px;
  background: var(--green-soft);
  padding: 11px 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.budget-method {
  margin: 15px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 0;
}

.budget-method summary { cursor: pointer; color: var(--green-deep); font-weight: 700; }
.budget-method p { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

.tracking-options label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 12px;
  background: #f4f6f2;
  padding: 11px 12px;
  font-size: 13px;
}

.tracking-options input { margin-top: 2px; accent-color: var(--green); }

.profile-head { align-items: flex-start; }
.profile-head h2 { margin-top: 4px; }

.step-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e3e8e2;
}

.step-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #6fae80);
  transition: width .25s ease;
}

.profile-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 12px;
}

.profile-module {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #f8f8f4;
  padding: 13px;
}

.profile-module.is-complete {
  border-color: #b9d3bf;
  background: #eff7f0;
}

.module-state {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #e1e4df;
  color: var(--ink-soft);
  font-weight: 800;
}

.is-complete .module-state { background: var(--green); color: #fff; }
.profile-module h3 { margin: 2px 0 4px; font-size: 15px; }
.profile-module p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.module-effect { display: block; margin-top: 7px; color: var(--green); font-size: 11px; }
.profile-missing { color: var(--ink-soft); font-size: 13px; }

.profile-editor {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

.profile-editor-head,
.form-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.profile-editor-head h3,
.form-heading h4 { margin: 3px 0 0; }

.profile-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #f8f8f4;
  padding: 16px;
}

.form-heading { justify-content: flex-start; }
.form-heading > span { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--green-deep); color: #fff; font-weight: 800; }
.form-heading p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }

.profile-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.profile-form input,
.profile-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cdd5ce;
  border-radius: 10px;
  background: #fff;
  padding: 9px 11px;
  color: var(--ink);
  font: 500 14px Inter, sans-serif;
}

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

.optional-field { color: var(--ink-soft) !important; }

.simulation-card { border-top: 5px solid var(--gold); }
.simulation-card.seller { border-top-color: #4b9363; }
.simulation-card.buyer { border-top-color: #a7654f; }
.simulation-kicker { display: inline-block; border-radius: 99px; background: #f2ead5; padding: 6px 9px; color: #604b1c; font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.simulation-card h2 { margin: 14px 0; }
.simulation-number { display: grid; gap: 3px; margin: 18px 0; }
.simulation-number strong { color: var(--green-deep); font: 700 clamp(36px, 7vw, 58px)/1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.buyer .simulation-number strong { color: #884d3b; }
.simulation-number span { color: var(--ink-soft); font-size: 13px; }

.result-scope {
  margin: 0;
  border-top: 1px solid var(--line-soft);
  padding: 12px 22px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.after-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  align-items: center;
  margin: 0 22px 18px;
  border-radius: 14px;
  background: var(--green-soft);
  padding: 13px 14px;
}

.after-add span { color: var(--ink-soft); font-size: 12px; }
.after-add button { grid-column: 2; grid-row: 1 / 3; }
.nm small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 10px; font-weight: 500; }
.journal-total { margin-top: 12px; }

@media (max-width: 700px) {
  .budget-values,
  .profile-modules,
  .form-grid { grid-template-columns: 1fr; }

  .budget-values article { min-height: 92px; }
  .scenario-reference,
  .partial-position { grid-template-columns: 1fr; }
  .budget-hero { border-radius: 20px; padding: 22px 18px; }
  .budget-hero h1 { font-size: 34px; }
  .position-number strong { font-size: 46px; }
  .after-add { grid-template-columns: 1fr; margin-right: 18px; margin-left: 18px; }
  .after-add button { grid-column: 1; grid-row: auto; margin-top: 7px; }
}

/* ── Onglet Budget, version V. Claude : une question par carte ───────────── */
.month-gauge {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
  margin: 14px 0 12px;
}
.month-gauge > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  transition: width .35s ease;
}
.budget-hero.estimated.negative .month-gauge > span { background: #d97b6c; }
@media (prefers-reduced-motion: reduce) { .month-gauge > span { transition: none; } }

.poste-bar {
  display: flex;
  height: 16px;
  border-radius: 6px;
  overflow: hidden;
  margin: 4px 0 14px;
  background: rgba(0, 0, 0, .06);
}
.poste-bar > span { display: block; }
.poste-list { display: flex; flex-direction: column; gap: 2px; }
.poste-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  grid-template-areas: "dot name value" ". note note";
  align-items: baseline;
  gap: 2px 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, .08));
}
.poste-row em { grid-area: dot; width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.poste-row span { grid-area: name; }
.poste-row b { grid-area: value; font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.poste-row small { grid-area: note; font-size: 11.5px; opacity: .62; }

.annual-lines { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 6px 0 14px; }
.annual-lines > div { display: flex; flex-direction: column; gap: 2px; }
.annual-lines span { font-size: 12px; opacity: .68; }
.annual-lines b { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 18px; font-variant-numeric: tabular-nums; }

/* Le bloc année, déplacé du bandeau sombre vers une carte claire : il faut lui
   rendre un contraste lisible, ses couleurs d'origine visant un fond vert foncé. */
.annual-card .year-control { background: rgba(21, 63, 43, .07); }
.annual-card .year-control label,
.annual-card .year-control output { color: inherit; }
.annual-card .range-labels { color: rgba(20, 24, 29, .6); }
.annual-card .year-control .lvlnote { margin-top: 10px; }
@media (prefers-color-scheme: dark) {
  .annual-card .year-control { background: rgba(255, 255, 255, .07); }
  .annual-card .range-labels { color: rgba(255, 255, 255, .6); }
}

/* La courbe descend elle aussi du bandeau sombre vers une carte claire : sans ces
   reprises, la ligne d'empreinte et les légendes étaient blanches sur blanc. */
.annual-card .trajectory { background: rgba(21, 63, 43, .05); }
.annual-card .trajectory .axis { stroke: rgba(20, 24, 29, .22); }
.annual-card .trajectory .curve-footprint { stroke: #14181d; }
.annual-card .trajectory .curve-point { stroke: #ffffff; }
.annual-card .trajectory text { fill: rgba(20, 24, 29, .66); }
.annual-card .trajectory figcaption { color: rgba(20, 24, 29, .72); }
.annual-card .trajectory figcaption .legend-footprint { background: #14181d; }
@media (prefers-color-scheme: dark) {
  .annual-card .trajectory { background: rgba(255, 255, 255, .06); }
  .annual-card .trajectory .axis { stroke: rgba(255, 255, 255, .22); }
  .annual-card .trajectory .curve-footprint { stroke: #ffffff; }
  .annual-card .trajectory text { fill: rgba(255, 255, 255, .7); }
  .annual-card .trajectory figcaption { color: rgba(255, 255, 255, .78); }
  .annual-card .trajectory figcaption .legend-footprint { background: #ffffff; }
}


/* ── Onglet Budget · lecture de relevé (V. Claude) ───────────────────────── */
.month-card { padding-top: 14px; }
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.month-nav strong {
  flex: 1;
  text-align: center;
  font: 600 16px/1 var(--display);
  letter-spacing: .01em;
  text-transform: capitalize;
}
.month-nav button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  color: inherit;
  font-size: 19px;
  line-height: 1;
}
.month-nav button:disabled { opacity: .32; }

.donut { position: relative; width: 190px; max-width: 62%; margin: 4px auto 6px; }
.donut svg { display: block; width: 100%; height: auto; overflow: visible; }
.donut-seg { transition: opacity .15s ease; cursor: pointer; }
.donut-seg:hover, .donut-seg:focus { opacity: .82; outline: none; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
}
.donut-center strong {
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.donut-center span { font-size: 11px; opacity: .72; }

.remain { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin-top: 6px; }
.remain span { font-size: 13px; opacity: .78; }
.remain strong { font-family: var(--mono); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.remain small { font-size: 13px; font-weight: 500; opacity: .8; }

.month-card .month-gauge { margin: 10px 0 12px; }
.month-card.good .month-gauge > span { background: #6fd39b; }
.month-card.warn .month-gauge > span { background: var(--amber); }
.month-card.over .month-gauge > span { background: #ff8a72; }

.poste-row { grid-template-columns: 10px 1fr auto; grid-template-areas: "dot name value" ". bar bar" ". note note"; }
.poste-share {
  grid-area: bar;
  display: block;
  height: 5px;
  margin: 5px 0 2px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.poste-share > span { display: block; height: 100%; border-radius: 999px; }

.months { margin: 2px 0 0; }
.months svg { display: block; width: 100%; height: auto; }
.months .bar { fill: var(--green); opacity: .34; cursor: pointer; transition: opacity .15s ease; }
.months .bar:hover, .months .bar:focus { opacity: .6; outline: none; }
.months .bar-current { fill: var(--green); opacity: 1; }
.months .marker-line { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 5; }
.months .bar-labels text { fill: var(--ink-faint); font: 10px var(--mono); }
.months figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  color: var(--ink-dim);
  font-size: 12px;
}
.months figcaption span { display: inline-flex; align-items: center; gap: 7px; }
.months figcaption i { width: 16px; height: 8px; border-radius: 2px; background: var(--green); }
.months figcaption .swatch-line { height: 0; border-top: 2px dashed var(--amber); border-radius: 0; }
.months-table { margin-top: 10px; font-size: 13px; }
.months-table table { width: 100%; border-collapse: collapse; }
.months-table th { text-align: left; font-weight: 500; text-transform: capitalize; }
.months-table th, .months-table td { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.months-table td { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.chart-tip {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.chart-tip.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .donut-seg, .months .bar, .chart-tip { transition: none; }
}

/* la carte du mois est claire : ses commandes doivent l'être aussi */
.month-card { color: var(--ink); background: var(--panel); }
.month-nav button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-dim);
}
.month-nav button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.month-card .month-gauge { background: var(--line-soft); }
.month-card.good .month-gauge > span { background: var(--green); }
.month-card .budget-lead { color: var(--ink-dim); }
.remain span { color: var(--ink-dim); }
.month-card.over .remain strong { color: var(--danger); }

/* ── Onglet « Et demain ? » (V. Claude) ──────────────────────────────────── */
.traj { margin: 14px 0 4px; }
.traj svg { display: block; width: 100%; height: auto; }
.traj .axis { stroke: var(--line); stroke-width: 1; }
.traj path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.traj .line-allocation { stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 6 5; }
.traj .line-baseline { stroke: var(--ink-faint); stroke-width: 2; }
.traj .line-improved { stroke: var(--green); stroke-width: 3; }
.traj .break-dot { fill: var(--danger); stroke: var(--panel); stroke-width: 2; cursor: pointer; }
.traj .break-dot.improved { fill: var(--green); }
.traj text { fill: var(--ink-faint); font: 10px var(--mono); }
.traj figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  color: var(--ink-dim);
  font-size: 12px;
}
.traj figcaption span { display: inline-flex; align-items: center; gap: 7px; }
.traj figcaption i { width: 18px; height: 0; border-top: 3px solid var(--green); border-radius: 2px; }
.traj figcaption .sw-alloc { border-top: 3px dashed var(--amber); }
.traj figcaption .sw-base { border-top: 3px solid var(--ink-faint); }

.traj-values { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 14px; }
.traj-values > div { display: flex; flex-direction: column; gap: 2px; }
.traj-values span { font-size: 12px; color: var(--ink-dim); }
.traj-values b { font-family: var(--mono); font-size: 17px; font-variant-numeric: tabular-nums; }

.levers { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lever {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
}
.lever.on { border-color: var(--green); background: var(--green-soft); }
.lever input { margin-top: 3px; accent-color: var(--green); }
.lever span { display: flex; flex-direction: column; gap: 2px; }
.lever small { color: var(--ink-dim); font-size: 12.5px; }

.adoption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.adoption label { font-size: 14px; color: var(--ink-dim); }
.adoption select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
}
.adoption .lvlnote { flex: 1 1 100%; margin: 4px 0 0; }
.funding { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.funding label { font-size: 14px; color: var(--ink-dim); }
.funding select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
}
.traj-card h2 { margin-top: 4px; }

/* repère d'achat : la dette de fabrication est signalée, jamais tracée sur la courbe */
.traj .buy line { stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 3 3; }
.traj .buy path { fill: var(--danger); }
.traj .buy path.down { fill: var(--green); }
.traj .buy { cursor: pointer; }
.traj .buy:hover path, .traj .buy:focus path { fill: var(--ink); }
.traj figcaption .sw-buy {
  width: 0;
  height: 0;
  border: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--danger);
  border-radius: 0;
}

/* ── Rythmes annuels (V. Claude) ─────────────────────────────────────────── */
.rates { display: flex; flex-direction: column; gap: 10px; }
.rate {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.rate.on { border-color: var(--green); background: var(--green-soft); }
.rate-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rate-head strong { font-size: 14.5px; }
.rate-head select {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
}
.rate-range { width: 100%; margin: 10px 0 4px; accent-color: var(--green); }
.rate small { display: block; color: var(--ink-dim); font-size: 12.5px; }

/* ==========================================================================
   V. CODEX — carnet carbone vivant
   Hiérarchie plus franche, profondeur progressive et explications à la demande.
   ========================================================================== */

:root {
  --paper: #f1f0e9;
  --paper-2: #e6e8df;
  --panel: #fffefa;
  --panel-2: #f6f7f1;
  --line: #d6dbd3;
  --line-soft: #e7e9e3;
  --ink: #11241a;
  --ink-dim: #526159;
  --ink-faint: #78857e;
  --green: #1d6b46;
  --green-deep: #0b3826;
  --green-bright: #43a86f;
  --green-soft: #e2f0e7;
  --amber: #e7b438;
  --amber-soft: #fff1c7;
  --danger: #a64532;
  --danger-soft: #fae4dd;
  --shadow: 0 24px 70px -42px rgba(8, 42, 27, .48), 0 8px 24px -20px rgba(8, 42, 27, .24);
}

body {
  background:
    radial-gradient(circle at 12% -2%, rgba(79, 161, 106, .24), transparent 27rem),
    radial-gradient(circle at 88% 2%, rgba(231, 180, 56, .17), transparent 24rem),
    linear-gradient(180deg, #0b3826 0, #174d35 285px, var(--paper) 285px);
}

.app-shell {
  width: min(100%, 760px);
  padding: 18px 22px 84px;
}

.app-header {
  margin-bottom: 14px;
}

.brand-mark {
  border-radius: 13px;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, .8);
}

.brand-copy small {
  font-family: var(--sans);
  letter-spacing: .01em;
}

/* En-tête : identité du site EQO sur fond clair, sans icône en tuile. */
.app-header {
  min-height: 76px;
  border: 1px solid rgba(22, 33, 28, .1);
  border-radius: 18px;
  background: #f7f4ec;
  padding: 12px 16px;
}
.app-header .brand { color: #16211c; }
.app-header .brand-mark { border-radius: 0; box-shadow: none; }
.app-header .brand-word { color: #16211c; }
.app-header .brand-word em { color: #256a45; }
.app-header .brand-copy small {
  color: #7d8b81;
  font-family: var(--mono);
  letter-spacing: .105em;
  text-transform: uppercase;
}
.app-header .net-chip {
  border-color: rgba(37, 106, 69, .16);
  background: rgba(255, 255, 255, .7);
  color: #256a45;
  box-shadow: none;
  backdrop-filter: none;
}
.app-header .net-chip::before { background: #256a45; box-shadow: none; }
.app-header .net-chip.off { color: #6f4c0d; }
@media (max-width: 640px) {
  .app-header { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .app-header .brand { width: 100%; }
  .app-header .brand-copy { flex: 1; }
  .app-header .brand-copy small { max-width: none; font-size: 9px; }
  .app-header .net-chip { max-width: none; }
}

.tabs {
  margin-bottom: 18px;
  border-color: rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(4, 29, 18, .44);
  box-shadow: 0 18px 42px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08);
  padding: 5px;
}

.tabs button {
  border-radius: 13px;
  color: rgba(255, 255, 255, .72);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-transform: none;
}

.tabs button[aria-selected="true"] {
  background: #fffefa;
  color: var(--green-deep);
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.scanner-card {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 87% 10%, rgba(255, 215, 112, .2), transparent 11rem),
    linear-gradient(145deg, #135238, #082f20 72%);
  box-shadow: 0 36px 76px -38px rgba(0, 24, 13, .86), inset 0 1px 0 rgba(255, 255, 255, .13);
  color: #fff;
  padding: 34px;
}

.scanner-card::before {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, #67b987 0 64%, var(--amber) 64% 100%);
}

.scanner-card::after {
  top: -105px;
  right: -86px;
  width: 255px;
  height: 255px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: transparent;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .025), 0 0 0 70px rgba(255, 255, 255, .018);
}

.scanner-card .eyebrow {
  color: #aee0bf;
}

.scanner-card h1 {
  max-width: 13ch;
  color: #fff;
  font-size: clamp(38px, 7.4vw, 52px);
  line-height: .96;
  text-wrap: balance;
}

.scanner-intro {
  max-width: 44ch;
  color: rgba(255, 255, 255, .75);
}

.scanner-card > .scan-zone > .btn-main {
  min-height: 66px;
  border: 1px solid rgba(255, 255, 255, .75);
  background: #fffefa;
  box-shadow: 0 20px 36px -24px rgba(0, 0, 0, .85), inset 0 -1px 0 rgba(14, 62, 40, .1);
  color: var(--green-deep);
}

.opts .btn-mini {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .82);
}

.opts .btn-mini:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.opts .btn-mini[aria-pressed="true"] {
  border-color: rgba(255, 219, 119, .65);
  background: rgba(231, 180, 56, .2);
  color: #ffe8a9;
}

.status,
.status .err {
  color: rgba(255, 255, 255, .78);
}

.card,
.result-card,
.compare-panel,
.budget-hero {
  border-color: rgba(17, 57, 37, .1);
  box-shadow: var(--shadow);
}

.result-host {
  margin-top: 24px;
}

.result-host:empty {
  display: none;
}

.result-card {
  overflow: hidden;
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 34px 80px -46px rgba(7, 45, 27, .58), 0 8px 26px -22px rgba(7, 45, 27, .32);
}

.ticket-head {
  min-height: 132px;
  align-items: flex-start;
  border: 0;
  background:
    radial-gradient(circle at 92% 4%, rgba(231, 180, 56, .18), transparent 10rem),
    linear-gradient(145deg, #f4faf5, #fffefa 70%);
  padding: 26px 26px 22px;
}

.product-identity {
  gap: 16px;
}

.product-thumb {
  width: 92px;
  height: 92px;
  flex-basis: 92px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 35px -23px rgba(9, 47, 30, .55), 0 0 0 1px rgba(22, 79, 48, .08);
  padding: 8px;
}

.tag {
  border-color: rgba(29, 107, 70, .12);
  background: rgba(226, 240, 231, .82);
  color: var(--green);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: none;
}

.pname {
  max-width: 21ch;
  font-size: clamp(25px, 5vw, 33px);
  line-height: 1.02;
  text-wrap: balance;
}

.product-meta {
  font-family: var(--sans);
  font-size: 12px;
}

.ticket-price {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 94% 20%, rgba(231, 180, 56, .22), transparent 10rem),
    linear-gradient(135deg, #0b3826, #1d6b46);
  color: #fff;
  padding: 27px 26px 25px;
}

.ticket-price::after {
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 150px;
  height: 150px;
  border: 18px solid rgba(255, 255, 255, .04);
  border-radius: 50%;
  content: "";
}

.price-kicker {
  display: block;
  margin-bottom: 9px;
  color: #aee0bf;
  font-size: 13px;
  font-weight: 650;
}

.ticket-price .figure {
  position: relative;
  z-index: 1;
}

.ticket-price .figure b {
  color: #fff;
  font-size: clamp(58px, 13vw, 78px);
}

.ticket-price .figure i {
  color: #ffe29a;
}

.ticket-price .fnote {
  position: relative;
  z-index: 1;
  max-width: 44ch;
  margin-top: 12px;
  color: rgba(255, 255, 255, .72);
}

.confidence-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  padding: 8px 9px 8px 13px;
  font-size: 13px;
  font-weight: 650;
}

.confidence-pill i,
.explain-link i,
.method-launch i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.confidence-pill.reliability-medium::before,
.confidence-pill.reliability-low::before,
.confidence-pill.reliability-good::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.confidence-pill.reliability-low::before { background: #ff9a80; }
.confidence-pill.reliability-good::before { background: #7ed39c; }

.result-card > .row-actions {
  gap: 10px;
  padding: 22px 26px 12px;
}

.result-card > .row-actions .btn-main {
  background: linear-gradient(135deg, #238158, #135238);
  box-shadow: 0 16px 28px -22px rgba(8, 55, 33, .75);
}

.result-explain {
  padding: 0 26px 24px;
}

.method-launch,
.explain-link {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 14px;
  background: #edf3ee;
  color: var(--green-deep);
  padding: 11px 12px 11px 15px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.method-launch i,
.explain-link i {
  flex: 0 0 22px;
  background: var(--green-deep);
  color: #fff;
}

.stages {
  margin-top: 20px;
}

.footer-disclosure {
  border: 1px solid rgba(18, 64, 41, .11);
  border-radius: 17px;
  background: rgba(255, 254, 250, .68);
  padding: 0 15px;
}

.footer-disclosure summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  color: var(--green-deep);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
}

.footer-disclosure-body {
  padding: 0 2px 10px;
}

.footer-disclosure-body p {
  margin: 0 0 13px;
}

.footer-install {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 13px;
  align-items: center;
  margin-top: 15px;
  border: 1px solid rgba(23, 80, 54, .14);
  border-radius: 17px;
  background: rgba(231, 239, 232, .82);
  color: var(--green-deep);
  padding: 10px 13px;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.footer-install:hover,
.footer-install:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(23, 80, 54, .3);
  background: #edf5ee;
  box-shadow: 0 14px 28px -24px rgba(0, 43, 22, .7);
}

.footer-install:focus-visible {
  outline: 3px solid rgba(37, 106, 69, .2);
  outline-offset: 2px;
}

.footer-install-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green-deep);
  color: #fff;
  font: 750 20px/1 var(--display);
}

.footer-install-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.footer-install-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.footer-install-copy small {
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.35;
}

.footer-install-arrow {
  color: var(--green);
  font: 600 25px/1 var(--display);
  text-align: center;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .footer-install { display: none !important; }
}

.footer-project-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 15px;
  color: var(--green-deep);
  font-size: 14px;
  font-weight: 700;
}

.info-sheet {
  width: min(calc(100% - 32px), 540px);
  max-height: min(82vh, 720px);
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 44px 100px -35px rgba(0, 20, 10, .8);
}

.info-sheet::backdrop {
  background: rgba(3, 24, 14, .64);
  backdrop-filter: blur(5px);
}

.info-sheet-panel {
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(231, 180, 56, .2), transparent 14rem),
    var(--panel);
  padding: 25px 27px 30px;
}

.info-sheet-close-row {
  display: flex;
  justify-content: flex-end;
}

.info-sheet-close {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--green-deep);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
}

.info-sheet-kicker {
  margin: 6px 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info-sheet h2 {
  max-width: 17ch;
  margin: 0 0 20px;
  font: 700 clamp(27px, 6vw, 36px)/1.05 var(--display);
  letter-spacing: -.035em;
}

.info-sheet-body {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.58;
}

.info-lead {
  border-left: 4px solid var(--amber);
  border-radius: 0 14px 14px 0;
  background: var(--amber-soft);
  color: var(--ink);
  padding: 13px 15px;
}

.info-receipt {
  overflow: hidden;
  margin: 4px 0 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.info-receipt > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
}

.info-receipt > div:last-child { border-bottom: 0; }
.info-receipt span { color: var(--ink-dim); font-size: 13px; }
.info-receipt strong { color: var(--ink); font-size: 13px; text-align: right; }
.info-footnote { color: var(--ink-faint); font-size: 13px; }

.install-steps {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding-left: 24px;
}

.install-steps li { padding-left: 4px; }

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 8% -2%, rgba(79, 161, 106, .24), transparent 20rem),
      radial-gradient(circle at 100% 2%, rgba(231, 180, 56, .16), transparent 16rem),
      linear-gradient(180deg, #0b3826 0, #174d35 235px, var(--paper) 235px);
  }

  .app-shell {
    padding: 13px 12px calc(118px + env(safe-area-inset-bottom));
  }

  .scanner-card {
    border-radius: 26px;
    padding: 29px 21px 26px;
  }

  .scanner-card h1 {
    font-size: clamp(36px, 11vw, 46px);
  }

  .ticket-head,
  .ticket-price {
    padding-right: 20px;
    padding-left: 20px;
  }

  .product-thumb {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    border-radius: 17px;
  }

  .result-card > .row-actions {
    padding-right: 20px;
    padding-left: 20px;
  }

  .result-explain {
    padding-right: 20px;
    padding-left: 20px;
  }

  .info-sheet {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .info-sheet-panel {
    max-height: 88vh;
    padding: 20px 20px calc(26px + env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   V. Codex — trajectoire : récit visuel, réglages et financement
   ═══════════════════════════════════════════════════════════════════════════ */
.annual-card .story-curve .curve-footprint {
  stroke: var(--green-deep);
  stroke-dasharray: none;
}

.traj-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 80, 54, .14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 105% -4%, rgba(231, 180, 56, .2), transparent 18rem),
    linear-gradient(145deg, #fbfffc, #fffdf7);
  padding: clamp(27px, 5vw, 42px);
}

.traj-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--green-deep), var(--green), var(--amber));
}

.traj-card h1 {
  max-width: 18ch;
  margin: 7px 0 14px;
  color: var(--green-deep);
  font: 700 clamp(35px, 7vw, 54px)/.98 var(--display);
  letter-spacing: -.045em;
}

.trajectory-lead {
  max-width: 64ch;
  margin: 0 0 23px;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.55;
}

.trajectory-story {
  margin: 0;
  border: 1px solid rgba(23, 80, 54, .12);
  border-radius: 22px;
  background: rgba(239, 247, 241, .72);
  padding: 17px 16px 15px;
}

.trajectory-story .improvement-area {
  fill: rgba(29, 107, 70, .13);
  stroke: none;
}

.trajectory-story .line-allocation {
  stroke: #bc8210;
  stroke-width: 3;
  stroke-dasharray: 7 6;
}

.trajectory-story .line-baseline {
  stroke: #657069;
  stroke-width: 2.5;
}

.trajectory-story .line-improved {
  stroke: var(--green);
  stroke-width: 4;
}

.trajectory-story .direct-label {
  font: 700 10px var(--sans);
  letter-spacing: -.01em;
}

.trajectory-story .label-allocation { fill: #966a08; }
.trajectory-story .label-baseline { fill: #545f58; }
.trajectory-story .label-improved { fill: var(--green-deep); }

.trajectory-milestones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 5px;
}

.trajectory-milestones > div {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(23, 80, 54, .1);
  border-radius: 15px;
  background: rgba(255, 255, 255, .76);
  padding: 12px 13px;
}

.trajectory-milestones > .chosen {
  border-color: rgba(29, 107, 70, .22);
  background: var(--green-soft);
}

.trajectory-milestones span,
.trajectory-milestones small {
  color: var(--ink-faint);
  font-size: 11px;
}

.trajectory-milestones strong {
  color: var(--ink);
  font: 750 22px/1.1 var(--display);
}

.trajectory-milestones .chosen strong { color: var(--green-deep); }

.fabrication-key {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 2px 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.35;
}

.fabrication-key i {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--amber);
  border-left: 5px solid transparent;
}

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

.traj-values > div {
  min-width: 0;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(255, 255, 255, .8);
  padding: 13px;
}

.traj-values > .chosen {
  border-color: rgba(29, 107, 70, .23);
  background: var(--green-soft);
}

.traj-values span {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.25;
}

.traj-values b {
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 750 clamp(15px, 2.5vw, 19px)/1.15 var(--display);
}

.traj-values .chosen b { color: var(--green-deep); }
.traj-card > .explain-link { margin-top: 17px; }

.trajectory-controls,
.funding-card,
.further-card {
  border-radius: 27px;
  padding: clamp(23px, 4vw, 32px);
}

.trajectory-controls .section-head,
.funding-card .section-head,
.further-card .section-head {
  margin-bottom: 16px;
}

.trajectory-controls h2,
.funding-card h2,
.further-card h2 {
  margin: 4px 0 0;
  color: var(--green-deep);
  font: 700 clamp(25px, 4.5vw, 34px)/1.05 var(--display);
  letter-spacing: -.035em;
}

.rates { gap: 9px; }

.rate {
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--paper-warm);
  padding: 14px 15px 12px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.rate.on {
  border-color: rgba(29, 107, 70, .28);
  background: var(--green-soft);
}

.rate-head strong {
  color: var(--ink);
  font-size: 14px;
}

.rate-head select,
.lever select,
.funding select {
  min-height: 38px;
  border: 1px solid rgba(23, 80, 54, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
  color: var(--green-deep);
  padding: 7px 32px 7px 10px;
  font: 700 12px var(--sans);
}

.rate-range { margin: 13px 0 5px; }

.rate small,
.lever small {
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.4;
}

.section-explain { margin-top: 13px; }

.equipment-head {
  margin-top: 29px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.levers { gap: 9px; }

.lever {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--paper-warm);
  padding: 14px 15px;
}

.lever.on {
  border-color: rgba(29, 107, 70, .28);
  background: var(--green-soft);
}

.lever label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.lever input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.lever span { min-width: 0; }
.lever strong { color: var(--ink); font-size: 14px; }
.lever select:disabled { opacity: .48; }

.funding-card {
  border-color: rgba(231, 180, 56, .34);
  background:
    radial-gradient(circle at 100% 0, rgba(231, 180, 56, .16), transparent 14rem),
    var(--panel);
}

.funding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
}

.funding label {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.4;
}

.funding-status {
  display: grid;
  gap: 4px;
  border-radius: 15px;
  background: var(--green-soft);
  padding: 13px 15px;
}

.funding-status.is-captive { background: var(--amber-soft); }
.funding-status strong { color: var(--green-deep); font-size: 13px; }
.funding-status.is-captive strong { color: #76520a; }
.funding-status span,
.funding-empty { color: var(--ink-dim); font-size: 12.5px; line-height: 1.45; }

.funding-card > .explain-link { margin-top: 14px; }

.further-card {
  background:
    radial-gradient(circle at 100% 0, rgba(231, 180, 56, .2), transparent 14rem),
    var(--green-deep);
  color: rgba(255, 255, 255, .78);
}

.further-card .eyebrow { color: #f0c354; }
.further-card h2 { color: #fff; }
.further-card p { max-width: 58ch; line-height: 1.5; }

.further-card .btn-main {
  width: auto;
  margin-top: 8px;
  background: #fff;
  color: var(--green-deep);
}

.further-card .explain-link {
  margin: 15px 0 0 10px;
  color: #fff;
}

.trajectory-empty {
  border-radius: 28px;
  padding: clamp(28px, 5vw, 42px);
}

@media (max-width: 640px) {
  .traj-card h1 { font-size: clamp(34px, 10.5vw, 45px); }
  .trajectory-story { margin-inline: -7px; padding-inline: 9px; }
  .trajectory-story .direct-label { display: none; }
  .traj-values { grid-template-columns: 1fr; }
  .traj-values > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .trajectory-milestones strong { font-size: 19px; }
  .rate-head { align-items: flex-start; }
  .rate-head select { max-width: 47%; }
  .lever { grid-template-columns: 1fr; }
  .lever select { width: 100%; }
  .funding { grid-template-columns: 1fr; }
  .funding select { width: 100%; }
  .further-card .btn-main { width: 100%; }
  .further-card .explain-link { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   V.CODEX2 — compte observé et écritures multi-postes
   ═══════════════════════════════════════════════════════════════════════════ */
.ledger-entry-card h1 { max-width: 14ch; }

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

.ledger-entry-card > .scan-zone { margin-top: 24px; }

.entry-launch {
  min-width: 0;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 14px;
  text-align: left;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.entry-launch:hover,
.entry-launch:focus-visible {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .14);
  transform: translateY(-2px);
}

.entry-launch > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgba(231, 180, 56, .18);
  color: #f2ca68;
  font: 750 16px var(--display);
}

.entry-launch strong { font-size: 14px; }
.entry-launch small { color: rgba(255, 255, 255, .67); font-size: 11px; line-height: 1.3; }

.scanner-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0 16px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.scanner-divider::before,
.scanner-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, .16);
}

.entry-sheet {
  width: min(calc(100% - 32px), 620px);
  max-height: min(88vh, 780px);
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 44px 100px -35px rgba(0, 20, 10, .8);
}

.entry-sheet::backdrop {
  background: rgba(3, 24, 14, .66);
  backdrop-filter: blur(5px);
}

.entry-sheet-panel {
  max-height: min(88vh, 780px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(231, 180, 56, .19), transparent 17rem),
    var(--panel);
  padding: 24px 28px 31px;
}

.entry-sheet h2 {
  max-width: 18ch;
  margin: 5px 0 22px;
  color: var(--green-deep);
  font: 700 clamp(29px, 5vw, 39px)/1.04 var(--display);
  letter-spacing: -.04em;
}

.ledger-form {
  display: grid;
  gap: 14px;
}

.ledger-form > label,
.entry-panel > label,
.ledger-form .form-grid > label,
.entry-panel .form-grid > label {
  display: grid;
  gap: 7px;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 650;
}

.ledger-form input,
.ledger-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(23, 80, 54, .2);
  border-radius: 13px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  padding: 10px 12px;
  font: 600 15px var(--sans);
}

.ledger-form input:focus,
.ledger-form select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(29, 107, 70, .12);
}

.entry-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--paper-warm);
  padding: 15px;
}

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

.input-with-unit input { padding-right: 74px; }
.input-with-unit i {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  color: var(--ink-faint);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.ledger-form .check-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 48px;
  grid-template-columns: none;
  border: 1px solid rgba(23, 80, 54, .15);
  border-radius: 13px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.ledger-form .check-field input {
  width: 20px;
  min-height: 20px;
  margin: 0 9px 0 0;
  accent-color: var(--green);
}

.field-help {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.4;
}

.entry-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(77, 157, 103, .28), transparent 12rem),
    var(--green-deep);
  color: #fff;
  padding: 17px 18px;
}

.entry-preview span { color: rgba(255, 255, 255, .7); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.entry-preview strong { font: 750 24px/1 var(--display); }
.entry-preview small { grid-column: 1 / -1; color: rgba(255, 255, 255, .72); font-size: 12px; line-height: 1.4; }

.account-mode {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
  padding-bottom: 13px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.account-mode strong {
  color: #f0c354;
  font-size: 12px;
}

.balance-source {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
  margin: -2px 0 12px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}
.balance-source span:last-child { color: #f0c354; font-weight: 700; }

.account-add {
  width: 100%;
  min-height: 47px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 750;
}

.entry-kind {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green-deep);
  font: 750 13px var(--display);
}

.account-line .nm,
.day .items .nm { min-width: 0; }
.items li.account-line {
  grid-template-columns: 34px minmax(0, 1fr) auto 44px;
  gap: 10px;
}
.account-line .nm,
.day .items .nm {
  white-space: normal;
}
.account-line .nm small,
.day .items .nm small {
  display: block;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  padding: 3px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.quality-tag.converted { background: var(--amber-soft); color: #76520a; }
.quality-tag.route { background: #e8f0f8; color: #245a8f; }
.quality-tag.scan { background: #edf3ea; color: #346344; }

.annual-account-gauge {
  height: 13px;
  overflow: hidden;
  margin: 21px 0 10px;
  border-radius: 999px;
  background: rgba(23, 80, 54, .1);
}

.annual-account-gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #61a577);
}

.account-annual.is-negative .annual-account-gauge span { background: var(--danger); }
.account-foot { margin: 0 0 20px; color: var(--ink-dim); font-size: 13px; line-height: 1.45; }
.account-foot strong { color: var(--green-deep); }
.simulate-trigger { margin-top: 17px; }

.months .bar-account {
  fill: #2f7b55;
  opacity: .88;
}

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

.simulation-split > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--paper-warm);
  padding: 13px;
}

.simulation-split span { color: var(--ink-faint); font-size: 11px; }
.simulation-split b { color: var(--green-deep); font: 750 17px var(--display); }

@media (max-width: 640px) {
  .entry-launchers { gap: 7px; }
  .entry-launch { min-height: 111px; padding: 11px; }
  .entry-launch small { font-size: 10px; }
  .entry-sheet { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .entry-sheet-panel { max-height: 92vh; padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
  .ledger-form .form-grid { grid-template-columns: 1fr; }
  .entry-preview { grid-template-columns: 1fr; }
  .entry-preview strong { font-size: 27px; }
  .simulation-split { grid-template-columns: 1fr; }
  .items li.account-line { grid-template-columns: 34px minmax(0, 1fr) auto 40px; gap: 7px; }
}

/* ── Postes du mois : détail et simulation à la demande ─────────────────── */
button.poste-row {
  width: 100%;
  min-height: 72px;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  grid-template-areas: "dot name value" ". bar bar" ". note note";
  margin: 0 0 7px;
  border: 1px solid rgba(23, 80, 54, .1);
  border-radius: 16px;
  appearance: none;
  background: rgba(248, 249, 245, .92);
  color: inherit;
  padding: 12px 13px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 18px -18px rgba(0, 36, 18, .7);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

button.poste-row:nth-child(odd) { background: rgba(244, 247, 241, .96); }
button.poste-row.is-simulated {
  border-color: rgba(184, 134, 11, .22);
  box-shadow: inset 3px 0 0 rgba(184, 134, 11, .48), 0 8px 18px -18px rgba(0, 36, 18, .7);
}
button.poste-row:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 107, 70, .28);
  background: #fff;
  box-shadow: 0 14px 26px -20px rgba(0, 36, 18, .72);
}
button.poste-row:focus-visible {
  outline: 3px solid rgba(29, 107, 70, .2);
  outline-offset: 2px;
}
button.poste-row b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--green-deep);
}
button.poste-row b::after {
  content: "›";
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font: 800 17px/1 var(--sans);
}
button.poste-row small { color: var(--ink-dim); opacity: .78; }

.poste-hint {
  margin: 9px 3px 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.45;
}

.poste-simulation-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  margin-top: 15px;
  border: 1px dashed rgba(184, 134, 11, .35);
  border-radius: 16px;
  background: rgba(245, 235, 204, .45);
  padding: 13px 15px;
}
.poste-simulation-summary span,
.poste-simulation-summary small { color: var(--ink-dim); font-size: 11.5px; }
.poste-simulation-summary strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #76520a;
  font: 750 17px/1.2 var(--display);
}

.poste-sheet { width: min(calc(100% - 32px), 680px); }
.poste-sheet-panel { min-height: min(560px, 84vh); }
.poste-sheet-panel h2 { margin-bottom: 18px; }
.poste-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 19px;
  border-radius: 15px;
  background: rgba(23, 80, 54, .08);
  padding: 5px;
}
.poste-tabs button {
  min-height: 43px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-dim);
  font: 750 13px var(--sans);
  cursor: pointer;
}
.poste-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--green-deep);
  box-shadow: 0 6px 16px -12px rgba(0, 36, 18, .7);
}
.poste-tabs button span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 11px;
}

.poste-panel { display: grid; gap: 16px; }
.poste-observed-total,
.poste-sim-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 16px;
  align-items: end;
  border-radius: 18px;
  background: var(--green-deep);
  color: #fff;
  padding: 17px 18px;
}
.poste-observed-total span,
.poste-sim-result span { color: rgba(255, 255, 255, .7); font-size: 12px; }
.poste-observed-total strong,
.poste-sim-result strong { font: 750 23px/1 var(--display); }
.poste-sim-result {
  background: linear-gradient(135deg, #785715, #9b7522);
}
.poste-sim-result small {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
}

.poste-entry-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.poste-entry-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 2px;
}
.poste-entry-date { color: var(--ink-faint); font-size: 11px; text-transform: capitalize; }
.poste-entry-copy { display: grid; gap: 3px; min-width: 0; }
.poste-entry-copy strong { color: var(--ink); font-size: 14px; }
.poste-entry-copy small { color: var(--ink-faint); font-size: 11px; line-height: 1.4; }
.poste-entry-list li > b { color: var(--green-deep); font: 700 14px var(--mono); white-space: nowrap; }

.poste-empty {
  border: 1px dashed rgba(23, 80, 54, .2);
  border-radius: 17px;
  background: var(--paper-warm);
  padding: 20px;
  text-align: center;
}
.poste-empty strong { color: var(--green-deep); font: 700 17px var(--display); }
.poste-empty p { margin: 6px auto 0; max-width: 38ch; color: var(--ink-dim); font-size: 13px; line-height: 1.45; }
.poste-add-entry { width: 100%; }

.poste-form-intro,
.poste-form-context {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}
.poste-form-intro {
  border-left: 3px solid var(--gold);
  background: rgba(245, 235, 204, .38);
  padding: 11px 13px;
}
.poste-sim-form { display: grid; gap: 15px; }
.poste-sim-form > .btn-main { margin-top: 2px; }
.service-lines { display: grid; gap: 16px; min-width: 0; }
.service-line {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--paper-warm);
  padding: 48px 16px 16px;
}
.service-line legend { color: var(--green-deep); padding: 0 6px; font: 700 16px var(--sans); }
.service-line > label { display: grid; gap: 7px; color: var(--ink-dim); font-size: 14px; font-weight: 650; }
.service-remove {
  position: absolute;
  top: 3px;
  right: 12px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--danger);
  padding: 8px 12px;
  font: 650 14px var(--sans);
  cursor: pointer;
}
.service-remove:hover:not(:disabled) { background: rgba(163, 64, 47, .08); }
.service-remove:disabled { opacity: .35; cursor: default; }
.service-add { width: 100%; min-height: 48px; font-size: 14px; }
.service-help { margin: 0; color: var(--ink-dim); font-size: 14px; line-height: 1.45; }
.service-line input, .service-line select { min-width: 0; font-size: 16px; }
.poste-submit-success {
  display: grid;
  gap: 3px;
  margin: -3px 0 0;
  border: 1px solid rgba(29, 107, 70, .2);
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  padding: 12px 14px;
  line-height: 1.4;
}
.poste-submit-success strong { font-size: 13px; }
.poste-submit-success span { color: var(--ink-dim); font-size: 12px; }

.poste-reset-zone,
.account-reset-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(163, 64, 47, .14);
  border-radius: 18px;
  background: rgba(248, 228, 223, .34);
  padding: 15px 17px;
}

.poste-reset-zone { margin-top: 21px; }
.poste-reset-zone p,
.account-reset-zone p { margin: 0; }
.poste-reset-zone p { display: grid; gap: 3px; }
.poste-reset-zone strong { color: var(--ink); font-size: 13px; }
.poste-reset-zone span,
.account-reset-zone p { color: var(--ink-faint); font-size: 12px; line-height: 1.45; }

.reset-action {
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(163, 64, 47, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .76);
  color: var(--danger);
  padding: 10px 14px;
  font: 700 12px/1.25 var(--sans);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.reset-action:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(163, 64, 47, .52);
  background: #fff;
}
.reset-action:focus-visible { outline: 3px solid rgba(163, 64, 47, .2); outline-offset: 2px; }
.reset-action:disabled { cursor: default; opacity: .52; }

.account-reset-zone {
  margin-top: 5px;
  background: rgba(255, 255, 255, .42);
  box-shadow: none;
}
.account-reset-zone > div { display: grid; gap: 5px; }
.account-reset-zone h2 { margin: 0; color: var(--ink); font: 700 19px/1.15 var(--display); }
.account-reset-zone .eyebrow { color: var(--danger); }

@media (max-width: 640px) {
  button.poste-row { min-height: 76px; padding: 12px 11px; }
  button.poste-row b { font-size: 13px; }
  .poste-simulation-summary { grid-template-columns: 1fr; }
  .poste-simulation-summary strong { grid-row: auto; grid-column: 1; }
  .poste-sheet-panel { min-height: 74vh; }
  .poste-observed-total,
  .poste-sim-result { grid-template-columns: 1fr; align-items: start; }
  .poste-entry-list li { grid-template-columns: 59px minmax(0, 1fr); gap: 8px; }
  .poste-entry-list li > b { grid-column: 2; }
  .poste-reset-zone,
  .account-reset-zone { align-items: stretch; flex-direction: column; gap: 13px; }
  .reset-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  button.poste-row,
  .reset-action { transition: none; }
}
