/* claim.guide
 *
 * Layered on USWDS, which supplies the accessible form controls, focus states
 * and type scale. This file sets the palette, spacing and the few components
 * USWDS does not cover.
 *
 * The palette follows the VA.gov blue family, because that is the visual
 * language this audience trusts and reads easily. What keeps the site
 * distinguishable from an official VA property is the wordmark and the
 * standing affiliation line in the header. Do not remove them.
 */

/* ===== Tokens ======================================================== */
:root {
  --ink:        #1b1b1b;
  --ink-soft:   #4a4f55;
  --ink-faint:  #6f757c;

  --blue:       #005ea2;   /* USWDS primary, as used across VA.gov */
  --blue-dark:  #1a4480;
  --blue-wash:  #eaf2fa;
  --blue-line:  #bcd6ee;

  --page:       #ffffff;
  --surface:    #f7f9fb;
  --rule:       #e3e6e9;

  --radius:     8px;
  --measure:    40rem;
  --shadow:     0 1px 2px rgba(27, 27, 27, .05);
}

/* ===== Base ========================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Source Sans Pro", -apple-system, "Segoe UI", sans-serif;
  font-size: 1.09rem;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: 2rem; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .5rem; }
h3 { font-size: 1.12rem; margin: 0 0 .3rem; }

p { margin: 0 0 1rem; }
img, svg, table, pre { max-width: 100%; }
.cg-small { font-size: .92rem; color: var(--ink-faint); line-height: 1.5; }

/* ===== Header ======================================================== */
.cg-header {
  background: var(--page);
  border-bottom: 3px solid var(--blue-dark);
  padding: 1rem 0;
}
.cg-headerinner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.cg-brand { display: flex; flex-direction: column; gap: .1rem; }
.cg-wordmark {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none; line-height: 1.1;
}
.cg-wordmark span { color: var(--blue); }
.cg-tagline { margin: 0; font-size: .8rem; color: var(--ink-faint); line-height: 1.45; }
.cg-headerlink {
  color: var(--blue); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; min-height: 44px;
}

/* ===== Layout ======================================================== */
.cg-main { max-width: var(--measure); padding-top: 2.25rem; padding-bottom: 4rem; }
.cg-step:focus { outline: none; }
.cg-lede {
  font-size: 1.16rem; line-height: 1.6; color: var(--ink-soft);
  margin-bottom: 1.75rem;
}
.cg-plainlist li { margin-bottom: .45rem; max-width: none; }

/* ===== Progress ====================================================== */
.cg-progress { margin-bottom: 2rem; }
.cg-progress-bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.cg-progress-fill { height: 100%; background: var(--blue); width: 0; transition: width .3s ease; }
.cg-progress-label { font-size: .88rem; color: var(--ink-faint); margin: .5rem 0 0; }

/* ===== Blocks and tiles ============================================== */
.cg-block { margin: 0 0 1.75rem; padding: 0; border: 0; }
.cg-blocktitle {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.05rem; font-weight: 700; color: var(--ink);
  padding: 0 0 .55rem; margin: 0 0 .85rem;
  border-bottom: 1px solid var(--rule); width: 100%;
}

.cg-tiles { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; }

.cg-tile {
  position: relative; display: block; cursor: pointer;
  background: var(--page); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .85rem .95rem .85rem 2.6rem;
  box-shadow: var(--shadow);
  transition: border-color .12s ease, background .12s ease;
}
.cg-tile:hover { border-color: var(--blue); background: var(--surface); }

/* A real checkbox, restyled but never removed from the accessibility tree. */
.cg-tile-input {
  position: absolute; left: .9rem; top: 1rem;
  width: 1.15rem; height: 1.15rem; margin: 0; cursor: pointer;
  accent-color: var(--blue);
}
.cg-tile-input:focus-visible + .cg-tile-body { outline: 3px solid var(--blue); outline-offset: 4px; }
.cg-tile:has(.cg-tile-input:checked) {
  border-color: var(--blue); background: var(--blue-wash); box-shadow: none;
}
.cg-tile-body { display: block; }
.cg-tile-label { display: block; font-weight: 600; line-height: 1.35; }
.cg-tile-hint {
  display: block; font-size: .88rem; color: var(--ink-faint);
  line-height: 1.45; margin-top: .2rem;
}

