/*
 * DHI staged-access overlay
 * -------------------------
 * Layout-neutral by design: this file never selects a page view or changes an
 * existing component's display, grid, spacing, or size. JavaScript may add
 * .dhi-lock-host, render synthetic ghost content, and append one absolutely
 * positioned .dhi-block-lock. Never use real individual data as ghost data.
 */

.dhi-lock-host {
  position: relative;
  isolation: isolate;
}

.dhi-block-lock,
.dhi-lock-ghost,
.dhi-access-modal {
  --dhi-gate-brand: var(--brand-800, #075a46);
  --dhi-gate-brand-strong: var(--brand-950, #063f34);
  --dhi-gate-brand-soft: var(--brand-50, #eaf5f0);
  --dhi-gate-coral: var(--coral-600, #d83b0a);
  --dhi-gate-coral-strong: var(--coral-700, #b8320a);
  --dhi-gate-ink: var(--ink-950, #17241f);
  --dhi-gate-sub: var(--ink-600, #64736d);
  --dhi-gate-line: var(--line-strong, #d5dfda);
  --dhi-gate-line-soft: var(--line-1, #e6ece9);
  --dhi-gate-surface: var(--surface-0, #fff);
  --dhi-gate-canvas: var(--phonebg, #f7f5f1);
  --dhi-gate-warning: var(--amber, #a76b13);
  --dhi-gate-danger: var(--red, #b83c2f);
  color: var(--dhi-gate-ink);
  font-family: inherit;
}

.dhi-block-lock *,
.dhi-access-modal * {
  box-sizing: border-box;
}

/* Translucent cover: the original card, photograph, and geometry remain
   recognizable while the controls underneath are unavailable. */
.dhi-block-lock {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.5vw, 24px);
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 78%), rgb(247 250 248 / 68%)),
    rgb(255 255 255 / 55%);
  -webkit-backdrop-filter: blur(5px) saturate(.88);
  backdrop-filter: blur(5px) saturate(.88);
}

.dhi-block-lock--photo {
  background:
    linear-gradient(90deg, rgb(4 63 50 / 74%), rgb(4 63 50 / 36%)),
    rgb(4 63 50 / 24%);
  -webkit-backdrop-filter: blur(3px) saturate(.86);
  backdrop-filter: blur(3px) saturate(.86);
}

.dhi-block-lock__card {
  width: min(100%, 560px);
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 18px;
  background: rgb(255 255 255 / 94%);
  box-shadow:
    0 18px 48px rgb(8 46 36 / 16%),
    inset 0 1px 0 rgb(255 255 255 / 82%);
  text-align: left;
}

.dhi-block-lock__lead {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dhi-block-lock__icon,
.dhi-access-modal__icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--dhi-gate-brand-soft);
  color: var(--dhi-gate-brand);
  box-shadow: inset 0 0 0 1px rgb(7 90 70 / 8%);
}

.dhi-block-lock__icon::before,
.dhi-access-modal__icon::before {
  content: "";
  position: absolute;
  top: 9px;
  width: 12px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.dhi-block-lock__icon::after,
.dhi-access-modal__icon::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 17px;
  height: 13px;
  border-radius: 4px;
  background: currentColor;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}

.dhi-block-lock__eyebrow {
  color: var(--dhi-gate-brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
}

.dhi-block-lock__title {
  margin: 10px 0 6px;
  color: var(--dhi-gate-ink);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 850;
  line-height: 1.35;
}

.dhi-block-lock__body {
  max-width: 58ch;
  margin: 0;
  color: var(--dhi-gate-sub);
  font-size: 12.5px;
  line-height: 1.65;
}

.dhi-block-lock__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.dhi-block-lock__feature {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--dhi-gate-brand) 17%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--dhi-gate-brand-soft) 54%, transparent);
  color: var(--dhi-gate-sub);
  font-size: 10.5px;
  font-weight: 750;
}

.dhi-block-lock__actions,
.dhi-access-modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

/* Compact cover for secondary charts and shallow tool rows. */
.dhi-block-lock--compact {
  padding: 8px;
  background: rgb(250 252 251 / 76%);
}

.dhi-block-lock--compact .dhi-block-lock__card {
  display: flex;
  width: min(100%, 430px);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
}

.dhi-block-lock--compact .dhi-block-lock__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.dhi-block-lock--compact .dhi-block-lock__icon::before {
  top: 7px;
}

.dhi-block-lock--compact .dhi-block-lock__icon::after {
  top: 16px;
}

.dhi-block-lock--compact .dhi-block-lock__copy {
  min-width: 0;
  flex: 1;
}

.dhi-block-lock--compact .dhi-block-lock__title {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dhi-block-lock--compact .dhi-block-lock__body,
.dhi-block-lock--compact .dhi-block-lock__features,
.dhi-block-lock--compact .dhi-block-lock__eyebrow {
  display: none;
}

.dhi-block-lock--compact .dhi-block-lock__actions {
  flex: 0 0 auto;
  margin: 0;
}

.dhi-block-lock--top {
  place-items: start center;
  padding-top: 28px;
}

.dhi-block-lock--top .dhi-block-lock__card {
  position: sticky;
  top: 18px;
}

/* Synthetic-only mosaic. Blur is visual treatment, not an access boundary. */
.dhi-lock-ghost {
  pointer-events: none;
  user-select: none;
  opacity: .54;
  filter: blur(4px) saturate(.55);
}

.dhi-lock-ghost[aria-hidden="true"] {
  speak: never;
}

.dhi-lock-ghost--chart {
  display: flex;
  height: 230px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 7%;
  padding: 22px 8% 12px;
  border-bottom: 1px solid var(--dhi-gate-line-soft);
}

.dhi-lock-ghost--chart > span {
  width: 9%;
  min-width: 12px;
  border-radius: 8px 8px 2px 2px;
  background: color-mix(in srgb, var(--dhi-gate-brand) 25%, var(--dhi-gate-line-soft));
}

.dhi-lock-ghost--chart > span:nth-child(1) { height: 38%; }
.dhi-lock-ghost--chart > span:nth-child(2) { height: 64%; }
.dhi-lock-ghost--chart > span:nth-child(3) { height: 48%; }
.dhi-lock-ghost--chart > span:nth-child(4) { height: 82%; }
.dhi-lock-ghost--chart > span:nth-child(5) { height: 58%; }
.dhi-lock-ghost--chart > span:nth-child(6) { height: 74%; }
.dhi-lock-ghost--lg { height: 300px; }
.dhi-lock-ghost--sm { height: 170px; }

.dhi-redacted-rows {
  display: grid;
  min-width: 0;
}

div.dhi-redacted-row {
  display: grid;
  min-height: 56px;
  grid-template-columns: 1.35fr .7fr .85fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dhi-gate-line-soft);
}

div.dhi-redacted-row > span,
tr.dhi-redacted-row td > span {
  display: block;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dhi-gate-line) 75%, var(--dhi-gate-surface));
}

div.dhi-redacted-row > span:nth-child(2n) { width: 72%; }

tr.dhi-redacted-row {
  height: 124px;
}

tr.dhi-redacted-row td {
  padding: 24px 5%;
  border-bottom: 1px solid var(--dhi-gate-line-soft);
}

tr.dhi-redacted-row td > span {
  display: inline-block;
  width: 19%;
  margin-right: 5%;
}

.dhi-redacted-rows--chart div.dhi-redacted-row {
  grid-template-columns: 32px 1fr 1.5fr .7fr;
}

.dhi-lock-placeholder--price { min-height: 130px; }
.dhi-lock-placeholder--trend { min-height: 450px; }
.dhi-lock-placeholder--range { min-height: 37px; }
.dhi-lock-placeholder--structure { min-height: 312px; }
.dhi-lock-placeholder--cross { min-height: 385px; }
.dhi-lock-placeholder--udder { min-height: 281px; }
.dhi-lock-placeholder--actions { min-height: 392px; }

.dhi-custom-move-ghost {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-height: 108px;
}

.dhi-custom-move-ghost > span {
  border: 1px solid var(--dhi-gate-line-soft);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dhi-gate-brand-soft), var(--dhi-gate-surface));
}

.dhi-sim-filter-note {
  margin-top: 12px;
  color: var(--dhi-gate-sub);
  font-size: 12px;
  font-weight: 700;
}

.dhi-safe-traits {
  display: grid;
  gap: 12px;
  padding: 22px 6px 12px;
}

.dhi-safe-trait {
  display: grid;
  grid-template-columns: 78px minmax(80px, 1fr) 48px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.dhi-safe-trait > i {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--dhi-gate-line-soft);
}

.dhi-safe-trait > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--dhi-gate-brand);
}

.dhi-safe-trait > strong { text-align: right; }

.dhi-safe-rel {
  display: grid;
  width: 132px;
  aspect-ratio: 1;
  place-content: center;
  border: 14px solid var(--dhi-gate-brand-soft);
  border-top-color: var(--dhi-gate-brand);
  border-radius: 50%;
  text-align: center;
}

.dhi-safe-rel b { font-size: 24px; }
.dhi-safe-rel b s { font-size: 12px; text-decoration: none; }
.dhi-safe-rel small { color: var(--dhi-gate-sub); font-size: 10px; }

/* -------------------------------------------------------------------------
   Wide-desktop geometry parity

   The protected renderers intentionally provide synthetic rows/charts instead
   of the real individual records.  Those stand-ins have less (or occasionally
   more) intrinsic height than the production content.  Keep that difference
   inside the locked hosts so it cannot move the original page sections.

   `data-dhi-access-active` is the live document flag.  The
   `data-access-limited="true"` branch keeps the same rules ready for the
   server-rendered flag; every selector also requires the per-view
   `.dhi-access-limited` class, so full mode is never affected.

   These values mirror the existing 1810px desktop composition.  They are
   deliberately restricted to the wide layout: narrower breakpoints continue
   to use the source page's content-driven responsive sizing. */
@media (min-width: 1600px) {
  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-health.dhi-access-limited .hl-card {
    min-height: 323.9px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-health.dhi-access-limited .hl-deck {
    min-height: 335.9px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-health.dhi-access-limited .cardgrid:not(#health-decisions) > .card:nth-child(-n + 3) {
    /* Source cards keep a 12px bottom margin while their grid items are
       height:100%; subtract that margin from the track floor. */
    min-height: 336.2px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-health.dhi-access-limited .cardgrid:not(#health-decisions) > .card:nth-child(n + 4) {
    min-height: 391.8px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-cull.dhi-access-limited .cull-listcard {
    min-height: 669.9px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-cull.dhi-access-limited .cull-dist {
    min-height: 422.8px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-mate.dhi-access-limited .mate-listcard {
    min-height: 708.6px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-sim.dhi-access-limited .bp-filterbar {
    min-height: 124px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-sim.dhi-access-limited tr.dhi-redacted-row {
    height: 125.975px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-about {
    min-height: 217.4px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-bullpref {
    min-height: 307px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-moves > .chart-t {
    min-height: 22px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .dhi-custom-move-ghost {
    min-height: 72px;
    height: 72px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-moves {
    min-height: 194.4px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-charts {
    min-height: 412.3px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-charts > .card {
    /* The source chart cards retain their 14px bottom margin inside a
       height:100% grid item. */
    min-height: 398.3px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-tablecard .dhi-redacted-row {
    min-height: 34.4px;
    height: 34.4px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-custom.dhi-access-limited .cix-subcard {
    min-height: 394.4px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-heat.dhi-access-limited .heat-hero {
    min-height: 330px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-heat.dhi-access-limited .heat-envgrid > .card {
    height: 401.7px;
    min-height: 401.7px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-heat.dhi-access-limited .heat-topcard {
    /* .heat-botgrid cards carry a 14px bottom margin in the source layout. */
    min-height: 853.3px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-kpis {
    min-height: 116.6px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-price .dhi-redacted-row {
    min-height: 51.85px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-price {
    min-height: 129.7px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-sec {
    min-height: 449.5px;
    height: 449.5px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .dhi-lock-placeholder--structure {
    min-height: 309.5px;
    height: 309.5px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-how {
    min-height: 72px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-acts {
    min-height: 392.5px;
  }

  :where(html[data-dhi-access-active], [data-access-limited="true"])
    #v-lact.dhi-access-limited .ld-list {
    min-height: 684px;
  }
}

.dhi-lock-ghost__rows {
  display: grid;
  gap: 9px;
}

.dhi-lock-ghost__row {
  display: grid;
  grid-template-columns: 34px minmax(90px, 1.4fr) repeat(3, minmax(56px, .8fr));
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--dhi-gate-line-soft);
}

.dhi-lock-ghost__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dhi-gate-brand) 22%, var(--dhi-gate-line-soft));
}

.dhi-lock-ghost__line,
.dhi-lock-ghost__cell {
  position: relative;
  display: block;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dhi-gate-line) 72%, var(--dhi-gate-surface));
}

.dhi-lock-ghost__line::after,
.dhi-lock-ghost__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 70%), transparent);
  animation: dhi-ghost-shimmer 2s ease-in-out infinite;
}

.dhi-lock-ghost__line:nth-child(2n),
.dhi-lock-ghost__cell:nth-child(2n) {
  width: 72%;
}

@keyframes dhi-ghost-shimmer {
  60%, 100% { transform: translateX(105%); }
}

/* Locked actions retain their original footprint; activation opens dialog. */
.dhi-locked-action {
  position: relative;
  cursor: pointer;
  filter: saturate(.72);
}

.dhi-locked-action:is(:hover, :focus-visible) {
  filter: saturate(.9);
}

.dhi-action-lock-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 999px;
  background: rgb(7 90 70 / 92%);
  color: #fff;
  box-shadow: 0 4px 12px rgb(5 56 43 / 20%);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.dhi-action-lock-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border: 1.5px solid currentColor;
  border-bottom: 4px solid currentColor;
  border-radius: 5px 5px 2px 2px;
}

.dhi-access-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--dhi-gate-line);
  border-radius: 10px;
  background: var(--dhi-gate-surface);
  color: var(--dhi-gate-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease,
    transform 140ms ease;
}

.dhi-access-button:hover {
  border-color: color-mix(in srgb, var(--dhi-gate-brand) 52%, var(--dhi-gate-line));
  color: var(--dhi-gate-brand);
}

.dhi-access-button:active {
  transform: translateY(1px);
}

.dhi-access-button:focus-visible,
.dhi-access-modal__close:focus-visible,
.dhi-locked-action:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dhi-gate-brand) 30%, transparent);
  outline-offset: 2px;
}

.dhi-access-button--primary {
  border-color: var(--dhi-gate-coral);
  background: var(--dhi-gate-coral);
  color: #fff;
}

.dhi-access-button--primary:hover {
  border-color: var(--dhi-gate-coral-strong);
  background: var(--dhi-gate-coral-strong);
  color: #fff;
}

.dhi-access-button:disabled {
  opacity: .56;
  cursor: not-allowed;
  transform: none;
}

.dhi-access-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--dhi-gate-brand) 28%, transparent);
  border-radius: 999px;
  background: var(--dhi-gate-brand-soft);
  color: var(--dhi-gate-brand);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.dhi-access-badge[data-status="pending"],
.dhi-access-badge[data-status="device_pending"] {
  border-color: color-mix(in srgb, var(--dhi-gate-warning) 35%, transparent);
  background: color-mix(in srgb, var(--dhi-gate-warning) 12%, var(--dhi-gate-surface));
  color: var(--dhi-gate-warning);
}

.dhi-access-badge[data-status="needs_info"] {
  border-color: color-mix(in srgb, var(--dhi-gate-coral) 34%, transparent);
  background: color-mix(in srgb, var(--dhi-gate-coral) 10%, var(--dhi-gate-surface));
  color: var(--dhi-gate-coral);
}

.dhi-access-badge[data-status="rejected"] {
  border-color: color-mix(in srgb, var(--dhi-gate-danger) 34%, transparent);
  background: color-mix(in srgb, var(--dhi-gate-danger) 10%, var(--dhi-gate-surface));
  color: var(--dhi-gate-danger);
}

/* Dialog is appended to body, so it never resizes application layout. */
.dhi-access-modal {
  width: min(760px, calc(100vw - 28px));
  max-width: 760px;
  max-height: min(84vh, 820px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--dhi-gate-brand) 14%, var(--dhi-gate-line));
  border-radius: 20px;
  background: var(--dhi-gate-surface);
  box-shadow: 0 28px 90px rgb(7 38 30 / 28%);
}

.dhi-access-modal:not([open]) {
  display: none;
}

.dhi-access-modal::backdrop {
  background: rgb(5 28 22 / 58%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.dhi-access-modal__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--dhi-gate-line-soft);
  background:
    radial-gradient(circle at 90% 0, color-mix(in srgb, var(--dhi-gate-brand-soft) 78%, transparent), transparent 42%),
    var(--dhi-gate-surface);
}

.dhi-access-modal__head h2 {
  margin: 0;
  color: var(--dhi-gate-ink);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.3;
}

.dhi-access-modal__head p {
  margin: 3px 0 0;
  color: var(--dhi-gate-sub);
  font-size: 11.5px;
  line-height: 1.5;
}

.dhi-access-modal__close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dhi-gate-line-soft);
  border-radius: 10px;
  background: var(--dhi-gate-surface);
  color: var(--dhi-gate-sub);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dhi-access-modal__body {
  max-height: calc(min(84vh, 820px) - 170px);
  overflow: auto;
  padding: 18px 20px;
  overscroll-behavior: contain;
}

.dhi-access-modal__status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--dhi-gate-line-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--dhi-gate-brand-soft) 44%, var(--dhi-gate-surface));
}

.dhi-access-modal__status strong {
  color: var(--dhi-gate-ink);
  font-size: 13px;
}

.dhi-access-modal__status p {
  margin: 4px 0 0;
  color: var(--dhi-gate-sub);
  font-size: 11.5px;
  line-height: 1.6;
}

.dhi-access-modal__section {
  margin-top: 20px;
}

.dhi-access-modal__section h3 {
  margin: 0 0 10px;
  color: var(--dhi-gate-ink);
  font-size: 13px;
}

.dhi-access-levels,
.dhi-access-tech {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.dhi-access-level,
.dhi-access-tech__item {
  padding: 12px;
  border: 1px solid var(--dhi-gate-line-soft);
  border-radius: 13px;
  background: color-mix(in srgb, var(--dhi-gate-canvas) 48%, var(--dhi-gate-surface));
}

.dhi-access-level[data-current="true"] {
  border-color: color-mix(in srgb, var(--dhi-gate-brand) 38%, var(--dhi-gate-line));
  background: var(--dhi-gate-brand-soft);
}

.dhi-access-level small,
.dhi-access-tech__item small {
  display: block;
  color: var(--dhi-gate-brand);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
}

.dhi-access-level b,
.dhi-access-tech__item b {
  display: block;
  margin-top: 4px;
  color: var(--dhi-gate-ink);
  font-size: 12px;
}

.dhi-access-level p,
.dhi-access-tech__item p {
  margin: 5px 0 0;
  color: var(--dhi-gate-sub);
  font-size: 10.5px;
  line-height: 1.55;
}

.dhi-access-flow {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dhi-access-step;
}

.dhi-access-flow li {
  position: relative;
  min-height: 31px;
  padding: 7px 8px 7px 38px;
  color: var(--dhi-gate-sub);
  font-size: 11.5px;
  line-height: 1.5;
  counter-increment: dhi-access-step;
}

.dhi-access-flow li::before {
  content: counter(dhi-access-step);
  position: absolute;
  top: 5px;
  left: 0;
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--dhi-gate-brand-soft);
  color: var(--dhi-gate-brand);
  font-size: 10.5px;
  font-weight: 850;
}

.dhi-access-modal__notice {
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--dhi-gate-warning) 23%, var(--dhi-gate-line-soft));
  border-radius: 12px;
  background: color-mix(in srgb, var(--dhi-gate-warning) 8%, var(--dhi-gate-surface));
  color: var(--dhi-gate-sub);
  font-size: 10.5px;
  line-height: 1.6;
}

.dhi-access-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--dhi-gate-line-soft);
  background: var(--dhi-gate-surface);
}

.dhi-access-modal__foot small {
  color: var(--dhi-gate-sub);
  font-size: 10px;
  line-height: 1.45;
}

.dhi-access-modal__foot .dhi-access-modal__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: 0;
}

.dhi-device-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.dhi-device-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--dhi-gate-line-soft);
  border-radius: 12px;
  background: var(--dhi-gate-surface);
}

