/* Shared fact roles and spacing apply to every card renderer on both entry pages. */
.device-fact{gap:var(--card-fact-gap)}
.device-fact>span:first-child{font:500 var(--card-label-size)/1.5 var(--display);letter-spacing:normal;text-transform:none}
.device-fact>.device-fact-value{font:500 var(--card-value-size)/1.5 var(--display)}
.data-details{row-gap:var(--card-row-gap)}
.data-details>div{row-gap:var(--card-fact-gap)}
/* Shared card disclosures: native details keep their state and keyboard behaviour. */
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block),details.admin-audit,details.evidence-block{min-width:0;border:1px solid var(--palette-47634866);border-radius:var(--radius-12px);margin-top:10px;padding:0;background:var(--palette-0c1d155c)}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)>summary,details.admin-audit>summary,details.evidence-block>summary{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px;min-height:40px;box-sizing:border-box;padding:10px 12px 10px 40px;list-style:none;cursor:pointer;color:var(--accent);font:650 12px/1.5 var(--display);overflow-wrap:break-word;border-radius:var(--radius-12px);background:linear-gradient(145deg,var(--palette-253b2c),var(--palette-16251c));box-shadow:inset 0 1px 0 var(--palette-ffffff22)}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)>summary::-webkit-details-marker,details.admin-audit>summary::-webkit-details-marker,details.evidence-block>summary::-webkit-details-marker{display:none}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)>summary::before,details.admin-audit>summary::before,details.evidence-block>summary::before{content:"";position:absolute;left:10px;top:50%;width:23px;height:23px;background:url('/static/icons/wan-studio-controls.webp?v=20261029-42') 0% 50%/300% 300% no-repeat;transform:translateY(-50%) rotate(90deg);clip-path:inset(2px);filter:drop-shadow(0 2px 3px var(--palette-071607));transition:transform .18s}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)[open]>summary::before,details.admin-audit[open]>summary::before,details.evidence-block[open]>summary::before{transform:translateY(-50%) rotate(180deg)}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)>summary:focus-visible,details.admin-audit>summary:focus-visible,details.evidence-block>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)[open],details.admin-audit[open],details.evidence-block[open]{padding:0 var(--card-inset) var(--card-inset)}
:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)[open]>summary,details.admin-audit[open]>summary,details.evidence-block[open]>summary{margin:0 calc(-1 * var(--card-inset)) var(--card-row-gap);border-bottom:1px solid var(--palette-47634866);border-bottom-left-radius:0;border-bottom-right-radius:0}
/* v48 assessment toggle: same disclosure, compact, the graded value left-aligned after the chevron. */
details.evidence-block{margin:0}details.evidence-block>summary{color:var(--palette-e2eedc);font-size:12px;gap:6px 10px}
details.evidence-block[open]>summary{margin-bottom:var(--card-row-gap)}
/* The trigger belongs to its pill; the shared phone hit-area pseudo stays free. */
.guest-card .guest-signals{gap:10px;margin-bottom:14px;align-items:stretch}
.guest-card .guest-signal-group{display:inline-flex;align-items:center;gap:0;padding:0 5px 0 0;border:1px solid var(--palette-789075);border-radius:var(--radius-12px);background:var(--palette-122218);min-height:36px;box-sizing:border-box}
.guest-card .guest-signal-group:has(.guest-signal-known){border-color:var(--palette-a8da74)}
.guest-card .guest-signal-group:has(.guest-signal-risk-low){border-color:var(--palette-9dad69)}
.guest-card .guest-signal-group:has(.guest-signal-risk-medium){border-color:var(--palette-dfb26b)}
.guest-card .guest-signal-group:has(.guest-signal-risk-high){border-color:var(--palette-f3917f);background:var(--palette-42231f)}
.guest-card .guest-signal-group .guest-signal{border:0;border-radius:inherit;background:none;padding:7px 9px;line-height:1.45}
.guest-card .guest-signal-group .help-trigger{margin:0;flex:0 0 27px;align-self:center}
.guest-card .guest-visit-summary{padding:2px 12px;margin-bottom:10px}
.guest-card .guest-visit-summary>div,.guest-card .guest-account-facts>div{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:start;gap:6px 12px}
.guest-card .guest-account-facts{margin:0 0 12px;padding:10px 12px;border:1px solid var(--palette-4c6b4d80);border-radius:var(--radius-12px);background:var(--palette-0c1d155c)}
.guest-account-facts .guest-profile-links{justify-content:flex-end;margin:0;gap:8px}
.guest-account-facts dt{padding-top:7px}
.guest-card .guest-visit-summary time{gap:2px 9px}
@media(max-width:640px),(pointer:coarse){
  :is(.user-row,.guest-card,.audit-record,.network-inventory-card) details:not(.media-action-menu):not(.evidence-block)>summary,details.admin-audit>summary,details.evidence-block>summary{min-height:44px}
  .guest-card .guest-signal-group{min-height:44px;padding-right:8px}
  .guest-card .guest-signals{gap:12px}
  .guest-account-facts .guest-profile-links button{min-height:44px;min-width:44px}
}
/* Nested phone cards need their reading width more than a second horizontal inset. */
@media(max-width:640px){
  .user-row>details:not(.media-action-menu)[open]{padding-left:0;padding-right:0}
  .user-row>details:not(.media-action-menu)[open]>summary{margin-left:0;margin-right:0}
  .user-row .device-facts{grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr))}
  .user-row .device-fact:has(.evidence-block){grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce){:is(.user-row,.guest-card,.audit-record,.network-inventory-card) details>summary::before,details.admin-audit>summary::before,details.evidence-block>summary::before{transition:none}}
