/* ============================================================
   ledger17 — brand styles
   Palette (mirrors the ledger17 app):
     bg #090909 · surface #111111 · raised #181818
     border #1E1E1E · border-strong #2A2A2A
     text #F0F0F0 · muted #ABABAB · dim #787878
     accent (amber) #D4A843 · debit #5B9CF6 · credit #4EBF7E
   ============================================================ */

:root {
  --l17-bg: #090909;
  --l17-surface: #111111;
  --l17-raised: #181818;
  --l17-border: #1E1E1E;
  --l17-border-strong: #2A2A2A;
  --l17-text: #F0F0F0;
  --l17-muted: #ABABAB;
  --l17-dim: #787878;
  --l17-accent: #D4A843;
  --l17-accent-fg: #0A0806;
  --l17-debit: #5B9CF6;
  --l17-credit: #4EBF7E;
  --l17-danger: #F05252;
  --l17-mono: 'IBM Plex Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --l17-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Landing page (body.l17-landing) ---------- */

body.l17-landing {
  background-color: var(--l17-bg);
  color: var(--l17-text);
  font-family: var(--l17-sans);
  -webkit-font-smoothing: antialiased;
}

body.l17-landing h1,
body.l17-landing h2,
body.l17-landing h3,
body.l17-landing h4,
body.l17-landing h5,
body.l17-landing h6 {
  font-family: var(--l17-mono);
  color: var(--l17-text);
}

body.l17-landing ::selection {
  background: var(--l17-accent);
  color: var(--l17-accent-fg);
}

/* Wordmark */
.l17-wordmark {
  font-family: var(--l17-mono);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--l17-text);
  text-decoration: none;
}
a.l17-wordmark:hover { color: var(--l17-text); }
.l17-accent { color: var(--l17-accent); }

/* Top nav — override Lotus landing header (light by default) */
body.l17-landing #topnav {
  background-color: rgba(9, 9, 9, 0.9) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--l17-border);
  padding: 12px 0;
}
body.l17-landing #topnav.nav-sticky {
  background-color: rgba(9, 9, 9, 0.95) !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--l17-border-strong);
}
body.l17-landing #topnav .navigation-menu > li > a {
  font-family: var(--l17-mono);
  font-size: 0.9rem;
  color: var(--l17-muted) !important;
  background-color: transparent !important;
}
body.l17-landing #topnav .navigation-menu > li > a:hover,
body.l17-landing #topnav .navigation-menu > li > a:focus,
body.l17-landing #topnav .navigation-menu > li.active > a {
  color: var(--l17-accent) !important;
}
body.l17-landing #topnav .navbar-toggle .lines span {
  background-color: var(--l17-text) !important;
}
/* mobile dropdown panel */
body.l17-landing #navigation {
  background-color: var(--l17-surface);
  border-color: var(--l17-border);
}
@media (max-width: 991px) {
  body.l17-landing #topnav .navigation-menu > li > a {
    color: var(--l17-muted) !important;
  }
}

/* Hero — full-bleed faded image with text overlay */
.l17-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(92vh, 940px);
  padding: 150px 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.l17-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.l17-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.45;
  filter: saturate(0.7) contrast(1.02) brightness(0.85);
}
/* readability overlay: strong dark wash left (behind text), fading right;
   plus top/bottom fades into the page background */
.l17-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      rgba(9, 9, 9, 0.94) 0%,
      rgba(9, 9, 9, 0.86) 34%,
      rgba(9, 9, 9, 0.55) 62%,
      rgba(9, 9, 9, 0.25) 100%),
    linear-gradient(180deg,
      rgba(9, 9, 9, 0.85) 0%,
      rgba(9, 9, 9, 0) 22%,
      rgba(9, 9, 9, 0) 62%,
      #090909 100%);
}
.l17-hero-content {
  position: relative;
}
.l17-badge {
  display: inline-block;
  font-family: var(--l17-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--l17-accent);
  background: var(--l17-surface);
  border: 1px solid var(--l17-border-strong);
  border-radius: 4px;
  padding: 5px 12px;
  margin-bottom: 22px;
}
.l17-hero-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 24px rgba(9, 9, 9, 0.8);
}
.l17-hero-tagline {
  font-family: var(--l17-mono);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--l17-text);
  margin-bottom: 1rem;
  text-shadow: 0 1px 12px rgba(9, 9, 9, 0.8);
}
.l17-hero-sub {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #c4c4c4;
  max-width: 58ch;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 8px rgba(9, 9, 9, 0.9);
}
.l17-hero-sub strong { color: var(--l17-text); }
.l17-hero-cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 12px; }
.l17-hero-info {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: #9a9a9a;
  max-width: 60ch;
  text-shadow: 0 1px 8px rgba(9, 9, 9, 0.9);
}

