/* public/css/mobile.css — phone-only refinements. Every rule is inside a max-width query,
   so desktop and tablet layouts are untouched. Delete this file (and its <link> in head.ejs)
   to undo everything. (Exception: .detail__cta-bar below is a layout-neutral wrapper on desktop.) */

/* Desktop: the bar is transparent to layout, so the item page looks as before. */
.detail__cta-bar { display: contents; }

@media (max-width: 860px) {
  /* Current page in the bottom bar */
  .glass-dock a[aria-current="page"] { color: var(--brand); }
  .glass-dock a[aria-current="page"] span { font-weight: 800; }
  .glass-dock a { min-height: 44px; justify-content: center; }
  .glass-dock .glass-dock__plus { min-height: 52px; }

  /* Main action on an item page ("This is mine" / "I found this"): a frosted bar pinned just above the
     bottom dock, same width and corner language as the dock so the two read as one control surface. */
  .detail__cta-bar {
    display: block; position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--dock-offset, 88px) + env(safe-area-inset-bottom));
    z-index: 54; width: min(440px, calc(100vw - 1.2rem));
    padding: 6px; border-radius: 20px;
    background: color-mix(in srgb, var(--card, #fff) 82%, transparent); backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  }
  .detail__cta-bar form.detail__cta { display: block; margin: 0; width: 100%; }
  .detail__cta-bar .btn.detail__cta { margin: 0; }
  .detail__cta-bar .btn {
    display: flex; align-items: center; width: 100%; height: 50px; min-height: 50px; padding: 0 1.1rem; gap: .4rem;
    border-radius: 14px; font-size: 1rem; font-weight: 700; letter-spacing: .005em;
    justify-content: center; text-align: center; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 14px -8px color-mix(in srgb, var(--brand-600) 80%, transparent);
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease, filter .15s ease;
  }
  .detail__cta-bar .btn:active { transform: scale(.985); filter: brightness(.95); }
  .detail__cta-bar .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }
  .detail__cta-sep { display: none; }
  .detail__cta-sub { font-weight: 500; opacity: .85; margin-left: .4em; }
  .detail__cta-sub::before { content: "\00b7"; margin-right: .4em; opacity: .7; }
  /* Room so the bar never covers the last lines of the page or the concierge button */
  body:has(.detail__cta-bar) { padding-bottom: 164px; }
  body:has(.detail__cta-bar) .concierge-fab { bottom: calc(10.8rem + env(safe-area-inset-bottom)); }
  body:has(.detail__cta-bar) .concierge { bottom: calc(14.6rem + env(safe-area-inset-bottom)); }
}

/* Unread badge on the Inbox item of the bottom bar */
@media (max-width: 860px) {
  /* The inbox now lives in the bottom bar, so it is not repeated in the top bar (only on pages that have the bar). */
  body:has(.glass-dock) .site-header .nav-icon { display: none !important; }
  .glass-dock a { position: relative; }
  .glass-dock__badge {
    position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 99px; border: 2px solid var(--card, #fff);
    background: var(--accent-red); color: var(--on-brand);
    font: 800 .65rem/1 system-ui, sans-serif; font-style: normal;
  }
}

/* ---------- Bottom dock: stays perfectly still ----------
   1) It gets its own view-transition name, so it is no longer part of the page snapshot that fades and
      rises by 6px on every navigation (that rise is what made the bar "jump" when you opened a page).
   2) It is centred with insets + auto margins instead of translateX(-50%) and 100vw, so it can never be
      pushed sideways by content that is wider than the screen. */
.glass-dock { view-transition-name: glass-dock; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(glass-dock) { animation-duration: .2s; }
  ::view-transition-old(glass-dock) { animation: none; opacity: 0; }
  ::view-transition-new(glass-dock) { animation: none; }
}

@media (max-width: 860px) {
  .glass-dock {
    left: max(.6rem, env(safe-area-inset-left)); right: max(.6rem, env(safe-area-inset-right));
    width: auto; max-width: 440px; margin-inline: auto; transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom));
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  /* Last line of every page clears the dock, including on phones with a home-indicator bar */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* Nothing may make the page wider than the screen (that is what makes the view zoom out and pan sideways) */
  html, body { max-width: 100%; }
  @supports (overflow-x: clip) { body { overflow-x: clip; } }
}