/* v49 D-TOUCH-ACCESS: the administrator «Доступ» area on phones and touch devices (whole-page rule:
   tests/audit/touch_scan.cjs, tests/v49_touch_access_browser.cjs). Every control has a natural 44 px target instead
   of an invisible extension that could reach a neighbour; controls in a row or a column are drawn at least 8 px
   apart; a help trigger keeps its small glass circle, and its 44 px area sits in a 40 px title row clear of the
   field below. Fine-pointer desktop keeps the existing density (nothing here applies there). */
@media (max-width:640px),(pointer:coarse){
  /* A floor only: controls with their own taller layout keep it (tab tiles 66-88 px, maintenance and QR controls 45-48 px,
     page pagination 50-60 px). */
  #access :is(button,select,input:not([type=checkbox],[type=radio],[type=hidden],[type=range]),textarea):not(.help-trigger,.wan-close,[role=tab],.maintenance-actions button,.qr-login-toggle,.qr-duration-label select,.page-pagination-button){min-height:44px}
  #access button:not(.help-trigger,.wan-close,[role=tab]){min-width:44px}
  /* Selects of a user card: a real 44 px box like the buttons beside them (no transparent border band reaching 2 px
     towards the neighbours), 8 px apart from them. */
  #access .user-row-actions select,#access .user-row-actions select:is(:hover,:focus){margin-block:0;border-width:0;border-radius:var(--radius-9px);background-clip:border-box}
  #access :is(.user-row-actions,.device-rule-chip-list,.evidence-chips,.profile-media-filters,.feature-selected-users){gap:8px}
  #access .user-row-actions{margin-top:2px}
  #access .access-mode-switch{gap:10px}
  /* Stacked field + unit select inside one label, and the media filter row under the delete mode. */
  #access :is(.invite-form,.access-form,.user-limits-grid) label{row-gap:8px}
  #access .media-search{margin-top:8px}
  /* A help trigger beside a button: its 44 px area ends before the button. */
  #access .user-limit-action{gap:10px}
  #access .user-limit-action .help-trigger{margin-left:0}
  /* Field titles that carry a help trigger: 40 px title rows hold the trigger's centred 44 px area above the field. */
  #access .access-field>label>.field-label-text{display:flex;align-items:center;min-height:40px;padding-right:36px}
  #access .access-field>.help-trigger{top:6px}
  #access .device-policy-heading{display:flex;align-items:center;min-height:40px}
  /* Checkbox rows of a feature rule: the label (pill) is the 44 px target, the box draws no extension over the select. */
  #access :is(.feature-beta-toggle,.feature-selected-users label){min-height:44px;box-sizing:border-box;cursor:pointer}
  #access .feature-beta-toggle{padding-inline:6px}
  #access :is(.feature-beta-toggle,.feature-selected-users label) input::after{content:none}
  /* Short filter pills («Все») are 56 px wide stadiums, not 44 px circles: the whole 44 x 44 square around the centre
     stays inside the rounded shape that answers taps. */
  #access :is(.profile-media-filters,.evidence-chips) button{min-width:56px}
  /* Media action menu of a user card: menu items 8 px apart. */
  #access .media-action-menu>div{gap:8px}
}
/* v49: the touch area of a device-policy label (touch-targets.css) is drawn over its heading; the heading's help
   trigger stays above it, so a tap on «?» opens help and a tap on the title or field reaches the field. */
