/* LOM — LegalOps Framework Platform. Follows "LegalOps Labs — UX Standards" with LegalOps purple as the accent. */
@font-face { font-family: "Inter"; font-weight: 300; font-display: swap; src: url("/vendor/fonts/inter-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/vendor/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --text: #1d1d1f;
  --text-2: #3a3a3c;
  --muted: #6e6e73;
  --faint: #c7c7cc;
  --line: #e5e5ea;
  --line-2: #d2d2d7;
  --bg: #ffffff;
  --bg-soft: #fbfbfd;
  --bg-hover: #f5f5f7;
  --bg-on: #ececf0;
  --accent: #513D80;
  --accent-dark: #3b2c5e;
  --danger: #B03A2E;
  --ok: #4CBF86;
  --ctl: 36px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (pointer: coarse) { :root { --ctl: 44px; } }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.app { min-height: 100%; display: flex; flex-direction: column; }

/* Type levels */
.title { margin: 0; font-size: 32px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.2; }
.eb { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 4px 0 0; font-size: 17px; font-weight: 500; }
.lead { margin: 0; color: var(--text-2); }
.note { margin: 0; font-size: 14px; color: var(--muted); }
.foot { padding: 16px 32px; font-size: 12px; color: var(--muted); text-align: center; margin-top: auto; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl); padding: 0 14px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--bg-hover); color: var(--text); }
.btn.p { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.p:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.wide { width: 100%; }
.lnk { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: var(--ctl); }
.lnk:hover { color: var(--accent-dark); }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.inp { font: inherit; font-size: 16px; font-weight: 400; min-height: 44px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; width: 100%; background: #fff; color: var(--text); }
.inp:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(81, 61, 128, .15); }
.inp.code { font-size: 24px; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: var(--ctl); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.err { margin: 0; font-size: 14px; color: var(--danger); }
.ok { margin: 0; font-size: 14px; color: var(--text-2); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* Loading */
.boot { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.skeleton { width: min(400px, 100%); height: 260px; border-radius: 12px; background: linear-gradient(90deg, #f5f5f7 25%, #ececf0 50%, #f5f5f7 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Sign-in pages */
.auth { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 20px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.logo { width: 32px; height: 32px; flex: none; display: block; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-card.wide { width: min(560px, 100%); }
.auth-card .title { font-size: 28px; }
.onfile { background: var(--bg-hover); border-radius: 8px; padding: 12px 16px; font-size: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 0 20px; }

/* Signed-in shell: side menu + top bar */
.shell { flex: 1; display: flex; min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; flex: 0 0 64px; z-index: 20; }
.side-inner { position: absolute; inset: 0 auto 0 0; width: 64px; overflow: hidden; background: var(--bg-soft); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; transition: width .15s ease; }
.side:hover .side-inner, .side:focus-within .side-inner, .shell.pinned .side-inner { width: 232px; box-shadow: 0 0 24px rgba(0, 0, 0, .06); }
.shell.pinned .side { flex-basis: 232px; }
.shell.pinned .side-inner { box-shadow: none; }
.side .brand { padding: 4px 4px 16px; white-space: nowrap; }
.mi { display: flex; align-items: center; gap: 12px; min-height: var(--ctl); padding: 0 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.mi:hover { background: var(--bg-hover); color: var(--text); }
.mi.on { background: var(--bg-on); }
.mi svg { flex: none; width: 20px; height: 20px; }
.mi.quiet { color: var(--muted); font-size: 13px; }
.side-fill { flex: 1; min-height: 24px; }
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--faint); margin: 0 4px; }
.crumbs .here { color: var(--text); }
.menu-btn { display: none; }
.me { position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--bg-on); border: 0; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer; }
@media (pointer: coarse) { .avatar { width: 44px; height: 44px; border-radius: 22px; } }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); padding: 8px; z-index: 30; }
.pop .who { padding: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop .who div { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.pop .who span { font-size: 13px; color: var(--muted); }
.content { width: 100%; max-width: 1160px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.phone-menu { display: none; }

@media (max-width: 760px) {
  .side { display: none; }
  .top { padding: 0 12px 0 8px; }
  .menu-btn { display: inline-flex; }
  .phone-menu:not([hidden]) { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
  .content { padding: 24px 20px; }
  .title { font-size: 28px; }
  .card { padding: 20px; }
  .foot { padding: 16px 20px; }
}

/* Footer line level with "Keep menu open" (16px padding + control height + 16px padding). */
.shell .foot { min-height: calc(var(--ctl) + 32px); padding-top: 0; padding-bottom: 0; display: flex; align-items: center; justify-content: center; }
.top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs .short { display: none; }
@media (max-width: 760px) {
  .crumbs .long { display: none; }
  .crumbs .short { display: inline; }
}
/* Collapsed menu shows icons only; names appear when it opens or is kept open. */
.side .mi span, .side .brand span:not(.logo) { opacity: 0; transition: opacity .1s ease; }
.side:hover .mi span, .side:focus-within .mi span, .shell.pinned .side .mi span,
.side:hover .brand span:not(.logo), .side:focus-within .brand span:not(.logo), .shell.pinned .side .brand span:not(.logo) { opacity: 1; }
/* App name wraps onto two lines in the side menu rather than being cut off. */
.side .brand { white-space: normal; align-items: center; }
.side .brand span:not(.logo) { width: 150px; flex: none; font-size: 14px; line-height: 1.25; }

/* Top bar, right side: LegalOps.com logo, search, your face */
.top-right { display: flex; align-items: center; gap: 14px; flex: none; }
.lo-logo { display: block; height: 24px; width: auto; }
.search-box { display: inline-flex; align-items: center; gap: 8px; height: 32px; min-width: 200px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.search-box:hover { border-color: var(--line-2); }
.search-box kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
@media (pointer: coarse) { .search-box { height: 44px; border-radius: 22px; } }
@media (max-width: 760px) {
  .lo-logo { display: none; }
  .search-box { min-width: 0; width: 44px; padding: 0; justify-content: center; }
  .search-box .search-label, .search-box kbd { display: none; }
}

/* Faces: photo, or initials until a photo is added */
.face { width: 100%; height: 100%; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-on); font-size: 12px; font-weight: 500; color: var(--text); flex: none; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar { padding: 0; overflow: hidden; }
.face.big { width: 64px; height: 64px; font-size: 20px; }
.res .face { width: 20px; height: 20px; font-size: 9px; }

/* In-page dialogs */
.dlg-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .28); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; overflow-y: auto; }
.dlg { width: min(520px, 100%); background: #fff; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .14); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dlg-actions { margin-top: 4px; }
.grow { flex: 1; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.danger-text { color: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Search window */
.search-field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 4px 12px; color: var(--muted); }
.inp.bare { border: 0; padding: 0; min-height: 36px; box-shadow: none; }
.inp.bare:focus { box-shadow: none; }
.results { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.res-head { padding: 8px 8px 4px; }
.res { gap: 10px; }
.res .muted { margin-left: auto; color: var(--muted); font-size: 13px; }
.res-empty { padding: 8px; }

/* Menu group label (shown when the menu is open) */
.mi-group { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 8px 4px; white-space: nowrap; }
.side .mi-group { opacity: 0; transition: opacity .1s ease; }
.side:hover .mi-group, .side:focus-within .mi-group, .shell.pinned .side .mi-group { opacity: 1; }

/* Wide pages (boards) use the full width */
.content.wide { max-width: none; }
.wide-skel { width: 100%; height: 320px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head .note { margin-top: 6px; }
.eb.accent { color: var(--accent); }
.eb .sq, .sq { background: var(--c, var(--accent)); display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.find { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); min-height: var(--ctl); padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); background: #fff; }
.find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(81, 61, 128, .15); }
.find .inp.bare { font-size: 15px; min-height: calc(var(--ctl) - 2px); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; background: rgba(255, 255, 255, .7); }
@media (pointer: coarse) { .btn.small { min-height: 44px; } }

/* Board: columns side by side; only the board scrolls sideways, never the page */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: 216px; grid-template-rows: auto auto; align-items: stretch; gap: 10px 14px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 14px; margin: -2px; scroll-snap-type: x proximity; }
.board:focus-visible { outline-offset: 4px; }
.col { grid-row: span 2; display: grid; grid-template-rows: subgrid; gap: 10px; min-width: 0; scroll-snap-align: start; }
/* Column headers in a row line up to the tallest one, so the first cards line up too. */
.col > .col-head { align-self: stretch; } .col > .col-body, .col > .empty { align-self: start; }
.col-head { display: flex; flex-direction: column; gap: 6px; min-height: 92px; padding: 10px 12px 12px; border-top: 6px solid var(--c, var(--accent)); background: var(--c-soft, var(--bg-hover)); border-radius: 10px; }
.col-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.col-name { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--text); text-decoration: none; }
a.col-name:hover { text-decoration: underline; color: var(--text); }
.col-note { font-size: 12px; color: var(--text-2); }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--text-2); font: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; margin: -8px -8px -8px 0; } }
.icon-btn svg { transition: transform .15s ease; }
.icon-btn.closed svg { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .icon-btn svg { transition: none; } }
.sub { text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.sub:hover { border-color: var(--line-2); background: var(--bg-soft); }
.sub-name { font-size: 14px; line-height: 1.35; }
.empty { padding: 12px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 13px; color: var(--muted); }
.prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 760px) { .board { grid-auto-columns: min(76vw, 260px); } }

/* Overview window */
.dlg.wide { width: min(760px, 100%); padding: 0; gap: 0; max-height: calc(100vh - 6vh - 16px); max-height: calc(100dvh - 6vh - 16px); }
.dlg-back:has(.dlg.wide) { padding-top: 6vh; }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.ov-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--bg-on); color: var(--text-2); }
.ov-title { margin: 6px 0 0; font-size: 24px; font-weight: 300; line-height: 1.25; }
.ov-body { padding: 8px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.ov-sec { display: flex; flex-direction: column; gap: 8px; }
.ov-h { margin: 12px 0 0; font-size: 16px; font-weight: 500; }
.ov-text { font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.ov-text.boxed { padding: 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; }
.ov-none { padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 14px; color: var(--muted); }
.ov-src { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.res .eb { min-width: 38px; }
@media (max-width: 760px) { .ov-head { padding: 16px; } .ov-body { padding: 4px 16px 20px; } .ov-title { font-size: 22px; } }
.col-act { margin-top: auto; padding-top: 4px; }

/* Area page: sub-area name links to its page */
.col-name a { color: inherit; text-decoration: none; }
.col-name a:hover { text-decoration: underline; }

/* Sub-area page */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 17px; font-size: 13px; color: var(--text); text-decoration: none; background: #fff; }
.chip:hover { background: var(--bg-hover); color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (pointer: coarse) { .chip { min-height: 44px; border-radius: 22px; } }
.sec { display: flex; flex-direction: column; gap: 12px; max-width: 1160px; }
.sec-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.src { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.levels { display: flex; flex-direction: column; }
.lv { display: grid; grid-template-columns: 200px 1fr; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.lv-name { font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.lv-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-text .ov-text { margin: 0; }
.lv-text .none { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .lv { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .chips { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; } .chip { flex: none; } }

/* Career Ladder */
.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 4px; border-radius: 12px; background: var(--bg-hover); max-width: 100%; overflow-x: auto; }
.seg-b { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 8px; font-size: 14px; color: var(--text); text-decoration: none; white-space: nowrap; }
.seg-b:hover { color: var(--text); background: rgba(0, 0, 0, .04); }
.seg-b.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: 500; }
@media (pointer: coarse) { .seg-b { min-height: 40px; } }
.pill.big { font-size: 14px; padding: 3px 10px; border-radius: 12px; vertical-align: middle; background: rgba(81, 61, 128, .1); color: var(--accent); white-space: nowrap; }
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 32px; padding: 20px 24px; }
.prof p { margin: 4px 0 0; font-size: 15px; }
.prof .src { margin-top: 6px; font-size: 11px; }
.prof .none, .grp-text.none, .lgrid .none { color: var(--muted); font-style: italic; }
.row-between { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.groups { display: flex; flex-direction: column; gap: 10px; }
.grp { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.grp-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; border-radius: 12px; }
.grp-head:hover:not([disabled]) { background: var(--bg-soft); }
.grp-head[disabled] { cursor: default; color: var(--text); }
.grp-head .sq { margin-right: 0; flex: none; }
.grp-name { flex: 1; min-width: 0; }
.grp-count { flex: none; text-align: right; }
.grp-chev { display: inline-flex; flex: none; color: var(--text-2); transition: transform .15s ease; transform: rotate(-90deg); }
.grp-head[aria-expanded="true"] .grp-chev { transform: none; }
@media (prefers-reduced-motion: reduce) { .grp-chev { transition: none; } }
.grp-body { border-top: 1px solid var(--line); padding: 4px 16px; }
.grp-row { display: grid; grid-template-columns: 240px 1fr; gap: 6px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.grp-row:last-child { border-bottom: 0; }
.grp-sub { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; font-size: 14px; }
.grp-sub:hover { color: var(--accent); }
.grp-text { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .grp-row { grid-template-columns: 1fr; }
  .grp-head { flex-wrap: wrap; padding: 10px 16px; gap: 4px 12px; }
  .grp-count { order: 3; width: 100%; text-align: left; padding-left: 22px; }
}
.grid-wrap { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 12px; }
.lgrid { border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.5; }
.lgrid th, .lgrid td { vertical-align: top; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 220px; max-width: 280px; }
.lgrid thead th { position: sticky; top: 0; background: var(--bg-soft); font-weight: 500; font-size: 13px; }
.lgrid tbody tr:last-child th, .lgrid tbody tr:last-child td { border-bottom: 0; }
.lgrid .lg-sub { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 180px; max-width: 200px; }
.lgrid thead .lg-sub { z-index: 2; background: var(--bg-soft); }
.lgrid .lg-sub a { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; font-weight: 500; }
.lgrid .lg-sub a:hover { color: var(--accent); }
@media (max-width: 760px) { .lgrid .lg-sub { min-width: 130px; max-width: 150px; } .lgrid th, .lgrid td { min-width: 200px; } }
