/* Layout: flow, dimensions, and space. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.c-frame {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.c-skip-link {
  position: fixed;
  z-index: 10;
  left: 24px;
  top: -100px;
  min-height: 48px;
  padding: 12px 20px;
}

.c-skip-link:focus {
  top: 16px;
}

.c-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
}

.c-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.c-hero {
  width: min(744px, calc(100% - 64px));
  margin-inline: auto;
  padding-block: 96px 88px;
}

.c-hero .c-eyebrow {
  margin-bottom: 24px;
}

.c-title-line {
  display: block;
}

.c-hero-intro {
  max-width: 620px;
  margin-top: 28px;
}

.c-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 52px;
  padding: 12px 24px;
  max-width: 100%;
  cursor: pointer;
}

.c-first-answer {
  margin-top: 56px;
  padding-top: 28px;
}

.c-first-answer .c-eyebrow {
  margin-bottom: 12px;
}

.c-first-answer p:last-child {
  margin-bottom: 0;
}

.c-guide-layout {
  display: grid;
  grid-template-columns: minmax(200px, 248px) minmax(0, 744px);
  align-items: start;
  gap: 80px;
}

.c-question-tabs {
  position: sticky;
  top: 32px;
  padding-top: 8px;
}

.c-question-links {
  display: grid;
  margin-top: 20px;
}

.c-question-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 12px 16px;
}

.c-question-link::before {
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  content: "";
}

.c-rail-note {
  margin-top: 24px;
  padding-inline: 16px;
}

.c-guide-body {
  min-width: 0;
}

.c-guide-chapter {
  margin-bottom: 48px;
}

.c-guide-chapter > h2 {
  margin-bottom: 32px;
}

.c-guide-chapter > .c-guide-section {
  padding-block: 28px 40px;
}

.c-guide-section {
  padding-block: 48px 56px;
  scroll-margin-top: 32px;
}

.c-guide-section:first-child {
  padding-top: 4px;
}

.c-guide-section > h2,
.c-sources-box > h2 {
  margin-bottom: 24px;
}

.c-guide-section > h4 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.c-guide-section > h3 {
  margin-top: 0;
  margin-bottom: 24px;
}

.c-rule-detail {
  margin-top: 32px;
}

.c-rule-detail > h4 {
  margin-bottom: 16px;
}

.c-rule-detail > .c-answer-list {
  margin-top: 16px;
}

.c-guide-section p,
.c-sources-box > p {
  max-width: 72ch;
}

.c-answer-list {
  margin-block: 24px;
  padding-left: 24px;
}

.c-answer-list li {
  padding-left: 8px;
}

.c-answer-list li + li {
  margin-top: 16px;
}

.c-takeaway {
  margin-top: 32px;
  margin-bottom: 0;
}

.c-note {
  padding: 28px;
  margin-block: 32px;
}

.c-note p:last-child {
  margin-bottom: 0;
}

.c-check-links {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.c-check-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding: 12px 16px;
}

.c-date-note {
  margin-top: 24px;
}

.c-urgent-note {
  padding: 24px 28px;
  margin-top: 32px;
}

.c-urgent-note h4,
.c-note h4 {
  margin-bottom: 12px;
}

.c-urgent-note p {
  margin-bottom: 0;
}

.c-cost-sheet {
  min-width: 0;
  width: 100%;
  margin: 32px 0 0;
  padding: 24px 0 0;
}

.c-sheet-legend {
  padding-inline: 24px;
  max-width: 100%;
}

.c-sheet-intro {
  padding-inline: 24px;
  margin-bottom: 24px;
}

.c-cost-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: 96px;
  padding: 24px;
  cursor: pointer;
}

.c-cost-row > span {
  min-width: 0;
}

.c-cost-row strong,
.c-cost-row > span > span {
  display: block;
}

.c-cost-row strong {
  margin-bottom: 4px;
}

.c-cost-row input {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  cursor: pointer;
}

.c-cost-row input::before {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.c-worksheet-result {
  padding: 28px 24px;
}

.c-worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
}

.c-text-button {
  min-height: 48px;
  padding: 12px 4px;
  cursor: pointer;
}

.c-copy-fallback {
  display: block;
  margin-top: 24px;
}

.c-copy-field {
  display: block;
  width: 100%;
  resize: vertical;
  padding: 16px;
  margin-top: 12px;
}

.c-carry-list {
  list-style: none;
  padding: 0;
  margin-block: 24px 32px;
}

.c-carry-list li {
  padding: 20px 0;
}

.c-sources-box {
  margin-block: 32px 56px;
  padding: 32px 28px 8px;
  scroll-margin-top: 32px;
}

.c-source-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.c-source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 20px 0;
  gap: 24px;
}

.c-source-link > span:first-child {
  min-width: 0;
}

.c-source-link strong,
.c-source-link > span > span {
  display: block;
}

.c-source-link > span > span {
  margin-top: 4px;
}

.c-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-block: 32px 48px;
}

.c-footer p {
  max-width: 56ch;
  margin: 0;
}

.c-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 48px;
  padding: 12px 0;
  flex-shrink: 0;
}

@media (max-width: 1000px) {
  .c-guide-layout {
    grid-template-columns: minmax(180px, 208px) minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 24px;
  }

  .c-frame,
  .c-hero {
    width: calc(100% - 48px);
  }

  .c-masthead {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding-block: 16px;
  }

  .c-hero {
    padding-block: 56px;
  }

  .c-hero-actions {
    gap: 8px;
  }

  .c-first-answer {
    margin-top: 40px;
    padding-top: 24px;
  }

  .c-guide-layout {
    display: block;
  }

  .c-question-tabs {
    position: static;
    padding-block: 24px 32px;
    margin-bottom: 24px;
  }

  .c-question-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
  }

  .c-question-link {
    min-height: 64px;
    padding: 12px;
    gap: 4px;
  }

  .c-rail-note {
    padding-inline: 0;
  }

  .c-guide-section {
    padding-block: 40px 48px;
    scroll-margin-top: 24px;
  }

  .c-guide-section:first-child {
    padding-top: 24px;
  }

  .c-note,
  .c-urgent-note {
    padding: 24px;
  }

  .c-cost-row {
    gap: 16px;
    padding: 20px 16px;
  }

  .c-sheet-intro,
  .c-worksheet-result {
    padding-inline: 16px;
  }

  .c-sheet-legend {
    padding-inline: 16px;
  }

  .c-sources-box {
    padding: 28px 20px 8px;
  }

  .c-footer {
    display: block;
    padding-block: 28px 36px;
  }

  .c-footer-link {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
