
/* Lentara Portal v0.76e CSS-only mobile cleanup
   Safety rule: presentation only. No JS. No behavior changes. */

@media (max-width: 768px) {
  /* trust shelf: lighter, glossier, but keep existing structure */ .topShelf, .sessionShelf, .securityShelf {
    background: rgba(7, 14, 30, 0.38) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-color: rgba(130, 170, 225, 0.14) !important;
  }

  /* smaller pills/badges without changing layout logic */
  .tag, .pill, .softTag, .badge, .miniPill {
    min-height: 0 !important;
    padding: 6px 11px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    border-radius: 999px !important;
  }

  /* public-facing cleanup: hide obviously internal/operator text blocks only */
  .modeSwitch, .mode-switch, .operatorOnly, .operator-only, .internalOnly, .internal-only,
  [data-role="mode-switch"],
  [data-role="operator-only"],
  [data-role="internal-only"] {
    display: none !important;
  }

  /* common copy cards that were called out as unnecessary */
  .compressionFirst, .compression-first,
  .neverTrapped, .never-trapped,
  .signatureAnchor, .signature-anchor {
    display: none !important;
  }

  /* safer generic spacing cleanup */
  .card, .panel, .section, .module {
    overflow: hidden;
  }

  .card h2, .card h3, .card h4,
  .panel h2, .panel h3, .panel h4 {
    margin-bottom: 8px !important;
    line-height: 1.08 !important;
  }

  .card p, .panel p, .section p, .module p,
  .card small, .panel small, .section small, .module small {
    line-height: 1.35 !important;
  }

  /* mobile hero/lens: smaller, calmer, but do not alter behavior */
  .lensShell, .heroLens, .portalLens, .lensCircle {
    width: min(210px, 58vw) !important;
    height: min(210px, 58vw) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* if swirl/animation already exists, let it show a bit more */
  .lensSwirl, .lensGlow, .lensGlimmer {
    opacity: 0.92 !important;
  }

  /* session-at-a-glance / session seal readability only */
  .securityTimeline .timelineRow,
  .sessionGrid .timelineRow,
  .sessionMini .timelineRow {
    display: block !important;
    margin-bottom: 12px !important;
  }

  .securityTimeline .timelineRow > *,
  .sessionGrid .timelineRow > *,
  .sessionMini .timelineRow > * {
    display: block !important;
    margin-bottom: 6px !important;
    min-width: 0 !important;
  }

  /* preview area: visual cleanup only */
  .previewCard .toolbar,
  .docPreview .toolbar,
  .viewerWrap .toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .previewCard .toolbar > *,
  .docPreview .toolbar > *,
  .viewerWrap .toolbar > * {
    width: 100% !important;
  }

  /* final review/sign visual stacking only */
  .affirmLauncher,
  .finalReviewCard,
  .signatureCard {
    display: block !important;
  }

  .affirmLauncher .actions,
  .finalReviewCard .actions,
  .signatureCard .actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .affirmLauncher .actions > *,
  .finalReviewCard .actions > *,
  .signatureCard .actions > * {
    width: 100% !important;
  }

  /* modal sizing only; keep behavior intact */
  .spotlightScrim, .modalScrim, .overlayScrim {
    padding: calc(env(safe-area-inset-top) + 10px) 12px 16px !important;
    overflow-y: auto !important;
    align-items: flex-start !important;
  }

  .spotlightPanel, .modalPanel, .overlayPanel {
    width: min(620px, 100%) !important;
    max-height: calc(100dvh - 28px) !important;
    overflow: auto !important;
    border-radius: 24px !important;
  }

  /* root dark background to prevent white flash */
  html, body, .wrap, .app, .portalRoot {
    background: #050816 !important;
  }
}

/* v0.76f2 cleanup */
@media (max-width: 768px) {
  .securityGrid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .securityStat strong,
  .securityTimeline strong{
    display:block;
    margin-bottom:6px !important;
    line-height:1.08 !important;
  }

  .securityStat .mini,
  .securityTimeline small{
    display:block;
    line-height:1.32 !important;
    margin-top:0 !important;
  }

  .securityStat .tag,
  .securityTimeline .tag{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    width:auto !important;
    max-width:max-content !important;
    margin-top:8px !important;
    padding:6px 12px !important;
  }

  .securityTimeline .timelineRow{
    padding-bottom:6px;
    border-bottom:1px solid rgba(120,150,210,.08);
  }
  .securityTimeline .timelineRow:last-child{
    border-bottom:none;
    padding-bottom:0;
  }

  .affirmLauncher .dock{
    gap:8px !important;
  }
  .affirmLauncher .dock .softTag{
    width:auto !important;
    max-width:max-content !important;
  }

  .sectionHead .mini{
    line-height:1.25 !important;
  }
}


/* v0.76f3 targeted polish */
@media (max-width: 768px) {
  /* Verification tab should visibly warn when attention is needed */
  .chipBtn.needsInput,
  [data-pane="pane-verify"].needsInput {
    border-color: rgba(255, 191, 103, 0.72) !important;
    background: linear-gradient(180deg, rgba(74, 52, 18, 0.62), rgba(34, 23, 10, 0.78)) !important;
    box-shadow:
      0 0 0 1px rgba(255,191,103,.22),
      0 0 22px rgba(255,191,103,.10);
    color: #ffe3b2 !important;
  }

  /* Signed state at bottom should feel done / available */
  .affirmLauncher.signedState {
    border-color: rgba(96,227,176,.34) !important;
    box-shadow:
      0 0 0 1px rgba(96,227,176,.12),
      0 0 26px rgba(96,227,176,.08);
    background:
      radial-gradient(circle at 100% 0, rgba(96,227,176,.08), transparent 34%),
      linear-gradient(180deg, rgba(8,18,30,.92), rgba(6,13,25,.98)) !important;
  }
  .affirmLauncher.signedState strong,
  .affirmLauncher.signedState h3 {
    color: #dffcf0 !important;
  }

  /* Preview placeholder cleaner + less "internal doc" */
  .viewerPlaceholder .ghost {
    max-width: 420px !important;
    gap: 10px !important;
  }
  .viewerPlaceholder h4 {
    font-size: 20px !important;
    line-height: 1.08 !important;
    margin-bottom: 4px !important;
  }
  .viewerPlaceholder p {
    font-size: 14px !important;
    line-height: 1.45 !important;
    max-width: 26ch;
    margin: 0 auto !important;
  }
}


/* v0.76f4 cleanup */
.pillbar{display:none !important;}

@media (max-width: 768px) {
  /* top shelf / toolbar feel more centered and stable */
  .stepLine{
    justify-content:center !important;
    padding-top:4px !important;
  }

  /* SessionSeal spacing normalization */
  .securityGrid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .securityStat{
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
  }
  .securityStat strong{
    display:block;
    margin:0 !important;
    line-height:1.08 !important;
  }
  .securityStat .mini{
    display:block;
    margin:0 !important;
    line-height:1.32 !important;
  }
  .securityStat .tag{
    display:inline-flex !important;
    justify-content:center;
    align-items:center;
    width:max-content !important;
    max-width:max-content !important;
    margin-top:2px !important;
  }

  .securityTimeline .timelineRow{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:8px !important;
    padding-bottom:12px !important;
    margin-bottom:12px !important;
    border-bottom:1px solid rgba(120,150,210,.08);
  }
  .securityTimeline .timelineRow:last-child{
    border-bottom:none;
    margin-bottom:0;
    padding-bottom:0;
  }
  .securityTimeline .timelineRow strong{
    display:block;
    margin:0 0 4px 0 !important;
    line-height:1.08 !important;
  }
  .securityTimeline .timelineRow small{
    display:block;
    line-height:1.32 !important;
    margin:0 !important;
  }
  .securityTimeline .timelineRow .tag{
    width:max-content !important;
    max-width:max-content !important;
    margin-top:0 !important;
  }

  /* if there is no real preview loaded, don't reserve a giant black stage */
  .previewCard.collapsed .viewer{
    display:none !important;
  }
  .viewer #pdfFrame.hidden + .viewerPlaceholder{display:grid;}
  .viewerPlaceholder{
    min-height:220px !important;
  }
}


/* v0.76f5 cleanup */
@media (max-width: 768px) {
  /* Hide empty preview stage when collapsed/signed */
  .viewer.signedCollapsed,
  .previewCard.collapsed .viewer {
    display: none !important;
  }
  .previewCard.collapsed {
    padding-bottom: 14px !important;
  }

  /* Keep only one clear document action feeling */
  #openPreview {
    margin-top: 2px;
  }

  /* Review/sign card cleanup and alignment */
  .affirmLauncher .actions,
  .finalReviewCard .actions {
    align-items: center !important;
  }
  .affirmLauncher .actions > button,
  .affirmLauncher .actions > a,
  .finalReviewCard .actions > button,
  .finalReviewCard .actions > a {
    width: 100% !important;
    max-width: 520px;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .affirmLauncher .dock {
    justify-content: center !important;
  }

  /* Signed card should be the obvious completion zone */
  .affirmLauncher.signedState {
    position: relative;
  }
  .affirmLauncher.signedState::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(120% 90% at 50% 0%, rgba(96,227,176,.08), transparent 42%);
  }

  /* Tone down orb bleed behind top shelf */
  .heroCard::before,
  .heroCard::after,
  .lensGlow,
  .lensSwirl {
    opacity: .45 !important;
  }
  .topShelf,
  .sessionShelf,
  .securityShelf {
    position: relative;
    z-index: 3;
  }
  .heroCard {
    overflow: hidden !important;
  }

  /* Session seal/review clutter cleanup */
  .docbossStampPreview,
  .auditSnapshot {
    display: none !important;
  }

  /* Fewer duplicate audit actions visually */
  #downloadAuditMain {
    display: none !important;
  }
}


