*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-page);
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--text-main);
  line-height: 1.38;
  margin-top: 0;
}

h2[id], h3[id], section[id] {
  scroll-margin-top: 86px;
}

h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 700; margin-top: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; font-weight: 700; margin-top: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.45rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.savings-parameter-label {
  display: none;
}

@media (max-width: 639px) {
  .savings-parameters table {
    display: block;
    min-width: 0;
  }

  .savings-parameters thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .savings-parameters tbody,
  .savings-parameters tr {
    display: block;
  }

  .savings-parameters tr + tr {
    border-top: 1px solid var(--border-color);
  }

  .savings-parameters td {
    display: block;
    padding: 0.4rem 0.85rem;
    border: 0;
    overflow-wrap: anywhere;
  }

  .savings-parameters td:first-child {
    padding-top: 0.85rem;
  }

  .savings-parameters td:last-child {
    padding-bottom: 0.85rem;
  }

  .savings-parameter-label {
    display: block;
    font-weight: 700;
  }
}

/* Responsive Swipeable Tables for Mobile */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

th {
  background: var(--bg-muted);
  color: var(--text-main);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #eff6ff;
}

tr:last-child td {
  border-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
}

.btn-outline {
  background: #ffffff;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline:hover {
  background: var(--brand-primary-soft);
}

.btn-accent {
  background: var(--brand-accent);
  color: #ffffff;
}
