:root {
  --bg: #faf9f7;
  --ink: #1c1917;
  --muted: #44403c;
  --soft: #78716c;
  --navy: #1e3a5f;
  --line: #d6d3d1;
  --link: #1d4ed8;
  --paper: #ffffff;
  --danger: #9f1239;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Merriweather, Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
}

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

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.masthead {
  background: rgba(250, 249, 247, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead-top, .disciplines, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead-top { padding: 18px 0 12px; }

.brand { color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.eyebrow {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.logo {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  color: var(--navy);
}
.tagline {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.utility, .disciplines { font-family: "Source Sans 3", sans-serif; font-size: 14px; }
.utility { display: flex; gap: 16px; align-items: center; }
.utility a, .disciplines a { color: var(--muted); text-decoration: none; }
.utility a:hover, .disciplines a:hover { color: var(--ink); }
.utility form { margin: 0; }
.utility button.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.disciplines {
  border-top: 1px solid var(--line);
  padding: 10px 0 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.disciplines a.active { color: var(--navy); font-weight: 600; }

.page { padding: 36px 0 72px; }

.kicker {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 8px;
}

h1 { font-size: 44px; font-weight: 400; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 28px; font-weight: 400; margin: 0 0 8px; }
.deck { font-size: 18px; max-width: 720px; margin: 0 0 22px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 28px; }

.btn, button.btn {
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
  padding: 8px 14px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.secondary { background: white; color: var(--muted); border-color: var(--line); }
.btn.danger { background: white; color: var(--danger); border-color: var(--danger); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: white;
}
.stat { padding: 14px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}
.stat strong { font-size: 22px; font-weight: 400; }

.subject-group { margin: 0 0 34px; }
.subject-group h2 { font-size: 28px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 0; }
.subject-group h2 a { color: var(--ink); }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.archive-list > li > a { font-family: "Source Sans 3", sans-serif; font-size: 18px; font-weight: 600; }
.archive-list .code { margin-left: 8px; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--soft); }
.subject-line { margin-top: 4px; font-family: "Source Sans 3", sans-serif; font-size: 14px; line-height: 1.55; color: var(--muted); }
.subject-line a { color: var(--muted); }

.section-head { margin: 42px 0 16px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-family: "Source Sans 3", sans-serif; font-size: 14px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  padding: 14px;
}
.swatch {
  background: #e7eef6;
  color: var(--navy);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 92px;
  padding: 8px;
}
.meta {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card h3 { margin: 4px 0 8px; font-size: 22px; line-height: 1.3; font-weight: 700; }
.card h3 a { color: var(--navy); }
.excerpt { margin: 0; color: var(--muted); font-size: 15px; }

.list { display: flex; flex-direction: column; gap: 22px; }
.entry { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.entry h3 { margin: 4px 0; font-size: 22px; }
.entry-label { font-family: "Source Sans 3", sans-serif; font-weight: 600; font-size: 15px; }
.entry h3 a { color: var(--navy); }
.idline { font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.idline a { color: var(--link); }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; }
.abstract { font-size: 17px; }
.side {
  border: 1px solid var(--line);
  background: white;
  padding: 16px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
}
.side h2 { font-family: "Source Sans 3", sans-serif; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.side ul { margin: 0; padding-left: 18px; }
.side li { margin: 6px 0; }

.notice, .error-box {
  font-family: "Source Sans 3", sans-serif;
  background: white;
  border: 1px solid var(--line);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.error-box { border-color: #fecdd3; color: var(--danger); }
.field-error { font-family: "Source Sans 3", sans-serif; color: var(--danger); font-size: 13px; margin: 4px 0 0; }

label { display: block; font-family: "Source Sans 3", sans-serif; font-size: 14px; margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="file"], textarea, select {
  width: 100%;
  max-width: 640px;
  font: 15px "Source Sans 3", sans-serif;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
textarea { min-height: 140px; }
input[readonly] { background: #f5f5f4; }
.help { font-family: "Source Sans 3", sans-serif; color: var(--soft); font-size: 13px; margin: 4px 0 0; }
.form-card, .wizard-card { background: white; border: 1px solid var(--line); padding: 18px 20px 22px; max-width: 760px; }
.processbar { font-family: "Source Sans 3", sans-serif; font-size: 14px; margin: 0 0 18px; }
.processbar .current { font-weight: 600; }
.processbar .sep, .processbar .locked { color: var(--soft); }
.processbar .sep { margin: 0 8px; }
.wizard-card button.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
.contact-table { width: 100%; max-width: 640px; margin: 8px 0 14px; }
.contact-table th { width: 160px; font-family: "Source Sans 3", sans-serif; }
.warn-box { border: 1px solid #fde68a; background: #fffbeb; padding: 10px 12px; margin: 12px 0; font-family: "Source Sans 3", sans-serif; font-size: 14px; }
.step-section { margin-top: 28px; }
dialog.editor { border: 1px solid var(--line); padding: 0; max-width: 680px; width: calc(100% - 32px); }
dialog.editor .dialog-head, dialog.editor .dialog-body { padding: 16px 18px; }
dialog.editor .dialog-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
dialog.editor::backdrop { background: rgba(28, 25, 23, 0.45); }
.account-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
  max-width: 860px;
  background: white;
  border: 1px solid var(--line);
  padding: 16px 18px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
}
.account-tools { font-family: "Source Sans 3", sans-serif; margin: 12px 0 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-tools form { display: inline; margin: 0; }
.account-tools button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font: inherit;
  cursor: pointer;
}
.table-scroll { overflow-x: auto; }
.submissions { min-width: 980px; }
.submissions-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 8px; }
.submissions-head .actions { margin: 0; }
.submissions td .actions { margin: 0; flex-wrap: nowrap; align-items: center; gap: 2px; }
.submissions td .actions form { display: inline-flex; margin: 0; }
.icon-btn, button.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: #f5f5f4; text-decoration: none; }
.icon-btn.danger { color: var(--danger); }
.submissions .error-box { margin: 8px 0 0; }
dialog.account-dialog { border: 1px solid var(--line); padding: 0; max-width: 760px; width: calc(100% - 32px); max-height: calc(100vh - 48px); overflow: auto; }
dialog.account-dialog::backdrop { background: rgba(28, 25, 23, 0.45); }
dialog.account-dialog .form-card { border: 0; max-width: none; }
dialog.account-dialog .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 1; background: white; margin: -18px -20px 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
dialog.account-dialog .dialog-head h2 { margin: 0; }
.check { font-family: "Source Sans 3", sans-serif; font-size: 14px; margin: 6px 0; }
table { width: 100%; border-collapse: collapse; background: white; font-family: "Source Sans 3", sans-serif; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 10px; vertical-align: top; }
pre.log { white-space: pre-wrap; background: #1c1917; color: #faf9f7; padding: 12px; font-family: "IBM Plex Mono", monospace; font-size: 12px; max-height: 320px; overflow: auto; }
.captcha-row { display: flex; gap: 12px; align-items: center; max-width: 640px; }
.captcha-row input { max-width: 220px; }
.captcha-row img { border: 1px solid var(--line); background: white; }
.name-row { display: grid; grid-template-columns: 1fr 1fr 140px; gap: 12px; max-width: 640px; }
.name-row input { max-width: none; }
.js .combo { position: relative; max-width: 640px; }
.js .combo-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.combo-input { width: 100%; max-width: none; }
.combo-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
}
.combo-group {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.combo-option {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 0;
  padding: 6px 10px;
  font: 14px "Source Sans 3", sans-serif;
  color: var(--ink);
  cursor: pointer;
}
.combo-option:hover { background: #f5f5f4; }

.pager { display: flex; gap: 16px; align-items: center; margin-top: 18px; font-family: "Source Sans 3", sans-serif; }
.archive-tools { background: white; border: 1px solid var(--line); padding: 4px 16px 14px; margin: 16px 0; font-family: "Source Sans 3", sans-serif; }
.archive-tools h2 { font-family: "Source Sans 3", sans-serif; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; margin: 14px 0 6px; }
.archive-tools form, .show-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.archive-tools select, .show-form select { width: auto; max-width: 220px; }
.archive-tools label, .show-form label { margin: 0; }
.archive-tools .btn, .show-form .btn { margin: 0; }
.year-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.search-form { max-width: none; padding: 12px 14px 14px; }
.search-form label { margin: 0 0 4px; font-size: 13px; }
.search-main, .search-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.search-tools { margin-top: 10px; }
.search-main .search-term { flex: 1 1 240px; }
.search-main .search-field { flex: 0 1 190px; }
.search-tools > div { flex: 1 1 160px; min-width: 140px; }
.search-tools .search-size { flex: 0 1 96px; min-width: 88px; }
.search-form input, .search-form select { max-width: none; width: 100%; }
.search-form .btn { margin: 0; }
.branch-list { list-style: none; margin: 18px 0 0; padding: 0; background: white; border: 1px solid var(--line); }
.branch-list li { border-bottom: 1px solid var(--line); padding: 14px 18px; }
.branch-list li:last-child { border-bottom: 0; }
.branch-list a { font-family: "Source Sans 3", sans-serif; font-size: 18px; font-weight: 600; }

footer { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-family: "Source Sans 3", sans-serif; font-size: 14px; }

@media (max-width: 800px) {
  h1 { font-size: 32px; }
  .name-row, .account-card { grid-template-columns: 1fr; }
  .stats, .cards, .article-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .masthead-top { flex-direction: column; align-items: flex-start; }
}
