/* AccessControl Enterprise: the access portal. One light, warm-neutral system; one blue for actions. */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --sunken: #f1efea;
  --ink: #1c1a17;
  --ink-2: #3d3a35;
  --muted: #6b665f;
  --line: rgba(28, 26, 23, 0.09);
  --line-2: rgba(28, 26, 23, 0.16);
  --accent: #1f5bd6;
  --accent-ink: #ffffff;
  --accent-soft: #e9effc;
  --ok: #157a46;  --ok-soft: #e5f3eb;
  --warn: #8f5200; --warn-soft: #fbf0dd;
  --bad: #b42318;  --bad-soft: #fbe9e7;

  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(28, 26, 23, 0.05), 0 1px 1px rgba(28, 26, 23, 0.03);
  --shadow-2: 0 1px 2px rgba(28, 26, 23, 0.05), 0 8px 24px -8px rgba(28, 26, 23, 0.12);
  --shadow-3: 0 2px 4px rgba(28, 26, 23, 0.04), 0 24px 64px -16px rgba(28, 26, 23, 0.24);

  /* motion: strong custom curves, short UI durations */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  color-scheme: light;
  accent-color: var(--accent);
  caret-color: var(--accent);
  scrollbar-color: rgba(28, 26, 23, 0.22) transparent;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
::selection { background: #cfdcf8; color: var(--ink); }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 12px; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
.skip:focus { top: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 20px 16px; border-right: 1px solid var(--line); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--ink); flex: none; }
.brand__mark svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; line-height: 1.15; }
.brand__name span { font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }

