/* job2026.apps.udalovs.ru — минимальная, но аккуратная тема */
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --accent: #DC2020;
  --ink: #1c1e21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #fafaf9;
  --card: #ffffff;
  --code-bg: #f4f4f2;
  --side-w: 280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── topbar ─────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--accent); }
.crumbs { flex: 1; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 6px; color: #d1d5db; }
.raw-link {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px;
}
.raw-link:hover { color: var(--accent); border-color: var(--accent); }

/* ── layout ─────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ── sidebar ────────────────────────────────────── */
.sidebar { font-size: 14px; }
.tree-title {
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 10px;
}
.tree ul { list-style: none; margin: 0 0 4px; padding: 0; }
.tree > ul > li { margin: 1px 0; }
.tree a {
  display: block; padding: 5px 10px; border-radius: 7px;
  color: var(--ink); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tree a:hover { background: #f0f0ee; }
.tree a.active { background: #fdecec; color: var(--accent); font-weight: 600; }
.tree details { margin: 1px 0; }
.tree summary {
  cursor: pointer; padding: 5px 10px; border-radius: 7px; list-style: none;
  color: var(--ink); font-weight: 500;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before { content: "▸ "; color: var(--muted); }
.tree details[open] > summary::before { content: "▾ "; }
.tree summary:hover { background: #f0f0ee; }
.tree details ul { padding-left: 14px; }
.count { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ── content / markdown ─────────────────────────── */
.content { min-width: 0; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 18px; }
.lede { color: var(--muted); font-size: 17px; margin-top: -8px; }

.md { max-width: 820px; }
.md h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 8px 0 20px; }
.md h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -.01em;
  margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.md h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; }
.md p { margin: 12px 0; }
.md a { color: var(--accent); text-decoration: none; border-bottom: 1px solid #f3c1c1; }
.md a:hover { border-bottom-color: var(--accent); }
.md strong { font-weight: 650; }
.md ul, .md ol { padding-left: 24px; margin: 10px 0; }
.md li { margin: 3px 0; }
.md blockquote {
  margin: 16px 0; padding: 2px 18px;
  border-left: 3px solid var(--accent); background: #fff; border-radius: 0 8px 8px 0;
  color: #3f3f46;
}
.md code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em; background: var(--code-bg);
  padding: 2px 5px; border-radius: 5px;
}
.md pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.md pre code { background: none; padding: 0; font-size: 13px; line-height: 1.55; }
.md table { border-collapse: collapse; margin: 16px 0; font-size: 14.5px; max-width: 100%; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 12px; text-align: left; vertical-align: top; }
.md th { background: #f5f5f4; font-weight: 650; }
.md tr:nth-child(even) td { background: #fcfcfb; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.md img { max-width: 100%; border-radius: 10px; }

.codehilite { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; }
.codehilite pre { margin: 0; border: 0; background: none; }

/* ── cards (списки папок и разделы) ─────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px; margin-top: 8px;
}
.card {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: var(--ink);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.card:hover {
  border-color: #d4d4d0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}
.card-head { font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.card-title { font-weight: 650; letter-spacing: -.01em; }
.card-desc {
  color: var(--muted); font-size: 13.5px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card-meta { color: #9ca3af; font-size: 12px; margin-top: 10px; }
.section-card .card-title { font-size: 17px; }

/* ── footer ─────────────────────────────────────── */
footer {
  max-width: 1240px; margin: 0 auto; padding: 18px 24px 40px;
  color: #9ca3af; font-size: 12.5px; border-top: 1px solid var(--line);
}

/* ── адаптив и печать ───────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
  .sidebar { order: 2; border-top: 1px solid var(--line); padding-top: 14px; }
  .crumbs { font-size: 13px; }
}
@media print {
  .topbar, .sidebar, footer, .raw-link { display: none; }
  .layout { display: block; padding: 0; max-width: none; }
  body { background: #fff; }
}
