.rny-qc {
  --rny-green: #1c6227;
  --rny-ink: #26352a;
  color: var(--rny-ink);
  background: #f3f5f0;
  padding: clamp(16px, 3vw, 32px);
  margin: 24px auto;
  max-width: 1080px;
  box-sizing: border-box;
  font:
    16px/1.5 Lato,
    Arial,
    sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  border-radius: 12px;
}
.rny-qc * {
  box-sizing: border-box;
}
.rny-qc [hidden] {
  display: none !important;
}
.rny-qc h2,
.rny-qc h3,
.rny-qc h4 {
  color: var(--rny-ink);
  line-height: 1.25;
  margin: 0 0 14px;
}
.rny-qc h3 {
  font-size: 20px;
}
.rny-qc h4 {
  font-size: 18px;
}
.rny-qc p {
  margin: 0 0 12px;
}
.rny-qc .rny-intro {
  margin: 0 0 24px;
}
.rny-qc .rny-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.rny-qc form {
  min-width: 0;
  margin: 0;
}
.rny-qc fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}
.rny-qc legend {
  font-weight: 700;
  margin-bottom: 12px;
  padding: 0;
  font-size: 18px;
}
.rny-qc label {
  display: block;
  color: var(--rny-ink);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
}
.rny-qc input:not([type="checkbox"]),
.rny-qc select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  background: white;
  border: 1px solid #829086;
  border-radius: 6px;
  color: var(--rny-ink);
  font:
    400 16px/1.4 Lato,
    Arial,
    sans-serif;
  padding: 10px;
  margin: 5px 0 0;
}
.rny-qc button {
  background: var(--rny-green);
  color: white;
  border: 1px solid var(--rny-green);
  border-radius: 6px;
  font:
    600 15px/1.4 Lato,
    Arial,
    sans-serif;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  margin: 0;
  max-width: 100%;
  text-transform: none;
  letter-spacing: normal;
}
.rny-qc button:disabled {
  background: #e3e8e2;
  color: #586259;
  border-color: #acb7ac;
  cursor: default;
}
.rny-qc .rny-secondary {
  background: white;
  color: var(--rny-green);
}
.rny-qc .rny-text-button {
  background: transparent;
  color: var(--rny-green);
  border: 0;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}
.rny-qc .rny-text-button:disabled {
  color: #586259;
  text-decoration: none;
}
.rny-qc :focus-visible {
  outline: 3px solid #26352a;
  outline-offset: 3px;
}
.rny-qc .rny-material {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #e7ede4;
  border-radius: 6px;
  margin-bottom: 16px;
}
.rny-qc .rny-material strong {
  display: block;
  font-size: 15px;
}
.rny-qc .rny-material-picker {
  padding: 12px;
  background: #e7ede4;
  border-radius: 6px;
  margin-bottom: 16px;
}
.rny-qc .rny-eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  margin-bottom: 5px;
  color: #526151;
}
.rny-qc .rny-dimensions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
}
.rny-qc .rny-diagram {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 88px;
  margin: 0 auto 12px;
}
.rny-qc .rny-diagram rect,
.rny-qc .rny-diagram circle,
.rny-qc .rny-diagram path {
  stroke: var(--rny-green);
  stroke-width: 2;
  fill: none;
}
.rny-qc .rny-diagram text {
  fill: var(--rny-ink);
  font-size: 10px;
  text-anchor: middle;
}
.rny-qc .rny-guidance,
.rny-qc .rny-note,
.rny-qc .rny-muted {
  font-size: 13px;
  font-weight: 400;
  color: #526151;
}
.rny-qc .rny-guidance {
  margin-top: -4px;
}
.rny-qc .rny-results {
  background: white;
  border: 1px solid #d8e0d4;
  border-radius: 8px;
  padding: 20px;
  min-width: 0;
}
.rny-qc .rny-empty {
  padding: 16px 0;
}
.rny-qc .rny-empty h3 {
  font-size: 25px;
  margin-top: 12px;
}
.rny-qc .rny-empty p {
  color: #526151;
}
.rny-qc .rny-quantity {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 750;
  line-height: 1.1;
  color: var(--rny-green);
  margin: 6px 0 14px;
  font-variant-numeric: tabular-nums;
}
.rny-qc .rny-quantity span {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 4px;
}
.rny-qc .rny-total + .rny-total {
  border-top: 1px solid #d8e0d4;
  padding-top: 18px;
  margin-top: 18px;
}
.rny-qc .rny-breakdown {
  font-size: 14px;
}
.rny-qc .rny-details {
  font-size: 13px;
  margin-top: 16px;
}
.rny-qc summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
  color: var(--rny-green);
}
.rny-qc .rny-details p {
  margin: 8px 0;
}
.rny-qc .rny-warning {
  font-size: 13px;
  padding: 8px 10px;
  background: #fff5dc;
  border-left: 3px solid #9a6516;
  margin: 10px 0;
}
.rny-qc [data-error]:not(:empty) {
  font-size: 14px;
  padding: 10px;
  border-left: 3px solid #a32917;
  background: #fff0e9;
  margin: 12px 0;
}
.rny-qc [data-stale] {
  font-size: 14px;
  background: #fff5dc;
  border-left: 3px solid #9a6516;
  padding: 10px;
  margin-bottom: 16px;
}
.rny-qc .rny-is-stale .rny-quantity {
  color: #526151;
}
.rny-qc .rny-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #d8e0d4;
  margin-top: 18px;
  padding-top: 16px;
}
.rny-qc [data-export] {
  border-top: 1px solid #d8e0d4;
  margin-top: 18px;
  padding-top: 18px;
}
.rny-qc .rny-review {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
}
.rny-qc input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0;
}
.rny-qc [data-export] .rny-note {
  margin-top: 12px;
}
.rny-qc .rny-disclaimer {
  font-size: 12px;
  color: #526151;
  border-top: 1px solid #d8e0d4;
  margin: 24px 0 0;
  padding-top: 14px;
}
.rny-qc .rny-area-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.rny-qc .rny-area-list li {
  padding: 10px 12px;
  background: white;
  border: 1px solid #d8e0d4;
  border-radius: 6px;
  margin-bottom: 8px;
}
.rny-qc .rny-area-list li.rny-area-active {
  border-color: var(--rny-green);
}
.rny-qc .rny-area-list strong {
  font-size: 15px;
}
.rny-qc .rny-area-list span {
  display: block;
  font-size: 12px;
  color: #526151;
}
.rny-qc .rny-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.rny-qc .rny-row-actions button {
  min-height: 44px;
  padding: 6px 8px;
}
.rny-qc [data-calculate] {
  width: 100%;
}
@media (max-width: 720px) {
  .rny-qc .rny-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .rny-qc .rny-results {
    padding: 16px;
  }
  .rny-qc .rny-material {
    align-items: flex-start;
  }
  .rny-qc .rny-material button {
    flex-shrink: 0;
  }
  .rny-qc .rny-quantity {
    font-size: 44px;
  }
}
@media print {
  .rny-qc form,
  .rny-qc [data-export],
  .rny-qc button {
    display: none;
  }
  .rny-qc {
    max-width: none;
    background: white;
  }
  .rny-qc .rny-layout {
    display: block;
  }
  .rny-qc .rny-details {
    display: block;
  }
}
.rny-qc [data-handoff] {
  border-top: 1px solid #d8e0d4;
  margin-top: 18px;
  padding-top: 18px;
}
.rny-qc [data-plan-conflict] {
  padding: 12px;
  background: #fff5dc;
  border-radius: 6px;
  margin-bottom: 14px;
}
.rny-qc [data-plan-conflict] legend {
  font-size: 15px;
  padding-top: 10px;
}
.rny-qc input[type="radio"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0;
}
.rny-qc [data-plan-status] {
  margin-top: 12px;
}
@media print {
  .rny-qc [data-handoff] {
    display: none;
  }
}

