/* ============================================================
 * components.css
 * Reusable UI components: buttons, articles, chips, marquee,
 * form fields, stack tags.
 * ============================================================ */

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- marquee (reserved utility) ---------- */
.marquee {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.marquee-track {
  display: inline-block;
  animation: slide 60s linear infinite;
}
.marquee-track span { margin: 0 22px; }
.marquee-track .sep { color: var(--accent); }
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- articles list ---------- */
.articles {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 48px;
}
@media (max-width: 960px) {
  .articles { grid-template-columns: 1fr; gap: 0; }
}
.articles .gutter-label { padding-top: 28px; }
.article-list { display: flex; flex-direction: column; }

.article {
  display: grid;
  grid-template-columns: 110px 1fr 180px 24px;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: padding .2s ease;
}
.article:hover { padding-left: 12px; }
.article:hover .title { color: var(--accent); }
.article:hover .arr { color: var(--accent); transform: translateX(6px); }
.article:last-child { border-bottom: 1px solid var(--rule); }

.article .date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.article .title {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color .15s ease;
  font-weight: 400;
}
.article .title small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.article .tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.article .tag .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  margin-right: 6px;
  transform: translateY(-2px);
}
.article .arr {
  color: var(--muted-2);
  transition: transform .2s ease, color .15s ease;
  text-align: right;
  font-size: 18px;
}
@media (max-width: 720px) {
  .article { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .article .tag, .article .arr { text-align: left; }
}

/* ---------- chips (article filters) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all .15s ease;
  background: transparent;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- stack tags ---------- */
.stack-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.stack-row span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-2);
  color: var(--ink-2);
}

/* ---------- form fields ---------- */
.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  letter-spacing: -0.005em;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 96px; }

.checkboxes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.checkboxes label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  cursor: pointer;
}
.checkboxes label.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
