/* MCA Fraud Registry - one stylesheet for the public site and the admin area.
   No external fonts or scripts: nothing on this site calls a third party. */

:root {
    --ink: #15120f;
    --ink-soft: #4a433b;
    --ink-faint: #7a7166;
    --paper: #f5f0e6;
    --paper-deep: #ebe3d3;
    --card: #fffdf8;
    --rule: #d6cbb6;
    --blood: #7c1d1d;
    --blood-deep: #5a1212;
    --brass: #9a7528;
    --ok: #23603c;
    --ok-bg: #e4f0e6;
    --warn-bg: #f7ead0;
    --bad-bg: #f6dedb;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
    --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--blood); text-underline-offset: 2px; }
a:hover { color: var(--blood-deep); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2.5rem); }
.wrap.wide { width: min(1320px, 100% - 2.5rem); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.eyebrow { font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blood); font-weight: 700; margin: 0 0 .8rem; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-faint); }
.small { font-size: .88rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.stack > * + * { margin-top: 1rem; }

/* ---------------------------------------------------------------- masthead */
.masthead { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--blood); }
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .9rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--brass); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; }
.brand-tag { font-family: var(--serif); font-style: italic; font-size: .85rem; color: #c9bfae; }
.nav { display: flex; align-items: center; gap: .3rem 1.3rem; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: #e6dfd2; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass); }
.nav a.nav-cta { background: var(--blood); color: #fff; padding: .45rem .9rem; border-radius: var(--radius); border-bottom: 0; font-weight: 600; }
.nav a.nav-cta:hover { background: #962424; }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--ink); color: var(--paper); padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .eyebrow { color: var(--brass); }
.hero h1 { max-width: 18ch; }
.hero .lede { color: #d5ccbd; }
.hero-quote { margin: 0 0 2.2rem; padding-left: 1.2rem; border-left: 3px solid var(--blood); }
.hero-quote .latin { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 0; color: #fff; }
.hero-quote .latin-en { margin: .3rem 0 0; color: #bdb3a2; font-size: .98rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
    display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    background: var(--blood); color: #fff; border: 1px solid var(--blood); border-radius: var(--radius);
    padding: .7rem 1.3rem; line-height: 1.2;
}
.btn:hover { background: var(--blood-deep); border-color: var(--blood-deep); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); color: inherit; }
.btn.quiet { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn.quiet:hover { background: var(--paper-deep); color: var(--ink); }
.btn.small { padding: .35rem .7rem; font-size: .88rem; }
.btn.big { padding: .95rem 1.8rem; font-size: 1.08rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blood); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: #a01818; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--paper-deep); border-block: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.grid { display: grid; gap: 1.5rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.card h3 { margin-bottom: .4rem; }
.card > :last-child { margin-bottom: 0; }
.step-num { font-family: var(--serif); font-size: 2.2rem; color: var(--blood); line-height: 1; display: block; margin-bottom: .5rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin: 0; }
.stat dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); }
.stat dd { margin: .2rem 0 0; font-family: var(--serif); font-size: 2.4rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose li { margin-bottom: .45rem; }
.callout { border-left: 4px solid var(--brass); background: var(--card); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 1.6rem; position: relative; margin-bottom: .55rem; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.status-page { padding: 5rem 0; }
body.plain { background: var(--paper); }

/* ---------------------------------------------------------------- forms */
form { margin: 0; }
fieldset { border: 1px solid var(--rule); background: var(--card); border-radius: var(--radius); padding: 1.5rem 1.6rem 1.2rem; margin: 0 0 1.8rem; min-width: 0; }
legend { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; padding: 0 .6rem; margin-left: -.6rem; }
legend .n { color: var(--blood); margin-right: .4rem; }
.fieldset-note { color: var(--ink-soft); margin-top: -.2rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.2rem; }
.field { margin-bottom: 1.1rem; min-width: 0; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.field .hint { display: block; font-weight: 400; font-size: .86rem; color: var(--ink-faint); margin-top: .15rem; }
.req { color: var(--blood); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"],
input[type="url"], input[type="search"], input[type="number"], select, textarea {
    width: 100%; font: inherit; color: var(--ink); background: #fff;
    border: 1px solid #b9ad97; border-radius: var(--radius); padding: .55rem .7rem;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 16rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--brass); outline-offset: 0; border-color: var(--ink); }
input[type="file"] { font: inherit; width: 100%; padding: .9rem; border: 2px dashed #b9ad97; border-radius: var(--radius); background: var(--paper); }
.checks { display: grid; gap: .5rem; }
.checks.cols { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: .32rem; width: 1.05rem; height: 1.05rem; flex: none; accent-color: var(--blood); }
.consent .check { padding: .8rem .9rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.file-list { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .9rem; }
.file-list li { padding: .25rem 0; border-bottom: 1px dotted var(--rule); display: flex; justify-content: space-between; gap: 1rem; }
.file-list li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.file-list li > :last-child { flex: none; white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; }
.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.2rem; }
.filters .field { margin-bottom: 0; flex: 0 1 190px; }
.filters .field.grow { flex: 1 1 260px; }

.notice { border: 1px solid var(--rule); border-left-width: 4px; border-radius: var(--radius); padding: .85rem 1.1rem; margin: 0 0 1.5rem; background: var(--card); }
.notice.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.notice.bad { border-left-color: var(--blood); background: var(--bad-bg); }
.notice.warn { border-left-color: var(--brass); background: var(--warn-bg); }
.notice ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.notice > :last-child { margin-bottom: 0; }
.ref-code { font-family: var(--mono); font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: .06em; background: var(--card); border: 2px solid var(--ink); display: inline-block; padding: .5rem 1.1rem; margin: .5rem 0 1rem; }

/* ---------------------------------------------------------------- research */
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list > li { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }
.item-list h3 { margin-bottom: .25rem; }
.item-list h3 a { color: var(--ink); text-decoration: none; }
.item-list h3 a:hover { color: var(--blood); text-decoration: underline; }
.meta { font-size: .86rem; color: var(--ink-faint); display: flex; gap: .3rem 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .12rem .5rem; border-radius: 2px; background: var(--paper-deep); color: var(--ink-soft); border: 1px solid var(--rule); white-space: nowrap; }
.tag.s-new { background: #dfe8f5; border-color: #b4c6e2; color: #1d3f73; }
.tag.s-reviewing { background: var(--warn-bg); border-color: #e0c88f; color: #6b4a06; }
.tag.s-needs_info { background: #f1e1f3; border-color: #d4b6d9; color: #5d2467; }
.tag.s-verified { background: var(--ok-bg); border-color: #b0d2b9; color: var(--ok); }
.tag.s-rejected, .tag.s-duplicate { background: #e9e6e1; border-color: #cfc9bf; color: #5c564d; }
.tag.public { background: var(--ok-bg); border-color: #b0d2b9; color: var(--ok); }
.tag.private { background: var(--bad-bg); border-color: #e3b9b4; color: var(--blood); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: #c9bfae; padding: 3rem 0 2.5rem; margin-top: 4rem; font-size: .92rem; }
.footer a { color: #e6dfd2; }
.footer-quote .latin { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: #fff; margin: 0; }
.footer-quote .latin-en { margin: .2rem 0 1.6rem; }
.footer-nav { display: flex; gap: .4rem 1.4rem; flex-wrap: wrap; padding: 1.2rem 0; border-block: 1px solid #3a342d; margin-bottom: 1.2rem; }
.footer-legal { max-width: 85ch; color: #9d9384; margin: 0; }

/* ---------------------------------------------------------------- admin */
body.admin { background: #f3f1ec; font-size: 15.5px; }
.admin-bar { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--brass); }
.admin-bar-in { display: flex; align-items: center; gap: 1.5rem; padding: .7rem 0; flex-wrap: wrap; }
.admin-brand { font-family: var(--serif); font-size: 1.15rem; color: #fff; text-decoration: none; font-weight: 600; }
.admin-nav { display: flex; gap: .2rem 1.2rem; flex-wrap: wrap; flex: 1; }
.admin-nav a { color: #d5ccbd; text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass); }
.admin-out { display: flex; gap: .8rem; align-items: center; font-size: .9rem; color: #bdb3a2; }
.admin-out .linkish { color: #e6dfd2; }
.admin-main { padding: 1.8rem 0 3rem; }
.admin-main h1 { font-size: 1.8rem; }
.admin-main h2 { font-size: 1.25rem; margin-top: 0; }
.admin-foot { padding: 1rem 0 2rem; color: var(--ink-faint); font-size: .85rem; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-head h1 { margin: 0; }
.panel { background: #fff; border: 1px solid #ddd6c8; border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.4rem; }
.panel > :last-child { margin-bottom: 0; }
.panel fieldset { background: transparent; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.4rem; align-items: start; }
.cols.even { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.tile { background: #fff; border: 1px solid #ddd6c8; border-top: 3px solid var(--blood); border-radius: var(--radius); padding: .9rem 1.1rem; }
.tile .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }
.tile .v { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #e6e0d4; vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 700; white-space: nowrap; }
tbody tr:hover { background: #faf8f3; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td meter { width: 110px; height: .8rem; vertical-align: middle; }
.dl { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--ink-faint); font-size: .88rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.narrative { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; max-height: 34rem; overflow: auto; }
.narrative > :last-child { margin-bottom: 0; }
.note { border-bottom: 1px solid #e6e0d4; padding: .7rem 0; }
.note:last-child { border-bottom: 0; }
.note .meta { margin-bottom: .2rem; }
.note p { margin: 0 0 .4rem; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1rem; font-size: .9rem; }
.login-box { width: min(420px, 100% - 2rem); margin: 4rem auto; }
.empty { padding: 2rem; text-align: center; color: var(--ink-faint); }

@media (max-width: 640px) {
    body { font-size: 16px; }
    .masthead-in { flex-direction: column; align-items: flex-start; gap: .7rem; }
    fieldset { padding: 1.1rem 1rem .8rem; }
    .dl { grid-template-columns: 1fr; gap: 0; }
    .dl dt { margin-top: .6rem; }
}
@media print {
    .masthead, .footer, .admin-bar, .admin-foot, .btn, .filters { display: none; }
    body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Court filings and contacts */
.tag.d-uploaded, .tag.o-new { background: #dfe8f5; border-color: #b4c6e2; color: #1d3f73; }
.tag.d-processing, .tag.o-contacted { background: var(--warn-bg); border-color: #e0c88f; color: #6b4a06; }
.tag.d-extracted, .tag.o-responded, .tag.o-reported { background: var(--ok-bg); border-color: #b0d2b9; color: var(--ok); }
.tag.d-failed { background: var(--bad-bg); border-color: #e3b9b4; color: var(--blood); }
.tag.out-todo { background: #dfe8f5; border-color: #b4c6e2; color: #1d3f73; }
.tag.out-emailed { background: var(--warn-bg); border-color: #e0c88f; color: #6b4a06; }
.tag.out-replied { background: var(--ok-bg); border-color: #b0d2b9; color: var(--ok); }
.tag.out-bounced, .tag.out-noemail, .tag.out-stop { background: #e9e6e1; border-color: #cfc9bf; color: #5c564d; }
.case-row .tag { margin: 0 .4rem; vertical-align: middle; }
.tag.o-bounced, .tag.o-do_not_contact { background: #e9e6e1; border-color: #cfc9bf; color: #5c564d; }
.wrap-any { overflow-wrap: anywhere; }
/* Long unbroken text (court file names, web addresses) wraps instead of leaving its box. */
.panel p, .panel dd, .panel li, .notice, .notice p, .admin-head h1, .admin-head p { overflow-wrap: anywhere; }
.cols > * { min-width: 0; }

/* Cases */
table.cases tbody tr.case-row td { background: var(--paper-deep); border-top: 2px solid var(--rule); padding-top: .7rem; }
table.cases tbody tr.case-row:hover { background: none; }
table.cases tbody + tbody tr.case-row td { border-top-width: 2px; }
.case-no { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin-right: .6rem; }
.case-title { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }
.case-open { float: right; margin-left: 1rem; }
table.cases tbody tr:not(.case-row) td:first-child { padding-left: 1.6rem; }

/* Embedded players on the Our story page */
.embed { display: block; width: 100%; border: 0; border-radius: var(--radius); margin: .6rem 0 .8rem; background: var(--paper-deep); }
.embed.video { aspect-ratio: 16 / 9; height: auto; }
.embed.audio { height: 232px; }

/* Donation amounts */
.amounts { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.amount { position: relative; cursor: pointer; }
.amount input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amount span { display: block; min-width: 5.2rem; text-align: center; padding: .7rem 1rem; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--card); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.amount input:checked + span { border-color: var(--blood); background: var(--blood); color: #fff; }
.amount input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
/* Message thread in the admin area */
.addr { border: 1px solid var(--rule); border-radius: var(--radius); padding: .7rem 1rem .3rem; margin: 0 0 1rem; min-width: 0; }
.addr legend { padding: 0 .4rem; font-weight: 600; }
.addr .check { margin-bottom: .7rem; }
.thread-item { border-left: 3px solid var(--rule); padding: .2rem 0 .2rem 1rem; margin-bottom: 1.2rem; }
.thread-item.reply { border-left-color: var(--ok); }
.thread-item.note { border-left-color: var(--brass); }
.thread-item .meta { font-size: .85rem; color: var(--ink-faint); margin-bottom: .3rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
