/* ==========================================================================
   RYOKU ARCH DESIGN SYSTEM — TOPNOTCHFREAKS KERNEL WIKI
   Manifesto: PAPER #000000 · INK #cdc4ba · BONE ON BLACK · RADIUS 2 · NO SHADOW
   Fonts: Fraunces (Editorial Serif) + Space Grotesk + JetBrains Mono + Kanji
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Ryoku Core Palette: Bone on Black */
  --ryoku-paper: #000000;
  --ryoku-surface-0: #050505;
  --ryoku-surface-1: #0b0a09;
  --ryoku-surface-2: #121110;
  --ryoku-surface-3: #1a1816;
  --ryoku-surface-hover: #1e1c1a;

  /* Ink Ramp */
  --ryoku-ink: #cdc4ba;
  --ryoku-ink-bright: #f0ebe4;
  --ryoku-ink-muted: #8a837b;
  --ryoku-ink-faint: #524d47;
  --ryoku-ink-subtle: #2d2a27;

  /* Micro Borders (Radius 2-4, Sharp, Disciplined) */
  --ryoku-border: #221f1d;
  --ryoku-border-subtle: #181615;
  --ryoku-border-bright: #3d3733;
  --ryoku-border-focus: #cdc4ba;

  /* Ryoku Accent Spectrum */
  --ryoku-crimson: #e05544;
  --ryoku-crimson-subtle: rgba(224, 85, 68, 0.12);
  --ryoku-crimson-border: rgba(224, 85, 68, 0.35);

  --ryoku-cyan: #56b6c2;
  --ryoku-cyan-subtle: rgba(86, 182, 194, 0.12);

  --ryoku-lime: #a9dc76;
  --ryoku-lime-subtle: rgba(169, 220, 118, 0.12);

  --ryoku-ochre: #e5c07b;
  --ryoku-ochre-subtle: rgba(229, 192, 123, 0.12);

  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', Consolas, monospace;

  /* Geometry & Precision */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease-ryoku: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--ryoku-paper);
}

body {
  background-color: var(--ryoku-paper);
  color: var(--ryoku-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle Film Grain (5.5% Ryoku Grain) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(205, 196, 186, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--ryoku-paper);
}
::-webkit-scrollbar-thumb {
  background: var(--ryoku-surface-3);
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ryoku-ink-muted);
}

::selection {
  background: var(--ryoku-crimson);
  color: var(--ryoku-ink-bright);
}

/* ==========================================================================
   Typography Classes
   ========================================================================== */
.font-serif {
  font-family: var(--font-serif);
}

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

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

.text-crimson {
  color: var(--ryoku-crimson) !important;
}

.text-ink {
  color: var(--ryoku-ink-bright) !important;
}

.text-muted {
  color: var(--ryoku-ink-muted) !important;
}

.text-faint {
  color: var(--ryoku-ink-faint) !important;
}

.kanji-badge {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ryoku-crimson);
  margin-right: 4px;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  max-width: 1680px;
  margin: 0 auto;
  z-index: 2;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-fast);
}
.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Ryoku Sidebar Dossier
   ========================================================================== */
.sidebar {
  width: 290px;
  background: var(--ryoku-surface-0);
  border-right: 1px solid var(--ryoku-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s var(--ease-ryoku);
  flex-shrink: 0;
}

.sb-header {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--ryoku-border);
  background: var(--ryoku-surface-0);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  cursor: pointer;
}

.brand-kanji-box {
  width: 38px;
  height: 38px;
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border-bright);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
  transition: border-color 0.2s, transform 0.2s var(--ease-ryoku);
}
.brand-badge:hover .brand-kanji-box {
  border-color: var(--ryoku-crimson);
  transform: scale(1.05);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-title span {
  color: var(--ryoku-crimson);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ryoku-ink-faint);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.sb-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.status-dot-pulse {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ryoku-ink);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--ryoku-crimson);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--ryoku-crimson);
  animation: ryoku-pulse 2s infinite ease-in-out;
}

