/* Podroid documentation - shared styles. Matches the landing page (../index.html):
   Tokyo Night palette, DM Sans + DM Mono. */

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

:root {
  --bg:        #1a1b26;
  --bg-dark:   #16161e;
  --bg-card:   #1f2335;
  --bg-card2:  #24283b;
  --border:    #292e42;
  --text:      #c0caf5;
  --text-dim:  #a9b1d6;
  --muted:     #7982b0;
  --green:     #9ece6a;
  --green-dim: #1e3319;
  --blue:      #7aa2f7;
  --cyan:      #7dcfff;
  --yellow:    #e0af68;
  --red:       #f7768e;
  --purple:    #bb9af7;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); text-decoration: underline; }

code, pre, .mono { font-family: 'DM Mono', monospace; }

/* ── top nav (matches landing) ─────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 56px;
  background: rgb(22 22 30 / 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1rem; color: var(--text); text-decoration: none !important; }
.nav-logo img { width: 26px; height: 26px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.875rem; font-weight: 500; white-space: nowrap; transition: color 0.15s; }
.nav-links a:hover { color: var(--text-dim); text-decoration: none; }
.nav-links a.cta { color: var(--green); }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; padding: 0.35rem 0.6rem; font-size: 1rem; cursor: pointer; }

/* ── docs layout ───────────────────────────────────────── */
.layout { display: flex; max-width: 1200px; margin: 0 auto; align-items: flex-start; }

.sidebar {
  position: sticky; top: 56px;
  width: 248px; flex: none;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 1.75rem 1rem 3rem 1.5rem;
  border-right: 1px solid var(--border);
}
.sidebar h4 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 1.4rem 0 0.5rem; font-weight: 600;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; }
.sidebar li a {
  display: block; padding: 0.32rem 0.7rem; border-radius: 6px;
  color: var(--text-dim); font-size: 0.9rem; transition: background 0.12s, color 0.12s;
}
.sidebar li a:hover { background: var(--bg-card); color: var(--text); text-decoration: none; }
.sidebar li a.active { background: var(--green-dim); color: var(--green); font-weight: 600; }

.content { flex: 1; min-width: 0; padding: 2.5rem 2.5rem 5rem; max-width: 820px; }

/* ── prose ─────────────────────────────────────────────── */
.content h1 { font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.4rem; color: #fff; }
.content h2 { font-size: 1.45rem; font-weight: 600; margin: 2.6rem 0 0.9rem; padding-top: 0.6rem; color: #fff; border-top: 1px solid var(--border); }
.content h3 { font-size: 1.12rem; font-weight: 600; margin: 1.8rem 0 0.6rem; color: var(--text); }
.content p { margin: 0.85rem 0; color: var(--text-dim); }
.content .lead { font-size: 1.12rem; color: var(--text); margin: 0.6rem 0 1.6rem; }
.content ul, .content ol { margin: 0.85rem 0 0.85rem 1.4rem; color: var(--text-dim); }
.content li { margin: 0.35rem 0; }
.content strong { color: var(--text); font-weight: 600; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* inline + block code */
.content :not(pre) > code {
  background: var(--bg-card2); color: var(--cyan);
  padding: 0.12em 0.4em; border-radius: 4px; font-size: 0.86em;
  border: 1px solid var(--border);
}
.content pre {
  background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.1rem; overflow-x: auto; margin: 1rem 0; font-size: 0.85rem; line-height: 1.55;
}
.content pre code { color: var(--text); background: none; border: none; padding: 0; }
.content pre .c { color: var(--muted); }      /* comment */
.content pre .p { color: var(--green); }       /* prompt / key */

/* tables */
.content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.88rem; }
.content th, .content td { text-align: left; padding: 0.6rem 0.8rem; border: 1px solid var(--border); vertical-align: top; }
.content th { background: var(--bg-card2); color: var(--text); font-weight: 600; }
.content td { color: var(--text-dim); }
.content tr:nth-child(even) td { background: var(--bg-card); }

/* callouts */
.callout { border-radius: 8px; padding: 0.85rem 1.1rem; margin: 1.2rem 0; border: 1px solid var(--border); border-left-width: 3px; background: var(--bg-card); }
.callout p { margin: 0.3rem 0; color: var(--text-dim); }
.callout strong { color: var(--text); }
.callout.note { border-left-color: var(--blue); }
.callout.tip  { border-left-color: var(--green); }
.callout.warn { border-left-color: var(--yellow); }
.callout.danger { border-left-color: var(--red); }
.callout .label { font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 0.2rem; }
.callout.note .label { color: var(--blue); }
.callout.tip .label { color: var(--green); }
.callout.warn .label { color: var(--yellow); }
.callout.danger .label { color: var(--red); }

/* page footer nav (prev/next) */
.pagenav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.pagenav a { display: inline-flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; max-width: 48%; }
.pagenav a:hover { border-color: var(--muted); text-decoration: none; background: var(--bg-card); }
.pagenav .dir { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pagenav .next { text-align: right; margin-left: auto; }

.docfoot { color: var(--muted); font-size: 0.8rem; margin-top: 2.5rem; }

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .layout { display: block; }
  .sidebar {
    position: static; width: auto; height: auto; border-right: none;
    border-bottom: 1px solid var(--border); display: none; padding: 1rem 1.5rem;
  }
  .sidebar.open { display: block; }
  .content { padding: 1.75rem 1.5rem 4rem; max-width: none; }
  .content h1 { font-size: 1.7rem; }
}