@media (max-width:640px),(pointer:coarse){#access .device-policy-heading .help-trigger{z-index:1}}
/* v49: «Только доверенные устройства» is a real label of its checkbox (its title text toggles it); the label takes no
   box of its own, so the checkbox, the title and the help trigger keep their grid columns. */
:is(.access-form,.invite-form,#access) :is(.device-create-option,.device-setting)>.device-create-toggle{display:contents;cursor:pointer}
/* v49: desktop (fine pointer) keeps its density, but no Access control stays under 24 px: the underlined «Открыть
   пользователя» link of the network overview gets a 31 px box (its underline sits 5 px lower, at the box edge); the
   «Устройства и сети» heading pill of a user card keeps its own padding. */
@media (min-width:641px) and (pointer:fine){#access-networks-panel .summary-client-link:not(.user-network-summary .summary-client-link){padding-block:5px}}
/* v49: on phones the primary save actions of the Access cards span the card width (as «Сохранить правила» does). */
@media (max-width:640px){#access :is(.user-limit-actions>button,.feature-policy-item>button){flex:1 1 100%;width:100%;justify-self:stretch}}
/* v49: on touch tablets a fact title with a help trigger sits at the top edge of its clipped fact box: room above and
   below the 27 px circle for its 44 px area (phones already stack these facts with enough room). */
@media (min-width:641px) and (pointer:coarse){#access .fact-label:has(.help-trigger){padding-block:9px}}
/* v49: on touch devices the controls that studio-touch-targets.css extends are positioned by the page itself, so that
   sheet adds only its unpainted hit areas: with and without it every pixel is identical (tests/v47_touch_targets_browser.cjs
   rule 1; a control that becomes positioned only together with the sheet re-rasterises by a sub-pixel on tablets). */
@media (max-width:640px),(pointer:coarse){
  :where(.brand,.login-card .redeem-toggle,.pager-step,.gallery-actions>button,.gallery-actions>a,.media-action-menu>summary,
    .media-action-menu>div>button,#gallery-selection-mode,.studio-player-toggle,.studio-player-sound,
    #own-password-form button,#new-user-form button:not(.help-trigger),#maintenance-toggle,#admin-audit-panel summary,
    #video-dialog-admin-actions summary,#video-dialog-admin-actions button,.menu-logout-button,.prompt-preset,
    .download-link,#session-timer,.session-menu button,.access-create-shortcut,.device-rules-toolbar>button,.user-row-actions button,
    .summary-client-link,input[type=checkbox],input[type=radio],
    .profile-media-copy,.device-policy-controls button,.profile-session button,.invite-form button,
    .admin-user-toolbar label,.guest-presence-toolbar label,.device-policy-controls label){position:relative}
  /* The paired compensations of that sheet: the blocks after a positioned button stay above its drop shadow. */
  #own-password-form+p{position:relative}
  :where(.device-rules-toolbar~*){position:relative}
}
/* v49: on touch tablets the unpainted ::before hit boxes of that sheet are drawn by the page itself with the same
   geometry (nothing painted), so the sheet changes nothing there (a profile switch re-rasterised its edge by a sub-pixel
   when the box appeared only with the sheet). Phones match without this. */
@media (min-width:641px) and (pointer:coarse){
  :is(.gallery-actions>a.has-control-icon,.media-action-menu>summary,#video-dialog-admin-actions summary,.download-link,input[type=checkbox],input[type=radio])::before{
    content:"";position:absolute;inset:min(0px,calc(50% - 22px));width:auto;height:auto;margin:0;padding:0;border:0;background:none;box-shadow:none;filter:none;transform:none;opacity:1}
}