@keyframes ryoku-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Quick Search Widget */
.sb-search-wrap {
  padding: 12px 14px 6px;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  gap: 8px;
  transition: all 0.2s var(--ease-fast);
}
.search-input-box:focus-within {
  border-color: var(--ryoku-border-bright);
  background: var(--ryoku-surface-2);
}

.search-input-box input {
  background: transparent;
  border: none;
  color: var(--ryoku-ink-bright);
  font-family: var(--font-sans);
  font-size: 12px;
  width: 100%;
  outline: none;
}
.search-input-box input::placeholder {
  color: var(--ryoku-ink-faint);
}

.search-kbd {
  background: var(--ryoku-surface-3);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

/* Sidebar Navigation Items */
.sb-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ryoku-ink-faint);
  letter-spacing: 0.1em;
  padding: 12px 8px 4px;
  text-transform: uppercase;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ryoku-ink-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s var(--ease-fast);
  text-align: left;
}

.nav-item-btn:hover {
  background: var(--ryoku-surface-1);
  color: var(--ryoku-ink-bright);
  border-color: var(--ryoku-border-subtle);
}

.nav-item-btn:active {
  transform: scale(0.99);
}

.nav-item-btn.active {
  background: var(--ryoku-surface-2);
  color: var(--ryoku-ink-bright);
  border-color: var(--ryoku-border);
  border-left: 2px solid var(--ryoku-crimson);
}

.nav-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-dot-indicator {
  width: 4px;
  height: 4px;
  background: var(--ryoku-ink-faint);
  border-radius: 50%;
  transition: background 0.2s;
}
.nav-item-btn:hover .nav-dot-indicator {
  background: var(--ryoku-ink);
}
.nav-item-btn.active .nav-dot-indicator {
  background: var(--ryoku-crimson);
}

.nav-tag-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ryoku-ink-faint);
}
.nav-item-btn.active .nav-tag-badge {
  color: var(--ryoku-crimson);
}

.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--ryoku-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ryoku-surface-0);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ryoku-ink-faint);
}

.tui-pulse-btn {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.tui-pulse-btn:hover {
  border-color: var(--ryoku-crimson);
  color: var(--ryoku-ink-bright);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ryoku-paper);
}

/* Ryoku Top Sticky Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ryoku-border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  align-items: center;
  gap: 6px;
}

.breadcrumb-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.bc-root {
  color: var(--ryoku-ink-faint);
}

.bc-sep {
  color: var(--ryoku-border-bright);
}

.bc-current {
  color: var(--ryoku-ink-bright);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-clock {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ryoku-ink-bright);
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  padding: 3px 9px;
  border-radius: var(--radius-xs);
}

/* Ryoku Instrument Light Strip */
.instrument-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  background: var(--ryoku-surface-0);
  border-bottom: 1px solid var(--ryoku-border);
}

.instrument-dials {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inst-segment {
  height: 3px;
  background: var(--ryoku-surface-3);
  border-radius: var(--radius-xs);
  transition: all 0.3s var(--ease-ryoku);
}

.inst-segment.s-dot { width: 4px; }
.inst-segment.s-short { width: 20px; }
.inst-segment.s-med { width: 40px; }
.inst-segment.s-long { width: 70px; }

.inst-segment.active {
  background: var(--ryoku-ink-bright);
}

.inst-segment.crimson-active {
  background: var(--ryoku-crimson);
  box-shadow: 0 0 8px var(--ryoku-crimson);
}

/* Content Container */
.content-body {
  flex: 1;
  padding: 32px 32px 80px;
  max-width: 1180px;
}

/* Sections */
.doc-section {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease-fast), transform 0.25s var(--ease-ryoku);
}
.doc-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Ryoku Plate & Dossier Components (Plate Bloom)
   ========================================================================== */
.section-headline {
  margin-bottom: 28px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ryoku-crimson);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 400;
  color: var(--ryoku-ink-bright);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-desc {
  font-size: 14.5px;
  color: var(--ryoku-ink-muted);
  margin-top: 8px;
  max-width: 760px;
  line-height: 1.6;
}

.sub-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ryoku-ink-bright);
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-title::before {
  content: '力';
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ryoku-crimson);
}

