/* wierdx.net — light documentation/cheatsheet style */

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

:root {
  --wx-bg:        #f8f9fb;
  --wx-surface:   #ffffff;
  --wx-border:    #dde1e8;
  --wx-accent:    #2563eb;
  --wx-accent2:   #0f4c9e;
  --wx-text:      #1c2333;
  --wx-muted:     #5a6478;
  --wx-tag-bg:    #eef2ff;
  --wx-tag-text:  #2563eb;
  --wx-code-bg:   #f1f3f7;
  --wx-code-text: #c7253e;
  --wx-pre-bg:    #1e2333;
  --wx-pre-text:  #e8eaf0;
  --wx-radius:    6px;
  --wx-font:      system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wx-mono:      "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --wx-wrap:      1120px;
}

body {
  font-family: var(--wx-font);
  background: var(--wx-bg);
  color: var(--wx-text);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--wx-accent); text-decoration: none; }
a:hover { color: var(--wx-accent2); text-decoration: underline; }

/* ---- Top banner ---- */
.wx-topbar {
  background: var(--wx-accent);
  color: #fff;
  font-size: 0.78rem;
  padding: 6px 0;
}
.wx-topbar .wx-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.wx-topbar a { color: #c7d9ff; }
.wx-topbar a:hover { color: #fff; }

/* ---- Logo / header ---- */
.wx-masthead {
  background: var(--wx-surface);
  border-bottom: 2px solid var(--wx-accent);
  padding: 18px 0 16px;
}
.wx-masthead .wx-wrap {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.wx-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--wx-text);
  letter-spacing: -0.5px;
}
.wx-logo:hover { text-decoration: none; color: var(--wx-accent); }
.wx-logo-tag {
  font-size: 0.8rem;
  color: var(--wx-muted);
  margin-bottom: 3px;
}

/* ---- Nav ---- */
.wx-nav {
  background: var(--wx-surface);
  border-bottom: 1px solid var(--wx-border);
}
.wx-nav .wx-wrap {
  display: flex;
  gap: 0;
}
.wx-nav a {
  display: block;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wx-muted);
  border-bottom: 3px solid transparent;
}
.wx-nav a:hover {
  color: var(--wx-accent);
  text-decoration: none;
  border-bottom-color: var(--wx-accent);
}
.wx-nav a.wx-active {
  color: var(--wx-accent);
  border-bottom-color: var(--wx-accent);
}

