/* Leonida Vice Roleplay · edition 5 · department directory and recruitment desk */

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
summary .i { transition: rotate var(--reveal) var(--ease); }
details[open] > summary .i { rotate: 45deg; }

/* ---------- Page heading with search ---------- */
.desk-head { padding-block: clamp(32px, 4.6vw, 60px) clamp(22px, 2.6vw, 32px); border-bottom: 1.5px solid var(--rule); }
.desk-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: 20px clamp(32px, 6vw, 96px); align-items: end; }
.desk-head h1.display { font-size: clamp(2.5rem, 4.6vw, 4rem); }
.desk-head .lead { margin-top: 12px; }
.dir-empty { display: grid; gap: 12px; justify-items: start; padding: 20px; border: 1.5px dashed var(--rule); border-radius: 8px; }
.callout, .notice { padding: 16px 20px; border-radius: 8px; background: var(--paper-sunk); box-shadow: inset 5px 0 0 var(--spot); }
.callout b { display: block; }

/* ---------- Directory: a compact index beside a reading pane ---------- */
.directory { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 56px); align-items: start; padding-block: 32px clamp(56px, 7vw, 96px); scroll-margin-top: var(--header); }
.dir-index { position: sticky; top: calc(var(--header) + 20px); max-height: calc(100vh - var(--header) - 120px); overflow-y: auto; padding: 2px 6px 2px 2px; }
.dir-pane { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.dir-pane:focus { outline: none; }
.dir-index h2 { margin: 22px 0 6px; font-size: .875rem; font-weight: 700; color: var(--ink-soft); }
.dir-index > h2:first-child { margin-top: 0; }
.dir-index a, .aid-list a { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 10px 7px 14px; border-radius: var(--radius); text-decoration: none; }
.dir-index a:not(:has(img)) { grid-template-columns: 1fr; }
.dir-index img, .aid-list img { width: 52px; height: 39px; object-fit: cover; border-radius: 4px; }
.dir-index b, .aid-list b, .posting b { display: block; font-weight: 700; line-height: 1.25; }
.dir-index small, .aid-list small, .posting small { display: block; font-size: .8125rem; color: var(--ink-soft); }
.dir-index a:hover, .aid-list a:hover { background: var(--paper-sunk); }
.dir-index a[aria-current] { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--rule); }
.dir-index a[aria-current]::before { content: ""; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 5px; background: var(--spot); transform: skewX(-7.4deg); }
.index-aid { margin-top: 16px; border-top: 1.5px solid var(--rule); }
.index-aid summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.index-aid summary h2 { margin: 0; }
.index-aid summary span { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-soft); }

/* Reading pane */
.dir-pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 0 clamp(20px, 3vw, 40px); align-items: start; }
.dir-pane > * { grid-column: 1 / -1; }
.dir-pane > .pane-head { grid-column: 1; grid-row: 1; }
.dir-pane > .pane-cover { grid-column: 2; grid-row: 1; aspect-ratio: 16 / 11; overflow: hidden; border-radius: 10px; background: var(--paper-sunk); }
.pane-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.pane-back { display: none; }
.pane-kind { font-size: .875rem; font-weight: 700; color: var(--spot); }
.pane-head h2 { margin-top: 2px; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 750; line-height: 1.05; letter-spacing: -.025em; }
.pane-formal { margin-top: 6px; color: var(--ink-soft); }
.pane-brief { margin-top: 12px; max-width: 60ch; }
.pane-switch { margin-top: 10px; font-size: .9375rem; color: var(--ink-soft); }
.pane-tabs { margin: 28px 0 20px; justify-self: start; }
.pane-body h3 { margin: 26px 0 10px; font-size: 1.125rem; }
.pane-body > h3:first-child { margin-top: 0; }

