.web-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.web-topbar,
.web-nav,
.web-main,
.web-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.web-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 8px;
}

.web-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.web-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.web-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 16px;
}

.web-nav a {
  color: var(--text, var(--ns-text));
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(19, 34, 42, 0.12));
  background: rgba(255, 255, 255, 0.72);
}

.web-main {
  padding-bottom: 32px;
}

.web-main .hero-panel {
  display: block;
  margin-bottom: 24px;
}

.web-main .hero-panel h2 {
  margin: 8px 0 12px;
}

.web-topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.web-link-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.web-link-list > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ns-text);
  font-weight: 600;
  text-decoration: none;
}

.web-link-list a {
  color: var(--ns-primary-text);
  font-weight: 600;
}

.web-link-list a:hover,
.web-footer a:hover {
  text-decoration: underline;
}

.web-footer {
  padding: 24px 0 40px;
}

.web-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.web-main .hero-panel > .web-action-row {
  display: flex;
  max-width: none;
}

.web-form h3 {
  margin: 24px 0 14px;
}

.web-form label {
  max-width: none;
}

.web-nav a[aria-current="page"] {
  background: var(--surface-accent);
  border-color: var(--surface-accent);
  color: white;
}

.web-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.web-checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
}

.web-list-item,
.web-link-list li {
  padding: 12px 14px;
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  background: var(--ns-surface);
}

.web-main .web-list-item h3 {
  margin: 4px 0 10px;
}

.web-main .web-list-item p {
  margin: 8px 0 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.web-main [data-web-contact-list] li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft, rgba(19, 34, 42, 0.06));
}

.web-main [data-web-contact-list] p {
  margin: 6px 0 12px;
}

.web-session-note {
  font-size: 0.85rem;
  color: var(--muted, var(--ns-text-muted));
}

.web-sos-gate {
  border-left: 4px solid var(--primary, var(--ns-primary));
}

.web-auth-layout {
  min-height: 100vh;
}

.web-auth-layout-single {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}

.web-auth-layout .login-card p {
  color: var(--muted, var(--ns-text-muted));
  overflow-wrap: anywhere;
}

.web-auth-layout .login-card a {
  color: var(--ns-primary-text);
}

.web-auth-layout .btn-outline-secondary {
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--line, var(--ns-text-muted));
  border-radius: 6px;
  background: var(--surface, var(--ns-text-inverse));
  color: var(--text, var(--ns-text));
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.web-auth-layout button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.web-auth-layout [hidden] {
  display: none !important;
}

.web-auth-layout button:focus-visible,
.web-auth-layout a:focus-visible {
  outline: 3px solid var(--ns-primary);
  outline-offset: 3px;
}

.web-intake-page .panel-card + .panel-card {
  margin-top: 24px;
}

.web-intake-page [data-web-intake-detail] h3 {
  margin: 28px 0 14px;
}

.web-intake-page [data-web-intake-detail] > h3:first-child {
  margin-top: 16px;
}

.web-intake-page dl {
  margin: 18px 0 0;
}

.web-intake-page dt {
  color: var(--muted, var(--ns-text-muted));
  font-weight: 700;
  line-height: 1.5;
}

.web-intake-page dd {
  margin: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.web-intake-page .web-intake-metadata {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  gap: 12px 24px;
}

.web-intake-page .web-intake-answers dt {
  margin-bottom: 6px;
}

.web-intake-page .web-intake-answers dd {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft, rgba(19, 34, 42, 0.06));
}

.web-intake-page .web-intake-answers dd:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.web-intake-page [data-web-evidence-list] {
  padding-inline-start: 20px;
  margin-top: 18px;
}

.web-intake-page [data-web-evidence-list] li {
  padding: 6px 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Case timeline and note lists (customer case pages and advocate desk). */
.web-main .web-timeline li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft, rgba(19, 34, 42, 0.06));
  line-height: 1.6;
}

.web-main .web-timeline {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.web-main .web-note-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft, rgba(19, 34, 42, 0.06));
  overflow-wrap: anywhere;
}

.web-main .web-note-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

/* Customer web home readiness strip. */
.web-readiness {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.web-readiness li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft, rgba(19, 34, 42, 0.06));
}

.web-readiness .web-readiness-ok {
  color: var(--good, var(--ns-success));
  font-weight: 700;
}

.web-readiness .web-readiness-attention {
  color: var(--warn, var(--ns-warning));
  font-weight: 700;
}