/* p17: one inline searchable optional product picker; no overlay clipping. */
.rny-qc [data-product-picker] {min-width:0;max-width:100%;}
.rny-qc [data-material-search] {width:100%;min-width:0;box-sizing:border-box;}
.rny-qc .rny-picker-results {max-height:min(54rem,65vh);overflow-y:auto;overscroll-behavior:contain;border:1px solid #667466;border-radius:.3rem;background:white;}
.rny-qc .rny-picker-results[hidden] {display:none;}
.rny-qc .rny-picker-results [role=option] {padding:.75rem;min-height:44px;box-sizing:border-box;cursor:pointer;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid #dce3dc;}
.rny-qc .rny-picker-results [role=option] strong,.rny-qc .rny-picker-results [role=option] small {display:block;}
.rny-qc .rny-picker-results [role=option][aria-selected=true],.rny-qc .rny-picker-results [role=option]:hover {background:#e4eee3;outline:2px solid #1c6227;outline-offset:-2px;}

/* p22: compact single-area calculator; project planner keeps its input diagram. */
.rny-qc [data-product-picker] {display:block;width:100%;}
.rny-qc [data-product-picker] > label {display:block;width:100%;max-width:none;}
.rny-qc [data-picker-clear] {width:auto;min-width:44px;min-height:44px;padding:6px 10px;justify-self:start;}
.rny-qc .rny-diagram-desktop {display:none;}
.rny-qc:not(.rny-project-layout) .rny-intro {margin-bottom:16px;}
.rny-qc:not(.rny-project-layout) .rny-material-picker {padding:10px;margin-bottom:12px;}
.rny-qc:not(.rny-project-layout) label {margin-bottom:8px;}
.rny-qc:not(.rny-project-layout) .rny-dimensions {gap:10px;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));}
.rny-qc:not(.rny-project-layout) .rny-diagram {width:180px;height:auto;max-width:100%;margin:0 auto 10px;}
@media (min-width:721px) {
 .rny-qc:not(.rny-project-layout) .rny-diagram-input {display:none;}
 .rny-qc:not(.rny-project-layout) .rny-diagram-desktop:not(:empty) {display:block;}
 .rny-qc:not(.rny-project-layout) .rny-layout {gap:20px;}
}
@media (max-width:380px) {
 .rny-qc:not(.rny-project-layout) .rny-dimensions {grid-template-columns:minmax(0,1fr);}
}

/* p24: all matches stay in the list; smaller screens use a shorter scroll viewport. */
@media (max-width:720px) {.rny-qc .rny-picker-results {max-height:45vh;max-height:45dvh;}}

/* s1-r4: measured volume remains prominent alongside the order estimate. */
.rny-qc .rny-calculated-amount{font-size:2.25rem;line-height:1.15;font-weight:700;color:#203a2b}
