/* DCC readiness check, styled to the Baigent's brand guide.
   Scoped to .dcc-check so it does not affect the rest of the site.
   Brand: orange #ff6600, dark grey #5a5a5a, dark blue #252a34, Helvetica.
   Themed for the site's dark skin (background #252a34, text #eaeaea) so it blends into the page. */
.dcc-check {
  --b-orange: #FF6600;
  --b-orange-soft: rgba(255, 102, 0, 0.12);
  --b-grey: #5A5A5A;
  --b-blue: #252A34;
  --b-white: #FFFFFF;
  --b-text: #EAEAEA;      /* site body text */
  --b-muted: #A9ADB5;     /* secondary text */
  --b-surface: #2C313C;   /* cards, slightly lifted from the page */
  --b-deep: #1C2028;      /* result panel, slightly sunk below the page */
  --b-line: #454B57;
  --b-tint: #1F232B;
  --b-ok: #6FD39A;   --b-ok-bg: rgba(91, 196, 138, 0.16);
  --b-warn: #F2B544; --b-warn-bg: rgba(242, 181, 68, 0.15);
  --b-bad: #F28B82;  --b-bad-bg: rgba(242, 107, 94, 0.16);
  --b-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--b-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--b-text);
  margin: 1.5em 0 2em;
}
.dcc-check *, .dcc-check *::before, .dcc-check *::after { box-sizing: border-box; }
.dcc-check p { margin: 0; }
.dcc-check ul, .dcc-check ol { margin: 0; padding: 0; list-style: none; }
.dcc-check h3 { font-family: var(--b-font); font-weight: 700; font-size: 1.15rem; line-height: 1.25; margin: 0; color: var(--b-white); }
.dcc-check code { font-family: var(--b-font); background: none; padding: 0; }
.dcc-check h2, .dcc-check h3 { border-bottom: 0; padding-bottom: 0; } /* override theme heading rules */
.dcc-check :focus-visible { outline: 3px solid var(--b-orange); outline-offset: 2px; border-radius: 4px; }

/* Buttons */
.dcc-check .btn {
  display: inline-block; font: inherit; font-size: 0.95rem; font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 6px; padding: 10px 18px; border: 2px solid var(--b-blue);
  background: transparent; color: var(--b-text); border-color: var(--b-muted); transition: background .12s, border-color .12s;
}
.dcc-check .btn:hover { border-color: var(--b-orange); }
.dcc-check .btn.primary { background: var(--b-orange); border-color: var(--b-orange); color: var(--b-blue); }
.dcc-check .btn.primary:hover { background: var(--b-white); border-color: var(--b-white); }

/* Notice */
.dcc-check .notice {
  max-width: 72ch; margin-bottom: 24px; padding: 14px 18px; font-size: 0.97rem;
  background: var(--b-orange-soft); border: 1px solid rgba(255, 102, 0, 0.45); border-radius: 8px; color: var(--b-text);
}
.dcc-check .notice strong { color: var(--b-white); }

