/* =====================================================================
   Newsworthy - newsroom ingest & licensing UI
   No framework. Dense by design: editors scan, they do not browse.
   ===================================================================== */

:root {
    --bg:            #0f1216;
    --bg-raised:     #161a20;
    --bg-sunken:     #0b0e11;
    --panel:         #1b2027;
    --panel-hover:   #212832;
    --line:          #2a323d;
    --line-soft:     #222932;

    --text:          #e6eaf0;
    --text-dim:      #9aa5b4;
    --text-faint:    #6b7684;

    --accent:        #e0483a;
    --accent-hot:    #ff5a4a;
    --accent-soft:   rgba(224, 72, 58, 0.14);

    --ok:            #3fb98a;
    --warn:          #e0a33a;
    --info:          #4a9fe0;
    --danger:        #e0483a;

    --radius:        7px;
    --radius-sm:     4px;
    --shadow:        0 6px 24px rgba(0, 0, 0, 0.45);

    --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-hot); }

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

p { margin: 0 0 .75rem; }

code, kbd, .mono { font-family: var(--mono); font-size: .85em; }

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 1.25rem 0; }

::selection { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- Top bar */

.topbar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.25rem;
    height: 56px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}

.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand:hover { color: inherit; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
}

.brand-text { display: flex; flex-direction: column; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.brand-text em {
    font-style: normal;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.topnav { display: flex; gap: .25rem; margin-left: .5rem; flex: 1; min-width: 0; overflow-x: auto; }
.topnav a {
    padding: .4rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
}
.topnav a:hover { background: var(--panel); color: var(--text); }
.topnav a.is-active { background: var(--accent-soft); color: var(--accent-hot); }

.topbar-user { display: flex; align-items: center; gap: .75rem; margin-left: auto; flex-shrink: 0; }
.who { display: flex; align-items: center; gap: .5rem; font-size: 13px; }
.who strong { font-weight: 600; }

.role-chip {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .15rem .4rem;
    border-radius: 3px;
    font-weight: 700;
    background: var(--panel);
    color: var(--text-dim);
    border: 1px solid var(--line);
}
.role-admin      { color: #f0c674; border-color: #4a3f22; background: #2a2313; }
.role-journalist { color: #8ac4f0; border-color: #234055; background: #12222e; }
.role-contributor{ color: #8fd6b0; border-color: #22463a; background: #10251d; }

/* ---------------------------------------------------------------- Layout */

.shell { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.shell-wide { max-width: 1600px; }

.sitefoot {
    border-top: 1px solid var(--line-soft);
    padding: 1rem 1.25rem 2rem;
    color: var(--text-faint);
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    text-align: center;
}
.sitefoot .dot { opacity: .5; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-head .sub { color: var(--text-dim); font-size: 13px; margin: 0; }
.page-head-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Panels */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
}
.panel + .panel { margin-top: 1rem; }
.panel-head {
    display: flex; align-items: center; gap: .6rem;
    margin: -1.1rem -1.1rem 1rem;
    padding: .7rem 1.1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raised);
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
    font-size: 13px;
}
.panel-head .count { margin-left: auto; color: var(--text-faint); font-weight: 500; font-size: 12px; }

/* ---------------------------------------------------------------- Forms */

label, .label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-faint);
    margin-bottom: .3rem;
}

input[type=text], input[type=email], input[type=password], input[type=search],
input[type=date], input[type=datetime-local], input[type=number], select, textarea {
    width: 100%;
    padding: .5rem .6rem;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}
input::placeholder { color: var(--text-faint); }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' stroke='%239aa5b4' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right .45rem center;
    padding-right: 1.6rem;
}

.field { margin-bottom: .85rem; }
.field-row { display: flex; gap: .6rem; }
.field-row > * { flex: 1; min-width: 0; }

.checkline { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.checkline input { width: auto; margin: 0; accent-color: var(--accent); }
.checkline label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text); }

.hint { font-size: 12px; color: var(--text-faint); margin-top: .3rem; }

/* ---------------------------------------------------------------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--panel-hover); border-color: #3a4450; color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); color: #fff; }

.btn-ghost { background: transparent; }
.btn-sm { padding: .32rem .6rem; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- Flash */

.flash {
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 1rem;
    font-size: 13px;
}
.flash-error   { background: rgba(224,72,58,.1);  border-color: rgba(224,72,58,.4);  color: #ffb3aa; }
.flash-success { background: rgba(63,185,138,.1); border-color: rgba(63,185,138,.4); color: #9fe6c6; }
.flash-info    { background: rgba(74,159,224,.1); border-color: rgba(74,159,224,.4); color: #a9d5f5; }
.flash-warn    { background: rgba(224,163,58,.1); border-color: rgba(224,163,58,.4); color: #f0d29a; }

/* ---------------------------------------------------------------- Auth */

.auth-wrap { max-width: 400px; margin: 3rem auto; }
.auth-wrap .panel { padding: 1.5rem; }
.auth-title { text-align: center; margin-bottom: 1.25rem; }
.auth-title h1 { font-size: 1.3rem; }
.auth-title p { color: var(--text-dim); font-size: 13px; margin: 0; }
.auth-alt { text-align: center; margin-top: 1rem; font-size: 13px; color: var(--text-dim); }
.auth-alt a { color: var(--accent-hot); font-weight: 600; }

.demo-creds {
    margin-top: 1rem;
    padding: .75rem .9rem;
    background: var(--bg-sunken);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-dim);
}
.demo-creds b { color: var(--text); font-weight: 600; }
.demo-creds ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.demo-creds li { margin-bottom: .15rem; }
.demo-creds code { color: var(--accent-hot); }

/* ---------------------------------------------------------------- Dropzone */

.dropzone {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: var(--bg-sunken);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: #3d4855; }
.dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone h2 { font-size: 1.05rem; margin-bottom: .25rem; }
.dropzone p { color: var(--text-dim); font-size: 13px; margin: 0; }
.dropzone .dz-icon { font-size: 30px; line-height: 1; margin-bottom: .6rem; opacity: .7; }
.dropzone input[type=file] { display: none; }

/* ---------------------------------------------------------------- Queue list */

.queue-list { display: flex; flex-direction: column; gap: .5rem; }

.queue-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: .8rem;
    align-items: center;
    padding: .6rem .75rem;
    background: var(--bg-sunken);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
}
.queue-thumb {
    width: 52px; height: 40px;
    border-radius: 3px;
    background: #0a0d10 center/cover no-repeat;
    display: grid; place-items: center;
    font-size: 17px;
    color: var(--text-faint);
    overflow: hidden;
    flex-shrink: 0;
}
.queue-main { min-width: 0; }
.queue-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: .35rem; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }

/* ---------------------------------------------------------------- Status */

.status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .45rem;
    border-radius: 3px;
    border: 1px solid;
    white-space: nowrap;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending    { color: var(--text-dim); border-color: var(--line); background: var(--panel); }
.status-processing { color: var(--info);  border-color: rgba(74,159,224,.35);  background: rgba(74,159,224,.1); }
.status-completed  { color: var(--ok);    border-color: rgba(63,185,138,.35);  background: rgba(63,185,138,.1); }
.status-failed     { color: var(--danger);border-color: rgba(224,72,58,.35);   background: rgba(224,72,58,.1); }
.status-processing::before { animation: pulse 1.1s ease-in-out infinite; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------------------------------------------------------------- Stats */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .7rem .85rem;
}
.stat b { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }

/* ---------------------------------------------------------------- Archive layout */

.archive { display: grid; grid-template-columns: 268px 1fr; gap: 1.25rem; align-items: start; }

.filters { position: sticky; top: 72px; }
.filters .panel { padding: .95rem; }
.filter-group { padding-bottom: .85rem; margin-bottom: .85rem; border-bottom: 1px solid var(--line-soft); }
.filter-group:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.searchbar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.searchbar input { font-size: 14px; padding: .6rem .75rem; }

.result-head {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: .85rem; flex-wrap: wrap;
}
.result-head .n { color: var(--text-dim); font-size: 13px; }
.result-head .n b { color: var(--text); }
.result-head .spacer { margin-left: auto; }
.result-head select { width: auto; }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .85rem; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: 12px;
    padding: .2rem .5rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-dim);
}
.chip button { background: none; border: 0; color: var(--text-faint); cursor: pointer; padding: 0 0 0 .1rem; font-size: 14px; line-height: 1; }
.chip button:hover { color: var(--accent-hot); }

/* ---------------------------------------------------------------- Media cards */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .85rem; }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, transform .15s;
}
.card:hover { border-color: #3a4450; }

.card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #090c0f center/cover no-repeat;
    display: grid; place-items: center;
    cursor: pointer;
    overflow: hidden;
}
.card-media .placeholder { font-size: 32px; opacity: .35; }
.card-media .type-badge {
    position: absolute; top: .5rem; left: .5rem;
    font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    padding: .18rem .4rem; border-radius: 3px;
    background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(2px);
}
.card-media .dur-badge {
    position: absolute; bottom: .5rem; right: .5rem;
    font-family: var(--mono); font-size: 11px;
    padding: .12rem .35rem; border-radius: 3px;
    background: rgba(0,0,0,.72); color: #fff;
}
.card-media .licensed-badge {
    position: absolute; top: .5rem; right: .5rem;
    font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    padding: .18rem .4rem; border-radius: 3px;
    background: rgba(63,185,138,.9); color: #04150e;
}

