/**
 * WarStrikes Enterprise workspace v3 — surface stylesheet.
 *
 * Layered last: Tabler 1.5.1 → /assets/warstrikes-ui.css → /portal/assets/portal.css → this file.
 * Everything is scoped to .ws-surface-enterprise, which only the v3 shell puts on <body>
 * (flag WARSTRIKES_PORTAL_ENTERPRISE_V3), so the current portal is untouched.
 *
 * Design source: Figma NtqTbGCXZ4rQUhfGYbjcoF, page "22 · WarStrikes — Enterprise workspace" (68:17).
 * Tokens: docs/design/enterprise-workspace-v3/tokens.css (exported 2026-10-29). Fonts vendored locally.
 */

@font-face {
  font-family: "Geist";
  src: url("/assets/vendor/geist/1.7.2/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/vendor/geist/1.7.2/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens · Light (the only theme in phase 1; <html data-ws-theme="light">) --- */
.ws-surface-enterprise {
  --ws-ink: #0b0b0b;
  --ws-ink-raised: #171716;
  --ws-paper: #f4f3ee;
  --ws-white: #ffffff;
  --ws-stone: #eae8e1;
  --ws-rule: #d6d4cc;
  --ws-rule-strong: #b9b7ae;
  --ws-graphite: #55544f;
  --ws-muted: #6e6d66;
  --ws-mist: #a8a79f;
  --ws-lime: #d4f542;

  --ws-severity-critical: #b8323a;
  --ws-severity-high: #d9692b;
  --ws-severity-moderate: #c9a227;
  --ws-severity-low: #8a8983;

  --ws-shadow-overlay: 0 12px 32px rgba(11, 11, 11, 0.14), 0 2px 4px rgba(11, 11, 11, 0.08);
  --ws-scrim: rgba(11, 11, 11, 0.45);
  --ws-focus-ring: 0 0 0 2px var(--ws-white), 0 0 0 4px var(--ws-ink);
  --ws-focus-ring-on-ink: 0 0 0 2px var(--ws-lime);

  --ws-sidebar-width: 232px;
  --ws-topbar-height: 64px;
  --ws-content-gutter: 40px;
  --ws-control-height: 40px;
  --ws-field-height: 48px;
  --ws-chip-height: 32px;
  --ws-badge-height: 24px;

  --ws-font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ws-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Tabler mapped onto the tokens, so existing page bodies inherit the new look. */
  --tblr-body-bg: var(--ws-paper);
  --tblr-body-color: var(--ws-ink);
  --tblr-bg-surface: var(--ws-white);
  --tblr-bg-surface-secondary: var(--ws-stone);
  --tblr-border-color: var(--ws-rule);
  --tblr-border-color-translucent: var(--ws-rule);
  --tblr-font-sans-serif: var(--ws-font-sans);
  --tblr-font-monospace: var(--ws-font-mono);
  --tblr-border-radius: 0;
  --tblr-border-radius-sm: 0;
  --tblr-border-radius-lg: 0;
  --tblr-border-radius-pill: 0;
  --tblr-box-shadow: none;
  --tblr-box-shadow-card: none;
  --tblr-primary: #0b0b0b;
  --tblr-primary-rgb: 11, 11, 11;
  --tblr-primary-fg: #ffffff;
  --tblr-secondary: var(--ws-graphite);
  --tblr-link-color: var(--ws-ink);
  --tblr-link-color-rgb: 11, 11, 11;
  --tblr-link-hover-color: var(--ws-graphite);

  margin: 0;
  background: var(--ws-paper);
  color: var(--ws-ink);
  font: 400 14px/1.45 var(--ws-font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Dark theme (frame 21, handoff G8): Tellurial / System "Dark" mode. The theme lives on <body
   data-ws-theme="system|light|dark">; "system" follows prefers-color-scheme. The sidebar and the phone
   app bar are already dark and keep their light-mode tokens. Text on lime stays #0b0b0b. */
.ws-surface-enterprise[data-ws-theme="dark"] {
  --ws-ink: #ecebe5;
  --ws-ink-raised: #222220;
  --ws-paper: #0f0f0e;
  --ws-white: #181817;
  --ws-stone: #242422;
  --ws-rule: #2e2e2c;
  --ws-rule-strong: #4a4a46;
  --ws-graphite: #a8a79f;
  --ws-muted: #807f78;
  --ws-mist: #a8a79f;
  --ws-shadow-overlay: 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4);
  --ws-scrim: rgba(0, 0, 0, 0.6);
  --tblr-primary: #ecebe5;
  --tblr-primary-rgb: 236, 235, 229;
  --tblr-primary-fg: #181817;
  --tblr-link-color-rgb: 236, 235, 229;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  .ws-surface-enterprise[data-ws-theme="system"] {
    --ws-ink: #ecebe5;
    --ws-ink-raised: #222220;
    --ws-paper: #0f0f0e;
    --ws-white: #181817;
    --ws-stone: #242422;
    --ws-rule: #2e2e2c;
    --ws-rule-strong: #4a4a46;
    --ws-graphite: #a8a79f;
    --ws-muted: #807f78;
    --ws-mist: #a8a79f;
    --ws-shadow-overlay: 0 12px 32px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4);
    --ws-scrim: rgba(0, 0, 0, 0.6);
    --tblr-primary: #ecebe5;
    --tblr-primary-rgb: 236, 235, 229;
    --tblr-primary-fg: #181817;
    --tblr-link-color-rgb: 236, 235, 229;
    color-scheme: dark;
  }
}

.ws-surface-enterprise[data-ws-theme="dark"] .ws-sidebar,
.ws-surface-enterprise[data-ws-theme="dark"] .ws-appbar {
  --ws-ink: #0b0b0b;
  --ws-ink-raised: #171716;
  --ws-paper: #f4f3ee;
  --ws-white: #ffffff;
  --ws-stone: #eae8e1;
  --ws-rule: #d6d4cc;
  --ws-rule-strong: #b9b7ae;
  --ws-graphite: #55544f;
  --ws-muted: #6e6d66;
}

@media (prefers-color-scheme: dark) {
  .ws-surface-enterprise[data-ws-theme="system"] .ws-sidebar,
  .ws-surface-enterprise[data-ws-theme="system"] .ws-appbar {
    --ws-ink: #0b0b0b;
    --ws-ink-raised: #171716;
    --ws-paper: #f4f3ee;
    --ws-white: #ffffff;
    --ws-stone: #eae8e1;
    --ws-rule: #d6d4cc;
    --ws-rule-strong: #b9b7ae;
    --ws-graphite: #55544f;
    --ws-muted: #6e6d66;
  }
}

html:has(.ws-surface-enterprise) {
  scroll-padding-top: 80px; /* focused targets never hide under the sticky topbar */
}

.ws-surface-enterprise *,
.ws-surface-enterprise *::before,
.ws-surface-enterprise *::after {
  border-radius: 0;
}

.ws-surface-enterprise svg.icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
  flex: none;
}

.ws-surface-enterprise :focus-visible {
  outline: none;
  box-shadow: var(--ws-focus-ring);
}

.ws-surface-enterprise .ws-mono,
.ws-surface-enterprise code,
.ws-surface-enterprise time {
  font-family: var(--ws-font-mono);
  font-size: 12px;
}

.ws-surface-enterprise .ws-empty {
  color: var(--ws-muted);
}

.ws-surface-enterprise .ws-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--ws-ink);
  color: var(--ws-white);
}

.ws-surface-enterprise .ws-skip:focus {
  left: 8px;
}

/* --- Shell ------------------------------------------------------------------ */

