@charset "UTF-8";

/* ==========================================================================
   ExDia Official Operation Manual Stylesheet (https://sekitan.net/exdia/docs/)
   Layered on top of exdia.css — shares ExDia design tokens & surface hierarchy
   ========================================================================== */

:root {
  --docs-accent: #2563EB;
  --docs-accent-deep: var(--brand-pro);
}

/* Base Scroll Rail */
.scroll-rail-fill {
  background-color: var(--docs-accent);
}

/* Header Badge (inherits ExDia site-header & nav styles cleanly) */
.docs-header-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-control);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Top Breadcrumb & Docs Hero Band (aligned with .guide-hero) */
.docs-hero {
  padding: 36px 0 32px;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-hairline);
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.docs-breadcrumb a {
  color: var(--ink-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}

.docs-breadcrumb a:hover {
  color: var(--docs-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-breadcrumb-sep {
  color: var(--border-control);
}

.docs-breadcrumb-current {
  color: var(--ink-primary);
  font-weight: 700;
}

.docs-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.docs-chapter-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-control);
  border: 1px solid var(--border-hairline);
  color: var(--docs-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
}

.docs-version-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.docs-title {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
  margin-bottom: 12px;
}

.docs-lead {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

/* Main 2-Column Layout (PC Sidebar + Article) */
.docs-layout-section {
  background-color: var(--bg-canvas);
  padding: 36px 0 76px;
}

.docs-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.docs-sidebar {
  position: static;
  padding: 16px 14px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: none;
}

.docs-sidebar-group + .docs-sidebar-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

.docs-sidebar-heading {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  margin-bottom: 6px;
  padding-left: 10px;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.docs-nav-link {
  display: block;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  box-shadow: none;
  background-color: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.docs-nav-link:hover {
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
}

.docs-nav-link.is-current {
  background-color: var(--bg-canvas);
  border-color: var(--border-hairline);
  color: var(--docs-accent);
  font-weight: 700;
  box-shadow: none;
}

.docs-toc-link {
  display: block;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  box-shadow: none;
  background-color: transparent;
  font-size: 0.84375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-primary);
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.docs-toc-list > li:not(:first-child) > .docs-toc-link:not(.docs-toc-link--h3) {
  margin-top: 6px;
}

.docs-toc-link--h3 {
  padding: 3px 10px 3px 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.42;
  color: var(--ink-secondary);
}

.docs-toc-link:hover {
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
}

.docs-toc-link.is-active {
  color: var(--docs-accent);
  background-color: var(--bg-canvas);
  border-color: var(--border-hairline);
  font-weight: 700;
  box-shadow: none;
}

/* Mobile Collapsible TOC (< 960px) */
.docs-mobile-toc {
  display: none;
  margin-bottom: 24px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.docs-mobile-toc-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.docs-mobile-toc-summary::-webkit-details-marker {
  display: none;
}

.docs-mobile-toc-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-secondary);
  transition: transform 200ms ease;
}

.docs-mobile-toc[open] .docs-mobile-toc-chevron {
  transform: rotate(180deg);
}

.docs-mobile-toc-body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border-hairline);
}

.docs-mobile-toc-subhead {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--ink-secondary);
  margin: 12px 0 6px;
}

/* Article Typography & Blocks */
.docs-main {
  min-width: 0;
}

.docs-article {
  max-width: 780px;
  min-width: 0;
  color: var(--ink-primary);
}

.docs-article > *:first-child {
  margin-top: 0;
}

.docs-article h2 {
  margin: 46px 0 16px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--border-hairline);
  font-size: clamp(1.32rem, 2.2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.docs-article h3 {
  margin: 32px 0 10px;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink-primary);
}

.docs-article h4 {
  margin: 22px 0 8px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.48;
  color: var(--ink-primary);
}

.docs-article p {
  margin: 10px 0 15px;
  font-size: 0.96875rem;
  line-height: 1.82;
  color: var(--ink-secondary);
}

.docs-article p strong,
.docs-article li strong,
.docs-article td strong,
.docs-article dd strong {
  color: var(--ink-primary);
}

.docs-article a {
  color: var(--docs-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 140ms ease;
}

.docs-article a:hover {
  color: var(--docs-accent-deep);
}

.docs-article a.btn,
.docs-article a.docs-chapter-link,
.docs-article a.docs-pager-link {
  text-decoration: none;
}

.docs-article ul,
.docs-article ol {
  margin: 10px 0 18px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.docs-article ol.docs-chapter-list,
.docs-article ol.docs-quick-list {
  padding-left: 0;
  margin: 18px 0 36px;
}

.docs-article li {
  font-size: 0.96875rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.docs-article li > ul,
.docs-article li > ol {
  margin: 6px 0 4px;
}

.docs-article code {
  overflow-wrap: anywhere;
  word-break: break-word;
  background-color: var(--bg-control);
  border: 1px solid var(--border-hairline);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.875rem;
  color: var(--ink-primary);
}

.docs-article kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-primary);
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-control);
  border-bottom-width: 2px;
  border-radius: 5px;
  box-shadow: none;
}

.docs-article hr {
  border: 0;
  border-top: 1px solid var(--border-hairline);
  margin: 34px 0;
}

/* Tables (Uniform 1px Border, Zero Card Shadow) */
.docs-table-wrap {
  margin: 18px 0 26px;
  max-width: 100%;
  overflow-x: auto;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.docs-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-primary);
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-control);
  white-space: nowrap;
}

