@font-face {
    font-family: "Inter Tight";
    src: url("/static/fonts/intertight/InterTight-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ─── TOKENS ──────────────────────────────────────────────────────────────── */

:root {
    /* accent / classification colours */
    --red:    #B30F29;
    --pencil: #2340A0;
    --amber:  #A86C00;
    --cl-u:   #00703A;
    --cl-r:   #5A2E91;
    --cl-c:   #0D3FA8;
    --cl-s:   #B30F29;
    --cl-ts:  #C74A0C;

    --v-emotion:  #D99600;
    --v-physical: #C21F72;
    --v-mental:   #6A50E0;


    --font-serif: "Source Serif 4","Latin Modern Roman","CMU Serif",Georgia,serif;
    --font-mono:  "IBM Plex Mono","Berkeley Mono",ui-monospace,monospace;
    --font-grot:  "Inter Tight","Helvetica Neue",Arial,sans-serif;

    --size-base:  17px;
    --size-title: 100px;
    --size-sm:    15px;
    --size-xs:    13px;
    --size-label: 14px;

    --col-width: 680px;
    --doc-pad:   24px;

    /* spacing scale */
    --sp-1:  4px;
    --sp-2:  8px;
    --sp-3:  12px;
    --sp-4:  16px;
    --sp-5:  24px;
    --sp-6:  28px;
    --sp-7:  44px;
    --sp-8:  64px;
    --sp-9:  72px;
}

:root, [data-shift="day"] {
    --paper:       #FBFAF6;
    --paper-2:     #F1EEE6;
    --ink-1:       #161616;
    --ink-2:       #47453F;
    --ink-3:       #7E796E;
    --ink-4:       #B4AEA1;
    --ink-5:       #D9D4C8;
    --rule:        #161616;
    --rule-subtle: #E0DBCF;
    --redact:      #161616;
}

[data-shift="night"] {
    --paper:       #121311;
    --paper-2:     #1A1B18;
    --ink-1:       #E6E2D7;
    --ink-2:       #AFA999;
    --ink-3:       #7C776C;
    --ink-4:       #4E4A43;
    --ink-5:       #2E2C28;
    --rule:        #E6E2D7;
    --rule-subtle: #2A2925;
    --redact:      #E6E2D7;
    --red:         #E0465C;
    --pencil:      #8FA2EE;
    --amber:       #E0A030;
    --cl-u:        #3FB06E;
    --cl-r:        #A68AE6;
    --cl-c:        #6F93F0;
    --cl-s:        #E0465C;
    --cl-ts:       #F08A4B;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--paper);
    color: var(--ink-1);
    font: var(--size-base)/1.6 var(--font-serif);
    font-optical-sizing: auto;
    hyphens: auto;
    -webkit-hyphens: auto;
    text-rendering: optimizeLegibility;
}

/* ─── GENERIC ELEMENTS ────────────────────────────────────────────────────── */

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--ink-4);
    text-underline-offset: 3px;
}
a:hover { color: var(--red); text-decoration-color: var(--red); }

::selection { background: var(--ink-1); color: var(--paper); }

button, input, select, textarea { font: inherit; color: inherit; }

button {
    background: none;
    border: 1px solid var(--ink-4);
    padding: var(--sp-1) var(--sp-3);
    cursor: pointer;
    font-size: var(--size-xs);
    font-family: var(--font-mono);
    color: var(--ink-2);
    letter-spacing: .02em;
}
button:hover {
    border-color: var(--ink-1);
    color: var(--ink-1);
}
button[type="submit"] {
    border-color: var(--ink-3);
}

/* ─── FORM FIELDS ─────────────────────────────────────────────────────────── */

.field {
    margin-bottom: var(--sp-4);
}
.field label {
    display: block;
    font-size: var(--size-xs);
    color: var(--ink-3);
    font-variant-caps: all-small-caps;
    letter-spacing: .06em;
    margin-bottom: var(--sp-1);
}
.field input, .field textarea {
    display: block;
    width: 100%;
    background: none;
    border: none;
    border-bottom: .5px solid var(--rule-subtle);
    padding: var(--sp-1) 0;
    font-size: var(--size-base);
    font-family: var(--font-serif);
    outline: none;
    color: var(--ink-1);
}
.field textarea {
    border: .5px solid var(--rule-subtle);
    padding: var(--sp-2);
    font-size: var(--size-sm);
    font-family: var(--font-mono);
    resize: vertical;
    min-height: 8em;
}
.field input:focus, .field textarea:focus {
    border-color: var(--ink-3);
}

p {
    margin: 0 0 0.75em;
    line-height: 1.6;
    font-size: var(--size-base);
    font-family: var(--font-serif);
    text-align: justify;
    hyphens: auto;
}
p + p { text-indent: 1.4em; margin-top: -0.75em; }

/* Navbar */

