/* Jokker. The base is the Navyline theme of the Coneworks homepage (coneworks/navyline,
   assets/css/main.css): navy ink on white, Inter and Inter Tight, headings with an accent
   rule, thin row rules. Below it, the parts a review tool needs: dense tables, chips, diffs,
   law text and a review panel. */

:root {
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Inter Tight", "Inter", sans-serif;
  --ink: #003060;
  --ink-deep: #00172d;
  --accent: #003060;
  --accent-deep: #00172d;
  --muted: #6c757d;
  --rule: #e5e7eb;
  --surface: #f1f3f4;
  --bg: #ffffff;
  --good: #1f6f43;
  --good-bg: #e6f2ea;
  --bad: #a12a2a;
  --bad-bg: #f8e7e7;
  --warn: #8a5a00;
  --warn-bg: #fbf0d9;
  --mark: #fff0a8;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body > main { flex: 1 0 auto; }
body > header, body > footer { flex-shrink: 0; }

.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); text-decoration-thickness: 2px; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 2rem 0 .75rem;
  letter-spacing: -0.01em;
}
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
h2, h3 {
  display: inline-block;
  padding-bottom: .15rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
h2 { margin-top: 0; }
section > h3 { margin-top: 1.75rem; }

/* Header and footer, as on the homepage */
.site-header { padding-top: 1rem; padding-bottom: 1.75rem; }
.masthead { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-start; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand svg { height: 44px; width: auto; display: block; }
.brand-text { font-family: var(--font-heading); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1.1; }
.masthead-aside { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.masthead-top { font-size: .9rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .9rem; }
button.link { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem 1.25rem; }
.site-nav a { text-decoration: none; text-transform: uppercase; font-size: .85rem; letter-spacing: .02em; }
.site-nav a:hover, .site-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
@media (max-width: 700px) {
  .masthead { flex-direction: column; align-items: center; }
  .masthead-aside { align-items: center; }
}
main { padding-bottom: 3rem; }
.site-footer { padding: 0 0 2rem; font-size: .875rem; color: var(--muted); }
.footer-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; border-top: 1px solid var(--rule); padding-top: 1rem; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1fr auto; gap: 2rem; }
  .footer-right { text-align: right; }
}

.btn {
  display: inline-block; cursor: pointer;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 4px;
  text-decoration: none; text-transform: uppercase; letter-spacing: .04em;
  font: inherit; font-size: .8rem; padding: .45rem 1rem;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-sm { font-size: .7rem; padding: .3rem .7rem; }

/* Text */
.lede { max-width: 75ch; margin-top: 0; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .15rem; }
.eyebrow + h2 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.empty { padding: 2rem 0; color: var(--muted); }
.crumbs { font-size: .875rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs a { color: var(--muted); }
code { background: var(--surface); padding: .1em .3em; border-radius: 3px; font-size: .9em; }
details summary { cursor: pointer; color: var(--ink); margin: .75rem 0 .25rem; }

/* Chips */
.chip {
  display: inline-block; font-size: .72rem; line-height: 1.5; padding: 0 .5rem;
  border-radius: 999px; border: 1px solid var(--rule); background: var(--surface);
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; color: var(--ink);
}
.chip-confirmed, .chip-run-done, .chip-outcome-analysed, .chip-purpose-intended, .chip-challenge-challenged { background: var(--good-bg); border-color: transparent; color: var(--good); }
.chip-rejected, .chip-kills, .chip-run-failed, .chip-outcome-failed, .chip-challenge-failed { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.chip-unclear, .chip-weakens, .chip-unverifiable, .chip-unseen, .chip-purpose-against, .chip-challenge-requested, .chip-run-running, .chip-run-incomplete { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.chip-open, .chip-outcome-pending, .chip-challenge-unchallenged { background: transparent; border-color: var(--ink); }
.marks { margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.warn { background: var(--warn-bg); color: var(--ink); border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; }
.warn p, .warn ul { margin: .2rem 0; }
.chip-fails, .chip-intended, .chip-outcome-screened { background: var(--surface); }
.chip-fake, .chip-untranslated { background: transparent; border-style: dashed; color: var(--muted); }

/* Filters and lists */
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; margin: 1rem 0 1.25rem; font-size: .875rem; }
.filters label { display: flex; flex-direction: column; gap: .2rem; color: var(--muted); }
.filters label.check { flex-direction: row; align-items: center; gap: .4rem; }
select, textarea, input[type="text"], input[type="email"], input[type="password"] { font: inherit; color: var(--ink); border: 1px solid #c9ced3; border-radius: 4px; padding: .3rem .5rem; background: #fff; }
textarea { width: 100%; resize: vertical; }

/* Logging in, and the account pages */
.narrow { max-width: 26rem; }
.stack { display: flex; flex-direction: column; gap: .35rem; }
.stack label { font-size: .875rem; color: var(--muted); margin-top: .5rem; }
.stack .btn { margin-top: 1rem; align-self: flex-start; }
.aside-form { margin-top: 1.5rem; font-size: .875rem; }
.note { background: var(--good-bg); border-radius: 6px; padding: .6rem .8rem; }
.account-page section { max-width: 60rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; margin: .75rem 0; }
.inline-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .875rem; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.link-url { display: block; padding: .5rem .7rem; overflow-wrap: anywhere; user-select: all; }
.chip-account-active { background: var(--good-bg); }
.chip-account-disabled { background: var(--surface); color: var(--muted); }
.qr svg { display: block; background: #fff; border: 1px solid var(--rule); border-radius: 4px; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: .4rem 1.5rem; }
.codes code { font-size: 1rem; letter-spacing: .05em; }

table.list { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.list th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--rule); padding: .4rem .5rem; }
table.list td { border-bottom: 1px solid var(--rule); padding: .55rem .5rem; vertical-align: top; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list th.num { text-align: right; }
.finding-cell .title { font-family: var(--font-heading); font-weight: 600; text-decoration: none; }
.finding-cell .title:hover { text-decoration: underline; }
.finding-cell .gain { color: var(--ink-deep); font-size: .85rem; margin-top: .15rem; max-width: 70ch; }
.act { font-weight: 600; }
.scores-mini { letter-spacing: .15em; }

/* Finding */
.finding-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1000px) {
  .finding-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; }
  .finding-aside { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow-y: auto; }
}
.finding-main { min-width: 0; }
.steps { padding-left: 1.25rem; }
.steps > li { margin-bottom: 1rem; }
.steps > li::marker { color: var(--accent); font-weight: 600; }
.steps p { margin: 0 0 .4rem; }
.quote {
  margin: .4rem 0; padding: .3rem 0 .3rem .9rem;
  border-left: 3px solid var(--accent); color: var(--ink-deep); font-size: .92rem;
}
.quote .where { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.dropped { font-size: .8rem; color: var(--bad); margin: .3rem 0; }
.step-attacked { margin: .3rem 0; }
.after-challenge { border-left: 3px solid var(--warn); padding-left: .9rem; }
.rebuttals { list-style: none; padding: 0; }
.rebuttals > li { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.delta { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .9rem; margin: 0; }
.delta dt { color: var(--muted); }
.delta dd { margin: 0; }
/* Picking confirmed findings for a client document */
.export-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .5rem 0 1.5rem; }
.export-one { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 1rem; }
/* A run's changes, each with what it does and what came of it */
.digest-group { border: 1px solid var(--rule); border-radius: 6px; background: #fff; padding: .25rem 1rem .75rem; margin: 0 0 1rem; }
.digest-together { margin: .6rem 0 0; }
.digest-change { padding: .5rem 0 .75rem; border-bottom: 1px solid var(--rule); }
.digest-change:last-of-type { border-bottom: 0; }
.digest-change h4 { margin: .5rem 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.digest-label { font-size: .85rem; color: var(--muted); margin: .75rem 0 .25rem; }
.digest-findings { list-style: none; padding: 0; margin: 0; }
.digest-findings li { padding: .3rem 0; }
.digest-findings .gain { font-size: .9rem; color: var(--ink-deep); }
.digest-considered ul { font-size: .9rem; margin: .25rem 0 0; padding-left: 1.2rem; }
.digest-considered li { margin: .25rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem; font-size: .9rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.panel { border: 1px solid var(--rule); border-radius: 6px; padding: .25rem 1rem 1rem; margin-bottom: 1rem; background: #fff; }
.panel h4 { margin-top: .75rem; }
table.scores { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.scores th { text-align: left; font-weight: 600; padding-top: .5rem; }
table.scores td.num { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; padding-top: .5rem; }
table.scores tr.reason td { color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--rule); padding-bottom: .45rem; }
.review-form fieldset { border: 0; padding: 0; margin: .5rem 0; }
.review-form legend { color: var(--muted); padding: 0; }
.review-form .radio { display: block; padding: .2rem 0; font-size: .9rem; }
.review-form .btn { margin-top: .6rem; width: 100%; }

/* Diff of a change */
.diff { font-size: .85rem; border: 1px solid var(--rule); border-radius: 4px; overflow-x: auto; background: #fff; }
.diff > div { padding: .15rem .6rem .15rem 1.6rem; position: relative; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .sign { position: absolute; left: .5rem; color: var(--muted); }
.diff-same { color: var(--muted); }
.diff-del { background: var(--bad-bg); }
.diff-add { background: var(--good-bg); }
.diff del { background: color-mix(in srgb, var(--bad) 22%, transparent); text-decoration: line-through; }
.diff ins { background: color-mix(in srgb, var(--good) 22%, transparent); text-decoration: none; }

/* Law text */
.law { max-width: 90ch; }
.law-title { display: block; border-bottom: 0; font-size: 1.25rem; margin-top: 0; }
.law-unit { margin: .35rem 0; }
.law-unit.point { padding-left: 1.5rem; }
.law-unit .anchor { font-size: .7rem; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; margin-right: .25rem; }
.law-unit:target { background: color-mix(in srgb, var(--mark) 45%, transparent); }
.law mark { background: var(--mark); color: inherit; padding: 0 .1em; }
.law-table { border-collapse: collapse; margin: .4rem 0 .8rem 1.5rem; font-size: .88rem; font-variant-numeric: tabular-nums; }
.law-table td { border: 1px solid var(--rule); padding: .2rem .55rem; text-align: right; }
.law-table tr:first-child td { font-weight: 600; text-align: center; background: var(--surface); }
.law-table tr.marked td { background: var(--mark); }

@media print {
  .site-nav, .masthead-aside, .site-footer, .review-form { display: none; }
  .finding-layout { display: block; }
}