/* Postings: the list on the left, the chosen posting's divisions and crews beside it */
.posting-grid { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); column-gap: 28px; margin-top: 18px; }
.posting-grid > * { grid-column: 1; }
.pane-body .posting-area { margin: 22px 0 6px; font-size: .875rem; font-weight: 700; color: var(--ink-soft); }
.pane-body .posting-area:first-child { margin-top: 0; }
.posting { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 10px 9px 12px; border-top: 1.5px solid var(--rule); text-decoration: none; scroll-margin-top: calc(var(--header) + 8px); }
.posting img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.posting:hover { background: var(--paper-sunk); }
.posting[aria-expanded="true"] { background: var(--card); box-shadow: inset 5px 0 0 var(--spot); }
.posting-grid > .posting-detail, .posting-grid > .posting-hint { grid-column: 2; grid-row: 1 / span 40; align-self: start; position: sticky; top: calc(var(--header) + 20px); padding: 24px; border-radius: 10px; }
.posting-detail { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--rule); }
.posting-hint { border: 1.5px dashed var(--rule); color: var(--ink-soft); }
.pane-body .posting-detail h3 { margin: 0; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.015em; }
.posting-formal { margin-top: 4px; color: var(--ink-soft); }
.posting-formal span { margin-left: 6px; padding: 2px 9px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--rule); font-size: .8125rem; font-weight: 650; white-space: nowrap; }
.posting-detail h4 { margin: 22px 0 6px; font-size: .9375rem; font-weight: 700; }
.div-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 11px 0; border-top: 1.5px solid var(--rule); }
.div-list li:not(:has(img)) { grid-template-columns: 1fr; }
.div-list img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; }
.div-list b { display: block; }
.division-command { display: block; margin-top: .45rem; font-size: .9375rem; }
.team-postings { margin-block: .75rem 1.5rem; line-height: 1.85; }
.crew-pick { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.crew-pick legend { padding: 0; margin-bottom: 8px; font-size: .9375rem; font-weight: 700; }
.crew-pick div { display: flex; flex-wrap: wrap; gap: 8px; }
.crew-pick label { position: relative; }
.crew-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.crew-pick span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--rule); font-weight: 650; }
.crew-pick input:checked + span { background: var(--ink); color: var(--paper); box-shadow: none; }
.crew-pick input:focus-visible + span { outline: 3px solid var(--spot); outline-offset: 3px; }
.posting-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; }
.aid-list li { border-top: 1.5px solid var(--rule); }
.aid-list a { padding: 10px 8px; grid-template-columns: 64px minmax(0, 1fr); }
.aid-list img { width: 64px; height: 48px; }
.pane-body .callout { margin-top: 22px; }
/* Ranks wrap instead of clipping at narrow widths and large text sizes */
.rank-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; padding: 11px 0; border-top: 1.5px solid var(--rule); overflow-wrap: anywhere; }

@media (max-width: 1180px) { .dir-pane { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); } .directory { grid-template-columns: 260px minmax(0, 1fr); } }
@media (max-width: 900px) {
  /* One column: service, then region, then posting. */
  .desk-head .wrap { grid-template-columns: 1fr; }
  .directory { grid-template-columns: 1fr; padding-top: 20px; }
  .directory[data-view="index"] .dir-pane, .directory[data-view="pane"] .dir-index, .directory[data-view="pane"] .dir-empty { display: none; }
  .dir-index { position: static; max-height: none; overflow: visible; padding: 0; }
  .dir-index a { padding-block: 10px; }
  .dir-pane { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .dir-pane > .pane-head, .dir-pane > .pane-cover { grid-column: 1; grid-row: auto; }
  .dir-pane > .pane-cover { aspect-ratio: 16 / 8; margin-bottom: 18px; }
  .pane-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; font-weight: 650; text-decoration: none; }
  .pane-tabs { justify-self: stretch; }
  .posting-grid { grid-template-columns: 1fr; }
  .posting-grid > .posting-detail { grid-column: 1; grid-row: auto; position: static; padding: 20px 16px 24px; border-radius: 0 0 10px 10px; margin-bottom: 14px; }
  .posting-grid > .posting-hint { display: none; }
}