/* Plate Bloom Base */
.ryoku-plate {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 22px;
  position: relative;
  transition: border-color 0.2s var(--ease-ryoku), background-color 0.2s;
}
.ryoku-plate:hover {
  border-color: var(--ryoku-border-bright);
}

/* Hero Section Dossier */
.hero-dossier-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.hero-main-plate {
  grid-column: span 12;
  background: var(--ryoku-surface-0);
  border: 1px solid var(--ryoku-border-bright);
  padding: 28px 24px;
}

.hero-dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ryoku-border);
}

.hero-dossier-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ryoku-crimson);
  letter-spacing: 0.08em;
}

.hero-editorial-title {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 300;
  color: var(--ryoku-ink-bright);
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero-editorial-title em {
  font-style: italic;
  color: var(--ryoku-ink);
}
.hero-editorial-title span {
  color: var(--ryoku-crimson);
  font-weight: 600;
}

.hero-dossier-lead {
  font-size: 14.5px;
  color: var(--ryoku-ink-muted);
  max-width: 680px;
  line-height: 1.65;
}

/* Fastfetch TUI Readout Plate */
.fastfetch-plate {
  grid-column: span 12;
  background: var(--ryoku-surface-0);
  border: 1px solid var(--ryoku-border);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-x: auto;
}

.fastfetch-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
}

.fastfetch-ascii {
  color: var(--ryoku-crimson);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  user-select: none;
}

.fastfetch-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ff-row {
  display: flex;
  gap: 12px;
}
.ff-key {
  color: var(--ryoku-ink-faint);
  min-width: 90px;
}
.ff-val {
  color: var(--ryoku-ink-bright);
}

/* Interactive Dispatcher Plate */
.dispatcher-plate {
  grid-column: span 12;
  background: var(--ryoku-surface-0);
  border: 1px solid var(--ryoku-border);
}

.disp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.disp-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.disp-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.disp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.disp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ryoku-ink-faint);
  text-transform: uppercase;
}

.disp-select {
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.disp-select:hover, .disp-select:focus {
  border-color: var(--ryoku-border-bright);
}

.disp-code-output {
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ryoku-ink-bright);
  overflow-x: auto;
}

.disp-code-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Metric / Stat Plates */
.stat-plate-4 {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ryoku-ink-faint);
  letter-spacing: 0.08em;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--ryoku-ink-bright);
  line-height: 1.1;
  margin: 12px 0 4px;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--ryoku-ink-muted);
}

/* Standard Plate Grids */
.ryoku-plate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ryoku-plate-grid.tri-col {
  grid-template-columns: repeat(3, 1fr);
}

.workflow-plate {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.workflow-plate:hover {
  border-color: var(--ryoku-border-bright);
  background: var(--ryoku-surface-hover);
}
.workflow-plate:active {
  transform: scale(0.99);
}

.wf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wf-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ryoku-ink);
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.arrow-icon-link {
  font-size: 15px;
  color: var(--ryoku-ink-faint);
  transition: color 0.2s, transform 0.2s;
}
.workflow-plate:hover .arrow-icon-link {
  color: var(--ryoku-ink-bright);
  transform: translate(2px, -2px);
}

.wf-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ryoku-ink-bright);
  margin-bottom: 6px;
}

.wf-desc {
  font-size: 13px;
  color: var(--ryoku-ink-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.wf-footer {
  padding-top: 12px;
  border-top: 1px solid var(--ryoku-border-subtle);
}

/* Chip Pills */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-pill.crimson {
  background: var(--ryoku-crimson-subtle);
  border-color: var(--ryoku-crimson-border);
  color: var(--ryoku-crimson);
}

.chip-pill.lime {
  background: var(--ryoku-lime-subtle);
  border-color: rgba(169, 220, 118, 0.3);
  color: var(--ryoku-lime);
}

.chip-pill.cyan {
  background: var(--ryoku-cyan-subtle);
  border-color: rgba(86, 182, 194, 0.3);
  color: var(--ryoku-cyan);
}

.chip-pill.ochre {
  background: var(--ryoku-ochre-subtle);
  border-color: rgba(229, 192, 123, 0.3);
  color: var(--ryoku-ochre);
}

/* Callout Box */
.ryoku-callout {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.ryoku-callout.c-info {
  border-left: 2px solid var(--ryoku-cyan);
}
.ryoku-callout.c-success {
  border-left: 2px solid var(--ryoku-lime);
}
.ryoku-callout.c-warn {
  border-left: 2px solid var(--ryoku-ochre);
}

.callout-icon {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ryoku-ink-bright);
  flex-shrink: 0;
}

.callout-content {
  font-size: 13px;
  color: var(--ryoku-ink-muted);
  line-height: 1.55;
}
.callout-content strong {
  color: var(--ryoku-ink-bright);
}

/* Step Flow Timeline */
.step-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.step-card-item {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s;
}
.step-card-item:hover {
  border-color: var(--ryoku-border-bright);
}

.step-card-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
}

.step-card-desc {
  font-size: 13px;
  color: var(--ryoku-ink-muted);
}

/* ==========================================================================
   Comparison Cards
   ========================================================================== */
.compare-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.cmp-card {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.cmp-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ryoku-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ryoku-surface-2);
}

