/* ============================================
   Registrar.earth — Titanium Design System
   WCAG AAA Accessible • Professional • Modern
   ============================================ */

/* === Fonts === */
@font-face {
  font-family: "Drafting Mono";
  src: url("/fonts/DraftingMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Custom Properties === */
:root {
  --bg-deep: #e8e8ed;
  --bg: #f5f5f7;
  --bg-elevated: #efefef;
  --card: #ffffff;
  --card-hover: #fafafa;
  --ink: #1d1d1f;
  --ink-secondary: #48484a;
  --ink-muted: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-subtle: rgba(0, 113, 227, 0.08);
  --success: #248a3d;
  --success-bg: rgba(36, 138, 61, 0.08);
  --warning: #b25000;
  --warning-bg: rgba(178, 80, 0, 0.08);
  --error: #d70015;
  --error-bg: rgba(215, 0, 21, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 113, 227, 0.5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Drafting Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --line-tight: 1.25;
  --line-normal: 1.5;
  --line-relaxed: 1.75;
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
}

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-normal);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Skip Link (Accessibility) === */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-lg);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* === Focus Styles (Accessibility) === */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
}

.site-logo:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-logo svg {
  flex-shrink: 0;
  color: var(--ink);
}

.logo-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo-accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: all 150ms ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* === Main Content === */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
}

.main-content > .stack-xl {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.page-layout {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.page-layout .page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* === Shell (centered single-card layouts) === */
.shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-xl) var(--space-lg);
}

.shell-col {
  flex-direction: column;
  gap: var(--space-xl);
}

/* === Cards === */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 560px;
}

.card-wide {
  max-width: 800px;
}

.card-full {
  max-width: none;
}

.card-hover {
  transition: all var(--transition-normal);
}

.card-hover:hover {
  background: var(--card-hover);
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.center-card {
  text-align: center;
}

.center-card .stack {
  align-items: center;
}

/* === Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.badge-success {
  color: var(--success);
  background: var(--success-bg);
}

.badge-warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.badge-error {
  color: var(--error);
  background: var(--error-bg);
}

/* === Page Header === */
.page-header {
  margin-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page-header h1 {
  margin-bottom: var(--space-xs);
  color: var(--ink);
}

.page-header p {
  color: var(--ink-muted);
  font-size: var(--text-lg);
}

/* === Stack Layout === */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stack-sm {
  gap: var(--space-sm);
}

.stack-lg {
  gap: var(--space-lg);
}

.stack-xl {
  gap: var(--space-xl);
}

/* === Page Layout (desktop two-column) === */
.page-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm) 24px;
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

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

.page-grid .card {
  max-width: none;
}

/* === Grid Layout === */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* === Forms === */
label {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-weight: 500;
  color: var(--ink);
}

label .label-hint {
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

input,
textarea,
select {
  width: 100%;
  padding: var(--space-md);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-muted);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: #fff;
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: var(--space-sm);
}

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

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: var(--space-2xl);
}