/* v0.76f6 exact cleanup */
.pillbar{display:none !important;}

@media (max-width: 768px) {
  /* Remove duplicate tech/download controls in chamber */
  #downloadSessionSeal,
  #downloadAudit,
  #modalAuditCard {
    display:none !important;
  }

  /* Center modal bar buttons cleanly */
  .modalBar{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    align-items:center !important;
  }
  .modalActions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    width:100% !important;
  }
  .modalActions > button,
  .modalBar > button,
  #closeAffirmation{
    width:100% !important;
    max-width:none !important;
    margin:0 auto !important;
  }

  /* If review is incomplete, don't tease "continue to signature" */
  #openAffirmation.ctaBlocked{
    display:none !important;
  }
  #jumpToCourtroom{
    width:100% !important;
  }
  #jumpToCourtroom:not(.hidden){
    display:block !important;
  }

  /* Center primary/secondary controls in key cards */
  .actions, .signActions, .presenceRow{
    justify-content:center !important;
  }
  .actions > *, .signActions > *, .presenceRow > *{
    margin-left:auto !important;
    margin-right:auto !important;
  }

  /* Signed state button should feel conclusive but compact */
  #openAffirmation.isSignedState{
    width:auto !important;
    min-width:120px;
    max-width:max-content !important;
    align-self:flex-start !important;
  }

  /* DocBoss review strip fits instead of clipping */
  .chamberBoss{
    display:flex !important;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    overflow:hidden;
  }
  .chamberBoss span:last-child{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    display:block;
  }

  /* Tighter modal sign card copy */
  .presenceBanner p,
  .lockHint,
  .modalNote{
    line-height:1.35 !important;
  }
}