.card-body { padding: .75rem .85rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }

.card-cat {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--accent-hot);
}
.card-summary { font-size: 13px; line-height: 1.45; margin: 0; }
.card-summary.muted { color: var(--text-faint); font-style: italic; }

.card-facts { display: flex; flex-direction: column; gap: .2rem; font-size: 12px; color: var(--text-dim); }
.card-facts div { display: flex; gap: .4rem; align-items: baseline; }
.card-facts .k { color: var(--text-faint); flex-shrink: 0; }
.card-facts .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-row { display: flex; flex-wrap: wrap; gap: .25rem; }
.tag {
    font-size: 11px; padding: .1rem .4rem;
    background: var(--bg-sunken); border: 1px solid var(--line-soft);
    border-radius: 3px; color: var(--text-dim); cursor: pointer;
}
.tag:hover { border-color: var(--accent); color: var(--accent-hot); }

.card-foot {
    margin-top: auto;
    padding: .6rem .85rem;
    border-top: 1px solid var(--line-soft);
    background: var(--bg-raised);
    display: flex; align-items: center; gap: .5rem;
}
.price { font-weight: 700; font-size: 14px; }
.price small { font-weight: 500; color: var(--text-faint); font-size: 11px; }
.card-foot .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- Modal */

.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(4, 6, 8, .78);
    backdrop-filter: blur(3px);
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }

