/* ==========================================================================
   Bradawl · Content Check
   Night ground, amber as light, Newsreader for display and big numbers,
   IBM Plex for text and mono labels. Tokens from the approved night identity.
   ========================================================================== */

/* Self-hosted faces (SIL Open Font License, from the Fontsource OFL packages).
   Nothing is requested from a third party; the files sit beside this page and
   the licences are in the same folder. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --night: #15140F;
  --soot: #1E1A15;
  --raised: #27221B;
  --border: #2E2820;
  --border-soft: #26211A;
  --paper: #F5F2EB;
  --cream: #E9E0CF;
  --taupe: #A8A094;
  --graphite: #8C8882;
  --amber: #C8821A;
  --amber-light: #E2A14A;
  --deep-amber: #9A6212;
  --will-break: #E4584B;
  --resolved: #7FBF7F;

  --serif: "Newsreader";
  --sans: "IBM Plex Sans";
  --mono: "IBM Plex Mono";

  --radius: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --max: 1240px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(200, 130, 26, .32); color: var(--paper); }

a { color: var(--amber-light); }
a:hover { color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--amber-light);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--night);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  border-radius: 4px;
}
.skip:focus { top: 16px; }

/* --------------------------------------------------------------------------
   The light in the room, and the faint grid
   -------------------------------------------------------------------------- */

.glow {
  position: fixed;
  z-index: 0;
  /* The screen's own width, never wider (a 900px box scrolled phones sideways, bradawl-0241); the same 450px light is
     painted at the same centre, 170px left of the middle, so wide screens look as before. */
  top: -520px;
  left: 0;
  right: 0;
  height: 900px;
  background: radial-gradient(circle 450px at calc(50% - 170px) 50%, rgba(200, 130, 26, .20), rgba(200, 130, 26, 0));
  pointer-events: none;
}

.grid-veil {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 242, 235, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 242, 235, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .35) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .35) 70%, transparent);
  pointer-events: none;
}

.topbar, main, .footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Top bar and lock-up
   -------------------------------------------------------------------------- */

.topbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 40px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.mark {
  position: relative;
  display: inline-block;
  width: 72px;
  height: 14px;
  flex: none;
}
.mark .rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 2px;
  background: var(--paper);
}
.mark .point {
  position: absolute;
  left: 28px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px 4px rgba(200, 130, 26, .45);
}

.word {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -.01em;
  color: var(--paper);
}

.topbar-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--graphite);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Page furniture
   -------------------------------------------------------------------------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px 72px;
}

.eyebrow,
.eyebrow-sm {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0;
  color: var(--amber);
}
.eyebrow { font-size: 11.5px; letter-spacing: .15em; }
.eyebrow-sm { font-size: 10.5px; letter-spacing: .14em; }

.intro { padding-top: 58px; }

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--paper);
  margin: 16px 0 14px;
}

.strap {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.3;
  color: var(--paper);
  margin: 0 0 16px;
  max-width: 760px;
}

.works {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--taupe);
  margin: 0 0 22px;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream);
  max-width: 720px;
  margin: 0;
}

   The drop zone
   -------------------------------------------------------------------------- */

.check { margin-top: 34px; }

.drop {
  background: var(--soot);
  border: 1px dashed #3B342A;
  border-radius: var(--radius);
  padding: 24px 26px 22px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.drop.is-dragging {
  border-color: var(--amber);
  background: var(--raised);
  box-shadow: 0 0 0 1px rgba(200, 130, 26, .25), 0 0 34px rgba(200, 130, 26, .12);
}

.drop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.drop-head .num { color: var(--amber-light); margin-right: 4px; }

.file-chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--taupe);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.drop-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  color: var(--paper);
  margin: 16px 0 4px;
}

.drop-hint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--taupe);
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--night);
}
.btn-amber:hover { background: var(--amber-light); border-color: var(--amber-light); }
.btn-amber:disabled {
  background: transparent;
  border-color: #4A4035;
  color: var(--graphite);
  cursor: not-allowed;
}
.btn-quiet {
  background: transparent;
  border-color: #4A4035;
  color: var(--cream);
}
.btn-quiet:hover { background: var(--raised); border-color: var(--graphite); }

.link {
  background: none;
  border: 0;
  padding: 4px 2px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--amber-light);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.link:hover { color: var(--paper); }
.link.small { font-size: 12.5px; }

.error {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--will-break);
}

.drop-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.compact-name {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cream);
  word-break: break-all;
}

.privacy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--graphite);
  margin: 10px 0 0;
}

/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
   The source bar: the work list comes first, so choosing files is one slim row
   -------------------------------------------------------------------------- */

.source-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding: 16px 20px;
  background: var(--soot);
  border: 1px dashed #3B342A;
  border-radius: var(--radius);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.source-bar.is-dragging {
  border-color: var(--amber);
  background: var(--raised);
  box-shadow: 0 0 0 1px rgba(200, 130, 26, .25), 0 0 34px rgba(200, 130, 26, .12);
}
.source-note { margin: 0; font-size: 14px; color: var(--cream); }
.source-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--amber-light);
  margin-right: 10px;
}
.source-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.source-bar .btn { padding: 10px 18px; font-size: 14px; }