/* ===== HOME (phones): compact "how it works" row + collapsible trust strip ===== */
.trust-toggle { display: none; }
.how__tap, .how__detail { display: none; }

@media (max-width: 860px) {
  /* Report > Match > Claim as one slim row; tap a step to read it (see home-collapse.js) */
  .how { margin-bottom: .75rem; }
  .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .how__steps li {
    flex-direction: column; align-items: center; text-align: center;
    gap: .4rem; padding: .75rem .4rem .7rem; border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(16, 66, 122, .06);
  }
  .how__num { width: 1.75rem; height: 1.75rem; font-size: .9rem; }
  .how__steps strong { font-size: .92rem; letter-spacing: .01em; }

  /* Sentences are hidden only once the script is running */
  .how.is-interactive .how__steps p {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .how.is-interactive .how__tap {
    display: block; position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
    margin: 0; padding: 0; background: transparent; border: 0; border-radius: inherit;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .how__tap:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .how.is-interactive .how__steps li { transition: border-color .2s, background-color .2s, box-shadow .2s; }
  .how.is-interactive .how__steps li.is-active {
    border-color: var(--brand); background: var(--brand-050);
    box-shadow: 0 0 0 1px var(--brand);
  }
  /* selected step fills its number, same as the desktop hover */
  .how.is-interactive .how__steps li.is-active .how__num { background: var(--accent); color: #171b21; }

  .how__detail:not([hidden]) {
    display: block; margin: .65rem 0 0; padding: .8rem .95rem .85rem;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(16, 66, 122, .06);
  }
  .how__detail-label {
    display: block; margin-bottom: .25rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--brand);
  }
  .how__detail-text { display: block; font-size: .9rem; line-height: 1.5; color: var(--ink); }

  /* Trust strip: one tappable row, the three items open underneath */
  .trust-strip.is-collapsible { display: block; padding: 0; margin-bottom: .75rem; overflow: hidden; }
  .trust-strip.is-collapsible .trust-toggle {
    display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 52px;
    padding: .6rem .9rem; background: none; border: 0; color: inherit;
    font: inherit; text-align: left; cursor: pointer;
  }
  .trust-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
  .trust-toggle__icon {
    flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
    border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--brand);
  }
  .trust-toggle__icon svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .trust-toggle__text { flex: 1 1 auto; min-width: 0; }
  .trust-toggle__text strong { display: block; font-family: var(--font-serif); font-size: .95rem; line-height: 1.2; color: var(--ink); }
  .trust-toggle__text small { display: block; margin-top: .1rem; font-size: .76rem; color: var(--muted); }
  .trust-toggle__chev {
    flex: none; width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--muted);
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease;
  }
  .trust-strip.is-open .trust-toggle__chev { transform: rotate(180deg); }
  .trust-strip.is-collapsible:not(.is-open) .trust-strip__item { display: none; }
  .trust-strip.is-open .trust-toggle { border-bottom: 1px solid var(--border); }
  .trust-strip.is-open .trust-strip__item { padding: .8rem .9rem; }
  .trust-strip.is-open .trust-strip__item + .trust-strip__item { border-top: 1px solid var(--border); }
}

