/* TESS interface. Colors come only from tokens.css (Cobalt Tide); no literal colors here. */

/* --- Base ---------------------------------------------------------------------- */
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--tess-surface-canvas)}
body{margin:0;background:var(--tess-surface-canvas);color:var(--tess-text-primary);font:15px/1.6 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
main{max-width:1120px;margin:36px auto 48px;padding:0 24px;min-height:65vh}
h1{font-size:28px;line-height:1.2;letter-spacing:-.02em;margin:6px 0 18px}
h2{font-size:20px;line-height:1.3;letter-spacing:-.01em;margin:0 0 12px}
h3{font-size:16px;line-height:1.35;margin:18px 0 8px}
p{margin:0 0 12px}
a{color:var(--tess-link);text-underline-offset:3px}
a:hover{text-decoration-thickness:2px}
code,pre,kbd{font-family:ui-monospace,"Cascadia Code",Consolas,monospace}
small{overflow-wrap:anywhere}
hr{border:0;border-top:1px solid var(--tess-border-default);margin:20px 0}
:focus-visible{outline:var(--tess-focus-width) solid var(--tess-focus-ring);outline-offset:var(--tess-focus-offset)}
.skip{position:absolute;top:-100px;left:12px}
.skip:focus{top:8px;background:var(--tess-surface-raised);color:var(--tess-text-primary);padding:8px 12px;border-radius:6px;z-index:10}
@media (forced-colors:active){:focus-visible{outline:3px solid CanvasText}}

/* --- App header ------------------------------------------------------------------ */
.app-header{position:sticky;top:0;z-index:5;background:var(--tess-navigation-background);border-bottom:1px solid var(--tess-border-default)}
.app-header-inner{max-width:1120px;margin:0 auto;padding:10px 24px;display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--tess-text-primary);text-decoration:none;font-weight:800;font-size:19px;letter-spacing:.08em}
.brand svg{width:30px;height:30px;flex:none}
.brand small{font-size:12px;font-weight:500;letter-spacing:0;color:var(--tess-text-muted)}
.header-nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.header-link{color:var(--tess-navigation-foreground);text-decoration:none;font-weight:600;font-size:14px;padding:6px 10px;border-radius:6px}
.header-link:hover{background:var(--tess-interactive-hover-surface);color:var(--tess-text-primary)}
.header-tools{margin-left:auto;display:flex;align-items:center;gap:10px}
.header-tools form{margin:0}
.badge{border:1px solid var(--tess-border-strong);color:var(--tess-text-secondary);padding:2px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.theme-picker{display:inline-flex;border:1px solid var(--tess-border-control);border-radius:8px;overflow:hidden}
.theme-picker button{background:transparent;color:var(--tess-text-secondary);border:0;border-radius:0;padding:5px 10px;font-size:13px;font-weight:600}
.theme-picker button+button{border-left:1px solid var(--tess-border-default)}
.theme-picker button:hover{background:var(--tess-interactive-hover-surface);color:var(--tess-text-primary)}
.theme-picker button[aria-pressed="true"]{background:var(--tess-selected-surface);color:var(--tess-selected-text);box-shadow:inset 0 -2px 0 var(--tess-selected-indicator)}
.deployment-notice{margin:0;padding:6px 24px;background:var(--tess-warning-surface);color:var(--tess-warning-foreground);font-size:13px;font-weight:600;text-align:center;border-bottom:1px solid var(--tess-border-default)}
footer{padding:24px;text-align:center;color:var(--tess-text-muted);font-size:13px}
footer strong{color:var(--tess-text-secondary)}
body.admin .app-header{box-shadow:inset 0 3px 0 var(--tess-context-pigment)}
.admin-badge{background:var(--tess-context-surface);color:var(--tess-context-foreground);border-color:transparent}

/* --- Workspace header and tabs ---------------------------------------------------- */
.workspace{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.workspace h1{margin-bottom:0}
nav{display:flex;gap:4px;border-bottom:1px solid var(--tess-border-strong);margin:20px 0 28px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
nav a{padding:10px 14px 9px;text-decoration:none;color:var(--tess-navigation-foreground);font-weight:600;font-size:14px;white-space:nowrap;border-bottom:3px solid transparent}
nav a:hover{color:var(--tess-text-primary)}
nav a[aria-current]{color:var(--tess-navigation-selected-foreground);border-bottom-color:var(--tess-navigation-selected-indicator)}
.tabs{display:flex;gap:18px}
.tabs a{text-decoration:none;color:var(--tess-text-secondary);font-weight:600;padding-bottom:4px;border-bottom:3px solid transparent}
.tabs a[aria-current]{color:var(--tess-selected-text);border-bottom-color:var(--tess-selected-indicator)}

/* --- Cards and layout --------------------------------------------------------------- */
.card{background:var(--tess-card-background);border:1px solid var(--tess-card-border);border-radius:12px;padding:24px 28px;margin-bottom:16px}
.compact-card{padding:18px 20px}
.compact-card p:last-child{margin-bottom:0}
.narrow{max-width:460px;margin:0 auto}
.empty{padding:40px;max-width:820px}
.empty p{max-width:640px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-top:24px}
.card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.card-heading h2,.card-heading h3{margin-top:0}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.toolbar .note{margin:0}
.toolbar-actions,.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.eyebrow,.meta{font-size:13px;font-weight:500;color:var(--tess-text-muted);margin:0 0 4px}
.lead{font-size:16px;color:var(--tess-text-secondary)}
.big{font-size:22px;font-weight:750;margin:4px 0}
.note,.helptext,.context-line{color:var(--tess-text-muted);font-size:13px}
.note{margin-top:16px}
.helptext{display:block}
.context-line{margin:0}
.claim-grid{align-items:start}.claim-grid .card{min-width:0}

/* --- Buttons and forms ------------------------------------------------------------ */
button,.button{display:inline-flex;align-items:center;gap:6px;background:var(--tess-button-primary-background);color:var(--tess-button-primary-foreground);padding:9px 16px;border:1px solid transparent;border-radius:8px;font:inherit;font-weight:650;font-size:14px;text-decoration:none;cursor:pointer;line-height:1.3}
button:hover,.button:hover{background:var(--tess-button-primary-hover-background)}
button:active,.button:active{background:var(--tess-button-primary-active-background)}
button:disabled{opacity:.55;cursor:not-allowed}
button.secondary,button.quiet{background:transparent;color:var(--tess-link);border-color:var(--tess-border-control)}
button.secondary:hover,button.quiet:hover{background:var(--tess-interactive-hover-surface)}
button.quiet{color:var(--tess-text-secondary);padding:5px 12px;font-size:13px}
button.small{padding:5px 12px;font-size:13px}
button.chosen{background:var(--tess-selected-surface);color:var(--tess-selected-text);border-color:var(--tess-selected-indicator)}
label{display:block;font-weight:600;margin-top:14px;font-size:14px}
input,select,textarea{display:block;width:100%;padding:9px 11px;border:1px solid var(--tess-form-border);border-radius:7px;background:var(--tess-form-background);color:var(--tess-form-foreground);font:inherit;margin:5px 0 16px}
input[type=checkbox],input[type=radio]{display:inline-block;width:auto;margin:0;accent-color:var(--tess-brand-primary)}
input::placeholder,textarea::placeholder{color:var(--tess-text-muted)}
label.inline{display:inline-flex;align-items:center;gap:6px;margin:0 12px 0 0;font-weight:500}
label.wide input{width:18rem}
input.short{width:7rem;display:inline-block;margin-left:8px}
.inline-form{display:inline-flex;gap:8px;align-items:center;margin:2px 0;flex-wrap:wrap}
.inline-form input{margin:0;width:auto;min-width:16rem}
.inline-form select.compact{margin:0;width:auto}
.inline-form input[type=checkbox]{min-width:0}
.inline-form input.money{min-width:0;width:7rem}
.org-settings{flex-wrap:nowrap;gap:12px}.org-settings label.inline{margin:0;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;justify-content:flex-start}
.inline-form label{margin:0}
.errorlist{color:var(--tess-form-invalid-text);background:var(--tess-danger-surface);border-radius:8px;padding:10px 14px;list-style:none;margin:8px 0}
ul.errorlist{padding-left:14px}
.has-error input,.has-error select,.has-errors{border-color:var(--tess-form-invalid-border)}
.saved{background:var(--tess-success-surface);color:var(--tess-success-foreground);border-radius:8px;padding:10px 14px;font-weight:600}
.form-field{margin-bottom:18px}
.checkbox-row{display:flex;align-items:start;gap:10px}
.source-form{max-width:760px}
.source-form input[type=checkbox]{display:inline-block;width:auto}
.source-form #id_profile_ids label{display:flex;gap:10px;align-items:center;margin:6px 0;font-weight:400}
.feedback-form{margin-top:1rem}.feedback-form select,.feedback-form textarea{max-width:42rem}
.rules-form textarea,.reprocess-form textarea{min-height:6rem}
.rule-row{padding:18px 24px}.rule-row legend{font-weight:700;color:var(--tess-text-secondary)}
.rule-grid{display:grid;grid-template-columns:1fr auto;gap:16px}.rule-grid label,.rule-grid input{margin-top:0}
.inline-row{display:flex;justify-content:space-between;align-items:center;font-weight:500;margin:6px 0}.inline-row input{margin:0;width:7rem}
.suggestion{display:block;font-weight:500;margin:10px 0}.suggestion input{display:inline;width:auto;margin:0 8px 0 0}.suggestion .helptext{margin-left:28px}
fieldset{border:1px solid var(--tess-border-default);border-radius:10px;padding:12px 16px;margin:0 0 12px}
legend{font-weight:700;font-size:14px;padding:0 4px}
details summary{cursor:pointer;font-weight:650;color:var(--tess-link)}

/* --- Tables and lists ------------------------------------------------------------- */
table.table,table.factors,table.people{width:100%;border-collapse:collapse;margin:8px 0 12px;font-size:14px}
.table th,.table td,.factors th,.factors td,.people th,.people td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--tess-border-default);vertical-align:top}
.table th,.factors th,.people th{font-size:13px;color:var(--tess-text-muted);font-weight:600}
.table tbody tr:hover,.people tbody tr:hover{background:var(--tess-interactive-hover-surface)}
.factors .num{text-align:right;white-space:nowrap}
.factors tr.neg td{color:var(--tess-negative-foreground)}
.factors tr.total td{font-weight:750;border-top:2px solid var(--tess-border-control)}
.plain-list,ul.plain,.preview-list{list-style:none;padding:0;margin:0}
.plain-list li{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--tess-border-default);padding:10px 0}
ul.plain li,.preview-list li{padding:8px 0;border-bottom:1px solid var(--tess-border-default)}
.limitations,.revision-list{padding-left:24px}
.health-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:20px 0}
.health-grid div{border-left:3px solid var(--tess-border-strong);padding:4px 12px}
.health-grid dt{color:var(--tess-text-muted);font-size:13px;font-weight:600}
.health-grid dd{margin:2px 0}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.claim-grid pre,details pre{background:var(--tess-surface-inset);border-radius:8px;padding:14px;max-height:28rem;overflow:auto}
blockquote{margin:16px 0;border-left:4px solid var(--tess-border-control);padding:2px 16px;color:var(--tess-text-secondary)}
blockquote footer{padding:0;text-align:left}

