/* Brand-only overrides. */
/* Hero: no picture. Heading and lead, then the domain search in its own full-width row underneath. */
.home-band-hero .home-wrap { grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: calc(var(--c-space) * 1.25); }
.home-band-hero .home-hero-text { grid-column: 1; grid-row: 1; max-width: 48rem; }
.home-band-hero .home-hero-lead { max-width: 42rem; margin-bottom: 0; }
.home-hero-search { grid-column: 1; grid-row: 2; width: 100%; max-width: 960px; justify-self: start; scroll-margin-top: 1rem; }
.home-hero-search iframe { display: block; width: 100%; }
.home-renew-note { margin: .55rem 0 0; max-width: 36rem; color: var(--g-muted); font-size: .8125rem; line-height: 1.45; }
.home-renew-note a { color: inherit; text-decoration: underline; text-underline-offset: .12em; }
.home-renew-note a:hover, .home-renew-note a:focus { color: var(--teal, #0f6460); }
/* The first card row has no visible heading, so it sits a little closer to the strip above. */
.home-band-cards:has(> .home-wrap > h2.usa-sr-only) { padding-top: calc(var(--c-space) * 1.5); }

/* Payment marks: card logos in small bordered chips, stablecoin/network icons as small rounds. Hero and footer. */
.pay-marks { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .75rem; font-size: .875rem; }
.pay-marks-label { margin: 0; color: #565c65; font-weight: 600; }
.pay-row { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin: 0; padding: 0; list-style: none; }
.pay-row li { margin: 0; padding: 0; line-height: 0; }
.pay-card { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 1.625rem; padding: 3px 4px; background: #fff; border: 1px solid #dfe1e2; border-radius: 4px; box-sizing: border-box; }
.pay-card img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.pay-coin img { display: block; width: 1.25rem; height: 1.25rem; border-radius: 50%; }
.pay-marks-link { color: #0f6460; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.pay-marks-link:hover { color: #0b4b48; }
.pay-marks-footer { width: 100%; margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(0,0,0,.1); }
@media (max-width: 40em) {
  .pay-marks { gap: .5rem; }
  .pay-marks-label, .pay-marks-link { width: 100%; }
}
/* Footer bottom band is dark: light text there. */
.pay-marks-footer { border-bottom-color: rgba(255,255,255,.15); }
.pay-marks-footer .pay-marks-label { color: #dfe1e2; }
.pay-marks-footer .pay-marks-link, .pay-marks-footer .pay-marks-link:hover { color: #fff; }

/* Included strip: one quiet line with thin separators between the hero and the guides. */
.home-band-included { padding: calc(var(--c-space) * 0.9) 0; border-bottom: 1px solid #dfe1e2; }
.home-included { margin: 0; padding: 0; font-size: 1rem; font-weight: 600; color: #1b1b1b; text-align: center; white-space: nowrap; }
.home-included-sep { display: inline-block; margin: 0 .875rem; color: #a9aeb1; font-weight: 300; }
@media (max-width: 30em) { .home-included { font-size: .875rem; } .home-included-sep { margin: 0 .5rem; } }
@media (max-width: 24.5em) { .home-included { flex-direction: column; row-gap: .15rem; } .home-included-sep { display: none; } }

/* Swatch cards: a short solid teal chip, then a white footer strip with a bold title. */
.home-band-swatches { padding: calc(var(--c-space) * 1.75) 0 calc(var(--c-space) * 2); }
.swatch-top { display: block; height: 104px; background: var(--g-primary); }
.swatch-title { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: #1b1b1b; }
@media (max-width: 40em) {
  .swatch-top { height: 72px; }
  .swatch-title { font-size: 1.4rem; }
}

/* Compact cards (Popular domain endings, Buying and moving a domain): a thin teal bar instead of the beige art panel. */
.home-band-cards .home-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.home-band-cards .home-card { border: 1px solid #dfe1e2; border-top: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.10); transition: box-shadow .15s ease; }
.home-band-cards .home-card::before { content: ""; display: block; height: 7px; background: var(--g-primary); }
.home-band-cards .home-card:hover { box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 22px rgba(0,0,0,.14); }
.home-band-cards .home-card-body { padding: .9rem 1.1rem 1rem; }
.home-band-cards .home-card-title { margin: 0 0 .25em; font-size: 1.05rem; line-height: 1.25; }
.home-band-cards .home-card-text { font-size: .9rem; line-height: 1.45; }
@media (max-width: 40em) { .home-band-cards .home-cards { grid-template-columns: 1fr; gap: .75rem; } }
@media (prefers-reduced-motion: reduce) { .home-band-cards .home-card { transition: none; } }

/* One teal: resting and current links use the logo teal; the darker shade is kept only for hover/active feedback. */
.guide a:visited { color: var(--g-primary); }
.guide-drawer-pages a,
.guide-header .usa-nav__primary :is(a.usa-current, summary.guide-current),
.guide-header .guide-megamenu .usa-nav__submenu-item a[aria-current],
.guide-sidenav .usa-sidenav a.usa-current,
.guide-rail .on-this-page-list a[aria-current] { color: var(--g-primary); }


/* Team cards on /about/ (src/authors.json). Placeholders show here and in guide bylines only, never in schema. */
.guide-authors { margin: 1.25rem 0 1.75rem; }
.guide-authors-title { margin: 0 0 .75rem; font-size: 1.15rem; }
.author-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 1rem; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; padding: 1.5rem 1.1rem 1.25rem; border: 1px solid #dfe1e2; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.author-photo { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--g-band); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c7dcda; }
.author-avatar svg { display: block; width: 100%; height: 100%; }
.author-card-body { min-width: 0; display: flex; flex-direction: column; align-items: center; flex: 1; width: 100%; }
.guide-authors .author-card p { margin: 0; }
.guide-authors .author-card .author-name { margin-top: 1rem; font-size: 1.1rem; font-weight: 700; font-style: normal; line-height: 1.3; color: #1b1b1b; }
.guide-authors .author-card .author-role { margin-top: .3rem; color: var(--g-primary); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.guide-authors .author-card .author-bio { margin-top: .7rem; color: #3d4551; font-size: .93rem; line-height: 1.5; }
.guide-authors .author-socials, .author-socials { list-style: none; margin: auto 0 0; padding: 1rem 0 0; display: flex; justify-content: center; gap: .5rem; }
.guide-authors .author-socials li, .author-socials li { margin: 0; padding: 0; list-style: none; }
.author-social { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1.5px solid var(--g-primary); border-radius: 50%; color: var(--g-primary); background: #fff; text-decoration: none; transition: background-color .15s, color .15s; }
a.author-social:hover, a.author-social:focus-visible { background: var(--g-primary); color: #fff; }
.author-social-icon { width: 17px; height: 17px; display: block; }
.author-social-empty { opacity: .55; cursor: default; }

/* Guide byline under the H1, and the author in "About this page". */
.guide-byline { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid #dfe1e2; }
.guide-byline-avatar { display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; object-fit: cover; }
.guide-byline-avatar svg, .page-info-avatar svg { display: block; width: 100%; height: 100%; }
.guide-byline-text { margin: 0; display: flex; flex-direction: column; line-height: 1.35; font-size: .95rem; }
.guide-byline-by { font-weight: 700; color: #1b1b1b; }
.guide-byline-by a { color: inherit; text-decoration-color: #9fc2bf; text-underline-offset: 2px; }
.guide-byline-by a:hover { color: var(--g-primary); }
.guide-byline-date { color: var(--g-muted); font-size: .88rem; }
.page-info-author { display: inline-flex; align-items: center; gap: .55rem; }
.page-info-avatar { display: block; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; object-fit: cover; }
.page-info-author-text { display: flex; flex-direction: column; line-height: 1.3; }
.page-info-author-role { color: var(--g-muted); font-size: .85rem; }


/* ---- v24: menu groups, and one set of proportions for the home page on tablets and up ---- */
/* Guides menu: three labelled groups (desktop megamenu and mobile drawer). */
.guide-megamenu-group-heading { margin: 0 0 .35rem; color: var(--g-muted); font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
@media (min-width: 64em) { .guide-megamenu .usa-col.guide-megamenu-group { flex: 0 1 14rem; } }
@media (max-width: 63.99em) { .guide-megamenu-group-heading { margin: 0; padding: .9rem 1rem .4rem 2rem; border-top: 1px solid var(--g-band-strong); } }
/* Footer: brand plus four link columns. */
@media (min-width: 64em) { .guide-footer-main { grid-template-columns: minmax(12rem, 16rem) repeat(4, minmax(8rem, 11rem)); gap: 2rem 2rem; } }
@media (max-width: 63.99em) and (min-width: 40em) { .guide-footer-main { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1.5rem; } }

/* One corner radius for every home card and box. */
.guide-home { --home-radius: 12px; }
.home-band-cards .home-card, .home-guide, .home-feature { border-radius: var(--home-radius); }

/* Feature cards (privacy, renewals): two side by side, a small icon beside the heading. */
.home-band-features { padding: calc(var(--c-space) * 1.5) 0; }
.home-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.home-feature { display: flex; flex-direction: column; align-items: flex-start; padding: 1.25rem 1.4rem 1.4rem; border: 1px solid #dfe1e2; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.10); }
.home-feature-head { display: flex; align-items: center; gap: .75rem; margin: 0 0 .6rem; }
.home-feature-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--g-band); color: var(--g-primary); }
.home-feature-svg { width: 1.35rem; height: 1.35rem; }
.home-feature-heading { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.home-feature .home-text { flex: 1 0 auto; margin: 0 0 1rem; }
@media (max-width: 40em) { .home-features { grid-template-columns: 1fr; gap: .75rem; } .home-feature .home-button { align-self: stretch; } }

/* Tablet and up: balance the combo cards, tighten the guide boxes, and make the small cards readable. */
@media (min-width: 40em) {
  .home-heading { font-size: 1.5rem; }
  .home-band-guides { padding: calc(var(--c-space) * 2) 0; }
  .home-guide { padding: 1.25rem 1.4rem 1.4rem; }
  .home-guide-heading { font-size: 1.25rem; }
  .home-guide-links { gap: .5rem; }
  .home-guide-link { padding: .6rem .9rem; }
  .home-band-cards .home-card-body { padding: 1rem 1.15rem 1.1rem; }
  .home-band-cards .home-card-title { font-size: 1.125rem; }
  .home-band-cards .home-card-text { font-size: .95rem; line-height: 1.5; }
}
@media (min-width: 64em) {
  .home-guide-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-band-cards .home-card-text { font-size: 1rem; }
}
/* Same side gutter as the header, footer and guide pages (USWDS grid-container: 1rem until desktop, then 2rem). */
@media (max-width: 63.99em) { .guide-home { --c-page-gutter: 1rem; } }
/* Tablet portrait: the six ending cards in two columns so each reads in two or three lines. */
@media (min-width: 40em) and (max-width: 63.99em) { .home-band-cards .home-cards:has(> li:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .home-guide-link { font-size: .9375rem; white-space: nowrap; } }
.home-guide-heading { margin-bottom: .85rem; }

/* Author photos are wrapped in <picture> (webp + jpg). */
.author-card picture, .guide-byline picture, .page-info-author picture { display: block; flex-shrink: 0; line-height: 0; }

/* Contact form (/contact/). */
.contact-note { margin: 0 0 1.25rem; padding: .85rem 1rem; border-left: 4px solid var(--g-primary); border-radius: 0 12px 12px 0; background: var(--g-band); }
.guide-prose .contact-note p { margin: 0; }
.contact-form { max-width: 36rem; margin: .5rem 0 1.5rem; }
.contact-field { margin: 0 0 1.1rem; }
.contact-form .usa-label { display: block; margin: 0 0 .3rem; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.contact-optional { font-weight: 400; color: var(--g-muted); }
.contact-hint { display: block; margin: 0 0 .35rem; color: var(--g-muted); font-size: .9rem; }
.contact-form .usa-input, .contact-form .usa-select, .contact-form .usa-textarea { display: block; box-sizing: border-box; width: 100%; max-width: none; margin: 0; padding: .55rem .7rem; border: 1px solid #565c65; border-radius: 6px; background: #fff; color: #1b1b1b; font: inherit; font-size: 1rem; line-height: 1.4; }
.contact-form .usa-input, .contact-form .usa-select { height: 2.75rem; }
.contact-form .usa-textarea { min-height: 9rem; resize: vertical; }
.contact-form .usa-input:focus, .contact-form .usa-select:focus, .contact-form .usa-textarea:focus { outline: 3px solid var(--g-primary); outline-offset: 0; border-color: var(--g-primary); }
.contact-field-error { padding-left: 1rem; border-left: 4px solid #b50909; }
.contact-error-msg { display: block; margin: 0 0 .35rem; color: #b50909; font-weight: 700; font-size: .95rem; }
.contact-field-error .usa-input, .contact-field-error .usa-select, .contact-field-error .usa-textarea { border: 2px solid #b50909; }
.contact-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.guide-prose .contact-small { margin: 0 0 1rem; color: var(--g-muted); font-size: .9rem; }
.contact-submit, .guide-prose .contact-submit { display: inline-block; margin: 0; padding: .75rem 1.5rem; border: 0; border-radius: 6px; background: var(--g-primary); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; }
.contact-submit:hover { background: var(--g-primary-dark); }
.contact-submit:focus-visible { outline: 3px solid var(--g-primary); outline-offset: 3px; }
.contact-submit:disabled { opacity: .7; cursor: progress; }
.contact-alert { max-width: 36rem; margin: 0 0 1.25rem; padding: 1rem 1.1rem; border-left: 6px solid; border-radius: 0 12px 12px 0; }
.contact-alert:focus { outline: 3px solid var(--g-primary); outline-offset: 2px; }
.contact-alert-error { border-color: #b50909; background: #f4e3db; }
.contact-alert-success { border-color: var(--g-primary); background: var(--g-band); }
.guide-prose .contact-alert p { margin: 0 0 .35rem; }
.guide-prose .contact-alert p:last-child, .guide-prose .contact-alert ul { margin-bottom: 0; }
.contact-alert-title { font-weight: 700; font-size: 1.05rem; }
@media (max-width: 30em) { .contact-submit, .guide-prose .contact-submit { width: 100%; } }

/* Share (page options, left of Print and Email). */
.guide-share-item { position: relative; }
.guide-share-status { position: absolute; top: calc(100% + .35rem); right: 0; z-index: 5; white-space: nowrap; font-size: .85rem; line-height: 1.2; }
.guide-share-status:not(:empty) { padding: .35rem .6rem; border-radius: 6px; background: #1b1b1b; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }

/* v29: one teal line under the hero (the Free WHOIS strip is gone). */
.guide-home .home-band-hero { border-bottom: 4px solid var(--g-primary); box-shadow: none; padding-bottom: calc(var(--c-space) * 1.25); }

/* v36: modern guide boxes — no thick teal top bar;
   24–32px of air between the hero line and the cards. */
.home-guide {
  border: 1px solid #dfe1e2;
  border-top: 1px solid #dfe1e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.10);
}
/* v37: left-aligned headings, no teal mark, a thin divider above the links. */
.home-guide-heading {
  display: block;
  margin: 0 0 .85rem;
  padding: 0 0 .7rem;
  border-bottom: 1px solid var(--g-band-strong);
  text-align: left;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.home-guide-heading::before { content: none; display: none; }
.guide-home .home-band-hero + .home-band-guides { padding-top: 2rem; padding-bottom: 2rem; }
@media (max-width: 40em) {
  .guide-home .home-band-hero { padding-bottom: var(--c-space); }
  .guide-home .home-band-hero + .home-band-guides { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* v38/v39: TD mark (SVG has its own 20% corner radius). Header and drawer are image-only. */
.guide-header .guide-brand img, .guide-footer-brand .guide-brand img { border-radius: 0; }
@media (max-width: 63.99em) {
  .guide-header .usa-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
  }
  .guide-header .usa-logo { flex: 0 0 auto; margin: 0; }
  .guide-header .guide-theme-btn--bar {
    margin-left: auto;
  }
  .guide-header .usa-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    margin: 0 0 0 0.5rem;
    height: 2.75rem;
    padding: 0 1rem;
  }
  .guide-drawer-head { background: #0f6460; }
  .guide-drawer-brand, .guide-drawer-brand:hover, .guide-drawer-brand:visited { color: #fff !important; }
  .guide-header .guide-drawer-head .usa-nav__close,
  .guide-header .guide-drawer-head .usa-nav__close:hover,
  .guide-header .guide-drawer-head .usa-nav__close:visited { color: #fff; }
  .guide-header .guide-drawer-head .usa-nav__close img { filter: brightness(0) invert(1); }
}

/* v31: About this page is a teal swatch card (large solid block, white details). The top byline is gone. */
.guide-page-info .page-info-swatch {
  --page-info-radius: 20px;
  max-width: var(--c-measure, 40rem);
  margin: calc(var(--c-space, 1rem) * 2) 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--page-info-radius);
  background: var(--c-card, #fff);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.10);
  overflow: hidden;
}
.page-info-swatch-top { height: 132px; background: var(--g-primary); }
@media (min-width: 40em) { .page-info-swatch-top { height: 160px; } }
.page-info-swatch-body { padding: 0 1.4rem 1.5rem; background: var(--c-card, #fff); }
.page-info-swatch .page-info-author { display: flex; align-items: flex-start; gap: 1rem; margin: 0 0 1.1rem; }
.page-info-swatch .page-info-author picture,
.page-info-swatch .page-info-author > .page-info-avatar {
  display: block; width: 72px; height: 72px; margin-top: -2.25rem; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; background: var(--g-band);
  box-shadow: 0 0 0 3px var(--c-card, #fff);
}
.page-info-swatch .page-info-author img.page-info-avatar {
  display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; box-shadow: none;
  object-fit: cover;
}
.page-info-swatch .page-info-avatar svg { display: block; width: 100%; height: 100%; }
.page-info-swatch .page-info-author-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding-top: .15rem; line-height: 1.3; }
.page-info-swatch .page-info-title { margin: 0 0 .2rem; font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--g-ink, #1b1b1b); }
.page-info-swatch .page-info-author-text a { font-weight: 700; color: var(--g-ink, #1b1b1b); text-decoration-color: var(--g-primary-light, #9fc2bf); text-underline-offset: 2px; }
.page-info-swatch .page-info-author-text a:hover { color: var(--g-primary); }
.page-info-swatch .page-info-author-role { color: var(--g-primary); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-info-swatch .page-info-team { margin: 0 0 .85rem; }
.page-info-swatch .page-info-list { margin: 0; }
.page-info-swatch .page-info-row { display: flex; flex-wrap: wrap; gap: 0 .75rem; padding: .2rem 0; }
.page-info-swatch .page-info-row dt { min-width: 9em; margin: 0; color: var(--g-muted); }
.page-info-swatch .page-info-row dd { margin: 0; color: var(--g-ink, #1b1b1b); }
.page-info-swatch .page-info-report { margin: .9rem 0 0; }
@media (max-width: 30em) {
  .page-info-swatch-body { padding: 0 1.15rem 1.25rem; }
  .page-info-swatch .page-info-title { font-size: 1.2rem; }
}

/* v40: dark mode. Tokens use light-dark() and follow color-scheme, which is set
   from prefers-color-scheme or the saved choice (td-theme in localStorage).
   Brand teal #0f6460 stays on the logo and solid buttons; links and accents on
   dark use a lighter teal so contrast meets WCAG AA. */
html { color-scheme: light dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
/* :root beats html (a type selector). Tokens go here so they override extra.css. */
:root {
  --g-page: light-dark(#ffffff, #0f1414);
  --g-surface: light-dark(#ffffff, #161d1d);
  --g-ink: light-dark(#171716, #e6eeee);
  --g-text: light-dark(#2e2e2a, #e6eeee);
  --g-muted: light-dark(#5d5d52, #a9b8b8);
  --g-line: light-dark(#cac9c0, #2a3636);
  --g-line-soft: light-dark(#e6e6e2, #243030);
  --g-grey: light-dark(#f6f6f2, #161d1d);
  --g-band: light-dark(#ecf3f2, #161d1d);
  --g-band-strong: light-dark(#dde9e9, #2a3636);
  --g-primary-lighter: light-dark(#e0f7f6, #143333);
  --g-primary-light: light-dark(#9bd4cf, #5fb3ad);
  --g-focus: light-dark(#008480, #5fb3ad);
  --g-focus-on-dark: #9bd4cf;
  --g-link: light-dark(#0f6460, #5fb3ad);
  --g-link-hover: light-dark(#0b4b48, #9bd4cf);
  --g-error: light-dark(#b50909, #f0a39c);
  --g-error-bg: light-dark(#f4e3db, #2a2222);
  --c-card: light-dark(#ffffff, #1b2424);
  --c-surface: light-dark(#f6f6f2, #161d1d);
  --c-heading: light-dark(#171716, #e6eeee);
  --c-muted: var(--g-muted);
  --c-border: var(--g-line);
  --c-border-subtle: var(--g-line-soft);
  --c-band: var(--g-band);
  --c-band-alt: light-dark(#f6f6f2, #0f1414);
  --c-title-bar: var(--g-primary-lighter);
  --c-group-bar: var(--g-band);
  --c-summary: var(--g-band);
  --c-faq-question: var(--g-grey);
  --c-crumbs-color: var(--g-muted);
  --c-crumbs-link: var(--g-link);
  --c-new-link: var(--g-error);
  --c-callout-warning: light-dark(#8c4a00, #e0a36a);
  --c-callout-tip: light-dark(#446443, #5fb3ad);
  --c-callout-note: light-dark(#0f6460, #5fb3ad);
}
html[data-theme="dark"] { --c-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --c-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
}

/* Page, header, footer surfaces */
body.guide { background: var(--g-page); color: var(--g-text); }
.guide-header { background: var(--g-page); border-bottom-color: var(--g-line); }
.guide h1, .guide h2, .guide h3, .guide h4 { color: var(--g-ink); }
.guide a { color: var(--g-link); }
.guide a:visited { color: var(--g-link); }
.guide a:hover { color: var(--g-link-hover); }
.guide-brand { color: var(--g-ink) !important; }

/* Keep solid teal buttons and the drawer head in brand teal with white type */
.guide-header .usa-menu-btn,
.guide-header .usa-menu-btn:hover,
.guide-header .usa-menu-btn:visited,
.guide-search .usa-button,
.contact-submit, .guide-prose .contact-submit,
.wiki-contact-submit,
.guide-home .home-button, .guide-home .home-button:visited,
.guide-home .home-guide-link:hover, .guide-home .home-guide-link:focus { color: #fff; }

/* Theme toggle */
.guide-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--g-line);
  border-radius: 4px;
  background: var(--c-card);
  color: var(--g-ink);
  cursor: pointer;
}
.guide-theme-btn:hover { background: var(--g-band); color: var(--g-link); }
.guide-theme-btn:focus-visible { outline: 3px solid var(--g-focus); outline-offset: 2px; }
.guide-theme-icon { display: block; width: 1.25rem; height: 1.25rem; }
.guide-theme-icon-sun { display: none; }
html[data-theme="dark"] .guide-theme-icon-sun { display: block; }
html[data-theme="dark"] .guide-theme-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .guide-theme-icon-sun { display: block; }
  html:not([data-theme="light"]) .guide-theme-icon-moon { display: none; }
}
@media (max-width: 63.99em) {
  .guide-theme-btn--search { display: none; }
}
@media (min-width: 64em) {
  .guide-theme-btn--bar { display: none; }
  .guide-header .usa-nav__secondary {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: max-content;
    max-width: none;
  }
  .guide-header .usa-nav__secondary .guide-search,
  .guide-header .usa-nav__secondary .usa-search { width: 20rem; flex: none; margin: 0; }
}

/* Nav, search, typeahead, drawer */
.guide-megamenu.usa-nav__submenu { background: var(--c-card); }
@media (min-width: 64em) {
  .guide-header .guide-megamenu.usa-nav__submenu {
    background: var(--c-card);
    border-top-color: var(--g-line);
    border-bottom-color: var(--g-line);
    box-shadow: var(--c-shadow);
  }
  .guide-megamenu .usa-nav__submenu-item a { color: var(--g-link) !important; }
  .guide-megamenu .usa-nav__submenu-item a:hover { color: var(--g-link-hover) !important; }
  .guide-megamenu .usa-nav__submenu-item a[aria-current] { color: var(--g-ink) !important; }
  .guide-megamenu-heading { color: var(--g-ink); }
}
.guide-typeahead { background: var(--c-card); border-color: var(--g-line); }
.guide-search .usa-input {
  background: var(--c-card);
  color: var(--g-ink);
  border-color: var(--g-muted);
}
@media (max-width: 63.99em) {
  .guide-header .usa-nav { background: var(--g-page); }
  .guide-header .usa-nav__primary > .usa-nav__primary-item > a,
  .guide-nav-panel > summary {
    background: var(--g-page);
    color: var(--g-ink);
  }
}

/* Cards, bands, tables, code, forms */
.home-band-cards .home-card,
.home-guide,
.home-feature,
.author-card {
  background: var(--c-card);
  border-color: var(--g-line);
  box-shadow: var(--c-shadow);
}
.home-guide-heading { color: var(--g-ink); }
html[data-theme="dark"] .guide-home .home-guide-link,
html[data-theme="dark"] .guide-home .home-guide-link:visited {
  color: var(--g-link);
  border-color: var(--g-link);
}
html[data-theme="dark"] .guide-home .home-guide-link:hover,
html[data-theme="dark"] .guide-home .home-guide-link:focus {
  background: var(--g-primary);
  color: #fff;
  border-color: var(--g-primary);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .guide-home .home-guide-link,
  html:not([data-theme="light"]) .guide-home .home-guide-link:visited {
    color: var(--g-link);
    border-color: var(--g-link);
  }
  html:not([data-theme="light"]) .guide-home .home-guide-link:hover,
  html:not([data-theme="light"]) .guide-home .home-guide-link:focus {
    background: var(--g-primary);
    color: #fff;
    border-color: var(--g-primary);
  }
}
.swatch-title, .home-included, .author-card .author-name,
.guide-byline-by, .guide-authors .author-card .author-name { color: var(--g-ink); }
.guide-authors .author-card .author-bio { color: var(--g-text); }
.home-band-included { border-bottom-color: var(--g-line); }
.guide-byline { border-bottom-color: var(--g-line); }
.pay-card { background: #fff; border-color: #dfe1e2; } /* payment marks stay on white */
.pay-marks-label { color: var(--g-muted); }
.author-social { background: var(--c-card); }
.author-photo { box-shadow: 0 0 0 3px var(--c-card), 0 0 0 4px var(--g-band-strong); }
.guide-prose table.wikitable :is(th, td) { border-color: var(--g-line); }
.guide-prose table.wikitable th { background: var(--g-band); color: var(--g-ink); }
.guide-prose table.wikitable tbody tr:nth-child(even) { background: var(--g-surface); }
.guide-prose code, .guide-prose pre, .guide-prose blockquote { background: var(--g-grey); }
.contact-form .usa-input, .contact-form .usa-select, .contact-form .usa-textarea,
.wiki-contact-form input:not([type="hidden"], [type="checkbox"]),
.wiki-contact-form select, .wiki-contact-form textarea {
  background: var(--c-card);
  color: var(--g-ink);
  border-color: var(--g-muted);
}
.contact-field-error { border-left-color: var(--g-error); }
.contact-error-msg { color: var(--g-error); }
.contact-field-error .usa-input, .contact-field-error .usa-select, .contact-field-error .usa-textarea { border-color: var(--g-error); }
.contact-alert-error { border-color: var(--g-error); background: var(--g-error-bg); }
.guide-share-status:not(:empty) { background: var(--g-ink); color: var(--g-page); }

#pagefind-search {
  --pagefind-ui-primary: var(--g-link);
  --pagefind-ui-text: var(--g-text);
  --pagefind-ui-background: var(--c-card);
  --pagefind-ui-border: var(--g-line);
  --pagefind-ui-tag: var(--g-grey);
}

/* Generic USWDS fields on dark pages */
html[data-theme="dark"] :is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="image"], [type="hidden"]) {
  background-color: var(--c-card);
  color: var(--g-ink);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) :is(input, select, textarea):not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="image"], [type="hidden"]) {
    background-color: var(--c-card);
    color: var(--g-ink);
  }
}

/* Footer bottom band stays dark teal with light type in both modes */
.guide-footer-links a, .guide-footer-links a:visited { color: #fff; }
.guide-footer-links a:hover { color: #fff; }
.pay-marks-footer .pay-marks-link, .pay-marks-footer .pay-marks-link:hover { color: #fff; }
.usa-footer__return-to-top a { color: var(--g-link); }

.guide-typeahead__title,
.guide-typeahead__footer,
.guide-typeahead__footer .guide-typeahead__title { color: var(--g-link); }
.guide-option { color: var(--g-link) !important; }
.guide-nav-panel[open] > summary,
.guide-header .usa-nav__primary :is(a.usa-current, summary.guide-current),
.guide-sidenav .usa-sidenav a.usa-current,
.guide-sidenav .usa-sidenav a[aria-current="page"] { color: var(--g-link); }
.guide-home .home-card-title a, .guide-home .home-card-title a:visited { color: var(--g-link); }
.page-info-swatch .page-info-author-role { color: var(--g-link); }
.page-info-swatch .page-info-author-text a:hover { color: var(--g-link); }

@media (min-width: 64em) {
  html[data-theme="dark"] .guide-header .usa-nav__primary > .usa-nav__primary-item > a:is(:hover, :focus-visible, .usa-current),
  html[data-theme="dark"] .guide-nav-panel > summary:is(:hover, :focus-visible, .guide-current),
  html[data-theme="dark"] .guide-nav-panel[open] > summary { color: var(--g-link); border-bottom-color: var(--g-link); }
}
@media (prefers-color-scheme: dark) {
  @media (min-width: 64em) {
    html:not([data-theme="light"]) .guide-header .usa-nav__primary > .usa-nav__primary-item > a:is(:hover, :focus-visible, .usa-current),
    html:not([data-theme="light"]) .guide-nav-panel > summary:is(:hover, :focus-visible, .guide-current),
    html:not([data-theme="light"]) .guide-nav-panel[open] > summary { color: var(--g-link); border-bottom-color: var(--g-link); }
  }
}
