.resource-page {
  background: var(--bg);
}

.resource-header nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 4vw, 40px);
  color: var(--muted);
  font-size: 14px;
}

.resource-header nav a:hover,
.resource-header nav [aria-current="page"] {
  color: var(--accent);
}

.resource-main {
  --reading-width: 680px;
  width: min(1040px, calc(100% - 56px));
  padding-block: 30px 72px;
}

.resource-main:has(.comparison) { --reading-width: 850px; }

.resource-main:has(.reading-column) > .breadcrumbs,
.resource-main:has(.reading-column) > .related-guides {
  width: min(100%, var(--reading-width));
  margin-inline: auto;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--muted);
}

.breadcrumbs a:hover { text-decoration: underline; }

.resource-title {
  padding: 6px 0 26px;
}

.resource-title h1 {
  max-width: 900px;
  font-size: clamp(32px, 5vw, 57px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700;
  text-wrap: balance;
}

.hub-title {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(ellipse at 94% 10%, #2d254c, transparent 63%), var(--panel);
}

.resource-lead {
  max-width: 62ch;
  margin-top: 16px;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.6;
  color: var(--muted);
}

.resource-button {
  padding: 12px 18px;
  margin-top: 22px;
  font-size: 15px;
}

.resource-download {
  justify-content: flex-start;
  margin-top: 22px;
}

.byline {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.byline span { margin-inline: 5px; }

.guide-topics ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.guide-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
}

.guide-topics a:hover,
.guide-topics a:focus-visible {
  color: var(--text);
  background: var(--panel);
}

.guide-group,
.related-guides {
  margin-top: 38px;
}

.guide-group h2,
.related-guides h2 {
  margin-bottom: 16px;
  font-size: clamp(23px, 3.4vw, 30px);
  letter-spacing: -.035em;
}

.resource-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(275px, 100%), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-cards a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.resource-cards a:hover,
.resource-cards a:focus-visible {
  border-color: var(--brand-400);
  background: #272040;
}

.resource-cards strong {
  font-size: 18px;
  line-height: 1.3;
}

.resource-cards span {
  font-size: 15px;
  color: var(--muted);
}

.reading-column {
  width: min(100%, var(--reading-width));
  margin-inline: auto;
}

.reading-column .resource-title {
  border-bottom: 1px solid var(--line);
}

.prose {
  color: #e8e4f2;
  font-size: 18px;
  line-height: 1.7;
}

.prose h2,
.source-list h2,
.worksheet h2 {
  margin: 30px 0 10px;
  color: var(--text);
  font-size: clamp(23px, 3.5vw, 29px);
  letter-spacing: -.025em;
}

.prose p + p,
.prose li + li {
  margin-top: 14px;
}

.prose ul,
.prose ol,
.source-list ul {
  padding-inline-start: 22px;
}

.prose a,
.source-list a,
.worksheet a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-list {
  margin-top: 34px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--brand-500);
  color: var(--brand-300);
  font-size: 14px;
}

.source-list h2 {
  margin-top: 0;
  font-size: 19px;
}

.source-list ul { margin: 8px 0 0; }

.app-screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 2vw, 16px);
  margin: 24px 0;
}

.app-screens figure { margin: 0; }

.app-screens img {
  width: 100%;
  height: auto;
  border: 1px solid #c1b5fa55;
  border-radius: 16px;
}

.app-screens figcaption {
  margin-top: 7px;
  text-align: center;
  color: var(--brand-300);
  font-size: 13px;
}

.disclosure {
  margin-block: 22px;
  color: var(--brand-300);
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #c1b5fa55;
  border-radius: 12px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  font-size: 15px;
  line-height: 1.45;
}

.table-wrap caption {
  padding: 12px 14px;
  background: var(--panel);
  color: var(--brand-300);
  text-align: left;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  border-top: 1px solid #c1b5fa33;
  text-align: left;
  vertical-align: top;
}

.table-wrap th { color: var(--text); }

.worksheet {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid #c1b5fa55;
  border-radius: 14px;
  background: var(--panel);
}

.worksheet p + p { margin-top: 22px; }
.worksheet ol { padding-inline-start: 20px; }
.worksheet li { margin-bottom: 10px; }

.write-line {
  display: block;
  min-height: 28px;
  border-bottom: 1px solid var(--brand-400);
}

.worksheet li .write-line {
  display: inline-block;
  width: 39%;
}

.worksheet-support,
.worksheet-followup { margin-top: 18px; }

.home-guides {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  margin-bottom: 44px;
  padding: 24px 28px;
  border: 1px solid #c1b5fa33;
  border-radius: 18px;
  background: var(--panel);
}

.home-guides h2 {
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: -.03em;
}

.home-guides ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-guides a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 680px) {
  .resource-header {
    gap: 10px;
    padding-inline: 12px;
  }

  .resource-header .brand > span { font-size: 22px; }
  .resource-header nav { gap: 10px; font-size: 12px; }
  .resource-header > .button { margin: 0; padding: 8px 10px; font-size: 12px; }
  .resource-main { width: calc(100% - 40px); padding-block: 26px 52px; }
  .breadcrumbs ol { margin-bottom: 24px; }
  .resource-main:has(.reading-column) .breadcrumbs [aria-current="page"] { display: none; }
  .home-guides { align-items: flex-start; flex-direction: column; }

  .table-wrap th,
  .table-wrap td { padding: 9px 8px; }

  .table-wrap table { font-size: 14px; }
}

@media (max-width: 380px) {
  .resource-header .brand > span { display: none; }
}

@media print {
  body.worksheet-page {
    color: #111;
    background: #fff;
    font-size: 12pt;
    padding: 0;
  }

  .worksheet-page::before,
  .worksheet-page .resource-header,
  .worksheet-page .resource-footer,
  .worksheet-page .breadcrumbs,
  .worksheet-page .resource-lead,
  .worksheet-page .worksheet-followup {
    display: none;
  }

  .worksheet-page .resource-main {
    width: 100%;
    padding: 0;
  }

  .worksheet-page .resource-title {
    padding: 0 0 10px;
    border: 0;
  }

  .worksheet-page h1 { font-size: 27pt; }

  .worksheet {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: #fff;
    break-inside: avoid;
  }

  .worksheet h2,
  .worksheet a { color: #111; }
  .write-line { border-color: #666; }
}

@media (min-width: 681px) {
  .guide-group .resource-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