/* --- Status, tags, notices -------------------------------------------------------- */
.status,.tag{display:inline-block;border-radius:999px;background:var(--tess-surface-inset);color:var(--tess-text-secondary);padding:3px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.status-healthy{background:var(--tess-success-surface);color:var(--tess-success-foreground)}
.status-failed,.status-partial{background:var(--tess-danger-surface);color:var(--tess-danger-foreground)}
.status-retrying,.status-due{background:var(--tess-warning-surface);color:var(--tess-warning-foreground)}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0}
.chip{background:var(--tess-surface-inset);color:var(--tess-text-secondary);border:1px solid var(--tess-border-default);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:600}
.chip.neg,.tag.neg{background:var(--tess-negative-surface);color:var(--tess-negative-foreground);border-color:transparent}
.notice{border-left:4px solid var(--tess-warning-pigment);background:var(--tess-warning-surface)}
.safe-error,.limitation{background:var(--tess-danger-surface);color:var(--tess-danger-foreground);border-left:4px solid var(--tess-danger-pigment);padding:10px 14px;border-radius:0 8px 8px 0;overflow-wrap:anywhere}
.mock-label{background:var(--tess-info-surface);color:var(--tess-info-foreground);border-left:4px solid var(--tess-info-pigment);padding:10px 14px}
.judged-relevant{color:var(--tess-positive-foreground)}.judged-not_relevant{color:var(--tess-negative-foreground)}
.retained-text,.retained-body,.feedback-note,.excerpt{white-space:pre-wrap;overflow-wrap:anywhere}
.retained-body{max-width:78ch}
.candidate-result,.attempt-record{border-top:1px solid var(--tess-border-default);padding-top:16px;margin-top:16px}

