/* ============================================================
   THEME TOKENS
   data-mode = "light" | "dark"
   One consistent neobrutalist design. Dark mode flips ink/bg so
   the difference is unmistakable, not just a subtle recolor.
   ============================================================ */

:root{
  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:20px;
  --font-display:'Space Grotesk','Segoe UI',ui-sans-serif,system-ui,sans-serif;
  --font-mono:'JetBrains Mono','SFMono-Regular',ui-monospace,Menlo,Consolas,monospace;
  --transition-theme: background-color .25s ease, color .25s ease, border-color .25s ease;
}

html[data-mode="light"]{
  --bg:#f4f4f1;
  --surface:#ffffff;
  --surface-2:#eeeeea;
  --ink:#0a0a0a;
  --text-1:#0a0a0a;
  --text-2:#54545a;
  --text-3:#8a8a90;
  --blue:#2563eb;
  --blue-soft:#dce8ff;
  --yellow:#facc15;
  --yellow-ink:#1a1a1a;
  --green:#16a34a;
  --green-soft:#dcfce7;
  --pink:#e0407a;
  --red-soft:#fde3e3;
  --border-w:3px;
  --border:var(--border-w) solid var(--ink);
  --border-thin:2px solid var(--ink);
  --shadow-sm:4px 4px 0 var(--ink);
  --shadow-md:6px 6px 0 var(--ink);
  --shadow-lg:8px 8px 0 var(--ink);
  --code-bg:#0d1117;
  --code-text:#e6edf3;
  --btn-primary-text:#ffffff;
  --grid-dot: rgba(10,10,10,0.07);
}

html[data-mode="dark"]{
  --bg:#0a0a0c;
  --surface:#18181b;
  --surface-2:#111113;
  --ink:#f5f5f5;
  --text-1:#f5f5f5;
  --text-2:#b3b3ba;
  --text-3:#7c7c84;
  --blue:#6d93f5;
  --blue-soft:#1c2740;
  --yellow:#facc15;
  --yellow-ink:#1a1a1a;
  --green:#4ade80;
  --green-soft:#123a24;
  --pink:#f472b6;
  --red-soft:#3a1a1a;
  --border-w:3px;
  --border:var(--border-w) solid var(--ink);
  --border-thin:2px solid var(--ink);
  --shadow-sm:4px 4px 0 var(--ink);
  --shadow-md:6px 6px 0 var(--ink);
  --shadow-lg:8px 8px 0 var(--ink);
  --code-bg:#0a0a0c;
  --code-text:#e6edf3;
  --btn-primary-text:#0a0a0a;
  --grid-dot: rgba(245,245,245,0.08);
}

/* ============================================================
   BASE
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}

body{
  font-family:var(--font-display);
  background:var(--bg);
  color:var(--text-1);
  min-height:100vh;
  position:relative;
  overflow-x:hidden;
  transition:var(--transition-theme);
}

body::before{
  content:'';
  position:fixed;
  inset:0;
  background-image:radial-gradient(var(--grid-dot) 1.5px, transparent 1.5px);
  background-size:26px 26px;
  pointer-events:none;
  z-index:0;
}

.mono{font-family:var(--font-mono);}

.icon{
  width:1em;height:1em;
  display:inline-flex;
  flex-shrink:0;
}
.icon svg{width:100%;height:100%;}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar{
  position:sticky;top:0;z-index:200;
  background:var(--surface);
  border-bottom:var(--border);
  padding:14px 18px;
  display:flex;
  align-items:center;
  gap:14px;
  transition:var(--transition-theme);
}

.icon-btn, .hamburger{
  width:42px;height:42px;
  background:var(--surface);
  border:var(--border);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow-sm);
  display:flex;align-items:center;justify-content:center;
  font-size:1.2rem;
  cursor:pointer;
  transition:transform 0.12s, box-shadow 0.12s, var(--transition-theme);
  flex-shrink:0;
  text-decoration:none;
  color:var(--ink);
}
.icon-btn:active, .hamburger:active{
  transform:translate(2px,2px);
  box-shadow:2px 2px 0 var(--ink);
}

.topbar-logo{display:flex;align-items:center;gap:10px;}
.topbar-logo-icon{
  width:40px;height:40px;
  background:var(--ink);
  color:var(--bg);
  border-radius:var(--radius-sm);
  display:flex;align-items:center;justify-content:center;
  font-size:1.2rem;
  box-shadow:var(--shadow-sm);
  transition:var(--transition-theme);
}

.topbar-title{font-weight:800;font-size:1.15rem;letter-spacing:-0.02em;color:var(--text-1);}
.topbar-sub{font-size:0.7rem;color:var(--text-2);font-family:var(--font-mono);}

.topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px;}
.docs-btn{margin-left:auto;}

/* ============================================================
   SIDEBAR
   ============================================================ */
