:root {
  color-scheme: light;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background-color: #f2f6fb;
  color: #0b1b35;
  --brand-900: #0a2e6d;
  --brand-800: #0b3f8f;
  --brand-700: #0d51b3;
  --brand-600: #1168d8;
  --brand-500: #1b80f0;
  --brand-400: #3f97ff;
  --brand-300: #6fb4ff;
  --brand-100: #dbeafe;
  --brand-50: #eef5ff;
}

body {
  margin: 0;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #ffffff;
  padding: 18px 0;
  box-shadow: 0 10px 24px rgba(10, 46, 109, 0.35);
}

.api-status {
  background: #f8fafc;
  border-bottom: 1px solid #e2ebff;
  color: #0b1b35;
  font-size: 14px;
}

.api-status__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.api-status__info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-status__actions {
  display: flex;
  gap: 8px;
}

.api-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

.api-status__label {
  font-weight: 600;
}

.api-status.connected {
  background: #ecfdf3;
  color: #0f5132;
  border-color: #b7f2c6;
}

.api-status.connected .api-status__dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.api-status.unavailable {
  background: #fff1f2;
  color: #7f1d1d;
  border-color: #fecdd3;
}

.api-status.unavailable .api-status__dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.api-status__button {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  color: #0b1b35;
  border: 1px solid #c7d8f5;
  box-shadow: none;
}

.api-status__button:hover {
  background: #e9f1ff;
}

.api-status.connected .api-status__button {
  border-color: #86efac;
  color: #0f5132;
}

.api-status.unavailable .api-status__button {
  border-color: #fecdd3;
  color: #7f1d1d;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible {
  color: #dbeafe;
}

main {
  padding: 24px 0 40px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e2ebff;
  box-shadow: 0 8px 24px rgba(10, 46, 109, 0.08);
}

.card--disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
}

.card--disabled h2 {
  color: #64748b;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.card-header h2 {
  margin: 0;
}

