:root {
  --sgc-primary: #2f855a;
  --sgc-accent: #1a202c;
  --sgc-spacing: 1rem;
}
.sgc-wrap {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 20%, white);
  padding: var(--sgc-spacing, 1rem);
  border-radius: .5rem;
  background: var(--sgc-wrap-bg, color-mix(in srgb, var(--sgc-primary, #2f855a) 5%, white));
  font-family: var(--sgc-font-family, inherit);
}
.sgc-calculator {
  width: 100%;
}
.sgc-tabs {
  display: flex;
  gap: calc(var(--sgc-spacing, 1rem) / 3);
  flex-wrap: wrap;
  margin-bottom: calc(var(--sgc-spacing, 1rem) / 2);
}
.sgc-tab {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, white);
  border-bottom: none;
  background: var(--sgc-tab-bg, transparent);
  padding: .4rem .75rem;
  border-radius: .4rem .4rem 0 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--sgc-tab-text, color-mix(in srgb, var(--sgc-accent, #1a202c) 70%, #fff));
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.sgc-tab:hover,
.sgc-tab:focus-visible {
  background: var(--sgc-tab-hover-bg, var(--sgc-tab-active-bg, #fff));
  color: var(--sgc-tab-hover-text, var(--sgc-tab-active-text, var(--sgc-accent, #1a202c)));
  border-color: color-mix(in srgb, var(--sgc-accent, #1a202c) 25%, white);
}
.sgc-tab.is-active {
  background: var(--sgc-tab-active-bg, #fff);
  color: var(--sgc-tab-active-text, var(--sgc-accent, #1a202c));
}
.sgc-panels {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, white);
  border-radius: .4rem;
  background: var(--sgc-panel-bg, #fff);
  padding: var(--sgc-spacing, 1rem);
}
.sgc-panel[hidden] {
  display: none;
}
.sgc-panel__intro {
  margin-top: 0;
  margin-bottom: calc(var(--sgc-spacing, 1rem) / 2);
  color: color-mix(in srgb, var(--sgc-accent, #1a202c) 70%, #000);
}
.sgc-form label {
  display: block;
  margin-bottom: calc(var(--sgc-spacing, 1rem) / 2);
}
.sgc-container-fields {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, white);
  padding: calc(var(--sgc-spacing, 1rem) / 2);
  border-radius: .4rem;
  margin-bottom: calc(var(--sgc-spacing, 1rem) / 2);
  background: color-mix(in srgb, var(--sgc-panel-bg, #fff) 50%, white);
}
.sgc-container-fields[hidden] {
  display: none;
}
.sgc-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--sgc-spacing, 1rem) / 2);
}
.sgc-inline-fields label {
  flex: 1 1 160px;
}
.sgc-inline-fields label input,
.sgc-inline-fields label select {
  width: 100%;
}
.sgc-inline-input {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.sgc-inline-input select {
  width: auto;
}
.sgc-fieldset-inline {
  border: none;
  padding: 0;
  margin: calc(var(--sgc-spacing, 1rem) / 2) 0;
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--sgc-spacing, 1rem) / 3);
  align-items: center;
}
.sgc-fieldset-inline legend {
  font-weight: 600;
  margin-right: .5rem;
}
.sgc-fieldset-inline label {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
[data-gravel-select] {
  display: block;
}
.sgc-fieldset__title {
  font-weight: 600;
  font-size: .9rem;
  margin: 0 0 .35rem;
  color: var(--sgc-accent, #1a202c);
}
.sgc-btn-secondary {
  margin-top: calc(var(--sgc-spacing, 1rem) / 3);
  padding: .4rem .75rem;
  background: transparent;
  border: 1px solid var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  border-radius: 4px;
  color: var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sgc-btn-secondary:hover,
.sgc-btn-secondary:focus-visible {
  background: var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  color: var(--sgc-button-text, #fff);
}
.sgc-area-list {
  margin-top: calc(var(--sgc-spacing, 1rem) / 2);
  border-top: 1px dashed color-mix(in srgb, var(--sgc-accent, #1a202c) 20%, white);
  padding-top: calc(var(--sgc-spacing, 1rem) / 3);
  font-size: .9rem;
}
.sgc-area-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .25rem 0;
  gap: .5rem;
}
.sgc-area-list__item button {
  border: none;
  background: none;
  color: var(--sgc-accent, #1a202c);
  cursor: pointer;
  font-size: .8rem;
  padding: 0;
}
.sgc-form input[type=number],
.sgc-form select {
  width: 100%;
  max-width: 260px;
  padding: .4rem .5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
}
.sgc-btn {
  margin-top: calc(var(--sgc-spacing, 1rem) / 3);
  padding: .5rem .85rem;
  background: var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  color: var(--sgc-button-text, #fff);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
}
.sgc-wrap .sgc-btn,
.sgc-wrap .sgc-related-card__add {
  background: var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  color: var(--sgc-button-text, #fff);
  border: none;
  text-decoration: none;
}
.sgc-btn:hover {
  background: var(--sgc-button-hover-bg, color-mix(in srgb, var(--sgc-button-bg, var(--sgc-primary, #2f855a)) 85%, #000));
  color: var(--sgc-button-hover-text, var(--sgc-button-text, #fff));
}
.sgc-result {
  margin-top: calc(var(--sgc-spacing, 1rem) / 2);
  font-weight: 600;
  color: var(--sgc-accent, #1a202c);
}
.sgc-note {
  display: block;
  margin-top: .3rem;
  font-weight: 400;
  font-size: .85em;
  color: color-mix(in srgb, var(--sgc-accent, #1a202c) 60%, #000);
}
.sgc-bag-breakdown {
  list-style: none;
  margin: .25rem 0 0;
  padding: 0;
}
.sgc-bag-breakdown li {
  margin: 0;
  padding: 0;
  line-height: 1.3;
}
.sgc-picker--cards {
  display: grid;
  gap: calc(var(--sgc-spacing, 1rem) / 2);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: calc(var(--sgc-spacing, 1rem) / 2);
}
.sgc-calculator-card {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, white);
  border-radius: .5rem;
  padding: .75rem;
  text-align: left;
  background: var(--sgc-tab-bg, color-mix(in srgb, var(--sgc-panel-bg, #fff) 60%, white));
  color: var(--sgc-tab-text, color-mix(in srgb, var(--sgc-accent, #1a202c) 70%, #000));
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.sgc-calculator-card.is-active {
  border-color: var(--sgc-primary, #2f855a);
  color: var(--sgc-tab-active-text, var(--sgc-accent, #1a202c));
  background: var(--sgc-tab-active-bg, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sgc-primary, #2f855a) 20%, transparent);
}
.sgc-calculator-card:hover,
.sgc-calculator-card:focus-visible {
  border-color: color-mix(in srgb, var(--sgc-accent, #1a202c) 25%, white);
  color: var(--sgc-tab-hover-text, var(--sgc-tab-active-text, var(--sgc-accent, #1a202c)));
  background: var(--sgc-tab-hover-bg, var(--sgc-tab-active-bg, #fff));
}
.sgc-tab__title {
  line-height: 1.2;
}
.sgc-calculator-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  color: currentColor;
  flex-shrink: 0;
}
.sgc-calculator-icon svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  fill: currentColor;
  stroke: currentColor;
  overflow: visible;
}
.sgc-calculator-card__title {
  font-weight: 600;
  margin: 0;
  color: inherit;
}
.sgc-layout-cards .sgc-calculator-icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: .25rem;
}
.sgc-calculator-card__excerpt {
  font-size: .85rem;
  color: color-mix(in srgb, currentColor 70%, #000);
}
.sgc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .5rem;
  font-size: .9rem;
}
.sgc-table th,
.sgc-table td {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, #fff);
  padding: .35rem .5rem;
}
.sgc-table th {
  background: color-mix(in srgb, var(--sgc-panel-bg, #fff) 60%, white);
}
.sgc-aggregates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sgc-spacing, 1rem);
  align-items: start;
}
.sgc-aggregates-grid__product {
  min-width: 0;
}
.sgc-aggregates-product .sgc-related__grid {
  margin-top: 0;
}
.sgc-placeholder {
  padding: var(--sgc-spacing, 1rem);
  border: 1px dashed #ddd;
  border-radius: 4px;
  background: #fff;
}
.sgc-related {
  margin-top: var(--sgc-spacing, 1rem);
  padding-top: calc(var(--sgc-spacing, 1rem) / 2);
  border-top: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 10%, #fff);
}
.sgc-related__title {
  margin-top: 0;
  font-size: 1rem;
  color: var(--sgc-accent, #1a202c);
}
.sgc-related__grid {
  display: grid;
  gap: calc(var(--sgc-spacing, 1rem) / 2);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.sgc-related-card {
  border: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, #fff);
  border-radius: .4rem;
  background: color-mix(in srgb, var(--sgc-panel-bg, #fff) 80%, white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sgc-related-card__media img {
  width: 100%;
  height: auto;
  display: block;
}
.sgc-related-card__body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.sgc-related-card__name {
  margin: 0;
  font-size: .95rem;
  color: var(--sgc-accent, #1a202c);
}
.sgc-related-card__excerpt {
  margin: 0;
  font-size: .85rem;
  color: color-mix(in srgb, var(--sgc-accent, #1a202c) 70%, #000);
}
.sgc-related-card__price {
  margin: 0;
  font-weight: 600;
  color: var(--sgc-primary, #2f855a);
}
.sgc-related-card__link {
  align-self: flex-start;
  margin-top: .25rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--sgc-primary, #2f855a);
}
.sgc-related-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: .35rem;
}
.sgc-related-card__qty input {
  width: 60px;
  padding: .25rem;
  font-size: .9rem;
}
.sgc-related-card__add {
  padding: .4rem .75rem;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--sgc-button-bg, var(--sgc-primary, #2f855a));
  color: var(--sgc-button-text, #fff);
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.sgc-related-card__add:hover,
.sgc-related-card__add:focus-visible {
  background: var(--sgc-button-hover-bg, color-mix(in srgb, var(--sgc-button-bg, var(--sgc-primary, #2f855a)) 85%, #000));
  color: var(--sgc-button-hover-text, var(--sgc-button-text, #fff));
}
.sgc-related-card__link:hover,
.sgc-related-card__link:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .sgc-tabs {
    flex-direction: column;
    gap: .4rem;
  }
  .sgc-tab {
    border-radius: .4rem;
    border-bottom: 1px solid color-mix(in srgb, var(--sgc-accent, #1a202c) 15%, white);
    text-align: left;
  }
  .sgc-tab.is-active {
    border-color: color-mix(in srgb, var(--sgc-accent, #1a202c) 40%, white);
  }
}
