/* ArbajtChad: dense layer on top of Pico v2. */
:root {
  --pico-font-size: 15px;
  --pico-line-height: 1.4;
  --pico-spacing: 0.75rem;
  --pico-typography-spacing-vertical: 0.6rem;
  --pico-block-spacing-vertical: 0.9rem;
  --pico-block-spacing-horizontal: 1rem;
  --pico-form-element-spacing-vertical: 0.4rem;
  --pico-form-element-spacing-horizontal: 0.6rem;
  --sc-hi: #1a8f4c;
  --sc-good: #4d9a2a;
  --sc-mid: #c28a00;
  --sc-low: #b0493b;
  --sc-none: #7b8494;
  --sc-soft: color-mix(in srgb, var(--pico-muted-color) 12%, transparent);
}
h1, h2, h3, h4, h5 { margin-bottom: 0.4rem; }
h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; } h5 { font-size: 0.9rem; margin-top: 0.6rem; }
.muted { color: var(--pico-muted-color); }
.small, small { font-size: 0.82rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-size: 0.8rem; padding: 0.05rem 0.25rem; }

/* top bar */
.topbar { border-bottom: 1px solid var(--pico-muted-border-color); background: var(--pico-card-background-color); position: sticky; top: 0; z-index: 10; }
.topbar nav { padding-block: 0; }
.topbar nav ul { margin: 0; }
.topbar nav li { padding-block: 0.55rem; }
.brand { font-weight: 700; letter-spacing: 0.02em; }
.navlinks a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-underline-offset: 0.35em; }
.page { padding-top: 0.9rem; padding-bottom: 3rem; max-width: 1400px; }
.page-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.page-head h2 { margin: 0; }
.crumbs { margin: 0 0 0.3rem; font-size: 0.85rem; }

/* small buttons */
.btn-sm, button.btn-sm, [role="button"].btn-sm, a.btn-sm, summary.btn-sm {
  --pico-form-element-spacing-vertical: 0.2rem; --pico-form-element-spacing-horizontal: 0.55rem;
  font-size: 0.82rem; margin: 0; width: auto; line-height: 1.3;
}
a.btn { display: inline-block; padding: 0.2rem 0.55rem; border: 1px solid var(--pico-primary-border); border-radius: var(--pico-border-radius); text-decoration: none; }
a.btn.outline { background: transparent; }
.btn-link { background: none; border: 0; padding: 0 0.2rem; margin: 0; color: var(--pico-primary); font-size: 0.8rem; width: auto; text-decoration: underline; cursor: pointer; }
.btn-link.danger, .danger { color: var(--pico-del-color); border-color: var(--pico-del-color); }
button.pressed { background: color-mix(in srgb, var(--pico-primary) 20%, transparent); border-color: var(--pico-primary); color: inherit; }
.inline-form { display: inline; margin: 0; }
form.inline-form button { margin: 0; }

/* tabs */
nav.tabs { justify-content: flex-start; }
.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--pico-muted-border-color); margin-bottom: 0.6rem; }
.tab { padding: 0.35rem 0.75rem; border: 1px solid transparent; border-bottom: 0; border-radius: var(--pico-border-radius) var(--pico-border-radius) 0 0; text-decoration: none; color: var(--pico-color); margin-bottom: -1px; }
.tab.active { border-color: var(--pico-muted-border-color); background: var(--pico-background-color); font-weight: 600; }
.count { display: inline-block; min-width: 1.4em; padding: 0 0.35em; border-radius: 1em; background: var(--pico-primary); color: var(--pico-primary-inverse); font-size: 0.75rem; text-align: center; }
.count.plain { background: var(--sc-soft); color: var(--pico-muted-color); }