@media (max-width: 600px) {
  .web-intake-page .panel-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .web-intake-page .web-intake-metadata {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .web-intake-page .web-intake-metadata dd {
    margin-bottom: 12px;
  }

  .web-intake-page :is(.btn, .primary-button, .secondary-button) {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .web-intake-page input[type="file"] {
    inline-size: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .web-intake-page :is(.mpx-upload-field, .mpx-upload-field__shell, .field-stack) {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .web-topbar {
    align-items: flex-start;
  }

  .web-topbar-meta {
    flex-direction: column-reverse;
    align-items: flex-end;
    max-width: 48%;
    text-align: end;
  }

  .web-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .web-nav a {
    flex-shrink: 0;
  }
}

/* Recorded browser calls: single customer camera or native front/rear remote tiles. */
.web-live-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; margin: 1rem 0; }
.web-live-remote { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; min-width: 0; }
.web-live-tile { min-width: 0; background: var(--ns-surface-inverse); color: var(--ns-text-inverse); border-radius: .75rem; overflow: hidden; }
.web-live-video { position: relative; width: 100%; min-height: 180px; aspect-ratio: 16 / 9; background: var(--ns-surface-inverse); }
.web-live-label { padding: .5rem .75rem; margin: 0; }
.web-live-consent { padding: .8rem 1rem; border: 2px solid var(--ns-warning); border-radius: .5rem; background: var(--ns-warning-soft); color: var(--ns-warning); font-weight: 600; }
@media (max-width: 640px) { .web-live-grid { grid-template-columns: 1fr; } }

.web-live-chat summary { cursor: pointer; }
.web-live-chat-list { max-height: 14rem; overflow-y: auto; overflow-wrap: anywhere; }

/* Keep Leave and the current recording status visible while reading call chat or case details. */
.web-live-toolbar:not([hidden]) { position: static; z-index: 900; inset: auto 0 0; margin: 0; padding: .75rem max(1rem, env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); background: var(--ns-surface); color: var(--ns-text); border-top: 2px solid var(--ns-warning); box-shadow: 0 -4px 18px rgb(var(--ink-rgb) / .13); display: flex; justify-content: center; align-items: center; gap: .5rem; flex-wrap: wrap; }
.web-live-toolbar-status { flex-basis: 100%; margin: 0; text-align: center; font-weight: 600; }
/* Without a measured height the toolbar stays in normal flow, so it cannot obscure page content. */
.web-call-page.web-call-toolbar-measured .web-live-toolbar:not([hidden]) { position: fixed; }
.web-call-page.web-call-toolbar-measured { padding-bottom: calc(var(--web-call-toolbar-height, 0px) + 1rem); }
@media (max-width: 640px) { .web-live-toolbar .btn { min-height: 44px; } }

/* Namma consumer shell: one navigation row and a compact account menu. */
.web-app { display:block; background:var(--ns-bg); }
.web-topbar.ns-consumer-topbar { width:100%; height:64px; align-items:center; padding:0 max(24px,calc((100% - 1200px)/2)); gap:20px; margin:0; position:sticky; top:0; z-index:20; background:var(--ns-surface); border-bottom:1px solid var(--ns-border); }
.ns-consumer-topbar .web-brand { flex-shrink:0; gap:10px; }
.ns-consumer-topbar .web-brand-logo { width:30px; height:36px; }
.ns-consumer-topbar .web-brand strong { font-size:0.9375rem; font-weight:600; }
.ns-consumer-topbar .web-brand .eyebrow { font-size:0.75rem; letter-spacing:.06em; }
.ns-consumer-topbar .web-nav { width:auto; padding:0; margin:0; gap:2px; flex:1; justify-content:center; flex-wrap:nowrap; }
.ns-consumer-topbar .web-nav a { border:0; border-radius:6px; background:none; padding:8px 10px; min-height:44px; display:flex; align-items:center; font-size:0.8125rem; font-weight:500; white-space:nowrap; color:var(--ns-text-secondary); }
.ns-consumer-topbar .web-nav a[aria-current=page] { background:var(--ns-primary-soft); color:var(--ns-primary-text); }
.ns-consumer-topbar .web-topbar-meta { gap:12px; flex-shrink:0; flex-direction:row; align-items:center; max-width:none; }
.ns-account-menu { position:relative; }
.ns-account-menu > summary { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--ns-iris-50); color:var(--ns-primary); cursor:pointer; list-style:none; }
.ns-account-menu > summary::-webkit-details-marker { display:none; }
.ns-account-panel { position:absolute; right:0; top:46px; width:280px; padding:8px; background:var(--ns-surface); border:1px solid var(--ns-border); border-radius:10px; box-shadow:var(--ns-shadow-lg); z-index:30; }
.ns-account-panel > a { display:flex; align-items:center; min-height:44px; padding:10px 12px; font-size:0.875rem; border-radius:6px; color:var(--ns-text); }
.ns-account-panel > a:hover { background:var(--ns-primary-soft); }
.ns-account-panel .web-session-note { display:block; font-size:0.75rem; color:var(--ns-text-muted); padding:12px; border-top:1px solid var(--ns-border); margin-top:8px; }
body .ns-mobile-menu-toggle { display:none; }
.web-main { width:min(var(--ns-consumer-max),calc(100% - 48px)); margin:auto; padding-top:28px; }
.web-footer { width:min(var(--ns-consumer-max),calc(100% - 48px)); color:var(--ns-text-muted); font-size:0.75rem; line-height:1.25rem; border-top:1px solid var(--ns-border); margin-top:32px; }
.ns-active-sos { display:flex; align-items:center; justify-content:center; gap:16px; padding:10px 24px; background:var(--ns-sos-50); color:var(--ns-danger); border-bottom:1px solid var(--ns-sos-200); }
@media(max-width:1023px) {
 .web-topbar.ns-consumer-topbar { padding:0 20px; gap:12px; }
 .ns-consumer-topbar .web-brand .eyebrow { display:none; }
 .ns-consumer-topbar .web-nav a { padding:8px 6px; font-size:0.75rem; }
}
@media(max-width:767px) {
 .web-topbar.ns-consumer-topbar { padding:0 16px; gap:10px; }
 .ns-consumer-topbar .web-brand { margin-right:auto; }
 .ns-consumer-topbar .web-brand strong { font-size:0.8125rem; }
 body .ns-mobile-menu-toggle { display:inline-flex; padding:6px; min-width:44px; min-height:44px; }
 .ns-consumer-topbar .web-nav { display:none; position:fixed; bottom:0; inset-inline:0; padding:24px 20px max(28px,env(safe-area-inset-bottom)); background:var(--ns-surface); border-top:1px solid var(--ns-border); border-radius:20px 20px 0 0; box-shadow:var(--ns-shadow-lg); z-index:25; flex-direction:column; }
 .ns-consumer-topbar .web-nav.is-open { display:flex; }
 .ns-consumer-topbar .web-nav a { padding:14px; font-size:1rem; }
 .ns-consumer-topbar .web-topbar-meta { gap:10px; }
 .web-main,.web-footer { width:calc(100% - 32px); }
 .ns-account-panel { width:min(280px,calc(100vw - 32px)); }
}
.web-header .ns-nav-actions { display:flex; align-items:center; gap:12px; }
.ns-nav-bell { position:relative; color:var(--ns-text-secondary); display:grid; place-items:center; width:44px; height:44px; }
.ns-nav-bell [data-nav-unread]:not([hidden]) { position:absolute; inset-block-start:0; inset-inline-end:0; min-width:16px; border-radius:8px; background:var(--ns-primary); color:white; font-size:0.75rem; text-align:center; }
.web-footer.ns-compact-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-block:20px; font-size:0.75rem; }
.ns-compact-footer nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ns-compact-footer nav a { display:flex; align-items:center; justify-content:center; min-inline-size:44px; min-height:44px; padding-inline:4px; }
.ns-compact-footer details { position:relative; }
.ns-compact-footer summary { cursor:pointer; }
.ns-footer-detail { position:absolute; inset-block-end:30px; inset-inline-end:0; width:280px; max-width:calc(100vw - 32px); padding:16px; background:var(--ns-surface); border:1px solid var(--ns-border); border-radius:8px; box-shadow:var(--ns-shadow-lg); z-index:25; }
.ns-footer-detail p { margin-block:0 8px; }
@media(max-width:767px) {
 .web-footer.ns-compact-footer { align-items:flex-start; flex-direction:column; }
 .ns-compact-footer details { max-width:100%; }
 .ns-footer-detail { inset-inline-start:0; inset-inline-end:auto; width:min(280px,calc(100vw - 32px)); }
}

.web-main .ns-sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
.web-main .ns-customer-home .web-readiness, .ns-customer-home .web-readiness { gap:0; }
.ns-readiness-item summary { min-height:22px; line-height:1.125rem; }

/* Keep Agora's existing elements mounted while swapping presentation slots. */
.web-live-grid.ns-video-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(68vh, 680px); gap: .5rem; }
.ns-video-grid .web-live-remote { display: contents; }
.ns-video-grid .web-live-tile { position: relative; cursor: pointer; min-width: 48px; min-height: 48px; }
.ns-video-grid .web-live-tile:focus-visible { outline: 3px solid var(--ns-primary); outline-offset: 2px; }
.ns-video-grid .web-live-video { height: 100%; aspect-ratio: auto; min-height: 0; }
.ns-video-grid .web-live-label { position: absolute; bottom: .25rem; inset-inline-start: .25rem; background: #0009; border-radius: .25rem; font-size: .8rem; }
.ns-video-grid [data-video-slot="0"] { grid-column: 1 / -1; grid-row: 1; }
.ns-video-grid[data-remote-count="2"] [data-video-slot="0"] { grid-column: 1; }
.ns-video-grid[data-remote-count="2"] [data-video-slot="1"] { grid-column: 2; grid-row: 1; }
.ns-video-grid[data-remote-count="1"] [data-video-slot="1"], .ns-video-grid [data-video-slot="2"] { position: absolute; top: .6rem; inset-inline-end: .6rem; width: 24%; height: 26%; z-index: 2; border: 1px solid #ffffff99; }
@media (max-width: 640px) {
  .web-live-grid.ns-video-grid[data-remote-count="2"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; }
  .ns-video-grid[data-remote-count="2"] [data-video-slot="1"] { grid-column: 1; grid-row: 2; }
}
