/* ---------------------------------------------------------------------------
 * 1n2.org — shared dark-mode stylesheet
 * Default palette for 1n2.org sites.
 * Pull this into new pages with:
 *     <link rel="stylesheet" href="/_shared/dark-mode.css">
 * Bitcoin-orange (#f7931a) keeps the family branding.
 * Headline: Playfair Display 900 italic. Body: Inter / system stack.
 * Bespoke magazine spreads (e.g. /bitcoin-2026/) opt out by linking their own.
 * ------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=Inter:wght@400;500;700&display=swap');

:root {
  --bg:           #0a0a0a;
  --surface:      #1a1a1a;
  --text:         #e8e8e8;
  --muted:        #888;
  --headline:     #fff;
  --accent:       #f7931a;
  --accent-hover: #c97800;
  --border:       #222;
  --rule:         #333;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---- Body ---- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Headlines ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--headline);
  margin: 1.4em 0 .5em;
  line-height: 1.2;
  font-weight: 900;
}
h1 { font-size: 2.6rem; font-style: italic; letter-spacing: -.02em; }
h2 { font-size: 2.0rem; font-style: italic; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }
h5 { font-size: 1.0rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h6 { font-size: .9rem;  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

p { margin: 0 0 1em; }
small, .muted, time { color: var(--muted); }

/* ---- Links ---- */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a:visited { color: var(--accent-hover); }

/* ---- Code ---- */
code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco,
               Consolas, 'Liberation Mono', monospace;
  font-size: .92em;
  background: #111;
  color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
pre {
  background: #111;
  color: #f0f0f0;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: transparent; border: 0; padding: 0; }

/* ---- Layout primitives ---- */
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
blockquote {
  border-left: 3px solid var(--accent);
  margin: 1em 0;
  padding: .25em 0 .25em 1em;
  color: var(--muted);
  font-style: italic;
}
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
th { background: var(--surface); color: var(--headline); }

/* ---- Images ---- */
img, video, iframe {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* ---- Cards / sections ---- */
.surface, .card, article.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 4px;
}

/* ---- Selection ---- */
::selection { background: var(--accent); color: #000; }

/* ---- Print: flip back to light so paper isn't a wall of black ink ---- */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --text: #111; --muted: #555;
    --headline: #000; --border: #ccc; --rule: #999;
  }
  body { background: #fff; color: #111; }
  h1, h2, h3, h4, h5, h6 { color: #000; }
  a, a:visited { color: #111; text-decoration: underline; }
  code, kbd, samp, pre { background: #f5f5f5; color: #111; border-color: #ccc; }
  th { background: #f0f0f0; color: #000; }
  img, video, iframe { border-color: #ccc; }
  blockquote { color: #444; }
}
