/* Maira brand typeface — PP Neue Corp Compact (self-hosted, shared with the app) */
@font-face {
  font-family: "PP Neue Corp Compact";
  src: url("/fonts/pp-neue-corp/PPNeueCorp-CompactMedium.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Corp Compact";
  src: url("/fonts/pp-neue-corp/PPNeueCorp-CompactUltrabold.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

/*
 * Maira brand palette (authoritative): Money Green #083027,
 * Power Orange #FF4A21, Snow White #FFFFFF, Urban Grey #E6E6E6.
 */
:root {
  --bg: #fafafa;
  --panel: #ffffff;
  --text: #083027;
  --muted: #5b6b64;
  --line: #e2e6e4;
  --brand: #083027;
  --brand-accent: #ff4a21;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PP Neue Corp Compact", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(140deg, #eef2f0, #fafafa);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--line);
  background: var(--panel);
}

.brand h1 {
  margin: 0;
  font-size: 1.3rem;
}

.brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
  font-size: 0.85rem;
  color: var(--muted);
}

.search input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 80px);
}

.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  height: calc(100vh - 80px);
  overflow: auto;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: #fbfdfd;
}

.sidebar a {
  display: block;
  margin: 0 0 0.35rem;
  padding: 0.48rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.93rem;
}

.sidebar a:hover,
.sidebar a.active {
  background: #e5efef;
  color: var(--brand);
}

.content {
  padding: 1.4rem;
}

.doc-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}

.doc-section h2 {
  margin-top: 0;
}

.doc-section h3 {
  margin-bottom: 0.45rem;
  color: var(--brand);
}

.doc-section p,
.doc-section li {
  line-height: 1.45;
}

.tip {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fff4ef;
  border: 1px solid #ffd8ca;
  color: #7a2a14;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
