/* Steel Bridge Solutions — blog stylesheet.
   Tokens mirror the main site (steelbridge-solutions.com). */

:root {
  --navy-900: #071A2C;
  --navy-800: #0B2239;
  --accent: #1F82C8;
  --accent-dark: #16659E;
  --ink: #101922;
  --body: #4B5A68;
  --muted: #63707D;
  --line: #E2E8EE;
  --line-soft: #EDF1F5;
  --surface: #F6F9FB;
  --white: #FFFFFF;
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 8px;
  --radius-lg: 12px;
  --maxw: 820px;
  --shadow-sm: 0 1px 1px rgba(16,25,34,.03), 0 2px 6px rgba(16,25,34,.04);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.16; letter-spacing: -0.01em; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); }
h3, h4 { color: var(--ink); font-weight: 600; margin: 0 0 12px; }
p { margin: 0 0 16px; }

a { color: var(--accent-dark); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-weight: 700; letter-spacing: -0.01em; }
.brand em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: var(--body); font-weight: 500; font-size: 0.95rem; }

/* Hero */
.hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line-soft); margin-bottom: 40px; }
.hero .lede { font-size: 1.1rem; max-width: 56ch; }

/* Post list */
.post-list { display: flex; flex-direction: column; gap: 36px; padding-bottom: 64px; }
.post-card h2 { margin-bottom: 8px; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--accent-dark); text-decoration: none; }
.meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.more { font-weight: 600; font-size: 0.95rem; }

/* Post page */
.post { padding: 48px 0 64px; }
.post h1 { margin-bottom: 24px; }
.prose { max-width: 68ch; }
.prose h2, .prose h3 { margin-top: 32px; }
.prose img { border-radius: var(--radius); }
.prose blockquote { margin: 0 0 16px; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-x: auto; font-size: 0.9rem; }
.prose code { background: var(--surface); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
.prose pre code { background: none; padding: 0; }
.backlink { margin-top: 40px; }
.draft-banner { background: #FFF6E5; border: 1px solid #F0DCB0; color: #7A5A12; border-radius: var(--radius); padding: 10px 14px; font-size: 0.9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.9rem; color: var(--muted); }

/* Shared bits */
.empty { padding: 64px 0; }
.error { background: #FDECEC; border: 1px solid #F2C4C4; color: #8A1F1F; border-radius: var(--radius); padding: 10px 14px; font-size: 0.9rem; }
.inline { display: inline; }
.linklike { background: none; border: none; padding: 0; font: inherit; color: var(--accent-dark); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.linklike.danger { color: #B3261E; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 600;
  border: none; border-radius: var(--radius); padding: 10px 20px; font-size: 0.98rem;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.ghost { background: var(--white); color: var(--accent-dark); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface); }

/* Auth */
.auth { max-width: 420px; padding: 64px 0; }
.auth form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

/* Admin */
.dash { padding: 48px 0 64px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid var(--line); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.admin-table td a { font-weight: 500; }
.row-actions { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.pill { display: inline-block; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 600; border-radius: 99px; padding: 2px 10px; }
.pill.live { background: #E8F5EC; border-color: #BFE3CB; color: #1E6B37; }
.empty-note { color: var(--muted); }

/* Editor */
.editor { padding: 48px 0 64px; }
.editor form { display: flex; flex-direction: column; gap: 20px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
input, textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.6; }
.editor-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cancel { color: var(--muted); }

@media (max-width: 600px) {
  .row-actions { flex-wrap: wrap; white-space: normal; }
}
