@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

:root {
    --ink:          #2B3A55;
    --paper:        #F6F1EA;
    --terra:        #D9967A;
    --terra-text:   #A3563F;
    --line:         #D9D2C6;
    --muted:        #5A6478;
    --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink:        #E9E4DC;
        --paper:      #1C2333;
        --terra:      #E4A88E;
        --terra-text: #E4A88E;
        --line:       #39425A;
        --muted:      #A9B0C0;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
}

a { color: var(--terra-text); }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

h1, h2, h3 { font-weight: 500; line-height: 1.25; }
strong, b { font-weight: 500; }
h1 { font-size: 1.9rem; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.05rem; margin: 0; }

.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-mono); font-weight: 500;
         letter-spacing: .02em; font-size: 1.25rem; margin: 0; color: var(--ink); text-decoration: none; }
.brand-mark { height: 1.5em; width: auto; }
.brand span { color: var(--terra-text); }
.mono  { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.lead  { font-size: 1.15rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hold { max-width: 40rem; margin: 20vh auto 0; padding: 0 1rem; }

.wrap   { max-width: 52rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 36rem; }
main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; min-height: 60vh; }

.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
          flex-wrap: wrap; padding-top: .9rem; padding-bottom: .9rem; }

.langs { display: flex; gap: .15rem; font-family: var(--font-mono); font-size: .85rem; }
.langs a { color: var(--muted); text-decoration: none; padding: .2rem .35rem; border-radius: 3px; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--terra);
                         text-decoration-thickness: 2px; text-underline-offset: 4px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 2rem 0 3rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

.hero { padding: 3vh 0 1rem; }
.perch { display: block; position: relative; height: auto; margin-left: auto; margin-right: auto; pointer-events: none; }
.perch-hero { --perch-shift: 0px; width: min(17rem, 75%); margin-bottom: calc(min(17rem, 75%) * -.096 + var(--perch-shift)); }
.search { display: flex; gap: .5rem; max-width: 36rem; }
.search-hero { margin: 0 auto; }
.hero .field-error { text-align: center; }
.intro { margin-top: 2.5rem; }
.search input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 1.05rem; }
.search input:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--ink); }
.search-small { max-width: 22rem; }
.search-small input { font-size: .95rem; padding: .45rem .7rem; }
.search-small button { padding: .45rem 1rem; }

.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.explain h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.explain p { margin: 0; color: var(--muted); }

input[type=text], input[type=email], textarea {
    width: 100%; font: inherit; color: var(--ink); background: transparent;
    border: 1px solid var(--ink); border-radius: 6px; padding: .6rem .8rem;
}
textarea { resize: vertical; }
[aria-invalid=true] { border-color: var(--terra-text); border-width: 2px; }

button, .button {
    display: inline-block; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
    color: var(--ink); background: var(--terra); border: 1px solid var(--terra);
    border-radius: 6px; padding: .6rem 1.2rem;
}
button:hover, .button:hover { filter: brightness(.95); }

.form .field { margin: 0 0 1.5rem; border: 0; padding: 0; }
.form label, .form legend { display: block; font-weight: 500; margin-bottom: .35rem; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .92rem; margin: .35rem 0 .6rem; }
.check { display: flex !important; gap: .6rem; align-items: flex-start; font-weight: 400 !important; margin-top: .9rem; }
.check input { margin-top: .3rem; accent-color: var(--terra-text); }
.field-error { color: var(--terra-text); font-weight: 500; margin: .4rem 0 0; }
.alert { border-left: 4px solid var(--terra); padding: .6rem 1rem; background: color-mix(in srgb, var(--terra) 15%, transparent); }
.cf-turnstile { margin: 0 0 1.5rem; min-height: 65px; }

