:root {
  --ink: #171717;
  --ink-60: rgba(23, 23, 23, .6);
  --ink-40: rgba(23, 23, 23, .4);
  --ground: #fff;
  --wash: #f3f3f2;
  --pill: #ececec;
  --hover: #f5f5f5;
  --hair: rgba(23, 23, 23, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.wordmark:hover { text-decoration: none; }

.bar nav { display: flex; gap: 8px; }
.bar nav a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pill);
  font-size: 13.5px;
  font-weight: 500;
}
.bar nav a:hover { background: var(--hover); text-decoration: none; }

main { max-width: 760px; margin: 0 auto; padding: 20px 16px 8px; }

/* post form — the front door */
.postbox {
  background: var(--wash);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}
.postform { display: flex; flex-direction: column; gap: 8px; }
.postform input[type="text"], .postform input[type="url"] {
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.postform .row { display: flex; gap: 8px; }
.postform .row input { flex: 1; }
.postform button, .commentbox button, .reply form button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.error { color: #b3261e; margin: 0 0 8px; font-size: 14px; }

/* the list */
.list { display: flex; flex-direction: column; }
.item {
  display: flex;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hair);
}
.vote { display: flex; flex-direction: column; align-items: center; min-width: 26px; }
.vote form { margin: 0; }
.arrow {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 3px 4px;
  color: var(--ink-40);
}
.arrow.on { color: var(--ink); }
.count { font-size: 12.5px; color: var(--ink-60); font-weight: 500; }
.item .body { flex: 1; min-width: 0; }
.titleline { margin: 0; font-size: 15px; }
.num { color: var(--ink-40); }
.title { font-weight: 500; }
.domain { color: var(--ink-40); font-size: 13px; }
.meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-60); }
.meta a { color: var(--ink-60); }
.inline { display: inline; margin: 0; }
.textbtn {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink-60);
}
.textbtn:hover { text-decoration: underline; }
.textbtn.on { color: var(--ink); font-weight: 500; }

.ptitle { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 4px 0 12px; }
.empty { color: var(--ink-60); padding: 16px 4px; }

/* comments */
.commentbox {
  background: var(--wash);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0 8px;
}
.commentbox form, .reply form { display: flex; flex-direction: column; gap: 8px; }
.commentbox input, .commentbox textarea, .reply input, .reply textarea {
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  resize: vertical;
}
.commentbox button, .reply form button { align-self: flex-start; padding: 8px 18px; }

.comments { margin-top: 8px; }
.comment {
  margin-left: calc(var(--d) * 18px);
  padding: 10px 0 2px;
  border-bottom: 1px solid var(--hair);
}
.cmeta { margin: 0; font-size: 13px; color: var(--ink-60); }
.ctext { margin: 3px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply summary {
  font-size: 13px; color: var(--ink-60); cursor: pointer; list-style: none;
  margin-bottom: 6px;
}
.reply summary:hover { text-decoration: underline; }
.reply form { margin: 4px 0 10px; }

.foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 32px;
  border-top: 1px solid var(--hair);
  margin-top: 16px;
}
.foot p { margin: 0; font-size: 13px; color: var(--ink-60); max-width: 56ch; }

input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
