.gps-calculator {
  --gps-ink: #18232b;
  --gps-muted: #61717c;
  --gps-line: #dce4e8;
  --gps-paper: #ffffff;
  --gps-soft: #f3f7fc;
  --gps-green: #1559b7;
  --gps-green-dark: #0b2f6b;
  --gps-green-pale: #e8f1ff;
  --gps-amber: #a65d00;
  --gps-amber-pale: #fff4df;
  --gps-danger: #a13636;
  --gps-radius: 18px;
  color: var(--gps-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 28px auto;
  max-width: 1240px;
}

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

.gps-calculator [hidden] {
  display: none !important;
}

.gps-calculator button,
.gps-calculator input,
.gps-calculator select {
  font: inherit;
}

.gps-app {
  background: #eef4fb;
  border: 1px solid #d8e3f1;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 41, 77, 0.12);
  overflow: hidden;
}

.gps-hero {
  align-items: center;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.15), transparent 24%),
    linear-gradient(125deg, #081d3d 0%, #0e3d85 62%, #1677d2 100%);
  color: #fff;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  padding: 36px 40px;
}

.gps-hero h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 8px 0 12px;
}

.gps-hero p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  max-width: 720px;
}

.gps-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gps-score-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  flex: 0 0 190px;
  padding: 18px 22px;
  text-align: center;
}

.gps-score-badge::before {
  background: #f2b646;
  border-radius: 999px;
  content: "";
  display: block;
  height: 4px;
  margin: 0 auto 12px;
  width: 44px;
}

.gps-score-badge span,
.gps-score-badge small {
  display: block;
  opacity: 0.76;
}

.gps-score-badge strong {
  display: block;
  font-size: 46px;
  line-height: 1.1;
  margin: 2px 0;
}

.gps-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--gps-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 40px;
}

.gps-privacy {
  background: #f8fbfb;
  border-bottom: 1px solid var(--gps-line);
  color: var(--gps-muted);
  font-size: 13px;
  margin: 0;
  padding: 9px 40px;
}

.gps-button {
  appearance: none;
  background: var(--gps-green);
  border: 1px solid var(--gps-green);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  min-height: 42px;
  padding: 9px 16px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.gps-button:hover {
  background: var(--gps-green-dark);
  border-color: var(--gps-green-dark);
  color: #fff;
  transform: translateY(-1px);
}

.gps-button:focus-visible,
.gps-calculator input:focus-visible,
.gps-calculator select:focus-visible {
  outline: 3px solid rgba(21, 89, 183, 0.22);
  outline-offset: 2px;
}

.gps-button--soft {
  background: var(--gps-green-pale);
  border-color: transparent;
  color: var(--gps-green-dark);
}

.gps-button--text {
  background: transparent;
  border-color: transparent;
  color: var(--gps-muted);
  margin-left: auto;
}

.gps-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  padding: 28px;
}

.gps-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.gps-card,
.gps-summary__sticky {
  background: var(--gps-paper);
  border: 1px solid var(--gps-line);
  border-radius: var(--gps-radius);
  box-shadow: 0 8px 24px rgba(24, 50, 86, 0.06);
}

.gps-card {
  overflow: hidden;
}

.gps-card--selector {
  align-items: center;
  display: flex;
  gap: 18px;
  padding: 22px 24px;
}

.gps-card--selector .gps-card__body {
  flex: 1;
  padding: 0;
}

.gps-section-heading {
  align-items: center;
  border-bottom: 1px solid var(--gps-line);
  display: flex;
  gap: 16px;
  padding: 22px 24px;
}

.gps-section-heading h3,
.gps-summary h3 {
  color: var(--gps-ink);
  font-size: 21px;
  line-height: 1.2;
  margin: 0 0 3px;
}

.gps-section-heading p {
  color: var(--gps-muted);
  font-size: 14px;
  margin: 0;
}

.gps-step {
  align-items: center;
  background: var(--gps-green-pale);
  border-radius: 50%;
  color: var(--gps-green-dark);
  display: flex;
  flex: 0 0 36px;
  font-size: 14px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
}

