.ledger-section {
  padding: clamp(48px, 6vw, 88px) 0;
  background: #f0e6d5;
  color: var(--ink);
}
.ledger-heading .eyebrow { color: var(--red); }
.ledger-heading h2 { font-family: var(--heading); font-size: clamp(2rem, 3.55vw, 3.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -.045em; }
.ledger-heading h2 span { color: var(--red, #ae301d); }
.ledger-heading > p:last-child, .ledger-copy > p, .ledger-frame figcaption p {
  color: var(--muted);
  line-height: 1.75;
}
.ledger-heading > p:last-child { margin: 12px 0 25px; }
.ledger-stage-picker { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.ledger-stage-picker > span { font-weight: 650; }
.ledger-stages { display: inline-flex; border: 1px solid #aa8c68; border-radius: 5px; padding: 3px; }
.ledger-stages button { border: 0; border-radius: 3px; padding: 8px 17px; background: transparent; font-weight: 700; }
.ledger-stages button[aria-selected="true"] { color: #fffaf1; background: var(--red); }
#ledger-preparation { background: #fffaf1; border: 1px solid #d6c5a8; border-radius: 8px; }
#ledger-preparation:not([hidden]) { grid-template-columns: minmax(0, 1fr); gap: clamp(14px, 2vw, 24px); }
#ledger-preparation .ledger-copy > p { margin: 8px 0 0; }
#ledger-preparation .ledger-preview img { display: block; }
#ledger-preparation .ledger-enlarge { flex-shrink: 0; }
.ledger-store { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px; margin: 0 0 9px; }
.ledger-store span { color: var(--muted); font-size: .9rem; }
.ledger-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 18px 0;
  color: #fff5e0;
  background: #35291e;
  border-radius: 7px;
}
.ledger-metrics > div { padding: 0 clamp(16px, 2.4vw, 34px); }
.ledger-metrics > div + div { border-left: 1px solid #655443; }
.ledger-metrics dt { font-size: 1rem; font-weight: 650; }
.ledger-metrics dd { margin: 5px 0 0; }
.ledger-metrics strong { display: block; font: 700 clamp(1.45rem, 2.25vw, 2.15rem)/1.25 Arial, sans-serif; color: #ffce73; font-variant-numeric: tabular-nums; }
.ledger-metrics small { display: block; margin-top: 4px; color: #dfd0b8; font-size: .85rem; line-height: 1.55; }
.ledger-book { background: #fffaf1; border: 1px solid #d6c5a8; border-radius: 9px; overflow: hidden; }
.ledger-tabs {
  display: flex;
  gap: 7px;
  padding: 10px clamp(12px, 2.7vw, 36px);
  border-bottom: 1px solid var(--rule);
  background: #f4ecdf;
}
.ledger-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: #614e3d;
  padding: 8px clamp(11px, 1.5vw, 22px);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
}
.ledger-tabs button[aria-selected="true"] { background: var(--ink); color: #fff4db; }
.ledger-tabs button:not([aria-selected="true"]):hover { border-color: #ad9273; }
.ledger-panel:not([hidden]) {
  display: grid;
  gap: clamp(22px, 4.8vw, 82px);
  align-items: center;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  padding: clamp(23px, 3.4vw, 48px);
}
.ledger-copy h3, .ledger-profit-heading h3 { font-size: clamp(1.6rem, 2.4vw, 2.5rem); line-height: 1.3; letter-spacing: -.045em; }
.ledger-copy > p { margin: 12px 0 19px; }
.ledger-sample { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.ledger-sample caption { text-align: left; padding-bottom: 8px; color: var(--muted); font-size: .85rem; }
.ledger-sample th, .ledger-sample td { padding: 10px 7px; text-align: right; border-bottom: 1px solid #dfd2bf; }
.ledger-sample th:first-child { text-align: left; }
.ledger-sample thead { background: #f5e6c9; }
.ledger-sample tbody th { font-weight: 500; }
.ledger-sample .ledger-result { background: #faf1df; color: #734122; }
.ledger-sample .ledger-result > * { font-weight: 700; }
#ledger-day:not([hidden]) { grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); row-gap: clamp(18px, 2.4vw, 34px); }
#ledger-day:not([hidden]):has(> .ledger-phone-gallery[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ledger-profit-heading { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.ledger-profit-heading + .ledger-copy > p:first-child { margin-top: 0; }
.ledger-phone-toggle { padding: 8px 0; border: 0; background: transparent; color: #70452e; font-size: .9rem; font-weight: 650; }
.ledger-phone-toggle::after { content: ""; display: inline-block; margin: 0 3px 3px 9px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.ledger-phone-toggle[aria-expanded="true"]::after { margin-bottom: 0; transform: rotate(225deg); }
.ledger-phone-toggle:hover { color: var(--red); }
.ledger-ranked-days td { white-space: nowrap; }
.ledger-ranked-days th small { display: block; margin-top: 2px; color: var(--muted); font-size: .84em; line-height: 1.35; font-weight: 400; }
.ledger-ranked-days .ledger-subtotal > * { font-weight: 700; border-bottom-color: #ad9273; }
.ledger-copy .ledger-calculation { margin: 9px 0 0; font-size: .9rem; }
.ledger-method { margin-top: 12px; }
.ledger-method summary { color: #873824; cursor: pointer; padding-block: 4px; font-size: .94rem; font-weight: 700; }
.ledger-method p { margin-top: 7px; font-size: .94rem; line-height: 1.7; color: var(--muted); }
.ledger-terms { margin: 0; }
.ledger-terms dt { border-top: 1px solid var(--rule); padding-top: 12px; font-weight: 750; }
.ledger-terms dd { margin: 3px 0 12px; color: var(--muted); line-height: 1.7; }
.ledger-frame { margin: 0; border-radius: 7px; background: #f0e7d8; border: 1px solid var(--rule); }
.ledger-preview { display: block; cursor: zoom-in; }
.ledger-preview img { width: 100%; height: auto; }
.ledger-phone-gallery {
  container-type: inline-size;
  position: relative;
  align-self: start;
  justify-self: center;
  width: min(100%, 374px);
  min-width: 0;
  overflow: hidden;
  scroll-margin-top: 30px;
  border: 7px solid #293533;
  border-radius: 30px;
  background: #edf3f6;
  color: #18353b;
  box-shadow: 0 2px 0 1px #71807d, 0 13px 26px -12px #35291e63;
}
.ledger-phone-gallery::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 39px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: #53625f;
}
.phone-brandbar { display: flex; align-items: center; gap: 10px; padding: 21px 17px 14px; border-bottom: 1px solid #d7e0e1; background: #fff; }
.phone-duck { width: clamp(50px, 18cqw, 67px); height: auto; }
.phone-brandname img { width: 72px; height: auto; }
.phone-brandname h4 { margin: 4px 0 0; color: #415b5d; font-size: .76rem; font-weight: 600; letter-spacing: .1em; }
.phone-verified { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: #31615a; font-size: .72rem; white-space: nowrap; }
.phone-verified::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #468272; }
.phone-report { padding: 18px clamp(10px, 4.5cqw, 18px) 17px; }
.phone-period { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.phone-period h5 { margin: 0; font-size: clamp(1.13rem, 6cqw, 1.4rem); letter-spacing: -.04em; }
.phone-period > span { color: #536b70; font-size: .82rem; }
.phone-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; margin-top: 12px; background: #e2ebed; border-radius: 8px; }
.phone-days button { padding: 7px 0; border: 0; border-radius: 6px; background: transparent; color: #405e62; font-size: .89rem; font-weight: 650; }
.phone-days button[aria-pressed="true"] { color: #163e42; background: #fff; box-shadow: 0 1px 4px #1b454528; }
.phone-days button:hover { color: #0b4a50; }
.phone-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.phone-figures > div { padding: 13px clamp(7px, 3cqw, 12px) 15px; border: 1px solid #d6e0e2; border-radius: 9px; background: #fff; }
.phone-figures dt { color: #476369; font-size: .81rem; line-height: 1.4; }
.phone-figures dd { margin: 10px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(.96rem, 6.2cqw, 1.45rem); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em; line-height: 1.12; white-space: nowrap; }
.phone-figures .phone-figure-primary { border-color: #15454b; background: linear-gradient(130deg, #183c4c, #14585c); color: #fff; }
.phone-figure-primary dt { color: #e0eded; }
.phone-evidence { padding: 12px 9px 10px; border-top: 1px solid #d5dfdf; background: #fff; }
.phone-evidence h5 { margin: 0 8px 3px; color: #526b6c; font-weight: 600; font-size: .76rem; }
.phone-evidence-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.ledger-evidence { display: grid; place-items: center; gap: 4px; padding: 7px 1px; border-radius: 8px; color: #25595a; cursor: zoom-in; font-size: .78rem; line-height: 1.35; font-weight: 650; white-space: nowrap; }
.ledger-evidence:hover, .ledger-evidence:focus-visible { background: #eaf2f2; }
.ledger-evidence .ic { width: 20px; height: 20px; }
.ledger-evidence small { color: #526b6c; font-size: .75rem; font-weight: 500; }
.ledger-wide-frame figcaption span { font-size: .85rem; color: #62513f; }
.ledger-enlarge, .ledger-original {
  width: fit-content;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid #a17453;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: .94rem;
}
.ledger-enlarge:hover, .ledger-original:hover { color: var(--red); }
.ledger-wide-frame { padding: clamp(9px, 1.35vw, 18px); }
.ledger-wide-frame .ledger-preview { border: 1px solid #cbb99f; }
.ledger-wide-frame figcaption { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.ledger-desktop-sales { grid-column: 1 / -1; min-width: 0; }
.ledger-desktop-sales figcaption { margin: 0 0 12px; }
.ledger-desktop-sales h3 { margin: 0 0 4px; font-family: var(--heading); font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.2; }
.ledger-desktop-sales .ledger-sales-total { margin: 0 6px 0 auto; text-align: right; line-height: 1.35; font-size: .85rem; }
.ledger-sales-total strong { display: block; color: var(--ink); font: 700 1.17rem/1.35 Arial, sans-serif; }
.ledger-desktop-sales .ledger-preview img { display: block; }
.ledger-sales-shortcut { display: none; }
.ledger-footnote { margin-top: 13px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.ledger-dialog {
  color: var(--ink);
  background: #fffaf1;
  width: fit-content;
  max-width: 96vw;
  max-height: 94dvh;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: auto;
}
.ledger-dialog::backdrop { background: #21170fbd; }
.ledger-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.ledger-dialog header h3 { font-size: 1.23rem; }
.ledger-dialog header p { color: var(--muted); margin-top: 3px; font-size: .85rem; }
.ledger-close { min-width: 40px; min-height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; font: 1.7rem/1 Arial, sans-serif; }
.ledger-lightbox img { max-width: min(89vw, 1100px); max-height: 68dvh; width: auto; height: auto; margin: auto; border: 1px solid var(--rule); }
.ledger-dialog.is-mobile-report { width: min(445px, 96vw); }
.is-mobile-report .ledger-lightbox { max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; }
.is-mobile-report .ledger-lightbox img { width: min(100%, 390px); max-width: 100%; max-height: none; }
.ledger-image-caption { margin: 8px 0 0; max-width: 390px; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.ledger-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.ledger-image-nav:not([hidden]) { display: flex; gap: 6px; }
.ledger-image-nav button { min-height: 36px; padding: 3px 10px; border: 1px solid var(--rule); border-radius: 4px; background: #f6ecdb; color: var(--ink); font-size: .9rem; }
.ledger-original { display: block; margin-left: auto; }
@media (max-width: 840px) {
  #ledger-day:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  #ledger-day .ledger-profit-heading { order: 1; }
  #ledger-day .ledger-phone-gallery { order: 2; }
  #ledger-day .ledger-copy { order: 3; }
  .phone-days button { min-height: 44px; }
  .ledger-desktop-sales figcaption { flex-wrap: wrap; }
}
@media (max-width: 840px) and (hover: none) {
  #ledger-day .ledger-phone-gallery { order: -1; }
  .ledger-desktop-sales { justify-self: center; padding: 0; border: 0; background: transparent; }
  .ledger-desktop-sales figcaption, .ledger-desktop-sales .ledger-preview img { display: none; }
  .ledger-desktop-sales .ledger-preview { border: 0; }
  .ledger-sales-shortcut { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #734122; font-size: .9rem; font-weight: 650; }
}
@media (max-width: 760px) {
  .ledger-panel:not([hidden]) { grid-template-columns: 1fr; gap: 19px; }
}
@media (max-width: 480px) {
  .ledger-ranked-days { font-size: clamp(.78rem, 3.4vw, .94rem); }
  .ledger-metrics { grid-template-columns: 1fr; padding: 0 14px; margin-bottom: 14px; }
  .ledger-metrics > div { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 9px 0; }
  .ledger-metrics > div + div { border-left: 0; border-top: 1px solid #655443; }
  .ledger-metrics dd { margin: 0; text-align: right; }
  .ledger-metrics small { margin-top: 1px; }
  .ledger-tabs { gap: 2px; padding: 8px; }
  .ledger-tabs button { font-size: .9rem; flex: 1; padding: 9px 4px; }
  .ledger-heading h2 { font-size: clamp(1.8rem, 7vw, 2.3rem); word-break: keep-all; text-wrap: balance; }
  .ledger-panel:not([hidden]) { padding: 17px 13px; }
  .ledger-phone-gallery { border-width: 2px; border-radius: 19px; box-shadow: 0 3px 8px #37474318; }
  .ledger-phone-gallery::before { display: none; }
  .phone-brandbar { padding: 13px 12px 12px; }
  .ledger-sample th, .ledger-sample td { padding: 8px 4px; }
  .ledger-dialog { padding: 12px; }
}
