.pglatc {
  --pglatc-ink: #10233f;
  --pglatc-muted: #526175;
  --pglatc-line: #d7e0e8;
  --pglatc-soft: #f5f8fb;
  --pglatc-teal: #087f7a;
  --pglatc-teal-dark: #05645f;
  --pglatc-amber: #c77a08;
  color: var(--pglatc-ink);
  margin: 2rem 0;
}

.pglatc *,
.pglatc *::before,
.pglatc *::after {
  box-sizing: border-box;
}

.pglatc__header,
.pglatc__form,
.pglatc__result,
.pglatc__commercial,
.pglatc__method,
.pglatc__sources {
  background: #fff;
  border: 1px solid var(--pglatc-line);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.06);
  padding: clamp(1rem, 3vw, 1.75rem);
}

.pglatc__header {
  background: linear-gradient(135deg, #edf9f8, #f8fbfd 72%);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pglatc__header h2,
.pglatc__result h3,
.pglatc__commercial h3,
.pglatc__sources h3 {
  color: var(--pglatc-ink);
  margin-top: 0;
}

.pglatc__eyebrow,
.pglatc__result-type {
  color: var(--pglatc-teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}

.pglatc__form {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.pglatc__setup,
.pglatc__options,
.pglatc__breakdown {
  display: grid;
  gap: 1rem;
}

.pglatc__setup {
  grid-template-columns: minmax(7rem, 0.7fr) minmax(7rem, 0.7fr) minmax(14rem, 1.6fr);
}

.pglatc__options,
.pglatc__breakdown {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pglatc__option {
  background: var(--pglatc-soft);
  border: 1px solid var(--pglatc-line);
  border-radius: 12px;
  margin: 1.2rem 0 0;
  padding: 1rem;
}

.pglatc__option legend {
  color: var(--pglatc-ink);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0 0.4rem;
}

.pglatc__field {
  display: grid;
  gap: 0.38rem;
  margin: 0 0 0.9rem;
}

.pglatc__field:last-child {
  margin-bottom: 0;
}

.pglatc__field > span {
  color: var(--pglatc-ink);
  font-weight: 750;
}

.pglatc__field em {
  color: var(--pglatc-muted);
  font-size: 0.9em;
  font-weight: 500;
}

.pglatc__field small {
  color: var(--pglatc-muted);
  line-height: 1.45;
}

.pglatc input[type="number"],
.pglatc select {
  appearance: none;
  background: #fff;
  border: 1px solid #aebbc8;
  border-radius: 8px;
  color: #101820;
  font: inherit;
  min-height: 46px;
  padding: 0.68rem 0.8rem;
  width: 100%;
}

.pglatc select {
  background-image: linear-gradient(45deg, transparent 50%, #334155 50%), linear-gradient(135deg, #334155 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 2.3rem;
}

.pglatc input:focus,
.pglatc select:focus,
.pglatc button:focus,
.pglatc a:focus,
.pglatc__result:focus {
  outline: 3px solid rgba(8, 127, 122, 0.28);
  outline-offset: 2px;
}

.pglatc__error {
  background: #fff1f1;
  border: 1px solid #d9534f;
  border-radius: 10px;
  color: #722523;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

.pglatc__error ul {
  margin-bottom: 0;
}

.pglatc__compare {
  background: var(--pglatc-teal);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  margin-top: 1.2rem;
  min-height: 48px;
  padding: 0.75rem 1.2rem;
}

.pglatc__compare:hover {
  background: var(--pglatc-teal-dark);
}

.pglatc__result,
.pglatc__commercial,
.pglatc__method,
.pglatc__sources {
  margin-top: 1rem;
}

.pglatc__result {
  border-top: 5px solid var(--pglatc-teal);
}

.pglatc__result[hidden],
.pglatc__commercial[hidden] {
  display: none;
}

.pglatc__breakdown > section {
  border: 1px solid var(--pglatc-line);
  border-radius: 10px;
  padding: 1rem;
}

.pglatc__breakdown h4 {
  margin: 0 0 0.75rem;
}

.pglatc__breakdown dl {
  margin: 0;
}

.pglatc__breakdown dl > div {
  align-items: baseline;
  border-bottom: 1px solid #e8edf2;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.48rem 0;
}

.pglatc__breakdown dd {
  font-weight: 750;
  margin: 0;
  text-align: right;
}

.pglatc__breakdown .pglatc__total {
  color: var(--pglatc-teal-dark);
  font-size: 1.03rem;
  font-weight: 800;
}

.pglatc__break-even {
  background: #fff8ea;
  border-left: 4px solid var(--pglatc-amber);
  padding: 0.85rem 1rem;
}

.pglatc__caution {
  color: var(--pglatc-muted);
  margin-bottom: 0;
}

.pglatc__commercial {
  background: #f0faf8;
  border-color: #a8d9d5;
}

.pglatc__commercial a {
  background: var(--pglatc-teal-dark);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-weight: 800;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.pglatc__commercial a:hover,
.pglatc__commercial a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.pglatc__method summary {
  cursor: pointer;
  font-weight: 800;
}

.pglatc__method p,
.pglatc__sources ul {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .pglatc__setup,
  .pglatc__options,
  .pglatc__breakdown {
    grid-template-columns: 1fr;
  }

  .pglatc__option {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pglatc * {
    scroll-behavior: auto !important;
  }
}