.nav { display: grid; gap: 2px; }
.nav__item { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background-color 140ms ease, color 140ms ease; }
.nav__item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav__item em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav__item em.is-live:not(:empty) { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.nav__item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.nav__item[aria-current="page"] svg { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .nav__item:not([aria-current="page"]):hover { background: rgba(28, 26, 23, 0.045); color: var(--ink); } }

.side__foot { margin-top: auto; display: grid; gap: 12px; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #dfe8f9; color: #1b4aa8; font-weight: 600; font-size: 14px; }
.me__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me__text b { font-weight: 500; font-size: 14px; }
.me__text i { font-style: normal; color: var(--muted); font-size: 12.5px; }
.link-btn { justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 40px; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; height: 40px; padding: 0 12px; gap: 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); transition: box-shadow 160ms ease; }
.search:focus-within { box-shadow: 0 0 0 4px #dbe5fb, inset 0 0 0 1px var(--accent); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; }
.search input::placeholder { color: #8b857d; }
.search input::-webkit-search-cancel-button { display: none; }
kbd { font: 500 12px var(--mono); min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 5px; color: var(--muted); background: var(--sunken); box-shadow: inset 0 -1px 0 var(--line-2); }
.top .btn { margin-left: auto; }

.view { flex: 1; width: 100%; max-width: 1160px; padding: 40px 40px 96px; outline: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 0; font-weight: 500; font-size: 14.5px; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none; transition: transform 160ms var(--ease-out), background-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(31, 91, 214, .3), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn--secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--danger { background: var(--surface); color: var(--bad); box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(180, 35, 24, .25); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover:not(:disabled) { background: #1a4fbd; }
  .btn--secondary:hover:not(:disabled) { background: #fbfaf8; box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(28, 26, 23, .24); }
  .btn--ghost:hover { background: rgba(28, 26, 23, .05); }
  .btn--danger:hover { background: var(--bad-soft); }
}
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; transition: background-color 140ms ease, color 140ms ease, transform 160ms var(--ease-out); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn:hover { background: rgba(28, 26, 23, .06); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin 560ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.page-head p b { color: var(--ink); font-weight: 500; }

/* segmented filter: one pill slides under the chosen option */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: var(--r-md); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { position: relative; z-index: 1; height: 32px; padding: 0 12px; border: 0; background: none; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: color 160ms ease; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg button em { font-style: normal; margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg__pill { position: absolute; top: 3px; left: 0; height: 32px; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); transition: transform 240ms var(--ease-in-out), width 240ms var(--ease-in-out); }

/* ---------- the table of accesses ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { height: 42px; padding: 0 16px; text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { height: 64px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background-color 120ms ease; }
@media (hover: hover) and (pointer: fine) { .tbl tbody tr:hover { background: #fbfaf8; } }
.tbl tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tbl .muted { color: var(--muted); }
.tbl .num { text-align: right; }
.res { display: flex; align-items: center; gap: 12px; min-width: 0; }
.res b { font-weight: 500; display: block; }
.res i { font-style: normal; color: var(--muted); font-size: 13px; }
.res > span:last-child { min-width: 0; }
.logo { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(28, 26, 23, .04); }
.logo img { width: 20px; height: 20px; }
.logo--glyph { background: var(--sunken); }
.logo--glyph i { width: 18px; height: 18px; background: var(--ink-2); -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat; }
.logo--lg { width: 48px; height: 48px; border-radius: 12px; }
.logo--lg img { width: 26px; height: 26px; }
.logo--lg.logo--glyph i { width: 24px; height: 24px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--sunken); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill--plain::before { display: none; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--info { background: var(--accent-soft); color: var(--accent); }
.risk { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.risk--high { color: var(--bad); }

/* ---------- find ---------- */
.finder { padding: 8px; }
.find-search { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 160ms ease, background-color 160ms ease; }
.find-search:focus-within { background: var(--surface); box-shadow: 0 0 0 4px #dbe5fb, inset 0 0 0 1px var(--accent); }
.find-search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.find-search input { flex: 1; height: 100%; border: 0; outline: 0; background: none; font-size: 17px; }
.find-search input::-webkit-search-cancel-button { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 4px 4px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 160ms var(--ease-out); }
.chip em { font-style: normal; margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.chip[aria-pressed="true"] em { color: rgba(255, 255, 255, .65); }
@media (hover: hover) and (pointer: fine) { .chip:not([aria-pressed="true"]):hover { background: rgba(28, 26, 23, .04); } }

.results { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 18px; text-align: left; border: 0; cursor: pointer; transition: box-shadow 180ms ease, transform 180ms var(--ease-out); }
.result h3 { font-size: 15.5px; font-weight: 500; letter-spacing: -0.005em; }
.result p { margin-top: 3px; color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result .kind { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.result:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .result:hover { box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); transform: translateY(-1px); } }
mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 64px 24px; }
.empty__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--sunken); }
.empty__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.empty h3 { font-size: 16px; font-weight: 500; }
.empty p { color: var(--muted); max-width: 44ch; }
.empty .btn { margin-top: 6px; }

/* ---------- requests ---------- */
.req-list { display: grid; gap: 12px; }
.req { padding: 20px; }
.req__top { display: flex; align-items: center; gap: 14px; }
.req__top .res { flex: 1; }
.req__meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.req__why { margin: 14px 0 0 50px; padding: 10px 14px; border-radius: var(--r-md); background: var(--bg); color: var(--ink-2); font-size: 14px; max-width: 72ch; }
.req__why b { font-weight: 500; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 18px 0 0 50px; }
.step { position: relative; padding-top: 22px; padding-right: 12px; font-size: 13px; color: var(--muted); }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-2); }
.step::after { content: ""; position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); transition: background-color 240ms ease, box-shadow 240ms ease; }
.step:last-child::before { right: auto; width: 0; }
.step b { display: block; color: var(--ink); font-weight: 500; }
.step.is-done::before { background: var(--ok); }
.step.is-done::after { background: var(--ok); box-shadow: none; }
.step.is-now::after { background: var(--accent); box-shadow: 0 0 0 4px #dbe5fb; animation: beat 1.6s var(--ease-out) infinite; }
.step.is-bad::after { background: var(--bad); box-shadow: none; }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 3px #dbe5fb; } 50% { box-shadow: 0 0 0 6px rgba(219, 229, 251, .4); } }

/* ---------- the drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 30; }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(28, 26, 23, 0.22); opacity: 0; transition: opacity 240ms ease; }
.drawer__panel { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(520px, calc(100vw - 16px)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); transform: translateX(calc(100% + 16px)); transition: transform 380ms var(--ease-drawer); outline: none; overflow: hidden; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer.is-closing .drawer__panel { transition-duration: 220ms; transition-timing-function: var(--ease-out); }
.drawer.is-closing .drawer__scrim { transition-duration: 180ms; }
.drawer__close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.d-head { display: flex; gap: 16px; align-items: center; padding: 28px 28px 20px; }
.d-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.d-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.d-sec { padding: 20px 28px; border-top: 1px solid var(--line); }
.d-sec > h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.d-desc { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; font-size: 14.5px; }
.d-foot { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 16px 28px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); }
.d-foot .hint { margin-right: auto; color: var(--muted); font-size: 13px; }

.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.path li { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; min-height: 48px; }
.path li::before { content: ""; position: absolute; left: 13px; top: 32px; bottom: -16px; width: 2px; background: var(--line); }
.path li:last-child::before { display: none; }
.path__n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--sunken); font-size: 12.5px; font-weight: 600; color: var(--ink-2); position: relative; z-index: 1; }
.path b { font-weight: 500; font-size: 14.5px; }
.path i { font-style: normal; color: var(--muted); font-size: 13px; display: block; }
.path .time { color: var(--muted); font-size: 13px; }

/* the request form */
.roles { display: grid; gap: 8px; }
.role { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: box-shadow 140ms ease, background-color 140ms ease; }
.role input { margin: 2px 0 0; width: 18px; height: 18px; }
.role b { display: block; font-weight: 500; }
.role i { display: block; font-style: normal; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.role:has(input:checked) { background: #f6f8fe; box-shadow: inset 0 0 0 1.5px var(--accent); }
.role.is-had { cursor: not-allowed; opacity: .6; }
@media (hover: hover) and (pointer: fine) { .role:not(:has(input:checked)):not(.is-had):hover { box-shadow: inset 0 0 0 1px rgba(28, 26, 23, .3); } }
.field { display: grid; gap: 8px; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; }
.field label, .field .label { font-size: 14px; font-weight: 500; }
.field .count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
textarea { width: 100%; min-height: 112px; padding: 12px 14px; border-radius: var(--r-md); border: 0; resize: vertical; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; line-height: 1.5; outline: 0; transition: box-shadow 140ms ease; }
textarea:focus { box-shadow: 0 0 0 4px #dbe5fb, inset 0 0 0 1px var(--accent); }
textarea[aria-invalid="true"] { box-shadow: 0 0 0 4px var(--bad-soft), inset 0 0 0 1px var(--bad); }
.err { color: var(--bad); font-size: 13px; }
.err:empty { display: none; }
.pick-list { display: grid; gap: 6px; max-height: 340px; overflow: auto; margin-top: 12px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: none; text-align: left; cursor: pointer; transition: background-color 120ms ease; }
.pick:hover, .pick:focus-visible { background: var(--bg); }
.pick .pill { margin-left: auto; }

/* hold to confirm removal: slow while deciding, snappy on release */
.hold { position: relative; overflow: hidden; }
.hold__fill { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--bad); color: #fff; border-radius: inherit; clip-path: inset(0 100% 0 0); transition: clip-path 200ms var(--ease-out); pointer-events: none; }
.hold.is-holding .hold__fill { clip-path: inset(0 0 0 0); transition: clip-path 1.6s linear; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--ink); color: #f4f2ee; box-shadow: var(--shadow-3); font-size: 14px; transition: opacity 300ms ease, transform 300ms var(--ease-out), filter 300ms ease; }
@starting-style { .toast { opacity: 0; transform: translateY(12px) scale(0.98); } }
.toast.is-leaving { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(2px); transition-duration: 180ms; }
.toast__ico { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2f9a62; }
.toast__ico svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.toast__text { flex: 1; min-width: 0; }
.toast__text b { display: block; font-weight: 500; }
.toast__text i { font-style: normal; color: #b9b3ab; font-size: 13px; }
.toast button { border: 0; background: rgba(255, 255, 255, .1); color: #fff; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, .18); }

/* view swap: a soft fade on route changes made by the pointer (keyboard swaps are instant) */
.view.is-enter { animation: view-in 220ms var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) { .results { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 20; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 96%, transparent); }
  .brand, .side__foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .nav__item { flex-direction: column; justify-content: center; gap: 2px; height: 52px; font-size: 12px; }
  .nav__item em { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
  .nav__item em:not(.is-live) { display: none; }
  .top { padding: 0 16px; height: 60px; }
  .top .btn span, .top .btn { font-size: 0; gap: 0; width: 40px; padding: 0; }
  .top .btn svg { width: 18px; height: 18px; }
  .view { padding: 24px 16px 120px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 26px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { height: auto; padding: 0; border: 0; }
  .tbl td.c-role, .tbl td.c-granted, .tbl td.c-by { display: none; }
  .tbl td.c-exp { grid-column: 2; grid-row: 1; align-self: center; }
  .steps { margin-left: 0; grid-auto-flow: row; gap: 10px; }
  .step { padding: 0 0 0 22px; }
  .step::before { display: none; }
  .req__why { margin-left: 0; }
  .req__top { flex-wrap: wrap; }
  .req__meta { margin-left: 50px; }
  .drawer__panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .drawer.is-open .drawer__panel { transform: translateY(0); }
  .d-head, .d-sec, .d-foot { padding-left: 20px; padding-right: 20px; }
  .d-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toasts { right: 16px; bottom: 84px; }
  input, textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .drawer__panel, .seg__pill, .result, .btn, .chip { transition-property: opacity, background-color, color, box-shadow !important; }
  .drawer__panel { transform: none !important; opacity: 0; transition: opacity 200ms ease !important; }
  .drawer.is-open .drawer__panel { opacity: 1; }
  .toast { transform: none !important; }
}

/* polish */
.steps { list-style: none; padding: 0; }
.path { list-style: none; padding: 0; }
.drawer__body { display: flex; flex-direction: column; }
.drawer__body > form { display: flex; flex-direction: column; flex: 1; }
.d-foot { margin-top: auto; background: var(--surface); }
@media (max-width: 900px) { .d-foot .hint { display: none; } .d-foot { flex-wrap: wrap; } }
@media (max-width: 900px) { .search kbd { display: none; } }
.logo img[src$=".png"] { width: 28px; height: 28px; } .logo--lg img[src$=".png"] { width: 36px; height: 36px; }
