/* SeattleBuilds — PNW Editorial Stylesheet (WCAG AAA Contrast) */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-accent: #ecfdf5;
  --text: #0f172a;          /* > 17:1 on #ffffff */
  --text-muted: #334155;    /* > 10:1 on #ffffff */
  --text-secondary: #475569;/* > 7.5:1 on #ffffff */
  --accent: #064e3b;        /* Deep PNW pine — > 10.5:1 on #ffffff */
  --accent-hover: #04392b;
  --border: #cbd5e1;
  --border-subtle: #e2e8f0;
  --code-bg: #f1f5f9;
  --radius: 6px;
  --max-width: 780px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  border-radius: var(--radius);
}

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 5px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.primary-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent);
}

.primary-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
}

.outbound-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.outbound-link:hover,
.outbound-link:focus-visible {
  background: var(--bg-accent);
  border-color: var(--accent);
}

/* Main Content & Typography */
.site-main {
  padding: 2.75rem 0 4rem;
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  color: var(--text);
}

.prose h2 {
  font-size: 1.45rem;
  line-height: 1.28;
  letter-spacing: -0.015em;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text);
}

.prose h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 1.75rem 0 0.5rem;
  color: var(--accent);
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose .lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--accent-hover);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

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

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* Cards & Grids */
.arc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.arc-card {
  padding: 1.15rem 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.arc-card .stage-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.arc-card h3 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 1.08rem;
}

.arc-card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-muted);
}

.callout {
  padding: 1.1rem 1.25rem;
  background: var(--bg-accent);
  border: 1px solid #a7f3d0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

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

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.96rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.prose th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

/* Code & Rouge Syntax Highlighting (WCAG AAA Overrides) */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--text);
  padding: 0.15em 0.38em;
  border-radius: 4px;
}

.prose pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  line-height: 1.5;
}

.prose pre code {
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
}

.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs {
  color: #57606a;
  font-style: italic;
}

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt {
  color: #0550ae;
  font-weight: 700;
}

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd {
  color: #0a3069;
}

.highlight .m,
.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo {
  color: #cf222e;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 2rem 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0 0 0.45rem;
}

.footer-meta {
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--accent);
}