.overlay{
  position:fixed;inset:0;
  background:rgba(10,10,10,0.45);
  z-index:250;
  opacity:0;
  pointer-events:none;
  transition:opacity 0.25s;
}
.overlay.open{opacity:1;pointer-events:auto;}

.sidebar{
  position:fixed;
  top:0;left:0;bottom:0;
  width:280px;
  background:var(--surface);
  border-right:var(--border);
  z-index:260;
  transform:translateX(-100%);
  transition:transform 0.28s cubic-bezier(.2,.9,.3,1), var(--transition-theme);
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow-y:auto;
}
.sidebar.open{transform:translateX(0);}

.sidebar-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:16px;
  padding-bottom:16px;
  border-bottom:var(--border);
}
.sidebar-head-logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.05rem;color:var(--text-1);}
.sidebar-close{
  width:34px;height:34px;
  border:var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  font-size:1rem;
  color:var(--ink);
}
.sidebar-close:active{transform:translate(2px,2px);box-shadow:none;}

.nav-item{
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;
  border:var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
  font-weight:700;
  font-size:0.95rem;
  cursor:pointer;
  transition:transform 0.12s, box-shadow 0.12s, background 0.15s, var(--transition-theme);
  color:var(--text-1);
}
.nav-item:hover{background:var(--blue-soft);}
.nav-item:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--ink);}
.nav-item.active{background:var(--blue);color:#fff;box-shadow:var(--shadow-sm);border-color:var(--ink);}
.nav-item .badge{
  margin-left:auto;
  background:var(--yellow);
  color:var(--yellow-ink);
  border:2px solid var(--ink);
  font-family:var(--font-mono);
  font-size:0.68rem;
  font-weight:700;
  padding:1px 7px;
  border-radius:6px;
}
.nav-item.active .badge{background:#fff;color:var(--ink);}

.sidebar-footer{
  margin-top:auto;
  padding-top:16px;
  border-top:var(--border);
  font-size:0.72rem;
  color:var(--text-2);
  font-family:var(--font-mono);
  line-height:1.6;
  display:flex;
  gap:8px;
}
.sidebar-footer .icon{color:var(--text-3);margin-top:1px;}

/* ── Mode switcher block inside sidebar ── */
.theme-section{
  padding-top:16px;
  margin-top:8px;
  border-top:var(--border);
}
.theme-section-label{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.7rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-3);
  margin-bottom:10px;
}

.mode-toggle{
  display:flex;
  border:var(--border);
  border-radius:10px;
  overflow:hidden;
}
.mode-btn{
  flex:1;
  display:flex;align-items:center;justify-content:center;gap:7px;
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.78rem;
  padding:11px 6px;
  background:var(--surface);
  border:none;
  cursor:pointer;
  color:var(--text-2);
  transition:background 0.15s, color 0.15s;
}
.mode-btn + .mode-btn{border-left:var(--border-thin);}
.mode-btn.active{background:var(--ink);color:var(--bg);}

/* ============================================================
   LAYOUT / CONTAINER
   ============================================================ */
.container{
  max-width:640px;
  margin:0 auto;
  padding:26px 18px 60px;
  position:relative;
  z-index:1;
}

.view{display:none;}
.view.active{display:block;}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header{margin-bottom:22px;}
.page-eyebrow{
  display:inline-flex;align-items:center;gap:7px;
  background:var(--yellow);
  color:var(--yellow-ink);
  border:var(--border);
  border-radius:100px;
  padding:5px 14px;
  font-size:0.72rem;
  font-weight:700;
  font-family:var(--font-mono);
  letter-spacing:0.03em;
  box-shadow:var(--shadow-sm);
  margin-bottom:14px;
}
.page-eyebrow .icon{width:0.95em;height:0.95em;}

.page-title{
  font-size:clamp(1.6rem,6vw,2.3rem);
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.15;
  margin-bottom:8px;
  color:var(--text-1);
}

.page-desc{color:var(--text-2);font-size:0.92rem;line-height:1.6;}

/* ============================================================
   PANEL / CARD
   ============================================================ */
.panel{
  background:var(--surface);
  border:var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);
  padding:24px;
  margin-bottom:22px;
  position:relative;
  transition:var(--transition-theme);
}

