/* PinTinker — shared site styles
   Simple, fast, no build step. Edit colors in :root to re-theme the whole site. */

:root {
  --bg: #0f1417;
  --bg-panel: #161d22;
  --bg-panel-2: #1d262c;
  --border: #2a353c;
  --text: #e8edf0;
  --text-dim: #9fb0b8;
  --accent: #4fd1a5;
  --accent-dim: #2f8f6f;
  --warn: #e8b34f;
  --danger: #e85f5f;
  --link: #6fc3e8;
  --radius: 10px;
  --maxw: 880px;
}

* { box-sizing: border-box; }

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

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site {
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}

header.site .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

header.site .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

header.site .brand span { color: var(--accent); }

nav.site a {
  color: var(--text-dim);
  margin-left: 18px;
  font-size: 0.95rem;
}

nav.site a:first-child { margin-left: 0; }
nav.site a:hover { color: var(--text); }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

h1 { font-size: 1.9rem; margin: 0 0 10px; }
h2 { font-size: 1.35rem; margin: 32px 0 12px; }
h3 { font-size: 1.1rem; margin: 22px 0 8px; }

p { color: var(--text); }
.lede { color: var(--text-dim); font-size: 1.05rem; }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #06231a;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover { background: #6fe0b8; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg-panel-2); }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 6px;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* Ad slot placeholders — swap the HTML comment inside for real AdSense code */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 22px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Blog list */
.post-list-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.post-list-item:last-child { border-bottom: none; }
.post-list-item h3 { margin: 0 0 6px; }
.post-list-item .meta { color: var(--text-dim); font-size: 0.85rem; }

.post-body h2 { margin-top: 34px; }
.post-body ul, .post-body ol { color: var(--text); }
.callout {
  border-left: 3px solid var(--accent);
  background: var(--bg-panel);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
}

.callout.warn { border-left-color: var(--warn); }

table { border-collapse: collapse; width: 100%; margin: 14px 0; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; font-size: 0.9rem; }
th { background: var(--bg-panel-2); }

/* --- Pin planner tool --- */
.planner-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 760px) {
  .planner-layout { grid-template-columns: 340px 1fr; }
}

.component-picker select, .component-picker button {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.added-list { list-style: none; padding: 0; margin: 10px 0; }
.added-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.added-list li button {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  max-width: 320px;
  margin: 10px auto;
}

.pin {
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 0.68rem;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text-dim);
  line-height: 1.25;
}

.pin.power { background: #4a2f2f; color: #e8b3b3; border-color: #6a3f3f; }
.pin.ground { background: #2a2a2a; color: #b8b8b8; }
.pin.used { background: var(--accent-dim); color: #eafff5; border-color: var(--accent); }
.pin.conflict { background: var(--danger); color: #fff; border-color: #ff8080; }

.assignment-table td.pin-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.issues {
  margin: 14px 0;
}

.issue {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.issue.error { background: rgba(232, 95, 95, 0.15); border: 1px solid var(--danger); color: #ffc9c9; }
.issue.warning { background: rgba(232, 179, 79, 0.15); border: 1px solid var(--warn); color: #ffe2ab; }
.issue.ok { background: rgba(79, 209, 165, 0.12); border: 1px solid var(--accent); color: #baf5dc; }
