/* Accountant pages: home, user manual, privacy policy, terms. Palette follows the landing page. */
:root {
  --oneui-bg: #07090e;
  --oneui-surface: rgba(22, 27, 38, 0.65);
  --oneui-card-border: rgba(255, 255, 255, 0.12);
  --oneui-blue: #3b82f6;
  --oneui-blue-light: #60a5fa;
  --text-primary: #f8fafc;
  --text-body: #cbd5e1;
  --text-secondary: #94a3b8;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 9999px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--oneui-bg);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--oneui-blue-light); text-underline-offset: 3px; }
a:hover { color: var(--text-primary); }

.topbar, .doc, .home, .footer {
  max-width: 780px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.topbar { padding-top: 24px; padding-bottom: 8px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}
.brand img { border-radius: 8px; }

/* Rendered documents */
.doc { padding-top: 24px; padding-bottom: 48px; }
.doc h1, .doc h2, .doc h3, .doc h4 { color: var(--text-primary); line-height: 1.3; scroll-margin-top: 16px; }
.doc h1 { font-size: 2rem; margin-bottom: 8px; }
.doc h2 { font-size: 1.35rem; margin-top: 40px; margin-bottom: 12px; }
.doc h3 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 8px; }
.doc p, .doc ul, .doc ol, .doc table, .doc .hint { margin-bottom: 16px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin-bottom: 6px; }
.doc li > ul, .doc li > ol { margin-top: 6px; margin-bottom: 0; }
.doc strong { color: var(--text-primary); }
.doc code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 1px 6px;
}
.doc mark { background: none; color: var(--oneui-blue-light) !important; }
.doc hr { border: none; border-top: 1px solid var(--oneui-card-border); margin: 32px 0; }

.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.doc th, .doc td {
  border: 1px solid var(--oneui-card-border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.doc th { color: var(--text-primary); background: var(--oneui-surface); }

.hint {
  background: var(--oneui-surface);
  border: 1px solid var(--oneui-card-border);
  border-left: 4px solid var(--oneui-blue);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.hint > :last-child { margin-bottom: 0; }
.hint-success { border-left-color: #10b981; }
.hint-warning { border-left-color: #f59e0b; }
.hint-danger { border-left-color: #ef4444; }

/* Home page */
.home { padding-top: 32px; padding-bottom: 48px; }
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 40px; }
.hero img { border-radius: 22px; }
.hero h1 { color: var(--text-primary); font-size: 2.4rem; line-height: 1.15; }
.hero .kicker { color: var(--text-secondary); font-weight: 500; }
.hero .lead { color: var(--text-primary); font-size: 1.15rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--oneui-blue);
}
.btn:hover { color: #fff; filter: brightness(1.1); }
.btn-secondary { background: var(--oneui-surface); border: 1px solid var(--oneui-card-border); color: var(--text-primary); }

.card {
  background: var(--oneui-surface);
  border: 1px solid var(--oneui-card-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.card h2 { color: var(--text-primary); font-size: 1.25rem; margin-bottom: 12px; }
.card p, .card ul { margin-bottom: 12px; }
.card > :last-child { margin-bottom: 0; }
.card ul { padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card strong { color: var(--text-primary); }
.card code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

.footer {
  border-top: 1px solid var(--oneui-card-border);
  padding-top: 20px;
  padding-bottom: 40px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer p { margin-bottom: 6px; }

/* User manual layout (every generated page, policies included) */
body.manual .topbar, body.manual .footer { max-width: 1180px; }
body.manual .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--oneui-card-border);
}
.topbar-link { color: var(--text-secondary); font-weight: 500; text-decoration: none; }
.topbar-link:hover { color: var(--text-primary); }

.manual-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
}
body.manual .doc { max-width: 780px; margin: 0; padding: 32px 0 48px; }
.doc .lead { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 28px; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 24px 4px 48px 0;
}
.toc ul { list-style: none; margin-bottom: 4px; }
.toc a {
  display: block;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.4;
  text-decoration: none;
}
.toc a:hover { background: var(--oneui-surface); color: var(--text-primary); }
.toc a.current { background: rgba(59, 130, 246, 0.16); color: var(--text-primary); font-weight: 600; }
.toc-section {
  margin: 18px 12px 6px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc-mobile {
  display: none;
  margin: 16px 24px 0;
  background: var(--oneui-surface);
  border: 1px solid var(--oneui-card-border);
  border-radius: var(--radius-md);
}
.toc-mobile > summary { padding: 12px 16px; color: var(--text-primary); font-weight: 600; cursor: pointer; }
.toc-mobile .toc { padding: 0 8px 12px; max-height: 60vh; overflow-y: auto; }

/* Blocks from GitBook */
.ref-cards { margin-bottom: 12px; }
.ref-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  background: var(--oneui-surface);
  border: 1px solid var(--oneui-card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.ref-card:hover { border-color: rgba(96, 165, 250, 0.5); }
.ref-title { color: var(--text-primary); font-weight: 600; }
.ref-desc { color: var(--text-secondary); font-size: 0.92rem; }

.doc details {
  background: var(--oneui-surface);
  border: 1px solid var(--oneui-card-border);
  border-radius: var(--radius-md);
  padding: 0 18px;
  margin-bottom: 10px;
}
.doc details > summary {
  position: relative;
  padding: 14px 28px 14px 0;
  color: var(--text-primary);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.doc details > summary::-webkit-details-marker { display: none; }
.doc details > summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 11px;
  color: var(--text-secondary);
  font-size: 1.25rem;
}
.doc details[open] > summary::after { content: "\2212"; }
.doc details[open] { padding-bottom: 4px; }

.doc figure { margin: 24px 0; text-align: center; }
.doc img { max-width: 100%; height: auto; }
.doc figure img { border: 1px solid var(--oneui-card-border); border-radius: 16px; }
.doc figcaption { margin-top: 8px; color: var(--text-secondary); font-size: 0.9rem; }
.doc figcaption p { margin: 0; }

.pager {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--oneui-card-border);
}
.pager a {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  padding: 12px 16px;
  border: 1px solid var(--oneui-card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.pager a:hover { border-color: rgba(96, 165, 250, 0.5); }
.pager .next { margin-left: auto; text-align: right; }
.pager span { color: var(--text-secondary); font-size: 0.8rem; }

@media (max-width: 900px) {
  .manual-layout { display: block; }
  .sidebar { display: none; }
  .toc-mobile { display: block; }
  body.manual .doc { padding-top: 20px; }
}