/* ---------- Report details page, phone layout (polished) ---------- */
@media (max-width: 860px) {
  .detail__top .detail__photo { aspect-ratio: 4 / 3; max-height: none; margin: 0 0 1rem; border-radius: 16px; }
  .detail__top .detail__photo img { border-radius: 16px; }
  .detail__info { gap: 1rem; }

  /* Header: chips, title, reference */
  .detail__info .detail__head { display: flex; flex-direction: column; }
  .detail__info .detail__head > .detail__ref { order: 3; margin: 0; font-size: .82rem; }
  .detail__info .detail__head > h1 { order: 2; margin: .65rem 0 .2rem; font-size: 1.6rem; line-height: 1.2; }
  .detail__info .detail__head > .detail__pills { order: 1; margin: 0; gap: .5rem; }
  .detail__info .detail__head > .report-card__tags { order: 4; margin: .6rem 0 0; }
  .detail__info .detail__head > .beacon { order: 5; margin-top: 1rem; }
  .detail__pills .pill { border-radius: 999px; padding: .2rem .7rem; }

  /* Description + details in one card, label left / value right */
  .detail__info .detail__body {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--card-shadow); padding: 1rem; margin: 0;
  }
  .detail__info .detail__body > p { font-size: 1rem; line-height: 1.55; }
  .detail__info .detail__meta { grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; margin-top: .9rem; padding-top: .25rem; }
  .detail__info .detail__meta dt { padding: .8rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
  .detail__info .detail__meta dd { padding: .7rem 0; border-bottom: 1px solid var(--border); text-align: right; overflow-wrap: anywhere; }
  .detail__info .detail__meta dt:nth-last-of-type(1), .detail__info .detail__meta dd:last-child { border-bottom: 0; }

  /* QR sticker + handover: compact card, three equal buttons */
  .detail__info .beacon {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem 1rem; align-items: center;
    padding: 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--card-shadow);
  }
  .detail__info .beacon__qr-wrap { padding: .35rem; border-radius: 12px; justify-self: start; }
  .detail__info .beacon__qr { width: 72px; height: 72px; }
  .detail__info .beacon__copy h3 { font-size: .98rem; margin: 0 0 .15rem; }
  .detail__info .beacon__copy p { font-size: .82rem; line-height: 1.4; }
  .detail__info .beacon .beacon__actions {
    grid-column: 1 / -1; display: grid !important; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: .5rem;
  }
  .detail__info .beacon__actions .btn { width: 100%; min-height: 42px; border-radius: 12px; justify-content: center; text-align: center; white-space: nowrap; }
  .detail__info .beacon__actions .btn--primary { background: var(--brand-050); color: var(--brand); border: 1px solid var(--brand); }

  /* Secondary actions: two equal buttons per row, a lone last button fills the row */
  .detail__info .detail__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
  .detail__info .detail__actions > .btn,
  .detail__info .detail__actions > form.inline:not(.detail__cta) { flex: 1 1 calc(50% - .25rem); min-width: 0; margin: 0; }
  .detail__info .detail__actions > .muted { flex: 1 1 100%; margin: 0; }
  .detail__info .detail__actions .btn:not(.detail__cta) {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 0 1rem;
    border-radius: 12px; font-size: .95rem; font-weight: 600; text-align: center; white-space: nowrap;
  }
  .detail__info .detail__actions .btn--danger { background: transparent; color: var(--accent-red); border: 1px solid var(--accent-red); }
  .detail__info .detail__actions .btn--danger:hover { background: var(--accent-red); color: var(--on-brand); }
}

/* ---------- Lost board + Claim centre, phone layout ----------
   Root cause of the old overlap: .board-layout used "1fr" (= minmax(auto, 1fr)), so the grid column grew to the
   width of its widest child and the whole page became wider than the phone. Columns are now minmax(0, 1fr) and
   every grid child may shrink. Layout on phones: compact intro, one full-width search box, count + sort links,
   and compact photo-left cards (category/place filters are desktop-only). Desktop is unchanged. */
.board-layout { grid-template-columns: minmax(0, 1fr); }
.board-layout > * { min-width: 0; }
@media (min-width: 960px) { .board-layout { grid-template-columns: 270px minmax(0, 1fr); } }

/* Phone-only controls stay out of the desktop layout */
.custody__main { display: flex; flex-direction: column; gap: .45rem; }