.card-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.card.narrow {
  max-width: 420px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.connectors-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.accordion {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.accordion-item {
  border-radius: 10px;
  border: 1px solid #e2ebff;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(10, 46, 109, 0.08);
  overflow: hidden;
}

.accordion-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--brand-900);
  background: linear-gradient(180deg, #ffffff, var(--brand-50));
}

.accordion-summary::-webkit-details-marker {
  display: none;
}

.accordion-summary::after {
  content: "+";
  font-size: 20px;
}

.accordion-item[open] .accordion-summary::after {
  content: "–";
}

.accordion-title {
  font-size: 18px;
}

.accordion-content {
  padding: 0 20px 20px;
}

.metric-value {
  font-size: 18px;
  margin: 0;
  color: var(--brand-900);
  font-weight: 600;
}

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

.form.inline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.form label {
  display: grid;
  gap: 6px;
}

.form label.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form label.checkbox input {
  width: auto;
  padding: 0;
}

.form-error {
  display: block;
  margin: 0;
  color: #c81e1e;
  font-size: 12px;
}

input,
select,
button {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #c7d8f5;
  font-size: 14px;
  font-family: inherit;
}

button {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(17, 104, 216, 0.25);
}

button:hover {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
}

.button-danger {
  background: #fee2e2;
  color: #b4232c;
  border: 1px solid #fca5a5;
  box-shadow: none;
  font-weight: 700;
  line-height: 1;
}

.button-danger:hover {
  background: #fecaca;
}

.button-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dbe6f8;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.table thead th {
  background: #eef5ff;
  color: #0a2e6d;
}

.table tbody tr:nth-child(even) {
  background: #f8fbff;
}

.table-actions {
  width: 1%;
  white-space: nowrap;
  text-align: left;
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-actions form {
  margin: 0;
}

.toast {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  background: #eef2ff;
  color: #1e293b;
}

.toast--error {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b4232c;
}

.toast--success {
  background: #ecfdf3;
  border-color: #86efac;
  color: #0f5132;
}

.metric {
  font-size: 28px;
  margin: 0;
}

.metric.alert {
  color: #d62828;
}

.interactive {
  position: relative;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  left: 16px;
  bottom: 70%;
  transform: translateY(12px);
  background: var(--brand-900);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  box-shadow: 0 12px 30px rgba(10, 46, 109, 0.25);
  z-index: 10;
}

.tooltip-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.interactive:hover .tooltip,
.interactive:focus-within .tooltip {
  opacity: 1;
}

.posture-progress-legend {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.posture-progress-legend .legend-trigger {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.posture-progress-legend .tooltip {
  left: 0;
  bottom: calc(100% + 8px);
  transform: none;
  width: 200px;
}

.posture-progress-legend:hover .tooltip,
.posture-progress-legend:focus-within .tooltip {
  opacity: 1;
}

.posture-progress-legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.tone-info {
  border-left: 4px solid var(--brand-600);
}

.tone-positive {
  border-left: 4px solid #16a34a;
}

.tone-warning {
  border-left: 4px solid #f97316;
}

.tone-danger {
  border-left: 4px solid #dc2626;
}

.tone-neutral {
  border-left: 4px solid #5b729a;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 34, 84, 0.55);
}

.modal-panel {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: min(900px, 92%);
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(10, 46, 109, 0.3);
  z-index: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-body {
  margin-top: 16px;
}

.posture-run-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.posture-run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
}

.posture-quickfix {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.posture-quickfix button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.posture-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.posture-controls label {
  display: grid;
  gap: 6px;
}

.posture-controls input,
.posture-controls select {
  width: 100%;
}

.posture-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.posture-pagination .page-indicator {
  font-size: 14px;
  color: #475569;
}

.modal-close {
  background: #e0edff;
  color: var(--brand-900);
}

.modal-close:hover {
  background: #c5dbff;
}

.alert-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffe0e4;
  color: #b4232c;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flash {
  margin-bottom: 16px;
}

.flash-message {
  background: #e6f0ff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #c7ddff;
  color: var(--brand-900);
}


.account-shell {
  max-width: 860px;
  margin: 0 auto;
}

.account-details {
  margin: 0;
  display: grid;
  gap: 10px;
}

.account-details div {
  display: grid;
  gap: 4px;
}

.account-details dt {
  font-size: 12px;
  color: var(--text-muted);
}

.account-details dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-strong);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #c7d8f5;
  background: #ffffff;
  color: var(--brand-700);
  text-decoration: none;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}

.button-link:hover,
.button-link:focus-visible {
  background: #e0edff;
  color: var(--brand-800);
}

.button-link.button-danger {
  background: #fee2e2;
  color: #b4232c;
  border-color: #fca5a5;
}

.button-link.button-danger:hover,
.button-link.button-danger:focus-visible {
  background: #fecaca;
  color: #b4232c;
}

.button-link--compact {
  padding: 6px 10px;
  font-size: 12px;
}

.button-link:disabled {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  opacity: 0.7;
}

.hint {
  color: #3b547a;
}

.text-link {
  color: var(--brand-700);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--brand-800);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.status-panel {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f8fafc;
}

.status-panel--success {
  border-color: #86efac;
  background: #ecfdf3;
  color: #0f5132;
}

.status-panel--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b4232c;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

.is-loading span:first-child {
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.code-block {
  background: #eef4ff;
  padding: 10px;
  border-radius: 8px;
  word-break: break-all;
}

.mfa-setup {
  display: grid;
  gap: 12px;
}

.mfa-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2ebff;
  background: #ffffff;
  width: fit-content;
}

.mfa-qr img {
  display: block;
  width: 160px;
  height: 160px;
}

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

.api-status__details-list {
  gap: 12px;
}

.api-status__detail {
  border: 1px solid #e2ebff;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(10, 46, 109, 0.08);
}

.api-status__licence {
  border-top: 1px solid #e2ebff;
  margin-top: 16px;
  padding-top: 16px;
  display: grid;
  gap: 10px;
}

.api-status__detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.api-status__pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.api-status__pill--ok {
  background: #dcfce7;
  color: #166534;
}

.api-status__pill--auth-required {
  background: #fef9c3;
  color: #854d0e;
}

.api-status__pill--unavailable {
  background: #fee2e2;
  color: #991b1b;
}

.api-status__pill--error {
  background: #ffe4e6;
  color: #9f1239;
}

.muted {
  color: #5b729a;
  font-size: 13px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.detail-list dt {
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
}

/* Cyber Security Stack portal theme extensions */
:root {
  --bg-canvas: #f2f6fb;
  --bg-surface: #ffffff;
  --bg-muted: #f8fafc;
  --text-strong: #0b1b35;
  --text-muted: #5b729a;
  --success-100: #dcfce7;
  --success-700: #15803d;
  --warning-100: #fef3c7;
  --warning-700: #b45309;
  --danger-100: #fee2e2;
  --danger-700: #b4232c;
}

.page-shell {
  background: radial-gradient(1200px 500px at 20% -10%, #dbeafe 0%, transparent 55%), var(--bg-canvas);
  color: var(--text-strong);
  min-height: 100vh;
}

.site-header {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-600));
}

.site-header__inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

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

.site-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(160deg, #7dd3fc, #60a5fa 45%, #1d4ed8);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.45), 0 8px 20px rgba(8, 47, 121, 0.35);
}

.site-brand__title {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.site-brand__subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.panel,
.card,
.card-glass {
  border-radius: 14px;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid #dde8fb;
  box-shadow: 0 8px 24px rgba(10, 46, 109, 0.08);
  padding: 18px;
}

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


.stack-lg {
  display: grid;
  gap: 20px;
}

.heading-gradient {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-shell {
  max-width: 540px;
  margin: 0 auto;
}

.auth-card {
  padding: 22px;
}

.card-glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(239, 246, 255, 0.75));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 36px rgba(10, 46, 109, 0.14);
}

.heading {
  font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  margin: 0;
  color: var(--brand-900);
}

.subheading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.help {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}

.input {
  width: 100%;
  box-sizing: border-box;
}

.btn {
  appearance: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary,
button,
.btn.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  border: none;
}

.btn-secondary,
.btn.btn-secondary {
  background: #fff;
  color: var(--text-strong);
  border: 1px solid #c7d8f5;
  box-shadow: none;
}

.btn-link,
.btn.btn-link {
  background: transparent;
  border: none;
  color: var(--brand-700);
  padding: 0;
  box-shadow: none;
}

.alert {
  border-radius: 10px;
  border: 1px solid #c7d8f5;
  padding: 10px 12px;
}

.alert-info { background: #eef2ff; color: #1e3a8a; border-color: #c7d2fe; }
.alert-success { background: var(--success-100); color: var(--success-700); border-color: #86efac; }
.alert-warning { background: var(--warning-100); color: var(--warning-700); border-color: #fcd34d; }
.alert-danger { background: var(--danger-100); color: var(--danger-700); border-color: #fca5a5; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b4232c; }
.badge-neutral { background: #e2e8f0; color: #334155; }

.kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 16px;
}

.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 500; }

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .kv { grid-template-columns: 1fr; }
}

/* CSS Store spec alignment (incremental overrides) */
:root {
  font-family: Inter, system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --cyber-blue: #008fff;
  --cyber-purple: #005ab2;
  --cyber-navy: #00397c;
  --cyber-light: #f8fafc;
  --cyber-lighter: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;
}

body.page-shell {
  background:
    radial-gradient(1000px 420px at 50% -10%, rgba(0, 143, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  color: var(--text-primary);
}

.container {
  width: min(72rem, calc(100% - 48px));
}

main.container {
  padding-top: 48px;
  padding-bottom: 64px;
}

.site-header {
  background: linear-gradient(135deg, #00397c 0%, #008fff 100%);
}

.heading-gradient {
  background: linear-gradient(90deg, #008fff 0%, #1aa3ff 45%, #005ab2 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.card {
  border-radius: 16px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.06);
}

.card-glass {
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.75);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.7));
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--border-secondary);
  background: #ffffff;
}

button,
.button-secondary,
.button-link {
  border-radius: 12px;
}

button,
.btn-primary,
.btn.btn-primary {
  background: linear-gradient(135deg, #00397c 0%, #008fff 100%);
  color: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover,
.btn-primary:hover,
.btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 90, 178, 0.28);
  filter: brightness(1.02);
}

.button-secondary,
.btn-secondary,
.btn.btn-secondary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.86));
  border: 1px solid #cbd5e1;
  color: #005ab2;
}