.panel-label{
  display:flex;align-items:center;gap:8px;
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.78rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  margin-bottom:18px;
  color:var(--text-1);
}
.panel-label .dot{width:10px;height:10px;background:var(--blue);border-radius:2px;flex-shrink:0;}

/* ============================================================
   GENERATE VIEW
   ============================================================ */
.gen-empty{text-align:center;padding:30px 10px;}
.gen-empty-icon{
  width:64px;height:64px;
  margin:0 auto 14px;
  border:var(--border);
  border-radius:var(--radius-md);
  background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);
}
.gen-empty-icon .icon{width:28px;height:28px;}
.gen-empty-text{color:var(--text-2);font-size:0.88rem;margin-bottom:20px;line-height:1.6;}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.95rem;
  border:var(--border);
  border-radius:10px;
  padding:13px 22px;
  cursor:pointer;
  box-shadow:var(--shadow-md);
  transition:transform 0.12s, box-shadow 0.12s, opacity 0.15s, var(--transition-theme);
  text-decoration:none;
}
.btn .icon{width:1.05em;height:1.05em;}
.btn:active{transform:translate(3px,3px);box-shadow:2px 2px 0 var(--ink);}
.btn:disabled{opacity:0.55;cursor:not-allowed;}

.btn-primary{background:var(--blue);color:var(--btn-primary-text);}
.btn-yellow{background:var(--yellow);color:var(--yellow-ink);}
.btn-white{background:var(--surface);color:var(--text-1);}
.btn-green{background:var(--green);color:#fff;}
.btn-block{width:100%;}
.btn-sm{padding:9px 16px;font-size:0.82rem;box-shadow:var(--shadow-sm);}

.email-display{
  background:var(--blue-soft);
  border:var(--border);
  border-radius:10px;
  padding:16px;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}

.email-display-icon{color:var(--blue);width:1.25rem;height:1.25rem;flex-shrink:0;}
.email-display-text{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.92rem;
  word-break:break-all;
  flex:1;
  color:var(--text-1);
}
.copy-btn{
  width:36px;height:36px;flex-shrink:0;
  border:2.5px solid var(--ink);
  border-radius:8px;
  background:var(--surface);
  box-shadow:2px 2px 0 var(--ink);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  color:var(--ink);
}
.copy-btn .icon{width:0.95rem;height:0.95rem;}
.copy-btn:active{transform:translate(1px,1px);box-shadow:none;}
.copy-btn.copied{background:var(--green-soft);color:var(--green);}

.expiry-note{
  display:flex;align-items:center;gap:7px;
  font-family:var(--font-mono);
  font-size:0.74rem;
  color:var(--text-2);
  margin-bottom:16px;
}
.expiry-note .icon{color:var(--pink);width:0.95em;height:0.95em;}

.action-row{display:flex;gap:10px;flex-wrap:wrap;}
.action-row .btn{flex:1;min-width:140px;}

.history-title{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.78rem;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--text-3);
  margin:24px 0 12px;
  display:flex;align-items:center;gap:8px;
}