/* v0.77 mobile signer lane finish pass */
@media (max-width: 768px) {
  /* Floating visor treatment for the mobile trust shelf and step rail */
  .stepLine span{
    pointer-events: auto !important;
  }
  .stepLine{
    touch-action: pan-y !important;
  }
  .stepLine.repin{
    transform: translateZ(0);
  }
  .stepLine{
    position: sticky !important;
    top: calc(env(safe-area-inset-top) + 108px) !important;
    z-index: 139 !important;
    margin: 0 0 14px !important;
    padding: 8px 10px !important;
    border-radius: 16px !important;
    background: rgba(7,14,30,.30) !important;
    border: 1px solid rgba(130,170,225,.10) !important;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  .stepLine span{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    white-space: nowrap;
  }
  .stepLine span.is-needs-input{
    color: #ffe5bb !important;
    border-color: rgba(255,191,103,.62) !important;
    background: linear-gradient(180deg, rgba(86,58,18,.56), rgba(36,24,10,.82)) !important;
    box-shadow: 0 0 0 1px rgba(255,191,103,.18), 0 0 18px rgba(255,191,103,.10) !important;
  }
  .stepLine span.is-signed,
  .stepLine.signed span:last-child{
    color: #dffcf0 !important;
    border-color: rgba(96,227,176,.34) !important;
    background: linear-gradient(180deg, rgba(96,227,176,.12), rgba(8,18,30,.76)) !important;
    box-shadow: 0 0 0 1px rgba(96,227,176,.12), 0 0 18px rgba(96,227,176,.08) !important;
  }

  /* Public-facing copy cleanup */
  .title p,
  .viewerPlaceholder .ghost p,
  .courtPanel p,
  .spotlightPanel p,
  .presenceBanner p,
  .modalNote,
  .lockHint,
  .sectionHead .mini{
    max-width: none !important;
  }

  /* Buttons are buttons, pills are pills */
  .actions,
  .signActions,
  .presenceRow,
  .modalActions,
  .spotlightActions{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .actions > button,
  .actions > a,
  .signActions > button,
  .signActions > a,
  .presenceRow > button,
  .presenceRow > a,
  .modalActions > button,
  .modalActions > a,
  .spotlightActions > button,
  .spotlightActions > a,
  #closeAffirmation{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .actions > .softTag,
  .signActions > .softTag,
  .presenceRow > .softTag,
  .spotlightActions > .softTag{
    align-self: center !important;
    width: auto !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  .previewCard .toolbar{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .previewCard .toolbar > button{
    width: 100% !important;
    margin: 0 !important;
  }

  /* SessionSeal section is calmer and tighter */
  .securityGrid{
    gap: 12px !important;
  }
  .securityStat,
  .securityTimeline .timelineRow{
    border-radius: 16px !important;
  }
  .securityTimeline .timelineRow{
    padding: 12px 0 0 !important;
  }
  .securityTimeline .timelineRow:first-child{
    padding-top: 0 !important;
  }

  /* Remove duplicate noisy JSON utilities from the signer lane */
  #downloadSessionSeal,
  #downloadAudit,
  #downloadAuditTop,
  #spotlightDownloadSealBtn{
    display: none !important;
  }

  /* Chamber cleanup */
  #stampPreview{
    display: none !important;
  }
  .chamberBoss{
    white-space: normal !important;
    overflow: visible !important;
  }
  .chamberBoss span:last-child{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  #modalPreviewCard strong,
  #modalPreviewCard .sigPreview{
    text-align: center;
  }

  /* Hero calm-down */
  .lensGlow{
    opacity: .30 !important;
    filter: blur(38px) !important;
  }
  .lensSwirl,
  .lensGlimmer{
    opacity: .34 !important;
  }
  .lensShell,
  .heroLens,
  .portalLens,
  .lensCircle{
    width: min(196px, 54vw) !important;
    height: min(196px, 54vw) !important;
  }
}

/* v0.79 mobile signer lane guided next-step pass */
.securitySummaryPill{display:none}
.securityCard .securityDetailsBody{display:block}

@media (max-width: 768px) {
  #applySignature.is-focus-next,
  #modalApply.is-focus-next{
    animation: lentaraNextPulse 1.6s ease-in-out infinite;
  }

  @keyframes lentaraNextPulse{
    0%,100%{transform:translateY(0); box-shadow:0 14px 34px rgba(0,0,0,.28), 0 0 0 1px rgba(125,229,255,.16), 0 0 18px rgba(125,229,255,.10)}
    50%{transform:translateY(-1px); box-shadow:0 18px 42px rgba(0,0,0,.32), 0 0 0 1px rgba(125,229,255,.22), 0 0 26px rgba(125,229,255,.16)}
  }

  .securityCard{
    overflow:hidden !important;
  }

  .securitySummaryPill{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    width:max-content;
    max-width:100%;
    margin:0 0 12px 0 !important;
    cursor:pointer;
    text-align:center;
  }

  .securityCard.is-collapsed .securityDetailsBody{
    display:none !important;
  }

  .securityDetailsBody{
    display:grid;
    gap:12px;
  }

  .securityCard.is-collapsed .sectionHead{
    margin-bottom:10px !important;
  }

  .courtroom,
  #modalSignCard,
  #signPadShell,
  #chamberConsentWrap{
    scroll-margin-top:132px;
  }

  .presenceBanner.compactPresence{
    padding:12px 14px !important;
    border-color:rgba(130,170,225,.18) !important;
    background:linear-gradient(180deg, rgba(11,18,34,.88), rgba(9,18,35,.82)) !important;
    box-shadow:none !important;
  }
  .presenceBanner.compactPresence p{
    display:none !important;
  }
  .presenceBanner.compactPresence .presenceRow{
    display:flex !important;
    flex-wrap:wrap;
    justify-content:flex-start !important;
    gap:8px !important;
    margin-top:6px !important;
  }
  .presenceBanner.compactPresence .presenceRow > button{
    display:none !important;
  }
  .presenceBanner.compactPresence #passkeySoftTag{
    display:none !important;
  }
  .presenceBanner.compactPresence #presenceSoftTag{
    margin:0 !important;
    width:auto !important;
    max-width:max-content !important;
  }

  .presenceBanner.requiresPresence{
    border-color:rgba(255,191,103,.48) !important;
    box-shadow:0 0 0 1px rgba(255,191,103,.14), 0 0 24px rgba(255,191,103,.09) !important;
  }

  #signPadShell{
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  }
  #signPadShell.is-focus-next{
    border-color:rgba(125,229,255,.72) !important;
    box-shadow:0 0 0 1px rgba(125,229,255,.26), 0 0 28px rgba(125,229,255,.14), 0 16px 34px rgba(0,0,0,.30) !important;
    transform:translateY(-1px);
  }

  #chamberConsentWrap{
    margin-top:12px !important;
  }
  #chamberConsentWrap.is-focus-next{
    border-color:rgba(255,191,103,.68) !important;
    background:linear-gradient(180deg, rgba(255,191,103,.10), rgba(11,21,40,.96)) !important;
    box-shadow:0 0 0 1px rgba(255,191,103,.18), 0 0 22px rgba(255,191,103,.10) !important;
  }

  #verifyPresenceBtn.is-focus-next,
  #openAffirmation.is-focus-next,
  #jumpToSign.is-focus-next,
  #jumpToCourtroom.is-focus-next,
  .chipBtn.is-focus-next{
    border-color:rgba(125,229,255,.54) !important;
    box-shadow:0 0 0 1px rgba(125,229,255,.16), 0 0 22px rgba(125,229,255,.10) !important;
  }

  .nextStepBar.is-focus-next{
    box-shadow:0 0 0 1px rgba(125,229,255,.14), 0 0 22px rgba(125,229,255,.10) !important;
  }

  .spotlightScrim{
    padding:calc(env(safe-area-inset-top) + 18px) 18px 24px !important;
    background:rgba(2,8,18,.52) !important;
  }

  .spotlightPanel{
    width:min(560px, calc(100vw - 36px)) !important;
    max-height:calc(100dvh - 72px) !important;
    background:linear-gradient(180deg, rgba(9,18,35,.88), rgba(7,15,29,.82)) !important;
    box-shadow:0 18px 54px rgba(0,0,0,.40), 0 0 28px rgba(255,207,106,.08) !important;
  }

  .spotlightPanel p,
  .spotlightList small{
    line-height:1.42 !important;
  }

  #downloadSignedMain{
    width:100% !important;
    max-width:none !important;
  }

  .affirmLauncher.signedState #downloadSignedMain{
    background:linear-gradient(90deg, rgba(96,227,176,.96), rgba(125,229,255,.88)) !important;
    color:#05111f !important;
    border:none !important;
    box-shadow:0 14px 32px rgba(0,0,0,.26), 0 0 0 1px rgba(96,227,176,.16) !important;
  }

  .signGrid{
    gap:14px !important;
  }

  .presenceBanner strong{
    line-height:1.1 !important;
  }
}