.ws-surface-enterprise .ws-shell {
  display: grid;
  grid-template-columns: var(--ws-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.ws-surface-enterprise .ws-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 16px 16px;
  background: #0b0b0b;
  color: #ffffff;
}

.ws-surface-enterprise .ws-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: #ffffff;
  font: 700 18px/1 var(--ws-font-sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.ws-surface-enterprise .ws-brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.ws-surface-enterprise .ws-sidebar :focus-visible,
.ws-surface-enterprise .ws-appbar :focus-visible {
  box-shadow: var(--ws-focus-ring-on-ink);
}

/* Organisation switcher: a native <details> menu (works without JavaScript). */
.ws-surface-enterprise .ws-sidebar > .ws-brand {
  margin-bottom: 24px;
}

.ws-surface-enterprise .ws-orgswitch {
  position: relative;
  margin: 0 0 24px;
}

.ws-surface-enterprise .ws-orgswitch > summary,
.ws-surface-enterprise .ws-orgswitch-static {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #171716;
  border: 1px solid #55544f;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}

.ws-surface-enterprise .ws-orgswitch-static {
  cursor: default;
}

.ws-surface-enterprise .ws-orgswitch > summary::-webkit-details-marker {
  display: none;
}

.ws-surface-enterprise .ws-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  background: var(--ws-lime);
  color: #0b0b0b;
  font: 700 13px/1 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-avatar-person {
  border-radius: 50%;
  background: #55544f;
  color: #ffffff;
  font-size: 11px;
}

.ws-surface-enterprise .ws-orgswitch-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ws-surface-enterprise .ws-orgswitch-name {
  overflow: hidden;
  font: 600 13px/1.3 var(--ws-font-sans);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ws-surface-enterprise .ws-orgswitch-role,
.ws-surface-enterprise .ws-account-sub {
  color: #a8a79f;
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-orgswitch-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
  background: #ffffff;
  border: 1px solid var(--ws-rule-strong);
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise .ws-orgswitch-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--ws-ink);
  font: 400 14px/1.3 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-orgswitch-menu a:hover,
.ws-surface-enterprise .ws-orgswitch-menu a[aria-current="true"] {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-orgswitch-menu a:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise .ws-orgswitch-menu .ws-orgswitch-all {
  border-top: 1px solid var(--ws-rule);
  color: var(--ws-graphite);
  font-size: 12px;
}

/* Navigation */
.ws-surface-enterprise .ws-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-nav-group {
  margin: 20px 0 8px;
  padding: 0 12px;
  color: #a8a79f;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  color: #a8a79f;
  font: 400 14px/1.2 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-nav-link:hover {
  background: #171716;
  color: #ffffff;
}

.ws-surface-enterprise .ws-nav-link[aria-current="page"] {
  background: #171716;
  box-shadow: inset 2px 0 0 var(--ws-lime);
  color: #ffffff;
  font-weight: 600;
}

.ws-surface-enterprise .ws-nav-link[aria-current="page"] svg.icon {
  color: var(--ws-lime);
}

.ws-surface-enterprise .ws-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.ws-surface-enterprise .ws-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 8px 0;
  border-top: 1px solid #2e2e2c;
}

.ws-surface-enterprise .ws-account-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ws-surface-enterprise .ws-account-name {
  overflow: hidden;
  color: #ffffff;
  font: 500 13px/1.3 var(--ws-font-sans);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ws-surface-enterprise .ws-account-sub {
  text-decoration: none;
}

.ws-surface-enterprise .ws-account-sub:hover {
  color: #ffffff;
  text-decoration: underline;
}

.ws-surface-enterprise .ws-account form {
  margin: 0;
}

.ws-surface-enterprise .ws-icon-button-dark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a8a79f;
  cursor: pointer;
}

.ws-surface-enterprise .ws-icon-button-dark:hover {
  color: #ffffff;
}

/* Main column and topbar */
.ws-surface-enterprise .ws-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ws-surface-enterprise .ws-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--ws-topbar-height);
  padding: 0 var(--ws-content-gutter);
  background: var(--ws-white);
  border-bottom: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
  list-style: none;
}

.ws-surface-enterprise .ws-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--ws-muted);
}

.ws-surface-enterprise .ws-breadcrumb [aria-current="page"] {
  color: var(--ws-ink);
  font-weight: 500;
}

.ws-surface-enterprise .ws-topbar-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.ws-surface-enterprise .ws-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ws-ink);
}

.ws-surface-enterprise .ws-icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--ws-control-height);
  height: var(--ws-control-height);
  border: 1px solid var(--ws-rule);
  background: var(--ws-white);
  color: var(--ws-ink);
}

.ws-surface-enterprise .ws-icon-button:hover {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px var(--ws-content-gutter);
  background: var(--ws-lime);
  color: #0b0b0b;
  font: 500 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-preview-bar a {
  color: #0b0b0b;
  font-weight: 600;
}

.ws-surface-enterprise .ws-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: var(--ws-content-gutter) var(--ws-content-gutter) 64px;
}

.ws-surface-enterprise .ws-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.ws-surface-enterprise .ws-page-title {
  margin: 0;
  font: 700 40px/44px var(--ws-font-sans);
  letter-spacing: -1.5px;
}

.ws-surface-enterprise .ws-page-subtitle {
  max-width: 96ch;
  margin: 8px 0 0;
  color: var(--ws-graphite);
}

.ws-surface-enterprise .ws-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Existing page bodies inside the new shell (until each page moves to the v3 components). */
.ws-surface-enterprise .ws-content .card {
  border: 1px solid var(--ws-rule);
  box-shadow: none;
}

.ws-surface-enterprise .ws-content .card-title,
.ws-surface-enterprise .ws-content .card-header h2,
.ws-surface-enterprise .ws-content .card-header h3 {
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-content .table thead th {
  background: var(--ws-paper);
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-content .btn {
  min-height: var(--ws-control-height);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Mobile app bar and bottom tab bar (hidden on desktop) */
.ws-surface-enterprise .ws-appbar,
.ws-surface-enterprise .ws-tabbar {
  display: none;
}

/* --- Components ------------------------------------------------------------- */

.ws-surface-enterprise .ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--ws-control-height);
  padding: 0 16px;
  border: 1px solid transparent;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.ws-surface-enterprise .ws-btn-primary { background: var(--ws-ink); color: var(--ws-white); }
.ws-surface-enterprise .ws-btn-primary:hover { background: #2a2a28; color: #ffffff; }
.ws-surface-enterprise .ws-btn-secondary { background: var(--ws-stone); color: var(--ws-ink); }
.ws-surface-enterprise .ws-btn-secondary:hover { background: var(--ws-rule-strong); }
.ws-surface-enterprise .ws-btn-ghost { background: transparent; border-color: var(--ws-rule-strong); color: var(--ws-ink); }
.ws-surface-enterprise .ws-btn-ghost:hover { background: var(--ws-stone); }
.ws-surface-enterprise .ws-btn[disabled],
.ws-surface-enterprise .ws-btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

.ws-surface-enterprise .ws-badge {
  display: inline-flex;
  align-items: center;
  height: var(--ws-badge-height);
  padding: 0 8px;
  border: 1px solid transparent;
  font: 600 11px/1 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ws-surface-enterprise .ws-badge-positive { background: var(--ws-lime); color: #0b0b0b; }
.ws-surface-enterprise .ws-badge-neutral { background: var(--ws-stone); color: var(--ws-ink); }
.ws-surface-enterprise .ws-badge-strong { background: var(--ws-ink); color: var(--ws-white); }
.ws-surface-enterprise .ws-badge-outline { border-color: var(--ws-rule-strong); color: var(--ws-graphite); }
.ws-surface-enterprise .ws-badge-critical { background: var(--ws-severity-critical); color: #ffffff; }

.ws-surface-enterprise .ws-severity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-severity-swatch {
  width: 8px;
  height: 8px;
  flex: none;
}

.ws-surface-enterprise .ws-severity-critical .ws-severity-swatch { background: var(--ws-severity-critical); }
.ws-surface-enterprise .ws-severity-high .ws-severity-swatch { background: var(--ws-severity-high); }
.ws-surface-enterprise .ws-severity-moderate .ws-severity-swatch { background: var(--ws-severity-moderate); }
.ws-surface-enterprise .ws-severity-low .ws-severity-swatch { background: var(--ws-severity-low); }
.ws-surface-enterprise .ws-severity-none { color: var(--ws-graphite); }
.ws-surface-enterprise .ws-severity-none .ws-severity-swatch { border: 1px solid var(--ws-graphite); }

.ws-surface-enterprise .ws-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-card-flush {
  gap: 0;
  padding: 0;
}

.ws-surface-enterprise .ws-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-card-flush .ws-card-header {
  padding: 16px 24px;
}

.ws-surface-enterprise .ws-card-title {
  margin: 0;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-card-meta {
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ws-ink);
  font: 500 12px/1.35 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-card-action:hover {
  text-decoration: underline;
}

.ws-surface-enterprise .ws-kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.ws-surface-enterprise .ws-kv > div {
  padding-top: 12px;
  border-top: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-kv dt {
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-kv dd {
  margin: 4px 0 0;
  font: 600 14px/1.3 var(--ws-font-sans);
  overflow-wrap: anywhere;
}

.ws-surface-enterprise .ws-kv .ws-empty {
  color: var(--ws-muted);
  font-weight: 400;
}

.ws-surface-enterprise .ws-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-segmented a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  color: var(--ws-ink);
  font: 500 12px/1.35 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-segmented a:hover {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-segmented a[aria-current="page"],
.ws-surface-enterprise .ws-segmented a[aria-current="true"] {
  background: var(--ws-ink);
  color: var(--ws-white);
}

.ws-surface-enterprise #main-content .ws-table {
  width: 100%;
  border-collapse: collapse;
}

.ws-surface-enterprise #main-content .ws-table th {
  height: 40px;
  padding: 0 16px;
  background: var(--ws-paper);
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.ws-surface-enterprise #main-content .ws-table thead th {
  vertical-align: middle;
}

.ws-surface-enterprise #main-content .ws-table tbody th {
  height: 56px;
  padding: 8px 16px;
  border-top: 1px solid var(--ws-rule);
  background: transparent;
  color: var(--ws-ink);
  font: 600 14px/1.3 var(--ws-font-sans);
  letter-spacing: normal;
  text-transform: none;
  vertical-align: middle;
}

.ws-surface-enterprise #main-content .ws-table td {
  height: 56px;
  padding: 8px 16px;
  border-top: 1px solid var(--ws-rule);
  vertical-align: middle;
}

.ws-surface-enterprise #main-content .ws-table .ws-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ws-surface-enterprise #main-content .ws-table tbody tr:hover {
  background: var(--ws-paper);
}

/* Inside a padded card the table aligns to the card text (frames 08, 02); flush cards keep 16 px cells. */
.ws-surface-enterprise #main-content .ws-card:not(.ws-card-flush) .ws-table th:first-child,
.ws-surface-enterprise #main-content .ws-card:not(.ws-card-flush) .ws-table td:first-child {
  padding-left: 0;
}

.ws-surface-enterprise #main-content .ws-card:not(.ws-card-flush) .ws-table th:last-child,
.ws-surface-enterprise #main-content .ws-card:not(.ws-card-flush) .ws-table td:last-child {
  padding-right: 0;
}

.ws-surface-enterprise #main-content .ws-card:not(.ws-card-flush) .ws-table thead th:first-child {
  padding-left: 0;
}

.ws-surface-enterprise #main-content .ws-table tbody tr:last-child > * {
  border-bottom: 1px solid var(--ws-rule);
}

.ws-surface-enterprise #main-content .ws-table .ws-cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
  letter-spacing: normal;
  text-transform: none;
}

.ws-surface-enterprise #main-content .ws-table .ws-cell-title {
  display: block;
  font-weight: 600;
}