/* ===== Cards ========================================================= */
.cg-group {
  background: var(--page); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
  margin-bottom: 1rem; box-shadow: var(--shadow);
}
.cg-group .usa-legend--large { font-size: 1.08rem; margin-top: 0; font-weight: 700; }
.cg-qualifier { color: var(--ink-soft); font-size: .95rem; margin: .2rem 0 .7rem; }

.cg-details { margin: 0 0 .85rem; }
.cg-details > summary {
  cursor: pointer; color: var(--blue); font-size: .93rem; padding: .35rem 0;
}
.cg-details > summary:hover { color: var(--blue-dark); }
.cg-locations {
  margin: .5rem 0 0; padding-left: 1.15rem;
  color: var(--ink-soft); font-size: .93rem; line-height: 1.55;
}
.cg-locations li { margin-bottom: .15rem; overflow-wrap: anywhere; }
.cg-source { margin: .5rem 0 0; font-size: .92rem; }

.cg-hintline {
  display: block; font-weight: 400; font-size: .89rem;
  color: var(--ink-faint); line-height: 1.45; margin-top: .15rem;
}

/* ===== Summary / privacy ============================================= */
.cg-privacy {
  background: var(--blue-wash); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0; padding: 1.1rem 1.25rem;
}
.cg-privacy .usa-summary-box__heading { font-size: 1.08rem; }
.cg-privacy p:last-child { margin-bottom: 0; }

/* ===== Review ======================================================== */
.cg-review-name { font-size: 1.22rem; font-weight: 600; }
.cg-table { width: 100%; margin-top: .5rem; }
.cg-table th {
  font-size: .88rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink-faint); font-weight: 700;
}
.cg-badge {
  display: inline-block; background: var(--blue-wash); color: var(--blue-dark);
  border: 1px solid var(--blue-line); border-radius: 3px;
  font-size: .74rem; font-weight: 700; padding: .1rem .4rem;
  text-transform: uppercase; letter-spacing: .03em;
}

/* ===== Exam notes ==================================================== */
.cg-note {
  background: var(--page); border: 1px solid var(--rule);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem; margin-bottom: .85rem; box-shadow: var(--shadow);
}
.cg-note h3 { margin-bottom: .15rem; }
.cg-note p { margin: .55rem 0; }
.cg-dc { margin-top: 0 !important; font-size: .87rem; }

/* ===== Submit options ================================================ */
.cg-submit {
  background: var(--page); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
  margin-bottom: .85rem; box-shadow: var(--shadow);
}
.cg-submit h4 { margin: 0 0 .4rem; font-size: 1.05rem; }
.cg-submit p { margin-top: 0; overflow-wrap: anywhere; }
.cg-submit .usa-button { margin: .4rem 0 0; }
.cg-address {
  font-style: normal; font-weight: 600; line-height: 1.55;
  background: var(--surface); border-left: 4px solid var(--blue);
  border-radius: 0 4px 4px 0;
  padding: .8rem 1rem; margin: .5rem 0 .75rem; overflow-wrap: anywhere;
}
#after-download { margin-top: 2.5rem; }
#catalog { margin-bottom: 1.5rem; }

/* ===== Nav =========================================================== */
.cg-nav {
  display: flex; gap: .75rem; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--rule);
}

/* ===== Help + footer ================================================= */
.cg-help {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.5rem; margin-top: 3.5rem;
}
.cg-help h2 { margin-top: 0; }
.cg-footer {
  background: var(--surface); border-top: 3px solid var(--blue-dark);
  padding: 2rem 0; margin-top: 3rem;
  font-size: .92rem; color: var(--ink-faint);
}
.cg-footer p { max-width: var(--measure); overflow-wrap: anywhere; }