.gps-card__body {
  padding: 24px;
}

.gps-calculator label {
  color: var(--gps-ink);
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 7px;
}

.gps-calculator input[type="text"],
.gps-calculator input[type="search"],
.gps-calculator input[type="number"],
.gps-calculator input[type="date"],
.gps-calculator select {
  background: #fff;
  border: 1px solid #bccbce;
  border-radius: 10px;
  color: var(--gps-ink);
  min-height: 46px;
  padding: 9px 11px;
  width: 100%;
}

.gps-calculator input:disabled,
.gps-calculator select:disabled,
.gps-calculator button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.gps-calculator input[type="checkbox"] {
  accent-color: var(--gps-green);
  height: 17px;
  margin: 0 7px 0 0;
  vertical-align: -3px;
  width: 17px;
}

.gps-form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.gps-form-grid--titles {
  grid-template-columns: minmax(0, 2fr) minmax(110px, 0.5fr);
}

.gps-title-filters {
  align-items: end;
  background: linear-gradient(135deg, #f7faff, #edf4fd);
  border: 1px solid #d7e5f6;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.7fr) auto;
  margin-bottom: 18px;
  padding: 14px;
}

.gps-field--search input {
  background-image: radial-gradient(circle, transparent 57%, #526b8c 59%, #526b8c 66%, transparent 68%);
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  padding-right: 42px !important;
}

.gps-filter-count {
  color: var(--gps-green-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 0 3px 14px 0;
  white-space: nowrap;
}

.gps-rule-guide {
  background: #fffaf0;
  border: 1px solid #f1d49b;
  border-radius: 12px;
  color: #5f471d;
  font-size: 12px;
  margin: -4px 0 18px;
  padding: 11px 14px;
}

.gps-rule-guide summary {
  cursor: pointer;
  font-weight: 800;
}

.gps-rule-guide ul {
  margin: 10px 0 2px 18px;
  padding: 0;
}

.gps-rule-guide li + li {
  margin-top: 5px;
}

.gps-field--wide {
  grid-column: span 2;
}

.gps-field--check {
  align-items: center;
  display: flex;
  padding-top: 21px;
}

.gps-field--check label {
  font-weight: 650;
}

.gps-checks {
  display: grid;
  gap: 9px;
  margin: 14px 0 18px;
}

.gps-checks label {
  color: #34434b;
  font-weight: 600;
  margin: 0;
}

.gps-source,
.gps-help,
.gps-empty {
  color: var(--gps-muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.gps-help:empty {
  display: none;
}

.gps-notice {
  background: var(--gps-amber-pale);
  border-left: 4px solid #e3a243;
  border-radius: 9px;
  margin-top: 16px;
  padding: 12px 14px;
}

.gps-notice--soft {
  background: var(--gps-soft);
  border-left-color: var(--gps-green);
}

.gps-notice p {
  margin: 2px 0 0;
}

.gps-item-list {
  border-top: 1px solid var(--gps-line);
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.gps-item-list li {
  align-items: center;
  border-bottom: 1px solid var(--gps-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 13px 2px;
}

.gps-item-list li div {
  min-width: 0;
}

.gps-item-list strong,
.gps-item-list span {
  display: block;
}

.gps-item-list strong {
  font-size: 14px;
}

.gps-item-list span {
  color: var(--gps-muted);
  font-size: 12px;
}

.gps-item-list button {
  background: transparent;
  border: 0;
  color: var(--gps-danger);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 750;
  padding: 6px;
}

.gps-summary {
  min-width: 0;
}

.gps-summary__sticky {
  padding: 24px;
  position: sticky;
  top: 24px;
}

.gps-summary .gps-kicker {
  color: var(--gps-green);
}

.gps-summary h3 {
  border-bottom: 1px solid var(--gps-line);
  margin: 8px 0 16px;
  padding-bottom: 16px;
}

.gps-summary-totals {
  display: grid;
  gap: 9px;
}

.gps-summary-totals > div,
.gps-result-row {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.gps-summary-totals > div {
  background: var(--gps-soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.gps-summary-totals span {
  color: var(--gps-muted);
  font-size: 13px;
}

.gps-summary-totals strong {
  color: var(--gps-green-dark);
  font-size: 20px;
}

.gps-breakdown__group {
  border-top: 1px solid var(--gps-line);
  margin-top: 18px;
  padding-top: 14px;
}

.gps-breakdown__group h4 {
  font-size: 13px;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.gps-result-row {
  font-size: 12px;
  padding: 4px 0;
}

.gps-result-row span {
  color: #4b5a62;
  overflow-wrap: anywhere;
}

.gps-result-row strong {
  flex: 0 0 auto;
}

.gps-result-row--adjustment strong {
  color: var(--gps-danger);
}

.gps-service-result {
  border-bottom: 1px dotted var(--gps-line);
  padding: 5px 0 8px;
}

.gps-service-result small {
  color: var(--gps-muted);
  display: block;
  font-size: 10px;
}

.gps-warnings {
  background: var(--gps-amber-pale);
  border-radius: 10px;
  color: #70430b;
  font-size: 12px;
  margin-top: 18px;
  padding: 12px 14px;
}

.gps-warnings ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.gps-disclaimer {
  color: var(--gps-muted);
  font-size: 11px;
  margin: 20px 0 9px;
}

.gps-official-link {
  color: var(--gps-green-dark);
  font-size: 12px;
  font-weight: 750;
}

.gps-toast {
  background: #102d57;
  border-radius: 10px;
  bottom: 24px;
  color: #fff;
  left: 50%;
  max-width: calc(100% - 32px);
  opacity: 0;
  padding: 10px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 99999;
}

.gps-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gps-toast.is-error {
  background: #862e2e;
}

@media (max-width: 960px) {
  .gps-layout {
    grid-template-columns: 1fr;
  }

  .gps-summary {
    order: -1;
  }

  .gps-summary__sticky {
    position: static;
  }

  .gps-summary-totals {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .gps-calculator {
    margin: 14px 0;
  }

  .gps-app {
    border-radius: 16px;
  }

  .gps-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 28px 22px;
  }

  .gps-score-badge {
    flex-basis: auto;
    text-align: left;
  }

  .gps-score-badge strong {
    font-size: 38px;
  }

  .gps-toolbar,
  .gps-privacy {
    padding-left: 18px;
    padding-right: 18px;
  }

  .gps-button--text {
    margin-left: 0;
  }

  .gps-layout {
    gap: 16px;
    padding: 14px;
  }

  .gps-card--selector,
  .gps-section-heading,
  .gps-card__body,
  .gps-summary__sticky {
    padding: 18px;
  }

  .gps-form-grid,
  .gps-form-grid--titles,
  .gps-title-filters,
  .gps-summary-totals {
    grid-template-columns: 1fr;
  }

  .gps-field--wide {
    grid-column: auto;
  }
}

@media print {
  .gps-calculator {
    font-size: 11px;
    margin: 0;
    max-width: none;
  }

  .gps-app {
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .gps-hero {
    background: #fff;
    border-bottom: 2px solid #111;
    color: #111;
    padding: 12px 0;
  }

  .gps-hero h2,
  .gps-hero p {
    color: #111;
  }

  .gps-score-badge {
    border-color: #111;
  }

  .gps-toolbar,
  .gps-privacy,
  .gps-main .gps-button,
  .gps-form-grid,
  .gps-checks,
  .gps-help,
  .gps-empty,
  .gps-toast,
  .gps-item-list button {
    display: none !important;
  }

  .gps-layout {
    display: block;
    padding: 12px 0;
  }

  .gps-summary {
    break-inside: avoid;
    margin-bottom: 14px;
  }

  .gps-summary__sticky,
  .gps-card {
    border-color: #aaa;
    box-shadow: none;
  }

  .gps-main {
    gap: 9px;
  }

  .gps-card {
    break-inside: avoid;
  }

  .gps-card__body,
  .gps-section-heading,
  .gps-card--selector,
  .gps-summary__sticky {
    padding: 10px 12px;
  }

  .gps-official-link {
    color: #111;
    text-decoration: none;
  }
}