/* v0.80 guided next-step glow + preview fixes */
@keyframes lentaraNextPulseViolet{
  0%,100%{
    transform:translateY(0);
    box-shadow:
      0 16px 36px rgba(0,0,0,.28),
      0 0 0 1px rgba(160,139,255,.24),
      0 0 0 6px rgba(160,139,255,.08),
      0 0 28px rgba(160,139,255,.16),
      0 0 44px rgba(125,229,255,.08);
  }
  50%{
    transform:translateY(-1px);
    box-shadow:
      0 20px 44px rgba(0,0,0,.32),
      0 0 0 1px rgba(160,139,255,.34),
      0 0 0 8px rgba(160,139,255,.12),
      0 0 34px rgba(160,139,255,.22),
      0 0 52px rgba(125,229,255,.10);
  }
}
#openAffirmation.is-focus-next,
#jumpToSign.is-focus-next,
#jumpToCourtroom.is-focus-next,
#verifyPresenceBtn.is-focus-next,
#applySignature.is-focus-next,
#modalApply.is-focus-next,
.chipBtn.is-focus-next{
  position:relative;
  border-color:rgba(160,139,255,.68) !important;
  box-shadow:
    0 16px 36px rgba(0,0,0,.28),
    0 0 0 1px rgba(160,139,255,.24),
    0 0 0 6px rgba(160,139,255,.08),
    0 0 28px rgba(160,139,255,.16),
    0 0 44px rgba(125,229,255,.08) !important;
  animation:lentaraNextPulseViolet 1.8s ease-in-out infinite;
}
#openAffirmation.is-focus-next::after,
#jumpToSign.is-focus-next::after,
#jumpToCourtroom.is-focus-next::after,
#verifyPresenceBtn.is-focus-next::after,
#applySignature.is-focus-next::after,
#modalApply.is-focus-next::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  background:radial-gradient(120% 120% at 0% 0%, rgba(160,139,255,.18), transparent 42%), radial-gradient(120% 120% at 100% 100%, rgba(125,229,255,.10), transparent 36%);
  opacity:.95;
}