.ws-surface-enterprise .ws-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 40px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-state-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-state-label {
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-state-title {
  margin: 0;
  font: 600 22px/1.2 var(--ws-font-sans);
  letter-spacing: -0.01em;
}

.ws-surface-enterprise .ws-state-body {
  max-width: 64ch;
  margin: 0;
  color: var(--ws-graphite);
}

.ws-surface-enterprise .ws-state-detail,
.ws-surface-enterprise .ws-code {
  margin: 0;
  padding: 16px;
  font: 400 12px/1.5 var(--ws-font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ws-surface-enterprise .ws-state-detail {
  background: var(--ws-paper);
  border: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-code {
  background: #0b0b0b;
  color: #a8a79f;
  overflow-x: auto;
}

.ws-surface-enterprise .ws-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ws-surface-enterprise .ws-table-scroll {
  position: relative; /* contains visually hidden labels, which are absolutely positioned */
  overflow-x: auto;
}

.ws-surface-enterprise .ws-segment-disabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  color: var(--ws-muted);
  font: 500 12px/1.35 var(--ws-font-sans);
  cursor: not-allowed;
}

/* Fluid field: label inside, 1px graphite bottom rule (frame 01 filters). */
.ws-surface-enterprise .ws-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: var(--ws-field-height);
  padding: 6px 12px;
  background: var(--ws-paper);
  border-bottom: 1px solid var(--ws-graphite);
}

.ws-surface-enterprise .ws-field:focus-within {
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise .ws-field-label {
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-field select,
.ws-surface-enterprise .ws-field input:not([type="checkbox"]):not([type="radio"]),
.ws-surface-enterprise .ws-field-value {
  width: 100%;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  color: var(--ws-ink);
  font: 600 14px/1.3 var(--ws-font-sans);
  appearance: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-surface-enterprise .ws-field select:focus,
.ws-surface-enterprise .ws-field input:not([type="checkbox"]):focus {
  outline: none;
  box-shadow: none;
}

.ws-surface-enterprise .ws-field-select > svg.icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  pointer-events: none;
}

.ws-surface-enterprise details.ws-multi > summary {
  display: flex;
  flex-direction: column;
  list-style: none;
  cursor: pointer;
}

.ws-surface-enterprise details.ws-multi > summary::-webkit-details-marker,
.ws-surface-enterprise .ws-intel3-more > summary::-webkit-details-marker,
.ws-surface-enterprise .ws-intel3-api > summary::-webkit-details-marker {
  display: none;
}

.ws-surface-enterprise details.ws-multi > summary > svg.icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.ws-surface-enterprise .ws-multi-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  width: max(100%, 260px);
  max-height: 320px;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule-strong);
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise .ws-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 0 16px;
  font: 400 14px/1.3 var(--ws-font-sans);
  cursor: pointer;
}

.ws-surface-enterprise .ws-check:hover {
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: #0b0b0b;
}

/* Explorer (frames 01 / 07 / 16) */
.ws-surface-enterprise .ws-intel3 {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ws-surface-enterprise .ws-intel3-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.ws-surface-enterprise .ws-intel3-toolbar > .ws-card-meta {
  margin: 0 0 0 auto;
}

.ws-surface-enterprise .ws-intel3-api {
  position: relative;
}

.ws-surface-enterprise .ws-intel3-api > summary {
  list-style: none;
}

.ws-surface-enterprise .ws-intel3-api-body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(560px, 90vw);
  padding: 24px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule-strong);
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise .ws-intel3-filters {
  gap: 12px;
}

.ws-surface-enterprise .ws-intel3-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto auto;
  align-items: start;
  gap: 16px;
}

.ws-surface-enterprise .ws-intel3-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise .ws-intel3-filter-actions .ws-btn,
.ws-surface-enterprise #main-content .ws-intel3-filter-actions button.ws-btn,
.ws-surface-enterprise .ws-intel3-more > summary {
  min-height: var(--ws-field-height);
}

.ws-surface-enterprise .ws-intel3-filters > .ws-card-meta {
  margin: 0;
}

.ws-surface-enterprise .ws-intel3-more > summary {
  list-style: none;
}

.ws-surface-enterprise .ws-intel3-more[open] {
  grid-column: 1 / -1;
  grid-row: 2;
}

.ws-surface-enterprise .ws-intel3-more[open] > summary {
  width: max-content;
  margin-bottom: 16px;
}

.ws-surface-enterprise .ws-intel3-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.ws-surface-enterprise .ws-intel3-resultsbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-intel3-count {
  margin: 0;
  font: 600 17px/1.25 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-intel3-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  flex: 1;
}

.ws-surface-enterprise .ws-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--ws-chip-height);
  padding: 0 12px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule-strong);
  color: var(--ws-ink);
  font: 500 12px/1.35 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-chip:hover {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-intel3-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ws-detail-panel-width, 384px);
  align-items: start;
  gap: 24px;
}

.ws-surface-enterprise .ws-intel3-title {
  color: var(--ws-ink);
  font: 600 14px/1.3 var(--ws-font-sans);
  text-decoration: none;
}

.ws-surface-enterprise .ws-intel3-title:hover {
  text-decoration: underline;
}

.ws-surface-enterprise .ws-intel3-actions {
  white-space: nowrap;
  text-align: right;
}

.ws-surface-enterprise .ws-intel3-actions .ws-icon-button {
  width: 32px;
  height: 32px;
  border-color: transparent;
  background: transparent;
}

.ws-surface-enterprise .ws-intel3-actions .ws-icon-button:hover {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-table tr.is-selected,
.ws-surface-enterprise .ws-table tr:has(.ws-intel3-preview-link:focus-visible) {
  background: var(--ws-stone);
  box-shadow: inset 3px 0 0 var(--ws-ink);
}

.ws-surface-enterprise .ws-intel3-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--ws-rule);
}

/* Preview: the targeted record, otherwise the first one. No JavaScript needed. */
.ws-surface-enterprise .ws-intel3-previews {
  position: sticky;
  top: 88px;
}

.ws-surface-enterprise .ws-intel3-preview {
  display: none;
}

.ws-surface-enterprise .ws-intel3-preview:target,
.ws-surface-enterprise .ws-intel3-previews:not(:has(:target)) .ws-intel3-preview:first-child {
  display: flex;
}

.ws-surface-enterprise .ws-intel3-preview-title {
  margin: 0;
  font: 700 22px/1.2 var(--ws-font-sans);
  letter-spacing: -0.01em;
}

.ws-surface-enterprise .ws-intel3-lifecycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.ws-surface-enterprise .ws-intel3-summary {
  margin: 0;
  color: var(--ws-ink);
}

.ws-surface-enterprise .ws-intel3-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-intel3-map .ws-explorer-map-card {
  border: 0;
  padding: 0;
}

.ws-surface-enterprise .ws-intel3-map .ws-explorer-map {
  min-height: 420px;
  background: var(--ws-map-water, #eeece6);
}

/* Records (frames 02 / 03) */
.ws-surface-enterprise .ws-intel3-record-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-surface-enterprise .ws-intel3-record-header .ws-card-meta {
  margin: 0;
}

.ws-surface-enterprise .ws-intel3-back {
  width: max-content;
}

.ws-surface-enterprise .ws-intel3-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ws-detail-panel-width, 384px);
  align-items: start;
  gap: 24px;
}

.ws-surface-enterprise .ws-intel3-record-main,
.ws-surface-enterprise .ws-intel3-record-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.ws-surface-enterprise .ws-intel3-record-side .ws-explorer-map {
  min-height: 240px;
}

.ws-surface-enterprise .ws-intel3-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-intel3-evidence li {
  padding: 4px 8px;
  background: var(--ws-paper);
  border: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-intel3-attribution {
  margin: 0;
}

.ws-surface-enterprise .ws-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-timeline li {
  position: relative;
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 4px;
  padding: 20px 16px 0 0;
}

.ws-surface-enterprise .ws-timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
  background: var(--ws-rule-strong);
}

.ws-surface-enterprise .ws-timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 12px;
  height: 12px;
  background: var(--ws-ink);
}

/* The legacy body-compatibility rules in /assets/warstrikes-ui.css style bare <select>, <input> and
   <button> inside <main> with high specificity; v3 controls opt out through the main landmark id. */
.ws-surface-enterprise #main-content .ws-field select,
.ws-surface-enterprise #main-content .ws-field input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 0;
  height: auto;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ws-ink);
  font: 600 14px/1.3 var(--ws-font-sans);
}

.ws-surface-enterprise #main-content button.ws-btn {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--ws-control-height);
  padding: 0 16px;
  border: 1px solid transparent;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise #main-content button.ws-btn-primary { background: var(--ws-ink); color: var(--ws-white); }
.ws-surface-enterprise #main-content button.ws-btn-primary:hover { background: #2a2a28; }
.ws-surface-enterprise #main-content button.ws-btn-secondary { background: var(--ws-stone); color: var(--ws-ink); }
.ws-surface-enterprise #main-content button.ws-btn-ghost { background: transparent; border-color: var(--ws-rule-strong); color: var(--ws-ink); }

.ws-surface-enterprise #main-content button.ws-icon-button {
  min-height: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ws-ink);
}

.ws-surface-enterprise #main-content button.ws-icon-button:hover,
.ws-surface-enterprise #main-content button.ws-icon-button[aria-pressed="true"] {
  background: var(--ws-stone);
}

.ws-surface-enterprise #main-content pre.ws-state-detail {
  background: var(--ws-paper);
  color: var(--ws-ink);
}

.ws-surface-enterprise #main-content pre.ws-code {
  background: #0b0b0b;
  color: #a8a79f;
}