nav {
    margin-bottom: var(--sp-6);
    max-width: calc(var(--col-width) + var(--doc-pad) * 2);
    margin-left: auto;
    margin-right: auto;
    margin-top: 12px;
}
.nav-links {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
}

.cl-bar {
    border: none;
    height: 3px;
    background: var(--cl-bar-color, var(--rule-subtle));
    margin: var(--sp-2) 0;
}
.cl-bar.cl-low  { --cl-bar-color: var(--cl-u); }
.cl-bar.cl-mid  { --cl-bar-color: var(--cl-c); }
.cl-bar.cl-high { --cl-bar-color: var(--cl-r); }
.cl-bar.cl-top  { --cl-bar-color: var(--cl-ts); }

/* Utils */

.sc    { font-variant-caps: all-small-caps; letter-spacing: .06em; }
.mono  { font-family: var(--font-mono); font-size: .78em; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.redacted {
    display: inline-block;
    background: var(--ink-1);
    color: transparent;
    border-radius: 1px;
    user-select: none;
    line-height: 1;
    vertical-align: middle;
    font-family: var(--font-mono);
    font-size: var(--size-xs);
}
tr.filing-redacted { opacity: .55; }
.noindent { text-indent: 0 !important; }

/* Layouts */

.doc {
    max-width: calc(var(--col-width) + var(--doc-pad) * 2);
    margin: 0 auto;
    padding: 0 var(--doc-pad);
    margin-bottom: var(--sp-9);
}

.col {
    max-width: var(--col-width);
    margin-left: auto;
    margin-right: auto;
}

/* Titlecard title thing */

.maketitle {
    text-align: center;
    margin: var(--sp-8) calc(var(--sp-8) * -1) var(--sp-6);
}
.maketitle .kick {
    font-size: var(--size-label);
    color: var(--ink-3);
}
.maketitle h1 {
    font-family: var(--font-grot);
    font-weight: 800;
    font-size: var(--size-title);
    line-height: 1.02;
    letter-spacing: -.025em;
    margin: var(--sp-3) 0;
}
.maketitle .by {
    font-style: italic;
    color: var(--ink-2);
    font-size: var(--size-sm);
}

.case-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 12em;
    margin: var(--sp-3) auto 0;
    font-size: var(--size-xs);
    row-gap: var(--sp-1);
}
.case-meta.wide { width: 18em; }
.case-meta dt {
    text-align: left;
    color: var(--ink-3);
}
.case-meta dd {
    text-align: right;
    color: var(--ink-2);
}

/* Description */

.description-block {
    margin: 0 auto var(--sp-2);
    max-width: 34em;
    font-size: var(--size-sm);
    line-height: 1.55;
    text-align: justify;
}
.description-block p { font-size: var(--size-sm); }
.description-block h2 {
    text-align: center;
    font-size: var(--size-label);
    font-weight: 600;
    margin-bottom: var(--sp-1);
}

/* keywords row below abstract, currently just for cases */
.keywords {
    max-width: 34em;
    margin: var(--sp-3) auto 0;
    font-size: var(--size-sm);
}
.keywords b { font-weight: 600; }
.keywords .x { margin-right: .6em; }

/* Section headers */

h2.s {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    margin: var(--sp-7) 0 var(--sp-3);
    display: flex;
    gap: .9em;
}
h2.s .no { min-width: 1em; }
h2.s .no:empty { display: none; }

h3.ss {
    font-size: var(--size-base);
    font-weight: 600;
    margin: var(--sp-6) 0 var(--sp-2);
}

/* Tables */

.tbl { overflow-x: auto; margin: var(--sp-3) 0 var(--sp-5); }

table.bk {
    border-collapse: collapse;
    width: 100%;
    font-size: var(--size-sm);
    line-height: 1.4;
}
table.bk thead tr:first-child th { border-top: 1.5px solid var(--rule); }
table.bk thead th {
    border-bottom: .75px solid var(--rule);
    font-weight: 400;
    text-align: left;
    padding: var(--sp-1) var(--sp-3) var(--sp-1) 0;
    font-variant-caps: all-small-caps;
    letter-spacing: .05em;
    color: var(--ink-2);
    white-space: nowrap;
}
table.bk td { padding: var(--sp-1) var(--sp-3) var(--sp-1) 0; vertical-align: baseline; }
table.bk tbody tr:last-child td { border-bottom: 1.5px solid var(--rule); }
table.bk .r  { text-align: right; padding-right: 0; }
table.bk .id { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* annotation row (italic, muted) */
table.bk tr.anno td {
    padding-top: 0;
    color: var(--ink-3);
    font-style: italic;
    font-size: var(--size-xs);
}

/* Action bar */

.actions {
    margin-top: var(--sp-6);
    font-size: var(--size-label);
    display: flex;
    justify-content: center;
}
.actions a, .actions button, .actions label {
    font-family: var(--font-mono);
    font-size: 12.5px;
    margin-right: 1.2em;
    border: none;
    padding: 0;
    background: none;
    color: var(--ink-2);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--ink-4);
    text-underline-offset: 3px;
}
.actions a:hover, .actions button:hover, .actions label:hover {
    color: var(--red);
    text-decoration-color: var(--red);
}
.actions a::before, .actions button::before, .actions label::before { content: "["; color: var(--ink-4); text-decoration: none; }
.actions a::after,  .actions button::after,  .actions label::after  { content: "]"; color: var(--ink-4); }

