/* ==========================================================================
   Studio Hermitage - Plugin Manual Common Stylesheet
   Benchmark: cubelab Technical Documentation Style
   ========================================================================== */

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

:root {
  --primary: #0f2744;
  --primary-hover: #1e3a8a;
  --primary-light: #eff6ff;
  --accent-blue: #1d4ed8;
  --accent-green: #059669;
  --accent-yellow: #d97706;
  --accent-red: #dc2626;
  --dark: #0f172a;
  --text: #334155;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-focus: #94a3b8;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-area img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-title a {
  color: inherit;
  text-decoration: none;
}

.badge-version {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.725rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--accent-blue);
  border: 1px solid #bfdbfe;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-link:hover {
  color: var(--dark);
  text-decoration: none;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.btn-store:hover {
  background: var(--primary-hover);
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 44px 24px 36px;
  text-align: center;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  background: var(--primary-light);
  padding: 3px 12px;
  border-radius: 999px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-pill strong {
  color: var(--dark);
}

/* Layout Container (2 Columns) */
.layout-container {
  max-width: 1240px;
  margin: 36px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 36px;
  align-items: start;
}

/* Sidebar Navigation (TOC) */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 76px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list {
  list-style: none;
}

.toc-item {
  margin-bottom: 4px;
}

.toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--text);
  border-radius: var(--radius);
  line-height: 1.4;
  transition: all 0.15s ease;
}

.toc-link:hover {
  background: var(--primary-light);
  color: var(--accent-blue);
  text-decoration: none;
}

.toc-link.active {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
}

.toc-sublist {
  list-style: none;
  padding-left: 14px;
  margin: 4px 0 6px;
}

.toc-sublink {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 8px;
  display: block;
  border-radius: var(--radius-sm);
}

.toc-sublink:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

/* Mobile TOC Toggle Button */
.mobile-toc-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  text-align: left;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

/* Main Content Panel */
.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.section {
  margin-bottom: 48px;
  scroll-margin-top: 86px;
}

.section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark);
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--accent-blue);
  border-radius: 2px;
}

h4 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px 0;
}

p {
  margin-bottom: 14px;
  line-height: 1.8;
}

ul, ol {
  margin: 0 0 16px 24px;
}

li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* Callout Boxes */
.callout {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  border-left: 4px solid;
  font-size: 0.9rem;
  line-height: 1.7;
}

.callout-info {
  background: #eff6ff;
  border-color: var(--accent-blue);
  color: #1e3a8a;
}

.callout-success {
  background: #f0fdf4;
  border-color: var(--accent-green);
  color: #065f46;
}

.callout-warning {
  background: #fffbeb;
  border-color: var(--accent-yellow);
  color: #92400e;
}

.callout-danger {
  background: #fef2f2;
  border-color: var(--accent-red);
  color: #991b1b;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

/* Code & Terminal Blocks */
.code-block-wrapper {
  position: relative;
  margin-bottom: 18px;
}

pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 18px 20px;
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid #1e293b;
}

code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  border: 1px solid var(--border);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

th {
  background: #f8fafc;
  color: var(--dark);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.65;
}

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

tr:hover td {
  background: #fdfdfd;
}

/* Feature Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 20px 0 28px;
}

.card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Step Guide */
.step-list {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.step-num {
  background: var(--primary);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content {
  flex-grow: 1;
}

.step-content h4 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  color: var(--dark);
}

/* Manual Footer */
.manual-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.manual-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  list-style: none;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .layout-container {
    grid-template-columns: 1fr;
    margin-top: 20px;
    padding: 0 16px;
  }

  .mobile-toc-toggle {
    display: flex;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: none;
    margin-bottom: 24px;
  }

  .sidebar.active {
    display: block;
  }

  .content {
    padding: 24px 20px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .header-container {
    padding: 12px 16px;
  }
}

/* ==========================================================================
   Manual Hub List Layout (Single Column List Styles)
   ========================================================================== */

.manual-plugins-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1020px;
  margin: 0 auto;
}

.manual-list-card {
  background-color: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: row;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.manual-list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  border-color: #2563eb;
}

.manual-list-banner {
  position: relative;
  width: 320px;
  min-width: 320px;
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manual-list-banner img {
  object-fit: cover;
  transition: transform 0.4s ease;
}

.manual-list-card:hover .manual-list-banner img {
  transform: scale(1.03);
}

.manual-list-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background-color: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.manual-list-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.manual-list-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.manual-list-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  object-fit: cover;
  flex-shrink: 0;
}

.manual-list-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}

.manual-list-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin: 6px 0 10px;
}

.manual-list-title a {
  color: inherit;
  text-decoration: none;
}

.manual-list-title a:hover {
  color: #2563eb;
}

.manual-list-desc {
  font-size: 0.93rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 20px;
}

.manual-list-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.manual-list-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.manual-list-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

@media (max-width: 820px) {
  .manual-list-card {
    flex-direction: column;
  }
  .manual-list-banner {
    width: 100%;
    min-width: 100%;
    aspect-ratio: 338 / 190;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .manual-list-body {
    padding: 22px 20px;
  }
  .manual-list-title {
    font-size: 1.15rem;
  }
  .manual-list-footer {
    justify-content: stretch;
  }
  .manual-list-btn {
    width: 100%;
    justify-content: center;
  }
}