/* The map script disables "show on map" for rows without a location; the row already says so. */
.ws-surface-enterprise .ws-intel3-actions [data-focus-result][disabled] {
  display: none;
}

.ws-surface-enterprise .ws-table .ws-severity {
  white-space: nowrap;
}

/* Workspace pages (frames 08, 04, 09, 10) */
.ws-surface-enterprise .ws-v3-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 0;
}

.ws-surface-enterprise .ws-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.ws-surface-enterprise .ws-stat {
  gap: 8px;
}

.ws-surface-enterprise .ws-stat-value {
  margin: 0;
  font: 700 32px/36px var(--ws-font-sans);
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}

.ws-surface-enterprise .ws-stat .ws-card-meta {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.ws-surface-enterprise .ws-v3-grid > :only-child {
  grid-column: 1 / -1;
}

.ws-surface-enterprise .ws-v3-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.ws-surface-enterprise .ws-v3-resource p {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.ws-surface-enterprise .ws-v3-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--ws-rule);
  list-style: none;
}

.ws-surface-enterprise .ws-v3-links li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-surface-enterprise .ws-v3-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.ws-surface-enterprise #main-content .ws-v3-form button.ws-btn {
  min-height: var(--ws-field-height);
}

.ws-surface-enterprise .ws-v3-secret {
  border: 2px solid var(--ws-ink);
}

.ws-surface-enterprise .ws-v3-secret p {
  margin: 0;
}

.ws-surface-enterprise #main-content pre.ws-v3-secret-value {
  font-size: 14px;
  color: #ffffff;
}

.ws-surface-enterprise .ws-v3-row-action {
  text-align: right;
}

.ws-surface-enterprise .ws-v3-confirm {
  position: relative;
  display: inline-block;
}

.ws-surface-enterprise .ws-v3-confirm > summary {
  list-style: none;
}

.ws-surface-enterprise .ws-v3-confirm > summary::-webkit-details-marker {
  display: none;
}

.ws-surface-enterprise .ws-v3-confirm-body {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  padding: 16px;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule-strong);
  box-shadow: var(--ws-shadow-overlay);
  text-align: left;
  white-space: normal;
}

.ws-surface-enterprise .ws-v3-confirm-body p {
  margin: 0;
}

.ws-surface-enterprise #main-content .ws-v3-confirm-body button.ws-btn-primary {
  background: var(--ws-severity-critical);
}

/* Plain bar chart, no library: one column per UTC day, stacked by resource. */
.ws-surface-enterprise .ws-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 180px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ws-rule-strong);
  list-style: none;
}

.ws-surface-enterprise .ws-bar {
  display: flex;
  flex: 1 1 0;
  flex-direction: column-reverse;
  min-width: 2px;
  height: 100%;
}

.ws-surface-enterprise .ws-bar-seg {
  display: block;
  width: 100%;
}

.ws-surface-enterprise .ws-bar-events,
.ws-surface-enterprise .ws-legend .ws-bar-events {
  background: var(--ws-ink);
}

.ws-surface-enterprise .ws-bar-signals,
.ws-surface-enterprise .ws-legend .ws-bar-signals {
  background: var(--ws-graphite);
}

.ws-surface-enterprise .ws-bar-other,
.ws-surface-enterprise .ws-legend .ws-bar-other {
  background: var(--ws-rule-strong);
}

.ws-surface-enterprise .ws-bar-partial {
  box-shadow: inset 0 -4px 0 var(--ws-lime);
  opacity: 0.65;
}

.ws-surface-enterprise .ws-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
  list-style: none;
}

.ws-surface-enterprise .ws-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise .ws-legend span {
  display: inline-block;
  width: 8px;
  height: 8px;
}

.ws-surface-enterprise .ws-legend .ws-bar-partial-key {
  background: var(--ws-lime);
}

/* Plan, Team, Activity, Account (frames 11–14) */
.ws-surface-enterprise .ws-v3-grid-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-surface-enterprise .ws-v3-subhead {
  margin: 8px 0 0;
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-v3-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-surface-enterprise .ws-v3-actions form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ws-surface-enterprise .ws-v3-actions .ws-card-meta,
.ws-surface-enterprise .ws-v3-price {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-price {
  font: 700 22px/1.2 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-v3-pad {
  margin: 0;
  padding: 16px 24px;
}

.ws-surface-enterprise .ws-v3-inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise #main-content select.ws-v3-select {
  width: auto;
  min-height: 32px;
  padding: 0 28px 0 8px;
  border: 1px solid var(--ws-rule-strong);
  background: var(--ws-white);
  color: var(--ws-ink);
  font: 500 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise #main-content .ws-v3-inline-form button.ws-btn {
  min-height: 32px;
}

.ws-surface-enterprise .ws-v3-matrix-cell {
  text-align: center;
}

.ws-surface-enterprise .ws-v3-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.ws-surface-enterprise .ws-v3-stack .ws-btn {
  align-self: flex-start;
}

.ws-surface-enterprise .ws-v3-error {
  margin: 0;
  padding: 12px 16px;
  border-left: 3px solid var(--ws-severity-critical);
  background: var(--ws-paper);
  color: var(--ws-ink);
}

/* Pixel pass against frames 04, 09–14 */
.ws-surface-enterprise .ws-js-only {
  display: none !important;
}

.ws-surface-enterprise.ws-js .ws-js-only {
  display: inline-flex !important;
}

.ws-surface-enterprise .ws-v3-resource {
  gap: 12px;
}

.ws-surface-enterprise .ws-v3-resource .ws-card-header {
  align-items: center;
}

.ws-surface-enterprise .ws-v3-resource-title {
  margin: 0;
  font: 600 18px/1.3 var(--ws-font-sans);
  letter-spacing: -0.01em;
}

.ws-surface-enterprise .ws-v3-resource-off {
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-v3-resource .ws-v3-endpoint {
  font-size: 12px;
}

.ws-surface-enterprise .ws-v3-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-v3-copy-row .ws-card-meta {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-links {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 24px;
  border-top: 0;
  padding: 0;
}

.ws-surface-enterprise [aria-labelledby="ws-access-card"] .ws-kv,
.ws-surface-enterprise .ws-v3-grid-keys > .ws-card:last-child:not(.ws-v3-secret) .ws-kv {
  grid-template-columns: minmax(0, 1fr);
}

.ws-surface-enterprise .ws-field-help {
  margin: 4px 0 0;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-v3-inset {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-v3-inset p {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-grid-keys {
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
}

.ws-surface-enterprise .ws-v3-grid-account {
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
}

.ws-surface-enterprise .ws-v3-secret-title {
  font: 600 22px/1.25 var(--ws-font-sans);
  letter-spacing: -0.01em;
}

.ws-surface-enterprise .ws-v3-secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ws-surface-enterprise .ws-v3-secret-row pre {
  flex: 1 1 auto;
  min-width: 0;
}

.ws-surface-enterprise .ws-v3-secret-done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ws-surface-enterprise #main-content .ws-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ws-ink);
  font: 500 12px/1.35 var(--ws-font-sans);
  cursor: pointer;
  list-style: none;
}

.ws-surface-enterprise #main-content .ws-link-button:hover {
  text-decoration: underline;
}

.ws-surface-enterprise #main-content .ws-table tr.ws-row-muted td {
  color: var(--ws-graphite);
}

.ws-surface-enterprise .ws-v3-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 16px 24px;
}

.ws-surface-enterprise .ws-v3-confirm-title {
  font: 600 18px/1.3 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-v3-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ws-surface-enterprise .ws-v3-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ws-surface-enterprise .ws-v3-section-title {
  margin: 0 0 12px;
  font: 600 18px/1.3 var(--ws-font-sans);
  letter-spacing: -0.01em;
}

.ws-surface-enterprise .ws-v3-muted-card {
  background: var(--ws-stone);
  border-color: var(--ws-stone);
}

.ws-surface-enterprise .ws-v3-muted-card p {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-lock {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise .ws-v3-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ws-surface-enterprise .ws-v3-select-wrap > svg.icon {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

.ws-surface-enterprise #main-content select.ws-v3-select {
  min-width: 128px;
  min-height: 40px;
  padding: 0 32px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ws-graphite);
  background: var(--ws-paper);
  font: 400 14px/1.3 var(--ws-font-sans);
  appearance: none;
}

.ws-surface-enterprise #main-content select.ws-v3-select:focus-visible {
  outline: 2px solid var(--ws-ink);
  outline-offset: 0;
}

.ws-surface-enterprise #main-content .ws-v3-matrix tbody th {
  font-weight: 400;
}

.ws-surface-enterprise #main-content .ws-table td.ws-v3-muted-cell {
  color: var(--ws-graphite);
}

.ws-surface-enterprise .ws-v3-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Usage chart axis (frame 10) */
.ws-surface-enterprise .ws-chart {
  position: relative;
  padding: 8px 0 28px 56px;
}

.ws-surface-enterprise .ws-chart-axis {
  position: absolute;
  inset: 8px 0 28px 56px;
  pointer-events: none;
}

.ws-surface-enterprise .ws-axis-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-axis-line > span {
  position: absolute;
  right: calc(100% + 12px);
  top: -8px;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-mono);
  white-space: nowrap;
}

.ws-surface-enterprise .ws-chart .ws-bars {
  position: relative;
  gap: 6px;
  height: 232px;
  border-bottom: 0;
}

.ws-surface-enterprise .ws-chart-ticks {
  position: absolute;
  left: 56px;
  right: 0;
  bottom: 0;
  height: 20px;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-mono);
}

.ws-surface-enterprise .ws-chart-ticks span {
  position: absolute;
  white-space: nowrap;
}

.ws-surface-enterprise .ws-chart .ws-bar-signals {
  background: #bcbab1;
}

