:root {
  --navy: #18344d;
  --blue: #28638d;
  --light-blue: #edf5fa;
  --gold: #c89b3c;
  --text: #24313c;
  --muted: #66737d;
  --border: #d7dfe5;
  --background: #f4f6f8;
  --white: #ffffff;
  --danger: #a22c2c;
  --success: #1f6a42;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  line-height: 1.5;
}

.site-header {
  padding: 56px 24px;
  color: var(--white);
  background:
    linear-gradient(
      135deg,
      var(--navy),
      var(--blue)
    );
}

.header-content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(
    2rem,
    5vw,
    3.5rem
  );
}

.header-copy {
  max-width: 650px;
  margin: 12px 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

.page-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 70px;
}

.card {
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow:
    0 3px 12px
    rgba(0, 0, 0, 0.04);
}

h2 {
  margin-top: 0;
  color: var(--navy);
}

h3 {
  margin: 0;
  color: var(--navy);
}

.section-description {
  margin-top: -4px;
  color: var(--muted);
}

.section-heading,
.structure-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 20px;
  margin-top: 22px;
}

.field {
  min-width: 0;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #b8c4cd;
  border-radius: 7px;
  color: var(--text);
  background: var(--white);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid
    rgba(
      40,
      99,
      141,
      0.18
    );
  border-color: var(--blue);
}

.required {
  color: var(--danger);
}

.required-note,
.submit-note {
  color: var(--muted);
  text-align: center;
}

.primary-button,
.secondary-button,
.remove-structure-button {
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  min-width: 250px;
  padding: 15px 28px;
  color: var(--white);
  background: var(--blue);
  font-size: 1.05rem;
}

.primary-button:hover {
  background: var(--navy);
}

.secondary-button {
  padding: 12px 17px;
  color: var(--navy);
  background: var(--light-blue);
}

.remove-structure-button {
  padding: 8px 12px;
  color: var(--danger);
  background: #fff0f0;
}

.submit-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 18px;
}

.structure-card {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid
    #c8d7e2;
  border-radius: 12px;
  background:
    linear-gradient(
      180deg,
      var(--light-blue),
      var(--white)
    );
}

.structure-number {
  margin: 0 0 3px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dimension-row {
  display: grid;
  grid-template-columns:
    1fr
    auto
    1fr;
  align-items: end;
  gap: 12px;
}

.dimension-symbol {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 800;
}

.calculated-area {
  margin-top: 22px;
  padding: 18px;
  border-radius: 9px;
  color: var(--navy);
  background: #e7f1f7;
}

.calculated-area strong {
  display: block;
  margin-top: 3px;
  font-size: 1.7rem;
}

.product-status {
  margin-top: 20px;
  padding: 15px;
  border-left: 4px solid var(--gold);
  border-radius: 5px;
  background: #fff8e8;
}

.success-message {
  padding: 45px;
  border-radius: 14px;
  color: var(--success);
  background: #edf9f2;
  text-align: center;
}

@media (
  max-width: 720px
) {

  .site-header {
    padding: 40px 20px;
  }

  .card {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .section-heading,
  .structure-header {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }

}