/* Buttons */
.l17-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--l17-mono);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.l17-btn .material-icons { font-size: 1.1rem; }
.l17-btn-primary {
  background: var(--l17-accent);
  color: var(--l17-accent-fg);
}
.l17-btn-primary:hover {
  background: #c19733;
  color: var(--l17-accent-fg);
}
.l17-btn-outline {
  background: transparent;
  color: var(--l17-text);
  border-color: var(--l17-border-strong);
}
.l17-btn-outline:hover {
  border-color: var(--l17-accent);
  color: var(--l17-accent);
}
.l17-btn-sm {
  font-size: 0.85rem;
  padding: 6px 14px;
}

/* Header account links — admin console */
.l17-nav-cta { gap: 14px; }
.l17-nav-login {
  font-family: var(--l17-mono);
  font-size: 0.9rem;
  color: var(--l17-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.l17-nav-login:hover { color: var(--l17-accent); }
@media (max-width: 575px) {
  .l17-nav-cta .l17-nav-login { display: none; }
}

/* Sections */
.l17-section { padding: 72px 0; }
.l17-section-head { max-width: 720px; margin-bottom: 40px; }
.l17-kicker {
  display: block;
  font-family: var(--l17-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--l17-accent);
  margin-bottom: 10px;
}
.l17-section-head h2 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.l17-section-sub {
  color: var(--l17-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.l17-section-sub code, .l17-block-note code {
  font-family: var(--l17-mono);
  font-size: 0.85em;
  color: var(--l17-accent);
  background: var(--l17-surface);
  border: 1px solid var(--l17-border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* Terminal / code sample */
.l17-terminal {
  background: var(--l17-surface);
  border: 1px solid var(--l17-border);
  border-radius: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.l17-terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--l17-border);
  font-family: var(--l17-mono);
  font-size: 0.8rem;
}
.l17-term-title { color: var(--l17-muted); }
.l17-term-status { color: var(--l17-credit); }
.l17-code {
  margin: 0;
  padding: 18px;
  font-family: var(--l17-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--l17-text);
  overflow-x: auto;
  background: transparent;
}
.l17-code .c { color: var(--l17-dim); }
.l17-code .s { color: #cfc9bd; }
.l17-code .dr { color: var(--l17-debit); }
.l17-code .cr { color: var(--l17-credit); }

/* Balanced block card */
.l17-block-card {
  background: var(--l17-surface);
  border: 1px solid var(--l17-border);
  border-radius: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.l17-block-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--l17-border);
  font-family: var(--l17-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--l17-dim);
}
.l17-block-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--l17-mono);
  font-size: 0.85rem;
}
.l17-block-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--l17-border);
  color: var(--l17-text);
}
.l17-block-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.l17-block-table .dr { color: var(--l17-debit); }
.l17-block-table .cr { color: var(--l17-credit); }
.l17-block-table tfoot td {
  color: var(--l17-dim);
  font-size: 0.78rem;
  border-bottom: none;
}
.l17-block-table .ok { color: var(--l17-credit); }
.l17-block-note {
  padding: 4px 16px 16px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--l17-muted);
  margin: auto 0 0;
}

