.shegi-rec-wrap,
.shegi-rec-wrap * {
  box-sizing: border-box;
}

.shegi-rec-wrap {
  --shegi-primary: #1c1c1c;
  --shegi-accent: #b4894d;
  --shegi-muted: #666;
  --shegi-border: rgba(0, 0, 0, 0.12);
  --shegi-soft: #f8f6f2;
  width: 100%;
  font-family: inherit;
  color: #151515;
}

.shegi-rec-grid-wrap {
  padding: 40px 0;
}

.shegi-rec-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

.shegi-rec-card {
  min-height: 330px;
  padding: 30px 24px 22px;
  background: #fff;
  border-top: 8px solid var(--shegi-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.shegi-rec-card h3 {
  margin: 0 0 18px;
  color: #111;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.shegi-rec-card p {
  margin: 0 auto 24px;
  max-width: 230px;
  color: #333;
  font-size: 14px;
  line-height: 1.55;
}

.shegi-rec-button,
.shegi-rec-submit,
.shegi-rec-reset {
  appearance: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 20px;
  background: var(--shegi-primary);
  color: #fff !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.shegi-rec-button:hover,
.shegi-rec-submit:hover {
  transform: translateY(-2px);
  background: #000;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.shegi-rec-button span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  font-size: 18px;
  line-height: 1;
}

.shegi-rec-calculator {
  margin: 34px 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--shegi-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.shegi-rec-calc-head {
  padding: 34px 34px 26px;
  background: linear-gradient(135deg, var(--shegi-primary), #2d2d2d);
  color: #fff;
}

.shegi-rec-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #f1d8ad;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

.shegi-rec-calc-head h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 850;
}

.shegi-rec-calc-head p {
  margin: 0;
  max-width: 850px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.55;
}

.shegi-rec-form {
  padding: 30px 34px 34px;
}

.shegi-rec-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.shegi-rec-field,
.shegi-rec-check {
  display: block;
  width: 100%;
}

.shegi-rec-field span {
  display: block;
  margin-bottom: 8px;
  color: #1a1a1a;
  font-weight: 750;
  font-size: 14px;
}

.shegi-rec-field input,
.shegi-rec-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--shegi-border);
  background: #fff;
  color: #111;
  font-size: 16px;
  line-height: 1.3;
  border-radius: 6px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.shegi-rec-field input:focus,
.shegi-rec-field select:focus {
  border-color: var(--shegi-accent);
  box-shadow: 0 0 0 3px rgba(180, 137, 77, 0.18);
}

.shegi-rec-check {
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--shegi-border);
  border-radius: 6px;
  background: var(--shegi-soft);
  color: #1d1d1d;
  font-size: 14px;
  font-weight: 650;
}

.shegi-rec-check input {
  margin-right: 8px;
}

.shegi-rec-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.shegi-rec-submit {
  min-width: 180px;
  border-radius: 6px;
}

.shegi-rec-reset {
  min-width: 120px;
  border-radius: 6px;
  background: #f2f2f2;
  color: #161616 !important;
  border: 1px solid var(--shegi-border);
}

.shegi-rec-result {
  margin-top: 24px;
}

.shegi-rec-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shegi-rec-metric {
  padding: 18px 16px;
  border: 1px solid rgba(180, 137, 77, 0.26);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfaf7);
}

.shegi-rec-metric small {
  display: block;
  margin-bottom: 7px;
  color: var(--shegi-muted);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.shegi-rec-metric strong {
  display: block;
  color: #101010;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.1;
  font-weight: 850;
}

.shegi-rec-breakdown {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--shegi-border);
  border-radius: 10px;
}

.shegi-rec-breakdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: #fff;
}

.shegi-rec-breakdown th,
.shegi-rec-breakdown td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  font-size: 14px;
}

.shegi-rec-breakdown th {
  background: #f7f4ee;
  color: #111;
  font-weight: 850;
}

.shegi-rec-breakdown tr:last-child td {
  border-bottom: 0;
}

.shegi-rec-alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--shegi-accent);
  background: #fff8ec;
  color: #2b2216;
  font-size: 14px;
  line-height: 1.5;
}

.shegi-rec-alert.error {
  border-left-color: #c43b3b;
  background: #fff0f0;
}

.shegi-rec-alert.success {
  border-left-color: #268a4f;
  background: #effaf4;
}

.shegi-rec-note {
  margin: 18px 0 0;
  color: #696969;
  font-size: 13px;
  line-height: 1.5;
}

.shegi-rec-all .shegi-rec-calculator + .shegi-rec-calculator {
  margin-top: 45px;
}

@media (max-width: 1200px) {
  .shegi-rec-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shegi-rec-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shegi-rec-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shegi-rec-card-grid,
  .shegi-rec-fields,
  .shegi-rec-result-grid {
    grid-template-columns: 1fr;
  }
  .shegi-rec-calc-head,
  .shegi-rec-form {
    padding-left: 20px;
    padding-right: 20px;
  }
  .shegi-rec-submit,
  .shegi-rec-reset {
    width: 100%;
  }
}
