/*
 * Eligibility check (inc/check.php, assets/js/check.js), 0.9.0.
 * A white card with a brick top edge, set on the petrol hero (home) or in the closing band (other pages).
 * Rules are doubled (.agk-check.agk-check) where the hero/band text rules (white headings, large
 * paragraphs, white links) would otherwise reach inside the card.
 */

/* ---------------------------------------------------------------- placement ---- */

.agk-hero.agk-hero--check {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: start; /* the card grows at the result step; the hero text stays where it is */
}
.agk-hero.agk-hero--check > * { margin-block: 0; }
.agk-hero__main > * + * { margin-block-start: 1.1em; }
.agk-hero__main > .wp-block-buttons { margin-block-start: 32px; }

.agk-final--check .final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.agk-final__talk { margin: 0 0 28px; color: var(--on-dark-muted); font-size: 16px; }
.agk-final .agk-final__talk a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 0.18em; font-weight: 500; }

@media (max-width: 980px) {
  .agk-hero.agk-hero--check { display: flex; flex-direction: column; align-items: stretch; }
  .agk-hero__main { display: contents; }
  .agk-hero--check .agk-check--hero { order: 1; margin-block-start: 28px; }
  .agk-hero--check .agk-hero__main > .wp-block-buttons { order: 2; margin-block-start: 28px; }
  .agk-final--check .final-cta { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------- card ---- */

.agk-check {
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding: 28px 30px 24px;
  border-top: 4px solid var(--brick);
  box-shadow: 0 30px 60px -24px rgba(0, 20, 35, 0.55);
  text-align: left;
  font-size: 15.5px;
  line-height: 1.5;
}
@media (max-width: 640px) { .agk-check { padding: 22px 18px 18px; } }

.agk-check.agk-check p { margin: 0; max-width: none; font-size: inherit; line-height: inherit; color: inherit; }
.agk-check.agk-check a:not(.btn) { color: var(--blue); text-decoration: underline; text-underline-offset: 0.15em; }

.agk-check.agk-check .agk-check__kicker {
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brick-ink); margin-bottom: 6px;
}
.agk-check.agk-check .agk-check__title {
  color: var(--navy); font-size: clamp(22px, 2vw, 26px); line-height: 1.25; font-weight: 500; margin: 0 0 18px; max-width: none; letter-spacing: 0;
}

.agk-check__form { margin: 0; }
.agk-check__progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-muted); margin-bottom: 16px; }
.agk-check__progress[hidden] { display: none; }
.agk-check__bar { flex: 1; height: 4px; background: var(--tint); }
.agk-check__bar i { display: block; height: 100%; width: 0; background: var(--navy); transition: width 0.3s var(--ease); }

.agk-check__step { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.agk-check__step[hidden] { display: none; }
.agk-check__q { padding: 0; margin: 0 0 12px; font-size: 17px; font-weight: 500; color: var(--ink); outline: none; }
.agk-check__opts { display: grid; gap: 8px; }
.agk-check__opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px;
  border: 1px solid var(--agk-line-strong); background: var(--white); cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.agk-check__opt:hover { border-color: var(--navy); background: var(--surface); }
.agk-check__opt input {
  appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid #8aa3b5; border-radius: 50%; background: var(--white);
}
.agk-check__opt input:checked { border: 5px solid var(--navy); }
.agk-check__opt:has(input:checked) { border-color: var(--navy); background: var(--surface); }
.agk-check__opt input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.agk-check__opt-text { color: var(--ink); }
.agk-check__opt-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-muted); }

.agk-check__nav { display: flex; gap: 12px; align-items: center; margin: -4px 0 12px; }
.agk-check__nav[hidden] { display: none; }
.agk-check__nav button {
  font: inherit; font-size: 14px; cursor: pointer; padding: 8px 0; background: none; border: 0; color: var(--ink-muted);
}
.agk-check__nav .agk-check__back::before { content: "← "; }
.agk-check__nav .agk-check__next { margin-left: auto; padding: 9px 16px; background: var(--navy); color: var(--on-dark); }
.agk-check__nav button[hidden] { display: none; }
.agk-check__nav button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.agk-check.agk-check .agk-check__foot { font-size: 12.5px; color: var(--ink-muted); }
.agk-check__foot[hidden] { display: none; }

/* ------------------------------------------------------------------- result ---- */

.agk-check__result { outline: none; }
.agk-check__result[hidden] { display: none; }
.agk-check.agk-check .agk-check__route-k { font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.agk-check.agk-check .agk-check__route { font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--navy); margin-bottom: 12px; }
.agk-check__lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14.5px; line-height: 1.45; }
.agk-check__lines li { position: relative; margin: 0; padding: 8px 0 8px 26px; border-top: 1px solid var(--agk-line); }
.agk-check__lines li::before { position: absolute; left: 2px; top: 8px; font-weight: 700; }
.agk-check__lines .is-ok::before { content: "✓"; color: #1d7a4a; }
.agk-check__lines .is-warn::before { content: "!"; left: 7px; color: var(--brick-ink); }
.agk-check__lines .is-note::before { content: "→"; color: var(--ink-muted); font-weight: 400; }
.agk-check.agk-check .agk-check__read { font-size: 14px; margin-bottom: 6px; }
.agk-check.agk-check .agk-check__decision { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 14px; }

/* ------------------------------------------------------------------ request ---- */

.agk-check__contact { background: var(--surface); padding: 16px; display: grid; gap: 10px; }
.agk-check.is-js .agk-check__contact:not(.is-on) { display: none; }
.agk-check.agk-check .agk-check__review { font-size: 15px; font-weight: 500; color: var(--ink); }
.agk-check__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agk-check__field--wide { grid-column: 1 / -1; }
.agk-check__field span { display: block; font-size: 12.5px; color: var(--ink-muted); margin-bottom: 3px; }
.agk-check__field input {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--white); border: 1px solid var(--agk-line-strong); border-radius: 0;
}
.agk-check__field input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.agk-check__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink-soft); cursor: pointer; }
.agk-check__consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); }
.agk-check__send {
  min-height: 52px; padding: 13px 18px; border: 0; cursor: pointer; font: inherit; font-weight: 500; font-size: 15.5px;
  color: var(--on-dark); background: var(--brick); transition: background-color 0.15s var(--ease);
}
.agk-check__send:hover { background: #9e2e20; }
.agk-check__send:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.agk-check.agk-check .agk-check__note { font-size: 12.5px; color: var(--ink-muted); }
@media (max-width: 640px) { .agk-check__fields { grid-template-columns: 1fr; } }

.agk-check.agk-check .agk-check__notice { padding: 14px 16px; font-weight: 500; margin-bottom: 14px; }
.agk-check.agk-check .agk-check__notice--ok { background: var(--tint); color: var(--navy); }
.agk-check.agk-check .agk-check__notice--error { background: #fbe9e6; color: var(--brick-ink); }

@media (prefers-reduced-motion: reduce) {
  .agk-check__bar i, .agk-check__opt, .agk-check__send { transition: none; }
}
