/* Fluide: the tokens, the frame every page sits in, and the kit rebuilt screens
   use. Plain CSS, loaded by base.html after app.css. Unlayered, so it wins over the
   layered rules of app.css without !important. Rules: docs/design-rules.md. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #f1f1ef;
  --card: #fff;
  --ink: #17171a;
  --soft: #66676d;
  --hair: rgb(23 23 26 / 8%);
  --ok-bg: #e4f4e1;
  --ok-fg: #1d6b40;
  --neutral-bg: #eeeeec;
  --neutral-fg: #55565b;
  --attention-bg: #fbf1cc;
  --attention-fg: #72560a;
  --blocked-bg: #fbe2db;
  --blocked-fg: #96301c;
  --info-bg: #e3ecfd;
  --info-fg: #274f94;
  --shadow: 0 1px 2px rgb(23 23 26 / 4%), 0 8px 24px rgb(23 23 26 / 5%);
  --r-m: 14px;
  --r-l: 22px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --bleu-encre: #24407a;
  --bleu-encre-tint: #e9eef8;
  --sidebar-w: 228px;
  --font-fluide: "Instrument Sans", system-ui, sans-serif;
}

/* ---- Frame ------------------------------------------------------------------
   A white sidebar floats on the grey canvas. No top bar. The page body below the
   breadcrumb keeps its own look until its screen is rebuilt.
   Motion: navigation is used tens of times a day, so hovers change at once and
   only a press answers with a slight scale. The phone and tablet menu slides; ⌘K
   does not. */

html, body { background: var(--canvas); }

/* The parts of the page no one draws: selection, caret and scrollbars. */
::selection { background: rgb(23 23 26 / 14%); }
::-webkit-scrollbar-thumb { background: rgb(23 23 26 / 18%); background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgb(23 23 26 / 30%); background-clip: content-box; }

.shell-layout { caret-color: var(--ink); min-height: 100vh; }

.shell-sidebar {
  background: var(--card);
  border: 0;
  border-radius: var(--r-l);
  bottom: 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: var(--font-fluide);
  font-size: 14px;
  gap: 4px;
  height: auto;
  left: 12px;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  padding: 12px 10px 8px;
  position: fixed;
  right: auto;
  top: 12px;
  width: var(--sidebar-w);
  z-index: 20;
}