.kicker { margin: 0; color: var(--muted); font-size: .9rem; }
.report h1 { word-break: break-word; }
.rate { margin: 1.5rem 0; text-align: center; }
.perch-rate { width: 9rem; margin-bottom: -.2rem; }
.rate-value { font-size: 3rem; font-weight: 500; line-height: 1; margin: 0; }
.rate-detail { margin: .5rem 0 0; color: var(--muted); }
.notice { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 1rem; }

.disclaimer { font-size: .92rem; border-left: 3px solid var(--terra); padding: .1rem 0 .1rem 1rem; margin: 2.5rem 0 1.5rem; }
.disclaimer p { margin: 0 0 .5rem; }
.disclaimer p:last-child { margin-bottom: 0; }
.disclaimer-title { font-weight: 500; }

.findings { list-style: none; padding: 0; margin: 0; }
.finding { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.finding p { margin: .5rem 0; }
.finding-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }

.badge { font-size: .78rem; font-weight: 500; border-radius: 4px; padding: .1rem .55rem; white-space: nowrap;
         border: 1px solid var(--ink); }
.badge-not_found, .badge-not_met { background: var(--terra); border-color: var(--terra); color: var(--ink); }
.badge-undetermined { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.badge-pending { border-style: dotted; color: var(--muted); border-color: var(--muted); }

.cat { border-top: 1px solid var(--line); margin-top: 2rem; }
.cat:first-of-type { border-top: 0; }
.summary { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 1.5rem;
           grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.summary > li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.summary > li[hidden] { display: none; }
.summary-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left;
                cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.summary-link:hover, .summary-link:focus-visible { text-decoration: underline solid var(--terra-text); }
.detail { box-sizing: border-box; width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
          margin: auto; padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-radius: 6px;
          background: var(--paper); color: var(--ink); }
.detail::backdrop { background: rgb(28 35 51 / .45); }
.detail p { margin: .5rem 0; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.detail-head h3 { margin: 0; font-size: 1.1rem; }
.detail-close { flex: none; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--ink);
                font: inherit; font-size: 1.2rem; line-height: 1; width: 2rem; height: 2rem; cursor: pointer; }
.detail-close:hover, .detail-close:focus-visible { border-color: var(--terra); }
.evidence .qc-evidence-text { color: inherit; }
.sym { flex: none; width: 20px; height: 22px; }
.sym-undetermined, .sym-pending { display: inline-flex; align-items: center; justify-content: center; height: 20px;
                                  border: 1.5px dashed var(--muted); border-radius: 50%; color: var(--muted);
                                  font-family: var(--font-mono); font-size: .8rem; line-height: 1; }
.sym-pending { border-style: dotted; }

.qc-progress { margin: 1.25rem 0; }
.qc-progress progress { display: block; width: 100%; height: .6rem; border: 0; border-radius: 4px;
                        background: var(--line); appearance: none; overflow: hidden; }
.qc-progress progress::-webkit-progress-bar { background: var(--line); }
.qc-progress progress::-webkit-progress-value { background: var(--terra); transition: width .3s; }
.qc-progress progress::-moz-progress-bar { background: var(--terra); }
.qc-progress p { margin: .35rem 0 0; font-size: .9rem; }

.evidence { font-size: .92rem; }
.evidence span { color: var(--muted); }
.refs { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .92rem; }
.refs li { padding: .2rem 0; }
.transp { color: var(--muted); font-size: .88rem; }

.history { border-collapse: collapse; width: 100%; max-width: 30rem; }
.history th, .history td { text-align: left; padding: .45rem .75rem .45rem 0; border-bottom: 1px solid var(--line); }
.history th { font-weight: 500; }

.reply { border-top: 1px solid var(--line); margin-top: 3rem; }

.prose { max-width: 42rem; }
.prose h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.prose h4 { font-size: 1rem; font-weight: 500; margin: 0; }
.prose li { margin: .3rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; }
.facts dt { font-weight: 500; }
.facts dd { margin: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }

@media (max-width: 30rem) {
    h1 { font-size: 1.5rem; }
    .rate-value { font-size: 2.4rem; }
    .search { flex-direction: column; }
}