/* ---------- Shift card, docked within reach ---------- */
body:has(.dock) { padding-bottom: 68px; }
html:has(.dock) { scroll-padding-bottom: 92px; }     /* keeps focused controls clear of the dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--night); color: var(--night-ink); border-top: 1px solid var(--night-rule); box-shadow: 0 -12px 32px rgb(0 0 0 / .2); }
.dock-bar { display: flex; align-items: center; gap: 16px; min-height: 68px; padding-block: 10px; }
.dock-summary { display: flex; align-items: baseline; gap: 4px 16px; flex: 1; min-width: 0; }
.dock-summary h2 { flex: none; font-size: .875rem; font-weight: 700; color: var(--glow); }
#shift-card { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.dock[data-saved="false"] #shift-card { font-weight: 400; color: var(--night-soft); }
.dock-actions { display: flex; gap: 8px; flex: none; }
.dock-panel { max-height: min(68vh, 540px); overflow-y: auto; padding-block: 4px 24px; border-top: 1px solid var(--night-rule); }
.shift-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; margin-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--night-rule); }
.shift-facts dt { font-size: .8125rem; color: var(--night-soft); }
.shift-facts dd { font-weight: 700; overflow-wrap: anywhere; }
#shift-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px 16px; align-items: end; margin-top: 18px; }
.dock .field select { background: var(--night-raised); color: var(--night-ink); border-color: var(--night-rule); }
.dock .field select:focus-visible { border-color: var(--glow); }
.dock .feedback { margin-top: 12px; color: var(--glow); }
.dock .note { margin-top: 10px; color: var(--night-soft); }
@media (max-width: 760px) {
  .dock-summary { display: grid; }
  #shift-card { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; font-size: .9375rem; }
  #copy-shift span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #copy-shift { padding-inline: 12px; }
  .shift-facts, #shift-form { grid-template-columns: 1fr 1fr; }
  #shift-form .btn { grid-column: 1 / -1; }
}

/* ---------- Recruitment desk ---------- */
.vacancies { padding-block: 28px clamp(56px, 7vw, 96px); }
.desk-jumps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; }
.developer-desk, .founders article, #staff-structure { scroll-margin-top: calc(var(--header) + 1rem); }
.developer-desk { margin-top: clamp(48px, 7vw, 96px); padding-top: 28px; border-top: 3px solid var(--spot); }
.developer-desk > header, .founders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.developer-desk > header { align-items: end; margin-bottom: clamp(24px, 4vw, 52px); }
.developer-desk h2 { font-size: clamp(2.75rem, 6vw, 5.25rem); }
#developer-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.craft-group h3 { color: var(--spot); padding-block: 8px; border-bottom: 2px solid currentColor; }
.craft-group li { border-bottom: 1px solid var(--rule); }
.craft-group a { display: block; padding: 18px 6px; text-decoration: none; }
.craft-group a:hover, .craft-group a:focus-visible { background: var(--card); }
.craft-group h4 { font-size: 1.1875rem; text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--spot); }
.craft-group p { margin-top: 8px; max-width: 60ch; color: var(--ink-soft); }
.founders { margin-top: 32px; }
.founders article { border-top: 3px solid var(--spot); padding: 20px clamp(16px, 2vw, 28px); background: var(--card); }
.founders small { color: var(--ink-soft); font-weight: 650; }
.founders h3 { font: 800 clamp(2.5rem, 4vw, 3.5rem)/1.1 var(--display); margin-bottom: 12px; }
.founders li + li { margin-top: 5px; }
@media (max-width: 740px) {
  .developer-desk > header, #developer-roles, .founders { grid-template-columns: 1fr; }
}
.vacancy-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
#vacancy-count { font-size: .9375rem; color: var(--ink-soft); }
.vacancies .notice, .vacancies .dir-empty { margin-top: 24px; }
.phase { margin-top: 40px; }
.phase > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.phase > header h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.015em; }
.phase > header p { color: var(--ink-soft); }
/* Future appointments read as pending: dashed rule, outlined label */
.phase-expansion > header { border-bottom-style: dashed; }
.post-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 158px minmax(0, 2.4fr); gap: 6px 24px; align-items: start; padding: 16px 12px; border-bottom: 1.5px solid var(--rule); text-decoration: none; }
.post-cols { padding-block: 10px; font-size: .8125rem; font-weight: 700; color: var(--ink-soft); }
a.post-row:hover { background: var(--card); }
a.post-row:hover b { text-decoration: underline; text-decoration-color: var(--spot); text-underline-offset: .2em; }
.post-title b { display: block; font-size: 1.125rem; line-height: 1.25; }
.post-title small { font-size: .875rem; color: var(--ink-soft); }
.post-remit { font-size: .9375rem; color: var(--ink-soft); }
.post-reports { font-size: .9375rem; }
.post-reports small { display: none; }
@media (max-width: 900px) {
  .post-cols { display: none; }
  .post-row { grid-template-columns: 1fr; padding-inline: 0; }
  .post-phase { order: -1; }
  .post-reports small { display: inline; margin-right: 6px; font-size: inherit; color: var(--ink-soft); }
}

