/* Kibanno.com — Built 100% on Zokeibi v1.4.2 OKLCH Tokens (Zero Inline Styles, Strict CSP) */

.kb-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in oklch, var(--z-bg) 86%, transparent);
  border-bottom: 1px solid var(--z-border);
}

.kb-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.72rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.kb-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--z-ink);
  text-decoration: none;
}

.kb-brand:hover {
  text-decoration: none;
}

.kb-brand-kanji {
  font-weight: 500;
  color: var(--z-ink-soft);
  font-size: 0.82rem;
}

.kb-nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.kb-nav a {
  color: var(--z-ink-muted);
  text-decoration: none;
  transition: color 140ms ease;
}

.kb-nav a:hover,
.kb-nav a.is-current {
  color: var(--z-ink);
}

.kb-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.kb-hero {
  padding: 4.5rem 0 3.1rem;
  border-bottom: 1px solid var(--z-border);
  background: radial-gradient(
    ellipse 70% 55% at 50% -15%,
    color-mix(in oklch, var(--z-accent) 16%, transparent),
    transparent 70%
  );
}

.kb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--z-mono);
  font-size: 0.72rem;
  color: var(--z-ink-muted);
  padding: 0.28rem 0.74rem;
  border-radius: 999px;
  border: 1px solid var(--z-border-strong);
  background: var(--z-surface);
  margin-bottom: 1.3rem;
}

.kb-hero h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.036em;
  margin: 0 0 1.15rem;
  max-width: 19ch;
  color: var(--z-ink);
}

.kb-hero-accent {
  color: var(--z-accent);
}

.kb-lead {
  font-size: 1.03rem;
  line-height: 1.68;
  color: var(--z-ink-muted);
  max-width: 68ch;
  margin: 0 0 1.7rem;
}

.kb-install {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem 0.5rem 1rem;
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border-strong);
  background: var(--z-surface);
  font-family: var(--z-mono);
  font-size: 0.84rem;
  color: var(--z-ink);
  margin-bottom: 1.4rem;
  max-width: 100%;
  flex-wrap: wrap;
}

.kb-install-prompt {
  color: var(--z-accent);
  user-select: none;
}

.kb-cta-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.kb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.85rem;
}

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

.kb-stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--z-ink);
  line-height: 1.15;
}

.kb-stat-lbl {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  color: var(--z-ink-muted);
}

.kb-theme-bar {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border);
  background: var(--z-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.kb-theme-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.kb-theme-label {
  font-size: 0.74rem;
  font-family: var(--z-mono);
  color: var(--z-ink-soft);
  margin-right: 0.25rem;
}

.kb-pill {
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--z-border);
  background: transparent;
  color: var(--z-ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.kb-pill:hover {
  color: var(--z-ink);
  border-color: var(--z-border-strong);
}

.kb-pill.is-active {
  background: var(--z-accent);
  border-color: transparent;
  color: var(--z-accent-ink);
  font-weight: 600;
}

.kb-section {
  padding: 4.2rem 0;
  border-bottom: 1px solid var(--z-border);
}

.kb-section-alt {
  background: color-mix(in oklch, var(--z-surface) 45%, var(--z-bg));
}

.kb-section-head {
  margin-bottom: 2rem;
}

.kb-section-head h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
  color: var(--z-ink);
}

.kb-section-head p {
  margin: 0;
  color: var(--z-ink-muted);
  max-width: 68ch;
  line-height: 1.65;
}

/* Interactive Adaptive Shell Simulator */
.kb-sim-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.kb-sim-modes {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.28rem;
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border-strong);
  background: var(--z-surface);
}

.kb-sim-mode-btn {
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: calc(var(--z-radius) - 3px);
  background: transparent;
  color: var(--z-ink-muted);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.kb-sim-mode-btn:hover {
  color: var(--z-ink);
}

.kb-sim-mode-btn.is-active {
  background: var(--z-accent);
  color: var(--z-accent-ink);
}

.kb-sim-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  gap: 1.2rem;
  align-items: start;
}

@media (max-width: 920px) {
  .kb-sim-stage {
    grid-template-columns: 1fr;
  }
}

.kb-device-wrap {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border);
  background: var(--z-surface);
  min-height: 520px;
}

.kb-device {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--z-border-strong);
  background: var(--z-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--z-shadow);
  transition: max-width 220ms ease, border-radius 220ms ease;
  position: relative;
}