/* ---- Wrap ---- */
.wx-wrap {
  max-width: var(--wx-wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Hero / intro strip ---- */
.wx-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f8f9fb 60%);
  border-bottom: 1px solid var(--wx-border);
  padding: 40px 0 36px;
}
.wx-hero h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.wx-hero p {
  color: var(--wx-muted);
  font-size: 1rem;
  max-width: 540px;
  margin-bottom: 20px;
}
.wx-btn {
  display: inline-block;
  background: var(--wx-accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--wx-radius);
  font-size: 0.875rem;
  font-weight: 600;
}
.wx-btn:hover { background: var(--wx-accent2); color: #fff; text-decoration: none; }

/* ---- Two-column layout ---- */
.wx-body {
  padding: 36px 0 48px;
}
.wx-columns {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) {
  .wx-columns { grid-template-columns: 1fr; }
}

/* ---- Section heading ---- */
.wx-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wx-muted);
  border-bottom: 1px solid var(--wx-border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* ---- Tutorial card list (inc/latest.php renders into this) ---- */
.wx-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wx-card-list li {
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  padding: 16px 20px;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}
.wx-card-list li:hover { border-color: var(--wx-accent); }
.wx-card-list h3 {
  font-size: 0.975rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.wx-card-list h3 a { color: var(--wx-text); }
.wx-card-list h3 a:hover { color: var(--wx-accent); text-decoration: none; }
.wx-card-list p {
  font-size: 0.86rem;
  color: var(--wx-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---- Meta tag (label + date) ---- */
.wx-entry-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wx-tag-text);
  background: var(--wx-tag-bg);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* ---- Sidebar ---- */
.wx-sidebar-box {
  background: var(--wx-surface);
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.wx-sidebar-box h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--wx-muted);
  margin-bottom: 12px;
}
.wx-sidebar-box ul {
  list-style: none;
  font-size: 0.875rem;
}
.wx-sidebar-box ul li {
  padding: 4px 0;
  border-bottom: 1px solid var(--wx-border);
}
.wx-sidebar-box ul li:last-child { border-bottom: none; }
.wx-sidebar-box p { font-size: 0.875rem; color: var(--wx-muted); }

/* ---- Article page ---- */
.wx-article-wrap {
  padding: 36px 0 56px;
}
.wx-article-columns {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) {
  .wx-article-columns { grid-template-columns: 1fr; }
}

.wx-article .wx-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wx-tag-text);
  background: var(--wx-tag-bg);
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.wx-article h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.wx-article .wx-standfirst {
  font-size: 1.05rem;
  color: var(--wx-muted);
  margin-bottom: 10px;
  line-height: 1.55;
}
.wx-article .wx-pubdate {
  font-size: 0.78rem;
  color: var(--wx-muted);
  margin-bottom: 28px;
  display: block;
}
.wx-article h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--wx-text);
}
.wx-article h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
}
.wx-article p {
  margin-bottom: 16px;
  line-height: 1.75;
}
.wx-article ul, .wx-article ol {
  margin: 0 0 16px 22px;
  line-height: 1.75;
}
.wx-article li { margin-bottom: 4px; }
.wx-article code {
  font-family: var(--wx-mono);
  font-size: 0.85em;
  background: var(--wx-code-bg);
  color: var(--wx-code-text);
  padding: 1px 5px;
  border-radius: 3px;
}
.wx-article pre {
  background: var(--wx-pre-bg);
  color: var(--wx-pre-text);
  font-family: var(--wx-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 18px 20px;
  border-radius: var(--wx-radius);
  overflow-x: auto;
  margin: 0 0 20px;
}
.wx-article pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ---- Section listing page ---- */
.wx-section-hero {
  background: var(--wx-surface);
  border-bottom: 1px solid var(--wx-border);
  padding: 28px 0 24px;
}
.wx-section-hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.wx-section-hero p { color: var(--wx-muted); font-size: 0.9rem; }

/* ---- Contact form ---- */
.wx-form { max-width: 520px; }
.wx-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.wx-form input, .wx-form textarea {
  width: 100%;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  padding: 9px 12px;
  font-family: var(--wx-font);
  font-size: 0.9rem;
  color: var(--wx-text);
  background: var(--wx-surface);
  margin-bottom: 16px;
}
.wx-form input:focus, .wx-form textarea:focus {
  outline: 2px solid var(--wx-accent);
  border-color: var(--wx-accent);
}
.wx-form textarea { min-height: 130px; resize: vertical; }
.wx-form button {
  background: var(--wx-accent);
  color: #fff;
  border: none;
  border-radius: var(--wx-radius);
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.wx-form button:hover { background: var(--wx-accent2); }

/* ---- Simple prose page (about) ---- */
.wx-prose {
  max-width: 680px;
  padding: 36px 0 56px;
}
.wx-prose h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.wx-prose h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 8px;
}
.wx-prose p {
  margin-bottom: 16px;
  line-height: 1.75;
  color: var(--wx-text);
}

/* ---- Footer ---- */
.wx-footer {
  background: var(--wx-text);
  color: #9aa3b6;
  padding: 28px 0;
  font-size: 0.825rem;
}
.wx-footer .wx-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.wx-footer-links {
  display: flex;
  gap: 18px;
}
.wx-footer-links a { color: #9aa3b6; }
.wx-footer-links a:hover { color: #fff; }
.wx-footer-copy { color: #6b7488; }