/* Layout: questions, then results underneath (fits a normal content column) */
.dcc-check .check-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.dcc-check .rail { display: grid; gap: 16px; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.dcc-check .rail .result { grid-column: 1 / -1; }

/* Question sections */
.dcc-check .q-section { display: grid; gap: 12px; }
.dcc-check .q-section + .q-section { margin-top: 32px; }
.dcc-check .q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.dcc-check .q-head .code {
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.03em;
  color: var(--b-blue); background: var(--b-orange); padding: 3px 9px; border-radius: 4px;
}
.dcc-check .q-head h3 { font-size: 1.3rem; }
.dcc-check .q-head .pill { margin-left: auto; }
.dcc-check .q-intro { max-width: 64ch; }

/* Question cards */
.dcc-check .check {
  background: var(--b-surface); border: 1px solid var(--b-line); border-radius: 8px;
  padding: 16px 18px; margin: 0; display: grid; gap: 12px; min-width: 0;
}
.dcc-check .check legend { display: contents; }
.dcc-check .q-top { display: flex; gap: 12px; align-items: flex-start; }
.dcc-check .qid { font-size: 12px; font-weight: 700; color: var(--b-muted); white-space: nowrap; padding-top: 3px; flex: 0 0 84px; font-variant-numeric: tabular-nums; }
.dcc-check .qid span { display: block; font-size: 11px; font-weight: 400; }
.dcc-check .qtext { font-weight: 700; color: var(--b-white); min-width: 0; }

.dcc-check .hint { margin-left: 96px; font-size: 0.94rem; }
.dcc-check .hint summary { cursor: pointer; color: var(--b-text); font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.dcc-check .hint summary::-webkit-details-marker { display: none; }
.dcc-check .hint summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid var(--b-orange); border-bottom: 2px solid var(--b-orange);
  transform: rotate(-45deg); transition: transform .15s ease;
}
.dcc-check .hint[open] summary::before { transform: rotate(45deg); }
.dcc-check .hint summary:hover { text-decoration: underline; text-decoration-color: var(--b-orange); text-underline-offset: 3px; }
.dcc-check .hint p { margin-top: 8px; max-width: 62ch; padding: 10px 14px; background: var(--b-tint); border-radius: 6px; }

/* Answer options */
.dcc-check .opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-left: 96px; }
@media (max-width: 560px) {
  .dcc-check .hint, .dcc-check .opts { margin-left: 0; }
  .dcc-check .opts { grid-template-columns: minmax(0, 1fr); }
  .dcc-check .q-top { flex-direction: column; gap: 4px; }
  .dcc-check .qid { flex: none; }
  .dcc-check .qid span { display: inline; margin-left: 6px; }
}
.dcc-check .opt { position: relative; }
.dcc-check .opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dcc-check .opt label {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--b-line); border-radius: 6px;
  padding: 9px 12px; cursor: pointer; font-size: 0.94rem; line-height: 1.25; background: var(--b-tint); color: var(--b-text); margin: 0; font-weight: 400;
  transition: border-color .12s, background .12s;
}
.dcc-check .opt label::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--b-muted); background: transparent;
}
.dcc-check .opt label:hover { border-color: var(--b-orange); }
.dcc-check .opt input:focus-visible + label { outline: 3px solid var(--b-orange); outline-offset: 2px; }
.dcc-check .opt input:checked + label { font-weight: 700; }
.dcc-check .opt.v2 input:checked + label { border-color: var(--b-ok); background: var(--b-ok-bg); color: var(--b-ok); }
.dcc-check .opt.v2 input:checked + label::before { border-color: var(--b-ok); background: var(--b-ok); box-shadow: inset 0 0 0 2px var(--b-tint); }
.dcc-check .opt.v1 input:checked + label { border-color: var(--b-warn); background: var(--b-warn-bg); color: var(--b-warn); }
.dcc-check .opt.v1 input:checked + label::before { border-color: var(--b-warn); background: var(--b-warn); box-shadow: inset 0 0 0 2px var(--b-tint); }
.dcc-check .opt.v0 input:checked + label { border-color: var(--b-bad); background: var(--b-bad-bg); color: var(--b-bad); }
.dcc-check .opt.v0 input:checked + label::before { border-color: var(--b-bad); background: var(--b-bad); box-shadow: inset 0 0 0 2px var(--b-tint); }

/* Status pills */
.dcc-check .pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  color: var(--b-muted); background: rgba(255, 255, 255, 0.08);
}
.dcc-check .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dcc-check .pill.ready { color: var(--b-ok); background: var(--b-ok-bg); }
.dcc-check .pill.partly, .dcc-check .pill.progress { color: var(--b-warn); background: var(--b-warn-bg); }
.dcc-check .pill.gap { color: var(--b-bad); background: var(--b-bad-bg); }

