/* ============================================================
   Solarized Dark — shared theme for all sites
   ============================================================ */

:root {
  --base03:  #002b36;
  --base02:  #073642;
  --base01:  #586e75;
  --base00:  #657b83;
  --base0:   #839496;
  --base1:   #93a1a1;
  --base2:   #eee8d5;
  --base3:   #fdf6e3;
  --yellow:  #b58900;
  --orange:  #cb4b16;
  --red:     #dc322f;
  --magenta: #d33682;
  --violet:  #6c71c4;
  --blue:    #268bd2;
  --cyan:    #2aa198;
  --green:   #859900;

  --bg:       var(--base03);
  --bg-alt:   var(--base02);
  --border:   var(--base01);
  --text-dim: var(--base00);
  --text:     var(--base0);
  --text-hi:  var(--base1);
  --emphasis: var(--base2);
  --link:     var(--blue);
  --link-hover: var(--yellow);
  --accent:   var(--cyan);
  --cta:      var(--yellow);
  --warn:     var(--orange);
  --tag-bg:   var(--base02);
  --tag-text: var(--cyan);

  --font-mono: 'IBM Plex Mono', 'Fira Code', 'Courier New', monospace;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  --font-display: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;

  --radius: 3px;
  --max-width: 860px;
  --nav-height: 56px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--emphasis);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; color: var(--text-hi); border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
h3 { font-size: 1.1rem; color: var(--accent); }
h4 { font-size: 1rem; color: var(--text-hi); }

p { margin: 0 0 1.1rem; }

a { color: var(--link); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--link-hover); }

strong { color: var(--emphasis); font-weight: 600; }
em { color: var(--text-hi); font-style: italic; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-alt);
  color: var(--cyan);
  padding: 0.15em 0.4em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-hi);
}

blockquote {
  border-left: 3px solid var(--yellow);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-hi);
  font-style: italic;
}

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

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
th {
  background: var(--bg-alt);
  color: var(--emphasis);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 2px solid var(--accent);
}
td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:hover td { background: var(--bg-alt); }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ---- Layout ---- */
.site-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: calc(var(--nav-height) + 2.5rem) 0 4rem;
  min-height: calc(100vh - var(--nav-height));
}

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}
.site-nav .site-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--emphasis);
  letter-spacing: 0.04em;
}
.site-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-links a:hover { color: var(--accent); }

/* ---- Page header ---- */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-top: 0; }
.page-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.page-meta .tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--border);
  padding: 0.1em 0.5em;
  border-radius: var(--radius);
  font-size: 0.75rem;
}

/* ---- Article list ---- */
.article-list { list-style: none; padding: 0; }
.article-list li {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.article-list li:first-child { padding-top: 0; }
.article-list .article-title {
  font-size: 1.05rem;
  color: var(--text-hi);
  font-weight: 500;
}
.article-list .article-title:hover { color: var(--link-hover); }
.article-list .article-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}
.lang-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-alt);
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 0.1em 0.4em;
  border-radius: var(--radius);
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ---- Doc page ---- */
.doc-header {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.doc-header .doc-id { color: var(--text-dim); }
.doc-header .doc-version { color: var(--cyan); }
.doc-header .doc-status-released { color: var(--green); }
.doc-header .doc-status-draft { color: var(--yellow); }
.doc-nav {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.doc-nav a { color: var(--text-dim); }
.doc-nav a:hover { color: var(--link); }
.doc-download {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.doc-download:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Order page ---- */
.order-hash {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  word-break: break-all;
  margin-bottom: 1.5rem;
}
.order-status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3em 0.8em;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.order-status-badge.in-progress { background: var(--bg-alt); color: var(--yellow); border: 1px solid var(--yellow); }
.order-status-badge.complete { background: var(--bg-alt); color: var(--green); border: 1px solid var(--green); }
.order-status-badge.pending { background: var(--bg-alt); color: var(--text-dim); border: 1px solid var(--border); }
.order-timeline { list-style: none; padding: 0; margin: 1.5rem 0; }
.order-timeline li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-left: 2px solid var(--border);
  position: relative;
  font-size: 0.9rem;
}
.order-timeline li::before {
  content: '';
  position: absolute;
  left: -5px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.order-timeline .tl-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
}

/* ---- Activity snippet widget ---- */
.activity-snippet {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 2.5rem 0;
}
.activity-snippet h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}
.activity-snippet ul { list-style: none; padding: 0; margin: 0; }
.activity-snippet li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.activity-snippet li:last-child { border-bottom: none; }
.activity-snippet .ev-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-snippet .ev-title a { color: var(--text); }
.activity-snippet .ev-title a:hover { color: var(--link-hover); }
.activity-snippet .ev-date { color: var(--text-dim); font-size: 0.73rem; flex-shrink: 0; }
.activity-snippet .ev-type-order { color: var(--green); }
.activity-snippet .ev-type-doc { color: var(--cyan); }
.activity-snippet .ev-type-article { color: var(--blue); }

/* ---- CTA button ---- */
.cta-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--cta);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: opacity 0.15s;
  cursor: pointer;
  border: none;
}
.cta-btn:hover { opacity: 0.85; color: var(--bg); }
.cta-btn-outline {
  background: transparent;
  color: var(--cta);
  border: 1px solid var(--cta);
}
.cta-btn-outline:hover { background: var(--cta); color: var(--bg); opacity: 1; }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.site-footer .site-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .nav-links { gap: 1rem; }
  .site-footer .site-wrap { flex-direction: column; align-items: flex-start; }
}

/* ---- Google Fonts import (IBM Plex) ---- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Sans+Condensed:wght@600&display=swap');
