/* Mulch-only workbench presentation. Guide and print layouts stay in styles.css. */
@media screen {
  .mulch-page .mulch-workbench {
    --mulch-table-head: #d9eff7;
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    grid-template-areas: "controls results" "actions actions" "status status" "guide guide" "attribution attribution";
    gap: 8px 10px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--workspace-shadow);
  }
  .mulch-page .mulch-controls,
  .mulch-page .mulch-results { min-width: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 6px; }
  .mulch-page .mulch-controls { grid-area: controls; align-self: start; background: #173d2d; color: #f5faf4; }
  .mulch-page .mulch-results { grid-area: results; background: var(--surface); }
  .mulch-page .mulch-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; }
  .mulch-page .mulch-view-switch button { min-width: 0; min-height: 40px; padding: 6px 8px; border: 1px solid #aec2b4; border-radius: 5px; background: #fff; color: #173d2d; font: 700 13px/1.2 Arial, Helvetica, sans-serif; cursor: pointer; }
  .mulch-page .mulch-view-switch button[aria-pressed="true"] { border-color: #174b39; background: #174b39; color: #fff; }
  .mulch-page .mulch-view-switch button:focus-visible,
  .mulch-page .mulch-workbench-actions .button:focus-visible { outline: 3px solid #d6b47a; outline-offset: 2px; }
  .mulch-page .mulch-panel-title { margin: 0 0 6px; color: #fff; font-size: 16px; line-height: 1.25; }
  .mulch-page .mulch-controls .input-section { min-width: 0; padding: 6px 0; margin: 0; border: 0; border-top: 1px solid rgba(230, 241, 231, .32); }
  .mulch-page .mulch-controls .input-section > legend { padding: 0 4px 0 0; color: #fff; font-size: 13px; font-weight: 700; }
  .mulch-page .mulch-controls :is(.field > span, .unit-note, .section-help, .list-count, .form-footnote, .field small) { color: #e0ece2; }
  .mulch-page .mulch-controls .field { min-width: 0; gap: 3px; }
  .mulch-page .mulch-controls .field > span { font-size: 12px; line-height: 1.25; }
  .mulch-page .mulch-controls :is(input:not([type="radio"]), select) { min-width: 0; min-height: 38px; padding: 6px 8px; background: #fbfdf9; color: #172a22; color-scheme: light; font-size: 16px; }
  .mulch-page .mulch-controls .unit-switch { margin: 0; }
  .mulch-page .mulch-controls .unit-switch span { min-height: 38px; padding: 7px 9px; font-size: 13px; }
  .mulch-page .mulch-controls .unit-note,
  .mulch-page .mulch-controls .section-help { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }
  .mulch-page .mulch-area-list { gap: 6px; }
  .mulch-page .mulch-area-card { min-width: 0; padding: 6px; margin: 2px 0 0; border-color: #668372; background: #204633; color: #fff; }
  .mulch-page .mulch-area-card legend { color: #fff; font-size: 12px; }
  .mulch-page .mulch-area-card .field-grid,
  .mulch-page .mulch-controls .field-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .mulch-page .mulch-area-card .area-dimensions { margin-top: 5px; }
  .mulch-page .mulch-area-card .mulch-depth-fields { margin-top: 5px; }
  .mulch-page .mulch-area-card .form-footnote { margin: 3px 0 0; font-size: 11px; }
  .mulch-page .mulch-area-card .remove-mulch-area { min-height: 36px; margin-top: 5px; }
  .mulch-page .mulch-controls .bed-list-actions { gap: 6px; margin-top: 5px; }
  .mulch-page .mulch-controls .bed-list-actions .button { min-height: 38px; }
  .mulch-page .mulch-controls .list-count { font-size: 12px; }
  .mulch-page .mulch-control-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding-top: 7px; border-top: 1px solid rgba(230, 241, 231, .32); }
  .mulch-page .mulch-control-footer > span { color: #e0ece2; font-size: 11px; }
  .mulch-page .mulch-control-footer .button { min-height: 38px; }
  .mulch-page .mulch-results .result-topline { min-height: 0; margin: 0 0 5px; padding: 0; border: 0; background: transparent; color: var(--ink); }
  .mulch-page .mulch-results .result-topline .section-kicker { margin: 0 0 2px; color: var(--muted); }
  .mulch-page .mulch-results .result-topline h2 { margin: 0; color: var(--forest-dark); font-size: 16px; line-height: 1.25; }
  .mulch-page .mulch-results #estimate-results { display: grid; gap: 5px; min-width: 0; }
  .mulch-page .mulch-diagram-card { min-width: 0; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; }
  .mulch-page .mulch-diagram-card .diagram-header { align-items: center; margin-bottom: 2px; }
  .mulch-page .mulch-diagram-card .diagram-meta { display: none; }
  .mulch-page .mulch-diagram-card .diagram-select { width: min(170px, 45%); }
  .mulch-page .mulch-diagram-card .diagram-select select { min-height: 36px; font-size: 16px; }
  .mulch-page .mulch-diagram svg { display: block; width: 100%; height: auto; max-height: none; margin: 0 auto; }
  .mulch-page .mulch-diagram-card .diagram-measurements-disclosure { margin-top: 3px; }
  .mulch-page .mulch-diagram-card .diagram-caption { margin: 3px 0 0; font-size: 11px; }
  .mulch-page .mulch-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--leaf-pale); overflow: hidden; }
  .mulch-page .mulch-summary > div { display: grid; align-content: center; gap: 3px; min-width: 0; padding: 7px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; text-align: center; }
  .mulch-page .mulch-summary > div:last-child { border-right: 0; }
  .mulch-page .mulch-summary > div > span { color: var(--muted); font-size: 12px; line-height: 1.25; }
  .mulch-page .mulch-summary > div > strong { min-width: 0; margin: 0; color: var(--forest-dark); font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .mulch-page .mulch-purchase-section { min-width: 0; margin: 0; }
  .mulch-page .mulch-purchase-section h3 { display: inline-block; padding: 4px 9px; margin: 0 0 4px; border-radius: 4px; background: var(--forest); color: #fff; font-size: 14px; line-height: 1.2; }
  .mulch-page .mulch-purchase-table-wrap { min-width: 0; }
  .mulch-page .mulch-purchase-table { width: 100%; table-layout: fixed; border-collapse: collapse; color: var(--ink); font-size: 13px; line-height: 1.3; }
  .mulch-page .mulch-purchase-table th,
  .mulch-page .mulch-purchase-table td { min-width: 0; padding: 5px 6px; border: 1px solid var(--line); overflow-wrap: anywhere; vertical-align: middle; }
  .mulch-page .mulch-purchase-table thead th { background: var(--mulch-table-head); color: #173a44; text-align: left; }
  .mulch-page .mulch-purchase-table thead th:first-child { width: 31%; }
  .mulch-page .mulch-purchase-table thead th:nth-child(2) { width: 25%; }
  .mulch-page .mulch-purchase-table thead th:nth-child(3) { width: 24%; }
  .mulch-page .mulch-purchase-table thead th:last-child { width: 20%; }
  .mulch-page .mulch-purchase-table tbody th { font-weight: 600; text-align: left; }
  .mulch-page .mulch-purchase-table tbody td { font-variant-numeric: tabular-nums; text-align: right; }
  .mulch-page .mulch-purchase-table tbody tr:nth-child(even) { background: var(--surface-muted); }
  .mulch-page .mulch-cost-note { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
  .mulch-page .mulch-results .estimate-details { margin-top: 0; border-color: var(--line); border-radius: 5px; }
  .mulch-page .mulch-results .estimate-details > summary { min-height: 36px; padding: 7px 9px; font-size: 12px; }
  .mulch-page .mulch-results .estimate-details > :not(summary) { margin-inline: 8px; }
  .mulch-page .mulch-results .volume-equivalents dl { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .mulch-page .mulch-results .assumptions { margin-bottom: 8px; }
  .mulch-page .mulch-workbench-actions { grid-area: actions; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; }
  .mulch-page .mulch-workbench-actions .button { display: flex; min-width: 0; min-height: 42px; align-items: center; justify-content: center; gap: 6px; padding: 6px; font-size: 13px; line-height: 1.2; white-space: normal; }
  .mulch-page .mulch-workbench-actions .button-secondary { background: var(--surface); color: var(--forest-dark); }
  .mulch-page .mulch-workbench-actions .toolbar-icon { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mulch-page .mulch-workbench-status { grid-area: status; margin: 0; }
  .mulch-page .mulch-guide-link { grid-area: guide; min-height: 34px; justify-self: start; color: var(--forest-dark); font-size: 13px; }
  .mulch-page .mulch-embed-attribution { display: none; grid-area: attribution; margin: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); color: var(--ink); font-size: 12px; }
  .mulch-page .mulch-embed-attribution a { color: var(--forest-dark); font-weight: 700; }
  .calculator-embed-mode .mulch-page .mulch-guide-link,
  .calculator-embed-mode .mulch-page #mulch-embed-open { display: none !important; }
  .calculator-embed-mode .mulch-page .mulch-embed-attribution { display: block; }
  .calculator-embed-mode .mulch-page .mulch-workbench { box-shadow: none; }
  .mulch-page .mulch-shopping-dialog,
  .mulch-page .mulch-embed-dialog { width: min(620px, calc(100% - 24px)); max-width: none; max-height: min(86dvh, 760px); padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
  .mulch-page .mulch-shopping-dialog::backdrop,
  .mulch-page .mulch-embed-dialog::backdrop { background: rgba(10, 25, 17, .62); }
  .mulch-page .mulch-shopping-dialog .raised-dialog-shell,
  .mulch-page .mulch-embed-dialog .raised-dialog-shell { padding: 14px; }
  .mulch-page .mulch-shopping-list { max-height: 52dvh; overflow: auto; }
}

@media screen and (min-width: 701px) and (max-width: 1023px) {
  .mulch-page .mulch-workbench { grid-template-columns: minmax(255px, .42fr) minmax(0, .58fr); gap: 7px; padding: 7px; }
  .mulch-page .mulch-controls,
  .mulch-page .mulch-results { padding: 7px; }
  .mulch-page .mulch-summary > div { padding: 6px 4px; }
  .mulch-page .mulch-summary > div > strong { font-size: 15px; }
  .mulch-page .mulch-purchase-table { font-size: 12px; }
  .mulch-page .mulch-purchase-table th,
  .mulch-page .mulch-purchase-table td { padding: 4px; }
}

@media screen and (max-width: 700px) {
  .mulch-page .mulch-workbench { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controls" "results" "actions" "status" "guide" "attribution"; gap: 7px; padding: 7px; }
  .mulch-page .mulch-controls,
  .mulch-page .mulch-results { padding: 7px; }
  .mulch-page .mulch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mulch-page .mulch-summary > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mulch-page .mulch-summary > div:nth-child(2) { border-right: 0; }
  .mulch-page .mulch-summary > div:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0; }
  .mulch-page .mulch-purchase-table { font-size: 12px; }
  .mulch-page .mulch-purchase-table th,
  .mulch-page .mulch-purchase-table td { padding: 5px 4px; }
  .mulch-page .mulch-workbench-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .mulch-page .mulch-workbench-actions .button { min-height: 60px; flex-direction: column; gap: 2px; padding: 5px 3px; font-size: 12px; }
}

@media screen and (max-width: 360px) {
  .mulch-page .mulch-workbench { padding: 5px; }
  .mulch-page .mulch-controls,
  .mulch-page .mulch-results { padding: 6px; }
  .mulch-page .mulch-area-card .field-grid,
  .mulch-page .mulch-controls .field-grid.two-up { grid-template-columns: minmax(0, 1fr); }
  .mulch-page .mulch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mulch-page .mulch-summary > div { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .mulch-page .mulch-summary > div:first-child { grid-column: 1 / -1; }
  .mulch-page .mulch-summary > div:last-child { grid-column: auto; }
  .mulch-page .mulch-summary > div > span,
  .mulch-page .mulch-summary > div > strong { text-align: left; }
  .mulch-page .mulch-summary > div > strong { font-size: 15px; }
  .mulch-page .mulch-purchase-table thead th:first-child { width: 25%; }
  .mulch-page .mulch-purchase-table thead th:nth-child(2) { width: 26%; white-space: nowrap; }
  .mulch-page .mulch-purchase-table thead th:nth-child(3) { width: 22%; }
  .mulch-page .mulch-purchase-table thead th:last-child { width: 27%; }
  .mulch-page .mulch-workbench-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mulch-page .mulch-workbench-actions .button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .mulch-page .mulch-view-switch button,
  .mulch-page .mulch-shopping-list li { transition: none; }
}
