.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-bg);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11, 46, 43, 0.28);
}

.btn-primary:hover {
  background: #134843;
  color: var(--brand-accent);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--surface-3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-light {
  background: var(--brand-accent);
  color: #0b2e2b;
}

.btn-light:hover {
  background: #f0c85a;
}

.btn-sm {
  min-height: 36px;
  height: 36px;
  padding: 0 0.9rem;
  font-size: 0.8rem;
  border-radius: 8px;
  box-sizing: border-box;
}

.page-hero-banner {
  background: linear-gradient(145deg, #0b2e2b 0%, #134843 55%, #0b2e2b 100%);
  color: #fff;
  padding: 5.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero-banner::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -100px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 184, 74, 0.18), transparent 70%);
  pointer-events: none;
}

.page-hero-banner .container {
  position: relative;
  z-index: 1;
}

.page-hero-banner .eyebrow {
  color: var(--accent);
}

.page-hero-banner h1,
.page-hero-banner p {
  color: #fff;
}

.page-hero-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 0.75rem;
}

.page-hero-banner p {
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0;
  font-size: 1.05rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-field {
  flex: 1 1 220px;
  position: relative;
}

.search-field input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-accent);
  box-shadow: var(--focus);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
}

.field .error {
  color: var(--danger);
  font-size: 0.8rem;
  display: none;
}

.field.is-invalid .error {
  display: block;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--brand-accent);
  color: var(--ink);
}

.chip.is-active {
  background: var(--brand-bg);
  border-color: var(--brand-bg);
  color: #fff;
}

.card-list {
  display: grid;
  gap: 1rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.card:hover {
  border-color: var(--border-strong);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--ink-muted);
  font-size: 0.925rem;
  margin: 0;
}

.card-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: -1.25rem -1.25rem 1rem;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 700px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.stat span {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  background: var(--surface-2);
}

tr:last-child td {
  border-bottom: none;
}

.pricing-toggle {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 0.25rem;
}

.pricing-toggle button {
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0.4rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.pricing-toggle button.is-active {
  background: var(--brand-bg);
  color: #fff;
}

.price {
  font-size: 2.4rem;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.price small {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 400;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab {
  border: 0;
  background: transparent;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 500;
}

.tab.is-active {
  background: var(--brand-bg);
  color: #fff;
}

.tab-panel {
  display: none;
}
.tab-panel.is-active {
  display: block;
}

.timeline {
  display: grid;
  gap: 1rem;
  position: relative;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  position: relative;
}

.timeline-item .when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-accent);
  margin-bottom: 0.35rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
}
.status-up { background: var(--success); }
.status-degraded { background: var(--warn); }
.status-down { background: var(--danger); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + 1rem);
  transform: translateX(-50%) translateY(120%);
  z-index: 300;
  background: var(--brand-bg);
  color: #fff;
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  transition: transform 0.35s var(--ease);
  max-width: min(92vw, 420px);
  text-align: center;
}

.toast.is-show {
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 900px) {
  .toast { bottom: 1.5rem; }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 28, 0.5);
}

.modal__panel {
  position: relative;
  width: min(100%, 560px);
  max-height: 85dvh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.35rem;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 700px) {
  .modal {
    align-items: center;
  }
  .modal__panel {
    border-radius: var(--radius);
  }
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  line-height: 1.5;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  margin-bottom: 0.35rem;
}

.prose {
  max-width: 68ch;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--ink-muted);
}

.prose ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.doc-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .doc-layout {
    grid-template-columns: 220px 1fr;
  }
}

.doc-side a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.doc-side a.is-active,
.doc-side a:hover {
  background: var(--surface);
  color: var(--ink);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.pipeline {
  display: grid;
  gap: 0.75rem;
}

.pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.pipeline-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-bg);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}
