/* Vivier — same visual system as Nexo: navy #25294A, plasma orange #FC6800.
   Layout uses logical properties (inline/block) so Arabic (dir=rtl) mirrors without extra rules. */
:root {
  --navy: #25294a;
  --navy-2: #343a66;
  --orange: #fc6800;
  --orange-ink: #c24f00;
  --bg: #f4f5f8;
  --card: #ffffff;
  --ink: #1d2033;
  --muted: #646a80;
  --line: #e2e4ec;
  --warn-bg: #fff3e6;
  --warn: #a14700;
  --bad-bg: #fde8e8;
  --bad: #a3242b;
  --ok-bg: #e8f5ee;
  --ok: #1d6b45;
  --radius: 10px;
  --font: "Source Sans 3", "Source Sans Pro", Calibri, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:lang(ar), [dir="rtl"] { --font: "Noto Sans Arabic", "Source Sans 3", Tahoma, system-ui, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--navy-2); text-decoration-color: color-mix(in srgb, var(--navy-2) 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--orange-ink); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .75rem; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; color: var(--navy); }
h3 { margin: 0; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.strike { text-decoration: line-through; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; }
.ref { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .01em; }
hr { border: 0; border-block-start: 1px solid var(--line); margin-block: 1rem; }
/* ---- page ---- */
.page { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-block-end: 1rem; }
.card.narrow { max-width: 560px; margin-inline: auto; }
.card.notice { border-color: #f6c08f; background: var(--warn-bg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.grid2 > * { min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block-end: .75rem; }
.page-head h1 { margin: 0; }
.count { font-size: .9rem; color: var(--muted); font-weight: 600; background: var(--line); border-radius: 99px; padding: .1rem .55rem; vertical-align: middle; }
.crumbs { margin: 0 0 .6rem; font-size: .9rem; color: var(--muted); }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-block-end: 1rem; border: 1px solid; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cf; }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: #f3c2c4; }

/* ---- forms ---- */
input, select, textarea { font: inherit; color: inherit; border: 1px solid #cdd0dc; border-radius: 8px; padding: .55rem .7rem; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--orange) 55%, transparent); outline-offset: 1px; border-color: var(--orange); }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .95rem; }
label.check { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
label.check input { width: 1.05rem; height: 1.05rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.inline { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.inline.wrap { margin-block-start: .75rem; }
.row-actions { display: flex; gap: .6rem; margin-block-start: 1rem; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.two > *, .stack input, .stack select, .stack textarea { min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-block-end: .4rem; font-size: .95rem; }

/* Stock form: show only the fields the chosen movement needs. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; border: 1px solid #c9ccda; background: #fff; color: var(--navy); padding: .5rem 1rem; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--navy-2); color: var(--navy); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: #e35d00; color: #fff; }
.btn.small { padding: .3rem .65rem; font-size: .875rem; }
.btn.wide { width: 100%; }
.btn.big { padding: .8rem 1rem; font-size: 1.05rem; }

/* ---- lists and tables ---- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
table.list { background: var(--card); }
.page > .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.list th { text-align: start; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .6rem .75rem; border-block-end: 1px solid var(--line); white-space: nowrap; }
[dir="rtl"] table.list th { text-transform: none; letter-spacing: 0; }
table.list td { padding: .6rem .75rem; border-block-end: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr:last-child td { border-block-end: 0; }
table.list tbody tr:hover { background: #fafbfd; }
table.list.compact td, table.list.compact th { padding: .4rem .6rem; font-size: .92rem; }
tr.is-low td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
[dir="rtl"] tr.is-low td:first-child { box-shadow: inset -3px 0 0 var(--orange); }
tr.is-bad { background: var(--bad-bg); }
table.list th.num { text-align: end; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: .25rem; margin-block-start: .2rem; }
[dir="rtl"] table.kv th { padding: .35rem 0 .35rem .5rem; }
table.kv td { padding: .35rem 0; vertical-align: top; }
table.kv tr + tr { border-block-start: 1px solid var(--line); }

table.spec { font-size: .9rem; }
table.spec th { text-align: start; font-weight: 600; color: #3a3f58; padding: .35rem .5rem .35rem 0; vertical-align: top; width: 40%; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: #e8eaf4; color: var(--navy-2); white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.muted { background: #eef0f3; color: var(--muted); }
/* ---- login ---- */
.login { margin-block-start: 3rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .9rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-block-start: 1px solid var(--line); }
.login-logo { display: block; max-height: 56px; max-width: 220px; margin: 0 auto 1rem; object-fit: contain; }
.login-company { text-align: center; font-weight: 700; color: var(--navy); margin: 0 0 .5rem; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-block-end: 1px solid var(--line); margin-block-end: 1rem; }
.tabs a { padding: .45rem .8rem; text-decoration: none; color: var(--muted); border-block-end: 2px solid transparent; margin-block-end: -1px; font-weight: 600; }
.tabs a small { font-weight: 400; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); border-block-end-color: var(--orange); }
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; inset-block-start: 0; height: 100vh; flex: 0 0 var(--side); width: var(--side); background: var(--navy);
  color: #d7d9e8; display: flex; flex-direction: column; z-index: 20; transition: width .18s ease, flex-basis .18s ease; }
.side-head { display: flex; align-items: center; gap: .5rem; padding: .9rem .9rem .8rem 1rem; border-block-end: 1px solid rgba(255,255,255,.1); }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; min-width: 0; flex: 1; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 1.1rem; }
.brand-text small { color: #aeb2cc; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-btn, .menu-btn { border: 0; background: transparent; color: inherit; border-radius: 8px; padding: .4rem; cursor: pointer; display: inline-flex; }
.fold-btn { color: #aeb2cc; } .fold-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
[dir="rtl"] .fold-btn svg { transform: scaleX(-1); }
.side-scroll { flex: 1; overflow-y: auto; padding: .6rem .6rem 1rem; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.nav-group { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: #9a9fbd; padding: .9rem .7rem .25rem; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: .7rem; color: #d7d9e8; text-decoration: none; padding: .5rem .7rem; border-radius: 8px; font-weight: 600; min-height: 40px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item[aria-current="page"] { color: #fff; background: rgba(252,104,0,.2); box-shadow: inset 3px 0 0 var(--orange); }
[dir="rtl"] .nav-item[aria-current="page"] { box-shadow: inset -3px 0 0 var(--orange); }
.nav-item .ic { flex: 0 0 auto; }
.nav-label { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-label small { color: #9a9fbd; font-weight: 400; font-size: .78rem; }
.nav-badge { margin-inline-start: auto; background: var(--orange); color: #fff; border-radius: 99px; padding: 0 .5rem; font-size: .75rem; font-weight: 700; }
.side-foot { border-block-start: 1px solid rgba(255,255,255,.1); padding: .5rem .6rem .7rem; display: flex; flex-direction: column; gap: 2px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #3d4373; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex: 0 0 auto; }




/* folded: icon rail */
.shell.folded .sidebar { flex-basis: var(--rail); width: var(--rail); }
.shell.folded .side-head { flex-direction: column; padding: .8rem .4rem; }
.shell.folded .fold-btn svg { transform: scaleX(-1); }
[dir="rtl"] .shell.folded .fold-btn svg { transform: none; }
.shell.folded .nav-item { justify-content: center; padding: .6rem 0; position: relative; }
.shell.folded .nav-badge { position: absolute; top: 2px; inset-inline-end: 6px; padding: 0 .35rem; font-size: .68rem; }
.shell.folded .side-scroll { padding-inline: .5rem; }

/* main column */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topline { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.5rem; background: var(--bg); position: sticky; top: 0; z-index: 10;
  border-block-end: 1px solid var(--line); }
.menu-btn { display: none; color: var(--navy); }
.top-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #cdd0dc; border-radius: 10px; padding: .1rem .8rem; color: var(--muted); }
.top-search input { border: 0; outline: none; padding: .45rem 0; flex: 1; min-width: 0; background: transparent; }
.top-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 30%, transparent); }
.topline .langform { margin-inline-start: auto; }
.topline .langform select { color: var(--navy); border-color: #cdd0dc; background: #fff; }
.page { max-width: 1400px; width: 100%; box-sizing: border-box; margin: 0; padding: 1.4rem 1.5rem 3rem; }
.page-public { max-width: 560px; margin: 0 auto; }
.public-lang { display: flex; justify-content: flex-end; }
.public-lang select { color: var(--navy); background: #fff; border: 1px solid #cdd0dc; border-radius: 6px; padding: .2rem .4rem; }
.scrim { position: fixed; inset: 0; background: rgba(20, 22, 40, .45); z-index: 15; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(-105%); transition: transform .2s ease; width: min(84vw, 300px); flex: none; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.folded .sidebar { width: min(84vw, 300px); }
  .shell.folded .nav-label { display: flex; }
  .shell.folded .nav-item { justify-content: flex-start; padding: .5rem .7rem; }
  .shell.folded .side-head { flex-direction: row; }
  .fold-btn { display: none; }
  .topline { padding: .55rem .75rem; }
  .page { padding: 1rem .75rem 3rem; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin-block-end: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .95rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: inherit; }
.kpi:hover { border-color: #c9ccda; }
.kpi-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.kpi strong { font-size: 1.7rem; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-sub { font-size: .85rem; color: var(--muted); }
.kpi.warn { background: var(--warn-bg); border-color: #f6c08f; } .kpi.warn strong, .kpi.warn .kpi-label { color: var(--warn); }
.kpi.ok strong { color: var(--ok); }
.shell { background: var(--navy); }
.main-col { background: var(--bg); min-height: 100vh; }
@media (max-width: 900px) { .shell { background: var(--bg); } }
html, body { overflow-x: hidden; }
@media (max-width: 900px) {
  .sidebar { visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .shell.nav-open .sidebar { visibility: visible; transition: transform .2s ease; }
}

:root { --side: 264px; --rail: 76px; }
table.kv th { text-align: start; font-weight: 600; padding: .35rem .5rem .35rem 0; vertical-align: top; color: #3a3f58; width: 40%; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: .45rem 0; }
ul.plain li + li { border-block-start: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-block-end: .6rem; }
.card-head h2 { margin: 0; }
.public-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--navy); margin-inline-end: auto; }
.public-lang { align-items: center; margin-block-end: 1rem; }
.public-brand img { border-radius: 8px; }

/* ---- Vivier ---- */
[hidden] { display: none !important; }
.card.narrow-left { max-width: 720px; }
.nowrap { white-space: nowrap; }
.clip { display: block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.lead { margin: -.25rem 0 1rem; max-width: 80ch; }
.sub { margin: .2rem 0 0; }
.more { margin: .6rem .2rem 0; font-weight: 600; }
.short { max-width: 8rem; }
.grow { flex: 1 1 260px; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 1rem; align-items: start; }
.grid-main > * { min-width: 0; }
.grid-main > aside .card, .grid-main > .stack > .card { margin: 0; }
.grid2.below { margin-block-start: 1rem; }
.empty-state { text-align: center; padding: 2.2rem 1.25rem; }
.empty-state p { margin: .3rem 0; }
.btn.danger { color: var(--bad); border-color: #e7b6b9; }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: .25rem; border-radius: 6px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { color: var(--navy); background: var(--line); }
.link-btn { border: 0; background: none; color: var(--navy-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.ic { vertical-align: -3px; }
.filters select { max-width: 16rem; }
.row-btns { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; }
td.subject { min-width: 220px; overflow-wrap: anywhere; }
.notice-line { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: .5rem .75rem; margin: 0 0 1rem; }
.card.notice strong { color: var(--warn); }
.card.notice p { margin: .3rem 0 .6rem; }

/* stages: one hue per step of the pipeline, the same everywhere */
.badge.st-new { background: #fff1e6; color: #a14700; }
.badge.st-review { background: #e9ebfa; color: #2f3a8f; }
.badge.st-interview { background: #f1ebfc; color: #5b33a0; }
.badge.st-offer { background: #e3f6f6; color: #0b6464; }
.badge.st-hired { background: var(--ok-bg); color: var(--ok); }
.badge.st-rejected, .badge.st-withdrawn { background: #eef0f3; color: var(--muted); }
/* channels: a neutral chip with the channel's dot */
.src { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; color: #3a3f58; background: #f1f2f6; border-radius: 99px; padding: .08rem .55rem .08rem .45rem; white-space: nowrap; }
.src::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #8a8fa8; }
.src-website::before { background: #fc6800; } .src-linkedin::before { background: #2f6fd0; } .src-indeed::before { background: #13a3a3; }
.src-francetravail::before { background: #8a5cd6; } .src-email::before { background: #2f9e5b; } .src-manual::before { background: #8a8fa8; }
.stars { letter-spacing: -1px; font-size: .85rem; white-space: nowrap; } .stars .on { color: var(--orange); } .stars .off { color: #d5d8e3; }

/* pipeline board */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: .75rem; overflow-x: auto; padding-block-end: .5rem; margin-block-end: .75rem; }
.col { background: #eceef4; border-radius: 12px; display: flex; flex-direction: column; min-height: 220px; border: 2px solid transparent; }
.col.over { border-color: var(--orange); background: #fff7f0; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem .45rem; font-weight: 700; color: var(--navy); font-size: .92rem; }
.col-head::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; margin-inline-end: .45rem; background: #8a8fa8; flex: 0 0 auto; }
.col-head span:first-of-type { flex: 1; }
.col-head.st-new::before { background: #fc6800; } .col-head.st-review::before { background: #5b67c9; } .col-head.st-interview::before { background: #8a5cd6; }
.col-head.st-offer::before { background: #13a3a3; } .col-head.st-hired::before { background: #2f9e5b; }
.col-body { display: flex; flex-direction: column; gap: .5rem; padding: .25rem .5rem .6rem; flex: 1; }
.app-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .2rem; }
.app-card:hover { border-color: #c2c6d6; color: var(--ink); box-shadow: 0 1px 4px rgba(37, 41, 74, .08); }
.app-card[draggable="true"] { cursor: grab; } .app-card.dragging { opacity: .45; }
.app-card .clip { max-width: 100%; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; flex-wrap: wrap; margin-block-start: .2rem; }

/* horizontal bars (channels) */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.bars li { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; align-items: center; gap: .6rem; font-size: .92rem; }
.bar-track { background: #eef0f5; border-radius: 99px; height: .6rem; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--navy-2); border-radius: 99px; min-width: 3px; }
.bar-n { text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); }

/* home */
.posting-list li { display: flex; flex-direction: column; gap: .25rem; }
.mini { display: flex; flex-wrap: wrap; gap: .25rem; }

/* application page */
.doc-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.doc-list li a:not(.icon-btn) { overflow-wrap: anywhere; }
.doc-list form { display: inline-flex; }
.kind-form select { padding: .15rem .4rem; font-size: .82rem; border-radius: 99px; }
.doc-preview { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: 8px; margin-block-start: .75rem; background: #f7f8fa; }
.upload { margin-block-start: .75rem; align-items: center; }
.upload input[type="file"] { flex: 1 1 220px; padding: .3rem; font-size: .9rem; }
.message { background: #f7f8fa; border-radius: 8px; padding: .8rem 1rem; max-height: 28rem; overflow: auto; }
.note-form { margin-block-end: 1rem; gap: .5rem; }
.note-form .inline { align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .ev { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; padding: .5rem 0; border-block-start: 1px solid var(--line); }
.ev-when { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ev-text { display: block; margin-block-start: .2rem; }
.ev-note .ev-text { background: #fffaf0; border-inline-start: 3px solid #f6c08f; padding: .4rem .6rem; border-radius: 0 6px 6px 0; }
.rating-form { display: flex; align-items: center; gap: .15rem; margin-block-start: .8rem; flex-wrap: wrap; }
.rating-form .muted { margin-inline-end: .4rem; }
.star-btn { border: 0; background: none; font-size: 1.35rem; line-height: 1; color: #d5d8e3; cursor: pointer; padding: 0 .05rem; }
.star-btn.on, .star-btn:hover { color: var(--orange); }
.app-lines li, .alias-list li, .dup { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.alias-list li .clip { flex: 1; max-width: none; }
.alias-kind { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dup { justify-content: space-between; }
.erase-form { border-block-start: 1px solid var(--line); padding-block-start: .75rem; margin-block-start: .75rem; gap: .5rem; }
.people-line { display: flex; flex-wrap: wrap; gap: .15rem 1.25rem; margin-block-end: .75rem; }
.people-line li { border: 0 !important; padding: .15rem 0; }
.sort-form { align-items: flex-end; }

/* admin */
.roles { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.roles dt { font-weight: 700; color: var(--navy); } .roles dd { margin: 0; color: #3a3f58; }
.steps { padding-inline-start: 1.2rem; display: grid; gap: .35rem; }
.notes { padding-inline-start: 1.2rem; display: grid; gap: .45rem; margin: 0; }
pre.env { background: #1d2033; color: #e9ebf5; padding: .8rem 1rem; border-radius: 8px; overflow-x: auto; font-size: .88rem; }
code.key { display: inline-block; margin-block-start: .35rem; font-size: 1rem; user-select: all; overflow-wrap: anywhere; }
td input[type="password"] { max-width: 11rem; padding: .3rem .5rem; }
td select { padding: .3rem .5rem; }

@media (max-width: 1000px) {
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .board { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .two { grid-template-columns: 1fr; }
  .timeline .ev { grid-template-columns: 1fr; gap: .1rem; }
  .bars li { grid-template-columns: 6.5rem 1fr 2rem; }
  .clip { max-width: 22ch; }
}

/* application tables: the name and the posting get the room, the rest stays compact */
table.list td .clip { max-width: 38ch; }
.app-table td:nth-child(1) { min-width: 190px; }
.app-table .posting-col { min-width: 220px; max-width: 320px; }
.app-table .posting-col .hint { display: block; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-table .src { margin-block: 1px; }
.page > .table-wrap { margin-block-end: 1rem; }
@media (max-width: 640px) {
  /* applications as a stack of cards: name and stage, then the posting, then channel and date */
  .app-table thead, .app-table .docs-col { display: none; }
  .app-table, .app-table tbody { display: block; }
  .app-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .6rem; padding: .65rem .8rem; border-block-end: 1px solid var(--line); }
  .app-table tbody tr:last-child { border-block-end: 0; }
  .app-table td { border: 0 !important; padding: 0 !important; min-width: 0 !important; max-width: none !important; }
  .app-table td:nth-child(1) { grid-area: 1 / 1; }
  .app-table .stage-col { grid-area: 1 / 2; text-align: end; }
  .app-table .posting-col { grid-area: 2 / 1 / 3 / -1; }
  .app-table .src-col { grid-area: 3 / 1; }
  .app-table .when-col { grid-area: 3 / 2; text-align: end; align-self: center; }
  .app-table .when-col { color: var(--muted); font-size: .88rem; }
  .topline { gap: .5rem; }
  .top-search { min-width: 0; }
  .topline .langform select { max-width: 6.2rem; }
  .head-actions { width: 100%; }
  .filters select { max-width: none; flex: 1 1 45%; }
}
