:root {
  color-scheme: dark light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-weight: 400;
  --surface: #121417;
  --surface-contrast: #1c2026;
  --surface-raised: rgba(28, 32, 38, 0.8);
  --text-primary: #e7ebf2;
  --text-secondary: #99a5b5;
  --accent: #ff6b6b;
  --accent-strong: #ff3b3b;
  --focus-ring: rgba(255, 107, 107, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  background-color: #0b0d10;
  color: var(--text-primary);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(circle at top right, rgba(255, 107, 107, 0.15), transparent 45%),
    radial-gradient(circle at bottom left, rgba(79, 209, 197, 0.15), transparent 40%),
    #0b0d10;
  color: var(--text-primary);
}

.background-accent {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(79, 209, 197, 0.1));
  opacity: 0.6;
  pointer-events: none;
  filter: blur(120px);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--surface-contrast);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 0.75rem 0.75rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.page-header {
  padding: 2.5rem clamp(1.5rem, 4vw, 5rem);
  display: grid;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.brand-text {
  display: grid;
  gap: 0.25rem;
}

.brand-title {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 32ch;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 320px;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.toggle-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.toggle-buttons {
  display: flex;
  gap: 0.3rem;
}

.toggle-select {
  position: relative;
  min-width: 150px;
}

.toggle-select::after {
  content: "⌄";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.toggle-select select {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.32rem 2rem 0.32rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toggle-select select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: stretch;
}

.hero-content {
  display: grid;
  gap: 1.5rem;
}

.hero-tagline {
  margin: 0;
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.75rem;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  width: 100%;
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  min-width: 160px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  min-height: 2.75rem;
}

.hero-button {
  padding-inline: 1.5rem;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
  box-shadow: 0 12px 24px rgba(10, 12, 15, 0.3);
}

.hero-highlights {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  list-style-position: inside;
  display: grid;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.hero-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  display: grid;
  gap: 1.25rem;
  align-content: start;
  box-shadow: 0 30px 60px rgba(8, 9, 12, 0.35);
}

.hero-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.hero-card dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.hero-card dt {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.hero-card dd {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.toggle-button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.toggle-button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 107, 107, 0.25);
}

.toggle-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
}

h2 {
  margin: 0 0 0.2rem;
  font-weight: 600;
  font-size: 1.5rem;
}

p {
  margin: 0;
  color: var(--text-secondary);
}

.content-shell {
  padding: 0 clamp(1.5rem, 4vw, 5rem) 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.content-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: start;
}

.cards-column {
  display: grid;
  gap: 2rem;
}

.cards-column > .card + .card {
  margin-top: 0;
}

.support-panel {
  position: sticky;
  top: 2rem;
  display: grid;
  gap: 1.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: 0 24px 50px rgba(8, 9, 12, 0.28);
}

.rir-card {
  margin-top: 2.5rem;
}

.support-panel h2 {
  margin: 0;
  font-size: 1.3rem;
}

.support-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.faq details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.faq details[open] {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--text-primary);
  position: relative;
  padding-right: 1.5rem;
}

.faq summary::after {
  content: "⌄";
  position: absolute;
  right: 0.3rem;
  top: 0.2rem;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-180deg);
}

.faq p {
  margin: 0.65rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.rir-card .card-body {
  display: grid;
  gap: 2rem;
}

.rir-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.rir-body h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.rir-form {
  display: grid;
  gap: 1rem;
}

.rir-button {
  justify-self: start;
}

.rir-result {
  margin-top: 0.5rem;
  font-weight: 600;
}

.rir-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

.card {
  position: relative;
  backdrop-filter: blur(14px);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(8, 9, 12, 0.35);
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.5rem 2rem 2rem;
  display: grid;
  gap: 1.5rem;
}

.card-footer {
  padding: 0 2rem 2rem;
  flex: 1;
  overflow-x: auto;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.field {
  display: grid;
  gap: 0.75rem;
}

label {
  font-weight: 600;
  color: var(--text-primary);
}

input,
select,
button {
  font: inherit;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.input-group {
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.input-group input {
  flex: 1;
  border: none;
  border-radius: 0;
  padding-right: 3.5rem;
  background: transparent;
}

.suffix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.slider-field {
  gap: 0.5rem;
}

.slider-field input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: transparent;
  padding: 0;
}

.slider-field input[type="range"]::-webkit-slider-runnable-track {
  height: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
}

.slider-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.3rem rgba(255, 107, 107, 0.25);
  cursor: pointer;
  margin-top: -0.3rem;
}

.slider-field input[type="range"]::-moz-range-track {
  height: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
}

.slider-field input[type="range"]::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 0 0 0.3rem rgba(255, 107, 107, 0.25);
  cursor: pointer;
}

.slider-value {
  display: flex;
  justify-content: flex-end;
  font-weight: 600;
}

.range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.range-fields > div {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  padding-right: 0.5rem;
}

.range-fields input {
  flex: 1;
  border: none;
  background: transparent;
  padding-right: 0;
  text-align: center;
}

.error-text {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: -0.5rem;
}

input[data-error],
select[data-error] {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(255, 59, 59, 0.25);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 107, 107, 0.2);
}

