:root {
  --ink: #17342d;
  --muted: #6f7d78;
  --green: #176b51;
  --green-dark: #103f34;
  --green-soft: #e7f3ed;
  --red: #a72b35;
  --cream: #f5f4ee;
  --paper: #fffefa;
  --line: #dfe4df;
  --shadow: 0 18px 50px rgba(24, 53, 45, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 0%, rgba(173, 197, 181, .24), transparent 28rem),
    var(--cream);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: var(--green-dark);
  font: 800 24px Georgia, serif;
}

.shell { min-height: 100vh; }
.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 280px minmax(280px, 680px) 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  color: white;
  background: rgba(16, 63, 52, .97);
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 24px rgba(12, 45, 37, .18);
}
.logo { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo-symbol {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.24); border-radius: 12px;
  background: rgba(255,255,255,.1); font: 800 20px Georgia, serif;
}
.logo strong { display: block; letter-spacing: .12em; font-size: 13px; }
.logo span { color: #b9d1c8; font-size: 12px; }
.search { position: relative; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 46px 0 44px;
  color: white;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  outline: none;
  background: rgba(255,255,255,.1);
  transition: .2s ease;
}
.search input::placeholder { color: #bed0ca; }
.search input:focus { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.15); }
.search-icon { position: absolute; left: 15px; top: 12px; color: #c9d9d4; }
.key {
  position: absolute; right: 12px; top: 11px; padding: 3px 7px;
  color: #b9cec7; border: 1px solid rgba(255,255,255,.16); border-radius: 6px;
  font-size: 11px;
}
.top-actions { display: flex; justify-content: flex-end; gap: 10px; }
.button {
  height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font-weight: 700;
  color: var(--ink); background: white; transition: transform .18s, box-shadow .18s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.button.ghost { color: white; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
.button.green { color: white; background: var(--green); }
.button.danger { color: var(--red); border: 1px solid #edcdd1; background: #fff8f8; }
.button.danger.solid { color: white; border-color: var(--red); background: var(--red); }
.icon-button {
  width: 40px; height: 40px; border: 0; border-radius: 11px; cursor: pointer;
  color: var(--ink); background: transparent;
}
.icon-button:hover { background: var(--green-soft); }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width, 304px) minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  transition: grid-template-columns .2s ease;
}
.layout.sidebar-collapsed { grid-template-columns: 54px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 76px; height: calc(100vh - 76px); overflow: auto;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255,254,250,.7);
}
.sidebar-inner { min-width: 200px; }
.sidebar-expand {
  display: none; width: 36px; height: 36px; place-items: center; margin: 0 auto;
  border: 0; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); cursor: pointer;
}
.sidebar-collapsed .sidebar { padding: 20px 8px; overflow: hidden; }
.sidebar-collapsed .sidebar-inner, .sidebar-collapsed .sidebar-resizer { display: none; }
.sidebar-collapsed .sidebar-expand { display: grid; }
.sidebar-resizer {
  position: fixed;
  z-index: 10;
  top: 76px;
  left: calc(var(--sidebar-width, 304px) - 5px);
  width: 10px;
  height: calc(100vh - 76px);
  cursor: col-resize;
  touch-action: none;
}
.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: transparent;
  transition: background .18s;
}
.sidebar-resizer:hover::after,
.resizing-sidebar .sidebar-resizer::after { background: var(--green); }
.resizing-sidebar { cursor: col-resize; user-select: none; }
.sidebar-heading {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.sidebar-heading span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-tools { display: flex; gap: 2px; }
.sidebar-search { position: relative; margin-bottom: 16px; }
.sidebar-search > span { position: absolute; left: 11px; top: 10px; color: #84938e; }
.sidebar-search input {
  width: 100%; height: 39px; padding: 0 12px 0 37px; border: 1px solid var(--line);
  border-radius: 10px; outline: none; color: var(--ink); background: white;
}
.sidebar-search input:focus { border-color: #9dbdaf; box-shadow: 0 0 0 3px rgba(23,107,81,.08); }
.tree-heading { margin: 20px 8px 9px; color: #87958f; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.tree-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hidden-toggle {
  display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 0; border-radius: 8px;
  color: #7b8c85; background: transparent; cursor: pointer; font-size: 9px; white-space: nowrap;
}
.hidden-toggle:hover, .hidden-toggle.active { color: var(--green); background: var(--green-soft); }
.hidden-toggle svg { width: 13px; height: 13px; }
.quick-sections { display: grid; gap: 6px; margin-bottom: 8px; }
.quick-sections details { border-radius: 11px; background: rgba(236,242,238,.7); }
.quick-sections summary {
  min-height: 38px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 7px;
  padding: 7px 10px; cursor: pointer; color: #49645b; font-size: 12px; font-weight: 800; list-style: none;
}
.quick-sections summary::-webkit-details-marker { display: none; }
.quick-sections summary b { color: #8a9893; font-size: 11px; }
.history-symbol { font-size: 17px; text-align: center; }
.quick-link {
  width: 100%; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 7px; padding: 8px 10px;
  border: 0; border-top: 1px solid rgba(210,220,214,.65); color: var(--ink); text-align: left;
  background: transparent; cursor: pointer;
}
.quick-link:hover { background: white; }
.quick-link strong, .quick-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-link strong { font-size: 11px; }
.quick-link small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-icon { color: var(--green); }
.quick-clear {
  width: calc(100% - 20px); margin: 5px 10px 9px; padding: 7px; border: 0; border-radius: 8px;
  color: var(--muted); background: rgba(255,255,255,.65); cursor: pointer; font-size: 10px;
}
.quick-clear:hover { color: var(--green); background: white; }
.nav-list { display: grid; gap: 5px; }
.nav-item {
  position: relative; width: 100%; min-height: 42px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 28px; align-items: center; gap: 2px;
  padding: 5px 10px 5px 6px; border-radius: 10px;
  color: #355048; text-align: left; background: transparent; font-weight: 650;
}
.nav-item:hover { background: #edf2ee; }
.nav-item.active { color: var(--green-dark); background: var(--green-soft); }
.nav-item.is-hidden { opacity: .52; }
.nav-item.is-hidden .nav-link { text-decoration: line-through; }
.nav-toggle {
  width: 26px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 7px; color: #789087; background: transparent; cursor: pointer;
}
.nav-toggle:hover { color: var(--green); background: rgba(23,107,81,.1); }
.nav-toggle-placeholder { width: 26px; color: #8a9893; text-align: center; }
.nav-link {
  min-width: 0; padding: 6px 4px; border: 0; color: inherit; text-align: left;
  background: transparent; cursor: pointer; font-weight: inherit; line-height: 1.35;
}
.nav-link:hover { color: var(--green); }
.nav-item .chevron { display: block; color: currentColor; transition: transform .2s; }
.nav-item.open .chevron { transform: rotate(90deg); }
.nav-item .count { margin-left: auto; color: #8a9893; font-size: 12px; }
.nav-more {
  width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px;
  color: #86938f; background: transparent; cursor: pointer; opacity: 0;
}
.nav-item:hover .nav-more, .nav-more:focus { opacity: 1; }
.nav-more:hover { color: var(--green); background: rgba(23,107,81,.1); }
.category-menu {
  position: absolute; z-index: 30; top: 36px; right: 4px; width: 205px; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 14px 35px rgba(21,52,45,.18);
}
.category-menu button {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-radius: 8px;
  color: var(--ink); text-align: left; background: transparent; cursor: pointer; font-size: 12px;
}
.category-menu button:hover { background: var(--green-soft); }
.category-menu .danger-text { color: var(--red); }
.sidebar-search-result {
  width: 100%; display: block; padding: 9px 10px; border: 0; border-radius: 9px;
  color: var(--ink); text-align: left; background: transparent; cursor: pointer;
}
.sidebar-search-result:hover { background: var(--green-soft); }
.sidebar-search-result strong, .sidebar-search-result span { display: block; }
.sidebar-search-result strong { font-size: 12px; }
.sidebar-search-result span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.sidebar-search-result mark { color: var(--green-dark); background: #d5eee3; }
.sidebar-empty { padding: 18px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.nav-children { margin-left: 18px; padding-left: 10px; border-left: 1px solid #dce4df; }
.sidebar-footer {
  margin-top: 28px; padding: 16px; border-radius: 14px;
  color: #517067; background: #edf2ee; font-size: 12px; line-height: 1.5;
}

.content { min-width: 0; padding: 40px clamp(28px, 5vw, 76px) 80px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.breadcrumbs button { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; }
.breadcrumbs button:hover { color: var(--green); }

.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 30px;
  padding: clamp(28px, 4vw, 48px); border-radius: 26px; color: white;
  background: linear-gradient(135deg, #123e34 0%, #1f7058 72%, #4e8f72 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -160px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.035), 0 0 0 96px rgba(255,255,255,.025);
}
.eyebrow { margin: 0 0 14px; color: #bcd4cb; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; font: 700 clamp(34px, 4vw, 58px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.hero p { max-width: 660px; margin: 20px 0 0; color: #d5e4df; font-size: 16px; line-height: 1.65; }
.hero-stat { align-self: end; min-width: 150px; padding: 20px; border-radius: 18px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.hero-stat strong { display: block; font: 700 36px Georgia, serif; }
.hero-stat span { color: #c9dbd5; font-size: 13px; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 42px 0 18px; }
.section-title h2 { margin: 0; font: 700 28px Georgia, serif; }
.section-title p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.link-button { border: 0; color: var(--green); background: none; cursor: pointer; font-weight: 750; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.category-card {
  min-height: 170px; display: flex; flex-direction: column; padding: 22px;
  border: 1px solid var(--line); border-radius: 18px; cursor: pointer; background: var(--paper);
  box-shadow: 0 8px 24px rgba(24,53,45,.035); transition: .2s ease;
}
.category-card:hover { transform: translateY(-3px); border-color: #b8cfc4; box-shadow: var(--shadow); }
.category-icon {
  width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 28px;
  border-radius: 13px; color: var(--green); background: var(--green-soft); font-weight: 900;
}
.category-card h3 { margin: 0 0 8px; font-size: 16px; }
.category-card p { margin: 0; color: var(--muted); font-size: 13px; }

.article-list { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.article-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px 34px; align-items: center; gap: 22px;
  padding: 18px 20px; border-bottom: 1px solid #ecefeb; cursor: pointer;
}
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: #f7f9f6; }
.article-row h3 { margin: 0 0 5px; font-size: 15px; }
.article-row p { margin: 0; color: var(--muted); font-size: 12px; }
.article-date { color: var(--muted); font-size: 12px; text-align: right; }
.arrow { color: var(--green); font-size: 20px; }

.article-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.category-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.article-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.button.favorite { color: #6e6250; border: 1px solid #e7ddcc; background: #fffdf8; }
.button.favorite.active { color: #775914; border-color: #e5cd80; background: #fff5cc; }
.button.favorite.active svg { fill: #d7a928; stroke: #b78b13; }
.article-header h1 { max-width: 900px; margin: 0 0 12px; font: 700 clamp(34px, 4vw, 52px)/1.08 Georgia, serif; letter-spacing: -.02em; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; }
.article-body {
  min-height: 300px; padding: 32px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper); box-shadow: 0 10px 30px rgba(24,53,45,.035);
  font-size: 16px; line-height: 1.75;
}
.article-body p:first-child { margin-top: 0; }
.article-body a { color: var(--green); text-decoration: underline; }
.empty-copy { color: var(--muted); }
.article-aside { align-self: start; position: sticky; top: 108px; }
.aside-card { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,254,250,.7); }
.aside-card h3 { margin: 0 0 14px; font-size: 14px; }
.aside-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }

.attachments { display: grid; gap: 10px; margin-top: 20px; }
.attachment {
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 13px;
  padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white;
}
.file-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 900;
}
.file-icon.pdf { color: #8e2630; background: #f7e6e8; }
.file-name { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 700; white-space: nowrap; }
.file-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.file-open { padding: 8px 10px; border: 0; border-radius: 9px; color: var(--green); background: #eef5f1; cursor: pointer; font-weight: 750; font: inherit; }
.file-actions { display: flex; align-items: center; gap: 7px; }
.file-remove {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid #edcdd1; border-radius: 9px; color: var(--red);
  background: #fff8f8; cursor: pointer;
}
.file-remove svg { width: 15px; height: 15px; }
.file-remove:hover { color: white; background: var(--red); }
.upload-button, .link-upload { cursor: pointer; }
.upload-button input, .link-upload input { display: none; }
.link-upload {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px;
  border: 1px solid #e7c4c8; border-radius: 9px; color: var(--red);
  background: #fff; font-size: 13px; font-weight: 800; text-transform: uppercase;
}
.link-upload:hover { background: #f8ecee; }
.link-upload svg { width: 16px; height: 16px; }
.empty-attachments {
  border: 1px dashed var(--line); border-radius: 14px; background: rgba(255,255,255,.6);
}

.empty-state { padding: 56px 20px; color: var(--muted); text-align: center; }
.search-panel {
  position: fixed; z-index: 40; top: 68px; left: 50%; width: min(700px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 100px)); overflow: auto; transform: translateX(-50%);
  padding: 10px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 24px 70px rgba(17,44,36,.24);
}
.search-result { display: block; width: 100%; padding: 14px; border: 0; border-radius: 11px; text-align: left; background: white; cursor: pointer; }
.search-result:hover, .search-result.selected { background: var(--green-soft); }
.search-result strong { display: block; margin-bottom: 5px; }
.search-result span { color: var(--muted); font-size: 12px; }

.modal-backdrop {
  position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(9,31,25,.48); backdrop-filter: blur(5px);
}
.modal { width: min(720px, 100%); padding: 28px; border-radius: 22px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.26); }
.modal-small { width: min(520px, 100%); }
.modal h2 { margin: 0 0 22px; font: 700 28px Georgia, serif; }
.modal-note { margin: -10px 0 22px; color: var(--muted); line-height: 1.55; }
.danger-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; color: var(--red); border-radius: 14px; background: #f8e7e9; }
.transfer-note { display: grid; gap: 6px; margin: 20px 0; padding: 16px; border-radius: 14px; color: #536a63; background: var(--green-soft); line-height: 1.5; }
.transfer-note strong { color: var(--green-dark); }
.transfer-note span { font-size: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  outline: none; background: white;
}
.field textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,81,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-actions-split { flex-wrap: wrap; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 220px 1fr auto; padding: 0 20px; }
  .top-actions .ghost { display: none; }
  .layout { grid-template-columns: var(--sidebar-width, 250px) minmax(0,1fr); }
  .category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}
@media (max-width: 760px) {
  .topbar { height: auto; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .logo span, .top-actions .button span { display: none; }
  .layout { display: block; }
  .layout.sidebar-collapsed { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading, .nav-list, .sidebar-footer, .sidebar-search, .quick-sections, .tree-heading-row { display: none; }
  .sidebar-collapsed .sidebar { display: none; }
  .sidebar-resizer { display: none; }
  .content { padding: 26px 16px 60px; }
  .hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .hero-stat { width: fit-content; }
  .category-grid { grid-template-columns: 1fr; }
  .article-row { grid-template-columns: minmax(0,1fr) 24px; }
  .article-date { display: none; }
  .article-header { display: block; }
  .article-header > .button, .category-actions, .article-actions { margin-top: 20px; }
  .category-actions, .article-actions { justify-content: flex-start; }
  .article-body { padding: 22px 18px; }
}

@font-face {
  font-display: swap;
  font-family: "Gilroy";
  font-style: normal;
  font-weight: 400;
  src: url("/brand/fonts/Gilroy-Regular.woff") format("woff");
}
@font-face {
  font-display: swap;
  font-family: "Gilroy";
  font-style: normal;
  font-weight: 500;
  src: url("/brand/fonts/Gilroy-Medium.woff") format("woff");
}
@font-face {
  font-display: swap;
  font-family: "Gilroy";
  font-style: normal;
  font-weight: 600;
  src: url("/brand/fonts/Gilroy-SemiBold.woff") format("woff");
}
@font-face {
  font-display: swap;
  font-family: "Gilroy";
  font-style: normal;
  font-weight: 700;
  src: url("/brand/fonts/Gilroy-Bold.woff") format("woff");
}
@font-face {
  font-display: swap;
  font-family: "Gilroy";
  font-style: normal;
  font-weight: 800;
  src: url("/brand/fonts/Gilroy-ExtraBold.woff") format("woff");
}

:root {
  --ink: #171a1d;
  --muted: #6c7781;
  --green: #176c14;
  --green-dark: #0f5f0c;
  --green-soft: #edf7ed;
  --red: #9f212e;
  --red-dark: #7f1823;
  --cream: #f4f4f4;
  --paper: #ffffff;
  --line: #dedede;
  --shadow: 0 14px 34px rgba(0, 0, 0, .08);
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #fff 0, #fff 92px, #f4f4f4 92px, #f4f4f4 100%),
    radial-gradient(circle at 84% 18%, rgba(159, 33, 46, .08), transparent 24rem);
  font-family: "Gilroy", "Segoe UI", Arial, sans-serif;
}

.brand-mark {
  border-radius: 5px;
  background: var(--red);
  font-family: "Gilroy", Arial, sans-serif;
}

.topbar {
  height: 92px;
  grid-template-columns: 330px minmax(300px, 760px) 1fr;
  gap: 34px;
  padding: 0 clamp(24px, 4vw, 58px);
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e7e7e7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .05);
}

.logo {
  gap: 18px;
}

.logo-image {
  width: 178px;
  height: auto;
  display: block;
}

.logo-symbol {
  border-radius: 5px;
  border-color: #e0e0e0;
  color: #fff;
  background: var(--red);
  font-family: "Gilroy", Arial, sans-serif;
}

.logo strong {
  color: #151515;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.logo span {
  color: #777;
  font-size: 12px;
}

.search input {
  height: 48px;
  color: #171a1d;
  border-color: #d8d8d8;
  border-radius: 100px;
  background: #f7f7f7;
}

.search input::placeholder {
  color: #8a8a8d;
}

.search input:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(159, 33, 46, .08);
}

.search-icon {
  color: #8a8a8d;
}

.key {
  top: 12px;
  color: #8a8a8d;
  border-color: #ddd;
  background: #fff;
}

.button {
  height: 44px;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  box-shadow: 0 7px 18px rgba(159, 33, 46, .2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.button:hover {
  box-shadow: 0 12px 26px rgba(159, 33, 46, .24);
}

.button.ghost {
  color: #171a1d;
  border: 1px solid #d9d9d9;
  background: #fff;
  box-shadow: none;
}

.button.green {
  color: #fff;
  background: linear-gradient(180deg, #176c14 0%, #0f5f0c 100%);
  box-shadow: 0 10px 24px rgba(23, 108, 20, .18);
}

.button.danger {
  color: var(--red);
  border: 1px solid #e7c4c8;
  background: #fff;
  box-shadow: none;
}

.layout {
  min-height: calc(100vh - 92px);
}

.sidebar {
  top: 92px;
  height: calc(100vh - 92px);
  border-right-color: #e4e4e4;
  background: #fff;
}

.sidebar-resizer {
  top: 92px;
  height: calc(100vh - 92px);
}

.sidebar-heading span,
.tree-heading {
  color: #8a8a8d;
  font-weight: 800;
}

.sidebar-search input {
  height: 42px;
  border-radius: 100px;
  background: #fafafa;
}

.sidebar-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(159, 33, 46, .08);
}

.icon-button:hover,
.nav-toggle:hover,
.nav-more:hover,
.hidden-toggle:hover,
.hidden-toggle.active {
  color: var(--red);
  background: #f8ecee;
}

.nav-item {
  border-radius: 5px;
  color: #171a1d;
  font-weight: 700;
}

.nav-item:hover {
  background: #f4f4f4;
}

.nav-item.active {
  color: #0f5f0c;
  background: #ecf6ec;
}

.nav-link:hover,
.breadcrumbs button:hover,
.link-button,
.arrow,
.file-open,
.article-body a {
  color: var(--red);
}

.nav-children {
  border-left-color: #e4e4e4;
}

.quick-sections details,
.sidebar-footer {
  border-radius: 5px;
  background: #f4f4f4;
}

.quick-sections summary {
  color: #333;
}

.quick-icon,
.category-icon {
  color: var(--red);
}

.content {
  padding: 44px clamp(28px, 5vw, 76px) 82px;
}

.hero {
  min-height: 330px;
  align-items: end;
  border-radius: 5px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .52) 52%, rgba(159, 33, 46, .18) 100%),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, .18), transparent 14rem),
    linear-gradient(135deg, #111 0%, #2f3438 58%, #176c14 100%);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "RYMS GROUP";
  position: absolute;
  right: 36px;
  top: 24px;
  color: rgba(255, 255, 255, .08);
  font-size: clamp(46px, 8vw, 112px);
  font-weight: 800;
  letter-spacing: .14em;
  white-space: nowrap;
}

.hero::after {
  right: -80px;
  top: auto;
  bottom: -110px;
  border-radius: 0;
  border-color: rgba(255, 255, 255, .18);
  transform: rotate(16deg);
}

.eyebrow {
  color: var(--red);
  font-weight: 800;
}

.hero .eyebrow {
  color: #fff;
}

.hero h1,
.section-title h2,
.article-header h1,
.modal h2 {
  font-family: "Gilroy", "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: .98;
}

.hero p {
  color: rgba(255, 255, 255, .82);
  font-size: 17px;
}

.hero-stat {
  border-radius: 5px;
  border-left: 4px solid var(--red);
  background: rgba(255, 255, 255, .12);
}

.hero-stat strong {
  font-family: "Gilroy", Arial, sans-serif;
  font-weight: 800;
}

.section-title h2 {
  font-size: 30px;
}

.category-grid {
  gap: 20px;
}

.category-card {
  min-height: 180px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 1px rgba(0,0,0,.04), 0 4px 8px rgba(0,0,0,.04), 0 16px 24px rgba(0,0,0,.04);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: #d8d8d8;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .14);
}

.category-icon {
  border-radius: 5px;
  background: #f8ecee;
}

.category-card h3,
.article-row h3 {
  color: #171a1d;
  font-weight: 800;
}

.article-list,
.article-body,
.aside-card,
.modal,
.search-panel {
  border-radius: 5px;
  background: #fff;
}

.article-row {
  min-height: 76px;
  border-bottom-color: #ededed;
}

.article-row:hover,
.search-result:hover,
.search-result.selected,
.category-menu button:hover,
.sidebar-search-result:hover {
  background: #f8ecee;
}

.article-header h1 {
  font-size: clamp(32px, 4vw, 50px);
}

.attachment,
.field input,
.field textarea {
  border-radius: 5px;
}

.file-icon {
  border-radius: 5px;
  color: #fff;
  background: var(--green);
}

.file-icon.pdf {
  color: #fff;
  background: var(--red);
}

.file-open {
  border-radius: 5px;
  background: #f8ecee;
}

.category-menu {
  border-radius: 5px;
}

.modal-backdrop {
  background: rgba(0, 0, 0, .58);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(159, 33, 46, .08);
}

@media (max-width: 1050px) {
  .topbar {
    grid-template-columns: 260px 1fr auto;
  }

  .logo-image {
    width: 150px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr auto;
    padding: 14px 16px;
  }

  .logo-image {
    width: 136px;
  }

  .layout,
  .layout.sidebar-collapsed {
    min-height: auto;
  }

  .sidebar {
    top: auto;
    height: auto;
  }

  .hero {
    min-height: 0;
  }

  .hero::before {
    display: none;
  }
}