.refusals { margin: 14px 0 0; padding: 0; list-style: none; }
.refusals li {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--will-break);
  border-left: 2px solid var(--will-break);
  padding: 2px 0 2px 12px;
  margin: 0 0 8px;
}
.refusals .refused-file { color: var(--cream); }

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */

.results { margin-top: 34px; animation: rise .5s var(--ease) both; }

.course-line { display: flex; align-items: baseline; gap: 8px 18px; flex-wrap: wrap; }
.course-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  color: var(--paper);
  margin: 0;
}
.course-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--taupe);
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  max-width: 760px;
}
.stat {
  background: var(--soot);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 6px;
}
.stat-number {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 72px;
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--paper);
  margin: 0;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat[data-stat="need-a-look"] .stat-number { color: var(--amber-light); }
.stat-caveat { font-size: 12.5px; line-height: 1.45; color: var(--taupe); margin: 12px 0 0; }

.panel {
  background: var(--soot);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  margin-top: 22px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  color: var(--paper);
  margin: 0;
}
.panel-meta { font-family: var(--mono); font-size: 11.5px; color: var(--taupe); }

table.findings, table.summary { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 14px; }
.findings th, .summary th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--taupe);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.findings td, .summary td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  overflow-wrap: break-word;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--cream);
}
.findings tbody tr:last-child td, .summary tbody tr:last-child td { border-bottom: 0; }
.findings.has-course th:nth-child(1), .findings.has-course td:nth-child(1) { width: 17%; }
.findings.has-course th:nth-child(2), .findings.has-course td:nth-child(2) { width: 21%; }
.findings.has-course th:nth-child(3), .findings.has-course td:nth-child(3) { width: 32%; }
.findings.has-course th:nth-child(4), .findings.has-course td:nth-child(4) { width: 16%; }
.findings.has-course th:nth-child(5), .findings.has-course td:nth-child(5) { width: 14%; }
.findings.no-course th:nth-child(1), .findings.no-course td:nth-child(1) { width: 26%; }
.findings.no-course th:nth-child(2), .findings.no-course td:nth-child(2) { width: 42%; }
.findings.no-course th:nth-child(3), .findings.no-course td:nth-child(3) { width: 18%; }
.findings.no-course th:nth-child(4), .findings.no-course td:nth-child(4) { width: 14%; }
.cell-where { font-family: var(--mono); font-size: 12px; line-height: 1.45; color: var(--taupe); }
.cell-course { font-weight: 600; color: var(--paper); font-size: 13px; }
.cell-kind { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--amber-light); }
.cell-owner { font-weight: 600; font-size: 13px; }
.status-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber-light);
  white-space: nowrap;
}
.status-pill .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 7px;
}
.clean-line { font-size: 16px; color: var(--cream); margin: 18px 0 4px; }
.caption { font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--graphite); margin: 14px 0 0; }

.download-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.download-note { font-family: var(--mono); font-size: 10.5px; color: var(--graphite); }

.summary-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.summary-grid .panel { margin-top: 22px; }
.summary-stack .panel + .panel { margin-top: 16px; }
.summary .num { text-align: right; font-variant-numeric: tabular-nums; }
.summary th.num { text-align: right; }
.summary-grid h2, .notes h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--paper);
  margin: 0;
}

.notes { margin-top: 22px; }
.notes ul { list-style: none; margin: 12px 0 0; padding: 0; }
.notes li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--taupe);
}
.notes li strong { display: block; color: var(--cream); font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.notes-foot { font-family: var(--mono); font-size: 10.5px; color: var(--graphite); margin: 10px 0 0; }

.ask {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.35;
  color: var(--paper);
  margin: 38px 0 0;
}
.ask a { color: var(--amber-light); text-decoration: underline; text-underline-offset: 4px; }
.ask a:hover { color: var(--paper); }

.foot-cards { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 48px; }
.foot-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.foot-card p:not(.eyebrow-sm) { font-size: 13px; line-height: 1.65; color: var(--taupe); margin: 10px 0 0; }
.signature-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  color: var(--paper) !important;
  margin: 8px 0 2px !important;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .summary-grid, .foot-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .topbar { padding: 20px 20px 4px; }
  main { padding: 0 20px 56px; }
  .intro { padding-top: 40px; }
  h1 { font-size: 44px; }
  .strap { font-size: 20px; }
  .stats { gap: 10px; }
  .stat { padding: 14px 14px 12px; }
  .stat-number { font-size: 52px; }
  .course-title { font-size: 25px; }
  .findings thead { display: none; }
  .findings, .findings tbody, .findings tr, .findings td { display: block; width: 100% !important; }
  .findings tbody tr { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
  .findings td { border: 0; padding: 4px 0; }
  .findings td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--graphite);
  }
  .ask { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
}
