/* ------------------------------------------------------------------
   Department HQ
   Palette is built around one sage green (#85a16b). Change --accent
   and its two variants to re-theme the whole site.
------------------------------------------------------------------- */
:root {
  --bg: #11150f;
  --surface: #171c15;
  --raised: #1f261c;
  --line: #2a3325;
  --line-soft: #202819;

  --ink: #e8eee2;
  --ink-2: #b4bfab;
  --muted: #84927b;

  --accent: #85a16b;
  --accent-hi: #a9c58f;
  --accent-lo: #566f43;
  --accent-wash: rgba(133, 161, 107, 0.14);

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "IBM Plex Mono", Consolas, monospace;

  --bar-h: 56px;
  --gutter: clamp(16px, 4vw, 28px);
}

/* Tier colours: one set, used by chips, bars and the career timeline. */
.t-lr   { --tc: #8e9a87; }
.t-mr   { --tc: #85a16b; }
.t-hr   { --tc: #a9c58f; }
.t-ex   { --tc: #d2bf80; }
.t-lead { --tc: #efd98f; }

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-padding-top: calc(var(--bar-h) + 80px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
main { min-height: 70vh; outline: none; padding-bottom: 72px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
mark { background: rgba(169, 197, 143, 0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #11150f; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

.display {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.005em;
}

/* ---------- Header ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(17, 21, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.bar-in { display: flex; align-items: center; justify-content: space-between; height: var(--bar-h); }
.brand { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 1.25rem; }
.bar nav { display: flex; gap: 4px; }
.bar nav a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.bar nav a:hover { color: var(--ink); background: var(--surface); }
.bar nav a.on { color: var(--accent-hi); background: var(--accent-wash); }

/* ---------- Buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500;
}
.btn:hover { border-color: var(--accent-lo); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #11150f; font-weight: 600; }
.btn.solid:hover { background: var(--accent-hi); border-color: var(--accent-hi); }

input[type="search"] {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); outline: none;
  -webkit-appearance: none; appearance: none;
}
input[type="search"]::placeholder { color: var(--muted); }
input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }

/* ---------- Home: hero ---------- */
.hero { padding-top: clamp(48px, 9vw, 104px); padding-bottom: 40px; }
.hero .display { font-size: clamp(3.4rem, 12vw, 8.5rem); max-width: 12ch; }
.find { display: flex; gap: 10px; margin-top: 32px; max-width: 560px; }
.find input { padding: 14px 18px; font-size: 1.05rem; }
.find .btn { padding: 0 24px; }

/* ---------- Numbers row (home, profile) ---------- */
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.numbers > div { padding: 20px 20px 20px 0; border-top: 1px solid var(--line); }
.numbers b {
  display: block; font-family: var(--display); font-stretch: 78%; font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.05; font-variant-numeric: tabular-nums;
}
.numbers span { color: var(--muted); font-size: 0.92rem; }
.vitals { padding: 0; margin-top: 28px; }
.vitals > div:last-child b { font-size: clamp(1.3rem, 3vw, 1.7rem); padding-top: 0.3em; }

/* ---------- Tier distribution ---------- */
.tiers { padding-top: 12px; padding-bottom: 8px; }
.tierbar { display: flex; gap: 3px; height: 12px; }
.tierbar i { background: var(--tc); border-radius: 3px; min-width: 3px; }
.tierkey { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; color: var(--ink-2); font-size: 0.92rem; }
.tierkey li { display: flex; align-items: center; gap: 8px; }
.tierkey b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); display: inline-block; }

/* ---------- Blocks ---------- */
.block { padding-top: 48px; }
.block h2 { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.35rem; margin-bottom: 18px; }
.block-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 4px; }
.block-h h2 { margin-bottom: 0; white-space: nowrap; }
.block h3 { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); margin: 18px 0 8px; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 56px; }
.sub { color: var(--muted); font-size: 0.92rem; margin-top: 14px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-size: 0.9rem; }
.seg button.on { background: var(--accent); color: #11150f; font-weight: 600; }

/* ---------- Bar chart ---------- */
.pulse {
  --chart-h: 168px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px;
  height: calc(var(--chart-h) + 56px); padding-top: 28px;
}
.pulse li { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-width: 0; }
.pulse i {
  display: block; position: relative; width: 100%;
  height: calc(var(--chart-h) * var(--r)); min-height: 3px;
  background: var(--accent); border-radius: 3px 3px 0 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 40ms);
}
.pulse i::before {
  content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  padding-bottom: 4px; font-size: 0.74rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pulse .partial i { background: repeating-linear-gradient(135deg, var(--accent) 0 5px, var(--accent-lo) 5px 10px); }
.pulse span { display: flex; justify-content: center; font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
@keyframes rise { from { height: 0; } }

/* ---------- Feed / leadership ---------- */
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed a { font-weight: 600; }
.feed a:hover { color: var(--accent-hi); }
.feed span { grid-column: 1; color: var(--ink-2); font-size: 0.92rem; }
.feed time { grid-row: 1; grid-column: 2; color: var(--muted); font-size: 0.88rem; }
.crew li + li { margin-top: 4px; }
.crew a { display: flex; align-items: center; gap: 14px; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; }
.crew a:hover { background: var(--surface); }
.crew b { display: block; font-weight: 600; }
.crew small { color: var(--muted); font-size: 0.88rem; }

.empty { color: var(--muted); padding: 8px 0; }
.loading { color: var(--muted); padding-top: 64px; }
.err { padding-top: 72px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* ---------- Avatars ---------- */
.av {
  flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  width: 40px; height: 40px; border-radius: 11px; background: var(--raised); color: var(--accent-hi);
  font-weight: 600; font-size: 0.85rem;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.big { width: 104px; height: 104px; border-radius: 24px; font-size: 2rem; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; font-style: normal; font-size: 0.8rem; font-weight: 500;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
}
.chip.tier {
  color: var(--tc); font-weight: 600;
  border-color: color-mix(in srgb, var(--tc) 45%, transparent);
  background: color-mix(in srgb, var(--tc) 12%, transparent);
}
.chip.dept { color: var(--accent-hi); border-color: var(--accent-lo); background: var(--accent-wash); }
.chip.former { color: #e0a39a; border-color: #5c3731; background: rgba(224, 163, 154, 0.08); }
.chip.now { color: #11150f; background: var(--tc); border-color: var(--tc); margin-left: 10px; vertical-align: 2px; font-weight: 600; }
.chip.tag-gold   { color: #e7cf86; border-color: #6a5c2e; }
.chip.tag-red    { color: #e59a92; border-color: #6a3a35; }
.chip.tag-orange { color: #e5b27f; border-color: #6a4a2e; }
.chip.tag-green  { color: var(--accent-hi); border-color: var(--accent-lo); }
.chip.tag-teal   { color: #86cfc4; border-color: #2f5e57; }
.chip.tag-blue   { color: #94b8e6; border-color: #34507a; }
.chip.tag-purple { color: #bfa4e6; border-color: #523f78; }
.chip.tag-pink   { color: #e6a3c4; border-color: #6e3a54; }
.chip.tag-grey   { color: var(--ink-2); }

/* ---------- Roster ---------- */
.tools { position: sticky; top: var(--bar-h); z-index: 5; background: rgba(17, 21, 15, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.tools-in { padding-top: 16px; padding-bottom: 12px; }
.pills { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; cursor: pointer; padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: none; color: var(--ink-2); font-size: 0.9rem;
}
.pill:hover { border-color: var(--accent-lo); }
.pill span { margin-left: 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill.on { background: var(--accent); border-color: var(--accent); color: #11150f; font-weight: 600; }
.pill.on span { color: rgba(17, 21, 15, 0.7); }

.list { padding-top: 12px; }
.group { display: flex; align-items: baseline; gap: 10px; padding: 26px 12px 8px; font-size: 0.95rem; font-weight: 600; color: var(--ink-2); }
.group span { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; }
.row:hover { background: var(--surface); }
.who { min-width: 0; display: block; }
.name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name .chip { margin-left: 8px; padding: 0 8px; font-size: 0.74rem; }
.handle { display: flex; gap: 14px; color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 6px; }
.emp { min-width: 54px; text-align: right; color: var(--ink-2); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.more { display: flex; margin: 18px auto 0; }
.foot { color: var(--muted); font-size: 0.85rem; padding-top: 28px; }

/* ---------- Profile ---------- */
.profile { padding-top: 24px; }
.back { display: inline-block; color: var(--muted); font-size: 0.92rem; padding: 4px 0; margin-bottom: 14px; }
.back::before { content: "\2190\00a0"; }
.back:hover { color: var(--accent-hi); }

.who-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.who-text .display { font-size: clamp(2.2rem, 6vw, 3.6rem); overflow-wrap: anywhere; }
.handle-line { color: var(--muted); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.idtag { display: inline-flex; align-items: stretch; border: 1.5px solid var(--accent); border-radius: 8px; overflow: hidden; }
.idtag span { display: flex; align-items: center; padding: 0 10px; background: var(--accent); color: #11150f; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; }
.idtag b { padding: 8px 14px; font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0.16em; }
.idtag.none { border-style: dashed; border-color: var(--muted); }
.idtag.none span { background: var(--muted); }
.idtag.none b { color: var(--muted); letter-spacing: 0.04em; font-size: 0.9rem; }

/* Career: proportional strip plus the stint list */
.career { padding-top: 56px; }
.strip { display: flex; gap: 3px; height: 48px; margin: 4px 0 30px; overflow: hidden; }
.strip i {
  display: flex; align-items: center; justify-content: center; flex-grow: 1; flex-shrink: 1; flex-basis: 0; min-width: 18px;
  border-radius: 7px; overflow: hidden;
  background: color-mix(in srgb, var(--tc) 28%, var(--surface));
  color: var(--ink); font-size: 0.82rem; font-weight: 600; font-style: normal; font-variant-numeric: tabular-nums;
  transform-origin: left; animation: sweep 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 90ms);
}
.strip i.cur { background: var(--tc); color: #11150f; }
@keyframes sweep { from { transform: scaleX(0); } }

.stints { position: relative; }
.stint { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 0 0 24px 32px; }
.stint::before { content: ""; position: absolute; left: 5px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.stint:last-child { padding-bottom: 0; }
.stint:last-child::before { display: none; }
.node { position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--tc, var(--muted)); }
.stint.now .node { background: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent); }
.stint.joined .node { border-color: var(--muted); background: var(--muted); }
.stint h3 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.stint p { color: var(--muted); font-size: 0.92rem; }
.s-side { text-align: right; }
.s-side b { display: block; font-weight: 600; font-size: 0.95rem; }
.s-side span { color: var(--muted); font-size: 0.88rem; }

.awards { display: flex; flex-wrap: wrap; gap: 8px; }
.awards li {
  padding: 5px 13px; border-radius: 999px; font-size: 0.9rem; cursor: default;
  border: 1px solid var(--accent-lo); background: var(--accent-wash); color: var(--accent-hi);
}
.awards-block h3:first-of-type { margin-top: 0; }

.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.details > div { padding: 14px 20px 14px 0; border-top: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 0.88rem; }
.details dd { font-weight: 500; margin-top: 2px; }
.details small { display: block; color: var(--muted); font-weight: 400; font-size: 0.88rem; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .who-card { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 16px 18px; }
  .who-card .idtag { grid-column: 1 / -1; justify-self: start; }
  .av.big { width: 72px; height: 72px; border-radius: 18px; font-size: 1.4rem; }
  .meta .dept, .emp { display: none; }
  .pulse { gap: 4px; }
  .pulse li:nth-child(even) span { visibility: hidden; }
  .find .btn { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse i, .strip i { animation: none; }
}

/* =================================================================
   Round 2: nav, announcement, next event, events, market, handbook
   ================================================================= */

/* Nav: scrolls sideways on narrow screens instead of wrapping */
.bar nav { overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { white-space: nowrap; }
.bar nav a.ext::after { content: "\2197"; margin-left: 4px; font-size: .8em; opacity: .7; }
@media (max-width: 760px) {
  .bar-in { height: auto; flex-direction: column; align-items: stretch; gap: 2px; padding-top: 10px; padding-bottom: 6px; }
  .bar nav { margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 12px); }
  :root { --bar-h: 92px; }
}

/* Announcement */
.notice {
  margin-top: 20px; padding: 12px 16px; border-radius: 12px; font-weight: 500;
  border: 1px solid var(--accent-lo); background: var(--accent-wash); color: var(--ink);
}
.notice.tone-warn { border-color: #6a5c2e; background: rgba(210, 191, 128, 0.10); }
.notice.tone-ok { border-color: var(--accent); background: rgba(133, 161, 107, 0.2); }

/* Hero with the next event beside it */
.hero.with-next { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: end; }
.hero .display { font-size: clamp(3rem, 9vw, 6.8rem); max-width: 14ch; }
.next-ev {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.next-ev:hover { border-color: var(--accent-lo); }
.next-ev b { color: var(--ink); font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.35rem; line-height: 1.15; }
.next-label { color: var(--accent-hi); font-size: .85rem; font-weight: 600; }
@media (max-width: 860px) { .hero.with-next { grid-template-columns: 1fr; } }

/* Page scaffolding for the new pages */
.page { padding-top: 40px; }
.page-title { font-size: clamp(2.6rem, 7vw, 4.4rem); }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.block.first { padding-top: 28px; }

/* Events */
.events-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 48px; align-items: start; }
@media (max-width: 900px) { .events-grid { grid-template-columns: 1fr; } }
.evs li.ev {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 18px 0; border-top: 1px solid var(--line-soft);
}
.evs li.ev:first-child { border-top: 0; padding-top: 0; }
.ev-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.ev-date b { font-family: var(--display); font-stretch: 78%; font-size: 1.7rem; line-height: 1; }
.ev-date span { color: var(--muted); font-size: .8rem; }
.ev.live .ev-date { border-color: var(--accent); background: var(--accent-wash); }
.ev-main h3 { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 2px 0 4px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .92rem; }
.ev-meta a { color: var(--ink-2); }
.ev-meta a:hover { color: var(--accent-hi); }
.ev-desc { margin-top: 8px; color: var(--ink-2); max-width: 64ch; }
.chip.now-chip { color: #11150f; background: var(--accent); border-color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .evs li.ev { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  .ev-date { width: 52px; height: 52px; }
  .evs li.ev > .chip { grid-column: 2; justify-self: start; }
}

.cal { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 1rem; color: var(--ink); font-weight: 600; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--accent-lo); color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-name { color: var(--muted); font-size: .75rem; padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .85rem; color: var(--ink-2); }
.cal-day b { font-weight: 500; }
.cal-day.today { outline: 1px solid var(--accent-lo); color: var(--ink); }
.cal-day i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.cal-day.has-up { background: var(--accent-wash); color: var(--ink); }
.cal-day.has-up i { background: var(--accent-hi); }
.cal-key { display: flex; gap: 16px; margin-top: 12px; color: var(--muted); font-size: .8rem; }
.cal-key i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.k-up { background: var(--accent-hi); } .k-past { background: var(--muted); }

.past li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.past li:first-child { border-top: 0; }
.past time { color: var(--muted); font-size: .92rem; }
.past span { color: var(--ink-2); }
.past a:hover { color: var(--accent-hi); }
.past b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .past li { grid-template-columns: 1fr auto; } .past time { grid-column: 1 / -1; } }

/* Market */
.market-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 48px; align-items: start; }
@media (max-width: 900px) { .market-grid { grid-template-columns: 1fr; } }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.shop .item { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.shop .item.sold { opacity: .55; }
.item-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.item-top h3 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.price { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.3rem; color: var(--accent-hi); white-space: nowrap; }
.price small { font-family: var(--body); font-size: .75rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
.shop .item p { color: var(--ink-2); font-size: .93rem; }
.item-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: .85rem; }
.item-facts dt { color: var(--muted); display: inline; }
.item-facts dt::after { content: " "; }
.item-facts dd { display: inline; color: var(--ink-2); }
.shop .empty { grid-column: 1 / -1; }

.board li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.board li:first-child { border-top: 0; }
.board .pos { color: var(--muted); font-variant-numeric: tabular-nums; }
.board a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board a:hover { color: var(--accent-hi); }
.board small { grid-column: 2; color: var(--muted); font-size: .85rem; }
.board b { grid-row: 1; grid-column: 3; font-variant-numeric: tabular-nums; color: var(--tc); }

/* Handbook */
.doc-frame { margin-top: 24px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.doc-frame iframe { display: block; width: 100%; height: calc(100vh - var(--bar-h) - 210px); min-height: 520px; border: 0; }
.doc-open { margin-top: 14px; }
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 40px; }
.rung-group h3 { margin-top: 10px; }
.rung-group li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.rung-group li:first-child { border-top: 0; }
.rung-group .num { font-variant-numeric: tabular-nums; color: var(--tc); font-weight: 600; }
.dept h3 { color: var(--ink); font-size: 1.05rem; }
.dept ol { list-style: decimal; padding-left: 22px; color: var(--ink-2); }
.dept li { padding: 3px 0; }
.award-list > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.award-list > div:first-child { border-top: 0; }
.award-list dt { font-weight: 600; color: var(--accent-hi); }
.award-list dd { color: var(--ink-2); }
@media (max-width: 560px) { .award-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* Leadership */
.lead-note { color: var(--muted); margin-top: 12px; max-width: 64ch; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 28px; }
.tool { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.tool:hover { border-color: var(--accent-lo); }
.tool h2 { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.5rem; }
.tool p { color: var(--ink-2); }
.tool-open { margin-top: auto; padding-top: 8px; color: var(--accent-hi); font-weight: 600; }
.tool-open::after { content: "\2197"; margin-left: 6px; font-size: .85em; }
