:root {
  color-scheme: dark;
  --bg: #07101c;
  --bg-raised: #0b1726;
  --panel: #101f31;
  --panel-strong: #152940;
  --text: #f4f7fb;
  --muted: #9db0c7;
  --line: #28415c;
  --accent: #ff7a1a;
  --accent-hover: #ff934d;
  --accent-ink: #1b0d02;
  --success: #54d39b;
  --warning: #ffc568;
  --danger: #ff7d7d;
  --info: #78b8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius: 1rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 5%, rgba(255, 122, 26, 0.12), transparent 28rem),
    radial-gradient(circle at 10% 25%, rgba(44, 116, 181, 0.15), transparent 30rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: #a9ceff;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #d3e6ff;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1rem;
  color: var(--accent-ink);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 0.7rem;
  transition: background-color 150ms ease, border-color 150ms ease,
    color 150ms ease, transform 150ms ease;
}

button:hover,
.button:hover {
  color: var(--accent-ink);
  background: var(--accent-hover);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.button-secondary,
button.secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.button-secondary:hover,
button.secondary:hover {
  color: var(--text);
  background: var(--panel-strong);
  border-color: #466889;
}

.button-danger,
button.danger {
  color: #fff;
  background: #9c3138;
}

.button-danger:hover,
button.danger:hover {
  color: #fff;
  background: #bd3d45;
}

:focus-visible {
  outline: 3px solid #ffd0ad;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  color: var(--accent-ink);
  font-weight: 800;
  background: var(--accent);
  border-radius: 0.5rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(157, 176, 199, 0.16);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.015em;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a:not(.button) {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  color: var(--text);
}

.hero {
  display: grid;
  min-height: 42rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(4rem, 10vw, 8rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
}

.lede {
  max-width: 42rem;
  margin: 0;
  color: #bfd0e2;
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
}

.actions,
.toolbar,
.session-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero .actions {
  margin-top: 1.8rem;
}

.hero-card,
.panel,
.card {
  background: linear-gradient(155deg, rgba(21, 41, 64, 0.94), rgba(11, 23, 38, 0.94));
  border: 1px solid rgba(119, 151, 183, 0.26);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  padding: clamp(1.4rem, 5vw, 2.3rem);
  overflow: hidden;
}

.hero-card::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 12rem;
  height: 12rem;
  content: "";
  background: rgba(255, 122, 26, 0.16);
  border-radius: 50%;
  filter: blur(8px);
}

.hero-card ol {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 1.2rem 0 0;
  list-style: none;
  counter-reset: steps;
}

.hero-card li {
  position: relative;
  min-height: 2.5rem;
  padding-left: 3.2rem;
  color: var(--muted);
  counter-increment: steps;
}

.hero-card li::before {
  position: absolute;
  top: -0.1rem;
  left: 0;
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  color: var(--accent-ink);
  font-weight: 900;
  content: counter(steps);
  background: var(--accent);
  border-radius: 50%;
  place-items: center;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-heading p,
.muted {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.35rem;
  box-shadow: none;
}

.card-number {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.2rem;
  color: var(--accent-ink);
  font-weight: 900;
  background: var(--accent);
  border-radius: 0.65rem;
  place-items: center;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  color: #ffe2ba;
  background: rgba(124, 73, 18, 0.24);
  border: 1px solid rgba(255, 197, 104, 0.35);
  border-radius: var(--radius);
}

.safety-note strong {
  color: var(--warning);
}

.page-main {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.page-heading {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.page-heading h1 {
  max-width: none;
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.legal {
  width: min(52rem, calc(100% - 2rem));
}

.legal > p,
.legal > ul {
  color: #bfd0e2;
}

.legal h2 {
  margin-top: 2.25rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.legal li + li {
  margin-top: 0.55rem;
}

.app-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.app-layout.single-panel {
  grid-template-columns: minmax(0, 34rem);
}

.app-layout > .full-width,
.full-width {
  grid-column: 1 / -1;
}

.panel {
  padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: none;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2,
.panel-header h3,
.panel-header p {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field.full-width {
  grid-column: 1 / -1;
}

label,
.label {
  color: #dce7f3;
  font-size: 0.92rem;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.68rem 0.75rem;
  color: var(--text);
  background: #091421;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7288a0;
}

input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  margin: 0;
  accent-color: var(--accent);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  cursor: pointer;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.account-help {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.google-auth {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.google-button {
  min-height: 2.75rem;
}

.auth-divider {
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) auto minmax(2rem, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  background: var(--line);
}

.narrow-page {
  max-width: 44rem;
}

.invite-result {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.message {
  padding: 0.8rem 0.95rem;
  color: var(--info);
  background: rgba(49, 112, 176, 0.14);
  border: 1px solid rgba(120, 184, 255, 0.32);
  border-radius: 0.7rem;
}

.message:empty {
  display: none;
}

.message.error {
  color: #ffd2d2;
  background: rgba(156, 49, 56, 0.18);
  border-color: rgba(255, 125, 125, 0.4);
}

.message.success {
  color: #c9ffe7;
  background: rgba(34, 131, 89, 0.16);
  border-color: rgba(84, 211, 155, 0.4);
}

.status-card {
  padding: 1.2rem;
  border-left: 4px solid var(--info);
  border-radius: 0.75rem;
  background: rgba(120, 184, 255, 0.09);
}

.status-card.pending {
  border-color: var(--warning);
  background: rgba(255, 197, 104, 0.09);
}

.status-card.denied,
.status-card.revoked {
  border-color: var(--danger);
  background: rgba(255, 125, 125, 0.09);
}

.status-card.approved {
  border-color: var(--success);
  background: rgba(84, 211, 155, 0.09);
}

.status-card h2,
.status-card h3,
.status-card p {
  margin-bottom: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.16rem 0.55rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(157, 176, 199, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.badge.approved,
.badge.published {
  color: #b7f8d8;
  border-color: rgba(84, 211, 155, 0.48);
}

.badge.pending,
.badge.draft {
  color: #ffe0a2;
  border-color: rgba(255, 197, 104, 0.48);
}

.badge.denied,
.badge.revoked,
.badge.retired {
  color: #ffc2c2;
  border-color: rgba(255, 125, 125, 0.48);
}

.build-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.build-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(7, 16, 28, 0.55);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.build-item h3,
.build-item p {
  margin-bottom: 0.3rem;
}

.meta {
  display: flex;
  gap: 0.5rem 0.9rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(7, 16, 28, 0.45);
}

th,
td {
  padding: 0.78rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(40, 65, 92, 0.72);
}

th {
  color: #dce7f3;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(21, 41, 64, 0.72);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td .actions {
  min-width: max-content;
}

td button,
.compact-button {
  min-height: 2.15rem;
  padding: 0.42rem 0.65rem;
  font-size: 0.82rem;
}

.empty-state {
  padding: 1.2rem;
  color: var(--muted);
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 0.9rem;
  background: rgba(7, 16, 28, 0.52);
  border: 1px solid var(--line);
  border-radius: 0.72rem;
}

.stat strong {
  display: block;
  font-size: 1.55rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

progress {
  width: 100%;
  height: 0.8rem;
  overflow: hidden;
  accent-color: var(--accent);
  border: 0;
  border-radius: 999px;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(157, 176, 199, 0.16);
}

.footer-inner {
  display: flex;
  min-height: 7rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 52rem) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 38rem;
  }

  .card-grid,
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-layout > .full-width,
  .full-width {
    grid-column: auto;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 0.85rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .site-nav .hide-small {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .field.full-width {
    grid-column: auto;
  }

  .build-item,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .build-item .button {
    width: 100%;
  }
}

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