/* GoNorth Help — Shared Stylesheet */

:root {
  --base:     #181825;
  --mantle:   #1E1E2E;
  --surface0: #313244;
  --surface1: #45475A;
  --overlay:  #6C7086;
  --subtext:  #A6ADC8;
  --text:     #CDD6F4;
  --blue:     #89B4FA;
  --green:    #A6E3A1;
  --red:      #F38BA8;
  --yellow:   #F9E2AF;
  --peach:    #FAB387;
  --mauve:    #CBA6F7;
  --sky:      #89DCEB;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--base);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar nav ── */
nav {
  width: 240px;
  min-width: 240px;
  background: var(--mantle);
  border-right: 1px solid var(--surface1);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

nav .logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--surface1);
  margin-bottom: 16px;
}

nav .logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
}

nav .logo p {
  font-size: 11px;
  color: var(--overlay);
  margin-top: 2px;
}

nav ul { list-style: none; }

nav ul li a {
  display: block;
  padding: 7px 20px;
  color: var(--subtext);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--surface0);
  color: var(--blue);
}

nav .section-label {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--overlay);
}

/* ── Main content ── */
main {
  flex: 1;
  padding: 40px 48px;
  max-width: 900px;
  overflow-y: auto;
}

h1 { font-size: 28px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 600; color: var(--text); margin: 32px 0 12px; border-bottom: 1px solid var(--surface1); padding-bottom: 6px; }
h2 small { font-size: 13px; font-weight: 400; color: var(--overlay); margin-left: 8px; }
h3 { font-size: 16px; font-weight: 600; color: var(--subtext); margin: 24px 0 8px; }
h4 { font-size: 14px; font-weight: 600; color: var(--subtext); margin: 16px 0 6px; }

p  { margin-bottom: 12px; color: var(--text); }

a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 12px 24px; }
li { margin-bottom: 4px; }

/* ── Code ── */
code {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 12.5px;
  background: var(--surface0);
  color: var(--green);
  padding: 1px 5px;
  border-radius: 3px;
}

pre {
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 6px;
  padding: 16px;
  margin: 12px 0 20px;
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

/* Syntax highlight classes used in pre blocks */
pre .kw  { color: var(--mauve); font-weight: bold; }   /* keywords */
pre .str { color: var(--green); }                       /* strings */
pre .num { color: var(--peach); }                       /* numbers */
pre .cmt { color: var(--overlay); font-style: italic; } /* comments */
pre .fn  { color: var(--sky); }                         /* functions */
pre .obj { color: var(--blue); }                        /* objects */
pre .bool{ color: var(--red); }                         /* booleans */

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13px;
}

th {
  background: var(--surface0);
  color: var(--subtext);
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--surface1);
}

td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--surface0);
  vertical-align: top;
}

tr:nth-child(even) td { background: var(--mantle); }

td code { font-size: 12px; }

/* Alias notes inside table cells */
td small { font-size: 11px; color: var(--overlay); display: block; margin-top: 3px; }
td small code { font-size: 11px; color: var(--subtext); }

/* ── Callouts ── */
.note, .tip, .warning {
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  border-left: 4px solid;
  font-size: 13px;
}

.note    { background: #1a2a3a; border-color: var(--blue);   color: var(--subtext); }
.tip     { background: #1a2e1a; border-color: var(--green);  color: var(--subtext); }
.warning { background: #2e2a1a; border-color: var(--yellow); color: var(--subtext); }

.note    strong { color: var(--blue); }
.tip     strong { color: var(--green); }
.warning strong { color: var(--yellow); }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 12px;
  color: var(--overlay);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--overlay); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 6px; }

/* ── Page subtitle ── */
.subtitle {
  color: var(--subtext);
  font-size: 15px;
  margin-bottom: 28px;
  margin-top: 4px;
}

/* ── Step list ── */
.steps { counter-reset: steps; list-style: none; margin-left: 0; }
.steps li {
  counter-increment: steps;
  padding: 12px 12px 12px 52px;
  position: relative;
  background: var(--mantle);
  border-radius: 6px;
  margin-bottom: 8px;
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 16px;
  top: 12px;
  width: 24px;
  height: 24px;
  background: var(--blue);
  color: var(--base);
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  padding-top: 1px;
}

/* ── Index grid ── */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.index-card {
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.15s;
}

.index-card:hover { border-color: var(--blue); }

.index-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--blue);
}

.index-card p {
  font-size: 12px;
  color: var(--subtext);
  margin: 0;
}

/* ── Nav search ── */
.nav-search {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--surface1);
  margin-bottom: 8px;
}

.nav-search input {
  width: 100%;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  padding: 5px 10px;
  outline: none;
}

.nav-search input:focus {
  border-color: var(--blue);
}

/* ── Search bar ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 24px;
}

.search-bar input {
  flex: 1;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  padding: 5px 10px;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--blue);
}

#srch-count {
  font-size: 12px;
  color: var(--subtext);
  white-space: nowrap;
  min-width: 80px;
}

#srch-clear {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 4px;
  color: var(--subtext);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
}

#srch-clear:hover { color: var(--text); border-color: var(--overlay); }

mark {
  background: var(--peach);
  color: var(--base);
  border-radius: 2px;
  padding: 0 1px;
}

mark.current {
  background: var(--yellow);
  outline: 2px solid var(--yellow);
}

#srch-prev, #srch-next {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 4px;
  color: var(--subtext);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
}

#srch-prev:hover, #srch-next:hover { color: var(--text); border-color: var(--overlay); }