.structure { padding-block: clamp(56px, 7vw, 96px); background: var(--paper-sunk); }
.structure-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 16px clamp(32px, 6vw, 96px); align-items: end; }
.structure-head .lead { max-width: none; }
.staff-structure { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter) clamp(32px, 6vw, 96px); margin-top: 44px; }
.staff-structure h3 { padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); font-size: 1.125rem; }
.staff-structure li { padding: 14px 0; border-bottom: 1.5px solid var(--rule); }
.staff-structure a { display: block; text-decoration: none; }
.staff-structure b { display: block; font-size: 1.125rem; }
.staff-structure a:hover b { color: var(--spot); text-decoration: underline; text-underline-offset: .2em; }
.staff-structure small { display: block; font-size: .875rem; color: var(--ink-soft); }
.staff-structure p { margin-top: 6px; max-width: var(--measure); }
.governance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: 48px; }
.governance h3 { margin-bottom: 6px; font-size: 1.125rem; }
.governance p { font-size: .9375rem; color: var(--ink-soft); }
@media (max-width: 900px) { .structure-head, .staff-structure, .governance { grid-template-columns: 1fr; } }

/* A post: what the panel wants on the left, the draft on the right */
.post-dialog { width: min(100vw - 32px, 1060px); }
.post-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100%; }
.post-brief { padding: clamp(24px, 3.4vw, 44px); background: var(--paper-sunk); }
.post-brief h2 { margin-top: 14px; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 750; line-height: 1.1; letter-spacing: -.02em; }
.post-org { margin-top: 4px; color: var(--ink-soft); }
.post-facts { margin-top: 24px; }
.post-facts div { padding: 14px 0; border-top: 1.5px solid var(--rule); }
.post-facts dt { font-size: .875rem; font-weight: 700; color: var(--ink-soft); }
.post-facts dd { margin-top: 2px; }
.post-form { display: grid; gap: 16px; align-content: start; padding: clamp(24px, 3.4vw, 44px); }
.post-form h3 { padding-right: 48px; font-size: 1.25rem; }
.post-form .btn { justify-self: start; }
.draft-done { padding: 16px 18px; border-radius: 8px; background: var(--card); box-shadow: inset 5px 0 0 var(--spot), inset 0 0 0 1.5px var(--rule); }
.draft-done:empty { display: none; }
.draft-done h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 1.125rem; }
.draft-done b { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-brief h2 { padding-right: 48px; }
  .post-form h3 { padding-right: 0; }
}