.modal {
    width: min(1080px, 100%);
    max-height: calc(100vh - 2.5rem);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-head {
    display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.modal-head h2 { margin: 0; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-close {
    margin-left: auto; background: none; border: 0; color: var(--text-dim);
    font-size: 22px; line-height: 1; cursor: pointer; padding: 0 .25rem;
}
.modal-close:hover { color: var(--accent-hot); }
.modal-body { overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.25rem; align-items: start; }

.viewer { background: #06080a; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-soft); }
.viewer video, .viewer img { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #06080a; }
.viewer audio { display: block; width: 100%; }
.viewer .audio-shell { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; align-items: center; }
.viewer .audio-shell .glyph { font-size: 40px; opacity: .4; }

.meta-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.meta-table th, .meta-table td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.meta-table th { color: var(--text-faint); font-weight: 500; width: 42%; white-space: nowrap; }
.meta-table td { color: var(--text); }
.meta-table tr:last-child th, .meta-table tr:last-child td { border-bottom: 0; }
.meta-table .mono { font-size: 11.5px; word-break: break-all; }

.section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-faint); margin: 1rem 0 .5rem;
}
.section-label:first-child { margin-top: 0; }

/* ------------------------------------------------- Transcript scrubber */

.transcript {
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg-sunken);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: .35rem;
}
.tseg {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: .5rem;
    padding: .3rem .4rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.45;
}
.tseg:hover { background: var(--panel); }
.tseg.is-active { background: var(--accent-soft); }
.tseg .t { font-family: var(--mono); font-size: 11px; color: var(--accent-hot); padding-top: .12rem; }
.tseg.is-active .x { color: #fff; }
.transcript-plain { font-size: 13px; line-height: 1.6; white-space: pre-wrap; }

.entity-group { margin-bottom: .5rem; }
.entity-group .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: .2rem; }

/* ---------------------------------------------------------------- Table */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th, table.data td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data th {
    background: var(--bg-raised);
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 600;
    position: sticky; top: 0;
}
table.data tbody tr:hover { background: var(--panel-hover); }
table.data tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- Misc */

.empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-faint);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}
.empty .glyph { font-size: 34px; opacity: .45; margin-bottom: .5rem; }
.empty h3 { color: var(--text-dim); }

.pager { display: flex; gap: .35rem; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }
.pager button { min-width: 34px; }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; }

.spinner {
    width: 15px; height: 15px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2.5rem; color: var(--text-dim); }

