/* hub client stylesheet — plain CSS, no build step.
 *
 * Mobile-first: the owner reads digests on a phone. Prose wraps at
 * the viewport (no horizontal scrolling); only <pre> scrolls
 * sideways when a digest carries code. */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: #1a1a1a;
  background: #fdfdfc;
}

header {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
}

main {
  padding: 1rem;
  max-width: 42rem;
  margin: 0 auto;
}

#error {
  padding: 0.6rem 0.8rem;
  border: 1px solid #c0392b;
  border-radius: 4px;
  color: #c0392b;
  background: #fdf3f2;
  margin-bottom: 1rem;
}

#token-gate form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#token-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  padding: 0.5rem 0.9rem;
  border: 1px solid #888;
  border-radius: 4px;
  background: #f3f3f1;
  font-size: 0.95rem;
  cursor: pointer;
}

#card-actions button {
  margin: 1rem 0.3rem 0 0;
}

#card-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #eee;
}

#list a {
  font-size: 1.05rem;
  font-weight: 500;
  color: #106090;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#list a:hover { text-decoration: underline; }

.meta {
  font-size: 0.8rem;
  color: #777;
}

#card-title {
  margin: 0.5rem 0 0.2rem;
  font-size: 1.4rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#card-body {
  margin-top: 1rem;
}

/* Rendered markdown: prose wraps to the viewport; only code blocks
 * scroll sideways. This is the "no horizontal scrolling" acceptance. */
#card-body p,
#card-body li,
#card-body h1, #card-body h2, #card-body h3,
#card-body h4, #card-body h5, #card-body h6 {
  overflow-wrap: anywhere;
  word-break: normal;
}

#card-body pre {
  overflow-x: auto;
  padding: 0.7rem;
  background: #f4f4f2;
  border-radius: 4px;
  font-size: 0.85rem;
}

#card-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #f4f4f2;
  padding: 0.1em 0.25em;
  border-radius: 3px;
}

#card-body pre code {
  background: none;
  padding: 0;
}

#card-body img {
  max-width: 100%;
  height: auto;
}

#card-body table {
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

#card-body th,
#card-body td {
  border: 1px solid #ddd;
  padding: 0.3rem 0.5rem;
}

#card-body blockquote {
  margin: 1rem 0;
  padding: 0.2rem 0.9rem;
  border-left: 3px solid #ccc;
  color: #555;
}

#card-body hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1.5rem 0;
}

#card-body a {
  color: #106090;
  overflow-wrap: anywhere;
}