/* ===== USWDS overrides =============================================== */
.usa-button {
  background-color: var(--blue); border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; font-weight: 700;
}
.usa-button:hover { background-color: var(--blue-dark); }
.usa-button--outline {
  background-color: transparent; color: var(--blue-dark);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.usa-button--outline:hover {
  background-color: transparent; color: var(--blue-dark);
  box-shadow: inset 0 0 0 2px var(--blue-dark);
}
.usa-button:disabled, .usa-button[disabled] { background-color: #c9c9c9; box-shadow: none; }

.usa-input, .usa-textarea, .usa-select {
  max-width: 100%; border-radius: 4px;
  font-size: max(1rem, 16px);
}
.usa-label { font-weight: 600; }
.usa-hint { font-size: .9rem; }

.usa-checkbox__label, .usa-radio__label { min-height: 44px; padding-top: .5rem; }
.usa-accordion__button { font-size: 1.02rem; font-weight: 600; }
.usa-link { color: var(--blue); }
.usa-link:hover { color: var(--blue-dark); }
.cg-plainlist a, .cg-source a { display: inline-block; padding: .3rem 0; }

/* ===== Responsive ==================================================== */
@media (max-width: 48rem) { .cg-main { max-width: 100%; } }

@media (max-width: 40rem) {
  h1 { font-size: 1.62rem; }
  h2 { font-size: 1.22rem; margin-top: 2rem; }
  .cg-lede { font-size: 1.06rem; }
  .cg-tagline { font-size: .76rem; }
  .cg-headerinner { flex-direction: column; align-items: flex-start; gap: .5rem; }

  /* Two tiles side by side are too cramped to read on a phone. */
  .cg-tiles { grid-template-columns: 1fr; }

  .cg-group, .cg-submit, .cg-note { padding: 1rem; }
  .cg-nav { flex-direction: column-reverse; }
  .cg-nav .usa-button, .usa-button--big { width: 100%; }

  /* The review table has two columns of prose; side by side they squeeze to
     unreadable widths, so stack each row into its own card. */
  .cg-table thead { position: absolute; left: -9999px; }
  .cg-table, .cg-table tbody, .cg-table tr, .cg-table td { display: block; width: 100%; }
  .cg-table tr {
    border: 1px solid var(--rule); border-radius: var(--radius);
    background: var(--page); padding: .8rem; margin-bottom: .7rem;
  }
  .cg-table td { border: 0; padding: .15rem 0; }
  .cg-table td:first-child { font-weight: 700; font-size: 1.04rem; }
}

@media (max-width: 24rem) {
  h1 { font-size: 1.42rem; }
  .cg-main { padding-left: .85rem; padding-right: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .cg-progress-fill { background: Highlight; }
  .cg-tile, .cg-group, .cg-submit, .cg-note { border: 1px solid CanvasText; }
}

@media print {
  .cg-nav, .cg-progress, .cg-headerlink, #download-btn, #catalog { display: none; }
  body { background: #fff; font-size: 11pt; }
  .cg-group, .cg-submit, .cg-note { break-inside: avoid; box-shadow: none; }
}

/* ===== Rating estimate =============================================== */
.cg-estlabel {
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700; font-size: 1.02rem; margin: 0 0 .6rem;
}
.cg-estimate {
  background: var(--blue-wash); border: 1px solid var(--blue-line);
  border-radius: var(--radius); padding: 1.4rem 1.25rem; text-align: center;
  margin-top: 1rem;
}
.cg-estimate-rating {
  font-family: "Merriweather", Georgia, serif;
  font-size: 3.1rem; font-weight: 700; line-height: 1;
  color: var(--blue-dark); margin: 0;
}
.cg-estimate-sub {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); margin: .3rem 0 .9rem;
}
.cg-estimate-pay {
  font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 0 0 .8rem;
}
.cg-estimate-note { margin: 0; text-align: left; }