#signPadShell.is-focus-next{
  border-color:rgba(160,139,255,.66) !important;
  box-shadow:0 0 0 1px rgba(160,139,255,.22), 0 0 28px rgba(160,139,255,.14), 0 18px 38px rgba(0,0,0,.30) !important;
}

#chamberConsentWrap.is-focus-next,
.nextStepBar.is-focus-next{
  border-color:rgba(160,139,255,.46) !important;
  box-shadow:0 0 0 1px rgba(160,139,255,.14), 0 0 22px rgba(160,139,255,.10) !important;
}

@media (prefers-reduced-motion: reduce){
  #openAffirmation.is-focus-next,
  #jumpToSign.is-focus-next,
  #jumpToCourtroom.is-focus-next,
  #verifyPresenceBtn.is-focus-next,
  #applySignature.is-focus-next,
  #modalApply.is-focus-next,
  .chipBtn.is-focus-next{
    animation:none;
    transform:none;
  }
}


/* v0.81 mobile guide tightening */
@media (max-width: 768px) {

  .heroCard .actions{
    display:none !important;
  }

  .heroCard h2{
    margin-bottom:10px;
  }
}

/* v0.82 desktop guide rail harmonization */
@media (min-width: 769px) {

  .heroCard .actions{
    display:none !important;
  }
}

