/* CloudBear — Minimal Editorial Stylesheet (0 KB JS) */
:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #16181d;
  --muted: #5a6270;
  --border: #e3e6ec;
  --accent: #0f4c81;
  --accent-hover: #0a355c;
  --callout-reality-bg: #fff8f0;
  --callout-reality-border: #d97706;
  --callout-tradeoff-bg: #f0f6ff;
  --callout-tradeoff-border: #2563eb;
  --code-bg: #f2f4f8;
  --max-w: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --surface: #171b23;
    --text: #e6e9ef;
    --muted: #98a1b2;
    --border: #262c38;
    --accent: #6cb4ee;
    --accent-hover: #96ccf5;
    --callout-reality-bg: #231b12;
    --callout-reality-border: #f59e0b;
    --callout-tradeoff-bg: #131c2b;
    --callout-tradeoff-border: #60a5fa;
    --code-bg: #1a1f29;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-bottom: 2.5rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-brand span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.4rem;
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Typography */
main {
  min-height: 65vh;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.35rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1.15rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-hover); }

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

li { margin-bottom: 0.4rem; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.25rem 0;
}

/* Hero & Sections */
.hero {
  margin-bottom: 2.75rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.section-block {
  margin-bottom: 2.75rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin-bottom: 1.1rem;
}

.section-head h2 {
  border: 0;
  margin: 0;
  padding: 0;
}

.section-head a {
  font-size: 0.9rem;
  text-decoration: none;
}

/* Post & Blueprint Lists */
.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.entry-item:last-child { border-bottom: 0; }

.entry-title {
  font-weight: 600;
  font-size: 1.08rem;
  text-decoration: none;
  color: var(--text);
}

.entry-title:hover { color: var(--accent); }

.entry-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.entry-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
}

.pillar-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.pillar-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}

.tag:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* Callouts (Reality Check & Trade-Off) */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 6px;
  border-left: 4px solid var(--callout-reality-border);
  background: var(--callout-reality-bg);
}

.callout-tradeoff {
  border-left-color: var(--callout-tradeoff-border);
  background: var(--callout-tradeoff-bg);
}

.callout-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.callout p:last-child { margin-bottom: 0; }

/* Code & Tables */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 1.25rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
}

table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  min-width: 8rem;
}

th {
  font-weight: 600;
  background: var(--surface);
}

blockquote {
  margin: 1.25rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* Article Footer & Site Footer */
.article-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.article-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  margin-top: 4rem;
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--text); }