.ws-surface-enterprise .ws-chart .ws-bar-partial {
  opacity: 1;
  box-shadow: none;
}

.ws-surface-enterprise .ws-chart .ws-bar-partial .ws-bar-seg {
  background: var(--ws-graphite);
  opacity: 0.55;
}

.ws-surface-enterprise .ws-legend .ws-bar-partial-key {
  background: var(--ws-graphite);
  opacity: 0.55;
}

.ws-surface-enterprise .ws-legend .ws-bar-signals {
  background: #bcbab1;
}

/* Toast and tooltip (frame 19) */
.ws-surface-enterprise .ws-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(400px, calc(100vw - 32px));
}

.ws-surface-enterprise .ws-toast {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px;
  background: #0b0b0b;
  color: #ffffff;
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise .ws-toast-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--ws-lime);
  color: #0b0b0b;
}

.ws-surface-enterprise .ws-toast-error .ws-toast-icon {
  background: var(--ws-severity-critical);
  color: #ffffff;
}

.ws-surface-enterprise .ws-toast-title {
  margin: 0;
  font: 600 14px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-toast-body {
  margin: 2px 0 0;
  color: #a8a79f;
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-toast button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: #a8a79f;
  cursor: pointer;
}

.ws-surface-enterprise .ws-tooltip {
  position: fixed;
  z-index: 70;
  max-width: 280px;
  padding: 8px 12px;
  background: #0b0b0b;
  color: #ffffff;
  font: 400 12px/1.4 var(--ws-font-sans);
  pointer-events: none;
}

/* Revoke confirmation as a modal dialog once the script runs (frame 09). */
.ws-surface-enterprise dialog.ws-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--ws-rule-strong);
  background: var(--ws-white);
  color: var(--ws-ink);
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise dialog.ws-dialog::backdrop {
  background: rgba(11, 11, 11, 0.45);
}

.ws-surface-enterprise dialog.ws-dialog .ws-v3-confirm-body {
  position: static;
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* Pixel pass against frames 01, 02, 03, 07 */
.ws-surface-enterprise #main-content label.ws-field,
.ws-surface-enterprise #main-content details.ws-field {
  margin: 0;
}

.ws-surface-enterprise .ws-intel3-filter-row {
  align-items: center;
}

.ws-surface-enterprise #main-content .ws-intel3-filter-actions .ws-btn,
.ws-surface-enterprise #main-content .ws-intel3-filter-actions button.ws-btn,
.ws-surface-enterprise #main-content .ws-intel3-more > summary {
  min-height: 40px;
}

.ws-surface-enterprise #main-content button.ws-btn[hidden] {
  display: none;
}

/* "Copy API request" sits on the page header line, as in the frames. */
@media (min-width: 1024px) {
  .ws-surface-enterprise .ws-content:has(> .ws-intel3[data-intelligence-explorer]) {
    position: relative;
  }

  .ws-surface-enterprise .ws-intel3[data-intelligence-explorer] > .ws-intel3-toolbar > .ws-intel3-api {
    position: absolute;
    top: calc(var(--ws-content-gutter) + 32px);
    right: var(--ws-content-gutter);
  }
}

.ws-surface-enterprise #main-content .ws-table tr[data-ws-row-href] {
  cursor: pointer;
}

.ws-surface-enterprise #main-content .ws-table tr[data-ws-row-href]:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise #main-content .ws-table tr.is-selected,
.ws-surface-enterprise #main-content .ws-table tr.is-selected:hover {
  background: var(--ws-stone);
  box-shadow: inset 3px 0 0 var(--ws-ink);
}

.ws-surface-enterprise #main-content a.ws-intel3-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ws-ink);
  font-weight: 600;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ws-surface-enterprise #main-content a.ws-intel3-title:hover {
  text-decoration: underline;
}

.ws-surface-enterprise .ws-intel3-place {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.ws-surface-enterprise #main-content .ws-intel3-table .ws-table td {
  max-height: 64px;
}

.ws-surface-enterprise .ws-intel3-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-surface-enterprise .ws-intel3-preview-actions .ws-btn-primary {
  flex: 1 1 auto;
  justify-content: center;
}

.ws-surface-enterprise .ws-intel3-preview .ws-kv,
.ws-surface-enterprise .ws-intel3-record-side .ws-kv {
  grid-template-columns: minmax(0, 1fr);
}

.ws-surface-enterprise .ws-intel3-record-main .ws-kv {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-surface-enterprise .ws-intel3-record-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.ws-surface-enterprise .ws-intel3-record-header > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.ws-surface-enterprise .ws-intel3-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.ws-surface-enterprise .ws-intel3-tiles > div {
  padding: 16px;
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-intel3-tiles dt {
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-intel3-tiles dd {
  margin: 8px 0 0;
  font: 600 14px/1.3 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-timeline-legend > .ws-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise .ws-timeline-key {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--ws-ink);
}

.ws-surface-enterprise .ws-btn-block {
  width: 100%;
  justify-content: center;
}

.ws-surface-enterprise .ws-intel3-interpretation {
  margin: 0;
  color: var(--ws-graphite);
  font: 400 15px/1.5 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-intel3-endpoint {
  margin: 0;
  font-size: 12px;
}

.ws-surface-enterprise .ws-card-meta.ws-mono,
.ws-surface-enterprise #main-content .ws-table .ws-cell-sub.ws-mono {
  font-family: var(--ws-font-mono);
}

.ws-surface-enterprise #main-content .ws-v3-stack button.ws-btn,
.ws-surface-enterprise #main-content .ws-v3-secret button.ws-btn {
  min-height: 40px;
}

.ws-surface-enterprise #main-content label.ws-check {
  display: flex;
  margin: 0;
}

.ws-surface-enterprise #main-content .ws-check input[type="checkbox"] {
  position: static;
  float: none;
  width: 16px;
  height: 16px;
  margin: 0;
}

.ws-surface-enterprise #main-content .ws-v3-secret-done .ws-check {
  padding: 0;
}

.ws-surface-enterprise #main-content .ws-table .ws-v3-matrix-cell {
  text-align: center;
}

.ws-surface-enterprise #main-content .ws-v3-inline-form .ws-link-button {
  min-height: 40px;
  margin: 0;
}

.ws-surface-enterprise .ws-v3-split .ws-kv,
.ws-surface-enterprise .ws-v3-grid-account .ws-kv,
.ws-surface-enterprise .ws-v3-secret .ws-kv {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Help & API guide v3 (frame 15) */
.ws-surface-enterprise .ws-v3-help {
  display: grid;
  grid-template-columns: minmax(0, 264px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.ws-surface-enterprise .ws-v3-help-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ws-surface-enterprise .ws-v3-help-main p {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-toc {
  position: sticky;
  top: 88px;
}

.ws-surface-enterprise .ws-v3-toc ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise #main-content .ws-v3-toc a {
  display: block;
  padding: 8px;
  color: var(--ws-graphite);
  text-decoration: none;
}

.ws-surface-enterprise #main-content .ws-v3-toc a:hover,
.ws-surface-enterprise #main-content .ws-v3-toc a:focus-visible {
  background: var(--ws-stone);
  color: var(--ws-ink);
  box-shadow: inset 3px 0 0 var(--ws-ink);
}

.ws-surface-enterprise .ws-v3-help-main > section {
  scroll-margin-top: 88px;
}

.ws-surface-enterprise .ws-v3-numbered {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ws-step;
}

.ws-surface-enterprise .ws-v3-numbered li {
  display: flex;
  align-items: center;
  gap: 12px;
  counter-increment: ws-step;
}

.ws-surface-enterprise .ws-v3-numbered li::before {
  content: counter(ws-step);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  background: #0b0b0b;
  color: #ffffff;
  font: 600 12px/1 var(--ws-font-mono);
}

@media (max-width: 1023.98px) {
  .ws-surface-enterprise .ws-v3-help {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-v3-toc {
    position: static;
  }
}

/* Filters: a "Filters" button on phones only (frame 05). */
.ws-surface-enterprise .ws-intel3-filter-toggle > summary {
  display: none;
  list-style: none;
}

.ws-surface-enterprise .ws-intel3-filter-toggle > summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 767.98px) {
  .ws-surface-enterprise #main-content .ws-intel3-filter-toggle > summary {
    display: inline-flex;
    width: 100%;
  }

  .ws-surface-enterprise .ws-intel3-filter-toggle[open] > summary {
    margin-bottom: 16px;
  }

  .ws-surface-enterprise .ws-intel3-toolbar > .ws-card-meta {
    display: none;
  }

  /* Explorer results as stacked list items: title, place · time, severity and status (frame 05). */
  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table thead {
    display: none;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table,
  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table tbody {
    display: block;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--ws-rule);
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(1) {
    grid-column: 1 / -1;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td .ws-card-meta {
    display: none;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(2) {
    grid-row: 2;
    grid-column: 1;
    color: var(--ws-graphite);
    font-size: 13px;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(3) {
    display: none;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(4) {
    grid-row: 3;
    grid-column: 1 / 3;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(5) {
    grid-row: 2;
    grid-column: 2 / -1;
    color: var(--ws-graphite);
    font-size: 13px;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(5)::before {
    content: "· ";
  }

  .ws-surface-enterprise #main-content .ws-intel3-table .ws-table td:nth-child(6) {
    grid-row: 3;
    grid-column: 3;
  }

  /* Signals: severity in column 2, confidence and materiality left to the record. */
  .ws-surface-enterprise #main-content .ws-intel3-table [aria-label="Signals"] .ws-table td:nth-child(2),
  .ws-surface-enterprise #main-content .ws-intel3-table.ws-intel3-signals .ws-table td:nth-child(2) {
    grid-row: 3;
    grid-column: 1 / 3;
    color: inherit;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table.ws-intel3-signals .ws-table td:nth-child(3),
  .ws-surface-enterprise #main-content .ws-intel3-table.ws-intel3-signals .ws-table td:nth-child(4) {
    display: none;
  }

  .ws-surface-enterprise #main-content .ws-intel3-table.ws-intel3-signals .ws-table td:nth-child(5)::before {
    content: "";
  }

  .ws-surface-enterprise #main-content .ws-intel3-table.ws-intel3-signals .ws-table td:nth-child(5) {
    grid-column: 1 / -1;
  }
}

/* Review fixes · selects, checkboxes, list/map (review frame 310:11675) */

/* Checkbox (handoff §6.5): 16 px box in a 24 px target, graphite border; checked = ink fill, lime check. */
.ws-surface-enterprise #main-content .ws-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 4px;
  border: 1.5px solid var(--ws-graphite);
  background: var(--ws-white);
  cursor: pointer;
}

.ws-surface-enterprise #main-content .ws-check input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid var(--ws-lime);
  border-bottom: 2px solid var(--ws-lime);
  transform: rotate(-45deg);
  opacity: 0;
}

.ws-surface-enterprise #main-content .ws-check input[type="checkbox"]:checked {
  border-color: var(--ws-ink);
  background: var(--ws-ink);
}

.ws-surface-enterprise #main-content .ws-check input[type="checkbox"]:checked::after {
  opacity: 1;
}