/* feed filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.3rem; }
.filters input, .filters select { margin: 0; width: auto; font-size: 0.85rem; }
.filters input[type="search"] { flex: 1 1 14rem; }
label.inline { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0; font-size: 0.85rem; }
label.inline input { margin: 0; flex: none; }
.filters label.inline input[type="checkbox"] { width: 1.1em; height: 1.1em; }
.listinfo { font-size: 0.85rem; margin: 0.3rem 0; }

/* feed rows */
#feed-list { --feed-cols: 1.6rem 3.2rem minmax(14rem, 1fr) 9rem 5.5rem 5rem 10rem 7.5rem 5.5rem 2.4rem; }
article.row, .feed-head { display: grid; grid-template-columns: var(--feed-cols); gap: 0.3rem 0.7rem; align-items: center; }
article.row { padding: 0.45rem 0.6rem; margin: 0 0 0.3rem; }
.row .cells { display: contents; }
.cell { font-size: 0.85rem; min-width: 0; overflow-wrap: anywhere; }
.cell .none { color: var(--pico-muted-color); }
.c-sel input { margin: 0; }
.feed-head { padding: 0 0.6rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--pico-muted-color); }
.feed-head a { color: inherit; text-decoration: none; white-space: nowrap; }
.feed-head a:hover { color: var(--pico-primary); }
.feed-head .sorted a { color: var(--pico-color); font-weight: 600; }
.feed-sticky { position: sticky; top: 74px; z-index: 5; background: var(--pico-background-color); padding: 0.3rem 0; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.3rem; }
.bulk-bar > * { margin: 0; }
article.row .main { min-width: 0; }
.title-line { display: flex; gap: 0.4rem; align-items: baseline; flex-wrap: wrap; }
a.title { font-weight: 600; text-decoration: none; }
a.title:hover { text-decoration: underline; }
.status-new a.title::before { content: "● "; color: var(--pico-primary); font-size: 0.7em; vertical-align: middle; }
.status-seen a.title { font-weight: 500; }
.status-dismissed { opacity: 0.55; }
.meta { display: flex; flex-wrap: wrap; gap: 0 0.3rem; font-size: 0.85rem; color: var(--pico-muted-color); }
.meta > span + span::before { content: "·"; margin-right: 0.3rem; }
.meta .company { color: var(--pico-color); font-weight: 500; }
.meta .salary, .cell .salary { color: var(--sc-hi); font-weight: 500; }
.meta.sub { margin-top: 0.15rem; align-items: center; }
.meta.big { font-size: 0.95rem; }
.summary { font-size: 0.85rem; margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-reason { color: var(--pico-del-color); white-space: normal; }
.actions { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: flex-end; align-items: center; max-width: 21rem; }
.actions > * { margin: 0; }
.ignored-note { grid-column: 1 / -1; display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; font-size: 0.9rem; }

/* score badge */
.score { width: 3.2rem; border-radius: 0.4rem; text-align: center; color: #fff; padding: 0.2rem 0; line-height: 1.1; }
.score b { display: block; font-size: 1.15rem; }
.score small { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.9; }
.band-hi { background: var(--sc-hi); } .band-good { background: var(--sc-good); } .band-mid { background: var(--sc-mid); }
.band-low { background: var(--sc-low); } .band-none { background: var(--sc-none); }

/* badges / tags / chips */
.src { display: inline-block; font-size: 0.72rem; padding: 0.05rem 0.4rem; margin-right: 0.25rem; border-radius: 0.3rem; background: var(--sc-soft); color: var(--pico-color); text-decoration: none; border: 1px solid var(--pico-muted-border-color); }
.src:hover { border-color: var(--pico-primary); }
.src-justjoin { border-left: 3px solid #e3185b; } .src-rocketjobs { border-left: 3px solid #7446e9; } .src-nofluffjobs { border-left: 3px solid #00a651; }
.src-linkedin { border-left: 3px solid #0a66c2; } .src-bulldogjob { border-left: 3px solid #ff5f00; } .src-solidjobs { border-left: 3px solid #1d3f8f; }
.src-theprotocol { border-left: 3px solid #00b67a; } .src-pracuj { border-left: 3px solid #1b5ce6; }
.tag { display: inline-block; font-size: 0.7rem; padding: 0.02rem 0.4rem; border-radius: 1rem; background: var(--sc-soft); color: var(--pico-muted-color); vertical-align: middle; white-space: nowrap; }
.tag-new { background: var(--pico-primary); color: var(--pico-primary-inverse); }
.tag-shortlisted { background: #f5c542; color: #3a2d00; }
.tag-dismissed, .tag.missing { background: color-mix(in srgb, var(--sc-low) 20%, transparent); color: var(--sc-low); }
.tag-applied, .tag.ok { background: color-mix(in srgb, var(--sc-hi) 20%, transparent); color: var(--sc-hi); }
.tag-filtered { background: color-mix(in srgb, var(--sc-mid) 20%, transparent); color: var(--sc-mid); }
.app-applied, .app-screening { background: color-mix(in srgb, #0a66c2 18%, transparent); color: #3b82c4; }
.app-interview, .app-offer { background: color-mix(in srgb, var(--sc-mid) 22%, transparent); color: var(--sc-mid); }
.app-accepted { background: var(--sc-hi); color: #fff; }
.app-rejected, .app-withdrawn, .app-ghosted { background: color-mix(in srgb, var(--sc-low) 16%, transparent); color: var(--sc-low); }
.verdict-strong { background: var(--sc-hi); color: #fff; } .verdict-good { background: var(--sc-good); color: #fff; }
.verdict-weak { background: var(--sc-mid); color: #fff; } .verdict-poor { background: var(--sc-low); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; margin: 0.25rem 0; }
.chips .lbl { font-size: 0.75rem; color: var(--pico-muted-color); min-width: 8.5rem; }
.chip { font-size: 0.78rem; padding: 0.05rem 0.45rem; border-radius: 0.3rem; background: var(--sc-soft); }
.chip.ok { background: color-mix(in srgb, var(--sc-hi) 18%, transparent); }
.chip.miss { background: color-mix(in srgb, var(--sc-low) 18%, transparent); }
.chip.opt { background: color-mix(in srgb, var(--sc-mid) 14%, transparent); }
.yes { color: var(--sc-hi); font-weight: 600; } .no { color: var(--sc-low); font-weight: 600; }

/* ignore dropdown */
details.dropdown.ignore-menu { display: inline-block; margin: 0; }
details.dropdown.ignore-menu summary { height: auto; padding: 0.2rem 1.6rem 0.2rem 0.55rem; font-size: 0.82rem; }
details.dropdown.ignore-menu summary::after { height: 0.9rem; }
details.dropdown.ignore-menu ul { min-width: 15rem; right: 0; left: auto; font-size: 0.85rem; }
details.dropdown.ignore-menu ul li a { direction: ltr; text-align: left; }
details.dropdown.row-menu { margin: 0; }
details.dropdown.row-menu summary { padding: 0.1rem 0.5rem; font-size: 1.1rem; line-height: 1; height: auto; }
details.dropdown.row-menu summary::after { display: none; }
details.dropdown.row-menu ul { min-width: 17rem; right: 0; left: auto; font-size: 0.85rem; }
details.dropdown.row-menu ul li a { direction: ltr; text-align: left; }

/* notices */
.notice { padding: 0.45rem 0.7rem; border-radius: var(--pico-border-radius); background: var(--sc-soft); font-size: 0.9rem; margin: 0.4rem 0; }
.notice.ok { background: color-mix(in srgb, var(--sc-hi) 15%, transparent); }
.notice.warn { background: color-mix(in srgb, var(--sc-mid) 16%, transparent); }
.notice.error { background: color-mix(in srgb, var(--sc-low) 16%, transparent); }
.notice ul { margin: 0.3rem 0 0; }
article.empty { text-align: center; color: var(--pico-muted-color); }
#toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--sc-low); color: #fff; padding: 0.5rem 1rem; border-radius: 0.4rem; z-index: 50; max-width: 90vw; font-size: 0.9rem; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 0.8rem 0; }

/* job detail */
.job-head h2 { margin-bottom: 0.2rem; }
.job-ignore { display: flex; gap: 0.4rem; margin: 0.5rem 0 0.2rem; flex-wrap: wrap; }
.job-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1rem; margin-top: 0.8rem; align-items: start; }
.job-grid article { margin-bottom: 0.9rem; }
.analysis-head { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; padding: 0.4rem 0.75rem; margin: -1rem -1rem 0.6rem; }
.analysis-head h3 { margin: 0; }
.match-actions { margin-left: auto; display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.match-actions .actions { max-width: none; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.2rem 1rem; }
.cols3 ul { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; }
.cols3 li { margin-bottom: 0.15rem; }
.good-list li::marker { color: var(--sc-hi); } .gap-list li::marker { color: var(--sc-mid); } .flag-list li::marker { color: var(--sc-low); }
.keywords { border-top: 1px solid var(--pico-muted-border-color); margin-top: 0.5rem; padding-top: 0.3rem; }
.tailoring { border-top: 1px solid var(--pico-muted-border-color); margin-top: 0.6rem; padding-top: 0.5rem; }
.tailor-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tailor-head h4 { margin: 0; }
.rewrite { border-left: 3px solid var(--pico-primary); padding: 0.2rem 0.6rem; margin: 0.4rem 0; font-size: 0.88rem; }
.rewrite .orig { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--pico-muted-color) 60%, transparent); color: var(--pico-muted-color); }
.rewrite .sugg { font-weight: 500; }
.rewrite .muted { font-size: 0.72rem; text-transform: uppercase; margin-right: 0.3rem; text-decoration: none; display: inline-block; }
.description .prewrap { font-size: 0.9rem; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.8rem; margin: 0; font-size: 0.88rem; }
dl.facts dt { color: var(--pico-muted-color); font-weight: 400; }
dl.facts dd { margin: 0; }
ul.postings { padding: 0; margin: 0; }
ul.postings li { list-style: none; margin-bottom: 0.45rem; font-size: 0.88rem; }

/* tables */
.table-wrap { overflow-x: auto; }
table.dense { font-size: 0.86rem; margin-bottom: 0.5rem; }
table.dense th, table.dense td { padding: 0.3rem 0.5rem; }
tr.overdue td { background: color-mix(in srgb, var(--sc-low) 8%, transparent); }
.overdue-date { color: var(--sc-low); font-weight: 600; }
tr.last-ok td { background: color-mix(in srgb, var(--sc-hi) 10%, transparent); }
tr.failed td.err { color: var(--sc-low); }
tr.inactive { opacity: 0.6; }
tr.gap td:first-child { font-weight: 600; }
.bar { display: inline-block; width: calc(var(--w) * 0.5); max-width: 3rem; height: 0.45rem; background: var(--pico-primary); opacity: 0.35; border-radius: 0.2rem; margin-right: 0.35rem; }

/* forms */
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 0.9rem; }
.grid-form .wide { grid-column: 1 / -1; }
.grid-form.inner { gap: 0 0.9rem; }
.grid-form label { font-size: 0.88rem; }
.grid-form input, .grid-form select, .grid-form textarea { margin-top: 0.15rem; margin-bottom: 0.55rem; }
fieldset legend { font-weight: 600; font-size: 0.95rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0.1rem 0.8rem; margin: 0.2rem 0 0.6rem; }
.checks label { font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.25rem; margin: 0; }
.checks input { margin: 0; }
.location-rules input, .location-rules select { margin: 0; }
.location-rules td, .location-rules th { padding: 0.2rem 0.4rem; }
.filter-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.2rem 1.2rem; }
.form-actions { display: flex; align-items: center; gap: 0.8rem; }
.form-actions button { width: auto; margin: 0; }
.form-actions .push-end { margin-left: auto; }
.new-app { margin-top: 1rem; }
.new-app summary { display: inline-block; }
.new-app form { margin-top: 0.7rem; }
.app-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 0 1rem; }
.sys-actions .action-line { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; align-items: center; }
.test-results { padding: 0; margin: 0; } .test-results li { list-style: none; }
.upload { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.upload input[type="file"] { margin: 0; flex: 1 1 12rem; font-size: 0.85rem; }
.resume { border-top: 1px solid var(--pico-muted-border-color); padding: 0.45rem 0; }
.resume-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
ul.health { margin: 0.3rem 0 0; padding: 0; font-size: 0.85rem; }
ul.health li { list-style: none; margin-bottom: 0.15rem; }
.sev-error .sev { background: color-mix(in srgb, var(--sc-low) 20%, transparent); color: var(--sc-low); }
.sev-warning .sev { background: color-mix(in srgb, var(--sc-mid) 20%, transparent); color: var(--sc-mid); }

/* timeline */
.event-add, .event-edit { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.6rem; }
.event-add > *, .event-edit > * { margin: 0; font-size: 0.85rem; }
.event-add input, .event-add select, .event-edit input, .event-edit select { width: auto; margin: 0; }
.event-add input[name="text"], .event-edit input[name="text"] { flex: 1 1 12rem; }
ol.events { padding: 0; margin: 0; border-left: 2px solid var(--pico-muted-border-color); }
ol.events li.event { list-style: none; padding: 0.3rem 0 0.3rem 0.7rem; position: relative; font-size: 0.88rem; display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: baseline; }
ol.events li.event::before { content: ""; position: absolute; left: -0.36rem; top: 0.72rem; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pico-muted-border-color); }
ol.events li.kind-status::before { background: var(--pico-primary); }
ol.events li.kind-interview::before { background: var(--sc-mid); }
ol.events li.kind-feedback::before { background: var(--sc-hi); }
ol.events time { color: var(--pico-muted-color); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.event-text { flex-basis: 100%; white-space: pre-wrap; }
.event-actions { margin-left: auto; }

/* phones */
@media (max-width: 800px) {
  .topbar nav { flex-wrap: wrap; }
  .navlinks { flex-wrap: wrap; }
  .navlinks li { padding: 0.3rem 0.35rem; }
  article.row {
    grid-template-columns: 1.6rem 3rem minmax(0, 1fr) 2.4rem;
    grid-template-areas: "sel score job menu" "sel score cells cells";
    padding: 0.5rem 0.55rem;
  }
  .row .c-sel { grid-area: sel; }
  .row .score { grid-area: score; }
  .row .main { grid-area: job; }
  .row .c-menu { grid-area: menu; }
  .row .cells { grid-area: cells; display: flex; flex-wrap: wrap; gap: 0 0.6rem; }
  .row .cells .none { display: none; }
  .feed-head { display: none; }
  .feed-sticky { position: static; }  /* the wrapped top bar is already ~150px tall */
  .summary { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .job-grid, .app-grid, .profile-grid { grid-template-columns: 1fr; }
  .chips .lbl { min-width: 100%; }
  .filters select { flex: 1 1 45%; }
}

/* login */
.login-box { max-width: 22rem; margin: 3rem auto; }
