@font-face {
  font-family: 'Aeonik';
  src: url('/fonts/Aeonik-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('/fonts/Aeonik-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aeonik';
  src: url('/fonts/Aeonik-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4F3EF;
  --bg-aura: radial-gradient(circle at 50% 0%, rgba(59, 55, 102, 0.07) 0%, rgba(244, 243, 239, 0) 70%);
  --panel: #FFFFFF;
  --panel-muted: #FAFAF8;
  --panel-alt: #EFECE4;
  --panel-dark: #121316;
  --panel-dark-subtle: #1A1B20;
  --border: #E5E3DD;
  --border-strong: #DEDCD5;
  --border-subtle: #ECE9E2;
  --border-dark: #2A2B32;
  --text: #121316;
  --text-muted: #6E6E76;
  --text-subtle: #565660;
  --text-light: #F4F3EF;
  --accent: #3B3766;
  --accent-hover: #2D2A50;
  --accent-light: #ECE9F5;
  --accent-glow: rgba(59, 55, 102, 0.16);
  --green: #2E7D53;
  --green-light: #E7F3EC;
  --green-glow: rgba(46, 125, 83, 0.2);
  --amber: #D97706;
  --amber-light: #FEF3C7;
  --red: #C0432F;
  --red-light: #FCECE9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(18, 19, 22, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(18, 19, 22, 0.08);
  --shadow-lg: 0 18px 48px -20px rgba(18, 19, 22, 0.16);
  --shadow-nav: 0 1px 2px rgba(18, 19, 22, 0.05), 0 8px 24px -16px rgba(18, 19, 22, 0.18);
  --font-sans: 'Aeonik', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: var(--bg-aura);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric Background */
.atmos-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(1000px circle at 80% 10%, rgba(59, 55, 102, 0.06), transparent 70%),
    radial-gradient(800px circle at 15% 45%, rgba(46, 125, 83, 0.04), transparent 60%);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}

/* Navbar */
nav.nav-bar, .shell > nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-nav);
  margin-bottom: 32px;
}

.brand, .nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand img, .nav-brand img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a, .shell > nav > a:not(.brand) {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
  position: relative;
}

.nav-links a:hover, .shell > nav > a:not(.brand):hover {
  color: var(--text);
}

.nav-links a.active, .shell > nav > a.active {
  color: var(--text);
  font-weight: 600;
}

.nav-links a.active::after, .shell > nav > a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

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

[data-status], .wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 0 2px rgba(46, 125, 83, 0.2);
  display: inline-block;
  animation: pulse 2s infinite;
}

.pulse-dot.offline {
  background-color: var(--text-muted);
  box-shadow: none;
  animation: none;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 83, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 125, 83, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 125, 83, 0); }
}

/* Hero Section */
.hero {
  padding: 44px 0 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 860px;
  margin: 0 0 16px;
  color: var(--text);
}

.hero .muted {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-subtle);
  max-width: 720px;
  margin-bottom: 24px;
}

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

/* Protocol Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12.5px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
}

.status-item strong {
  color: var(--text);
  font-weight: 600;
}

.status-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--panel-dark);
  color: var(--text-light);
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1.2;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 19, 22, 0.15);
}

button:active:not(:disabled), .btn:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled, .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button.secondary, .btn-secondary {
  background: #FFFFFF;
  color: var(--text);
  border-color: var(--border);
}

button.secondary:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
  background: var(--panel-muted);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

button.accent, .btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}

button.accent:hover:not(:disabled), .btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
}

button.sm, .btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* Pills and Badges */
.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-subtle);
  background: #FFFFFF;
}

.pill-green, .badge-green {
  background: var(--green-light);
  border-color: rgba(46, 125, 83, 0.25);
  color: var(--green);
}

.pill-purple, .badge-purple {
  background: var(--accent-light);
  border-color: rgba(59, 55, 102, 0.25);
  color: var(--accent);
}

.pill-amber, .badge-amber {
  background: var(--amber-light);
  border-color: rgba(217, 119, 6, 0.25);
  color: var(--amber);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card, article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover, article:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-dark {
  background: var(--panel-dark);
  color: var(--text-light);
  border-color: var(--border-dark);
}

.sectionHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-top: 2px;
}

.card-dark h2 {
  color: var(--text-light);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 8px;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.label-helper {
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.label-helper:hover {
  color: var(--accent);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid #DCD8D0;
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

input::placeholder {
  color: #A09E97;
}

.input-suffix {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.chip-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-muted);
  color: var(--text-subtle);
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip:hover {
  background: #FFFFFF;
  border-color: var(--accent);
  color: var(--accent);
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Outputs & Terminal / Pre Blocks */
.output-box {
  position: relative;
  background: #141518;
  border: 1px solid #23242A;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #23242A;
}

.output-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A8794;
}

.output-copy {
  background: transparent;
  color: #A09EB0;
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid #2E3038;
  border-radius: 6px;
  cursor: pointer;
}

.output-copy:hover {
  background: #23242A;
  color: #FFFFFF;
}

pre {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #E2E1DD;
  background: #141518;
  border: 1px solid #23242A;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  min-height: 72px;
}

pre:empty::before {
  content: 'No output yet.';
  color: #5D5E6A;
  font-style: italic;
}

.small {
  font-size: 12px;
  line-height: 1.5;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Interactive Tabs */
.tabs-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #EAE8E1;
  border-radius: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--text-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.tab-btn.active {
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Cryptographic Note Card (Visual Voucher) */
.note-voucher {
  background: linear-gradient(145deg, #18191E, #0E0F12);
  border: 1px solid #2D2E36;
  border-radius: 14px;
  padding: 18px;
  color: #F4F3EF;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.note-voucher::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(59, 55, 102, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.voucher-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #8E8D98;
  margin-bottom: 8px;
}

.voucher-hash {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #6EE7B7;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Endpoint Cards (SDK) */
.endpoint-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.endpoint-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.method-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.method-post {
  background: #E8F5ED;
  color: #15803D;
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.method-get {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid rgba(29, 78, 216, 0.2);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.endpoint-desc {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

/* Footer */
footer.app-footer {
  margin-top: 60px;
  padding: 24px 0 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
}

footer.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

footer.app-footer a:hover {
  color: var(--text);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #121316;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 860px) {
  .hero h1 {
    font-size: 38px;
  }
  .grid, .two, .grid-3 {
    grid-template-columns: 1fr;
  }
  nav.nav-bar, .shell > nav {
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border);
  }
  .nav-actions {
    margin-left: auto;
  }
  footer.app-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
