.fridge-demo {
  --ink: #14362b;
  --muted: #51695f;
  --green: #086c47;
  --line: #d7e7dc;
  --v3-fresh: #e9f8ed;
}

.workspace-app .app-title:focus-visible {
  width: fit-content;
}

.v3-source {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 15px 0 16px;
}

.v3-source .source-tabs {
  display: flex;
  width: fit-content;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5faf6;
}

.v3-source .source-tabs button {
  min-height: 44px;
  min-width: 82px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
}

.v3-source .source-tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 5px #2449341a;
}

.v3-source p,
.v3-result-meta {
  color: var(--muted);
  font-size: .875rem;
}

.v3-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(215px, 30%);
  align-items: start;
  gap: 15px;
}

.v3-review-items {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.v3-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.v3-row-review {
  border-color: #b7d9be;
  background: #f5fcf5;
}

.v3-row-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 11px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
}

.v3-row-label::-webkit-details-marker {
  display: none;
}

.v3-thumb {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: #edf6ef;
}

.v3-thumb .product-thumb {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.v3-row-info {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.v3-row-info strong,
.v3-row-amount {
  font-size: .94rem;
  line-height: 1.19;
  color: var(--ink);
}

.v3-row-info small {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.28;
}

.v3-row-review .v3-row-info small {
  color: #155e3c;
  font-weight: 700;
}

.v3-row-amount {
  text-align: right;
  white-space: nowrap;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.v3-chevron {
  display: block;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  color: var(--green);
}

.v3-row[open] .v3-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.v3-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  border-radius: 0 0 14px 14px;
}

.v3-fields label {
  min-width: 0;
  font-size: .875rem;
}

.v3-fields :is(input, select) {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  font-size: 1rem;
}

.v3-review-total,
.v3-result {
  min-width: 0;
  padding: 17px;
  border: 1px solid #c6e4cc;
  border-radius: 16px;
  background: var(--v3-fresh);
}

.v3-review-total {
  position: sticky;
  top: 16px;
}

.v3-review-total > p:first-child,
.v3-result-figures p {
  font-size: .875rem;
  font-weight: 650;
  color: var(--muted);
}

#receipt-live-total,
.v3-result-figures strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -.038em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.v3-review-total .checkbox-label {
  min-height: 44px;
  margin: 10px 0 6px;
  font-size: .94rem;
}

.v3-review-total .checkbox-label input {
  accent-color: var(--green);
}

.v3-review-total .form-error {
  margin: 0 0 8px;
  font-size: .875rem;
}

.v3-review-total .button {
  width: 100%;
  min-height: 47px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.v3-slip {
  margin-top: 14px;
  color: var(--green);
}

.v3-slip summary {
  width: fit-content;
  padding: 9px 0;
  cursor: pointer;
  font-weight: 650;
}

.v3-slip .receipt-scan {
  max-width: 430px;
  margin-top: 5px;
}

.v3-result {
  margin-block: 18px 14px;
}

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

.v3-result-figures strong {
  margin-top: 5px;
}

.v3-result-meta {
  margin-top: 10px;
}

.v3-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.v3-result-links .button {
  min-height: 46px;
}

.v3-recipe {
  display: grid;
  grid-template-columns: minmax(110px, 35%) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.v3-recipe img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1.24;
  object-fit: cover;
}

.v3-recipe > div {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
}

.v3-recipe h3 {
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  line-height: 1.18;
}

.v3-recipe p {
  font-size: .875rem;
  color: var(--muted);
}

.v3-recipe .v3-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.v3-recipe .button {
  width: fit-content;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 12px;
  font-size: .875rem;
}

.workspace-app .dashboard-receipt {
  border-color: #c6e4cc;
  background: #f1fbf3;
}

@media (max-width: 650px) {
  .v3-review { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .v3-review-total {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 6px 9px;
    padding: 12px;
  }
  .v3-review-total > :is(.button, .form-error, .checkbox-label) { grid-column: 1/-1; }
  .v3-review-total .checkbox-label { margin: 0; }
  .v3-review-total .form-error { margin: 0; }
  #receipt-live-total { justify-self: end; }
  .v3-source { gap: 5px; margin-block: 10px; }
  .v3-row-label { min-height: 55px; padding: 5px 8px; gap: 6px; }
  .v3-thumb { width: 34px; height: 34px; }
  .v3-thumb .product-thumb { width: 30px; height: 30px; }
  .v3-result { padding: 12px; }
  .v3-result-links .button {
    flex: 1 1 135px;
    min-width: 0;
    padding-inline: 9px;
    font-size: .9375rem;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .v3-row-info strong { font-size: .875rem; }
  .v3-row-amount { white-space: normal; }
  .v3-result-figures { grid-template-columns: 1fr; }
  .v3-recipe { grid-template-columns: minmax(85px, 33%) minmax(0, 1fr); }
}