.kb-device[data-sim-device="phone"] {
  max-width: 368px;
  border-radius: 30px;
  border-width: 3px;
}

.kb-device[data-sim-device="tablet"] {
  max-width: 680px;
  border-radius: 22px;
  border-width: 2px;
}

.kb-device[data-sim-device="desktop"] {
  max-width: 100%;
  border-radius: 12px;
}

.kb-device-chrome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.9rem;
  background: var(--z-surface-2);
  border-bottom: 1px solid var(--z-border);
  font-size: 0.8rem;
}

.kb-win-dots {
  display: none;
  gap: 0.35rem;
  align-items: center;
}

.kb-device[data-sim-device="desktop"] .kb-win-dots {
  display: inline-flex;
}

.kb-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.kb-dot-r { background: #ef4444; }
.kb-dot-y { background: #f59e0b; }
.kb-dot-g { background: #10b981; }

.kb-win-menu {
  display: none;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: var(--z-ink-muted);
  padding: 0.32rem 0.9rem;
  background: var(--z-surface);
  border-bottom: 1px solid var(--z-border);
}

.kb-device[data-sim-device="desktop"] .kb-win-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kb-device-body {
  display: flex;
  flex: 1;
  min-height: 390px;
  position: relative;
}

.kb-sim-rail {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.45rem;
  background: var(--z-surface);
  border-right: 1px solid var(--z-border);
}

.kb-device[data-sim-device="tablet"] .kb-sim-rail {
  display: flex;
  width: 78px;
}

.kb-device[data-sim-device="desktop"] .kb-sim-rail {
  display: flex;
  width: 162px;
  padding: 0.75rem 0.6rem;
}

.kb-rail-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.48rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--z-ink-muted);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.kb-device[data-sim-device="tablet"] .kb-rail-btn {
  flex-direction: column;
  justify-content: center;
  font-size: 0.66rem;
  padding: 0.45rem 0.2rem;
}

.kb-rail-btn kbd {
  display: none;
  font-size: 0.65rem;
  font-family: var(--z-mono);
  color: var(--z-ink-soft);
}

.kb-device[data-sim-device="desktop"] .kb-rail-btn kbd {
  display: inline;
}

.kb-rail-btn.is-active {
  background: var(--z-surface-2);
  border-color: var(--z-accent-border);
  color: var(--z-ink);
  font-weight: 600;
}

.kb-sim-panes {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
}

.kb-device[data-sim-device="tablet"] .kb-sim-panes.has-detail,
.kb-device[data-sim-device="desktop"] .kb-sim-panes.has-detail {
  grid-template-columns: 0.92fr 1.08fr;
}

.kb-sim-pane {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.kb-sim-detail {
  padding: 0.85rem;
  border-left: 1px solid var(--z-border);
  background: color-mix(in oklch, var(--z-surface) 60%, var(--z-bg));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.kb-device[data-sim-device="phone"] .kb-sim-panes.has-detail .kb-sim-pane {
  display: none;
}

.kb-device[data-sim-device="phone"] .kb-sim-detail {
  border-left: 0;
}

.kb-sim-lot {
  padding: 0.7rem 0.78rem;
  border-radius: var(--z-radius-sm);
  border: 1px solid var(--z-border);
  background: var(--z-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--z-ink);
}

.kb-sim-lot:hover,
.kb-sim-lot.is-selected {
  border-color: var(--z-accent-border);
  background: var(--z-surface-2);
}

.kb-sim-price {
  font-family: var(--z-mono);
  font-weight: 700;
  color: var(--z-emerald);
}

.kb-sim-bottom-tabs {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--z-border);
  background: var(--z-surface);
  padding: 0.35rem 0.25rem;
}

.kb-device[data-sim-device="phone"] .kb-sim-bottom-tabs {
  display: grid;
}

.kb-btab-btn {
  border: 0;
  background: transparent;
  color: var(--z-ink-muted);
  font-size: 0.71rem;
  padding: 0.4rem 0.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.kb-btab-btn.is-active {
  color: var(--z-accent);
  background: color-mix(in oklch, var(--z-accent) 12%, transparent);
  font-weight: 700;
}

.kb-sim-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.65rem;
  z-index: 15;
}

.kb-sim-sheet-backdrop[hidden] {
  display: none;
}

.kb-device[data-sim-device="tablet"] .kb-sim-sheet-backdrop,
.kb-device[data-sim-device="desktop"] .kb-sim-sheet-backdrop {
  align-items: center;
}

.kb-sim-sheet {
  width: 100%;
  max-width: 340px;
  border-radius: 16px;
  border: 1px solid var(--z-border-strong);
  background: var(--z-surface);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--z-shadow);
}

.kb-sim-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--z-border-strong);
  margin: 0 auto 0.2rem;
}