/* --- Report items and judging ----------------------------------------------------- */
.item{padding:20px 24px}
.item h2{margin:2px 0 6px;font-size:18px}
.item h3{margin:2px 0 6px;font-size:18px;line-height:1.35}
.item h3 a{color:var(--tess-text-primary);text-decoration:none}
.item h3 a:hover{color:var(--tess-link);text-decoration:underline}
.item .excerpt{color:var(--tess-text-secondary);font-size:14px}
.item.muted{opacity:.85}
.item-head{display:flex;gap:18px;align-items:flex-start}
.report-title{margin:0}
.score{min-width:52px;text-align:center;font-weight:800;font-size:18px;border-radius:8px;padding:8px 6px}
.score-shown{background:var(--tess-accent-surface);color:var(--tess-accent-foreground)}
.score-hidden{background:var(--tess-surface-inset);color:var(--tess-text-muted)}
.also{font-size:13px;color:var(--tess-text-muted);margin:4px 0}
.source-level{font-size:13px;color:var(--tess-text-muted);margin:6px 0;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.source-level button.chip{cursor:pointer;font:inherit;font-size:12px;font-weight:600;padding:2px 10px}
.source-level button.chip:hover{border-color:var(--tess-border-control);background:var(--tess-interactive-hover-surface)}
.source-level button.chip.on{background:var(--tess-selected-surface);color:var(--tess-selected-text);border-color:var(--tess-selected-indicator)}
.judged{color:var(--tess-text-secondary);font-size:14px;background:var(--tess-surface-subtle);border-radius:8px;padding:8px 12px}
.judge{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.judge select,.judge input{display:inline-block;width:auto;margin:0 0 0 6px;padding:6px}
.judge-fields{margin-top:10px}
.judge-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:10px}
.judge-card fieldset{margin:0}
.choices{display:flex;flex-wrap:wrap;gap:6px 14px;margin:6px 0 10px}
.choices label{display:inline-flex;align-items:center;gap:5px;margin:0;font-weight:500}
.judge-card select,.judge-card input[type=text],.judge-card input:not([type]){margin:4px 0 8px}
.submit-bar,.cr-actions{position:sticky;bottom:0;background:var(--tess-surface-canvas);border-top:1px solid var(--tess-border-default);padding:12px 0;display:flex;gap:14px;align-items:center;z-index:2}
.reminder{}

/* --- One-at-a-time review ----------------------------------------------------------- */
.card-review{max-width:860px;margin:0 auto}
.cr-top{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:8px 0 16px;flex-wrap:wrap}
.cr-progress{display:flex;align-items:center;gap:12px;min-width:280px;font-weight:600}
.cr-bar{flex:1;height:8px;background:var(--tess-surface-inset);border-radius:4px;overflow:hidden}
.cr-bar div{height:8px;background:var(--tess-brand-primary)}
.cr-article h1{font-size:26px;line-height:1.25;margin:4px 0 14px}
.cr-tldr{background:var(--tess-accent-surface);border-radius:12px;padding:14px 20px;margin-bottom:12px}
.cr-tldr ul{margin:6px 0;padding-left:20px}.cr-tldr li{margin:4px 0;line-height:1.5}
.cr-label{font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--tess-accent-foreground)}
.cr-why{border-top:1px solid var(--tess-border-default);padding-top:10px;font-size:14px}
.cr-q{font-size:17px;margin:0 0 12px}
.cr-judgments{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.cr-judgment{margin:0;cursor:pointer}
.cr-judgment input,.cr-chip input{position:absolute;opacity:0;width:1px;height:1px}
.cr-judgment span{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:56px;border:1px solid var(--tess-border-control);border-radius:10px;font-weight:600;text-align:center;padding:4px;background:var(--tess-surface-base)}
.cr-judgment span:hover,.cr-chip span:hover{background:var(--tess-interactive-hover-surface)}
.cr-judgment input:focus-visible+span,.cr-chip input:focus-visible+span{outline:var(--tess-focus-width) solid var(--tess-focus-ring);outline-offset:var(--tess-focus-offset)}
.cr-judgment input:checked+span,.cr-chip input:checked+span{background:var(--tess-button-primary-background);color:var(--tess-button-primary-foreground);border-color:var(--tess-button-primary-background)}
.cr-judgment[data-tone=no] input:checked+span{background:var(--tess-danger-surface);color:var(--tess-danger-foreground);border-color:var(--tess-danger-foreground)}
.cr-judgment[data-tone=wait] input:checked+span{background:var(--tess-surface-inset);color:var(--tess-text-primary);border-color:var(--tess-border-control)}
kbd{font-size:11px;opacity:.75;margin-left:6px}.cr-judgment kbd{margin:2px 0 0}
.cr-reasons{margin-top:18px}
.cr-chips{display:flex;flex-wrap:wrap;gap:8px}
.cr-chip{margin:0;cursor:pointer}
.cr-chip span{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid var(--tess-border-control);border-radius:20px;font-weight:500;background:var(--tess-surface-base)}
.cr-note{display:block;margin-top:12px;font-weight:500}.cr-note input{margin-top:4px}
.cr-actions #cr-hint{flex:1;text-align:right}
.cr-done{text-align:center}

/* --- Sign-in and account security --------------------------------------------------- */
.profile{width:100%;justify-content:space-between;margin-top:12px}
.setup-key{display:inline-block;font-size:16px;letter-spacing:.08em;background:var(--tess-surface-inset);padding:6px 10px;border-radius:6px;word-break:break-all;margin:6px 0}
/* QR codes stay black on white in both themes so phones can scan them. */
.qr{margin:10px 0;line-height:0;background:#fff;display:inline-block;padding:10px;border-radius:8px}
.qr svg{width:220px;height:220px;image-rendering:pixelated}
.code-list{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;font-size:18px;letter-spacing:.05em}
.backup-codes{border:2px solid var(--tess-warning-pigment);background:var(--tess-warning-surface);border-radius:10px;padding:14px 18px;margin:12px 0}

/* --- Small screens ----------------------------------------------------------------- */
@media (max-width:760px){
  .judge-grid{grid-template-columns:1fr}
  .cr-judgments{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:600px){
  main{padding:0 16px;margin-top:20px}
  .workspace,.card-heading{align-items:start;flex-direction:column}
  .card{padding:18px}
  .empty{padding:24px}
  .header-tools{margin-left:0}
  .health-grid{grid-template-columns:1fr}
  h1{font-size:24px}
  .inline-form input{min-width:0;width:100%}
}
.card>h2:first-child,.card>h3:first-child{margin-top:0}

/* --- Your site: page tree ---------------------------------------------------------- */
.site-tree{list-style:none;margin:8px 0 0;padding:0;font-size:14px}
.site-tree li{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;padding:7px 0 7px calc(var(--depth,0) * 22px);border-bottom:1px solid var(--tess-border-default)}
.site-tree li:not(.depth-0){background-image:linear-gradient(var(--tess-border-strong),var(--tess-border-strong));background-repeat:no-repeat;background-size:1px 100%;background-position:calc(var(--depth,0) * 22px - 12px) 0}
.tree-section{font-weight:700}
.tree-meta{margin-left:auto;color:var(--tess-text-muted);font-size:13px;white-space:nowrap}
.site-tree li.not-content a{color:var(--tess-text-secondary)}

/* --- Setup ------------------------------------------------------------------------- */
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:4px 24px}
.steps{padding-left:22px;color:var(--tess-text-secondary)}.steps li{margin:4px 0}
.topic-list{list-style:none;padding:0;margin:8px 0}
.topic-list li{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--tess-border-default)}
.topic-list li input:not([type]){margin:0;width:auto;flex:1;min-width:14rem}
.topic-list .helptext{flex-basis:100%;margin-left:62px}
.topic-list label.star{color:var(--tess-importance-foreground)}
.explanation{padding-left:20px}.explanation li{margin:6px 0}
.setup-form .table td input[type=radio]{margin:0}
.tree-action{display:inline-flex;gap:4px;margin:0}
.tree-action button.quiet{padding:2px 10px;font-size:12px}
.site-tree li:target{background-color:var(--tess-selected-surface)}

/* --- Content ----------------------------------------------------------------------- */
.content-row{display:flex;justify-content:space-between;align-items:center;gap:16px}
.content-row form{margin:0}
.angle-list{list-style:none;padding:0;margin:8px 0}
.angle-list li{border:1px solid var(--tess-border-default);border-radius:10px;padding:12px 16px;margin-bottom:10px}
.angle-list li p{margin:6px 0 0 26px}
.angle-list label{margin:0;display:flex;gap:8px;align-items:center}
.angle-list textarea{margin:8px 0 0}
.checks{list-style:none;padding:0;margin:8px 0 16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:6px 18px;font-size:14px}
.checks li.ok{color:var(--tess-success-foreground)}
.checks li.warn{color:var(--tess-warning-foreground)}
.export{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.article-preview{max-width:78ch}
.article-preview h1{font-size:26px}
.article-preview h2{font-size:20px;margin-top:22px}
textarea.mono{font-family:ui-monospace,"Cascadia Code",Consolas,monospace;font-size:13px;line-height:1.55}
.image-slot img{display:block;width:100%;height:auto;border-radius:10px;border:1px solid var(--tess-border-default);margin:6px 0}
.image-slot details{margin-top:8px}
.image-slot img.social-card{max-width:360px}
.facts{display:grid;grid-template-columns:max-content 1fr;gap:6px 18px;margin:12px 0}
.found-list{list-style:none;padding:0;margin:8px 0;columns:2}.found-list li{margin:2px 0}.found-list li.ok{color:var(--tess-status-healthy,inherit)}
.look{margin-top:18px;padding-top:14px;border-top:1px solid var(--tess-border-default)}
.look blockquote{margin:8px 0;padding:8px 12px;border-left:3px solid var(--tess-border-default)}
.facts dt{color:var(--tess-text-secondary)}.facts dd{margin:0}
.category-list{display:flex;flex-wrap:wrap;gap:4px 16px;max-height:180px;overflow-y:auto;margin:4px 0 8px}
.sends{list-style:none;padding:0;margin:12px 0 0}.sends li{padding:8px 0;border-top:1px solid var(--tess-border-default)}

/* Header: where you are, and where you can go */
.switcher{position:relative;margin-left:4px}
.switcher summary{list-style:none;display:inline-flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid var(--tess-border-control);border-radius:8px;cursor:pointer;font-weight:600;font-size:14px;color:var(--tess-text-primary);white-space:nowrap}
.switcher summary::-webkit-details-marker{display:none}
.switcher .caret{font-size:11px;color:var(--tess-text-secondary)}
.org-badge{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;font-size:11px;font-weight:800;color:#fff;flex:none}
.switcher-menu{position:absolute;left:0;top:calc(100% + 6px);z-index:20;min-width:240px;max-height:70vh;overflow:auto;background:var(--tess-card-background);border:1px solid var(--tess-card-border);border-radius:10px;padding:6px;display:grid;gap:2px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.switcher-menu a,.switcher-menu .switch-org{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:6px;text-decoration:none;color:var(--tess-text-primary);font-size:14px}
.switcher-menu span.switch-org{color:var(--tess-text-secondary);font-weight:600;padding-top:10px}
.switcher-menu a.switch-profile{padding-left:40px}
.switcher-menu a:hover{background:var(--tess-interactive-hover-surface)}
.switcher-menu a[aria-current]{font-weight:700;background:var(--tess-selected-surface)}
/* Home: one card per profile */
.home-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.pcard{display:flex;flex-direction:column;gap:12px;margin:0}
.pcard .who{display:flex;align-items:center;gap:10px}
.pcard .who h2{margin:0;font-size:19px}
.pcard .who .org{font-size:12.5px;color:var(--tess-text-muted)}
.pcard .big{margin:0;font-size:15px}
.pcard ul{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.pcard li{font-size:14px;line-height:1.4}
.pcard li .src{display:block;font-size:12.5px;color:var(--tess-text-muted)}
.pcard .pri{display:inline-block;font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--tess-danger-surface);color:var(--tess-danger-foreground);margin-right:6px;vertical-align:1px}
.pcard .foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--tess-border-default);padding-top:12px;font-size:12.5px;color:var(--tess-text-muted)}
.pcard .warn{margin:0;font-size:13px;color:var(--tess-warning-foreground)}
.not-set-up{margin-top:28px}
.not-set-up .chips{display:flex;flex-wrap:wrap;gap:8px}
.not-set-up form{margin:0}
/* Profile tabs: four groups, with pages inside two of them */
nav.subnav{margin:-20px 0 24px;border-bottom:0}
nav.subnav a{font-size:13px;padding:6px 12px;border-bottom-width:2px}
@media (max-width:640px){.switcher summary{max-width:52vw;overflow:hidden;text-overflow:ellipsis}}
.org-hint{color:var(--tess-text-muted);font-weight:500}
.learned-words{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.learned-words h2{font-size:16px}
.learned-words ul{margin:0;padding-left:18px}
@media (max-width:640px){.learned-words{grid-template-columns:1fr}}
.learned-line{font-size:13px;color:var(--tess-text-muted);margin:4px 0 0}
.table-wrap{overflow-x:auto}
.ledger{width:100%;border-collapse:collapse;font-size:14px}
.ledger th,.ledger td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--tess-border-default);vertical-align:top}
.ledger th{font-weight:600;color:var(--tess-text-muted)}
.ledger tr.ignored td{opacity:.65}

/* ===================================================================================
   Desk: a dark sidebar with light panels, IBM Plex Sans for the interface and IBM Plex
   Serif for headlines. Phones get a top bar and a bottom tab bar instead of the sidebar.
   =================================================================================== */
@font-face{font-family:"IBM Plex Sans";font-weight:400;font-display:swap;src:url("fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:500;font-display:swap;src:url("fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:600;font-display:swap;src:url("fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Sans";font-weight:700;font-display:swap;src:url("fonts/ibm-plex-sans-latin-700-normal.c277d7b83f8a.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Serif";font-weight:500;font-display:swap;src:url("fonts/ibm-plex-serif-latin-500-normal.1939d6f61ac1.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Serif";font-weight:600;font-display:swap;src:url("fonts/ibm-plex-serif-latin-600-normal.396d53ed9d89.woff2") format("woff2")}
body{font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
h1{font-family:"IBM Plex Serif",Georgia,serif;font-weight:600;letter-spacing:-.01em}
button,.button{font-weight:600}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Sidebar */
.rail{display:none}
@media (min-width:960px){
  body.has-rail .rail{display:flex;flex-direction:column;gap:2px;position:fixed;inset:0 auto 0 0;width:240px;padding:18px 12px;background:var(--tess-rail-background);color:var(--tess-rail-foreground);overflow-y:auto;z-index:6}
  body.has-rail .app-header{display:none}
  body.has-rail main,body.has-rail footer{margin-left:240px}
  body.has-rail main{max-width:none;padding:0 40px;margin-top:32px}
  body.has-rail main>*{max-width:1000px}
  body.has-rail .tabbar{display:none}
}
.rail .brand{color:#fff;padding:2px 8px 16px;font-size:18px}
.rail .brand svg{width:26px;height:26px}
.rail-group{margin:16px 8px 6px;font-size:12px;font-weight:600;color:var(--tess-rail-muted)}
.rail-link{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;color:var(--tess-rail-foreground);text-decoration:none;font-size:14px;font-weight:500;line-height:1.3}
.rail-link small{display:block;font-size:12px;color:var(--tess-rail-muted);font-weight:400}
.rail-link:hover{background:var(--tess-rail-hover);color:#fff}
.rail-link[aria-current]{background:var(--tess-rail-selected);color:var(--tess-rail-selected-foreground)}
.rail-link[aria-current] small{color:var(--tess-rail-foreground)}
nav.rail-sub{display:grid;gap:1px;margin:2px 0 8px;border:0;overflow:visible}
nav.rail-sub a{border:0;display:block;padding:5px 8px 5px 42px;border-radius:7px;color:var(--tess-rail-foreground);text-decoration:none;font-size:13.5px}
nav.rail-sub a:hover{background:var(--tess-rail-hover);color:#fff}
nav.rail-sub a[aria-current]{color:#fff;font-weight:600;box-shadow:inset 3px 0 0 var(--tess-brand-primary);background:var(--tess-rail-hover)}
.rail-foot{margin-top:auto;padding-top:14px;border-top:1px solid var(--tess-rail-border);display:grid;gap:2px}
.rail-foot form{margin:0}
.rail-button{width:100%;background:transparent;border:0;font:inherit;font-size:14px;font-weight:500;cursor:pointer;text-align:left}
.rail-button:hover{background:var(--tess-rail-hover)}

/* Phones and small windows: top bar, menu, and a tab bar at the bottom */
.more-menu{position:relative;margin-left:auto}
.more-menu summary{list-style:none;cursor:pointer;padding:6px 10px;border:1px solid var(--tess-border-control);border-radius:8px;font-size:14px;font-weight:600;color:var(--tess-text-primary)}
.more-menu summary::-webkit-details-marker{display:none}
.more-items{position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:180px;background:var(--tess-card-background);border:1px solid var(--tess-card-border);border-radius:10px;padding:6px;display:grid;gap:2px;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.more-items a{padding:8px 10px;border-radius:6px;text-decoration:none;color:var(--tess-text-primary);font-size:14px}
.more-items a:hover{background:var(--tess-interactive-hover-surface)}
.more-items form{margin:0}.more-items button{width:100%;justify-content:flex-start}
.app-header .header-tools{margin-left:0}
nav.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:8;margin:0;display:flex;justify-content:space-around;gap:0;background:var(--tess-rail-background);border:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));overflow:visible}
nav.tabbar a{flex:1;text-align:center;padding:10px 4px;font-size:13px;font-weight:600;color:var(--tess-rail-foreground);border:0;border-radius:8px}
nav.tabbar a[aria-current]{color:#fff;background:var(--tess-rail-selected)}
body.in-profile{padding-bottom:64px}
body.in-profile .submit-bar,body.in-profile .cr-actions{bottom:56px}
@media (min-width:960px){body.in-profile{padding-bottom:0}body.in-profile .submit-bar,body.in-profile .cr-actions{bottom:0}}

/* Page heading and section tabs */
.workspace h1{font-size:30px}
nav.subnav{margin:6px 0 24px;border-bottom:1px solid var(--tess-border-default);gap:2px}
nav.subnav a{font-size:14px;padding:8px 12px;border-bottom-width:2px}

/* Report page */
.report-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 20px}
.report-pick{margin:0}
.report-pick select{margin:0;width:auto;min-width:15rem;font-weight:600}
.report-bar .toolbar-actions{margin-left:auto}
.counts{color:var(--tess-text-secondary);margin:0 0 22px;max-width:72ch}
.counts strong{color:var(--tess-text-primary);font-weight:600}
h2.tier{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;color:var(--tess-text-secondary);margin:26px 0 10px}
h2.tier .count{background:var(--tess-surface-inset);color:var(--tess-text-primary);border-radius:999px;padding:1px 9px;font-size:12.5px}
.item{padding:18px 22px;border-radius:12px}
.item.is-priority{box-shadow:inset 3px 0 0 var(--tess-danger-pigment)}
.item.is-near{border-style:dashed}
.pri.near{background:var(--tess-context-surface);color:var(--tess-context-foreground);margin-right:6px}
.item .meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.item h3{font-family:"IBM Plex Serif",Georgia,serif;font-weight:500;font-size:19px;line-height:1.38;margin:4px 0 8px}
.pri{display:inline-block;font-size:11.5px;font-weight:700;padding:1px 8px;border-radius:999px;background:var(--tess-danger-surface);color:var(--tess-danger-foreground)}
.tldr{margin:8px 0 0;padding-left:18px;color:var(--tess-text-secondary);font-size:14.5px;line-height:1.55}
p.tldr{padding-left:0}
.tldr li{margin:3px 0}
.answer{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:14px}
.pick,.pill{position:relative;margin:0;cursor:pointer;font-weight:500}
.pick input,.pill input{position:absolute;opacity:0;width:1px;height:1px}
.pick span{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border:1px solid var(--tess-border-control);border-radius:999px;font-size:14px;background:var(--tess-surface-base);color:var(--tess-text-primary)}
.pick span:hover,.pill span:hover{background:var(--tess-interactive-hover-surface)}
.pick input:focus-visible+span,.pill input:focus-visible+span{outline:var(--tess-focus-width) solid var(--tess-focus-ring);outline-offset:var(--tess-focus-offset)}
.pick-accept input:checked+span{background:var(--tess-success-surface);border-color:var(--tess-success-foreground);color:var(--tess-success-foreground);font-weight:600}
.pick-reject input:checked+span{background:var(--tess-danger-surface);border-color:var(--tess-danger-foreground);color:var(--tess-danger-foreground);font-weight:600}
.pick-review input:checked+span{background:var(--tess-surface-inset);border-color:var(--tess-text-secondary);font-weight:600}
.answer .source-level{margin:0 0 0 auto}
.more-answer{margin-top:10px}
.more-answer summary{font-size:14px;font-weight:600}
.more-answer .judge-grid{border-top:1px solid var(--tess-border-default);padding-top:12px;margin-top:10px}
.field-label{font-weight:600;font-size:14px;margin:0 0 8px}
.pills{display:flex;flex-wrap:wrap;gap:6px}
.pill span{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border:1px solid var(--tess-border-default);border-radius:8px;font-size:13.5px;background:var(--tess-surface-subtle)}
.pill input:checked+span{border-color:var(--tess-brand-primary);color:var(--tess-selected-text);background:var(--tess-selected-surface);font-weight:600}
.submit-bar{padding:12px 0}
@media (max-width:640px){
  .answer .source-level{margin-left:0;width:100%}
  .report-pick,.report-pick select{width:100%}
  .report-bar .toolbar-actions{margin-left:0;width:100%}
  .item h3{font-size:17.5px}
  .workspace h1{font-size:26px}
}

/* One-at-a-time review: the bar at the bottom stays on one line on phones */
.cr-actions{flex-wrap:wrap;row-gap:6px}
.cr-actions #cr-hint{flex-basis:100%;order:-1;text-align:left;font-size:13px;margin:0}
.cr-actions #cr-hint:empty{display:none}
.cr-actions button[type=submit],.cr-actions .primary{margin-left:auto}
.cr-judgments{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:760px){.cr-judgments{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Home */
.pcard .who a{color:inherit;text-decoration:none}
.pcard .who a:hover h2{text-decoration:underline}
.pcard .who h2{font-family:"IBM Plex Serif",Georgia,serif;font-weight:600}
.home-item{border-top:1px solid var(--tess-border-default);padding-top:10px}
.home-item:first-child{border-top:0;padding-top:0}
.home-item summary{list-style:none;cursor:pointer;display:flex;gap:8px;align-items:flex-start;color:var(--tess-text-primary);font-weight:500;font-size:14px;line-height:1.4}
.home-item summary::-webkit-details-marker{display:none}
.home-item summary::after{content:"";flex:none;width:8px;height:8px;margin:5px 2px 0 auto;border-right:2px solid var(--tess-text-muted);border-bottom:2px solid var(--tess-text-muted);transform:rotate(45deg);transition:transform .15s}
.home-item[open] summary::after{transform:rotate(-135deg);margin-top:9px}
.home-item .src{display:block;font-size:12.5px;color:var(--tess-text-muted);font-weight:400}
.home-item .tldr{font-size:13.5px;margin:8px 0}
.home-item .quick{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:8px}
.home-item .quick form{margin:0}
.home-item .quick .said{font-size:13px;color:var(--tess-text-secondary)}
.pcard .view-report{font-weight:600;font-size:14px}
@media (prefers-reduced-motion:reduce){.home-item summary::after{transition:none}}
a.button.secondary{background:transparent;color:var(--tess-link);border-color:var(--tess-border-control)}
a.button.secondary:hover{background:var(--tess-interactive-hover-surface)}
@media (max-width:640px){kbd{display:none}}
.workspace .context-line{margin-top:2px}
p.saved{margin:0 0 16px}
@media (max-width:640px){
  .submit-bar .note{display:none}
  .submit-bar{padding:8px 0}
  .submit-bar button{width:100%;justify-content:center}
}
.cr-done{text-align:left;max-width:720px;margin:0 auto}
.cr-done h2{font-family:"IBM Plex Serif",Georgia,serif;font-size:24px;margin:4px 0 8px}
.cr-done .tally{font-size:16px;color:var(--tess-text-secondary)}
.good-picks{list-style:none;padding:0;margin:4px 0 16px;display:grid;gap:8px}
.good-picks li{border-left:3px solid var(--tess-success-pigment);padding:2px 0 2px 12px;font-size:14.5px}
.good-picks .src{display:block;font-size:12.5px;color:var(--tess-text-muted)}
.learn-note{background:var(--tess-surface-subtle);border:1px solid var(--tess-border-default);border-radius:10px;padding:12px 16px;margin:8px 0 18px}
.learn-note p{margin:0 0 6px;font-size:14.5px}
.done-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap}

/* Sources list: name, status, and buttons sit in fixed columns so every row lines up */
.source-card .card-heading{display:grid;grid-template-columns:minmax(0,1fr) 9rem 15.5rem;align-items:center;gap:12px}
.source-card .card-heading h2{margin:0}
.source-card .card-heading .status{justify-self:start}
.source-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.source-actions form{margin:0}
@media (max-width:640px){
  .source-card .card-heading{grid-template-columns:minmax(0,1fr) auto}
  .source-actions{grid-column:1/-1;justify-content:flex-start}
}

/* Review notes: start small, drag the corner to make them longer */
.judge-grid textarea,.cr-note textarea{resize:vertical;min-height:3.4em;line-height:1.45}

/* Never show this: the word box opens with its reason */
.block-word{display:none;margin:10px 0 4px}
.block-word.open,.why-not:has(input[value="blocked"]:checked) .block-word{display:block}
.block-word input[type=text],.block-word input:not([type]){max-width:22rem}
.block-word .note{margin:4px 0 0}
.plain-list{margin:6px 0 10px;padding-left:20px}.plain-list li{margin:4px 0;line-height:1.5}

.site-form{display:grid;gap:6px;max-width:36rem}.site-form input:not([type=checkbox]){margin:0 0 6px}
.site-form button{justify-self:start;margin-top:6px}

/* Logos ATLAS read from the organization's site */
.org-logo{width:22px;height:22px;border-radius:5px;object-fit:contain;background:#fff;flex:none;vertical-align:middle}
.profile-logo{width:36px;height:36px;border-radius:8px;object-fit:contain;background:#fff;vertical-align:middle;margin-right:12px;position:relative;top:-3px}

.why-matters{margin:8px 0 0;color:var(--tess-text-primary);line-height:1.5}
.why-matters strong{color:var(--tess-accent-foreground);font-weight:600}

/* Admin Sources: one card per source; three columns on wide screens, stacked when narrow */
.admin-sources{display:grid;gap:10px}
.admin-source{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1.2fr) minmax(15rem,1fr);gap:8px 20px;padding:14px 18px;margin:0}
.admin-source.is-broken{border-left:3px solid var(--tess-danger-pigment)}
.admin-source h2{font-size:16px;margin:0 0 2px}
.admin-source p{margin:2px 0}
.admin-source .as-url{overflow-wrap:anywhere}
.as-actions{display:grid;gap:8px;align-content:start}
.as-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0}
.as-label{font-size:13px;color:var(--tess-text-muted);min-width:3.6rem}
.as-row select{max-width:11rem;min-width:0;flex:1}
#add-source summary{cursor:pointer;font-weight:600}
.add-source-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:10px 16px;align-items:start;margin-top:10px}
.add-source-form label{display:grid;gap:4px}
.add-source-form input,.add-source-form select,.add-source-form textarea{width:100%}
.add-source-form button{justify-self:start;align-self:end}
.add-source-form textarea{min-height:2.6rem}
.as-email summary{cursor:pointer;color:var(--tess-link);font-weight:600}
.as-email input{width:100%;margin:4px 0 6px}
@media (max-width:1000px){.admin-source{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.as-actions{grid-column:1/-1}}
@media (max-width:640px){.admin-source{grid-template-columns:minmax(0,1fr)}}
.library-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.library-filter select{max-width:18rem}
.library-list{list-style:none;margin:0;padding:0}
.library-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--tess-border-default)}
.library-list li:last-child{border-bottom:0}
.library-list .note{overflow-wrap:anywhere}

.admin-tabs{display:flex;gap:16px;margin:10px 0 0}.admin-tabs a[aria-current]{font-weight:700;text-decoration:none}
.unmatched-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px 16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--tess-border-default)}
.unmatched-row select{max-width:100%;min-width:0;flex:1}
@media (max-width:900px){.unmatched-row{grid-template-columns:minmax(0,1fr)}}

/* Help */
.page-intro{margin:0 0 12px}
.help section{scroll-margin-top:16px}
.help h2{margin-top:0}
.help ul{margin:8px 0;padding-left:1.2rem}
.help li{margin:4px 0}
.help ul ul{margin:4px 0}
.help p,.help li{max-width:72ch}
.help-toc{display:flex;flex-wrap:wrap;gap:6px 16px;margin:12px 0 0}
.match-list{margin:6px 0 10px;padding-left:1.2rem}
.match-list li{margin:3px 0}

/* Sidebar: profiles that haven't finished setup */
.rail-waiting{margin-top:6px}
.rail-waiting summary{cursor:pointer;list-style:none;font-size:13px;opacity:.75}
.rail-waiting summary::-webkit-details-marker{display:none}
.rail-waiting summary::before{content:"▸";font-size:10px;margin-right:2px}
.rail-waiting[open] summary::before{content:"▾"}
.rail-waiting a.rail-sub{display:block;padding:5px 8px 5px 28px;font-size:13px}
.rail-waiting a.rail-sub small{display:block;opacity:.7;font-size:11.5px}

/* Error pages (404, 500): no sidebar, just the way back */
.error-page main{max-width:560px;margin:12vh auto;padding:0 16px}
.error-page .brand{display:flex;align-items:center;gap:8px;font-weight:700;margin:0 0 12px}
.error-page .brand svg{width:22px;height:22px}
/* Waiting on TESS: a turning ring beside the line that says what it's doing. */
.working{display:flex;align-items:center;gap:.6em}
.working::before{content:"";flex:none;width:1em;height:1em;border-radius:50%;border:2px solid var(--tess-border-default);border-top-color:var(--tess-link);animation:tess-turn .9s linear infinite}
.card.empty .working{justify-content:center}
@keyframes tess-turn{to{transform:rotate(360deg)}}
@keyframes tess-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.working::before{animation:tess-pulse 1.6s ease-in-out infinite;border-color:var(--tess-link)}}
/* Organizations with several profiles: a heading that folds open to them. */
.rail-org summary{cursor:pointer;list-style:none;font-weight:600}
.rail-org summary::-webkit-details-marker{display:none}
.rail-org summary::after{content:"";margin-left:auto;width:6px;height:6px;border-right:1.5px solid var(--tess-rail-muted);border-bottom:1.5px solid var(--tess-rail-muted);transform:rotate(-45deg);transition:transform .15s}
.rail-org[open] summary::after{transform:rotate(45deg)}
.rail-link.rail-in-org{padding-left:40px}
.rail-org nav.rail-sub a{padding-left:56px}
@media (prefers-reduced-motion:reduce){.rail-org summary::after{transition:none}}
/* Which of your pages cite a site: click the site to see them. */
.cited-by summary{cursor:pointer;color:var(--tess-link)}
.cited-by ul{margin:6px 0 4px;padding-left:18px;font-size:13px}
.cited-by li{margin:2px 0}
/* Setup's "Would you want to see this?" answers: an even two-column grid. */
.judge-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 12px}
.judge-grid button{width:100%;min-height:44px;margin:0;justify-content:center;text-align:center}
.judge-grid .judge-unsure{grid-column:1/-1}
@media (max-width:560px){.judge-grid{grid-template-columns:1fr}}
.judge-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.judge-head form{margin:0}
.judge-saved{margin:0 0 10px}
.judge-grid button[aria-pressed="true"]{background:var(--tess-selected-surface);box-shadow:inset 0 0 0 2px var(--tess-link)}
/* The next article fades in after an answer, so the change is easy to see. */
.judge-article[data-fresh]{animation:tess-arrive .35s ease-out}
@keyframes tess-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.judge-article[data-fresh]{animation:none}}
/* Finishing early sits apart from the answers, so it never reads as one of them. */
.judge-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px;padding-top:12px;border-top:1px solid var(--tess-border-default)}
.judge-foot p{margin:0}
.judge-foot form{margin:0;flex:none}
/* Admin: each organization's settings stack in a tidy block instead of one squeezed row. */
/* Admin organizations table: each organization's settings on one compact line. */
table.orgs td{vertical-align:middle}
table.orgs td:first-child,table.orgs td[data-label="Owners"]{white-space:nowrap}
table.orgs td.settings{width:1%}
.org-settings.inline-form{display:flex;flex-wrap:nowrap;align-items:center;gap:14px;margin:0}
.org-settings label.inline{margin:0;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:500}
.org-settings input[type=checkbox]{width:auto;min-width:0;flex:none;margin:0}
.org-settings select,.org-settings input.money{margin:0;height:30px;padding:2px 8px;font-size:13px;border-radius:6px}
.org-settings select{width:auto;min-width:0}
.org-settings input.money{width:5.5rem;min-width:0}
.org-settings button{margin:0;white-space:nowrap}
.card:has(>table.orgs){container-type:inline-size}
@container (max-width:1000px){.org-settings.inline-form{display:grid;grid-template-columns:auto auto auto;gap:8px 14px}.org-settings button{grid-column:3;grid-row:1/3;align-self:center}}
@media (max-width:900px){table.orgs thead{display:none}table.orgs tr{display:block;padding:12px 0;border-bottom:1px solid var(--tess-border-default)}table.orgs td{display:block;border:0;padding:2px 0;white-space:normal}table.orgs td.settings{width:auto;padding-top:10px}table.orgs td[data-label]::before{content:attr(data-label) ": ";color:var(--tess-text-secondary)}.org-settings.inline-form{max-width:none}}

/* Answering an article (_answer.html), the same on the full report and one at a time. */
.answer-box:not(:has(input[name$="-judgment"][value="reject"]:checked)) .why-not{display:none}
.answer-box:not(:has(input[name$="-judgment"]:checked)) .answer-more{display:none}
.why-not{margin-top:14px}
.answer-more{margin-top:12px}
.answer-more>.field-label{margin-top:14px}
.answer-note{display:block;font-weight:600;font-size:14px;margin-top:10px}
.answer-note textarea{display:block;width:100%;max-width:40rem;margin:4px 0 0;resize:vertical;min-height:3.4em;line-height:1.45}
.answer-more>.note{margin:4px 0 0}
.answer-box.is-big .source-level{margin-top:12px}
.answer-box.is-big .field-label{font-size:15px}
/* Setup finished (setup.html). */
.set-up .actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.set-up .actions .button{margin:0}
.set-up-undo{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 6px}
.set-up-undo .note{margin:0}
.set-up .rerun{margin-top:14px;border-top:1px solid var(--tess-border-default);padding-top:12px}
.set-up .rerun summary{font-size:14px;color:var(--tess-text-secondary);cursor:pointer}
.set-up .rerun form{margin-top:8px}
/* Admin library gap check. */
.gap-form{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px}
.gap-form label{margin:0}
.gap-form input{flex:1 1 16rem;margin:0;max-width:28rem}
.gap-form button{margin:0}
.gap-feeds td .note{font-size:12px;word-break:break-all}
/* All past reports: every month's table lines up with the others. */
table.past-reports{table-layout:fixed;width:100%}
table.past-reports th:nth-child(2),table.past-reports td:nth-child(2){width:7rem}
table.past-reports th:nth-child(3),table.past-reports td:nth-child(3){width:9rem}
@media (max-width:600px){table.past-reports th:nth-child(2),table.past-reports td:nth-child(2){width:4.5rem}table.past-reports th:nth-child(3),table.past-reports td:nth-child(3){width:6.5rem}table.past-reports td,table.past-reports th{padding-left:6px;padding-right:6px}}
/* Full report: an answered article folds down to its headline and your answer. */
.judge-card.is-done{padding-top:14px;padding-bottom:12px}
.judge-card.is-done h3{font-size:16px;margin-bottom:4px}
.judge-card.is-done .judged{margin:4px 0 6px}
.done-body>summary{font-size:13px;color:var(--tess-text-secondary);cursor:pointer;margin-top:2px}
.done-body[open]>summary{margin-bottom:10px}
.report-done h2{margin-bottom:6px}
.report-done .done-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px}
.report-done .done-actions .button{margin:0}
/* What good looks like, and the source check. */
#about textarea{width:100%;max-width:48rem;line-height:1.5}
#about .actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:10px}
#about .actions button{margin:0}
table.fit-table{table-layout:fixed;width:100%}
table.fit-table th:nth-child(2),table.fit-table td:nth-child(2){width:7rem}
table.fit-table th:nth-child(3),table.fit-table td:nth-child(3){width:9rem}
table.fit-table td .note{font-size:12px;word-break:break-word}
@media (max-width:600px){table.fit-table th:nth-child(2),table.fit-table td:nth-child(2){width:4.5rem}table.fit-table th:nth-child(3),table.fit-table td:nth-child(3){width:5.5rem}}
/* Admin Library: SCOUT's suggestions, each with the facts TESS checked and a few headlines. */
.scout-step{font-size:16px;margin:20px 0 4px}
.scout-runs a{font-weight:600}
.scout-runs tr[aria-current] td{background:var(--tess-selected-surface)}
.scout-list,.scout-plain{list-style:none;margin:8px 0 16px;padding:0}
.scout-item{border-top:1px solid var(--tess-border-default);padding:14px 0}
.scout-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.scout-head .note{margin:0}
.scout-covers{margin:4px 0 0;color:var(--tess-text-secondary)}
.scout-actions{display:flex;gap:8px;flex:none}
.scout-actions form{margin:0}
.scout-facts{margin:8px 0 6px;font-size:13.5px}
.scout-url{overflow-wrap:anywhere;color:var(--tess-text-secondary)}
.scout-samples{margin:0;padding-left:18px;font-size:13.5px}
.scout-samples li{margin:3px 0}
.scout-samples .note{margin:0;font-size:12px}
.scout-plain li{padding:8px 0;border-top:1px solid var(--tess-border-default)}
.scout-plain .note{margin:0}
.scout-more{margin:12px 0}
.scout-more summary{cursor:pointer;color:var(--tess-link);font-weight:600}
@media (max-width:640px){.scout-head{flex-direction:column}.scout-actions{flex-wrap:wrap}}
/* Admin Sources: compact list, filters, pages, and one source's own page. */
.source-filters{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;margin:0 0 12px}
.source-filters label{display:grid;gap:4px;font-size:13px;color:var(--tess-text-muted)}
.source-filters .sf-search{flex:1 1 18rem}
.source-filters input[type=search]{width:100%}
.source-table td{vertical-align:top}
.source-table a{font-weight:600}
.source-table .st-url{overflow-wrap:anywhere;margin:0}
.source-table tr.is-broken td:first-child{box-shadow:inset 3px 0 0 var(--tess-danger-pigment)}
.pager{display:flex;gap:16px;align-items:center;justify-content:center;margin:14px 0 0}
.source-page.is-broken{border-left:3px solid var(--tess-danger-pigment)}
.sp-head{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
.sp-head p{margin:2px 0}
.sp-url{overflow-wrap:anywhere;color:var(--tess-text-secondary)}
.sp-controls{display:flex;flex-wrap:wrap;gap:10px 28px;margin:16px 0 4px;padding-top:14px;border-top:1px solid var(--tess-border-default)}
.sp-control{display:flex;align-items:center;gap:8px;margin:0}
.sp-control select{max-width:16rem}
.source-page .as-email{margin-top:12px}
/* Public bot page. */
.bot-page h2{font-size:17px;margin:22px 0 6px}
.bot-page code{overflow-wrap:anywhere}
.bot-page pre{padding:10px 12px;border:1px solid var(--tess-border-default);border-radius:6px;overflow:auto}
