/* Tile route / tile-owned hosts only. No universal navigation or global rules. */
[data-tile-products] { min-width: 0; max-width: 100%; }
[data-tile-products][hidden],
[data-tile-products] [hidden],
[data-tile-product-errors] [hidden] { display: none !important; }
[data-tile-products] .tile-product-options {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid #315e51;
  border-radius: .65rem;
  color: #fff9ed;
  background: #164b43;
  font-family: var(--sans, sans-serif);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
[data-tile-products] *,
[data-tile-products] *::before,
[data-tile-products] *::after { box-sizing: border-box; min-width: 0; }
[data-tile-products] :is(h2, h3, p) { margin: 0; color: inherit; }
[data-tile-products] .tile-product-heading {
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
}
[data-tile-products] .tile-product-intro { margin-top: .6rem; font-size: .88rem; }
[data-tile-products] .tile-product-help {
  margin-top: .85rem;
  padding: .65rem .75rem;
  border-left: 3px solid #e5be89;
  color: #fff9ed;
  background: #103c35;
  font-size: .82rem;
}
[data-tile-products] .tile-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  margin-top: 1rem;
}
[data-tile-products] .tile-shopping-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  border: 2px solid #ded8c9;
  border-radius: .5rem;
  color: #18312d;
  background: #fff9ed;
}
[data-tile-products] .tile-shopping-card[data-tile-product-selected="true"] {
  border-color: #d9ab6a;
  box-shadow: 0 0 0 2px #d9ab6a;
}
[data-tile-products] .tile-product-name { font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
[data-tile-products] .tile-product-facts,
[data-tile-products] .tile-product-tiles,
[data-tile-products] .tile-product-base { color: #374c40; font-size: .82rem; }
[data-tile-products] .tile-product-facts { font-variant-numeric: tabular-nums; }
[data-tile-products] .tile-product-limit {
  padding: .5rem .65rem;
  border-left: 3px solid #aa773c;
  color: #553b1f;
  background: #f2e7d4;
  font-size: .8rem;
  font-weight: 750;
}
[data-tile-products] .tile-product-selected {
  align-self: flex-start;
  padding: .3rem .55rem;
  border-radius: .25rem;
  color: #103c35;
  background: #e7eadc;
  font-size: .75rem;
  font-weight: 800;
}
[data-tile-products] .tile-product-count-label { color: #485a50; font-size: .78rem; font-weight: 700; }
[data-tile-products] .tile-product-boxes {
  color: #164b43;
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  letter-spacing: -.035em;
}
[data-tile-products] .tile-product-waiting { color: #553b1f; font-size: .85rem; font-weight: 700; }
[data-tile-products] .tile-product-use {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  margin-top: .15rem;
  padding: .7rem .8rem;
  border: 1px solid #164b43;
  border-radius: .3rem;
  color: #fff9ed;
  background: #164b43;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
[data-tile-products] .tile-product-use:hover:not(:disabled) { background: #103c35; }
[data-tile-products] .tile-product-use:disabled { border-color: #cec7b9; color: #586057; background: #eae4d8; cursor: not-allowed; }
[data-tile-products] .tile-product-provenance { border-top: 1px solid #ded8c9; color: #374c40; font-size: .78rem; }
[data-tile-products] .tile-product-provenance summary {
  min-height: 44px;
  padding-block: .65rem;
  color: #18312d;
  font-weight: 750;
  cursor: pointer;
}
[data-tile-products] .tile-product-provenance p + p { margin-top: .5rem; }
[data-tile-products] .tile-product-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding-block: .5rem;
  color: #164b43;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .18em;
}
[data-tile-products] .tile-product-note { margin-top: .9rem; color: #f0eddf; font-size: .8rem; }
[data-tile-products] :is(button, a, summary):focus-visible,
body:has(form[data-calculator="tile"]) [data-tile-manual] summary:focus-visible { outline: 3px solid #a46b2c; outline-offset: 3px; }
[data-tile-products] .tile-product-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[data-tile-product-errors] .tile-field-error { display: block; margin-top: .45rem; color: #8b301e; font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }
body:has(form[data-calculator="tile"]) [data-tile-manual] summary { min-height: 44px; padding-block: .7rem; cursor: pointer; }
body:has(form[data-calculator="tile"]) .calculator-workbench { align-items: start; }
body:has(form[data-calculator="tile"]) .tool-hero { padding-block: 1.5rem 1.5rem; }
body:has(form[data-calculator="tile"]) .tool-hero .lede { max-width: 58ch; margin-block: .65rem 0; font-size: 1rem; line-height: 1.55; }
body:has(form[data-calculator="tile"]) > article[data-tile-print-record] { display: none; }
@media (max-width: 440px) {
  [data-tile-products] .tile-product-options { padding: .75rem; }
  [data-tile-products] .tile-shopping-card { padding: .8rem; }
  body:has(form[data-calculator="tile"]) .tool-hero { padding-block: 1rem; }
}
/* Save/Copy/Print are owned by the current parent result, not all alternatives. */
@media print {
  [data-tile-products] { display: none !important; }
  body:has(form[data-calculator="tile"]) > * { display: none !important; }
  body:has(form[data-calculator="tile"]) > article[data-tile-print-record] {
    display: block !important;
    margin: 0;
    padding: 0;
    color: #000;
    background: #fff;
    font: 10pt/1.5 sans-serif;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

[data-tile-product-errors] .tile-product-method-note {
  margin-block: .65rem;
  padding: .65rem .75rem;
  border-left: 3px solid #aa773c;
  color: #553b1f;
  background: #f2e7d4;
  font-size: .85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Tile-owned measurement and Clear actions retain 44 px touch targets. */
body:has(form[data-calculator="tile"]) form[data-calculator="tile"] :is(select, button) { min-height: 44px; }
