:root {
  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --card: #ffffff;
  --text: #0f1c2e;
  --muted: #546179;
  --line: #d5deea;
  --line-strong: #a8b7c9;
  --accent: #fe6b37;
  --accent-2: #1155cc;
  --warm: #f6b03d;
  --navy: #0a1730;
  --shadow-sm: 0 8px 22px rgba(13, 28, 53, 0.08);
  --shadow-md: 0 18px 40px rgba(13, 28, 53, 0.14);
  --radius-md: 16px;
  --radius-lg: 22px;
}
* { box-sizing: border-box; }
html,
body {
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% -12%, rgba(41, 102, 255, 0.14) 0%, transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(254, 107, 55, 0.13) 0%, transparent 56%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 62%);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(17, 85, 204, 0.05), transparent 28%, transparent 72%, rgba(254, 107, 55, 0.05));
  opacity: 0.5;
  z-index: -1;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 120;
  border-radius: 10px;
  border: 1px solid rgba(135, 169, 229, 0.62);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  transform: translateY(-180%);
  transition: transform 0.16s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}
.topbar {
  border-bottom: 1px solid rgba(76, 102, 143, 0.3);
  background: linear-gradient(180deg, rgba(10, 23, 48, 0.96) 0%, rgba(10, 23, 48, 0.92) 100%);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 28px rgba(3, 10, 22, 0.35);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
}
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(151, 183, 234, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #d6e3fb;
  font-weight: 700;
  box-shadow: none;
}
.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(151, 183, 234, 0.7);
}
.mobile-nav-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 158, 241, 0.28);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  min-width: 0;
}
.brand-logo {
  display: block;
  height: 70px;
  width: auto;
  max-width: min(78vw, 520px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.28));
}
.nav-links {
  display: flex;
  gap: 8px;
  flex: 1 1 420px;
  min-width: 0;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #d6e3fb;
  font-weight: 600;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.nav-links a:hover {
  text-decoration: none;
  border-color: rgba(135, 169, 229, 0.5);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.nav-links a:focus-visible {
  outline: none;
  border-color: rgba(159, 193, 246, 0.82);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(94, 154, 241, 0.25);
}
.topbar-admin-menu {
  position: relative;
}
.topbar-admin-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #d6e3fb;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.topbar-admin-menu > summary::-webkit-details-marker {
  display: none;
}
.topbar-admin-menu > summary:hover,
.topbar-admin-menu[open] > summary {
  border-color: rgba(135, 169, 229, 0.5);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.topbar-admin-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 4px;
  background: rgba(8, 20, 42, 0.98);
  border: 1px solid rgba(135, 169, 229, 0.42);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 14px 28px rgba(7, 13, 24, 0.38);
  z-index: 40;
}
.topbar-admin-menu-list a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
}
.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}
.userbox:empty { display: none; }
.userbox > span {
  color: #e5efff;
  min-width: 0;
  max-width: min(38vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.userbox form { margin: 0; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 16px 30px;
}
.page-head {
  margin-bottom: 16px;
}
.page-head h1 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.65rem, 2.8vw, 2.42rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.page-head .muted {
  max-width: 860px;
}
.muted { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid rgba(176, 191, 214, 0.55);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  margin-top: 0;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-width: 0;
}
.settings-layout > * {
  min-width: 0;
}
.billing-page {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.settings-block {
  border: 1px solid rgba(176, 191, 214, 0.55);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.settings-block h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.settings-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.settings-kpi {
  border: 1px solid rgba(176, 191, 214, 0.58);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}
.settings-kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.settings-kpi-value {
  margin-top: 4px;
  font-weight: 700;
}
.settings-note {
  margin: 8px 0 0;
  color: var(--muted);
}
.settings-callout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgba(176, 191, 214, 0.45);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}
.billing-trial-banner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  border-color: rgba(255, 123, 59, 0.45);
  background: linear-gradient(135deg, rgba(255, 244, 233, 0.96) 0%, rgba(255, 249, 241, 0.98) 100%);
}
.billing-trial-banner-copy {
  display: grid;
  gap: 6px;
}
.billing-trial-banner-copy h3 {
  margin: 0;
}
.billing-trial-banner-copy p {
  margin: 0;
  color: var(--muted);
}
.billing-trial-banner-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 123, 59, 0.14);
  border: 1px solid rgba(255, 123, 59, 0.3);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}
.settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.danger-card {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(180deg, #fff7f7 0%, #fff2f2 100%);
}
.danger-text {
  color: #b91c1c;
}
.billing-usage-stack {
  display: grid;
  gap: 14px;
}
.billing-usage-row {
  display: grid;
  gap: 6px;
}
.billing-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.billing-meter {
  height: 10px;
  border-radius: 999px;
  background: #e6edf7;
  overflow: hidden;
}
.billing-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8b3d 0%, #ffb15a 100%);
}
.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.billing-plans-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}
.billing-plans-head h4 {
  margin: 0 0 6px;
}
.billing-period-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(176, 191, 214, 0.58);
  background: #fff;
}
.billing-period-toggle-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}
.billing-period-toggle-button.is-active {
  background: linear-gradient(135deg, #ff8b3d 0%, #ffb15a 100%);
  color: #fff;
}
.billing-save-pill {
  display: inline-flex;
  margin-left: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(17, 24, 39, 0.08);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}
.billing-plan-card {
  border: 1px solid rgba(176, 191, 214, 0.58);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.billing-plan-card-recommended {
  border-color: rgba(255, 123, 59, 0.68);
  box-shadow: 0 18px 40px rgba(255, 123, 59, 0.12);
}
.billing-plan-card-active {
  border-color: rgba(255, 123, 59, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 123, 59, 0.18);
}
.billing-plan-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.billing-plan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.billing-recommended-copy {
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
}
.billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 4px;
}
.billing-plan-price-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}
.billing-plan-price-unit {
  color: var(--muted);
  font-weight: 600;
}
.billing-plan-period-copy {
  margin: 0 0 10px;
}
.billing-save-copy {
  display: inline-flex;
  margin-left: 6px;
  color: #126038;
  font-weight: 700;
}
.billing-checkout-state {
  max-width: 920px;
}
.billing-checkout-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}
.billing-checkout-eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.billing-checkout-hero h1 {
  margin: 0 0 10px;
}
.billing-checkout-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}
.billing-checkout-badge-success {
  color: #126038;
  background: rgba(36, 181, 90, 0.12);
  border-color: rgba(36, 181, 90, 0.42);
}
.billing-session-id {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.92em;
}
.billing-checkout-badge-cancel {
  color: #7a4d00;
  background: rgba(246, 176, 61, 0.14);
  border-color: rgba(246, 176, 61, 0.42);
}
.settings-fields.one-col {
  grid-template-columns: minmax(0, 1fr);
}
.settings-fields label {
  display: block;
}
.settings-form-actions {
  margin-top: 12px;
}
.settings-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.billing-page .settings-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.settings-table-wrap table {
  width: max-content;
  min-width: 100%;
  max-width: 100%;
}
.billing-page .settings-table-wrap table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}
.settings-table-wrap td,
.settings-table-wrap th,
.settings-table-wrap code {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.billing-page textarea,
.billing-page input,
.billing-page select {
  width: 100%;
  max-width: 100%;
}
.billing-page code {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
}
.settings-list {
  margin: 8px 0 0;
  padding-left: 18px;
}
.settings-list li {
  margin-bottom: 5px;
}
.settings-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(144, 170, 206, 0.75);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #f3f8ff;
  color: #1c365c;
}
.settings-badge-accent {
  color: #7a4d00;
  background: rgba(246, 176, 61, 0.14);
  border-color: rgba(246, 176, 61, 0.42);
}
.settings-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inline-actions form {
  margin: 0;
}
.status-page {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.status-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(176, 191, 214, 0.65);
  box-shadow: var(--shadow-md);
  padding: 48px;
  max-width: 640px;
  text-align: center;
}
.status-card h1 {
  margin-top: 0;
  font-size: clamp(2.2rem, 3.6vw, 2.8rem);
  font-family: "Space Grotesk", "Manrope", sans-serif;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b2a5c;
  background: rgba(17, 85, 204, 0.12);
  margin-bottom: 18px;
}
.status-note {
  margin-top: 12px;
  font-size: 0.95rem;
}
.status-actions {
  margin-top: 28px;
}
.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}
.hero-content {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid rgba(186, 201, 223, 0.58);
  border-radius: var(--radius-lg);
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-sm);
}
.hero-content h1 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.8rem, 3.3vw, 2.8rem);
  line-height: 1.15;
}
.hero-eyebrow {
  margin: 0 0 8px;
  color: #17439b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-actions {
  margin-top: 14px;
}
.showcase-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  overflow: hidden;
}
.showcase-copy h3 {
  margin: 0 0 10px;
}
.showcase-copy > .muted {
  margin: 0;
}
  .showcase-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
  }
  .showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.showcase-tab {
  width: auto;
  text-align: center;
  border: 1px solid #ccd9ea;
  border-radius: 11px;
  background: #ffffff;
  color: #1f324d;
  padding: 9px 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(20, 37, 59, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.2s ease, background-color 0.18s ease, transform 0.18s ease;
}
.showcase-tab:hover {
  border-color: #84a6d6;
  transform: translateY(-1px);
}
.showcase-tab.is-active {
  border-color: #4f84cc;
  background: linear-gradient(180deg, #f4f9ff 0%, #e8f2ff 100%);
  box-shadow: 0 10px 24px rgba(45, 93, 164, 0.17);
}
.showcase-tab:focus-visible {
  outline: none;
  border-color: #629ce4;
  box-shadow: 0 0 0 3px rgba(98, 156, 228, 0.25);
}
.showcase-stage {
  border: 1px solid rgba(45, 79, 126, 0.55);
  border-radius: 16px;
  overflow: hidden;
  padding: 12px;
  background:
    radial-gradient(820px 240px at 100% -6%, rgba(117, 167, 255, 0.2) 0%, transparent 62%),
    linear-gradient(180deg, rgba(13, 32, 63, 0.97) 0%, rgba(16, 41, 82, 0.97) 100%);
}
.showcase-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f8c663;
  box-shadow: 0 0 0 4px rgba(248, 198, 99, 0.2);
}
.showcase-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(159, 194, 243, 0.35);
  background: rgba(18, 39, 72, 0.58);
  color: #d8e9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.showcase-media-wrap {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 8.6;
  max-height: min(70vh, 580px);
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(151, 187, 237, 0.24);
  background: rgba(6, 16, 32, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(179, 207, 244, 0.1),
    0 18px 34px rgba(8, 18, 34, 0.28);
}
.showcase-media-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(120% 120% at 50% 50%, transparent 63%, rgba(5, 12, 24, 0.2) 100%),
    linear-gradient(180deg, rgba(5, 13, 24, 0.08) 0%, rgba(5, 13, 24, 0) 40%, rgba(5, 13, 24, 0.12) 100%);
}
.showcase-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.showcase-media.is-active {
  opacity: 1;
}
.showcase-canvas {
  transform: scale(1);
  filter: saturate(1.08) contrast(1.04);
}
.showcase-video {
  object-fit: contain;
  object-position: center;
  transform: scale(0.995);
  filter: saturate(1.08) contrast(1.02) brightness(0.98);
}
.grid.cards.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cards.card-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-spotlight {
  border-color: #d0daea;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}
.feature-badge {
  display: inline-flex;
  margin: 0 0 9px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #b9cae3;
  background: #eef5ff;
  color: #2a4d86;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mini-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mini-points > div {
  border: 1px solid #d8e3f1;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 11px;
  display: grid;
  gap: 5px;
}
.pricing-card {
  min-height: 100%;
}
.pricing-card ul {
  margin-bottom: 0;
}
.pricing-price {
  margin: 0 0 12px;
  font-size: 20px;
}
.pricing-card-featured {
  border-color: #f1b78a;
  box-shadow: 0 16px 34px rgba(248, 128, 67, 0.2);
  background: linear-gradient(180deg, #fff8f4 0%, #fff2e9 100%);
}
.security-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .settings-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .billing-trial-banner {
    align-items: stretch;
  }
  .billing-period-toggle {
    width: 100%;
    justify-content: stretch;
  }
  .billing-period-toggle-button {
    flex: 1 1 0;
  }
}
.security-pillar {
  margin: 0;
  padding: 0;
  overflow: visible;
}
.security-pillar summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
}
.security-pillar summary::-webkit-details-marker {
  display: none;
}
.security-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  border: 1px solid #c8d7e6;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  color: #274768;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.security-line {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}
.security-body {
  padding: 0 16px 14px;
}
.security-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.security-pillar summary::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 8px);
  background: #1f2f43;
  color: #f4f9ff;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 8px 22px rgba(21, 30, 44, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 15;
}
.security-pillar summary:hover::after,
.security-pillar summary:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.security-appendix-card h3 {
  margin-top: 0;
}
.narrow { max-width: 580px; margin: 40px auto; }
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.stack { display: grid; gap: 8px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
label {
  color: #4f6075;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
input, select, textarea, button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #6aa6e2;
  box-shadow: 0 0 0 3px rgba(106, 166, 226, 0.2);
}
button, .button {
  background: linear-gradient(135deg, #fe6b37 0%, #ff8a2d 100%);
  color: #fff;
  border: 1px solid #ef6d33;
  cursor: pointer;
  border-radius: 12px;
  padding: 9px 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 10px 22px rgba(254, 107, 55, 0.26);
  transition: transform 0.16s ease, filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
button:hover, .button:hover {
  filter: brightness(1.02);
  transform: translateY(-2px);
  text-decoration: none;
}
button:active, .button:active {
  transform: translateY(-1px);
}
button:focus-visible,
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 158, 241, 0.28), 0 10px 22px rgba(254, 107, 55, 0.22);
}
button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}
.button.ghost {
  background: #ffffff;
  color: #213048;
  border-color: #bfd0e5;
  box-shadow: 0 4px 12px rgba(9, 27, 56, 0.06);
}
.button.ghost:hover {
  background: #f4f8ff;
  border-color: #a7bfdc;
}
button.danger,
.button.danger {
  background: linear-gradient(135deg, #b91c1c 0%, #cf3f3f 100%);
  border-color: #b91c1c;
  color: #fff;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.24);
}
button.approve-neutral,
.button.approve-neutral {
  background: linear-gradient(135deg, #2d8dff 0%, #4eb8ff 100%);
  border-color: #2f89ef;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(45, 141, 255, 0.24);
}
button.approve-active,
.button.approve-active {
  background: linear-gradient(135deg, #1f9d55 0%, #2bb673 100%);
  border-color: #1d8f4e;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 157, 85, 0.24);
}
button.approve-neutral,
.button.approve-neutral,
button.approve-active,
.button.approve-active {
  width: 132px;
  text-align: center;
}
button.tiny {
  font-size: 12px;
  padding: 5px 8px;
}
.button.tiny {
  font-size: 12px;
  padding: 5px 8px;
}
.breakdown-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breakdown-action-btn {
  min-width: 84px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.approval-log-toggle {
  margin-top: 8px;
}
.approval-log-toggle > summary,
.version-history-toggle > summary,
.version-extra-toggle > summary {
  cursor: pointer;
  font-weight: 700;
  color: #2b3c52;
}
.approval-log-toggle[open] > summary,
.version-history-toggle[open] > summary,
.version-extra-toggle[open] > summary {
  margin-bottom: 8px;
}
.version-extra-content {
  margin-top: 10px;
}
.pdf-download-split {
  display: inline-flex;
  align-items: stretch;
}
.pdf-download-split > .button {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.pdf-download-menu {
  position: relative;
}
.pdf-download-menu > summary {
  list-style: none;
  min-width: 36px;
  width: 36px;
  padding: 9px 0;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: 0 10px 22px rgba(254, 107, 55, 0.26);
  color: #fff;
}
.pdf-download-menu > summary::-webkit-details-marker {
  display: none;
}
.pdf-download-menu[open] > summary {
  filter: brightness(1.02);
}
.pdf-download-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(169, 184, 201, 0.7);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(20, 36, 56, 0.18);
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 15;
}
.pdf-download-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #1f2e42;
  text-decoration: none;
}
.pdf-download-list a:hover {
  background: #f2f7ff;
  text-decoration: none;
}
.pdf-download-split:hover > .button,
.pdf-download-split:hover .pdf-download-menu > summary,
.pdf-download-split:focus-within > .button,
.pdf-download-split:focus-within .pdf-download-menu > summary {
  transform: translateY(-2px);
}
textarea.editor {
  min-height: 320px;
  width: 100%;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
}
.preview-frame {
  width: 100%;
  min-height: 700px;
  border: 1px solid rgba(169, 184, 201, 0.55);
  border-radius: var(--radius-md);
  background: #fff;
}
.doc-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid rgba(169, 184, 201, 0.55);
  border-radius: var(--radius-md);
  background: #fff;
}
.table-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(169, 184, 201, 0.5);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
th, td {
  text-align: left;
  padding: 10px 9px;
  border-bottom: 1px solid #e4ebf2;
  vertical-align: top;
}
ul, ol {
  line-height: 1.5;
}
th {
  background: linear-gradient(180deg, #f6fafd 0%, #f0f6fb 100%);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.alert {
  margin-top: 10px;
  border: 1px solid #8eb5e0;
  background: linear-gradient(180deg, #f4f9ff 0%, #eaf4ff 100%);
  border-radius: 10px;
  padding: 9px 10px;
}
.error {
  color: #b91c1c;
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff3f3 0%, #feeeee 100%);
  padding: 9px 10px;
  border-radius: 10px;
}
.tour-card {
  border-color: #8fb9e4;
  background: linear-gradient(180deg, #f2f8ff 0%, #eaf3ff 100%);
}
.tour-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.tour-highlight {
  border-color: #77a8df;
  box-shadow: 0 0 0 2px rgba(119, 168, 223, 0.2), var(--shadow-sm);
}
.comment {
  border: 1px solid rgba(169, 184, 201, 0.45);
  border-radius: 10px;
  padding: 9px;
  margin-top: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(37, 55, 77, 0.05);
}
.comment-head {
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.comment-body {
  white-space: pre-wrap;
  line-height: 1.4;
}
.comment-depth-1 { margin-left: 18px; }
.comment-depth-2 { margin-left: 36px; }
.comment-depth-3 { margin-left: 54px; }
.comment-depth-4 { margin-left: 72px; }
.reply-form { margin-top: 8px; }
.version-history-list {
  display: grid;
  gap: 8px;
}
@media (max-width: 900px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }
  .showcase-shell {
    grid-template-columns: 1fr;
  }
  .showcase-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .showcase-media-wrap {
    max-height: min(54vh, 380px);
    min-height: 220px;
  }
  .hero-content {
    padding: 18px 16px 16px;
  }
  .grid.cards.card-grid-3 {
    grid-template-columns: 1fr;
  }
  .grid.cards.card-grid-2 {
    grid-template-columns: 1fr;
  }
  .mini-points {
    grid-template-columns: 1fr;
  }
  .security-pillars-grid {
    grid-template-columns: 1fr;
  }
}
.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(169, 184, 201, 0.5);
  border-radius: 11px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: #1f2937;
  box-shadow: 0 4px 14px rgba(33, 49, 68, 0.05);
}
.history-item:hover {
  border-color: #7f98b4;
  text-decoration: none;
  transform: translateY(-1px);
}
.history-item.active {
  border-color: #12756a;
  box-shadow: inset 0 0 0 1px #12756a, 0 6px 16px rgba(18, 117, 106, 0.12);
  background: linear-gradient(180deg, #ecfffb 0%, #ddf8f2 100%);
}
.history-item.major {
  border-color: #a8d0f7;
  background: linear-gradient(180deg, #f1f8ff 0%, #e8f2fe 100%);
}
.history-item.major.active {
  border-color: #4d9ced;
  box-shadow: inset 0 0 0 1px #4d9ced, 0 6px 16px rgba(27, 97, 185, 0.16);
  background: linear-gradient(180deg, #dff1ff 0%, #d1e9ff 100%);
}
.history-item.baseline {
  border-color: #9ad3a8;
  background: linear-gradient(180deg, #f4fff6 0%, #ebfaef 100%);
}
.history-item.baseline.active {
  border-color: #4ca867;
  box-shadow: inset 0 0 0 1px #4ca867, 0 6px 16px rgba(34, 116, 58, 0.14);
  background: linear-gradient(180deg, #e7fbe9 0%, #dbf5e2 100%);
}
.history-major-row td {
  background: #eaf3ff;
}
.history-baseline-row td {
  background: #eefbf1;
}
.diff-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}
.diff-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.diff-legend-item {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cedae8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(20, 36, 56, 0.05);
}
.diff-legend-item.changed {
  background: #fef9c3;
  border-color: #facc15;
}
.diff-legend-item.removed {
  background: #fee2e2;
  border-color: #f87171;
}
.diff-legend-item.added {
  background: #dcfce7;
  border-color: #4ade80;
}
.diff-actions {
  margin: 10px 0 8px;
}
.diff-panel {
  border: 1px solid rgba(169, 184, 201, 0.5);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.diff-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6fd 100%);
  border-bottom: 1px solid rgba(169, 184, 201, 0.45);
}
.diff-panel > summary::-webkit-details-marker {
  display: none;
}
.diff-panel-content {
  padding: 12px 14px 14px;
}
.diff-doc-frame {
  min-height: 920px;
  background: #fff;
}
.diff-table th {
  white-space: nowrap;
}
.diff-row.changed td {
  background: #fef9c3;
}
.diff-row.removed td {
  background: #fee2e2;
}
.diff-row.added td {
  background: #dcfce7;
}
.client-compare-toolbar {
  margin: 8px 0 10px;
  align-items: center;
  gap: 12px;
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.client-text-diff-cell {
  min-width: 260px;
  max-width: 440px;
  vertical-align: top;
}
.client-text-diff-block {
  display: block;
}
.client-compare-section.text-diff-off .client-text-diff-block {
  display: none;
}
.client-text-diff-placeholder {
  display: none;
}
.client-compare-section.text-diff-off .client-text-diff-placeholder {
  display: inline;
}
.client-text-diff-item {
  margin-bottom: 8px;
}
.client-totals-diff {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #f8fbff;
}
.client-text-diff-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}
.client-text-diff-collapse > summary {
  cursor: pointer;
  color: #1f4f94;
  font-size: 12px;
}
.inline-diff-segment.equal {
  color: #0f172a;
}
.inline-diff-segment.added {
  background: #dcfce7;
  color: #065f46;
  border-radius: 3px;
  padding: 0 1px;
}
.inline-diff-segment.removed {
  background: #fee2e2;
  color: #7f1d1d;
  text-decoration: line-through;
  border-radius: 3px;
  padding: 0 1px;
}
.client-text-diff-fallback {
  white-space: pre-wrap;
  word-break: break-word;
}
.client-text-diff-fallback.added {
  color: #065f46;
}
.client-text-diff-fallback.removed {
  color: #7f1d1d;
  text-decoration: line-through;
}
.login-wrap { max-width: 900px; margin: 0 auto; padding: 12px; }
.bootstrap pre {
  white-space: pre-wrap;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}
.presence-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
  font-size: 12px;
}
.presence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.editor-root-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.editor-root-grid-wide {
  grid-template-columns: 1fr;
}
.editor-root-span-all {
  grid-column: 1 / -1;
}
.editor-root-span-all textarea {
  min-height: 120px;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}
.editor-root-grid.editor-root-grid-wide {
  width: 100%;
  max-width: none;
}
.editor-root-grid.editor-root-grid-wide .editor-root-span-all {
  max-width: none;
  width: 100%;
}
.document-defaults-card {
  padding-bottom: 10px;
}
.document-defaults-card .editor-root-grid {
  grid-template-columns: 1fr;
}
.document-defaults-card .editor-root-span-all textarea {
  min-height: 140px;
}

.collapsible-card {
  border: 1px solid rgba(155, 168, 199, 0.45);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 14px;
}
.collapsible-card summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
}
.collapsible-card summary h3 {
  margin: 0;
  font-size: 20px;
}
.collapsible-card summary .summary-text {
  margin: 4px 0 0;
}
.collapsible-card summary::-webkit-details-marker {
  display: none;
}
.collapsible-card summary:after {
  content: '+';
  font-weight: 700;
  font-size: 20px;
  color: #5b6c90;
}
.collapsible-card[open] summary:after {
  content: '–';
}
.collapsible-content {
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(159, 173, 204, 0.35);
  background: rgba(255, 255, 255, 0.03);
}
.hierarchy-builder {
  margin-top: 12px;
  border: 1px dashed #b7c7d8;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #f4f9ff 100%);
}
.builder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.builder-grid-task {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
.editor-table {
  min-width: 1700px;
  border: 1px solid rgba(169, 184, 201, 0.58);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.editor-table th {
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  font-size: 12px;
  white-space: nowrap;
}
.editor-table td {
  min-width: 120px;
}
.editor-table td:last-child,
.editor-table th:last-child {
  min-width: 86px;
  width: 86px;
}
.editor-table input,
.editor-table textarea {
  width: 100%;
  min-width: 120px;
  font-size: 12px;
  padding: 6px 8px;
}
.editor-table textarea {
  min-height: 54px;
  resize: vertical;
}
@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .settings-fields { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; }
  .topbar-admin-menu-list {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
  }
  .brand-logo {
    height: 62px;
    max-width: 86vw;
  }
  .editor-root-grid { grid-template-columns: 1fr; }
  .builder-grid { grid-template-columns: 1fr; }
  .builder-grid-task { grid-template-columns: 1fr; }
  .history-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .diff-form-grid { grid-template-columns: 1fr; }
  .diff-doc-frame { min-height: 700px; }
}

.wbs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.wbs-tree {
  border: 1px solid rgba(169, 184, 201, 0.56);
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfeff 0%, #f6fbff 100%);
  padding: 10px;
  min-height: 220px;
  box-shadow: var(--shadow-sm);
}
.wbs-root {
  display: grid;
  gap: 4px;
}
.wbs-branch {
  display: grid;
  gap: 4px;
}
.wbs-node {
  display: grid;
  grid-template-columns: 18px minmax(120px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(176, 191, 207, 0.2);
  border-radius: 10px;
  padding: 5px 6px;
  background: #ffffff;
}
.wbs-node:hover {
  border-color: #a8bbd0;
  box-shadow: 0 4px 10px rgba(34, 54, 75, 0.08);
}
.wbs-node.selected {
  border-color: #12756a;
  box-shadow: inset 0 0 0 1px #12756a, 0 6px 14px rgba(18, 117, 106, 0.14);
  background: linear-gradient(180deg, #edfffc 0%, #e4faf5 100%);
}
.wbs-node.level-1 { margin-left: 18px; }
.wbs-node.level-2 { margin-left: 40px; }
.wbs-node.level-3 { margin-left: 66px; }
.wbs-node.level-4 { margin-left: 86px; }
.wbs-children {
  display: grid;
  gap: 4px;
}
.wbs-toggle {
  border: none;
  background: transparent;
  color: #334155;
  padding: 0;
  width: 18px;
  height: 18px;
}
.wbs-toggle-placeholder {
  width: 18px;
  height: 18px;
}
.node-main {
  min-width: 0;
}
.wbs-label {
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
}
.wbs-inline-input {
  width: 100%;
  min-width: 120px;
  padding: 5px 7px;
  font-size: 13px;
}
.node-count {
  font-size: 11px;
  color: #374151;
  border: 1px solid #c8d5e3;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f4f8fc;
  white-space: nowrap;
}
.icon-btn {
  width: 26px;
  min-width: 26px;
  height: 26px;
  line-height: 24px;
  padding: 0;
  text-align: center;
  border: 1px solid #c8d5e2;
  border-radius: 8px;
  background: #f9fcff;
  color: #1d344a;
}
.icon-btn:hover {
  border-color: #7f9dba;
  background: #eef7ff;
}
.save-pill {
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.save-pill.saving {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}
.save-pill.saved {
  color: #166534;
  background: #ecfdf5;
  border-color: #86efac;
}
.save-pill.error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.retry-btn {
  border: 1px solid #fca5a5;
  background: #fff;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 10px;
  padding: 2px 7px;
}
.wbs-quick-add {
  margin-left: 34px;
  border: 1px dashed #afc1d6;
  background: #f4f9ff;
  border-radius: 8px;
  padding: 8px;
}
.quick-add-input {
  width: 100%;
}
.quick-add-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}
.wbs-empty-root {
  border: 1px dashed #b4c5d8;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}
.wbs-empty-root p {
  margin: 0 0 10px;
}
.wbs-empty-state {
  margin-left: 34px;
  border: 1px dashed #bbc9d8;
  border-radius: 8px;
  padding: 8px;
  background: #fbfdff;
}
.wbs-bulk-add {
  margin-left: 34px;
  border: 1px solid #ccd8e5;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.wbs-bulk-add label {
  font-size: 12px;
  color: #475569;
}
.task-inline-editor {
  margin-left: 34px;
  margin-top: 4px;
  border: 1px solid #ccd8e5;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 5px 14px rgba(29, 52, 74, 0.08);
}
.task-inline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.task-inline-grid.task-inline-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}
.task-inline-editor label {
  display: block;
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}
.task-inline-editor input,
.task-inline-editor textarea {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
}
.task-inline-editor textarea {
  min-height: 52px;
  resize: vertical;
}
.bulk-preview {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
}
.bulk-warn {
  margin-top: 4px;
  color: #b91c1c;
  font-size: 12px;
}
.task-node,
.team-node,
.wi-node {
  cursor: grab;
}
.task-node:active,
.team-node:active,
.wi-node:active {
  cursor: grabbing;
}
.drop-valid {
  box-shadow: inset 0 0 0 1px #147bc8;
  background: #ebf6ff;
}
.drop-hover {
  border-color: #147bc8 !important;
  background: #dff1ff !important;
}
.context-menu {
  position: absolute;
  z-index: 40;
  min-width: 190px;
  border: 1px solid #c7d5e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: grid;
  gap: 4px;
}
.context-menu button {
  width: 100%;
  text-align: left;
  background: #fff;
  color: #0f172a;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px;
}
.context-menu button:hover {
  border-color: #aec3d9;
  background: #f4f9ff;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  z-index: 45;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(540px, 100vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #cddaea;
  z-index: 46;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: auto;
  box-shadow: -10px 0 24px rgba(15, 23, 42, 0.08);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.drawer-head h3 {
  margin: 0;
}
.drawer-section {
  display: grid;
  gap: 8px;
}
.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: none;
}
.toast {
  border: 1px solid #c7d5e3;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast button {
  width: auto;
  padding: 4px 9px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .wbs-node {
    grid-template-columns: 18px minmax(80px, 1fr) auto auto;
  }
  .wbs-node .node-count,
  .wbs-node .save-pill,
  .wbs-node .retry-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .wbs-node.level-1,
  .wbs-node.level-2,
  .wbs-node.level-3,
  .wbs-node.level-4,
  .wbs-empty-state,
  .wbs-quick-add,
  .wbs-bulk-add,
  .task-inline-editor {
    margin-left: 0;
  }
  .task-inline-grid,
  .task-inline-grid.task-inline-grid-wide {
    grid-template-columns: 1fr;
  }
  .drawer {
    width: 100vw;
  }
}

/* Tablet-only and mobile-only overrides.
   Keep desktop behavior unchanged by scoping all tweaks to max-width breakpoints. */
@media (max-width: 1100px) {
  html,
  body {
    overflow-x: hidden;
  }
  .topbar,
  .topbar-inner {
    overflow-x: clip;
    max-width: 100%;
  }
  .brand-logo {
    height: 64px;
    max-width: min(86vw, 520px);
  }
  .container {
    padding: 22px 14px 26px;
  }
  .card {
    padding: 16px;
  }
  .status-card {
    padding: 34px 24px;
  }
  .showcase-media-wrap {
    aspect-ratio: 16 / 9.6;
    max-height: min(56vh, 460px);
  }
}

@media (max-width: 768px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 10px;
  }
  .brand {
    min-width: 0;
  }
  .brand-logo {
    height: 50px;
    max-width: min(72vw, 300px);
  }
  .mobile-nav-toggle {
    display: inline-flex;
    grid-column: 2;
  }
  .nav-links,
  .userbox {
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .topbar.mobile-open .nav-links {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 6px;
  }
  .topbar.mobile-open .nav-links a {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    text-align: left;
    padding: 9px 11px;
    white-space: normal;
    line-height: 1.25;
  }
  .topbar.mobile-open .userbox {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 2px;
  }
  .topbar.mobile-open .userbox > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar.mobile-open .userbox form {
    margin: 0;
  }
  .topbar.mobile-open .userbox .button,
  .topbar.mobile-open .userbox button {
    min-height: 40px;
  }
  .showcase-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .showcase-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .showcase-tab {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    padding: 8px 10px;
  }
  .showcase-pill {
    justify-self: start;
  }
  .showcase-stage {
    padding: 8px;
  }
  .showcase-media-wrap {
    aspect-ratio: 16 / 10;
    min-height: 168px;
    max-height: none;
  }
  .showcase-media,
  .showcase-video,
  .showcase-canvas {
    object-fit: contain;
    object-position: center;
  }
  .container {
    padding: 16px 12px 22px;
  }
  .card {
    padding: 14px;
    border-radius: 16px;
    margin-bottom: 14px;
  }
  .status-page {
    padding: 20px 0;
  }
  .status-card {
    padding: 24px 16px;
  }
  .page-head h1 {
    font-size: clamp(1.35rem, 5.8vw, 2rem);
    line-height: 1.22;
  }
  .actions-row {
    align-items: stretch;
    gap: 10px;
  }
  .actions-row > a.button,
  .actions-row > button,
  .actions-row > .button,
  .actions-row > form,
  .actions-row > .pdf-download-split {
    width: 100%;
  }
  .actions-row > form {
    display: grid;
    gap: 8px;
  }
  .actions-row > form > input,
  .actions-row > form > select,
  .actions-row > form > textarea,
  .actions-row > form > button,
  .actions-row > form > .button {
    width: 100%;
    max-width: 100%;
  }
  .pdf-download-split {
    display: flex;
    width: 100%;
  }
  .pdf-download-split > .button {
    flex: 1 1 auto;
    width: auto;
  }
  .pdf-download-menu > summary {
    min-width: 44px;
    width: 44px;
  }
  .pdf-download-list {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
  }
  input,
  select,
  textarea,
  button,
  .button {
    font-size: 16px;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: normal;
    -webkit-overflow-scrolling: touch;
  }
  .doc-frame,
  .preview-frame,
  .diff-doc-frame {
    min-height: 60vh;
  }
  .comment-depth-1,
  .comment-depth-2,
  .comment-depth-3,
  .comment-depth-4 {
    margin-left: 10px;
  }
  .wbs-toolbar {
    align-items: stretch;
  }
  .wbs-toolbar .actions-row > * {
    flex: 1 1 auto;
  }
  .wbs-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .security-pillar summary::after {
    display: none;
  }
}

.site-footer {
  border-top: 1px solid rgba(176, 191, 214, 0.55);
  margin-top: 24px;
  padding: 14px 0 22px;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer-inner a {
  color: #345784;
}

.cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  background: rgba(9, 20, 41, 0.97);
  color: #edf4ff;
  border: 1px solid rgba(132, 171, 225, 0.36);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(2, 10, 24, 0.45);
  padding: 14px;
  display: grid;
  gap: 12px;
}
.cookie-consent[hidden] {
  display: none !important;
}
.cookie-consent p {
  margin: 6px 0 0;
  color: rgba(233, 243, 255, 0.92);
}
.cookie-consent a {
  color: #9ec5ff;
}
.cookie-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.cookie-consent-form {
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 540px) {
  .site-footer-inner {
    padding: 0 10px;
    gap: 10px;
  }
  .cookie-consent {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
  }
  .cookie-consent-actions {
    justify-content: stretch;
  }
  .cookie-consent-form {
    width: 100%;
    justify-content: stretch;
  }
  .cookie-consent-actions .button {
    flex: 1 1 auto;
    text-align: center;
  }
  .showcase-tabs {
    grid-template-columns: 1fr;
  }
  .showcase-tab {
    font-size: 13px;
    padding: 7px 9px;
  }
  .showcase-media-wrap {
    aspect-ratio: 16 / 11;
    min-height: 150px;
  }
  .topbar.mobile-open .userbox .button,
  .topbar.mobile-open .userbox button {
    min-height: 38px;
    padding: 8px 12px;
  }
  .container {
    padding: 12px 10px 18px;
  }
  .card {
    padding: 12px;
  }
  .status-card {
    padding: 20px 14px;
  }
  .doc-frame,
  .preview-frame,
  .diff-doc-frame {
    min-height: 52vh;
  }
  .history-item {
    padding: 8px 8px;
  }
}
