/* ═══════════════════════════════════════════════════════════
   hatchbear — tilde.town  |  page.css
   Generic content page layout (editor chrome + prose area).
   Requires: global.css
   Usage: link both global.css and page.css, then put your
   content inside <main class="page-content">.
   ═══════════════════════════════════════════════════════════ */

/* ── page body ────────────────────────────────────────────── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── editor shell (gutter + content) ─────────────────────── */
.editor {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── line-number gutter ───────────────────────────────────── */
.gutter {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 10px 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 40px;
  flex-shrink: 0;
  user-select: none;
  counter-reset: ln;
}

.gutter-num {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: var(--text-muted);
  opacity: 0.5;
  min-width: 20px;
  text-align: right;
}

/* ── main content area ────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 2.5rem 3rem 4rem 2rem;
  max-width: 720px;
  overflow-x: auto;
}

/* ── typography ───────────────────────────────────────────── */
.page-content h1 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: normal;
  color: var(--teal);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.page-content h1::before { content: '# '; color: var(--teal-dark); opacity: 0.7; }

.page-content h2 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin: 2rem 0 0.5rem;
}
.page-content h2::before { content: '## '; color: var(--text-muted); }

.page-content p {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.1em;
}

.page-content a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(0, 167, 139, 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.page-content a:hover {
  color: #fff;
  text-decoration-color: var(--teal);
}

.page-content ul,
.page-content ol {
  margin: 0 0 1.1em 1.5em;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text);
}

.page-content li { margin-bottom: 0.3em; }

.page-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--teal);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

.page-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal-dark);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.1em;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
}
.page-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.page-content .subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 560px) {
  .page-content { padding: 1.5rem 1.25rem 3rem; }
  .gutter       { display: none; }
}