.ws-surface-enterprise #main-content .ws-check input[type="checkbox"]:focus-visible {
  box-shadow: var(--ws-focus-ring);
}

.ws-surface-enterprise #main-content .ws-multi-menu .ws-check {
  color: var(--ws-ink);
}

.ws-surface-enterprise #main-content .ws-multi-menu .ws-check:has(input:checked) {
  font-weight: 600;
}

/* Chevrons point up while a menu is open. */
.ws-surface-enterprise details[open] > summary > svg.icon,
.ws-surface-enterprise .ws-select-trigger[aria-expanded="true"] > svg.icon {
  transform: rotate(180deg);
}

.ws-surface-enterprise .ws-intel3-more[open] > summary > svg.icon {
  transform: none;
}

/* The whole field is the target. */
.ws-surface-enterprise details.ws-multi > summary {
  position: absolute;
  inset: 0;
  justify-content: center;
  padding: 6px 12px;
}

.ws-surface-enterprise details.ws-multi {
  padding: 0;
}

.ws-surface-enterprise details.ws-multi[open] {
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise .ws-multi-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px;
  background: var(--ws-white);
  border-bottom: 1px solid var(--ws-rule);
}

.ws-surface-enterprise #main-content .ws-multi-search input {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--ws-graphite);
  background: var(--ws-paper);
  font: 400 13px/1.3 var(--ws-font-sans);
}

/* Custom select (frame 19, "Select · open"); the native select stays underneath for the form. */
.ws-surface-enterprise .ws-select {
  position: relative;
}

.ws-surface-enterprise .ws-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.ws-surface-enterprise #main-content .ws-select-trigger {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--ws-ink);
  text-align: left;
  cursor: pointer;
}

.ws-surface-enterprise #main-content .ws-select-trigger .ws-field-value {
  padding-right: 24px;
}

.ws-surface-enterprise .ws-select-trigger > svg.icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.ws-surface-enterprise .ws-field.ws-select:has(.ws-select-trigger[aria-expanded="true"]) {
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise .ws-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 200px;
  max-height: 320px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  background: var(--ws-white);
  border: 1px solid var(--ws-rule-strong);
  box-shadow: var(--ws-shadow-overlay);
  list-style: none;
}

.ws-surface-enterprise .ws-select-menu[hidden] {
  display: none;
}

.ws-surface-enterprise .ws-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px 0 16px;
  color: var(--ws-ink);
  font: 400 14px/1.3 var(--ws-font-sans);
  cursor: pointer;
}

.ws-surface-enterprise .ws-select-option[aria-selected="true"] {
  font-weight: 600;
}

.ws-surface-enterprise .ws-select-option > svg.icon {
  visibility: hidden;
}

.ws-surface-enterprise .ws-select-option[aria-selected="true"] > svg.icon {
  visibility: visible;
}

.ws-surface-enterprise .ws-select-option.is-active {
  background: var(--ws-stone);
  box-shadow: inset 3px 0 0 var(--ws-ink);
}

/* Compact inline select (Team rows). */
.ws-surface-enterprise .ws-v3-select-wrap.ws-select {
  min-width: 128px;
  min-height: 40px;
  background: var(--ws-paper);
  border-bottom: 1px solid var(--ws-graphite);
}

.ws-surface-enterprise .ws-v3-select-wrap.ws-select .ws-select-trigger {
  font: 400 14px/1.3 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-v3-select-wrap.ws-select .ws-select-trigger > svg.icon {
  bottom: 12px;
}

/* List or map: the map replaces the list when "Map" is chosen (frames 01, 16). */
.ws-surface-enterprise .ws-content:has(> .ws-intel3[data-intelligence-explorer]) {
  position: relative;
}

.ws-surface-enterprise .ws-intel3[data-intelligence-explorer] .ws-intel3-map {
  position: absolute;
  left: var(--ws-content-gutter);
  right: var(--ws-content-gutter);
  visibility: hidden;
  pointer-events: none;
}

.ws-surface-enterprise .ws-intel3.ws-view-map .ws-intel3-map,
.ws-surface-enterprise .ws-intel3:has(#ws-intel3-map:target) .ws-intel3-map {
  position: static;
  visibility: visible;
  pointer-events: auto;
}

.ws-surface-enterprise .ws-intel3.ws-view-map .ws-intel3-layout,
.ws-surface-enterprise .ws-intel3:has(#ws-intel3-map:target) .ws-intel3-layout {
  display: none;
}

.ws-surface-enterprise .ws-intel3.ws-view-map .ws-intel3-resultsbar .ws-segmented a[href="#ws-intel3-results"],
.ws-surface-enterprise .ws-intel3:has(#ws-intel3-map:target) .ws-intel3-resultsbar .ws-segmented a[href="#ws-intel3-results"] {
  background: transparent;
  color: var(--ws-ink);
}

.ws-surface-enterprise .ws-intel3.ws-view-map .ws-intel3-resultsbar .ws-segmented a[href="#ws-intel3-map"],
.ws-surface-enterprise .ws-intel3:has(#ws-intel3-map:target) .ws-intel3-resultsbar .ws-segmented a[href="#ws-intel3-map"] {
  background: var(--ws-ink);
  color: var(--ws-white);
}

.ws-surface-enterprise .ws-intel3-previews.ws-js-previews .ws-intel3-preview:not(.is-shown) {
  display: none;
}

.ws-surface-enterprise .ws-intel3-previews.ws-js-previews .ws-intel3-preview.is-shown {
  display: flex;
}

/* Preview actions stacked with room between them. */
.ws-surface-enterprise .ws-intel3-preview-actions {
  flex-direction: column;
  gap: 8px;
}

.ws-surface-enterprise .ws-intel3-preview-actions .ws-btn {
  width: 100%;
  justify-content: center;
}

/* Between tablet and wide desktop the side-by-side cards would squeeze the role matrix and key panel. */
@media (max-width: 1279.98px) {
  .ws-surface-enterprise .ws-v3-grid-keys,
  .ws-surface-enterprise .ws-v3-grid-account {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Activity strip (frames 01 / 07, handoff §6.17) */
.ws-surface-enterprise .ws-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-strip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
  list-style: none;
}

.ws-surface-enterprise .ws-strip-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ws-surface-enterprise .ws-strip-key {
  display: inline-block;
  width: 8px;
  height: 8px;
}

.ws-surface-enterprise .ws-strip-chart {
  position: relative;
  padding-bottom: 24px;
}

.ws-surface-enterprise .ws-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 72px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ws-rule-strong);
  list-style: none;
  user-select: none;
}

.ws-surface-enterprise .ws-strip-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 2px;
  height: 100%;
  cursor: crosshair;
}

.ws-surface-enterprise .ws-strip-col:hover {
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-strip-col.is-range {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-strip-seg {
  display: block;
  width: 100%;
}

.ws-surface-enterprise .ws-strip-critical { background: var(--ws-severity-critical); }
.ws-surface-enterprise .ws-strip-high { background: var(--ws-severity-high); }
.ws-surface-enterprise .ws-strip-moderate { background: var(--ws-severity-moderate); }
.ws-surface-enterprise .ws-strip-low { background: var(--ws-severity-low); }
.ws-surface-enterprise .ws-strip-none { background: var(--ws-rule-strong); }

.ws-surface-enterprise .ws-strip-legend .ws-strip-none {
  background: transparent;
  border: 1px solid var(--ws-graphite);
}

.ws-surface-enterprise .ws-strip-ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-mono);
}

.ws-surface-enterprise .ws-strip-ticks span {
  position: absolute;
  white-space: nowrap;
}

.ws-surface-enterprise .ws-strip-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Overview hero (frame 08) */
.ws-surface-enterprise .ws-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding: 40px 32px 32px;
  background: #0b0b0b;
  color: #ffffff;
}

.ws-surface-enterprise .ws-hero-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: #a8a79f;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-hero-live::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ws-lime);
}

.ws-surface-enterprise .ws-hero-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ws-surface-enterprise #main-content a.ws-hero-figure {
  display: block;
  color: #ffffff;
  text-decoration: none;
}

.ws-surface-enterprise #main-content a.ws-hero-figure:hover .ws-hero-label {
  text-decoration: underline;
}

.ws-surface-enterprise #main-content a.ws-hero-figure:focus-visible {
  box-shadow: var(--ws-focus-ring-on-ink);
}