.toast-stack { position: fixed; bottom: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: 340px; }
.toast {
    padding: .65rem .85rem;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 13px;
    animation: toast-in .18s ease-out;
}
.toast-success { border-color: rgba(63,185,138,.5); }
.toast-error { border-color: rgba(224,72,58,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.warn-note {
    font-size: 12px;
    color: #f0d29a;
    background: rgba(224,163,58,.08);
    border: 1px solid rgba(224,163,58,.3);
    border-radius: var(--radius-sm);
    padding: .45rem .6rem;
}

.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;
}

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1020px) {
    .archive { grid-template-columns: 1fr; }
    .filters { position: static; }
    .modal-body { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .topbar { height: auto; flex-wrap: wrap; padding: .6rem .9rem; gap: .6rem; }
    .brand-text em { display: none; }
    /* flex-basis must be reset too: the base rule's `flex: 1` sets a 0
       basis, which would keep the nav on the first row instead of
       wrapping it onto its own line. */
    .topnav { order: 3; flex: 0 0 100%; width: 100%; margin-left: 0; }
    .topbar-user { margin-left: auto; }
    .who strong { display: none; }
    .shell { padding: 1rem .9rem 3rem; }
    .cards { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1; }
    .invite-link { min-width: 0; }
    .field-row { flex-direction: column; }
    .page-head-actions { width: 100%; }
    .modal-backdrop { padding: 0; }
    .modal { max-height: 100vh; height: 100%; border-radius: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------- Preview watermark note */

.preview-note {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-top: .6rem;
    padding: .5rem .7rem;
    border: 1px solid rgba(224, 163, 58, .3);
    background: rgba(224, 163, 58, .08);
    border-radius: var(--radius-sm);
    font-size: 12px;
}
.preview-note strong { color: #f0d29a; font-weight: 700; }
.preview-note span { color: var(--text-dim); }

/* ------------------------------------------------------- Payment result */

.payment-result { text-align: center; padding: .5rem 0 1rem; }
.payment-result h1 { font-size: 1.25rem; margin-bottom: .35rem; }
.payment-result p { color: var(--text-dim); font-size: 13px; margin: 0; }

.payment-glyph {
    width: 52px; height: 52px;
    margin: 0 auto .85rem;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 26px; font-weight: 700; line-height: 1;
    border: 2px solid;
}
.payment-success .payment-glyph { color: var(--ok);     border-color: rgba(63,185,138,.5); background: rgba(63,185,138,.12); }
.payment-warn    .payment-glyph { color: var(--warn);   border-color: rgba(224,163,58,.5); background: rgba(224,163,58,.12); }
.payment-error   .payment-glyph { color: var(--danger); border-color: rgba(224,72,58,.5);  background: rgba(224,72,58,.12); }

.pay-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .15rem .4rem; border-radius: 3px;
    background: rgba(224,163,58,.14); color: #f0d29a; border: 1px solid rgba(224,163,58,.35);
}

/* --------------------------------------------------------- Price flags */

.price-flag {
    display: inline-block;
    margin-left: .35rem;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .1rem .3rem;
    border-radius: 3px;
    border: 1px solid;
    vertical-align: middle;
}
.price-surge { color: #ffb3aa; border-color: rgba(224,72,58,.45);  background: rgba(224,72,58,.14); }
.price-fresh { color: #f0d29a; border-color: rgba(224,163,58,.45); background: rgba(224,163,58,.12); }
.price-floor { color: var(--text-faint); border-color: var(--line); background: var(--panel); }

.floor-set { display: flex; gap: .3rem; align-items: center; }
.floor-set input { width: 110px; padding: .3rem .4rem; font-size: 12px; }

/* ---------------------------------------------------------------- Admin */

.admin-tabs {
    display: flex; gap: .25rem; flex-wrap: wrap;
    margin: -0.5rem 0 1.25rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: .6rem;
}
.admin-tabs a {
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: var(--text-dim);
}
.admin-tabs a:hover { background: var(--panel); color: var(--text); }
.admin-tabs a.is-active { background: var(--accent-soft); color: var(--accent-hot); }

.section-heading {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
    color: var(--text-faint); margin: 1.5rem 0 .6rem;
}
.section-heading:first-of-type { margin-top: 0; }

.stat-sub { display: block; font-style: normal; font-size: 11px; color: var(--text-faint); margin-top: .15rem; }
.stat-good b { color: var(--ok); }
.stat-warn b { color: var(--warn); }
.stat-bad  b { color: var(--danger); }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }

.filter-bar {
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    margin-bottom: 1rem; padding-bottom: .85rem;
    border-bottom: 1px solid var(--line-soft);
}
.filter-bar input, .filter-bar select { width: auto; min-width: 130px; }
.filter-bar input[type=search] { min-width: 220px; }

.row-actions { display: flex; gap: .3rem; flex-wrap: wrap; }
.row-actions form, .inline-form { margin: 0; }
.settle-form { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.settle-form select { width: auto; min-width: 100px; }
.settle-form input[type=text] { width: 130px; }

tr.row-muted { opacity: .5; }

/* Sparkline: two stacked bars per day, uploads and revenue. */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: .5rem 0; }
.spark-col {
    flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
    gap: 1px; height: 100%; min-width: 3px;
}
.spark-bar { width: 100%; border-radius: 1px; min-height: 0; }
.spark-uploads { background: var(--info); }
.spark-sales   { background: var(--ok); }
.spark-col:hover .spark-bar { filter: brightness(1.4); }

.spark-legend {
    display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
    font-size: 11px; color: var(--text-dim); margin-top: .4rem;
}
.spark-legend .swatch {
    display: inline-block; width: 9px; height: 9px; border-radius: 2px;
    margin-right: .25rem; vertical-align: middle;
}
.spark-legend .hint { margin-left: auto; }

/* ------------------------------------------------ Sorting & pagination */

th.sortable { padding: 0; }
th.sortable a {
    display: block;
    padding: .55rem .7rem;
    color: inherit;
    white-space: nowrap;
}
th.sortable a:hover { background: var(--panel-hover); color: var(--text); }
th.sortable.is-sorted a { color: var(--accent-hot); }
th.sortable .sort-hint { opacity: 0; transition: opacity .12s; }
th.sortable a:hover .sort-hint { opacity: .45; }

.panel-head .pager-summary { font-weight: 500; color: var(--text-faint); }
.panel-head .pager-summary b { color: var(--text-dim); font-weight: 600; }

.per-page-form { display: inline-flex; margin-left: .5rem; vertical-align: middle; }
.per-page-form select { width: auto; padding: .18rem 1.5rem .18rem .4rem; font-size: 11px; }

.pager { display: flex; gap: .3rem; justify-content: center; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.pager .btn { min-width: 34px; }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .is-disabled { opacity: .35; cursor: not-allowed; }
.pager-gap { color: var(--text-faint); padding: 0 .15rem; }

/* ---------------------------------------------------------------------
   Provenance
   Deliberately understated. A green chip here means "the file still had
   capture metadata", not "this footage is true" - so it must never look
   like a verification tick.
   --------------------------------------------------------------------- */
.prov-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    padding: .18rem .4rem; border-radius: 3px;
    border: 1px solid transparent; white-space: nowrap;
}
.prov-badge b { font-family: var(--mono); font-weight: 700; opacity: .8; }

.prov-badge.prov-good { background: rgba(63,185,138,.16);  border-color: rgba(63,185,138,.45);  color: #86e3bd; }
.prov-badge.prov-fair { background: rgba(224,163,58,.16);  border-color: rgba(224,163,58,.45);  color: #f0c880; }
.prov-badge.prov-weak { background: rgba(107,118,132,.18); border-color: rgba(107,118,132,.45); color: var(--text-dim); }

/* On a card the chip sits bottom-left, clear of the type, duration and
   licensed badges already occupying the other three corners. */
.card-media .prov-badge {
    position: absolute; bottom: .5rem; left: .5rem;
    backdrop-filter: blur(2px);
    background-color: rgba(11,14,17,.78);
}

.prov-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.prov-score { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 700; }
.prov-score i { font-style: normal; font-size: 11px; color: var(--text-faint); }

.prov-meter {
    height: 4px; border-radius: 2px; background: var(--bg-sunken);
    overflow: hidden; margin-bottom: .5rem;
}
.prov-meter span { display: block; height: 100%; border-radius: 2px; }
.prov-meter .prov-good { background: var(--ok); }
.prov-meter .prov-fair { background: var(--warn); }
.prov-meter .prov-weak { background: var(--text-faint); }

.prov-headline { margin: 0 0 .55rem; font-size: 13px; color: var(--text-dim); }

.prov-signals { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .35rem; }
.prov-signals .sig {
    padding: .4rem .5rem .4rem .65rem;
    background: var(--bg-sunken); border-radius: var(--radius-sm);
    border-left: 2px solid var(--line);
    font-size: 12px; line-height: 1.4;
}
.prov-signals .sig-strong { border-left-color: var(--ok); }
.prov-signals .sig-good   { border-left-color: rgba(63,185,138,.55); }
.prov-signals .sig-weak   { border-left-color: var(--warn); }
.prov-signals .sig-bad    { border-left-color: var(--danger); }
.prov-signals .sig-info   { border-left-color: var(--info); }

.prov-signals .sig-label  { display: block; font-weight: 600; }
.prov-signals .sig-detail { display: block; color: var(--text-dim); }

.prov-caveat { font-size: 11px; line-height: 1.5; }

/* =====================================================================
   Public home page
   The only surface a stranger sees, so it is allowed to breathe in a way
   the working pages deliberately do not.
   ===================================================================== */

.eyebrow {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--accent-hot); margin: 0 0 .5rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 2rem;
    align-items: start;
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--line-soft);
}

.hero h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: .85rem;
    /* No max-width: the hero column already is the measure, and capping
       the headline again just leaves a gap beside it. */
}
.hero-lead { color: var(--text-dim); font-size: 15px; line-height: 1.6; max-width: 58ch; }

.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.25rem 0 1.5rem; }
.hero-actions .btn { padding: .55rem 1rem; font-size: 13px; }

.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.hero-points li {
    font-size: 13px; color: var(--text-dim);
    padding-left: 1.1rem; position: relative;
}
.hero-points li::before {
    content: ''; position: absolute; left: 0; top: .5em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.hero-points b { color: var(--text); font-weight: 600; }

.hero-card { padding: 1rem; }
.hero-card .meta-table th { width: 50%; }

.tier-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .3rem; }
.tier-list li {
    display: flex; align-items: baseline; gap: .5rem;
    font-size: 12.5px; color: var(--text-dim);
}
.tier-list li b { margin-left: auto; font-family: var(--mono); color: var(--text); }

.band { padding: 2.25rem 0; border-bottom: 1px solid var(--line-soft); }
.band:last-of-type { border-bottom: 0; }
.band-head {
    margin-bottom: 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .15rem 2rem;
    align-items: baseline;
}
.band-head h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 0; }
.band-head p { color: var(--text-dim); font-size: 13.5px; margin: 0; max-width: 62ch; }

/* Above this the heading and its one-line lead read better as a row;
   below it they stack, because two short columns is worse than one. */
@media (min-width: 900px) {
    .band-head { grid-template-columns: auto minmax(0, 1fr); }
}
.band-note {
    margin: 1.25rem 0 0; font-size: 13px; color: var(--text-dim);
    max-width: 78ch; line-height: 1.6;
}
.band-note strong { color: var(--text); }

.pipeline {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .85rem;
    counter-reset: pipe;
}
/* Six steps, so three columns read as two clean rows rather than five
   across with one orphan underneath. Below this the auto-fit minimum
   above takes over. */
@media (min-width: 880px) {
    .pipeline { grid-template-columns: repeat(3, 1fr); }
}

.pipe-step {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .95rem 1rem;
}
.pipe-n {
    display: block; font-family: var(--mono); font-size: 11px; font-weight: 700;
    color: var(--accent-hot); letter-spacing: .1em; margin-bottom: .45rem;
}
.pipe-step h3 { font-size: 14px; margin-bottom: .35rem; }
.pipe-step p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }

