/* yurucommu docs — quiet-minimal dark (matches the landing) */

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

:root {
  --bg: #0a0a0c;
  --bg-2: #0e0e11;
  --card: #121216;
  --ink: #e9e9ec;
  --dim: #8a8a92;
  --faint: #565660;
  --line: #1c1c21;
  --line-2: #26262d;
  --accent: #9aa6d6;
  --accent-soft: rgba(154, 166, 214, 0.1);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --w: 1180px;

  /* back-compat aliases for existing docs markup */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-2);
  --bg-card: var(--card);
  --text-primary: var(--ink);
  --text-secondary: var(--dim);
  --text-muted: var(--faint);
  --border: var(--line);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #0a0a0c;
}

/* ---- Header ---- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.logo::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
}

.header-links {
  display: flex;
  gap: 1.5rem;
}

.header-link {
  color: var(--dim);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.header-link:hover,
.header-link.active {
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.header-cta:hover {
  border-color: var(--accent);
}

/* ---- Buttons (landing leftovers, kept minimal) ---- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
}

.btn-secondary {
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* ---- Docs layout ---- */
.docs-layout {
  display: flex;
  min-height: 100vh;
  max-width: var(--w);
  margin: 0 auto;
  padding-top: 3.75rem;
}

.docs-sidebar {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 2.5rem 1.5rem;
  position: sticky;
  top: 3.75rem;
  align-self: flex-start;
  height: calc(100vh - 3.75rem);
  overflow-y: auto;
}

.docs-sidebar-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.9rem;
}

.docs-sidebar-nav {
  list-style: none;
}

.docs-sidebar-nav li {
  margin-bottom: 0.1rem;
}

.docs-sidebar-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--dim);
  font-size: 0.875rem;
  transition:
    color 0.2s,
    background 0.2s;
}

.docs-sidebar-nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.docs-sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.docs-sidebar-section {
  margin-top: 2rem;
}

.docs-content {
  flex: 1;
  min-width: 0;
  padding: 3.5rem 3rem 6rem;
  max-width: 820px;
}

.docs-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.docs-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.docs-content p {
  color: var(--dim);
  margin-bottom: 1rem;
}

.docs-content ul,
.docs-content ol {
  color: var(--dim);
  margin-bottom: 1rem;
  padding-left: 1.4rem;
}

.docs-content li {
  margin-bottom: 0.4rem;
}

.docs-content a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.2s;
}

.docs-content a:hover {
  border-color: var(--accent);
}

.docs-content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
}

.docs-content pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.docs-content pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink);
}

.docs-content .lead {
  font-size: 1.2rem;
  color: var(--dim);
  margin-bottom: 2rem;
}

.docs-content .note {
  font-size: 0.9rem;
  color: var(--faint);
  margin: 1rem 0 1.5rem;
}

/* ---- Tables ---- */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

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

.docs-table thead th {
  background: var(--bg-2);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}

.docs-table code {
  white-space: nowrap;
}

/* ---- Callouts ---- */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0.5rem;
  background: var(--bg-2);
  color: var(--dim);
}

.callout strong {
  color: var(--ink);
}

.callout-warn {
  border-left-color: #c9a227;
}

/* ---- Status / scope pills ---- */
.spec-status,
.spec-scope {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 9999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.spec-scope {
  margin-left: 0.5rem;
}

.spec-status.stable {
  color: var(--accent);
  border-color: var(--accent);
}

.spec-status.draft,
.spec-status.experimental {
  color: var(--dim);
}

.spec-scope.federation {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Category / card grid (specs) ---- */
.category-section {
  margin-top: 3rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--bg-2);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
}

.category-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  border: 0;
  padding: 0;
}

.category-description {
  color: var(--dim);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  padding: 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card-description {
  color: var(--dim);
  font-size: 0.875rem;
}

.card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* ---- Footer (docs) ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.75rem;
}

.footer-inner {
  max-width: var(--w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-weight: 700;
}

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

.footer-link {
  color: var(--dim);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--ink);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .docs-sidebar {
    display: none;
  }
  .docs-content {
    padding: 2.5rem 1.5rem 4rem;
  }
  .header-links {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .docs-content h1 {
    font-size: 1.85rem;
  }
}