.docs-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.875rem;
  color: var(--ink-secondary);
  vertical-align: top;
  line-height: 1.68;
  min-width: 110px;
}

.docs-table code {
  font-size: 0.8125rem;
}

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

/* Callouts & Blockquotes (Uniform 1px Border + Subtle Surface, Zero Left Accent Bar / Pastel Wash) */
.docs-callout,
.docs-article blockquote {
  margin: 22px 0 26px;
  padding: 16px 20px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  box-shadow: none;
}

.docs-callout--tip {
  background-color: var(--bg-subtle);
  border-color: var(--border-hairline);
}

.docs-callout--important {
  background-color: var(--bg-subtle);
  border-color: var(--border-control);
}

.docs-callout-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  color: var(--ink-secondary);
}

.docs-callout--tip .docs-callout-label {
  color: var(--docs-accent);
}

.docs-callout--important .docs-callout-label {
  color: var(--ink-primary);
}

.docs-callout p,
.docs-article blockquote p {
  margin: 4px 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink-primary);
}

.docs-callout p:last-child,
.docs-article blockquote p:last-child {
  margin-bottom: 0;
}

/* Edition Clarification Panel in Docs Index (aligned with .guides-hub-clarify) */
.docs-edition-strip {
  margin: 0 0 36px;
  padding: 20px 22px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background-color: var(--bg-subtle);
  box-shadow: none;
}

.docs-edition-strip-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin: 0 0 12px;
}

.docs-edition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.docs-edition-row {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-edition-term {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.5;
}

.docs-edition-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.docs-edition-desc code {
  font-size: 0.8125rem;
}

/* Index Chapter Cards (aligned with .guides-grid / .guide-card, Flat Fine-Border Texture) */
.docs-chapter-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.docs-chapter-item {
  display: flex;
  min-width: 0;
}

.docs-chapter-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 22px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.docs-chapter-link:hover {
  border-color: var(--border-control);
  background-color: var(--bg-subtle);
}

.docs-chapter-link:hover .docs-chapter-title {
  color: var(--docs-accent);
}

.docs-chapter-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-bottom: 10px;
}

.docs-chapter-meta .edition-pill,
.docs-hero-meta .edition-pill {
  white-space: normal;
  max-width: 100%;
}

.docs-chapter-num {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  font-family: var(--font-price);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--docs-accent);
  white-space: nowrap;
}

.docs-chapter-title {
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.42;
  color: var(--ink-primary);
  margin: 0 0 8px;
  transition: color 140ms ease;
}

.docs-chapter-desc {
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--ink-secondary);
  margin: 0 0 14px;
  flex: 1;
}

.docs-chapter-more {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--docs-accent);
}

/* Quickstart 3-Step Cards (aligned with .guide-steps-grid / .guide-step-card) */
.docs-quick-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.docs-quick-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: none;
  min-width: 0;
}

.docs-quick-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background-color: var(--ink-primary);
  color: #FFFFFF;
  font-family: var(--font-price);
  font-size: 0.8125rem;
  font-weight: 700;
}

.docs-quick-body {
  min-width: 0;
}

.docs-article .docs-quick-title {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink-primary);
}

.docs-article .docs-quick-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--ink-secondary);
}

/* Prev / Next Chapter Pager */
.docs-pager {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.docs-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: none;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.docs-pager-link:hover {
  border-color: var(--border-control);
  background-color: var(--bg-canvas);
}

.docs-pager-link:hover .docs-pager-title {
  color: var(--docs-accent);
}

.docs-pager-link--next {
  text-align: right;
}

.docs-pager-dir {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.docs-pager-title {
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink-primary);
  transition: color 140ms ease;
}

/* Bottom Support Box (aligned with .guide-docs-bridge / .guide-bottom-cta) */
.docs-support-box {
  margin-top: 36px;
  padding: 24px 26px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
}

.docs-support-text {
  max-width: 490px;
}

.docs-support-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink-primary);
  margin: 0 0 6px;
}

.docs-support-desc {
  font-size: 0.875rem;
  line-height: 1.68;
  color: var(--ink-secondary);
}

.docs-support-desc a {
  color: var(--docs-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer Adjustments for Docs */
body.docs-page .site-footer {
  padding: 28px 0;
}

body.docs-page .footer-nav,
body.docs-page .footer-copy {
  font-size: 0.8125rem;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .docs-sidebar {
    display: none;
  }

  .docs-mobile-toc {
    display: block;
  }

  .docs-article {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .docs-hero {
    padding: 24px 0 22px;
  }

  .docs-layout-section {
    padding: 24px 0 56px;
  }

  .docs-lead,
  .docs-article p,
  .docs-article li {
    font-size: 0.9375rem;
    line-height: 1.8;
  }

  .docs-edition-list,
  .docs-chapter-list,
  .docs-quick-list,
  .docs-pager {
    grid-template-columns: 1fr;
  }

  .docs-pager-link--next {
    text-align: left;
  }

  .docs-table th,
  .docs-table td {
    padding: 10px 11px;
    font-size: 0.8125rem;
  }

  .docs-support-box {
    padding: 20px 18px;
  }

  .docs-support-actions {
    width: 100%;
    flex-direction: column;
  }

  .docs-support-actions .btn {
    width: 100%;
  }

  body.docs-page .site-footer {
    padding: 28px 0;
  }
}

@media (max-width: 640px) {
  .docs-header-badge {
    display: none;
  }
}