/* v0.83 finishing pass */
#spotlightStatusTag{
  display:none !important;
}

.spotlightDismiss.iconDismiss{
  min-width:44px;
  min-height:44px;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  font-size:26px !important;
  line-height:1 !important;
  border:1px solid rgba(145,178,235,.18);
  background:rgba(8,14,27,.34);
  color:#eef4ff !important;
}

.spotlightActions{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  align-items:stretch !important;
}

.spotlightActions > button,
.spotlightActions > a{
  width:100% !important;
  margin:0 !important;
}



@media (min-width: 769px) {

  #downloadSessionSeal,
  #downloadAudit,
  #passkeySoftTag{
    display:none !important;
  }

  .presenceBanner.compactPresence{
    display:none !important;
  }

  .presenceBanner:not(.requiresPresence){
    margin-bottom:10px;
  }
}

/* v0.83 unhide repurposed spotlight secondary action */
#spotlightDownloadSealBtn{
  display:block !important;
}

/* v0.84 mobile trust shelf containment */


/* v0.94 compact trust rail hard width fix */



/* v0.95 rail alignment polish */



/* v0.99 staging surgical stability pass */
@media (max-width: 768px) {
  .stepLine{
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    background: transparent !important;
    border: 0 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0 2px 16px !important;
  }
  #openAffirmation,
  #jumpToSign,
  #jumpToCourtroom,
  #verifyPresenceBtn,
  #applySignature,
  #modalApply,
  .chipBtn{
    touch-action: manipulation;
  }
}

/* v1.3.51 document-first signing room */
.hero{
  display:none !important;
}

.topbar{
  margin-bottom:10px !important;
}

.topbar .brand .title{
  display:flex;
  align-items:baseline;
  gap:12px;
}