.dhi-device-list article.is-empty {
  border-style: dashed;
}

.dhi-device-list article > span {
  color: var(--dhi-gate-brand);
  font-size: 20px;
  font-weight: 850;
}

.dhi-device-list .dhi-device-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green, #138765);
}

.dhi-device-list b {
  display: block;
  color: var(--dhi-gate-ink);
  font-size: 12px;
}

.dhi-device-list p {
  margin: 3px 0 0;
  color: var(--dhi-gate-sub);
  font-size: 10.5px;
}

.dhi-device-list em {
  color: var(--green, #138765);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dhi-block-lock { background: rgb(250 252 251 / 94%); }
  .dhi-block-lock--photo { background: rgb(4 63 50 / 86%); }
}

@media (max-width: 767px) {
  .dhi-block-lock { padding: 10px; }

  .dhi-block-lock__card {
    padding: 14px;
    border-radius: 15px;
  }

  .dhi-block-lock__features { display: none; }

  .dhi-block-lock__actions .dhi-access-button { flex: 1 1 150px; }

  .dhi-lock-ghost__row {
    grid-template-columns: 28px minmax(82px, 1fr) repeat(2, minmax(42px, .7fr));
    gap: 7px;
    padding-inline: 6px;
  }

  .dhi-lock-ghost__row > :nth-child(n + 5) { display: none; }

  .dhi-access-modal {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .dhi-access-modal__head,
  .dhi-access-modal__body,
  .dhi-access-modal__foot {
    padding-inline: 14px;
  }

  .dhi-access-modal__body { max-height: calc(100dvh - 176px); }

  .dhi-access-levels,
  .dhi-access-tech {
    grid-template-columns: 1fr;
  }

  .dhi-access-modal__status,
  .dhi-access-modal__foot {
    align-items: stretch;
    flex-direction: column;
  }

  .dhi-access-modal__foot .dhi-access-modal__actions,
  .dhi-access-modal__foot .dhi-access-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .dhi-block-lock__body {
    font-size: 11.5px;
    line-height: 1.55;
  }

  .dhi-block-lock--compact .dhi-block-lock__card {
    gap: 8px;
    padding: 8px 9px;
  }

  .dhi-block-lock--compact .dhi-access-button {
    min-height: 36px;
    padding-inline: 9px;
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dhi-lock-ghost__line::after,
  .dhi-lock-ghost__cell::after {
    animation: none;
  }

  .dhi-access-button { transition: none; }
}