.audience-grid,
.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem;
}

.audience { display: flex; flex-direction: column; }
.audience h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.audience-lead { color: var(--text-dim); font-size: 13px; line-height: 1.55; }

.benefits { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .5rem; flex: 1; }
.benefits li {
    font-size: 12.5px; line-height: 1.55; color: var(--text-dim);
    padding-left: 1.1rem; position: relative;
}
.benefits li::before {
    content: '\2014'; position: absolute; left: 0; color: var(--accent);
}

.feature h3 { font-size: 14px; }
.feature p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-dim); }

/* auto-fit with a 300px minimum still asks for 300px in a narrower
   container, so the multi-column grids collapse outright below this.
   Same reason as the notice above: declared next to the component, not
   in the shared block earlier in the file. */
@media (max-width: 720px) {
    .audience-grid,
    .feature-grid,
    .deal-cards,
    .pipeline { grid-template-columns: minmax(0, 1fr); }
}

.exclusive-pitch {
    margin-top: 1rem;
    display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap;
    border-color: rgba(224, 72, 58, .35);
}
.exclusive-pitch > div { flex: 1; min-width: 260px; max-width: 78ch; }
.exclusive-pitch h3 { font-size: 1.1rem; }
.exclusive-pitch p { font-size: 13px; line-height: 1.6; color: var(--text-dim); }
.exclusive-pitch strong { color: var(--text); }