.history-item{
  background:var(--surface);
  border:var(--border);
  border-radius:10px;
  box-shadow:var(--shadow-sm);
  padding:13px 14px;
  display:flex;align-items:center;gap:10px;
  margin-bottom:10px;
  cursor:pointer;
  transition:transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.history-item:hover{background:var(--blue-soft);}
.history-item:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--ink);}

.history-item-icon{color:var(--text-3);flex-shrink:0;width:1.05rem;height:1.05rem;}
.history-item-info{flex:1;min-width:0;}
.history-item-email{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.82rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  color:var(--text-1);
}
.history-item-time{font-size:0.7rem;color:var(--text-3);font-family:var(--font-mono);display:flex;align-items:center;gap:5px;margin-top:2px;}
.history-item-time .icon{width:0.85em;height:0.85em;}
.history-item-arrow{color:var(--text-3);flex-shrink:0;width:1rem;height:1rem;}

.empty-history{
  text-align:center;
  padding:24px 10px;
  color:var(--text-3);
  font-size:0.85rem;
  font-family:var(--font-mono);
}

/* ============================================================
   INBOX VIEW
   ============================================================ */
.inbox-select{
  width:100%;
  font-family:var(--font-mono);
  font-weight:600;
  font-size:0.88rem;
  padding:12px 14px;
  border:var(--border);
  border-radius:10px;
  background:var(--surface);
  color:var(--text-1);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  background-repeat:no-repeat;
  background-position:right 14px center;
  padding-right:38px;
}
html[data-mode="light"] .inbox-select{
  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='%230a0a0a' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
html[data-mode="dark"] .inbox-select{
  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='%23f5f5f5' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.refresh-row{display:flex;gap:10px;margin-top:14px;align-items:center;}

.msg-count-badge{
  background:var(--yellow);
  color:var(--yellow-ink);
  border:2.5px solid var(--ink);
  border-radius:8px;
  padding:5px 10px;
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.75rem;
  white-space:nowrap;
}

.msg-list{margin-top:18px;}

.msg-card{
  background:var(--surface);
  border:var(--border);
  border-radius:12px;
  box-shadow:var(--shadow-sm);
  margin-bottom:14px;
  overflow:hidden;
}

.msg-card-head{
  padding:14px 16px;
  display:flex;
  align-items:flex-start;
  gap:12px;
  cursor:pointer;
  transition:background 0.15s;
}
.msg-card-head:hover{background:var(--blue-soft);}

.msg-card-avatar{
  width:36px;height:36px;flex-shrink:0;
  border:2px solid var(--ink);
  border-radius:8px;
  background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);
}
.msg-card-avatar .icon{width:1rem;height:1rem;}

.msg-card-info{flex:1;min-width:0;}
.msg-card-subject{font-weight:700;font-size:0.9rem;margin-bottom:3px;line-height:1.35;color:var(--text-1);}
.msg-card-from{font-family:var(--font-mono);font-size:0.74rem;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.msg-card-time{font-family:var(--font-mono);font-size:0.68rem;color:var(--text-3);margin-top:4px;display:flex;align-items:center;gap:5px;}
.msg-card-time .icon{width:0.8em;height:0.8em;}
.msg-card-chevron{flex-shrink:0;color:var(--text-3);transition:transform 0.2s;margin-top:6px;width:1rem;height:1rem;}
.msg-card.expanded .msg-card-chevron{transform:rotate(180deg);}

.msg-card-body{display:none;border-top:var(--border);background:var(--surface-2);}
.msg-card.expanded .msg-card-body{display:block;}

.msg-body-toolbar{
  padding:10px 16px;
  display:flex;
  gap:8px;
  border-bottom:var(--border-thin);
  background:var(--surface);
}
.toolbar-tab{
  display:inline-flex;align-items:center;gap:6px;
  font-family:var(--font-mono);
  font-size:0.72rem;
  font-weight:700;
  padding:6px 12px;
  border:var(--border-thin);
  border-radius:7px;
  background:var(--surface);
  cursor:pointer;
  color:var(--text-1);
}
.toolbar-tab .icon{width:0.85em;height:0.85em;}
.toolbar-tab.active{background:var(--ink);color:var(--bg);}

/* ── Message preview: cleaner reader treatment ── */
.msg-preview-wrap{
  position:relative;
  background:#fff;
  max-height:420px;
  overflow:auto;
}
.msg-iframe-wrap{background:#fff;}
.msg-iframe-wrap iframe{width:100%;min-height:120px;border:none;display:block;}
.msg-preview-fade{
  position:sticky;
  bottom:0;left:0;right:0;
  height:28px;
  background:linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95));
  pointer-events:none;
}
.msg-preview-loading{
  padding:24px 16px;
  text-align:center;
  color:#9a9a9a;
  font-family:var(--font-mono);
  font-size:0.78rem;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.msg-text-view{
  padding:16px;
  font-size:0.85rem;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
  display:none;
  color:var(--text-1);
  max-height:420px;
  overflow:auto;
}
.msg-text-view.active{display:block;}
.msg-preview-wrap.hidden{display:none;}

.inbox-empty{text-align:center;padding:44px 16px;}
.inbox-empty-icon{
  width:56px;height:56px;
  margin:0 auto 14px;
  border:var(--border);
  border-radius:var(--radius-md);
  background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;
  color:var(--text-2);
}
.inbox-empty-icon .icon{width:24px;height:24px;}
.inbox-empty-title{font-weight:800;font-size:1.05rem;margin-bottom:6px;color:var(--text-1);}
.inbox-empty-text{color:var(--text-2);font-size:0.85rem;}

.loading-row{
  display:flex;align-items:center;justify-content:center;gap:10px;
  padding:30px;
  font-family:var(--font-mono);
  font-size:0.85rem;
  color:var(--text-2);
}
.spinner{
  width:18px;height:18px;
  border:3px solid var(--surface-2);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin 0.7s linear infinite;
  flex-shrink:0;
}
@keyframes spin{to{transform:rotate(360deg);}}

.error-box{
  background:var(--red-soft);
  border:var(--border);
  border-radius:10px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:0.85rem;
  font-weight:600;
  margin-top:14px;
  box-shadow:var(--shadow-sm);
  color:var(--text-1);
}
.error-box .icon{color:#d9364c;width:1.1rem;height:1.1rem;flex-shrink:0;}

/* ============================================================
   TOAST
   ============================================================ */
.toast{
  position:fixed;
  bottom:24px;left:50%;
  transform:translateX(-50%) translateY(100px);
  background:var(--ink);
  color:var(--bg);
  padding:12px 20px;
  border-radius:10px;
  font-family:var(--font-mono);
  font-weight:600;
  font-size:0.82rem;
  border:3px solid var(--ink);
  box-shadow:5px 5px 0 var(--yellow);
  z-index:400;
  transition:transform 0.3s cubic-bezier(.2,.9,.3,1);
  display:flex;align-items:center;gap:8px;
}
.toast .icon{color:var(--green);width:1rem;height:1rem;}
.toast.show{transform:translateX(-50%) translateY(0);}

/* ============================================================
   DOCS PAGE SPECIFIC
   ============================================================ */
.baseurl-box{
  background:var(--blue-soft);
  border:var(--border);
  border-radius:10px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:10px;
}
.baseurl-text{font-family:var(--font-mono);font-weight:700;font-size:0.85rem;word-break:break-all;flex:1;color:var(--text-1);}

.endpoint{margin-bottom:26px;}
.endpoint:last-child{margin-bottom:0;}
.endpoint-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.method-badge{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.72rem;
  background:var(--green);
  color:#fff;
  border:2.5px solid var(--ink);
  border-radius:7px;
  padding:3px 10px;
}
.endpoint-path{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.85rem;
  background:var(--ink);
  color:var(--bg);
  padding:5px 12px;
  border-radius:7px;
  word-break:break-all;
}
.endpoint-desc{font-size:0.86rem;color:var(--text-2);margin-bottom:14px;line-height:1.6;}
.params-title, .code-title{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.72rem;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--text-3);
  margin:16px 0 8px;
}

.param-table{width:100%;border-collapse:collapse;border:var(--border-thin);border-radius:8px;overflow:hidden;font-size:0.82rem;}
.param-table th{background:var(--ink);color:var(--bg);font-family:var(--font-mono);font-size:0.7rem;text-transform:uppercase;letter-spacing:0.04em;padding:8px 10px;text-align:left;}
.param-table td{padding:9px 10px;border-top:1.5px solid var(--surface-2);font-family:var(--font-mono);color:var(--text-1);}
.param-table td:first-child{font-weight:700;color:var(--blue);}

.code-tabs{display:flex;gap:8px;margin-bottom:0;}
.code-tab{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:0.72rem;
  padding:7px 14px;
  border:2.5px solid var(--ink);
  border-bottom:none;
  border-radius:8px 8px 0 0;
  background:var(--surface-2);
  cursor:pointer;
  color:var(--text-2);
}
.code-tab.active{background:var(--ink);color:var(--bg);}

.code-block{display:none;background:var(--code-bg);border:2.5px solid var(--ink);border-radius:0 10px 10px 10px;overflow-x:auto;position:relative;}
.code-block.active{display:block;}
.code-block pre{padding:16px;font-family:var(--font-mono);font-size:0.78rem;line-height:1.7;color:var(--code-text);overflow-x:auto;}

.code-copy{
  position:absolute;top:10px;right:10px;
  width:30px;height:30px;
  background:#21262d;
  border:2px solid #444;
  border-radius:7px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  color:#fff;
}
.code-copy .icon{width:0.85rem;height:0.85rem;}
.code-copy.copied{background:var(--green);border-color:var(--green);}

.tok-key{color:#79c0ff;}
.tok-str{color:#a5d6ff;}
.tok-num{color:#ffa657;}
.tok-comment{color:#8b949e;}

.divider{height:2px;background:repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px);margin:24px 0;opacity:0.15;}

.note-box{
  background:var(--yellow);
  color:var(--yellow-ink);
  border:var(--border);
  border-radius:10px;
  padding:14px 16px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:0.84rem;
  line-height:1.6;
  box-shadow:var(--shadow-sm);
  margin-top:16px;
}
.note-box .icon{width:1.1rem;height:1.1rem;flex-shrink:0;margin-top:1px;}

.status-grid{display:grid;grid-template-columns:auto 1fr;gap:9px 14px;font-size:0.84rem;color:var(--text-1);align-items:center;}
.status-code{font-family:var(--font-mono);font-weight:700;padding:3px 9px;border-radius:6px;border:2px solid var(--ink);text-align:center;}
.status-code.ok{background:var(--green-soft);}
.status-code.err{background:var(--red-soft);}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:480px){
  .panel{padding:18px;}
  .action-row .btn{min-width:100%;}
  .code-block pre{font-size:0.72rem;}
}

@media (prefers-reduced-motion: reduce){
  [data-aos]{opacity:1 !important;transform:none !important;transition:none !important;}
  .spinner{animation:none;}
}