.primary-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.result {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  min-width: 320px;
  border-radius: 1.25rem;
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 1rem;
}

thead {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

tbody tr:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.placeholder {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 1rem;
}

#warmup-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

#warmup-table th:nth-child(2),
#warmup-table th:nth-child(3),
#warmup-table th:nth-child(4),
#warmup-table td:nth-child(2),
#warmup-table td:nth-child(3),
#warmup-table td:nth-child(4) {
  text-align: center;
}

.page-footer {
  padding: 1.5rem clamp(1.5rem, 4vw, 5rem) 3rem;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.9rem;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.page-footer a {
  color: var(--accent);
  text-decoration: none;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.footer-meta {
  margin: 0;
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
}
@media (max-width: 1200px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .rir-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .support-panel {
    position: static;
  }

  .rir-card {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    grid-template-rows: auto 1fr auto;
  }

  .background-accent {
    opacity: 0.45;
    filter: blur(90px);
  }

  .page-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .content-shell {
    padding: 0 1.5rem 2.5rem;
  }

  .card {
    border-radius: 1.1rem;
  }

  .card-header,
  .card-body,
  .card-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .top-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-header {
    gap: 1.5rem;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-card {
    order: 0;
  }

  .brand {
    width: 100%;
    gap: 0.9rem;
  }

  .brand-mark {
    width: 2.9rem;
    height: 2.9rem;
  }

  .top-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.6rem;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }

  .hero-card {
    padding: 1.75rem;
  }

  thead {
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
  }

  td {
    border: none;
    padding: 0.35rem 0;
    text-align: left;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
  }

  td.placeholder {
    text-align: left;
    color: var(--text-secondary);
    padding: 0.5rem 0;
  }
}

@media (max-width: 540px) {
  .brand {
    align-items: flex-start;
  }

  .brand-title {
    font-size: 1.75rem;
  }

  .brand-subtitle {
    font-size: 0.78rem;
  }

  .toggle-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.4rem 0.6rem;
    border-radius: 1rem;
  }

  .toggle-label {
    font-size: 0.7rem;
  }

  .toggle-buttons {
    width: 100%;
    justify-content: space-between;
    gap: 0.3rem;
  }

  .toggle-button {
    flex: 1;
    text-align: center;
    padding: 0.26rem 0.5rem;
    font-size: 0.82rem;
    min-height: 2.05rem;
  }

  .toggle-select {
    width: 100%;
    min-width: 0;
  }

  .toggle-select select {
    width: 100%;
    padding: 0.28rem 1.8rem 0.28rem 0.7rem;
    font-size: 0.82rem;
    min-height: 2.15rem;
  }

  .card-header,
  .card-body,
  .card-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.7rem 0.8rem;
  }
}

@media (max-width: 420px) {
  .background-accent {
    display: none;
  }

  .page-header {
    padding: 1.75rem 1.1rem 1.2rem;
  }

  .content-shell {
    padding: 0 1.1rem 2rem;
  }

  .hero-card {
    padding: 1.5rem;
  }

  .card {
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(8, 9, 12, 0.3);
  }

  .card-header,
  .card-body,
  .card-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  input,
  select,
  .toggle-select select {
    font-size: 0.9rem;
  }

  .result {
    font-size: 0.95rem;
  }

  .slider-value {
    font-size: 0.9rem;
  }

  table {
    min-width: 280px;
  }

  .rir-card {
    margin-top: 1.5rem;
  }
}

