/* Shared finishing layer for PULSE members and setup guides. */
:root {
  --interaction-duration: 150ms;
  --interaction-ease: ease-out;
}

::selection { color: #171914; background: #DFC27B; }
:where(input, textarea) { caret-color: #DFC27B; }
:where(input, textarea)::placeholder { color: #a7afa0; opacity: 1; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }
:where(a) { text-underline-offset: .2em; }
:where(button, input, select, textarea, a) { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #DFC27B;
  outline-offset: 4px;
}
:where(button, a.button, summary) { touch-action: manipulation; }
.button, .icon-button {
  transition: background-color var(--interaction-duration) var(--interaction-ease),
    border-color var(--interaction-duration) var(--interaction-ease),
    color var(--interaction-duration) var(--interaction-ease),
    box-shadow var(--interaction-duration) var(--interaction-ease),
    transform var(--interaction-duration) var(--interaction-ease);
}
.button:not(:disabled):not([aria-disabled="true"]):active,
.icon-button:not(:disabled):not([aria-disabled="true"]):active {
  transform: scale(.96);
}
:where(button:disabled, input:disabled, select:disabled, textarea:disabled,
  [aria-disabled="true"]) {
  cursor: not-allowed;
}
.button:disabled, .button[aria-disabled="true"] {
  opacity: .55;
  transform: none;
}

:where(.dashboard-slot-meta, .dashboard-license-details, .dashboard-key-value,
  .dashboard-progress-label, .dashboard-activity-list time, .access-capacity-number,
  .access-account-main .mono, .admin-key, .admin-account-count, .admin-date,
  .admin-filter span, .setup-progress) {
  font-variant-numeric: tabular-nums;
}
:where(.dashboard-heading > div, .dashboard-access-main > div,
  .dashboard-step > div, .admin-person > div, .admin-header > div,
  .support-request > div > div, .access-note > div) {
  min-width: 0;
}
:where(.dashboard-heading h1, .admin-member-name, .access-account-main h3,
  .access-account-main .mono, .dashboard-step-title) {
  overflow-wrap: anywhere;
}

.dashboard-copy-button { min-height: 44px; }
.dashboard-guide-link { min-height: 44px; }
:where(.dashboard-all-accounts, .dashboard-resource a,
  .dashboard-access-bottom a, .dashboard-activity-empty a,
  .dashboard-pending-note a, .dashboard-help-link) {
  min-height: 44px;
  align-items: center;
}
.setup-check { transition: color var(--interaction-duration) var(--interaction-ease); }

/* Keep the selected destination distinct from gold primary actions. */
.nav-link[aria-current="page"] {
  color: #8ad4b5;
  background: #26382c;
}
.nav-link[aria-current="page"]::before {
  width: 1px;
  background: #5CBFA0;
}
.nav-admin .nav-link[aria-current="page"] { color: #8ad4b5; }

/* Long identities and short windows keep navigation and account actions usable. */
.workspace-header { min-height: 82px; height: auto; padding-block: 12px; flex-wrap: wrap; }
.header-location, .header-actions { min-width: 0; }
.header-actions { flex-wrap: wrap; }
#header-member-name { overflow-wrap: anywhere; min-width: 0; }
.sidebar { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
dialog { overscroll-behavior: contain; }
.license-card-top { flex-wrap: wrap; }
.license-facts + .inline-link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }
.license-key-display code, .license-facts dd { font-variant-numeric: tabular-nums; }

/* The guide index is a reading list, with one clear destination per row. */
.setup-resources { display: grid; gap: 0; padding: 0; margin-block: 24px 0; list-style: none; }
.setup-resources > * { min-width: 0; border-block-end: 1px solid var(--line); }
.setup-resources a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 16px; }
.setup-resources a > * { min-width: 0; }
.setup-resources a .icon { flex-shrink: 0; }
.setup-resources a:focus-visible { outline-offset: 0; }
.setup-resources .downloads-guide {
  margin: 0;
  padding-inline: 0;
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.guide-content :is(p, li) { max-width: 70ch; }
.guide-content :is(code, a), .guide-note { overflow-wrap: anywhere; }
.guide-content :is(h1, h2, h3, [id]) { scroll-margin-block-start: 24px; }
.guide-note { border-inline-start-width: 1px; }

/* Admin uses .field on its input; other forms use it on a label wrapper. */
.admin-search-wrap input.field {
  background: #171c15;
  border: 1px solid #46503c;
  border-radius: 5px;
  color: #F4F5F0;
  line-height: 1.4;
  padding: 12px 13px 12px 39px;
}
/* Form boundaries remain identifiable before focus, including on dark panels. */
.field input:not(:disabled), .field select:not(:disabled),
.field textarea:not(:disabled), input.input:not(:disabled),
select.input:not(:disabled), textarea.input:not(:disabled),
.support-form input, .support-form textarea, .access-profile-form input:not(:disabled),
.admin-search-wrap input.field, .signin-form input {
  border-color: #6f7c63;
}
.admin-directory-top h2.section-heading { flex-direction: row; }
.member-details dd { min-width: 0; }
.modal-header h2 { min-width: 0; overflow-wrap: anywhere; }
.sidebar-help a, .signin-back, .signin-panel-footer a, .signin-footer > a {
  min-height: 44px;
  align-items: center;
}
.signin-form input:focus-visible {
  outline: 2px solid #DFC27B;
  outline-offset: 3px;
}
.signin-primary:not(:disabled):active,
.signin-provider:not(:disabled):active { transform: scale(.96); }

@media (hover: hover) {
  .setup-check:hover { color: #F4F5F0; }
  .setup-check:hover .setup-checkbox { border-color: #DFC27B; }
}

@media (hover: none) {
  .nav-link:hover:not([aria-current="page"]) { background: transparent; color: #b5bdae; }
  .button-primary:hover { background: var(--gold); }
  .button-secondary:hover { background: #293025; border-color: #49523e; }
  .button-ghost:hover { background: transparent; color: #c8d0bf; }
  .icon-button:hover { background: transparent; color: var(--muted); }
  .downloads-guide:hover { border-color: var(--line); }
  .guide-nav a:hover:not([aria-current="page"]) { color: var(--muted); }
}

@media (max-width: 760px) {
  .workspace-header { min-height: 72px; }
  .header-location .mobile-menu { min-width: 44px; min-height: 44px; }
}

@media (max-width: 520px) {
  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }
  .dashboard-card-top { flex-wrap: wrap; }
  .dashboard-slot-meta { flex-wrap: wrap; gap: 4px 12px; }
  .dashboard-section-top { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-activity-list time { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  button:active, .button:active { transform: none !important; }
}

@media (forced-colors: active) {
  :where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: Highlight;
  }
  .setup-checkbox { border-color: ButtonText; }
  .dashboard-slot-used, .access-slot-track .is-filled {
    background: Highlight;
    forced-color-adjust: none;
  }
}

/* Let key actions wrap when the card is narrow inside a wider viewport. */
.dashboard-key-row { flex-wrap: wrap; }
.dashboard-key-value { flex: 1 1 15ch; }
.dashboard-key-actions { margin-inline-start: auto; }
