@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --panel: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --soft: #78716c;
  --line: rgba(28, 25, 23, 0.14);
  --orange: #e87f54;
  --accent: #b4491f;
  --note-bg: #fdf0e6;
  --th-bg: #1c1917;
  --th-ink: #fbf7ef;
  --row-alt: #faf5ec;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Manrope, ui-sans-serif, system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 12px; background: var(--ink); color: #f6d35f; display: inline-flex; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--orange); font-weight: 800; }
.brand small { font-weight: 600; color: var(--soft); margin-left: 4px; }
.top-links { display: flex; gap: 10px; font-size: 14px; font-weight: 700; }
.top-links a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.top-links a.cta { background: var(--orange); color: #1c1917; border-color: var(--orange); }

.layout { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 28px 16px 72px; }
.side { position: sticky; top: 76px; align-self: start; font-size: 14px; max-height: calc(100vh - 96px); overflow: auto; }
.side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); margin: 0 0 8px; }
.side a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.side a:hover { background: var(--row-alt); color: var(--ink); }
.side a.on { background: var(--note-bg); color: var(--accent); }
.side .group { margin-bottom: 18px; }

main { min-width: 0; max-width: 780px; }
.crumbs { font-size: 13px; color: var(--soft); margin-bottom: 14px; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 10px; }
h2 { font-size: 26px; letter-spacing: -0.02em; margin: 46px 0 12px; padding-top: 6px; }
h3 { font-size: 18px; margin: 26px 0 8px; }
.tools { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--soft); padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tools button, .tools a { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 700; }
.tools button:hover, .tools a:hover { text-decoration: underline; }
p { margin: 0 0 14px; color: var(--muted); }
li { color: var(--muted); margin-bottom: 6px; }
strong { color: var(--ink); }
.note { background: var(--note-bg); border-radius: 12px; padding: 14px 18px; margin: 20px 0; border-left: 4px solid var(--orange); }
.note b { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.note p { margin: 0; color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--panel); }
th { background: var(--th-bg); color: var(--th-ink); text-align: left; padding: 11px 14px; font-size: 14px; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
td:first-child { color: var(--ink); font-weight: 600; width: 34%; }
tr:nth-child(even) td { background: var(--row-alt); }

.related { margin-top: 48px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.related h2 { margin: 0; padding: 12px 18px; font-size: 15px; background: var(--th-bg); color: var(--th-ink); }
.related div { padding: 6px 18px 12px; }
.related a { display: block; margin-top: 12px; font-weight: 700; }
.related span { display: block; color: var(--muted); font-size: 14px; }
.updated { margin-top: 40px; font-size: 13px; color: var(--soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 22px 0; }
.card { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); text-decoration: none; }
.card:hover { border-color: var(--orange); }
.card b { display: block; color: var(--ink); margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 22px 16px; text-align: center; font-size: 13px; color: var(--soft); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 10px; }
  .side { position: static; max-height: none; }
  .top-links a:not(.cta) { display: none; }
}