/* Feature grid — hairline ledger grid */
.l17-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--l17-border);
  border: 1px solid var(--l17-border);
  border-radius: 6px;
  overflow: hidden;
}
.l17-feature {
  background: #0d0d0d;
  padding: 28px 24px;
  transition: background 0.15s ease;
}
.l17-feature:hover { background: var(--l17-surface); }
.l17-feature-icon {
  color: var(--l17-accent);
  font-size: 26px;
  margin-bottom: 14px;
  display: inline-block;
}
.l17-feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.l17-feature p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--l17-muted);
  margin-bottom: 0;
}
.l17-feature p code {
  font-family: var(--l17-mono);
  font-size: 0.85em;
  color: var(--l17-accent);
  background: var(--l17-raised);
  border-radius: 3px;
  padding: 1px 4px;
}
.l17-feature-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--l17-mono);
  font-size: 0.85rem;
  color: var(--l17-accent);
  text-decoration: none;
}
.l17-feature-link:hover { color: #e3bd5e; }
.l17-feature-link .material-icons { font-size: 1rem; }

@media (max-width: 991px) {
  .l17-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .l17-feature-grid { grid-template-columns: 1fr; }
  .l17-hero { padding-top: 110px; }
}

/* API split panes */
.l17-api-pane {
  background: var(--l17-surface);
  border: 1px solid var(--l17-border);
  border-radius: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.l17-api-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--l17-border);
}
.l17-api-pane-title {
  font-family: var(--l17-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--l17-text);
  display: inline-flex;
  align-items: center;
}
.l17-api-pane-title .material-icons {
  font-size: 1.15rem;
  color: var(--l17-accent);
}
.l17-api-pane-port {
  font-family: var(--l17-mono);
  font-size: 0.8rem;
  color: var(--l17-accent);
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 4px;
  padding: 2px 8px;
}
.l17-api-pane-desc {
  padding: 14px 18px 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--l17-muted);
  margin-bottom: 0.5rem;
}
.l17-endpoints {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px;
}
.l17-endpoints li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid #161616;
}
.l17-endpoints li:last-child { border-bottom: none; }
.l17-endpoints code {
  font-family: var(--l17-mono);
  font-size: 0.8rem;
  color: var(--l17-text);
  background: transparent;
  padding: 0;
}
.l17-endpoint-desc {
  font-size: 0.75rem;
  color: var(--l17-dim);
  margin-left: auto;
}
.l17-method {
  font-family: var(--l17-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 6px;
  min-width: 44px;
  text-align: center;
}
.l17-method-get { color: var(--l17-debit); }
.l17-method-post { color: var(--l17-accent); }
.l17-method-ws { color: var(--l17-credit); }
.l17-method-delete { color: var(--l17-danger); }
.l17-api-pane > .l17-feature-link { padding: 0 18px 18px; }

/* Footer */
.l17-footer {
  border-top: 1px solid var(--l17-border);
  background: #0d0d0d;
  padding: 56px 0 24px;
  margin-top: 40px;
}
.l17-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.l17-footer-tag {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--l17-dim);
}
.l17-footer-col h6 {
  font-family: var(--l17-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--l17-dim);
  margin-bottom: 14px;
}
.l17-footer-col ul { list-style: none; margin: 0; padding: 0; }
.l17-footer-col li { margin-bottom: 8px; }
.l17-footer-col a {
  font-size: 0.85rem;
  color: var(--l17-muted);
  text-decoration: none;
}
.l17-footer-col a:hover { color: var(--l17-accent); }
.l17-footer-bottom {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--l17-border);
  font-family: var(--l17-mono);
  font-size: 0.78rem;
  color: var(--l17-dim);
}
@media (max-width: 767px) {
  .l17-footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- Docs (Lotus Docs alignment) ---------- */

[data-dark-mode] body {
  background-color: #0b0b0b;
}

/* Wordmark in docs chrome: dark text on light theme, light on dark */
body:not(.l17-landing) .l17-wordmark { color: #111111; }
[data-dark-mode] body:not(.l17-landing) .l17-wordmark { color: var(--l17-text); }
body:not(.l17-landing) .l17-wordmark:hover { text-decoration: none; }
.sidebar-brand { display: flex; align-items: center; }
.sidebar-brand .l17-wordmark {
  font-size: 1.25rem;
  text-transform: none !important;
  letter-spacing: -0.02em !important;
}
.l17-wordmark .l17-accent { color: var(--l17-accent) !important; }

/* Docs headings in the brand monospace */
body:not(.l17-landing) h1,
body:not(.l17-landing) h2,
body:not(.l17-landing) h3,
body:not(.l17-landing) h4 {
  font-family: var(--l17-mono) !important;
  letter-spacing: -0.02em;
}