.button-secondary:hover,
.btn-secondary:hover,
.btn.btn-secondary:hover {
  border-color: #94a3b8;
  background: linear-gradient(145deg, #ffffff, #e6f5ff);
}

.measure {
  max-width: 68ch;
}

.account-header {
  margin-bottom: 8px;
}

/* Account page spacing (scoped) */
.account-page {
  padding: 8px 0;
}

.account-page .account-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-page .account-card > .card-glass,
.account-page .account-card > .card {
  padding: 24px;
}

.account-page .account-card h2,
.account-page .account-card h3 {
  margin: 0 0 12px 0;
}

.account-page .account-card p {
  margin: 0 0 16px 0;
}

.account-page .account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.account-page .account-kv {
  display: grid;
  gap: 16px;
}

.account-page .account-kv .label {
  margin-bottom: 6px;
}

.toast,
.flash-message {
  border-radius: 12px;
}

:focus-visible {
  outline: 2px solid #008fff;
  outline-offset: 2px;
}

/* Licence page layout improvements (scoped) */
.licence-page .licence-downloads-card {
  padding: 24px;
}

.licence-page .licence-downloads {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.licence-page .licence-downloads .licence-downloads-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.licence-page .licence-downloads .licence-downloads-callout .alert {
  margin: 0;
}

.licence-page .licence-downloads .licence-downloads-callout .alert:not([hidden]) {
  padding: 12px 14px;
  border-radius: 12px;
}

.licence-page .licence-downloads-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.licence-page .licence-downloads-meta .row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.licence-page .licence-downloads-meta dt {
  margin: 0;
  opacity: 0.8;
}

.licence-page .licence-downloads-meta dd {
  margin: 0;
}

.licence-page .licence-downloads-meta code {
  word-break: break-word;
}

.licence-page .licence-steps-wrap {
  padding: 24px;
}

.licence-page .licence-steps-wrap p {
  margin: 0 0 12px 0;
}

.licence-page .licence-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  line-height: 1.5;
}

.licence-page .licence-callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
}

