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

:root {
  --bg: #faf9f7;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --border: #e4e2dd;
  --link: #1a4c8a;
  --link-hover: #0f2f5a;
  --badge-contribution-bg: #fff3cd;
  --badge-contribution-text: #7a5200;
  --badge-resource-bg: #dbeafe;
  --badge-resource-text: #1e3a8a;
  --max-width: 720px;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 0 1.5rem;
}

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

/* Layout */

header {
  max-width: var(--max-width);
  margin: 3rem auto 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: -0.02em;
}

header p.tagline {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  flex: 1;
  padding-left: 1.5rem;
}

.submit-link {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  white-space: nowrap;
}
.submit-link:hover { background: #333; color: var(--bg); text-decoration: none; }

main {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
}

/* Article list */

.articles { list-style: none; }

.article {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.article:last-child { border-bottom: none; }

.article-title {
  font-size: 1.1rem;
  font-weight: normal;
  margin-bottom: 0.25rem;
}
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--link); }

.article-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}
.badge-contribution { background: var(--badge-contribution-bg); color: var(--badge-contribution-text); }
.badge-resource     { background: var(--badge-resource-bg);     color: var(--badge-resource-text); }

.article-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.empty-state {
  padding: 3rem 0;
  color: var(--muted);
  font-style: italic;
}

/* Submit form */

.form-wrap {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
}

.form-wrap h2 {
  font-size: 1.2rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
}

.form-wrap .form-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.field { margin-bottom: 1.25rem; }

label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}
label .optional {
  font-weight: normal;
  color: var(--muted);
}

input[type="url"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

textarea { resize: vertical; min-height: 80px; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 0.8rem;
}

button[type="submit"] {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
}
button[type="submit"]:hover { background: #333; }
button[type="submit"]:disabled { opacity: 0.5; cursor: default; }

.form-message {
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  display: none;
}
.form-message.success { background: #d1fae5; color: #065f46; display: block; }
.form-message.error   { background: #fee2e2; color: #991b1b; display: block; }