/* Inline entity reference links */

a.ref {
    text-decoration: none;
    border-bottom: 1px solid var(--ink-4);
    color: inherit;
    white-space: nowrap;
}
a.ref:hover { border-bottom-color: var(--red); }
a.ref i {
    font-style: normal;
    font-size: 10px;
    color: var(--paper);
    background: var(--ink-2);
    padding: 1px 4px;
    margin-right: 5px;
    vertical-align: 2px;
}
.ref.dead { color: var(--ink-3); border-bottom: 1px dashed var(--ink-4); }
.ref.dead i { background: var(--ink-4); }

/* Clearance pip picker */

.cl-picker {
    display: flex;
    gap: 3px;
    margin: var(--sp-1) 0;
}
.cl-picker input[type="radio"] {
    display: none;
}
.cl-picker label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    font-family: var(--font-mono);
    font-size: var(--size-xs);
    color: var(--ink-3);
    border: .5px solid var(--rule-subtle);
    cursor: pointer;
    transition: border-color .1s, color .1s, background .1s;
    user-select: none;
}
.cl-picker label:hover {
    border-color: var(--ink-3);
    color: var(--ink-1);
}
/* selected state — fill with band colour per pip position */
.cl-picker input[type="radio"]:checked + label {
    color: var(--paper);
    border-color: transparent;
}

.cl-picker span:nth-child(1) input:checked + label,
.cl-picker span:nth-child(2) input:checked + label,
.cl-picker span:nth-child(3) input:checked + label  { background: var(--cl-u); }
.cl-picker span:nth-child(4) input:checked + label,
.cl-picker span:nth-child(5) input:checked + label  { background: var(--cl-c); }
.cl-picker span:nth-child(6) input:checked + label,
.cl-picker span:nth-child(7) input:checked + label,
.cl-picker span:nth-child(8) input:checked + label  { background: var(--cl-r); }
.cl-picker span:nth-child(9) input:checked + label,
.cl-picker span:nth-child(10) input:checked + label { background: var(--cl-ts); }

/* Note body (rendered markdown) */

.note-body {
    margin-top: var(--sp-6);
}
.note-body h1, .note-body h2, .note-body h3,
.note-body h4, .note-body h5, .note-body h6 {
    font-family: var(--font-grot);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: var(--sp-7) 0 var(--sp-3);
}
.note-body h1 { font-size: 2em; }
.note-body h2 { font-size: 1.35em; }
.note-body h3 { font-size: 1.1em; font-weight: 600; font-family: var(--font-serif); letter-spacing: 0; }
.note-body ul, .note-body ol {
    padding-left: 1.5em;
    margin-bottom: 0.75em;
}
.note-body li { margin-bottom: 0.2em; line-height: 1.55; }
.note-body li p { margin: 0; text-indent: 0; }
.note-body hr {
    border: none;
    border-top: .75px solid var(--rule-subtle);
    margin: var(--sp-6) 0;
}
.note-body blockquote {
    border-left: 2px solid var(--ink-4);
    margin: var(--sp-4) 0;
    padding: 0 0 0 var(--sp-4);
    color: var(--ink-2);
    font-style: italic;
}
.note-body blockquote p { font-size: var(--size-sm); }
.note-body code {
    font-family: var(--font-mono);
    font-size: .82em;
    background: var(--paper-2);
    padding: .1em .35em;
    border-radius: 2px;
}
.note-body pre {
    background: var(--paper-2);
    border: .5px solid var(--rule-subtle);
    padding: var(--sp-4);
    overflow-x: auto;
    margin: var(--sp-4) 0;
    line-height: 1.5;
}
.note-body pre code {
    background: none;
    padding: 0;
    font-size: var(--size-xs);
}
.note-body table {
    border-collapse: collapse;
    width: 100%;
    font-size: var(--size-sm);
    margin: var(--sp-4) 0;
}
.note-body table th, .note-body table td {
    border-bottom: .5px solid var(--rule-subtle);
    padding: var(--sp-1) var(--sp-3) var(--sp-1) 0;
    text-align: left;
    vertical-align: baseline;
}
.note-body table th {
    font-weight: 600;
    border-bottom-width: 1px;
    color: var(--ink-2);
}

/* Responsive shit */

@media (max-width: 640px) {
    body { font-size: 16px; }
    .doc { padding: 0 var(--sp-4); }
    .maketitle { margin: var(--sp-7) 0 var(--sp-6); }
    .description-block { text-align: left; }
    .runhead .who { margin-left: 0; flex-basis: 100%; }
}