.ws-surface-enterprise .ws-hero-value {
  margin: 0;
  font: 700 44px/1 var(--ws-font-sans);
  letter-spacing: -0.02em;
}

.ws-surface-enterprise .ws-hero-label {
  margin: 8px 0 0;
  font: 600 14px/1.3 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-hero-sub {
  margin: 4px 0 0;
  color: #a8a79f;
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-hero-trend-head {
  display: flex;
  justify-content: space-between;
  margin: 0 0 16px;
  color: #a8a79f;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-hero-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 96px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-hero-bars li {
  flex: 1 1 0;
  min-height: 2px;
  background: #a8a79f;
}

.ws-surface-enterprise .ws-hero-bars li.is-today {
  background: var(--ws-lime);
}

@media (max-width: 1023.98px) {
  .ws-surface-enterprise .ws-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .ws-surface-enterprise .ws-hero-figures {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Topbar search and ⌘K palette (frame 20) */
.ws-surface-enterprise .ws-topbar-search {
  align-items: center;
  gap: 8px;
  width: 360px;
  height: 40px;
  margin: 0;
  padding: 0 8px 0 12px;
  border: 1px solid var(--ws-rule);
  background: var(--ws-paper);
  color: var(--ws-graphite);
  font: 400 14px/1.3 var(--ws-font-sans);
  text-align: left;
  cursor: text;
}

.ws-surface-enterprise .ws-topbar-search span {
  flex: 1 1 auto;
}

.ws-surface-enterprise kbd {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid var(--ws-rule-strong);
  background: var(--ws-white);
  color: var(--ws-graphite);
  font: 400 11px/1.3 var(--ws-font-mono);
  box-shadow: none;
}

.ws-surface-enterprise dialog.ws-palette {
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--ws-rule-strong);
  background: var(--ws-white);
  color: var(--ws-ink);
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise dialog.ws-palette[open] {
  display: flex;
  flex-direction: column;
}

.ws-surface-enterprise dialog.ws-palette::backdrop {
  background: rgba(11, 11, 11, 0.45);
}

.ws-surface-enterprise .ws-palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ws-rule);
}

.ws-surface-enterprise .ws-palette-search input {
  box-shadow: none !important;
  border-radius: 0;
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  border: 0;
  background: transparent;
  color: var(--ws-ink);
  font: 400 16px/1.3 var(--ws-font-sans);
  outline: none;
}

.ws-surface-enterprise .ws-palette-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0;
}

.ws-surface-enterprise .ws-palette-group {
  margin: 8px 16px 4px;
  color: var(--ws-graphite);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 0 16px;
  cursor: pointer;
}

.ws-surface-enterprise .ws-palette-item.is-active {
  background: var(--ws-stone);
  box-shadow: inset 3px 0 0 var(--ws-ink);
}

.ws-surface-enterprise .ws-palette-title {
  overflow: hidden;
  font: 400 14px/1.3 var(--ws-font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-surface-enterprise .ws-palette-meta {
  flex: none;
  color: var(--ws-graphite);
  font: 400 12px/1.3 var(--ws-font-mono);
}

.ws-surface-enterprise .ws-palette-status {
  margin: 0;
  padding: 0 16px 8px;
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--ws-rule);
  background: var(--ws-paper);
  color: var(--ws-graphite);
  font: 400 12px/1.35 var(--ws-font-sans);
}

@media (max-width: 1279.98px) {
  .ws-surface-enterprise .ws-topbar-search {
    width: 240px;
  }
}

@media (max-width: 1023.98px) {
  .ws-surface-enterprise .ws-topbar-search span {
    display: none;
  }

  .ws-surface-enterprise .ws-topbar-search {
    width: auto;
  }
}

/* Theme switch (frame 21) */
.ws-surface-enterprise .ws-theme-switch {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ws-rule);
  background: var(--ws-white);
}

.ws-surface-enterprise .ws-theme-switch button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ws-ink);
  cursor: pointer;
}

.ws-surface-enterprise .ws-theme-switch button:hover {
  background: var(--ws-stone);
}

.ws-surface-enterprise .ws-theme-switch button[aria-pressed="true"] {
  background: var(--ws-ink);
  color: var(--ws-white);
}

/* Dark theme adjustments for surfaces drawn with fixed ink. */
.ws-surface-enterprise[data-ws-theme="dark"] .ws-code,
.ws-surface-enterprise[data-ws-theme="dark"] .ws-hero,
.ws-surface-enterprise[data-ws-theme="dark"] .ws-toast {
  outline: 1px solid var(--ws-rule);
}

.ws-surface-enterprise[data-ws-theme="dark"] .ws-btn-primary:hover,
.ws-surface-enterprise[data-ws-theme="dark"] #main-content button.ws-btn-primary:hover {
  background: #d6d5ce;
}

@media (prefers-color-scheme: dark) {
  .ws-surface-enterprise[data-ws-theme="system"] .ws-code,
  .ws-surface-enterprise[data-ws-theme="system"] .ws-hero,
  .ws-surface-enterprise[data-ws-theme="system"] .ws-toast {
    outline: 1px solid var(--ws-rule);
  }

  .ws-surface-enterprise[data-ws-theme="system"] .ws-btn-primary:hover,
  .ws-surface-enterprise[data-ws-theme="system"] #main-content button.ws-btn-primary:hover {
    background: #d6d5ce;
  }
}

/* Self-hosted map (frames 01, 02, 16) */
.ws-surface-enterprise .ws-map3 {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-surface-enterprise .ws-map3-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ws-surface-enterprise .ws-map3-canvas {
  position: relative;
  height: 560px;
  background: #141a19;
}

.ws-surface-enterprise .ws-map3-detail .ws-map3-canvas {
  height: 320px;
}

.ws-surface-enterprise .ws-map3-legend {
  position: absolute;
  left: 12px;
  bottom: 44px;
  z-index: 2;
  padding: 10px 12px;
  background: rgba(11, 11, 11, 0.9);
  color: #e9ece9;
  font: 400 12px/1.4 var(--ws-font-sans);
  pointer-events: none;
}

.ws-surface-enterprise .ws-map3-detail .ws-map3-legend {
  position: static;
  pointer-events: auto;
}

.ws-surface-enterprise .ws-map3-legend p {
  margin: 0 0 6px;
  color: #a8a79f;
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ws-surface-enterprise .ws-map3-legend ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-map3-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-surface-enterprise .ws-map3-key-square,
.ws-surface-enterprise .ws-map3-key-area,
.ws-surface-enterprise .ws-map3-key-selected {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
}

.ws-surface-enterprise .ws-map3-key-square {
  background: #ffffff;
  outline: 1px solid #0b0b0b;
}

.ws-surface-enterprise .ws-map3-key-area {
  border: 1px dashed #e9ece9;
  border-radius: 50%;
}

.ws-surface-enterprise .ws-map3-key-selected {
  background: var(--ws-lime);
}

.ws-surface-enterprise .ws-map3 .maplibregl-ctrl-group {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #2e2e2c;
  background: #0b0b0b;
}

.ws-surface-enterprise #main-content .ws-map3 .maplibregl-ctrl-group button {
  display: block;
  width: 32px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #0b0b0b;
  box-shadow: none;
}

.ws-surface-enterprise #main-content .ws-map3 .maplibregl-ctrl-group button:hover {
  background-color: #222220;
}

.ws-surface-enterprise .ws-map3 .maplibregl-ctrl-group button + button {
  border-top-color: #2e2e2c;
}

.ws-surface-enterprise .ws-map3 .maplibregl-ctrl-icon {
  filter: invert(1);
}

.ws-surface-enterprise .ws-map3 .maplibregl-ctrl-attrib {
  background: rgba(11, 11, 11, 0.8);
  color: #a8a79f;
}

.ws-surface-enterprise .ws-map3 .maplibregl-ctrl-attrib a {
  color: #e9ece9;
}

.ws-surface-enterprise .ws-map-popup .maplibregl-popup-content {
  padding: 12px 28px 12px 12px;
  border-radius: 0;
  background: #0b0b0b;
  color: #ffffff;
  box-shadow: var(--ws-shadow-overlay);
}

.ws-surface-enterprise .ws-map-popup .maplibregl-popup-tip {
  border-top-color: #0b0b0b;
  border-bottom-color: #0b0b0b;
}

.ws-surface-enterprise #main-content .ws-map-popup .maplibregl-popup-close-button {
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a8a79f;
  font: 400 16px/1 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-map-popup-title {
  margin: 0;
  font: 600 13px/1.35 var(--ws-font-sans);
}

.ws-surface-enterprise .ws-map-popup-meta {
  margin: 4px 0 8px;
  color: #a8a79f;
  font: 400 12px/1.35 var(--ws-font-mono);
}

.ws-surface-enterprise .ws-map-popup a {
  color: var(--ws-lime);
  font: 500 12px/1.35 var(--ws-font-sans);
}

@media (max-width: 767.98px) {
  .ws-surface-enterprise .ws-map3-canvas {
    height: 420px;
  }

  .ws-surface-enterprise .ws-map3-legend {
    position: static;
    pointer-events: auto;
  }
}

.ws-surface-enterprise .ws-v3-row-actions {
  display: inline-flex;
  gap: 16px;
}