/* Beats app.css's focus rule for .shell-layout, which page bodies keep. */
.shell-layout .shell-sidebar :focus-visible,
.shell-layout .shell-mobile-bar :focus-visible,
.shell-layout .shell-crumb :focus-visible,
.shell-layout .shell-search-dialog :focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.shell-brand { align-items: center; border-radius: 13px; color: var(--ink); display: flex; gap: 10px; margin-bottom: 6px; padding: 4px 6px; text-decoration: none; }
.shell-brand-mark { background: var(--ink); border-radius: 10px; box-shadow: inset 0 -1px 0 rgb(255 255 255 / 12%), 0 1px 2px rgb(23 23 26 / 20%); color: #fff; display: grid; flex-shrink: 0; font-size: 15px; font-weight: 600; height: 32px; letter-spacing: -.02em; place-items: center; width: 32px; }
.shell-brand-text { min-width: 0; }
.shell-brand-text strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.shell-brand-text small { color: var(--soft); display: block; font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell-nav { display: flex; flex: 1; flex-direction: column; gap: 1px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.shell-nav-heading { color: var(--soft); font-size: 12px; font-weight: 500; letter-spacing: 0; margin: 0; padding: 14px 10px 4px; text-transform: none; }
.shell-nav-link { align-items: center; border-radius: 10px; color: var(--soft); display: flex; flex-shrink: 0; font-size: 14px; font-weight: 500; gap: 10px; min-height: 32px; padding: 0 10px; position: relative; text-decoration: none; }
.shell-nav-link > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-nav-link .f-icon { opacity: .85; }
.shell-nav-link[aria-current="page"] { background: var(--canvas); color: var(--ink); }
.shell-nav-link[aria-current="page"] .f-icon { opacity: 1; }
.f-icon { display: block; flex-shrink: 0; height: 16px; width: 16px; }

/* Favourites and recently opened, filled in by favourites.js. */
.shell-shortcuts { flex-shrink: 0; max-height: 30%; min-width: 0; overflow-y: auto; scrollbar-width: none; }
.shell-shortcuts .shell-nav-heading { font-family: inherit; }
.shell-shortcuts ul { list-style: none; margin: 0; padding: 0; }
.shell-shortcut { align-items: center; border-radius: 10px; color: var(--soft); display: flex; font-size: 13.5px; gap: 10px; min-height: 30px; min-width: 0; padding: 0 10px; text-decoration: none; }
.shell-shortcut[aria-current="page"] { color: var(--ink); }
.shell-shortcut-dot { background: rgb(23 23 26 / 22%); border-radius: 999px; flex-shrink: 0; height: 6px; margin: 0 5px; width: 6px; }
.shell-shortcut[aria-current="page"] .shell-shortcut-dot { background: var(--ink); }
.shell-shortcut-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-shortcuts-empty { color: var(--soft); font-size: 12.5px; line-height: 1.45; margin: 0; padding: 2px 10px 6px; }

.shell-user { border-top: 1px solid var(--hair); flex-shrink: 0; margin-top: 4px; padding: 6px 0 0; }
.shell-user-toggle { align-items: center; border-radius: 12px; cursor: pointer; display: flex; gap: 10px; list-style: none; min-height: 44px; padding: 0 6px; }
.shell-user-toggle::-webkit-details-marker { display: none; }
.shell-user-toggle .f-icon { color: var(--soft); margin-left: auto; transform: rotate(-90deg); }
.shell-user details[open] .shell-user-toggle .f-icon { transform: rotate(90deg); }
.shell-avatar { background: var(--canvas); border-radius: 10px; color: var(--ink); display: grid; flex-shrink: 0; font-size: 13px; font-weight: 600; height: 32px; place-items: center; width: 32px; }
.shell-user-name { font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-user-menu { padding: 0 6px 8px 48px; }
.shell-user-email { color: var(--soft); font-size: 12.5px; margin: 0 0 6px; overflow-wrap: anywhere; }
.shell-user-action { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; padding: 2px 0; text-decoration: underline; text-decoration-color: rgb(23 23 26 / 28%); text-underline-offset: 3px; }
.shell-user-note { color: var(--soft); font-size: 13px; line-height: 1.45; margin: 0; padding: 8px 6px; }

.shell-workspace { margin-left: calc(var(--sidebar-w) + 24px); min-height: 100vh; min-width: 0; padding: 18px 24px 56px 0; }
.shell-content { display: flex; flex-direction: column; min-width: 0; }
.shell-content:focus { outline: none; }
.shell-mobile-bar { display: none; }
.shell-menu-button { background: var(--card); border: 0; border-radius: 11px; box-shadow: var(--shadow); color: var(--ink); cursor: pointer; display: grid; flex-shrink: 0; height: 40px; place-items: center; width: 40px; }
/* Error pages drawn without the shell (500, CSRF refusal). */
.shell-content--standalone { margin: 0 auto; max-width: 1080px; padding: 40px 24px; }

/* Breadcrumb: one quiet line above the page, with the steps above it only. A
   trail with no link would repeat the sidebar, so it is not shown. */
.shell-crumb { font-family: var(--font-fluide); font-size: 13.5px; line-height: 1.4; margin: 0 0 12px; }
.shell-crumb:not(:has(a)) { display: none; }
.shell-crumb ol { align-items: center; color: var(--soft); display: flex; flex-wrap: wrap; gap: 4px 7px; list-style: none; margin: 0; padding: 0; }
.shell-crumb li[aria-hidden="true"] { color: rgb(23 23 26 / 28%); }
.shell-crumb a { border-radius: 6px; color: var(--soft); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.shell-crumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* Notices after an action: one status line each, in the status tones. */
.shell-messages { display: grid; font-family: var(--font-fluide); gap: 8px; margin: 0 0 16px; max-width: 720px; }
.shell-message { background: var(--neutral-bg); border-radius: var(--r-m); color: var(--neutral-fg); font-size: 14px; line-height: 1.45; margin: 0; opacity: 1; padding: 10px 14px; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style {
  .shell-message { opacity: 0; transform: translateY(-4px); }
}
.shell-message--ok { background: var(--ok-bg); color: var(--ok-fg); }
.shell-message--attention { background: var(--attention-bg); color: var(--attention-fg); }
.shell-message--blocked { background: var(--blocked-bg); color: var(--blocked-fg); }

.shell-skip-link { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); font-family: var(--font-fluide); font-weight: 500; left: 12px; padding: 8px 14px; position: fixed; top: -60px; z-index: 50; }
.shell-skip-link:focus-visible { outline: 2px solid var(--ink); top: 12px; }
/* The element said-in-view.js focuses is where the keyboard resumes, not a control: no ring. */
.shell-layout [data-said-in-view] [data-said-focus]:focus-visible { outline: none; }

/* Press: the only motion in the frame's navigation. */
:is(.shell-nav-link, .shell-shortcut, .shell-brand, .shell-menu-button, .shell-search-close) { transition: transform 160ms var(--ease-out); }
:is(.shell-nav-link, .shell-shortcut, .shell-brand):active { transform: scale(.98); }
:is(.shell-menu-button, .shell-search-close):active { transform: scale(.94); }

@media (hover: hover) and (pointer: fine) {
  .shell-nav-link:not([aria-current="page"]):hover,
  .shell-shortcut:hover { background: rgb(23 23 26 / 4%); color: var(--ink); }
  .shell-brand:hover, .shell-user-toggle:hover { background: rgb(23 23 26 / 4%); }
  .shell-menu-button:hover { box-shadow: 0 1px 2px rgb(23 23 26 / 6%), 0 10px 28px rgb(23 23 26 / 10%); }
  .shell-user-action:hover { text-decoration-color: currentcolor; }
  .shell-crumb a:hover { color: var(--ink); text-decoration-color: currentcolor; }
}

/* ---- Search (⌘K) -------------------------------------------------------------
   Opens and closes at once: it is used tens of times a day. The highlighted row
   shows the ↵ key, so a row under a resting pointer never looks highlighted. */

.shell-search-dialog { background: var(--card); border: 0; border-radius: var(--r-l); box-shadow: 0 1px 2px rgb(23 23 26 / 6%), 0 24px 70px rgb(23 23 26 / 22%); color: var(--ink); font-family: var(--font-fluide); font-size: 14px; line-height: 1.4; margin: 12vh auto auto; max-height: 76vh; max-width: 600px; overflow: hidden; padding: 0; width: calc(100% - 24px); }
.shell-search-dialog[open] { display: flex; flex-direction: column; }
.shell-search-dialog::backdrop { background: rgb(23 23 26 / 20%); }
.shell-search-header { align-items: center; display: flex; justify-content: space-between; padding: 14px 14px 0 20px; }
.shell-search-header h2 { color: var(--soft); font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0; margin: 0; text-transform: none; }
.shell-search-close { background: var(--canvas); border: 0; border-radius: 11px; color: var(--soft); cursor: pointer; display: grid; height: 32px; place-items: center; width: 32px; }
.shell-search-close svg { fill: none; height: 15px; stroke: currentcolor; stroke-linecap: round; stroke-width: 2; width: 15px; }
.shell-search-query { align-items: center; border-bottom: 1px solid var(--hair); color: var(--soft); display: flex; gap: 12px; margin: 2px 20px 0; }
.shell-search-icon { fill: none; flex-shrink: 0; height: 18px; stroke: currentcolor; stroke-linecap: round; stroke-width: 2; width: 18px; }
.shell-search-query input { background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--ink); font: inherit; font-size: 18px; font-weight: 500; letter-spacing: -.01em; padding: 14px 0; width: 100%; }
.shell-search-query input::placeholder { color: var(--soft); font-weight: 400; }
.shell-layout .shell-search-query input:focus-visible { outline: none; }
.shell-search-query:has(input:focus-visible) { border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.shell-search-results { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-status { color: var(--soft); font-size: 13px; margin: 0; padding: 10px 12px; }
.search-result { align-items: center; border-radius: 12px; color: var(--ink); display: flex; gap: 12px; padding: 9px 12px; text-decoration: none; }
.search-result[aria-selected="true"] { background: var(--canvas); }
.search-result-icon { color: var(--soft); fill: none; flex-shrink: 0; height: 18px; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; width: 18px; }
.search-result strong { display: block; font-size: 14px; font-weight: 500; }
.search-result small { color: var(--soft); display: block; font-size: 12.5px; margin-top: 1px; }
.search-result-enter { background: var(--card); border-radius: 6px; box-shadow: 0 0 0 1px var(--hair), 0 1px 0 var(--hair); color: var(--soft); font-size: 12px; margin-left: auto; padding: 1px 7px; visibility: hidden; }
.search-result[aria-selected="true"] .search-result-enter { visibility: visible; }
.shell-search-footer { border-top: 1px solid var(--hair); color: var(--soft); display: flex; flex-wrap: wrap; font-size: 12px; gap: 4px 16px; margin: 0; padding: 10px 20px; }

@media (hover: hover) and (pointer: fine) {
  .search-result:not([aria-selected="true"]):hover { background: rgb(23 23 26 / 3%); }
  .shell-search-close:hover { background: rgb(23 23 26 / 9%); color: var(--ink); }
}

/* Tablet and phone: the sidebar is a popover the menu button opens, with the
   whole menu and the shortcuts. It slides in on the drawer curve and leaves faster
   than it came. */
@media (max-width: 1023px) {
  .shell-sidebar:not(:popover-open) { display: none; }
  .shell-sidebar {
    border-radius: 0 22px 22px 0;
    bottom: 0;
    box-shadow: 0 24px 70px rgb(23 23 26 / 30%);
    left: 0;
    max-height: none;
    top: 0;
    transform: translateX(-100%);
    transition: transform 180ms var(--ease-out), display 180ms allow-discrete, overlay 180ms allow-discrete;
    width: min(264px, 86vw);
  }
  .shell-sidebar:popover-open { transform: none; transition-duration: 280ms; transition-timing-function: var(--ease-drawer); }
  @starting-style {
    .shell-sidebar:popover-open { transform: translateX(-100%); }
  }
  .shell-sidebar::backdrop { background: rgb(23 23 26 / 0%); transition: background-color 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
  .shell-sidebar:popover-open::backdrop { background: rgb(23 23 26 / 28%); }
  @starting-style {
    .shell-sidebar:popover-open::backdrop { background: rgb(23 23 26 / 0%); }
  }
  .shell-workspace { margin-left: 0; padding: 0 12px 48px; }
  .shell-mobile-bar { align-items: center; background: var(--canvas); display: flex; font-family: var(--font-fluide); gap: 10px; margin: 0 -12px 8px; padding: 10px 12px 6px; position: sticky; top: 0; z-index: 10; }
  .shell-mobile-search { margin-left: auto; }
  .shell-mobile-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell-search-dialog { margin-top: 10px; max-height: calc(100dvh - 20px); }
  .shell-search-footer, .search-result-enter { display: none; }
  /* A confirmation brought into view (said-in-view.js) lands below the sticky bar. */
  .shell-messages { scroll-margin-top: 72px; }
}

/* From 1024 px the bar keeps only its search button, top right, where the phone
   shows it. It floats right in its own row, which the breadcrumb shares when there
   is one, so it never covers the page; ⌘K reaches search from anywhere. */
@media (min-width: 1024px) {
  .shell-sidebar:not(:popover-open) { display: flex; }
  .shell-mobile-bar { display: block; float: right; margin: 0 0 10px 16px; }
  .shell-mobile-bar > :not(.shell-mobile-search) { display: none; }
  .shell-crumb { align-items: center; display: flex; margin: 0 0 10px; min-height: 40px; }
  .shell-content { clear: both; }
}

@media (prefers-reduced-motion: reduce) {
  .shell-sidebar, .shell-sidebar:popover-open, .shell-sidebar::backdrop { transition: none; }
  .shell-message { transition: none; }
  :is(.shell-nav-link, .shell-shortcut, .shell-brand, .shell-menu-button, .shell-search-close):active { transform: none; }
}

/* ---- Kit -------------------------------------------------------------------- */

/* Fluide kit for rebuilt screens. A rebuilt page wraps its content in
   .f-page and uses these parts; its own rules go in its own stylesheet. Every rule
   sits under .f-page, so pages not yet rebuilt do not change. */
.f-page {
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.4;
}

.f-page :is(button, input, select, summary) { font-family: inherit; }
.f-page :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.f-page .f-sr { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.f-page .f-soft { color: var(--soft); }
.f-page .f-link { color: inherit; text-decoration: underline; text-decoration-color: rgb(23 23 26 / 28%); text-underline-offset: 3px; }
.f-page .f-quiet { color: var(--ink); font-size: 13.5px; font-weight: 500; padding: 4px 2px; text-decoration: underline; text-decoration-color: rgb(23 23 26 / 28%); text-underline-offset: 3px; white-space: nowrap; }
.f-page .f-note { color: var(--soft); font-size: 13px; margin: 10px 0 0; }
.f-page .f-alert { color: var(--blocked-fg); }
.f-page [hidden] { display: none; }

/* Head and tiles */
.f-page .f-title { font-family: inherit; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 12px; text-transform: none; }
.f-page .f-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.f-page .f-tile { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); min-width: 0; padding: 12px 16px; }
.f-page .f-tile-label, .f-page .f-tile-note { color: var(--soft); font-size: 13px; }
.f-page .f-tile-value { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin-top: 2px; }
.f-page .f-tile-value--blocked { color: var(--blocked-fg); }

/* Buttons and menus */
.f-page .f-btn { align-items: center; background: var(--card); border: 0; border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); cursor: pointer; display: inline-flex; font-size: 14px; font-weight: 500; gap: 6px; justify-content: center; min-height: 36px; padding: 0 14px; text-decoration: none; white-space: nowrap; }
.f-page .f-btn--primary { background: var(--ink); box-shadow: none; color: #fff; }
.f-page .f-pop { background: var(--card); border-radius: var(--r-m); box-shadow: 0 12px 36px rgb(23 23 26 / 16%); left: 0; list-style: none; margin: 5px 0 0; max-height: 320px; min-width: 196px; overflow-y: auto; padding: 5px; position: absolute; top: 100%; transform-origin: top center; z-index: 30; }
.f-page .f-pop-item { border-radius: 9px; color: var(--ink); display: block; font-size: 14px; padding: 7px 10px; text-decoration: none; white-space: nowrap; }
.f-page .f-pop-item.is-on { background: var(--ink); color: #fff; }

/* Pills */
.f-page .f-pill { border-radius: 999px; display: inline-block; font-size: 12.5px; font-weight: 500; line-height: 1.45; max-width: 100%; overflow: hidden; padding: 2px 10px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.f-page .f-pill--ok { background: var(--ok-bg); color: var(--ok-fg); }
.f-page .f-pill--neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.f-page .f-pill--attention { background: var(--attention-bg); color: var(--attention-fg); }
.f-page .f-pill--blocked { background: var(--blocked-bg); color: var(--blocked-fg); }
.f-page .f-pill--info { background: var(--info-bg); color: var(--info-fg); }

/* Empty */
.f-page .f-empty { background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); color: var(--soft); padding: 36px 20px; text-align: center; }
.f-page .f-empty strong { color: var(--ink); display: block; font-weight: 600; }
.f-page .f-empty--compact { background: var(--canvas); border-radius: var(--r-m); box-shadow: none; padding: 18px; }

/* Table card */
.f-page .f-table { background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 4px 6px; }

/* Drawer */
.f-page .f-drawer { background: var(--card); border: 0; border-radius: 24px; box-shadow: 0 24px 70px rgb(23 23 26 / 22%); color: var(--ink); height: auto; inset: 12px 12px 12px auto; margin: 0; max-height: none; max-width: calc(100vw - 24px); overflow: hidden; padding: 0; position: fixed; transform: var(--drawer-start, translateX(calc(100% + 24px))); transition: transform 220ms var(--ease-drawer), display 220ms allow-discrete, overlay 220ms allow-discrete; width: 480px; }
.f-page .f-drawer[open] { display: flex; flex-direction: column; transform: translateX(0); transition-duration: 340ms; }
.f-page .f-drawer::backdrop { background: rgb(23 23 26 / 14%); opacity: 0; transition: opacity 220ms ease-out, display 220ms allow-discrete, overlay 220ms allow-discrete; }
.f-page .f-drawer[open]::backdrop { opacity: 1; }
@starting-style {
  .f-page .f-drawer[open] { transform: var(--drawer-start, translateX(calc(100% + 24px))); }
  .f-page .f-drawer[open]::backdrop { opacity: 0; }
}
.f-page .f-drawer-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.f-page .f-side-pane { border: 1px solid var(--hair); border-radius: var(--r-l); width: 640px; height: calc(100dvh - 24px); }
.f-page .f-side-pane--wide { width: 900px; }
/* The pane moves focus to its heading on open and between steps: keep that focus visible. */
.shell-layout .f-side-pane .f-pane-head h2[tabindex="-1"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.f-side-pane .f-pane-body { overscroll-behavior: contain; }
.f-side-pane-foot { flex-shrink: 0; box-shadow: inset 0 1px 0 var(--hair); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
.f-pane-nav { align-items: center; display: flex; gap: 8px; margin-left: auto; }
.f-pane-table { max-width: 100%; overflow-x: auto; }
@media (width < 772px) {
  .f-page .f-side-pane { --drawer-start: translateY(100%); inset: 0; width: 100%; max-width: none; height: 100dvh; border: 0; border-radius: 0; }
  .f-side-pane .f-side-pane-foot .f-btn { width: 100%; }
  .f-page .f-side-pane::backdrop { background: rgb(23 23 26 / 28%); }
}
@media (width < 1032px) {
  .f-page .f-side-pane--wide { --drawer-start: translateY(100%); inset: 0; width: 100%; max-width: none; height: 100dvh; border: 0; border-radius: 0; }
  .f-side-pane--wide .f-side-pane-foot .f-btn { width: 100%; }
  .f-page .f-side-pane--wide::backdrop { background: rgb(23 23 26 / 28%); }
}
.f-page .f-pane-head { align-items: flex-start; display: flex; flex-shrink: 0; gap: 12px; justify-content: space-between; padding: 18px 18px 12px; }
.f-page .f-x { background: var(--canvas); border: 0; border-radius: 11px; color: var(--soft); cursor: pointer; display: grid; flex-shrink: 0; height: 32px; place-items: center; width: 32px; }
.f-page .f-pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 18px 18px; }
.f-page .f-group { margin-top: 16px; }
.f-page .f-group:first-child { margin-top: 8px; }
.f-page .f-group-head { color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0 0 7px; text-transform: none; }
.f-page .f-rows { background: var(--canvas); border-radius: var(--r-m); overflow: hidden; }
.f-page .f-row { align-items: center; box-shadow: inset 0 -1px 0 var(--hair); display: flex; font-size: 14px; gap: 14px; justify-content: space-between; padding: 9px 14px; width: 100%; }
.f-page .f-row:last-child { box-shadow: none; }
.f-page .f-row > div:first-child { min-width: 0; }
.f-page .f-row small { color: var(--soft); display: block; font-size: 12.5px; font-weight: 400; }
.f-page .f-row-value { flex-shrink: 0; text-align: right; }
.f-page .f-row--total { font-weight: 600; }
.f-page .f-row--link { color: inherit; text-decoration: none; }
.f-page .f-row--off { color: var(--soft); }

/* Motion: only transform and opacity move; a press answers at once. */
.f-page :is(button:not(:disabled), .f-btn) { transition: transform 160ms var(--ease-out); }
.f-page :is(button:not(:disabled), .f-btn):active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .f-page .f-btn--primary:hover { background: #2c2c31; color: #fff; }
  .f-page .f-btn:not(.f-btn--primary):hover { background: #f7f7f6; }
  .f-page .f-pop-item:not(.is-on):hover { background: var(--canvas); }
  .f-page .f-row--link:hover { background: var(--hair); }
  .f-page .f-x:hover { background: rgb(23 23 26 / 9%); }
  .f-page .f-quiet:hover, .f-page .f-link:hover { text-decoration-color: currentcolor; }
}

@media (prefers-reduced-motion: reduce) {
  .f-page :is(button:not(:disabled), .f-btn):active { transform: none; }
  .f-page .f-drawer, .f-page .f-drawer[open] { opacity: 0; transform: none; transition: opacity 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
  .f-page .f-drawer[open] { opacity: 1; }
  @starting-style {
    .f-page .f-drawer[open] { opacity: 0; transform: none; }
  }
}

.f-page .f-side-pane[data-instant], .f-page .f-side-pane[data-instant]::backdrop { transition: none; }

@media (max-width: 720px) {
  .f-page .f-title { font-size: 27px; }
  .f-page .f-drawer:where(:not(.f-side-pane)) { border-radius: 24px 24px 0 0; inset: auto 0 0; max-height: 88dvh; max-width: none; transform: translateY(100%); width: 100%; }
  .f-page .f-drawer:where(:not(.f-side-pane))[open] { transform: translateY(0); }
  @starting-style {
    .f-page .f-drawer:where(:not(.f-side-pane))[open] { transform: translateY(100%); }
  }
  .f-page .f-drawer:where(:not(.f-side-pane))::backdrop { background: rgb(23 23 26 / 28%); }
}

/* Read-only suspension facts use the native popover pattern of record actions. */
.f-suspension { display: inline; white-space: nowrap; }
.f-suspension > button { position: relative; z-index: 1; border: 0; cursor: pointer; font-family: inherit; }
.f-suspension-panel { background: var(--card); border: 0; border-radius: var(--r-m); box-shadow: 0 1px 2px rgb(23 23 26 / 6%), 0 12px 36px rgb(23 23 26 / 16%); color: var(--ink); font: 14px/1.45 var(--font-fluide); inset: auto; margin: 6px 0 0; max-height: min(360px, calc(100dvh - 32px)); overflow-y: auto; padding: 14px; position: fixed; width: clamp(280px, 30vw, 360px); max-width: calc(100vw - 32px); white-space: normal; overflow-wrap: anywhere; opacity: 0; transform: scale(.97); transform-origin: top left; transition: opacity 140ms ease-out, transform 140ms ease-out, display 140ms allow-discrete, overlay 140ms allow-discrete; }
.f-suspension-panel:popover-open { opacity: 1; transform: none; }
@starting-style { .f-suspension-panel:popover-open { opacity: 0; transform: scale(.97); } }
.f-suspension-holder, .f-suspension-fact, .f-suspension-fact > span { display: block; }
.f-suspension-holder + .f-suspension-holder { margin-top: 12px; }
.f-suspension-holder > strong { display: block; font-weight: 600; margin-bottom: 4px; }
.f-suspension-fact + .f-suspension-fact { border-top: 1px solid var(--hair); margin-top: 8px; padding-top: 8px; }
.f-suspension-reason { font-weight: 500; }
.f-suspension-full { color: var(--ink); font-size: 14px; line-height: 1.45; margin-block: 12px; overflow-wrap: anywhere; white-space: normal; }
.f-suspension-full > p { color: var(--soft); margin: 0 0 6px; }
.f-suspension-panel[data-instant] { transition: none; }
@media (prefers-reduced-motion: reduce) { .f-suspension-panel { transition: none; } }
.f-suspension-status { align-items: center; display: inline-flex; gap: 6px; height: 24px; max-width: 100%; min-width: 0; vertical-align: middle; width: 100%; }
.f-suspension-status > :not(.f-suspension) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-suspension-status > .f-suspension { flex: none; }