.cmp-head-title {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
}

.cmp-body {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
}

.cmp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--ryoku-border-subtle);
  font-size: 12px;
}
.cmp-row:last-child {
  border-bottom: none;
}

.cmp-key {
  color: var(--ryoku-ink-faint);
  font-family: var(--font-mono);
}

.cmp-val {
  color: var(--ryoku-ink-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: right;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.table-wrapper {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  overflow-x: auto;
  margin-bottom: 24px;
}

.ryoku-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.ryoku-table th {
  background: var(--ryoku-surface-2);
  color: var(--ryoku-ink-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ryoku-border);
  text-transform: uppercase;
}

.ryoku-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--ryoku-border-subtle);
  color: var(--ryoku-ink);
  vertical-align: middle;
}

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

.ryoku-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.strong-text {
  font-weight: 600;
  color: var(--ryoku-ink-bright);
}

/* ==========================================================================
   Code Snippet Box
   ========================================================================== */
.ryoku-code-box {
  background: var(--ryoku-surface-0);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 22px;
}

.code-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--ryoku-surface-1);
  border-bottom: 1px solid var(--ryoku-border);
}

.code-title-spec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ryoku-ink-muted);
}

.copy-btn {
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  color: var(--ryoku-ink-bright);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.copy-btn:hover {
  background: var(--ryoku-surface-3);
  border-color: var(--ryoku-border-bright);
}
.copy-btn:active {
  transform: scale(0.96);
}

.ryoku-code-box pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ryoku-ink);
}

.syn-comment { color: var(--ryoku-ink-faint); font-style: italic; }
.syn-key { color: var(--ryoku-ink-bright); font-weight: 600; }
.syn-val { color: var(--ryoku-lime); }

/* ==========================================================================
   Secret Grid
   ========================================================================== */
.secret-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.secret-card {
  background: var(--ryoku-surface-1);
  border: 1px solid var(--ryoku-border);
  border-radius: var(--radius-xs);
  padding: 18px;
}

.secret-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.secret-key-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ryoku-ink-bright);
}

.secret-scope {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ryoku-ink-faint);
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.secret-desc-text {
  font-size: 12.5px;
  color: var(--ryoku-ink-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Floating Toast
   ========================================================================== */
.ryoku-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ryoku-surface-2);
  border: 1px solid var(--ryoku-border-bright);
  color: var(--ryoku-ink-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s var(--ease-ryoku);
  z-index: 999;
}
.ryoku-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ryoku-toast-dot {
  width: 5px;
  height: 5px;
  background: var(--ryoku-crimson);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--ryoku-crimson);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-dossier-grid {
    grid-template-columns: 1fr;
  }
  .stat-plate-4 {
    grid-column: span 1;
  }
  .ryoku-plate-grid.tri-col,
  .compare-container {
    grid-template-columns: 1fr;
  }
  .fastfetch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.95);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .mobile-overlay {
    display: block;
  }
  .topbar {
    padding: 8px 14px;
  }
  .content-body {
    padding: 16px 14px 60px;
  }
  .hero-editorial-title {
    font-size: 28px;
  }
  .section-title {
    font-size: 26px;
  }
}