@media (max-width: 860px) {
  /* Intro card: short text, two side-by-side buttons, thin three-step row */
  :root:root .board-hero:not(.board-hero--all) { display: block; padding: 1rem; border-radius: 16px; margin-bottom: .9rem; box-shadow: none; }
  :root:root .board-hero:not(.board-hero--all) .page-head__eyebrow { margin: 0 0 .25rem; }
  :root:root .board-hero:not(.board-hero--all) h1 { margin: 0 0 .4rem; font-size: 1.45rem; line-height: 1.2; }
  :root:root .board-hero:not(.board-hero--all) p { max-width: none; margin: 0 0 .9rem; font-size: .92rem; line-height: 1.5; }
  :root:root .board-hero--lead .board-hero__intro { display: none; }
  :root:root .board-hero--lead .board-hero__lead { display: block; color: var(--muted); }
  :root:root .board-hero:not(.board-hero--all) .board-hero__cta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
  :root:root .board-hero:not(.board-hero--all) .board-hero__cta .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; height: auto; padding: .35rem .5rem; border-radius: 12px; font-size: .9rem; font-weight: 600; line-height: 1.15; text-align: center; white-space: normal; }
  :root:root .board-hero:not(.board-hero--all) .mode-steps { display: flex; gap: .5rem; margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--border); }
  :root:root .board-hero:not(.board-hero--all) .mode-steps li { display: flex; flex: 1; min-width: 0; align-items: flex-start; gap: .4rem; padding: 0; border: 0; background: none; border-radius: 0; box-shadow: none; transform: none; text-align: left; }
  :root:root .board-hero:not(.board-hero--all) .mode-steps li::before { flex: none; grid-row: auto; align-self: auto; width: 1.2rem; height: 1.2rem; margin: 0; font-size: .7rem; }
  :root:root .board-hero:not(.board-hero--all) .mode-steps li strong { display: block; font-size: .72rem; line-height: 1.25; color: var(--muted); }
  :root:root .board-hero:not(.board-hero--all) .mode-steps li span { display: none; }

  /* The sidebar dissolves: search row sits in the page, the filters become a bottom sheet */
  :root:root .board-layout { gap: .75rem; }
  :root:root .board-layout .side { display: contents; }
  :root:root .board-layout .side__search { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; margin: 0; }
  :root:root .board-layout .side__filters { display: none; }
  :root:root .board-layout .side__searchbox { position: relative; min-width: 0; }
  :root:root .board-layout .side__searchico { display: flex; align-items: center; justify-content: center; position: absolute; left: .8rem; top: 0; bottom: 0; width: 18px; color: var(--muted); pointer-events: none; }
  :root:root .board-layout .side__searchico svg { display: block; flex: none; width: 18px; height: 18px; }
  :root:root .board-layout .side__search input[type="search"] { width: 100%; height: 46px; padding: 0 .75rem 0 2.4rem; border-radius: 12px; font-size: 16px; }
  :root:root .board-layout .side__search .side__date { display: none; }
  :root:root .board-layout .side__search button[type="submit"] { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }


  :root:root .board-layout .list-bar { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; }
  :root:root .board-layout .list-bar .seg { display: none; }
  :root:root .board-layout .result-count { font-size: .85rem; }

  /* Count, then the three sort links as one even row (plain links, no script needed) */
  :root:root .board-layout .list-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .5rem; margin: 0; }
  :root:root .board-layout .list-bar .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 12px; }
  :root:root .board-layout .list-bar .seg a { padding: .6rem .25rem; text-align: center; font-size: .8rem; line-height: 1.2; }
  :root:root .board-layout .result-count { font-size: .85rem; }

  /* Cards: photo left, details right, progress bar and buttons full width underneath */
  :root:root .board-layout .board { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  :root:root .board-layout .custody { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: .75rem; align-content: start; height: auto; padding: .75rem; border-radius: 16px; box-shadow: var(--card-shadow); }
  :root:root .board-layout .custody__photo { grid-column: 1; grid-row: 1; width: 96px; height: 96px; aspect-ratio: auto; align-self: start; border-radius: 12px; }
  :root:root .board-layout .custody__flag { left: .35rem; bottom: .35rem; padding: .12rem .45rem; font-size: .62rem; }
  :root:root .board-layout .custody__body { display: contents; }
  :root:root .board-layout .custody__main { grid-column: 2; grid-row: 1; min-width: 0; gap: .15rem; }
  :root:root .board-layout .custody__cat { display: flex; justify-content: space-between; gap: .5rem; font-size: .68rem; }
  :root:root .board-layout .custody__cat code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :root:root .board-layout .custody__title { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
  :root:root .board-layout .custody__desc, :root:root .board-layout .custody .report-card__tags { display: none; }
  :root:root .board-layout .custody__facts { display: block; margin: .15rem 0 0; padding: 0; border: 0; font-size: .82rem; }
  :root:root .board-layout .custody__facts div { display: block; }
  :root:root .board-layout .custody__facts dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :root:root .board-layout .custody__facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
  :root:root .board-layout .custody__facts .custody__hold { margin-top: .25rem; }
  :root:root .board-layout .custody__facts .custody__hold dt { position: static; display: inline; width: auto; height: auto; clip: auto; margin-right: .3rem; font-size: .8rem; }
  :root:root .board-layout .custody__facts .custody__hold dd { display: inline; font-weight: 700; color: var(--found); }
  :root:root .board-layout .custody .card-days { margin: .25rem 0 0; font-size: .78rem; }
  :root:root .board-layout .custody .retention { grid-column: 1 / -1; margin-top: .75rem; }
  :root:root .board-layout .custody .custody__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; padding: 0; }
  :root:root .board-layout .custody .custody__actions > :only-child { grid-column: 1 / -1; }
  :root:root .board-layout .custody .custody__actions form { display: block; margin: 0; }
  :root:root .board-layout .custody .custody__actions .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0 .75rem; border-radius: 12px; font-size: .92rem; font-weight: 600; white-space: nowrap; }

  /* Nothing found: phones have no filters to clear, so show just the report button */
  :root:root .board-layout .empty-state__clear { display: none; }
  :root:root .board-layout .empty-state__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  :root:root .board-layout .empty-state__actions .btn { width: 100%; min-height: 46px; border-radius: 12px; justify-content: center; }

  /* "60+ days" strip and "Can't find it?" box */
  :root:root .board-layout .expiring { padding: .9rem; border-radius: 16px; }
  :root:root .board-layout .board-cta__text { flex: none; }
  :root:root .board-layout .board-cta { flex-direction: column; align-items: stretch; border-radius: 16px; padding: 1rem; gap: .75rem; }
  :root:root .board-layout .board-cta .btn { width: 100%; min-height: 46px; border-radius: 12px; justify-content: center; }
}
@media (min-width: 600px) and (max-width: 860px) {
  :root:root .board-layout .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
}

