/* Правова стежка — one stylesheet, no fonts or scripts from outside. Mobile first. */
:root {
  --ink: #1d2420;
  --soft: #4e5a53;
  --paper: #f7f5ef;
  --card: #fffdf8;
  --rule: #d9d3c4;
  --pine: #1f3b2d;
  --pine-2: #2f5a44;
  --wax: #9b3d22;
  --tint: #ece7da;
  --measure: 40rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
a { color: var(--pine-2); text-underline-offset: 0.15em; }
a:hover { color: var(--wax); }
:focus-visible { outline: 3px solid var(--wax); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 0.5rem 0.8rem; z-index: 5; }
.skip:focus { left: 0.5rem; }

.masthead { background: var(--pine); color: #f3efe4; }
.masthead__in { max-width: 68rem; margin: 0 auto; padding: 0.9rem 1rem 0.6rem; }
.brand { display: inline-flex; align-items: baseline; gap: 0.45rem; color: #fff; text-decoration: none; }
.brand__sign { font-size: 1.7rem; line-height: 1; color: #e8c79a; }
.brand__name { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.brand__motto { margin: 0.2rem 0 0; font: 0.86rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #cfd8cf; }
.tabs { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.tabs__in { max-width: 68rem; margin: 0 auto; padding: 0 0.5rem; display: flex; overflow-x: auto; gap: 0.1rem; }
.tabs a {
  flex: 0 0 auto; padding: 0.6rem 0.65rem; color: #e9e4d6; text-decoration: none;
  font: 600 0.9rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; border-bottom: 3px solid transparent;
}
.tabs a:hover { color: #fff; border-bottom-color: rgba(232, 199, 154, 0.55); }
.tabs a[aria-current="page"], .tabs a.is-in { color: #fff; border-bottom-color: #e8c79a; }

main { display: block; max-width: 68rem; margin: 0 auto; padding: 1.2rem 1rem 2.5rem; }
main:focus { outline: none; }

h1, h2, h3 { line-height: 1.25; color: var(--pine); }
h1 { font-size: 1.75rem; margin: 0.2rem 0 0.6rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

.trail { margin: 0 0 0.4rem; font: 0.85rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--soft); }
.trail a { color: var(--soft); }
.lede { font-size: 1.15rem; color: var(--soft); margin-bottom: 0.5rem; }
.doc__meta { font: 0.8rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--soft); margin: 0; }
.doc__head { border-bottom: 1px solid var(--rule); padding-bottom: 0.9rem; margin-bottom: 1.2rem; }
.prose { max-width: var(--measure); }
.prose blockquote, .note {
  margin: 1.2rem 0; padding: 0.8rem 1rem; background: var(--tint); border-left: 4px solid var(--wax);
}
.note p:last-child { margin-bottom: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 0.45rem 0.55rem; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); }
.table-wrap { overflow-x: auto; }
.prose dt { font-weight: 700; color: var(--pine); }
.prose dd { margin: 0 0 0.8rem 1rem; }

.outline { background: var(--card); border: 1px solid var(--rule); padding: 0.7rem 1rem 0.3rem; margin: 0 0 1.4rem; max-width: var(--measure); }
.outline__h { font: 700 0.8rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--soft); margin: 0 0 0.4rem; }
.outline ol { padding-left: 1.2rem; margin-bottom: 0.4rem; font-size: 0.95rem; }

.margin { margin-top: 2rem; border-top: 2px solid var(--pine); padding-top: 0.8rem; }
.margin__h { font-size: 1rem; margin: 0 0 0.6rem; }

.entries { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.entry { margin: 0; border-bottom: 1px solid var(--rule); }
.entry a { display: block; padding: 0.65rem 0; text-decoration: none; color: inherit; }
.entry a:hover .entry__name { color: var(--wax); }
.entry__name { display: block; font-weight: 700; color: var(--pine-2); }
.entry__note { display: block; color: var(--soft); font-size: 0.95rem; }
.entry__time { display: block; font: 0.75rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--soft); margin-top: 0.15rem; }
.entries--short .entry a { padding: 0.45rem 0; }
.entries--short .entry__time { display: none; }

.front .intro { max-width: var(--measure); }
.front .intro h1 { font-size: 1.9rem; }
.shelves { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.shelf { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--pine); padding: 0.9rem 1rem 0.2rem; }
.shelf h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.shelf h2 a { text-decoration: none; color: var(--pine); }
.shelf__remit { color: var(--soft); font-size: 0.95rem; }

.colophon { background: #e7e2d4; border-top: 1px solid var(--rule); font: 0.88rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--soft); }
.colophon__in { max-width: 68rem; margin: 0 auto; padding: 1.4rem 1rem 1.8rem; }
.colophon__in p { max-width: 46rem; }
.colophon__name { font: 700 1rem/1.3 Georgia, serif; color: var(--pine); }
.colophon__small { font-size: 0.8rem; }
.colophon a { color: var(--pine-2); }

@media (min-width: 48rem) {
  h1 { font-size: 2.1rem; }
  .sheet { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 2.5rem; align-items: start; }
  .margin { margin-top: 0; position: sticky; top: 1rem; }
  .shelves { grid-template-columns: 1fr 1fr; }
}
@media print {
  .masthead, .tabs, .margin, .colophon, .skip { display: none; }
  body { background: #fff; }
}
