/* Project planning, catalogue comparisons and illustrated applications. */
.project-chooser {
  background: #e6e9dc;
  border-block: 1px solid #d3d9c8;
  padding-block: clamp(36px, 5vw, 72px);
}

#escolher-pedra, #medidas, #comparar-acabamentos, .project-story {
  scroll-margin-top: 18px;
}

.project-section-heading,
.project-options-heading,
.project-result-heading,
.project-stories-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 30px;
}

.project-section-heading h2,
.project-estimator h2,
.project-story h2 {
  color: var(--forest);
  font-size: clamp(29px, 4vw, 52px);
  line-height: 1.1;
}

.project-section-heading p,
.project-estimator > p,
.project-options-heading p,
.project-stories-entry p {
  max-width: 65ch;
  margin-top: 9px;
  color: var(--muted);
}

.project-section-heading > a,
.project-options-heading > a,
.project-option div > a,
.finish-compare-card figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--forest);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-section-heading > a svg,
.project-options-heading > a svg,
.project-option div > a svg,
.finish-compare-card figcaption a svg {
  width: 16px;
  height: 16px;
}

.project-chooser-form,
.project-estimate-selectors,
.finish-compare-grid {
  display: grid;
  gap: 16px;
}

.project-chooser-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  margin-top: 22px;
}

.project-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.project-field > span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.project-field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #b8c1b1;
  border-radius: 0;
  color: var(--ink);
  background: #fcfbf7;
  font-size: 16px;
}

.project-chooser-form > button {
  min-height: 48px;
}

[data-stone-options] {
  margin-top: 27px;
  padding-top: 23px;
  border-top: 1px solid #c8d0be;
}

.project-options-heading h3,
.project-stories-entry h2 {
  font-size: clamp(23px, 2.6vw, 32px);
  line-height: 1.2;
}

.project-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.project-option {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #ced6c6;
}

.project-option > a,
.project-option picture {
  display: block;
}

.project-option img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.project-option > div {
  padding: 13px 16px 9px;
}

.project-option h4 {
  font-size: 19px;
  line-height: 1.3;
}

.project-note {
  font-size: 13px;
  color: var(--muted);
}

.project-empty,
.project-compare-link {
  margin-top: 16px;
}

.project-planner-intro,
.project-stories-intro {
  padding-block: clamp(40px, 6vw, 90px);
}

.project-planner-intro h1,
.project-stories-intro h1 {
  color: var(--forest);
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.02;
}

.project-planner-intro p,
.project-stories-intro p {
  max-width: 55ch;
  margin-top: 15px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 19px);
}

.project-estimator {
  padding-block: clamp(38px, 6vw, 80px);
}

.project-estimate-selectors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 800px;
  margin-top: 22px;
}

.project-piece-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
  margin: 18px 0 0;
  padding: 12px 16px 16px;
  border: 1px solid var(--line);
}

.project-piece-group legend {
  padding-inline: 6px;
  font-weight: 600;
}

.project-remove {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-error {
  color: #8a3129;
  margin-top: 10px;
  font-weight: 600;
}

.project-error:empty {
  margin: 0;
}

[data-estimate-result] {
  margin-top: 24px;
  padding: clamp(18px, 4vw, 40px);
  color: var(--cream);
  background: var(--forest);
}

.project-result-heading h3 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
}

.project-result-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block: 20px 12px;
  border-block: 1px solid #f3f1e950;
  padding-block: 13px;
}

.project-result-totals dt {
  font-size: 12px;
}

.project-result-totals dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 3vw, 35px);
  line-height: 1.25;
}

[data-estimate-result] ul {
  padding-inline-start: 18px;
}

[data-estimate-result] p + p {
  margin-top: 6px;
}

.stone-compare-data {
  padding-block: 30px 56px;
}

.stone-compare-table {
  width: 100%;
  margin-block: 18px 12px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  table-layout: fixed;
  background: #fbfaf5;
  overflow-wrap: anywhere;
}

.stone-compare-table :is(th, td) {
  padding: clamp(8px, 1.5vw, 17px);
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
  line-height: 1.4;
}

.stone-compare-table th:first-child {
  width: 38%;
}

.stone-compare-table thead,
.stone-compare-weight {
  background: #e7ebdf;
}

.stone-compare-table thead a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stone-compare-table small,
.stone-compare-unknown {
  display: block;
  font-size: .9em;
  color: var(--muted);
}

.stone-compare-share {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 12px 16px;
  margin-top: 18px;
}

[data-compare-share-panel] {
  flex: 1 1 260px;
  min-width: 0;
}

.finish-compare {
  padding-block: clamp(30px, 4vw, 54px);
}

.finish-compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.finish-compare-card {
  min-width: 0;
}

.finish-compare-card figure {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  background: #fbfaf5;
}

.finish-compare-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.finish-compare-card figcaption {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 12px 14px 5px;
}

.finish-compare-card figcaption strong {
  font-weight: 700;
}

.finish-compare-card figcaption span {
  color: var(--muted);
}

.project-stories-entry {
  margin-block: 18px 28px;
  padding: clamp(17px, 3vw, 32px);
  background: #e6e9dc;
  border: 1px solid #d3d9c8;
}

.project-story-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.project-story-jumps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--forest);
  font-weight: 600;
}

.project-stories-list {
  padding-bottom: 45px;
}

.project-story {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 5vw, 72px);
  padding-block: clamp(25px, 5vw, 62px);
  border-top: 1px solid var(--line);
}

.project-story figure {
  min-width: 0;
  margin: 0;
}

.project-story img {
  width: 100%;
  height: auto;
  max-height: 610px;
  object-fit: contain;
  background: #e6e9dc;
}

.project-story figcaption {
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.project-story p {
  margin-top: 12px;
}

.project-story dl {
  margin-block: 18px;
  border-top: 1px solid var(--line);
}

.project-story dl > div {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) 2fr;
  gap: 12px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.project-story dt {
  font-weight: 700;
}

.project-story dd {
  margin: 0;
}

.project-story .ag-button {
  margin-top: 16px;
}

.ag-care-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 17px;
}

@media (max-width: 850px) {
  .project-chooser-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .project-options-grid, .project-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-piece-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-section-heading > .project-field {
    width: 100%;
  }

  .stone-compare-table {
    font-size: 13px;
  }

  .finish-compare-grid {
    gap: 10px;
  }

  .finish-compare-card img {
    aspect-ratio: 4 / 3;
  }

  .finish-compare-card figcaption {
    padding-inline: 9px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .project-chooser-form, .project-estimate-selectors {
    grid-template-columns: minmax(0, 1fr);
  }

  .finish-compare-card figcaption a svg {
    display: none;
  }
}