.code-input {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

/* === Buttons === */
.btn,
button,
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

.primary:active {
  transform: translateY(0);
}

.secondary {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.danger {
  color: var(--error);
  border-color: var(--error);
}

.danger:hover {
  background: var(--error-bg);
}

.btn-ghost {
  color: var(--ink-secondary);
  background: transparent;
  border: none;
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.btn-danger {
  color: #fff;
  background: var(--error);
}

.btn-danger:hover {
  background: #c30010;
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--text-lg);
}

.btn-full {
  width: 100%;
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === Dashboard Row === */
.dashboard-row {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.layout-split .card-items {
  flex: 0 0 55%;
}

.layout-split .card-register {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
}

.card-register > .primary {
  align-self: flex-end;
  width: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

@media (max-width: 1040px) {
  .dashboard-row {
    flex-wrap: wrap;
  }

  .layout-split .card-items,
  .layout-split .card-register {
    flex: 1 1 100%;
  }
}

/* === Info Lines === */
.info-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.info-line:last-child {
  border-bottom: none;
}

.info-line .label {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.info-line .value {
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

/* === Divider === */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-lg) 0;
}

/* === Token Pill === */
.token-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  word-break: break-all;
}

/* === Status Messages === */
.status {
  font-size: var(--text-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.status-success {
  color: var(--success);
  background: var(--success-bg);
}

.status-warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.status-error {
  color: var(--error);
  background: var(--error-bg);
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: var(--text-sm);
}

.error {
  color: var(--error);
}

/* === Item Cards === */
.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.item-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: var(--bg-elevated);
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.item-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-detail {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* === Label Box === */
.label-box {
  padding: var(--space-lg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.label-preview {
  display: flex;
  justify-content: center;
  padding: var(--space-lg);
  background: #fff;
  border-radius: var(--radius-md);
}

.label-preview svg {
  max-width: 100%;
  height: auto;
}

/* === CTA Box === */
.cta-box {
  padding: var(--space-lg);
  background: var(--accent-subtle);
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-box h2 {
  margin-bottom: var(--space-sm);
}

.cta-box p {
  color: var(--ink-secondary);
  margin-bottom: var(--space-md);
}

/* === DataMatrix === */
.datamatrix svg {
  width: 140px;
  height: 140px;
  padding: var(--space-sm);
  background: #fff;
  border-radius: var(--radius-md);
}

/* === Footer === */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-text {
  color: var(--ink-muted);
  font-size: 0.875rem;
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--ink);
}

/* === Login Methods === */
.login-methods {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.method-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.method-divider::before,
.method-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === Text Link === */
.text-link {
  font-weight: 500;
}

.text-link a {
  color: var(--accent);
}

/* === Visually Hidden (Screen Reader Only) === */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Honeypot (spam prevention) === */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
}

/* === Proof of Humanity (slider + PoW) === */
.poh-card {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.poh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xs);
}

.poh-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.poh-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.03);
}

#poh-slider {
  width: 100%;
  margin-top: var(--space-sm);
  accent-color: var(--accent);
}

#poh-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

#poh-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.9);
  margin-top: -7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#poh-slider:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* === Responsive === */
@media (max-width: 768px) {
  :root {
    --text-3xl: 1.75rem;
    --text-2xl: 1.375rem;
  }

  .header-inner {
    padding: var(--space-md);
  }

  .logo-text {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .nav-link {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }

  .main-content {
    padding: var(--space-lg) var(--space-md);
  }

  .shell {
    padding: var(--space-lg) var(--space-md);
    min-height: calc(100vh - 160px);
  }

  .card {
    padding: var(--space-lg);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .btn-lg {
    padding: var(--space-md) var(--space-lg);
  }

  .info-line {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .info-line .value {
    text-align: left;
  }
}

/* === Print Styles === */
@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* === Tab Navigation === */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg);
  padding-top: var(--space-xs);
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
}

.tab-panel {
  display: none;
}

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

/* === Pricing Grid === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.pricing-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--ink);
}

.pricing-price .per {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pricing-features li {
  padding-left: var(--space-lg);
  position: relative;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
}

.pricing-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

/* === Result Cards (Search/Browse) === */
.result-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

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

.result-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.result-meta .sf128 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta .descr {
  font-weight: 500;
  color: var(--ink);
}

.result-badges {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-shrink: 0;
}

/* === Pagination === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.pagination .page-info {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* === Invoice / Billing === */
.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.invoice-row:last-child {
  border-bottom: none;
}

.invoice-amount {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* === How It Works === */
.how-it-works {
  text-align: center;
  width: 100%;
  max-width: 720px;
  padding: var(--space-xl) var(--space-lg);
}

.how-it-works-heading {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-lg);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.how-it-works-steps {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
}

.how-step {
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
}

.how-step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.how-step h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

.how-step p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: var(--line-relaxed);
}

@media (max-width: 600px) {
  .how-it-works-steps {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }

  .how-step {
    max-width: 280px;
  }
}

/* === Status Page === */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.status-dl {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.status-row:last-child {
  border-bottom: none;
}

.status-row dt {
  color: var(--ink-secondary);
  font-size: var(--text-sm);
}

.status-row dd {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-base);
}

/* === Setup Wizard === */
.setup-progress {
  margin-bottom: var(--space-md);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.progress-step.active {
  opacity: 1;
}

.progress-step.current .step-number {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.progress-step.active .step-number {
  border-color: var(--accent);
}

.step-label {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-align: center;
}

.progress-step.active .step-label {
  color: var(--ink-secondary);
}

/* Label Preview Mock */
.label-preview-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  justify-content: center;
}

.label-mock {
  width: 240px;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.label-mock-header {
  background: var(--ink);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
}

.label-mock-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
}

.label-mock-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.label-mock-qr {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
}

.label-mock-qr svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.label-mock-info {
  text-align: center;
  color: var(--ink);
}

.label-mock-code {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.label-mock-url {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: 2px;
}

.setup-step {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Code styles === */
.code-shell {
  font-family: var(--font-mono);
}

.code-inline {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* === Secondary blue button === */
.secondary-blue {
  color: #fff;
  background: var(--accent);
}

.secondary-blue:hover {
  background: var(--accent-hover);
}

/* === Misc === */
.link-text {
  color: var(--accent);
  font-weight: 500;
}

.label-cta {
  padding: var(--space-lg);
  background: var(--accent-subtle);
  border: 1px solid rgba(0, 113, 227, 0.12);
  border-radius: var(--radius-lg);
}

.label-cta h2 {
  margin-bottom: var(--space-sm);
}

.label-text {
  padding: var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  white-space: pre-wrap;
}

.blue-link a {
  color: var(--accent);
}

.input-like {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
}

/* === Connection Status Indicator (Universal Standard) === */
.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  user-select: none;
}

.conn-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Connected — green, steady */
.conn-status--connected {
  color: #1b7a34;
  background: rgba(36, 138, 61, 0.08);
}

.conn-status--connected .conn-status-dot {
  background: #248a3d;
}

/* Checking — blue, breathing pulse */
.conn-status--checking {
  color: var(--accent);
  background: var(--accent-subtle);
}

.conn-status--checking .conn-status-dot {
  background: #2196f3;
  animation: conn-breathing 1.6s ease-in-out infinite;
}

/* Offline — gray */
.conn-status--offline {
  color: var(--ink-muted);
  background: rgba(0, 0, 0, 0.04);
}

.conn-status--offline .conn-status-dot {
  background: #9e9e9e;
}

/* Error — red, blink */
.conn-status--error {
  color: var(--error);
  background: var(--error-bg);
}

.conn-status--error .conn-status-dot {
  background: #d70015;
  animation: conn-blink 0.33s step-end infinite;
}

@keyframes conn-breathing {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes conn-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .conn-status-dot {
    animation: none !important;
  }
}