.topbar .brand .title > p{
  margin:0 !important;
  font-size:13px !important;
}

.brandTextMark{
  display:inline-flex !important;
  align-items:center !important;
  gap:9px !important;
}

.brandProduct{
  font-size:17px !important;
  letter-spacing:.01em !important;
}

.main{
  display:flex !important;
  flex-direction:column !important;
  gap:16px !important;
}

.main > .stack:last-child{
  order:-1;
}

.previewCard{
  border-color:rgba(125,229,255,.24) !important;
  box-shadow:0 26px 72px rgba(0,0,0,.27),0 0 0 1px rgba(125,229,255,.04) !important;
}

.previewCard .sectionHead h3{
  font-size:24px !important;
}

.previewCard .viewer{
  height:clamp(560px,72vh,880px) !important;
  min-height:560px !important;
  opacity:1 !important;
  border-width:1px !important;
}

.previewCard.collapsed .viewer{
  height:0 !important;
  min-height:0 !important;
  opacity:0 !important;
  border-width:0 !important;
}

.previewCard .viewer iframe{
  width:100% !important;
  height:100% !important;
}

.reviewCard .sectionHead{
  align-items:center !important;
}

.reviewCard .sectionHead > div{
  min-width:0;
}

.reviewCard.is-collapsed .courtBadge,
.reviewCard.is-collapsed .compressionRow,
.reviewCard.is-collapsed .compressionPane{
  display:none !important;
}

.reviewCard.is-collapsed .cardInner{
  padding-block:18px !important;
}

.signerHandoffCard{
  margin-top:16px;
  padding:20px 22px;
  border:1px solid rgba(71,223,151,.34);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(20,80,71,.56),rgba(26,34,62,.72));
  box-shadow:0 16px 42px rgba(0,0,0,.18);
}

.signerHandoffCard .eyebrow{
  display:block;
  color:#8ef4bc;
  margin-bottom:8px;
}

.signerHandoffCard > strong{
  display:block;
  font-family:Georgia,serif;
  font-size:24px;
  color:#fff;
}

.signerHandoffCard > p{
  margin:8px 0 0;
  color:#c9d8e8;
  line-height:1.55;
}

.securityCard.is-collapsed .securityDetailsBody,
.securityCard.is-collapsed .docbossPresence{
  display:none !important;
}

.securityCard .securitySummaryPill{
  display:inline-flex !important;
}

@media (max-width: 768px) {
  .wrap{
    padding:12px 10px 24px !important;
  }

  .topbar{
    margin-bottom:8px !important;
  }

  .topbar .brand .title{
    gap:8px !important;
  }

  .topbar .brand .title > p{
    display:none !important;
  }

  .lentaraWordmark{
    font-size:24px !important;
  }

  .brandProduct{
    font-size:15px !important;
  }
  .stepLine{
    display:none !important;
  }

  .previewCard .cardInner{
    padding:14px !important;
  }

  .previewCard .sectionHead{
    gap:4px !important;
  }

  .previewCard .sectionHead h3{
    font-size:21px !important;
  }

  .previewCard .toolbar{
    display:grid !important;
    grid-template-columns:1fr !important;
    margin:10px 0 !important;
  }

  .previewCard .toolbar > button{
    width:100% !important;
  }

  #downloadAuditTop{
    display:none !important;
  }

  .previewCard .viewer{
    height:68svh !important;
    min-height:500px !important;
    border-radius:14px !important;
  }

  .previewCard.collapsed .viewer{
    height:0 !important;
    min-height:0 !important;
  }

  .affirmLauncher{
    padding:16px !important;
    margin-top:12px !important;
  }

  .affirmLauncher .actions{
    width:100% !important;
  }

  .affirmLauncher .actions > button{
    width:100% !important;
  }

  .reviewCard .sectionHead{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:10px !important;
  }

  .reviewCard .sectionHead h3{
    font-size:20px !important;
  }

  .signerHandoffCard{
    padding:17px !important;
  }

  .signerHandoffCard > strong{
    font-size:21px !important;
  }
}