.licence-page .licence-callout-warning {
  background: var(--warning-100);
  color: var(--warning-700);
  border: 1px solid #fcd34d;
}

.licence-page .pairing-code-panel {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.licence-page .pairing-code-value {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  min-width: 140px;
}

.licence-page .pairing-code-countdown {
  margin-top: 6px;
}

.licence-page .pairing-code-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.licence-page .pairing-code-copied {
  color: var(--success-700);
  font-weight: 600;
}

.licence-page .licence-table-head th {
  background: #eef2ff;
}

.licence-page .activation-keys-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.licence-page .activation-keys-left {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.licence-page .activation-keys-centre {
  display: flex;
  justify-content: center;
}

.licence-page .activation-keys-right {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .licence-page .activation-keys-controls {
    grid-template-columns: 1fr;
  }

  .licence-page .activation-keys-centre,
  .licence-page .activation-keys-right {
    justify-content: flex-start;
  }
}

/* Whitespace + typography normalisation (portal wide) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
pre {
  margin: 0;
}

.page {
  display: grid;
  gap: 24px;
}

@media (max-width: 720px) {
  .page {
    gap: 18px;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.page-header__text {
  display: grid;
  gap: 6px;
}

.page-title {
  font-size: clamp(1.5rem, 1.15rem + 1vw, 2.1rem);
  line-height: 1.15;
  color: var(--text-primary);
}

.page-subtitle {
  color: var(--text-secondary);
  max-width: 68ch;
  line-height: 1.5;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.card,
.panel,
.card-glass {
  display: grid;
  gap: 14px;
}

.card {
  margin: 0;
  padding: 24px;
}

.panel {
  padding: 24px;
}

.card-glass {
  padding: 24px;
}

@media (max-width: 720px) {
  .card,
  .panel,
  .card-glass {
    gap: 12px;
  }

  .card,
  .panel,
  .card-glass {
    padding: 18px;
  }
}

.card-header {
  margin: 0;
}

.card-header h1,
.card-header h2 {
  margin: 0;
}

a {
  color: #005ab2;
  text-decoration: none;
  font-weight: 600;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.nav {
  margin-top: 0;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.22);
}

.table-wrap {
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  background: #fff;
}

.table {
  border: none;
}

.table thead th {
  white-space: nowrap;
}

pre.code-block,
.code-block {
  overflow-x: auto;
  white-space: pre-wrap;
}
