/* Checker-only overrides. Typography/layout come from /assets/main.css
   which is the main dotpublic.org stylesheet. Only rules for widgets
   that don't exist on the main site live here. */

/* Sub-nav inside the page-content column. */
.checker-subnav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-grey);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}
.checker-subnav a {
  color: var(--mid-grey);
  text-decoration: none;
  font-weight: 500;
}
.checker-subnav a:hover, .checker-subnav a:focus { color: var(--cerulean); }

/* Narrower text column is fine for prose, but tables of results need room. */
.page-content table { max-width: none; }

/* Forms */
.page-content label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--deep-blue);
}
.page-content input[type=url], .page-content input[type=text] {
  width: 100%;
  max-width: 36rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--light-grey);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.page-content input[type=url]:focus, .page-content input[type=text]:focus {
  outline: none;
  border-color: var(--cerulean);
  box-shadow: 0 0 0 3px rgba(43, 112, 211, 0.18);
}
.page-content button, .page-content .cta {
  display: inline-block;
  background: var(--deep-blue);
  color: #fff;
  border: 1px solid var(--deep-blue);
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.page-content button:hover, .page-content button:focus,
.page-content .cta:hover, .page-content .cta:focus {
  background: var(--cerulean); border-color: var(--cerulean); color: #fff;
  text-decoration: none;
}

/* Tables inside the page-content. */
.page-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 2rem;
  background: #fff;
  border: 1px solid var(--light-grey);
  border-radius: 6px;
  overflow: hidden;
}
.page-content caption { text-align: left; padding: 0.5rem 0; color: var(--mid-grey); font-size: 0.9rem; }
.page-content th, .page-content td {
  text-align: left; padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--light-grey);
  vertical-align: top;
}
.page-content th {
  background: var(--dove-wing);
  color: var(--deep-blue);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.page-content tr:last-child th, .page-content tr:last-child td { border-bottom: none; }

/* Check result rows. Passes are a single compact line; fails/skips
   open up vertically to show details. */
.check {
  background: #fff;
  border: 1px solid var(--light-grey);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  margin: 0.3rem 0;
}
.check.bad, .check.muted { padding: 0.75rem 0.9rem; margin: 0.6rem 0; }
.check.ok { border-left-color: var(--cerulean); background: #FBFCFD; }
.check.bad { border-left-color: var(--amber); }
.check.muted { border-left-color: var(--mid-grey); }

.check-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.check-head strong { font-weight: 500; color: var(--charcoal); }
.check.bad .check-head strong, .check.muted .check-head strong { font-weight: 600; }

.check ul, .check p { margin-top: 0.4rem; margin-bottom: 0; }
.check code {
  font-size: 0.85em;
  color: var(--mid-grey);
  background: var(--dove-wing);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}

.pill {
  display: inline-block;
  min-width: 2.5rem;
  text-align: center;
  padding: 0.05rem 0.45rem;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.7em;
  background: var(--light-grey);
  color: var(--charcoal);
  letter-spacing: 0.04em;
}
.check.ok .pill { background: #DBEAFE; color: var(--dot-blue); }
.check.bad .pill { background: #FDE7DB; color: #9C3A00; }

.check ul.plain { margin: 0.5rem 0 0 1.2rem; font-size: 0.95rem; }
.check ul.plain li { margin: 0.25rem 0; }

.site-list { margin: 0.5rem 0 1.5rem 1.2rem; }
.site-list li { margin: 0.15rem 0; }

/* Sortable column headers. Anchors inherit the th text colour so they
   stay legible whatever the host site's th palette is. The active column
   is marked with a bottom rule (a background change loses the cascade to
   the main site's th background). */
th.sort-col a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
th.sort-col a:hover, th.sort-col a:focus { text-decoration: underline; }
.page-content th.sort-active {
  box-shadow: inset 0 -3px 0 var(--cerulean);
}
.page-content th.sort-active a { font-weight: 800; }

/* Secondary description line under a check name in the /checks table. */
.check-desc {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--mid-grey);
  max-width: 38rem;
}

/* Right-align numeric columns with tabular figures so values scan. */
.page-content th.num, .page-content td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.rubric { list-style: none; padding-left: 0; margin: 0.5rem 0; }
.rubric li {
  padding: 0.45rem 0.65rem;
  border-left: 3px solid var(--light-grey);
  margin: 0.4rem 0;
  background: var(--off-white);
}
.rubric li.pass { border-left-color: var(--cerulean); }
.rubric li.fail { border-left-color: var(--amber); }

.fix {
  margin-top: 0.4rem;
  font-size: 0.95em;
  background: #FFF4E6;
  border-left: 3px solid var(--amber);
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
}

.evidence {
  background: var(--dove-wing);
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.85em;
  border-radius: 4px;
}

.status {
  padding: 0.6rem 0.85rem;
  background: var(--dove-wing);
  border-left: 3px solid var(--cerulean);
  border-radius: 3px;
  margin: 1rem 0;
}
.status.error { background: #FDE7DB; border-left-color: var(--amber); }
.running { color: var(--mid-grey); font-style: italic; margin: 0.5rem 0; }
.summary { font-size: 1.1em; }
.muted { color: var(--mid-grey); }
