/* Stacked data embeds — tables, stack grids, charts and calculators.
   Colours and type come from the theme's :root tokens, with fallbacks. */

.shd.shd.shd{
  --shd-surface: var(--sand, #F5F0E4);
  --shd-card: var(--card, #F2EBDC);
  --shd-panel: var(--panel, #E9E2D2);
  --shd-ivory: var(--ivory, #ECE7DA);
  --shd-ink: var(--ink, #241F1A);
  --shd-ink-hard: var(--ink-hard, #1C1A16);
  --shd-body: var(--body-strong, #2B2822);
  --shd-muted: var(--text-2, #6E6456);
  --shd-faint: var(--text-faint, #8A8172);
  --shd-border: var(--border, #D8CDB6);
  --shd-border-alt: var(--border-alt, #C9BFA8);
  --shd-mango: var(--mango, #F5731E);
  --shd-mango-deep: var(--mango-hover, #DC6416);
  --shd-growth: var(--sig-growth, #2C7A4E);
  --shd-drop: var(--sig-drop, #A3301A);
  --shd-blue: #2F6DB5;
  --shd-heat-rgb: 220, 100, 22;
  --shd-f-body: var(--f-body, 'Whyte', 'Whyte-fb', Arial, system-ui, sans-serif);
  --shd-f-display: var(--f-display, 'Gascogne', 'Gascogne-fb', Georgia, serif);

  margin: 32px 0;
  padding: 0;
  font-family: var(--shd-f-body);
  color: var(--shd-body);
  font-size: 14px;
  line-height: 1.45;
  max-width: 100%;
}

.shd.shd.shd *,
.shd.shd.shd *::before,
.shd.shd.shd *::after{ box-sizing: border-box; }

.shd.shd.shd .shd-head{ margin: 0 0 12px; padding: 0; }
.shd.shd.shd .shd-title{
  display: block;
  font-family: var(--shd-f-display);
  font-size: 20px;
  line-height: 1.25;
  color: var(--shd-ink-hard);
  font-weight: 400;
}

/* ---------- tools row ---------- */
.shd.shd.shd .shd-tools{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.shd.shd.shd .shd-search{
  position: relative;
  flex: 1 1 240px;
  max-width: 360px;
  margin: 0;
  display: block;
}
.shd.shd.shd .shd-search svg{
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--shd-faint);
  pointer-events: none;
}
.shd.shd.shd .shd-search input{
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 12px 0 34px;
  font: inherit;
  font-size: 14px;
  color: var(--shd-ink);
  background: #FBF8F1;
  border: 1px solid var(--shd-border-alt);
  border-radius: 2px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.shd.shd.shd .shd-search input::placeholder{ color: var(--shd-faint); }
.shd.shd.shd .shd-search input:focus{
  outline: 2px solid var(--shd-mango);
  outline-offset: -1px;
  border-color: var(--shd-mango);
}
.shd.shd.shd .shd-count{
  margin-left: auto;
  font-size: 13px;
  color: var(--shd-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- table ---------- */
.shd.shd.shd .shd-scroll{
  position: relative;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: 100%;
  scroll-padding: 0;
  overflow: auto;
  border: 1px solid var(--shd-border);
  background: #FBF8F1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.shd.shd.shd .shd-scroll:focus-visible{ outline: 2px solid var(--shd-mango); outline-offset: 2px; }
.shd.shd.shd.shd-tall .shd-scroll{ max-height: 520px; }

.shd.shd.shd .shd-tbl{
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--shd-body);
  table-layout: auto;
}
.shd.shd.shd .shd-tbl th,
.shd.shd.shd .shd-tbl td{
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--shd-border);
  text-align: left;
  vertical-align: top;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: normal;
}
.shd.shd.shd .shd-tbl thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--shd-panel);
  color: var(--shd-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
  line-height: 1.25;
  vertical-align: bottom;
  border-bottom: 1px solid var(--shd-border-alt);
  white-space: nowrap;
}
.shd.shd.shd .shd-tbl tbody th{
  color: var(--shd-ink);
  font-weight: 400;
}
.shd.shd.shd .shd-tbl tbody tr:nth-child(even) > *{ background: rgba(233, 226, 210, .35); }
.shd.shd.shd .shd-tbl tbody tr:hover > *{ background: var(--shd-ivory); }
.shd.shd.shd .shd-tbl tbody tr:last-child > *{ border-bottom: 0; }
.shd.shd.shd .shd-tbl .is-num{
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shd.shd.shd .shd-tbl .is-nowrap{ white-space: nowrap; }
.shd.shd.shd .shd-tbl .is-pos{ color: var(--shd-growth); }
.shd.shd.shd .shd-tbl .is-neg{ color: var(--shd-drop); }
.shd.shd.shd .shd-tbl ul{ margin: 0; padding: 0; list-style: none; }
.shd.shd.shd .shd-tbl li{ margin: 0 0 2px; padding: 0; }
.shd.shd.shd .shd-tbl li::before{ content: none; }
.shd.shd.shd .shd-tbl tr.shd-hl > *{
  background: #FBE3CF !important;
  color: var(--shd-ink-hard);
  font-weight: 700;
}
.shd.shd.shd .shd-tbl tr.shd-hl > :first-child{ box-shadow: inset 3px 0 0 var(--shd-mango); }
.shd.shd.shd .shd-tbl td.is-heat,
.shd.shd.shd .shd-tbl tbody tr:nth-child(even) > td.is-heat,
.shd.shd.shd .shd-tbl tbody tr:hover > td.is-heat{
  background: rgba(var(--shd-heat-rgb), var(--shd-heat, 0));
}
.shd.shd.shd .shd-tbl tbody tr:hover > td.is-heat{ box-shadow: inset 0 0 0 1px rgba(36, 31, 26, .12); }

/* sortable headers */
.shd.shd.shd .shd-sort{
  all: unset;
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  line-height: inherit;
}
.shd.shd.shd .is-num > .shd-sort{ flex-direction: row-reverse; }
.shd.shd.shd .shd-sort:focus-visible{ outline: 2px solid var(--shd-mango); outline-offset: 3px; }
.shd.shd.shd .shd-sort:hover{ color: var(--shd-mango-deep); }
.shd.shd.shd .shd-sort-ico{
  position: relative;
  display: inline-block;
  width: 8px;
  height: 12px;
  flex: none;
  margin-bottom: 1px;
}
.shd.shd.shd .shd-sort-ico::before,
.shd.shd.shd .shd-sort-ico::after{
  content: "";
  position: absolute;
  left: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: .3;
}
.shd.shd.shd .shd-sort-ico::before{ top: 0; border-bottom: 5px solid currentColor; }
.shd.shd.shd .shd-sort-ico::after{ bottom: 0; border-top: 5px solid currentColor; }
.shd.shd.shd th[aria-sort="ascending"] .shd-sort-ico::before,
.shd.shd.shd th[aria-sort="descending"] .shd-sort-ico::after{ opacity: 1; border-top-color: var(--shd-mango-deep); border-bottom-color: var(--shd-mango-deep); }
.shd.shd.shd th[aria-sort="ascending"] .shd-sort-ico::after,
.shd.shd.shd th[aria-sort="descending"] .shd-sort-ico::before{ opacity: .12; }

/* sticky first column (wide tables) */
.shd.shd.shd.shd-sticky-first .shd-tbl tbody th,
.shd.shd.shd.shd-sticky-first .shd-tbl tfoot th,
.shd.shd.shd.shd-sticky-first .shd-tbl thead tr:first-child th:first-child{
  position: sticky;
  left: 0;
  z-index: 1;
  background: #F4EFE3;
  box-shadow: inset -1px 0 0 var(--shd-border);
}
.shd.shd.shd.shd-sticky-first .shd-tbl thead tr:first-child th:first-child{ z-index: 3; background: var(--shd-panel); }
.shd.shd.shd.shd-sticky-first .shd-tbl tbody tr:nth-child(even) th{ background: #EFE9DB; }

.shd.shd.shd .shd-empty{
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--shd-muted);
}

.shd.shd.shd .shd-foot{
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--shd-muted);
}
.shd.shd.shd .shd-foot a{ color: var(--shd-mango-deep); }

/* ---------- stack grid ---------- */
.shd.shd.shd.shd-grid .shd-tbl{ width: auto; min-width: 100%; }
.shd.shd.shd .shd-grid .shd-tbl th,
.shd.shd.shd .shd-grid .shd-tbl td,
.shd.shd.shd-grid.shd .shd-tbl th,
.shd.shd.shd-grid.shd .shd-tbl td{
  padding: 6px 8px;
  font-size: 13px;
  border-bottom: 1px solid rgba(216, 205, 182, .6);
}
.shd.shd.shd-grid.shd .shd-tbl tbody td{ border-right: 2px solid #FBF8F1; }
.shd.shd.shd-grid.shd .shd-tbl td.is-blank{ background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(201, 191, 168, .35) 4px 5px); }
.shd.shd.shd-grid.shd .shd-tbl thead th{ text-align: center; }
.shd.shd.shd-grid.shd .shd-tbl thead tr:nth-child(2) th{ top: 31px; }
.shd.shd.shd-grid.shd .shd-tbl th.shd-block{
  border-left: 2px solid #FBF8F1;
  font-family: var(--shd-f-body);
}
.shd.shd.shd.shd-grid .shd-corner{ text-align: left !important; vertical-align: bottom; }
.shd.shd.shd.shd-grid .shd-corner span{
  display: block;
  font-weight: 400;
  color: var(--shd-muted);
  font-size: 11.5px;
}
.shd.shd.shd-grid.shd .shd-tbl tbody th{ text-align: center; font-variant-numeric: tabular-nums; }
.shd.shd.shd-grid.shd .shd-tbl tfoot th,
.shd.shd.shd-grid.shd .shd-tbl tfoot td{
  background: var(--shd-card);
  font-size: 12.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--shd-border);
}
.shd.shd.shd-grid.shd .shd-tbl tfoot tr:first-child > *{ border-top: 1px solid var(--shd-border-alt); }
.shd.shd.shd-grid.shd .shd-tbl tfoot tr.is-text td{ text-align: center; color: var(--shd-muted); white-space: normal; min-width: 70px; line-height: 1.25; }
.shd.shd.shd-grid.shd .shd-tbl tfoot th{ text-align: left; font-weight: 700; }
.shd.shd.shd .shd-legend-heat{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--shd-muted);
  font-variant-numeric: tabular-nums;
}
.shd.shd.shd .shd-legend-heat i{
  display: block;
  width: 96px;
  height: 10px;
  background: linear-gradient(90deg, rgba(var(--shd-heat-rgb), .06), rgba(var(--shd-heat-rgb), .56));
  border: 1px solid var(--shd-border);
}

/* ---------- charts ---------- */
.shd.shd.shd .shd-plot{ position: relative; width: 100%; }
.shd.shd.shd .shd-plot svg{ display: block; width: 100%; height: auto; overflow: visible; }
.shd.shd.shd .shd-plot text{
  font-family: var(--shd-f-body);
  font-size: 12px;
  fill: var(--shd-muted);
}
.shd.shd.shd .shd-plot .shd-ax-title{ fill: var(--shd-muted); font-size: 12px; }
.shd.shd.shd .shd-plot .shd-val{ fill: var(--shd-body); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.shd.shd.shd .shd-plot .shd-grid-l{ stroke: var(--shd-border); stroke-width: 1; shape-rendering: crispEdges; }
.shd.shd.shd .shd-plot .shd-zero{ stroke: var(--shd-muted); stroke-width: 1; shape-rendering: crispEdges; }
.shd.shd.shd .shd-plot .shd-band{ fill: transparent; }
.shd.shd.shd .shd-plot .shd-band.is-on{ fill: rgba(36, 31, 26, .05); }

.shd.shd.shd .shd-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--shd-body);
}
.shd.shd.shd .shd-legend li{ display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0; }
.shd.shd.shd .shd-legend li::before{ content: none; }
.shd.shd.shd .shd-sw{ width: 12px; height: 12px; border-radius: 2px; flex: none; }
.shd.shd.shd .shd-sw-line{ width: 16px; height: 3px; border-radius: 2px; }

.shd.shd.shd .shd-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.shd.shd.shd .shd-chip{
  all: unset;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--shd-body);
  border: 1px solid var(--shd-border-alt);
  border-radius: 999px;
  background: #FBF8F1;
}
.shd.shd.shd .shd-chip:hover{ border-color: var(--shd-mango); }
.shd.shd.shd .shd-chip:focus-visible{ outline: 2px solid var(--shd-mango); outline-offset: 2px; }
.shd.shd.shd .shd-chip[aria-pressed="true"]{
  background: var(--shd-mango-deep);
  border-color: var(--shd-mango-deep);
  color: #fff;
}
.shd.shd.shd .shd-chip-hint{ font-size: 12.5px; color: var(--shd-muted); margin: 0 0 8px; }

.shd.shd.shd .shd-tip{
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 140px;
  max-width: 280px;
  padding: 9px 11px;
  background: var(--shd-ink-hard);
  color: #F5F0E4;
  font-size: 12.5px;
  line-height: 1.45;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(22, 20, 15, .18);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s, transform .12s;
}
.shd.shd.shd .shd-tip.is-on{ opacity: 1; transform: none; }
.shd.shd.shd .shd-tip b{ display: block; margin-bottom: 4px; font-weight: 700; color: #fff; }
.shd.shd.shd .shd-tip .r{ display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.shd.shd.shd .shd-tip .r span:first-child{ display: inline-flex; align-items: center; gap: 6px; }
.shd.shd.shd .shd-tip .r.is-hl{ color: #fff; font-weight: 700; }
.shd.shd.shd .shd-tip .r span:last-child{ font-variant-numeric: tabular-nums; }
.shd.shd.shd .shd-tip i{ width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.shd.shd.shd .shd-data{ margin-top: 14px; }
.shd.shd.shd .shd-data summary{
  cursor: pointer;
  width: max-content;
  font-size: 13px;
  color: var(--shd-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--shd-border-alt);
}
.shd.shd.shd .shd-data summary:hover{ color: var(--shd-mango-deep); }
.shd.shd.shd .shd-data[open] summary{ margin-bottom: 10px; }
.shd.shd.shd .shd-data .shd-scroll{ max-height: 360px; }

/* ---------- calculator ---------- */
.shd.shd.shd.shd-calc{
  padding: 22px 22px 18px;
  background: var(--shd-card);
  border: 1px solid var(--shd-border);
}
.shd.shd.shd .shd-intro{ margin: 0 0 18px; font-size: 14px; color: var(--shd-muted); }
.shd.shd.shd .shd-inputs{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
  margin-bottom: 20px;
}
.shd.shd.shd .shd-field{ display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 10px; }
.shd.shd.shd .shd-field-wide{ grid-column: span 3; }
.shd.shd.shd .shd-field label{ font-size: 13px; font-weight: 700; color: var(--shd-ink); }
.shd.shd.shd .shd-field output{
  font-size: 15px;
  color: var(--shd-ink-hard);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.shd.shd.shd .shd-field input[type="range"],
.shd.shd.shd .shd-field select{ grid-column: 1 / -1; }
.shd.shd.shd .shd-field-btn{ align-items: end; }
.shd.shd.shd .shd-field select{
  height: 38px;
  width: 100%;
  margin: 0;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  color: var(--shd-ink);
  background: #FBF8F1;
  border: 1px solid var(--shd-border-alt);
  border-radius: 2px;
}
.shd.shd.shd .shd-reset{
  all: unset;
  grid-column: 1 / -1;
  justify-self: start;
  cursor: pointer;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--shd-ink);
  border: 1px solid var(--shd-ink);
  border-radius: 2px;
}
.shd.shd.shd .shd-reset:hover{ background: var(--shd-ink); color: #F5F0E4; }
.shd.shd.shd .shd-reset:focus-visible{ outline: 2px solid var(--shd-mango); outline-offset: 2px; }

.shd.shd.shd input[type="range"]{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border: 0;
  box-shadow: none;
}
.shd.shd.shd input[type="range"]:focus{ outline: none; }
.shd.shd.shd input[type="range"]::-webkit-slider-runnable-track{
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--shd-mango-deep) var(--p, 0%), var(--shd-border-alt) var(--p, 0%));
}
.shd.shd.shd input[type="range"]::-moz-range-track{ height: 4px; border-radius: 2px; background: var(--shd-border-alt); }
.shd.shd.shd input[type="range"]::-moz-range-progress{ height: 4px; border-radius: 2px; background: var(--shd-mango-deep); }
.shd.shd.shd input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--shd-mango-deep);
  box-shadow: 0 1px 3px rgba(22, 20, 15, .2);
}
.shd.shd.shd input[type="range"]::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--shd-mango-deep);
}
.shd.shd.shd input[type="range"]:focus-visible::-webkit-slider-thumb{ outline: 2px solid var(--shd-mango); outline-offset: 2px; }

.shd.shd.shd .shd-stats{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  background: var(--shd-border);
  border: 1px solid var(--shd-border);
}
.shd.shd.shd .shd-stat{ padding: 12px 14px; background: #FBF8F1; }
.shd.shd.shd .shd-stat .l{ display: block; font-size: 12px; color: var(--shd-muted); margin-bottom: 2px; }
.shd.shd.shd .shd-stat .v{ display: block; font-size: 20px; line-height: 1.2; color: var(--shd-ink-hard); }
.shd.shd.shd .shd-stat .v.is-neg{ color: var(--shd-drop); }
.shd.shd.shd .shd-stat .v.is-pos{ color: var(--shd-growth); }


/* ---------- negative cash sale ---------- */
.shd.shd.shd .shd-field-span2{ grid-column: span 2; }
.shd.shd.shd .shd-stats-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shd.shd.shd.shd-negsale .shd-scroll{ max-height: 520px; }
.shd.shd.shd.shd-negsale + .shd-negsale{ margin-top: 20px; }
.shd.shd.shd .shd-badge{
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 999px;
  color: var(--shd-muted);
  background: var(--shd-panel);
  white-space: nowrap;
}
.shd.shd.shd .shd-badge.is-neg{ color: #fff; background: var(--shd-drop); }
.shd.shd.shd .shd-badge.is-pos{ color: #fff; background: var(--shd-growth); }
.shd.shd.shd .shd-badge.is-neg::before{ content: "\2193\00a0"; }
.shd.shd.shd .shd-badge.is-pos::before{ content: "\2191\00a0"; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .shd.shd.shd{ margin: 24px 0; }
  .shd.shd.shd .shd-title{ font-size: 18px; }
  .shd.shd.shd .shd-tbl{ font-size: 13px; }
  .shd.shd.shd .shd-tbl th,
  .shd.shd.shd .shd-tbl td{ padding: 8px 10px; }
  .shd.shd.shd.shd-tall .shd-scroll{ max-height: 440px; }
  .shd.shd.shd .shd-search{ max-width: none; flex-basis: 100%; }
  .shd.shd.shd .shd-count{ margin-left: 0; }
  .shd.shd.shd.shd-calc{ padding: 16px 14px 14px; }
  .shd.shd.shd .shd-inputs{ grid-template-columns: 1fr; }
  .shd.shd.shd .shd-field-wide,
  .shd.shd.shd .shd-field-span2{ grid-column: auto; }
  .shd.shd.shd .shd-stats.shd-stats-3{ grid-template-columns: 1fr; }
  .shd.shd.shd .shd-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shd.shd.shd .shd-stat .v{ font-size: 17px; }
}

@media print {
  .shd.shd.shd.shd-tall .shd-scroll{ max-height: none; overflow: visible; }
  .shd.shd.shd .shd-tools, .shd.shd.shd .shd-chips{ display: none; }
}

.shd.shd.shd .shd-sr{
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shd.shd.shd .shd-tbl td.shd-mop { color: var(--shd-faint); font-style: italic; text-align: center; }
.shd.shd.shd-negsale .shd-tbl th,
.shd.shd.shd-negsale .shd-tbl td { padding-left: 8px; padding-right: 8px; }
.shd.shd.shd-negsale .shd-tbl tr > :first-child { padding-left: 12px; }
.shd.shd.shd-negsale .shd-tbl tr > :last-child { padding-right: 12px; }