/* Cards */
.dcc-check .card { background: var(--b-surface); border: 1px solid var(--b-line); border-radius: 8px; padding: 22px; }

/* Result: the branded centrepiece, dark blue with an orange progress bar */
.dcc-check .result { background: var(--b-deep); border-color: var(--b-line); border-top: 3px solid var(--b-orange); color: var(--b-white); }
.dcc-check .result .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--b-orange); }
.dcc-check .verdict { font-weight: 700; font-size: 1.8rem; line-height: 1.1; margin: 8px 0; color: var(--b-white); text-wrap: balance; }
.dcc-check .verdict-sub { color: #D6D8DC; font-size: 0.95rem; max-width: 60ch; }
.dcc-check .result.gap .verdict::after,
.dcc-check .result.partly .verdict::after,
.dcc-check .result.ready .verdict::after {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 12px; vertical-align: middle;
}
.dcc-check .result.gap .verdict::after { background: #F26B5E; }
.dcc-check .result.partly .verdict::after { background: #F2B544; }
.dcc-check .result.ready .verdict::after { background: #5BC48A; }
.dcc-check .bar { height: 8px; padding: 0; border: 0; background: #3A404C; border-radius: 99px; overflow: hidden; margin: 16px 0 6px; }
.dcc-check .bar i { display: block; height: 100%; width: 0; background: var(--b-orange); transition: width .25s ease; }
.dcc-check .progress-t { font-size: 0.85rem; color: #D6D8DC; font-variant-numeric: tabular-nums; }
.dcc-check .controls { margin-top: 18px; display: grid; }
.dcc-check .controls li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #3A404C; font-size: 0.95rem; color: var(--b-white); }
.dcc-check .controls li span:first-child { min-width: 0; }
.dcc-check .controls code { font-size: 12px; font-weight: 700; color: var(--b-orange); margin-right: 8px; }

/* Action list */
.dcc-check .actions h3, .dcc-check .cta-card h3 { margin-bottom: 12px; }
.dcc-check .actions ol { display: grid; gap: 14px; }
.dcc-check .actions li { display: grid; gap: 4px; font-size: 0.94rem; padding-left: 12px; border-left: 3px solid var(--b-line); }
.dcc-check .actions li:has(.tag.gap) { border-left-color: var(--b-bad); }
.dcc-check .actions li:has(.tag.partly) { border-left-color: #E0A43A; }
.dcc-check .actions .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.dcc-check .actions .tag.gap { color: var(--b-bad); }
.dcc-check .actions .tag.partly { color: var(--b-warn); }
.dcc-check .actions .tag code { color: var(--b-muted); font-weight: 400; margin-left: 4px; }
.dcc-check .empty { font-size: 0.94rem; }
.dcc-check .tip { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--b-line); font-size: 0.88rem; color: var(--b-muted); }
.dcc-check .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dcc-check .status { font-size: 0.85rem; min-height: 1.3em; margin-top: 8px; }

/* Call to action: card with an orange accent and button */
.dcc-check .cta-card { background: var(--b-surface); border-color: var(--b-line); border-top: 3px solid var(--b-orange); color: var(--b-text); }
.dcc-check .cta-card h3 { color: var(--b-white); }
.dcc-check .cta-card p { margin-bottom: 16px; font-size: 0.95rem; }
.dcc-check .cta-card .btn.primary { background: var(--b-orange); border-color: var(--b-orange); color: var(--b-blue); }
.dcc-check .cta-card .btn.primary:hover { background: var(--b-white); border-color: var(--b-white); }

.dcc-check textarea.copyfallback {
  width: 100%; min-height: 160px; margin-top: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  border: 1px solid var(--b-line); border-radius: 6px; padding: 10px; background: var(--b-tint); color: var(--b-text);
}

@media (prefers-reduced-motion: reduce) {
  .dcc-check * { transition: none !important; }
}