.kb-sim-inspector {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.kb-telemetry-log {
  margin: 0;
  padding: 0.85rem;
  border-radius: var(--z-radius-sm);
  border: 1px solid var(--z-border);
  background: var(--z-bg);
  font-family: var(--z-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--z-ink-muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 225px;
  overflow-y: auto;
}

/* Grids & Cards */
.kb-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.kb-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.kb-shell-list {
  margin: 0.6rem 0 0;
  padding-left: 1.15rem;
  color: var(--z-ink-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Code Tabs */
.kb-code-shell {
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border-strong);
  background: var(--z-surface);
  overflow: hidden;
}

.kb-code-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--z-border);
  background: var(--z-surface-2);
  flex-wrap: wrap;
}

.kb-code-tab-list {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.kb-tab-btn {
  padding: 0.36rem 0.72rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--z-ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

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

.kb-tab-btn.is-active {
  background: var(--z-surface);
  border-color: var(--z-border-strong);
  color: var(--z-ink);
  font-weight: 600;
}

.kb-code-panel {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-family: var(--z-mono);
  font-size: 0.82rem;
  line-height: 1.62;
  color: var(--z-ink);
  background: var(--z-bg);
}

.kb-code-panel[hidden] {
  display: none;
}

/* Comparison Table */
.kb-table-wrap {
  overflow-x: auto;
  border-radius: var(--z-radius);
  border: 1px solid var(--z-border);
  background: var(--z-surface);
}

.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.kb-table th,
.kb-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--z-border);
  vertical-align: top;
}

.kb-table th {
  background: var(--z-surface-2);
  font-weight: 600;
  color: var(--z-ink);
  white-space: nowrap;
}

.kb-table tr:last-child td {
  border-bottom: 0;
}

.kb-table td:nth-child(2) {
  background: color-mix(in oklch, var(--z-accent) 7%, transparent);
  color: var(--z-ink);
  font-weight: 500;
}

/* Ecosystem Trinity */
.kb-trinity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.kb-trinity-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.kb-trinity-card.is-featured {
  border-color: var(--z-accent-border);
}

/* Docs Layout */
.kb-docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

@media (max-width: 860px) {
  .kb-docs-layout {
    grid-template-columns: 1fr;
  }
}

.kb-docs-aside {
  position: sticky;
  top: 4.8rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kb-docs-aside-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--z-ink-soft);
  font-family: var(--z-mono);
  margin: 0.85rem 0 0.3rem;
}

.kb-docs-aside-title:first-child {
  margin-top: 0;
}

.kb-docs-aside a {
  padding: 0.38rem 0.65rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--z-ink-muted);
  font-size: 0.85rem;
}

.kb-docs-aside a:hover {
  background: var(--z-surface);
  color: var(--z-ink);
}

.kb-docs-article {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  min-width: 0;
}

.kb-doc-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  scroll-margin-top: 5.5rem;
}

.kb-doc-block p {
  color: var(--z-ink-muted);
  line-height: 1.68;
}

.kb-pre {
  margin: 0.85rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: var(--z-radius-sm);
  border: 1px solid var(--z-border);
  background: var(--z-surface);
  overflow-x: auto;
  font-family: var(--z-mono);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Footer */
.kb-footer {
  padding: 2.6rem 0 3.2rem;
  font-size: 0.84rem;
  color: var(--z-ink-muted);
}

.kb-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.kb-footer-links a {
  color: var(--z-ink-muted);
  text-decoration: none;
}

.kb-footer-links a:hover {
  color: var(--z-ink);
}

.kb-spacer-sm {
  margin-top: 0.75rem;
}

.kb-muted-sm {
  font-size: 0.82rem;
  color: var(--z-ink-muted);
  margin: 0;
}

.kb-title-sm {
  margin: 0;
  font-size: 0.96rem;
}