/* Heading beside the text rather than above it: a measured paragraph in
   a full-width panel leaves a hole to the right of itself. */
.caveat-panel {
    border-color: rgba(224, 163, 58, .3);
    background: rgba(224, 163, 58, .05);
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.caveat-panel h3 { font-size: 14px; color: #f0d29a; margin: 0; }
.caveat-panel p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--text-dim); }
.caveat-panel strong { color: var(--text); }

@media (max-width: 700px) {
    .caveat-panel { grid-template-columns: 1fr; gap: .5rem; }
}

.closing { text-align: center; }
.closing p { color: var(--text-dim); font-size: 13.5px; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1rem; }
}

/* =====================================================================
   Corporate accounts
   ===================================================================== */

/* Count of things waiting, on a nav item or a tab. */
.nav-badge {
    display: inline-block; margin-left: .35rem;
    min-width: 16px; padding: 0 4px;
    border-radius: 8px;
    background: var(--accent); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    vertical-align: middle;
}

/* Which newsroom you are spending on behalf of, next to the role chip. */
.org-chip {
    font-size: 11px; font-weight: 600;
    padding: .12rem .4rem; border-radius: 3px;
    border: 1px solid var(--line); background: var(--panel);
    color: var(--text-dim);
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.org-chip:hover { color: var(--accent-hot); border-color: var(--accent); }

/* Exclusivity is only ever shown to the newsroom that holds it. */
.exclusive-badge {
    position: absolute; top: .5rem; left: 50%; transform: translateX(-50%);
    font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    padding: .15rem .4rem; border-radius: 3px;
    background: rgba(224, 72, 58, .85); color: #fff;
    white-space: nowrap;
}

/* Account-type picker on the registration form. */
.type-choice { display: grid; gap: .5rem; margin-bottom: 1rem; }
.type-option {
    display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem;
    align-items: start;
    padding: .7rem .8rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    cursor: pointer;
    margin: 0; text-transform: none; letter-spacing: 0;
}
.type-option:hover { border-color: #3a4450; }
.type-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.type-option input { grid-row: span 2; width: auto; margin: .2rem 0 0; accent-color: var(--accent); }
.type-name { font-size: 13px; font-weight: 600; color: var(--text); }
.type-blurb { font-size: 12px; color: var(--text-dim); line-height: 1.45; }

.auth-wrap-wide { max-width: 520px; }

/* An invitation link is a credential, so it is shown as one: selectable,
   monospaced, and never truncated into something half-copied. */
.invite-result input,
.invite-link {
    width: 100%; font-size: 11.5px; padding: .35rem .5rem;
    background: var(--bg-sunken); color: var(--accent-hot);
}
.invite-link { min-width: 260px; }

/* Free text quoted back from a person - a justification, a decision note,
   the terms of a deal. Set apart so it never reads as our own copy. */
.quote-note {
    margin-top: .35rem;
    padding: .3rem .5rem;
    border-left: 2px solid var(--line);
    font-size: 12px; font-style: italic; color: var(--text-dim);
    max-width: 46ch;
}

.explain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.explain-list li { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.explain-list b { color: var(--text); font-weight: 600; }

/* The approve/decline row: note, optional cap, two buttons. */
.decide-form { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin: 0; }
.decide-form input[type=text] { width: 150px; padding: .3rem .4rem; font-size: 12px; }
.decide-form input[type=number] { width: 90px; padding: .3rem .4rem; font-size: 12px; }

.deal-form { max-width: 560px; }
.deal-form textarea { resize: vertical; }

.deal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .85rem; }
.deal-card { padding: .9rem; }
.deal-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .75rem; }
.deal-actions { margin-top: .75rem; display: grid; gap: .5rem; }
.deal-actions input[type=text] { font-size: 12px; padding: .35rem .5rem; }

/* Where an approval stands, inside the licence panel. */
.request-state {
    font-size: 12px; line-height: 1.5;
    padding: .45rem .6rem; margin-bottom: .6rem;
    border-radius: var(--radius-sm); border: 1px solid;
}
.request-pending  { color: #f0d29a; border-color: rgba(224,163,58,.35); background: rgba(224,163,58,.1); }
.request-approved { color: #9fe6c6; border-color: rgba(63,185,138,.35); background: rgba(63,185,138,.1); }
.request-declined { color: #ffb3aa; border-color: rgba(224,72,58,.35);  background: rgba(224,72,58,.1); }

/* =====================================================================
   Data protection
   ===================================================================== */

/* ------------------------------------------------- The privacy notice

   Documentation layout: a contents list beside the text. Long-form prose
   needs a reading measure, but the measure belongs on the PARAGRAPHS -
   put it on the panel instead and the panel shrinks to 589px inside a
   1600px shell, stranding the text in the left third and pushing the
   tables (which carry a 640px min-width) straight out through its edge.
   ------------------------------------------------------------------- */

.notice-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.notice-toc { position: sticky; top: 72px; }
.notice-toc .panel { padding: .85rem; }
.notice-toc nav { display: flex; flex-direction: column; gap: .1rem; }
.notice-toc nav a {
    font-size: 12.5px;
    line-height: 1.35;
    padding: .34rem .5rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    border-left: 2px solid transparent;
}
.notice-toc nav a:hover {
    background: var(--panel-hover);
    border-left-color: var(--accent);
    color: var(--text);
}

.toc-cta { margin-top: 1rem; padding: .85rem; }
.toc-cta p { font-size: 12.5px; color: var(--text-dim); margin: 0 0 .55rem; }
.toc-cta .hint { margin-bottom: 0; }

/* Prose gets the measure; tables and callouts get the whole panel. */
.notice-body > p,
.notice-body > ol,
.notice-body > ul { max-width: 74ch; }
.notice-body p { font-size: 13.5px; line-height: 1.65; }
.notice-body li { margin-bottom: .5rem; font-size: 13.5px; line-height: 1.6; }
.notice-body h2 { margin-top: 1.9rem; scroll-margin-top: 80px; }
.notice-body h2:first-of-type { margin-top: 0; }
.notice-body .table-wrap { margin: .6rem 0 1.1rem; }
.notice-body .meta-table { margin-bottom: 1.1rem; max-width: 74ch; }

/* Six columns of prose is a lot; let them breathe rather than forcing a
   640px minimum that would scroll on every screen. */
.notice-body table.data { min-width: 780px; }
.notice-body table.data td { line-height: 1.45; vertical-align: top; }

/* Below this the contents list has nowhere to sit, so it becomes a row of
   links above the notice. Declared HERE rather than in the shared
   responsive block near the top of this file: that block is earlier, and
   an earlier media query loses to a later rule of the same specificity. */
@media (max-width: 1020px) {
    .notice-layout { grid-template-columns: minmax(0, 1fr); }
    .notice-toc { position: static; }
    .notice-toc nav { flex-direction: row; flex-wrap: wrap; }
    .notice-toc nav a { border-left: 0; border-bottom: 2px solid transparent; }
    .notice-toc nav a:hover { border-left: 0; border-bottom-color: var(--accent); }
    .toc-cta { display: none; }
}

/* Consent checkboxes on the registration form: a wall of legal text with
   a tick next to it is how people agree to things they did not read, so
   each statement gets room to be a sentence. */
.consent-block {
    margin: 1rem 0;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
}
.consent-block .checkline { align-items: flex-start; margin-bottom: .7rem; }
.consent-block .checkline:last-child { margin-bottom: 0; }
.consent-block .checkline input { margin-top: .2rem; }
.consent-block label { line-height: 1.5; font-size: 12.5px; }
.consent-block a { color: var(--accent-hot); text-decoration: underline; }

/* One agreement and its on/off switch, in the privacy centre. */
.consent-row {
    display: flex; gap: 1rem; align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line-soft);
}
.consent-row:last-of-type { border-bottom: 0; }
.consent-row > div:first-child { flex: 1; min-width: 0; }
.consent-row form { margin: 0; flex-shrink: 0; }

/* A rights request in the admin queue. Cards rather than table rows:
   each one carries free text, a deadline and half a dozen actions, and
   none of that survives being squeezed into a column. */
.dsr {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .9rem;
    margin-bottom: .8rem;
    background: var(--bg-sunken);
}
.dsr:last-child { margin-bottom: 0; }

.dsr-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding-bottom: .6rem; margin-bottom: .6rem;
    border-bottom: 1px solid var(--line-soft);
}
.dsr-head .mono { color: var(--accent-hot); font-size: 12px; }
.dsr-head > span:last-child { margin-left: auto; }

.dsr-actions {
    display: flex; flex-direction: column; gap: .5rem;
    margin-top: .8rem; padding-top: .7rem;
    border-top: 1px solid var(--line-soft);
}
.dsr-actions form { margin: 0; }

/* The "record a breach" form is long and rarely used, so it starts
   folded rather than pushing the register off the screen. */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: .3rem; }

/* ---------------------------------------------------------------------
   Cookie notice

   A notice, not a consent gate: this application sets one strictly
   necessary cookie and loads nothing third-party, so there is nothing to
   consent to. Which is why it is a bar and not a modal - blocking the
   page to announce a session cookie is the pattern that taught everyone
   to dismiss dialogs without reading them.
   --------------------------------------------------------------------- */

.cookie-note {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 190;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: cookie-note-in .22s ease-out;
}
.cookie-note[hidden] { display: none; }

.cookie-note-body { flex: 1; min-width: 0; }
.cookie-note-body p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.cookie-note-body strong { color: var(--text); }
.cookie-note-body .hint { margin-top: .3rem; }

.cookie-note-actions { display: flex; gap: .4rem; flex-shrink: 0; align-items: center; }

@keyframes cookie-note-in { from { opacity: 0; transform: translateY(8px); } }

/* It sits over the toast stack's corner, so move the toasts up while it
   is on screen. Scoped to :not([hidden]) - the element stays in the DOM
   after dismissal, so an unscoped sibling selector would keep pushing
   the toasts up for somebody who cleared the bar weeks ago. */
.cookie-note:not([hidden]) ~ .toast-stack { bottom: 7.5rem; }

@media (max-width: 620px) {
    .cookie-note { flex-direction: column; align-items: stretch; gap: .6rem; }
    .cookie-note-actions { justify-content: flex-end; }
}

/* Nobody needs a cookie bar on a sheet of paper. */
@media print {
    .cookie-note { display: none !important; }
}