/* ---------- All Reports page (registry), phone layout ---------- */
@media (max-width: 860px) {
  :root:root .board-hero--all { padding: 1.25rem; border-radius: 18px; gap: .75rem; box-shadow: none; margin-bottom: 1rem; }
  :root:root .board-hero--all h1 { margin: 0 0 .5rem; font-size: 1.6rem; line-height: 1.2; }
  :root:root .board-hero--all p { margin: 0; font-size: .95rem; line-height: 1.55; }
  :root:root .board-hero--all .page-head__eyebrow { margin: 0 0 .5rem; }

  :root:root .board-hero .hero-filters { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: 1rem; border-radius: 16px; align-items: end; }
  :root:root .hero-filters .hero-filters__f, :root:root .hero-filters .hero-filters__f--s3 { grid-column: span 1; }
  :root:root .hero-filters .hero-filters__panel > .hero-filters__f:nth-child(5) { grid-column: 1 / -1; }
  :root:root .hero-filters > .hero-filters__f:first-child label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Collapsible panel (only once hero-filters.js has run; without it everything stays visible) */
  :root:root .hero-filters__panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
  :root:root .hero-filters:not(.hf-ready) .hero-filters__toggle { display: none; }
  :root:root .hero-filters:not(.hf-ready) .hero-filters__panel { margin-top: .25rem; }
  :root:root .hero-filters.hf-ready .hero-filters__panel { display: none; }
  :root:root .hero-filters.hf-ready.hf-open .hero-filters__panel { display: grid; }
  :root:root .board-hero .hero-filters .hero-filters__toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 44px; padding: 0 .9rem;
    border-radius: 12px; font-size: .92rem; font-weight: 600; white-space: nowrap;
  }
  :root:root .hero-filters__toggle svg { transition: transform .2s ease; }
  :root:root .hero-filters__toggle[aria-expanded="true"] { background: var(--brand-050); }
  :root:root .hero-filters__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  :root:root .hero-filters__count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem;
    border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .75rem; font-weight: 700;
  }
  :root:root .hero-filters__count[hidden] { display: none; }
  :root:root .hero-filters__f label { font-size: .68rem; margin-bottom: .1rem; }
  :root:root .board-hero .hero-filters .input, :root:root .board-hero .hero-filters .select { height: 44px; border-radius: 12px; font-size: .92rem; padding-left: .75rem; }
  :root:root .board-hero .hero-filters input[type="date"] { font-size: .88rem; }
  :root:root .board-hero .hero-filters .hero-filters__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  :root:root .board-hero .hero-filters .btn { height: 46px; border-radius: 12px; font-size: .95rem; font-weight: 600; }

  /* Registry rows become cards */
  :root:root .registry-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  :root:root .registry thead { display: none; }
  :root:root .registry, :root:root .registry tbody { display: block; }
  :root:root .registry tr {
    display: flex; flex-wrap: wrap; align-items: center; padding: 1rem; margin: 0 0 1rem;
    background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--card-shadow);
  }
  :root:root .registry td { display: block; padding: 0; border: 0 !important; background: none !important; }
  :root:root .registry td::before { display: none; }
  :root:root .registry td.registry__item { order: 0; flex: 0 0 100%; min-width: 0; display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
  :root:root .registry__thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; }
  :root:root .registry__title { font-size: 1.05rem; line-height: 1.25; }
  :root:root .registry__ref { font-size: .75rem; }
  :root:root .registry td[data-label="Type"] { order: 1; flex: 0 0 auto; margin-right: .5rem; }
  :root:root .registry td[data-label="Status"] { order: 2; flex: 1 1 calc(100% - 6rem); }
  :root:root .registry td[data-label="Category"], :root:root .registry td[data-label="Location"],
  :root:root .registry td[data-label="Date"], :root:root .registry td[data-label="Age"] { flex: 0 0 50%; box-sizing: border-box; padding-right: .75rem; font-size: .92rem; }
  :root:root .registry td[data-label="Category"], :root:root .registry td[data-label="Location"] { order: 3; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--border) !important; }
  :root:root .registry td[data-label="Date"], :root:root .registry td[data-label="Age"] { order: 4; padding-top: .75rem; padding-bottom: .85rem; border-bottom: 1px solid var(--border) !important; }
  :root:root .registry td[data-label="Category"]::before, :root:root .registry td[data-label="Location"]::before,
  :root:root .registry td[data-label="Date"]::before, :root:root .registry td[data-label="Age"]::before {
    display: block; content: attr(data-label); margin-bottom: .1rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  }
  :root:root .registry td.registry__go { order: 5; flex: 0 0 100%; margin-top: .85rem; }
  :root:root .registry__go .btn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; border-radius: 12px; font-size: .95rem; font-weight: 600;
  }
}

/* All Reports filters: on larger screens the panel is transparent to the grid and the button is hidden */
.hero-filters__toggle { display: none; }
.hero-filters__panel { display: contents; }