/* Signing toolbar: one source of responsive geometry, unchanged by scroll position. */
.trustShelf{position:sticky;top:max(8px,env(safe-area-inset-top));z-index:140;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:0 0 16px;border-radius:18px;background:linear-gradient(120deg,rgba(16,30,53,.93),rgba(30,23,55,.93));border:1px solid rgba(145,178,235,.24);backdrop-filter:blur(18px);box-shadow:0 12px 32px rgba(0,0,0,.22)}
.trustCluster{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.trustShelf .trustLabel,.trustActions .guideLabel{display:none}
.trustMetaCluster{margin-left:auto}
.trustMetaCluster .pill,.toolbarSessionGuide{display:inline-flex;align-items:center;min-height:34px;padding:8px 10px;border:1px solid rgba(145,178,235,.2);border-radius:12px;background:rgba(8,14,27,.62);font-size:12px;line-height:1.2}
.trustActions{display:flex;align-items:center;min-width:0}
#toolbarNextStepBtn{min-height:44px;padding:11px 16px;margin:0;font-size:14px;line-height:1.3;border-radius:12px;max-width:100%;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
.trustShelf.is-signed{border-color:rgba(96,227,176,.4)}
.documentStatus{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin:10px 0;color:#cbdcf1;background:rgba(125,229,255,.05);border:1px solid rgba(125,229,255,.15);border-radius:12px;font-size:13px;line-height:1.5}
.documentStatus[data-state="error"]{color:#ffe0ae;border-color:rgba(255,207,106,.35);background:rgba(255,207,106,.06)}
.documentOpenLink{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:44px;padding:11px 16px;font-size:14px;line-height:1.3;border-radius:12px}
.documentOpenLink[hidden],#retryDocument[hidden],#closePreview[hidden]{display:none!important}
.previewCard .toolbar{align-items:stretch}
.previewCard .toolbar>button,.previewCard .toolbar>a{min-height:44px;line-height:1.3;margin:0}
.previewCard .signerIssueBox{margin:12px 0;background:rgba(154,134,255,.045);border:1px solid rgba(154,134,255,.22);border-radius:14px}
.previewCard .signerIssueHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px}
.previewCard .signerIssueHead small{display:block;margin-top:4px;color:var(--muted);line-height:1.4}
.previewCard .signerIssueHead button{flex:0 0 auto;min-height:44px}
.previewCard .signerIssueBody{padding:0 12px 12px}
.documentOpenLink:hover{border-color:rgba(125,229,255,.5);background:rgba(125,229,255,.1)}
.documentOpenLink:focus-visible,#retryDocument:focus-visible,#toggleSignerIssue:focus-visible,#sendSignerIssue:focus-visible,#toolbarNextStepBtn:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
@media(max-width:768px){
  .trustShelf{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.65fr);gap:8px;padding:8px;top:max(6px,env(safe-area-inset-top));margin-bottom:10px;align-items:stretch}
  .trustStatusCluster,.trustMetaCluster .toolbarSessionGuide{display:none}
  .trustMetaCluster{margin:0;min-width:0;align-items:stretch}
  .trustMetaCluster .pill{width:100%;margin:0;min-height:44px!important;padding:8px!important;display:flex;justify-content:center;font-size:12px;white-space:normal;overflow-wrap:anywhere}
  #toolbarProgressPill strong{display:none}
  .trustActions{width:100%;margin:0;min-width:0;align-items:stretch}
  #toolbarNextStepBtn{width:100%;min-width:0;min-height:44px;padding:10px 12px;font-size:13px;line-height:1.25}
  .previewCard .toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .previewCard .toolbar>button,.previewCard .toolbar>a{width:100%;min-width:0;font-size:13px;padding:10px 9px;white-space:normal}
  .documentStatus{align-items:flex-start;flex-wrap:wrap}
  .previewCard .signerIssueHead{align-items:flex-start;flex-wrap:wrap}
  .previewCard .signerIssueHead button{width:100%}
  .previewCard .viewer{min-height:280px!important;height:60svh!important}
  .previewCard.collapsed .viewer{min-height:0!important;height:0!important}
  .signerIssueActions{align-items:stretch;flex-direction:column}
  .signerIssueActions>button{min-height:44px;width:100%}
}
@media(prefers-reduced-motion:reduce){.trustShelf,#toolbarNextStepBtn{transition:none;animation:none}}

.previewCard[data-document-state="error"]:not(.collapsed) .viewer{height:auto!important;min-height:160px!important}
.previewCard[data-document-state="error"] .viewerPlaceholder{position:relative;padding:20px}
