:root { --rf-safe-bottom: env(safe-area-inset-bottom, 0px); }
.mobile-dock, .mobile-scrim { display: none; }
.table-wrap:focus-visible { outline: 2px solid var(--dark); outline-offset: 2px; }
.team-page { max-width: 1100px; }
.team-heading { display: grid; gap: 8px; margin-block: 18px 22px; }
.team-heading h1 { margin: 0; overflow-wrap: anywhere; }
.team-heading p { margin: 0; color: var(--muted); }
.team-modules { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: 12px; }
.team-module { display: grid; gap: 6px; min-height: 80px; padding: 14px; text-align: left; text-decoration: none; color: var(--ink); }
.team-module strong { color: var(--dark); }
.team-module span { color: var(--muted); font-size: 13px; }
.team-profile { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.team-profile a { color: var(--dark); font-weight: 700; text-decoration: none; }
.team-results { scroll-margin-top: 14px; margin-top: 24px; }
.login-enroll { display: block; margin-top: 14px; text-align: center; }
.login-panel .btn { min-height: 44px; }
.stock-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stock-actions button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: white; }

@media (max-width: 760px) {
  html { scroll-padding-bottom: calc(76px + var(--rf-safe-bottom)); }
  .content, .workspace, .two-col > *, .panel { min-width: 0; }
  main.content { padding: 18px clamp(12px, 4vw, 22px) calc(36px + var(--rf-safe-bottom)); }
  .shell .content { padding-bottom: calc(92px + var(--rf-safe-bottom)); }
  .mobile-dock {
    position: fixed; z-index: 24; inset-inline: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #fbfcf8;
    border-top: 1px solid var(--line); box-shadow: 0 -4px 20px #153b3214;
    padding: 4px env(safe-area-inset-right,0px) calc(4px + var(--rf-safe-bottom)) env(safe-area-inset-left,0px);
  }
  .mobile-dock > * {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 48px; margin: 0 3px; padding: 4px 1px; border: 0; border-radius: 8px;
    background: transparent; color: var(--dark); font: 600 11px/1.25 system-ui; text-decoration: none;
  }
  .mobile-dock svg { width: 21px; height: 21px; }
  .mobile-dock [aria-current] { background: #dcece5; }
  .sidebar { width: min(84vw,320px); padding: 15px 14px calc(18px + var(--rf-safe-bottom)); visibility: hidden; }
  .sidebar.open { visibility: visible; }
  .mobile-scrim { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 29; border: 0; background: #102f27a8; }
  .sidebar.open + .mobile-scrim { display: block; }
  .topbar { min-height: 58px; padding: 8px 12px; gap: 8px; }
  .topbar .profile { gap: 4px; }
  .topbar .avatar, .mobile-menu { display: none; }
  .topbar .logout-link { min-height: 44px; padding-inline: 8px; }
  .page-heading { gap: 12px; }
  .page-heading h1 { overflow-wrap: anywhere; }
  .panel-body, .panel-head { padding-inline: clamp(12px, 4vw, 20px); }
  .panel-head { flex-wrap: wrap; }
  .btn, .btn.small, .sidebar .nav button, .sidebar .nav a {
    min-height: 44px; font-size: 14px; white-space: normal; text-align: center;
  }
  .form-row input:not([type=checkbox]):not([type=radio]), .form-row select,
  .form-row textarea, .form-grid input:not([type=checkbox]):not([type=radio]),
  .form-grid select, .rf-results input:not([type=checkbox]):not([type=radio]),
  .rf-results select, .rf-results textarea, .field input, .field select, .panel select,
  .panel textarea, .panel input[type=search] { font-size: 16px; min-height: 44px; max-width: 100%; }
  .form-grid > *, .rf-result-filters > * { min-width: 0; }
  .dialog-actions { gap: 8px; }
  .dialog-actions .btn { flex: 1 1 auto; }
  .table-wrap { max-width: 100%; overscroll-behavior-inline: contain; }
  dialog { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .login-wrap { min-height: auto; gap: 14px; padding: 18px 14px calc(28px + var(--rf-safe-bottom)); }
  .login-intro h1 { font-size: clamp(25px,8vw,36px); margin-block: 6px; }
  .login-intro > p { line-height: 1.4; margin: 0; }
  .login-panel form .btn, .login-enroll { display: flex; width: 100%; }
  .team-heading h1 { font-size: clamp(26px,7vw,40px); }
  .team-modules { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-module { min-height: 78px; padding: 11px; }
  .stock-actions > * { flex: 1; }
}
.mobile-auth-key { margin-block: 12px; }
.mobile-auth-key summary { min-height: 44px; padding-block: 10px; font-weight: 700; cursor: pointer; }
.mobile-auth-key input { display: block; width: 100%; min-height: 44px; font-size: 16px; margin-bottom: 8px; }
.stock-actions { margin-block: 0 12px; }
.stock-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stock-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.stock-list dl { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; }
.stock-list dl div { display: flex; flex-wrap: wrap; gap: 0 5px; }
.stock-list dt { color: var(--muted); }
.stock-list dd { margin: 0; }