/* Timeline: evidence added / linked event observed (frames 02, 03) */
.ws-surface-enterprise .ws-timeline-linked .ws-timeline-marker {
  background: var(--ws-white);
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

.ws-surface-enterprise .ws-timeline-keys {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ws-surface-enterprise .ws-timeline-key-linked {
  background: var(--ws-white);
  box-shadow: inset 0 0 0 2px var(--ws-ink);
}

/* The hidden map never shows anything (MapLibre controls set their own visibility). */
.ws-surface-enterprise .ws-intel3[data-intelligence-explorer]:not(.ws-view-map):not(:has(#ws-intel3-map:target)) .ws-intel3-map * {
  visibility: hidden !important;
}

/* Disabled field (handoff §6.3): stone background, muted value. */
.ws-surface-enterprise .ws-field.is-disabled {
  background: var(--ws-stone);
  border-bottom-color: var(--ws-rule-strong);
  cursor: not-allowed;
}

.ws-surface-enterprise #main-content .ws-field.is-disabled input {
  color: var(--ws-muted);
  cursor: not-allowed;
  pointer-events: none; /* disabled inputs swallow hover; the field shows the tooltip instead */
}

.ws-surface-enterprise .ws-field.is-disabled .ws-field-label {
  color: var(--ws-muted);
}

/* Start here guide, Explorer view actions and Alerts. */
.ws-surface-enterprise .ws-v3-start {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise #main-content .ws-v3-start a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 2px 10px;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--ws-rule);
  border-radius: 6px;
  color: var(--ws-ink);
  text-decoration: none;
}

.ws-surface-enterprise #main-content .ws-v3-start a:hover {
  border-color: var(--ws-rule-strong);
  background: var(--ws-paper);
}

.ws-surface-enterprise .ws-v3-start-mark {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ws-stone);
  font: 600 12px/1 var(--ws-font-mono);
}

.ws-surface-enterprise .ws-v3-start-done .ws-v3-start-mark {
  background: var(--ws-lime);
  color: #0b0b0b;
}

.ws-surface-enterprise .ws-v3-start-mark svg.icon {
  width: 14px;
  height: 14px;
}

.ws-surface-enterprise .ws-v3-start-title {
  font-weight: 600;
}

.ws-surface-enterprise .ws-v3-start-done .ws-v3-start-title {
  color: var(--ws-muted);
}

.ws-surface-enterprise .ws-intel3-watch {
  display: inline-block;
}

.ws-surface-enterprise #main-content .ws-intel3-action {
  height: 36px;
  margin: 0;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.ws-surface-enterprise #main-content .ws-intel3-action[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.ws-surface-enterprise .ws-intel3-resultsbar .ws-intel3-chips {
  flex: 1 1 auto;
}

.ws-surface-enterprise .ws-v3-watch-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.ws-surface-enterprise .ws-v3-watch-email {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.ws-surface-enterprise .ws-nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--ws-lime);
  color: #0b0b0b;
  font: 600 11px/16px var(--ws-font-mono);
  text-align: center;
}

.ws-surface-enterprise .ws-v3-alerts-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-surface-enterprise #main-content .ws-v3-alerts-tools button.ws-btn {
  margin: 0;
}

.ws-surface-enterprise .ws-v3-alerts-empty,
.ws-surface-enterprise .ws-v3-alerts-more {
  margin: 0;
  padding: 16px 20px;
}

.ws-surface-enterprise .ws-v3-watch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ws-surface-enterprise .ws-v3-watch-actions form,
.ws-surface-enterprise #main-content .ws-table td form {
  margin: 0;
}

.ws-surface-enterprise #main-content .ws-v3-watch-actions button.ws-link-button,
.ws-surface-enterprise #main-content .ws-table td form button.ws-link-button {
  height: auto;
  margin: 0;
}

/* Help & API guide (frame 15): the existing guide in the v3 look, contents kept in view. */
.ws-surface-enterprise .ws-help-layout .howto-toc {
  position: sticky;
  top: 88px;
}

.ws-surface-enterprise .ws-help-layout .howto-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-surface-enterprise .ws-help-layout .howto-toc li a {
  display: block;
  padding: 6px 0;
  color: var(--ws-ink);
  text-decoration: none;
}

.ws-surface-enterprise .ws-help-layout .howto-toc li a:hover {
  text-decoration: underline;
}

.ws-surface-enterprise .ws-help-layout .playbook .card-title {
  margin-bottom: 12px;
  font: 600 22px/1.2 var(--ws-font-sans);
  letter-spacing: -0.01em;
  text-transform: none;
}

.ws-surface-enterprise .ws-help-layout .playbook pre,
.ws-surface-enterprise .ws-help-layout .playbook .code-block {
  padding: 16px;
  background: #0b0b0b;
  color: #a8a79f;
  font: 400 12px/1.5 var(--ws-font-mono);
}

/* Access flows (frame 18): sign in and accept invite on paper with the brand mark. */
.ws-surface-enterprise.ws-auth-v3 {
  min-height: 100vh;
}

.ws-surface-enterprise.ws-auth-v3 .card {
  border: 1px solid var(--ws-rule);
  box-shadow: none;
}

.ws-surface-enterprise.ws-auth-v3 .card-body {
  padding: 40px;
}

.ws-surface-enterprise.ws-auth-v3 h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 22px/1 var(--ws-font-sans);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ws-surface-enterprise.ws-auth-v3 h1::before {
  content: "";
  width: 20px;
  height: 20px;
  background: linear-gradient(var(--ws-lime), var(--ws-lime)) top left / 100% 5px no-repeat,
    linear-gradient(var(--ws-lime), var(--ws-lime)) top left / 5px 100% no-repeat;
}

.ws-surface-enterprise.ws-auth-v3 .form-control {
  min-height: var(--ws-field-height);
  border: 0;
  border-bottom: 1px solid var(--ws-graphite);
  background: var(--ws-paper);
}

.ws-surface-enterprise.ws-auth-v3 .btn {
  min-height: var(--ws-control-height);
  font: 600 11px/1.3 var(--ws-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Tablet and mobile (< 1024 px): dark app bar instead of the sidebar --- */
@media (max-width: 1023.98px) {
  .ws-surface-enterprise {
    --ws-content-gutter: 24px;
  }

  .ws-surface-enterprise .ws-shell {
    display: block;
  }

  .ws-surface-enterprise .ws-sidebar,
  .ws-surface-enterprise .ws-topbar {
    display: none;
  }

  .ws-surface-enterprise .ws-appbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    background: #0b0b0b;
    color: #ffffff;
  }

  .ws-surface-enterprise .ws-appbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 var(--ws-content-gutter);
  }

  .ws-surface-enterprise .ws-appbar details > summary {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    cursor: pointer;
    list-style: none;
  }

  .ws-surface-enterprise .ws-appbar details > summary::-webkit-details-marker {
    display: none;
  }

  .ws-surface-enterprise .ws-appbar-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 56px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 8px var(--ws-content-gutter) 24px;
    background: #0b0b0b;
    border-top: 1px solid #2e2e2c;
  }

  .ws-surface-enterprise .ws-appbar-panel .ws-orgswitch {
    margin-top: 8px;
  }

  .ws-surface-enterprise .ws-page-title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -1px;
  }

  .ws-surface-enterprise .ws-intel3-filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .ws-surface-enterprise .ws-intel3-layout,
  .ws-surface-enterprise .ws-intel3-record {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-intel3-previews {
    position: static;
  }

  .ws-surface-enterprise .ws-v3-grid,
  .ws-surface-enterprise .ws-v3-grid-even,
  .ws-surface-enterprise .ws-v3-grid-keys,
  .ws-surface-enterprise .ws-v3-grid-account,
  .ws-surface-enterprise .ws-v3-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-help-layout .howto-toc {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .ws-surface-enterprise {
    --ws-content-gutter: 16px;
  }

  .ws-surface-enterprise .ws-content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .ws-surface-enterprise .ws-page-title {
    font-size: 28px;
    line-height: 32px;
  }

  .ws-surface-enterprise .ws-intel3-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-intel3-toolbar > .ws-card-meta {
    margin-left: 0;
  }

  .ws-surface-enterprise .ws-v3-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-v3-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-surface-enterprise .ws-toasts {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .ws-surface-enterprise .ws-v3-confirm-body {
    width: min(300px, 80vw);
  }

  .ws-surface-enterprise .ws-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--ws-white);
    border-top: 1px solid var(--ws-rule);
  }

  .ws-surface-enterprise .ws-tabbar > a,
  .ws-surface-enterprise .ws-tabbar > details {
    flex: 1 1 0;
    min-width: 0;
  }

  .ws-surface-enterprise .ws-tabbar a,
  .ws-surface-enterprise .ws-tabbar summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    color: var(--ws-graphite);
    font: 500 11px/1.2 var(--ws-font-sans);
    text-decoration: none;
    cursor: pointer;
    list-style: none;
  }

  .ws-surface-enterprise .ws-tabbar summary::-webkit-details-marker {
    display: none;
  }

  .ws-surface-enterprise .ws-tabbar svg.icon {
    width: 20px;
    height: 20px;
  }

  .ws-surface-enterprise .ws-tabbar a[aria-current="page"] {
    box-shadow: inset 0 2px 0 var(--ws-ink);
    color: var(--ws-ink);
    font-weight: 600;
  }

  .ws-surface-enterprise .ws-tabbar-more {
    position: relative;
  }

  .ws-surface-enterprise .ws-tabbar-more-panel {
    position: absolute;
    right: 8px;
    bottom: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    min-width: 220px;
    padding: 4px 0;
    background: var(--ws-white);
    border: 1px solid var(--ws-rule-strong);
    box-shadow: var(--ws-shadow-overlay);
  }

  .ws-surface-enterprise .ws-tabbar-more-panel a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 400;
  }
}

@media print {
  .ws-surface-enterprise .ws-sidebar,
  .ws-surface-enterprise .ws-topbar,
  .ws-surface-enterprise .ws-appbar,
  .ws-surface-enterprise .ws-tabbar,
  .ws-surface-enterprise .ws-preview-bar {
    display: none;
  }

  .ws-surface-enterprise .ws-shell {
    display: block;
  }
}
