:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #181818;
  background: #f5f5f5;
  line-height: 1.65;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: 32px 16px 64px;
}

main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  text-align: center;
}

main > section {
  margin-top: 40px;
}

h1, h2, h3 { line-height: 1.35; }
h1 { margin: 12px 0; font-size: clamp(1.75rem, 5vw, 2.25rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
p { overflow-wrap: anywhere; }

a { color: #222; text-underline-offset: 3px; }
a:hover { color: #666; }

button, input, textarea {
  font: inherit;
}

button, .navigation a {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid #222;
  border-radius: 6px;
  background: #222;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

button:hover:not(:disabled), .navigation a:hover {
  background: #444;
  color: #fff;
}

button:disabled { opacity: 0.55; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, .paragraph-content:focus-visible {
  outline: 3px solid #777;
  outline-offset: 3px;
}

input, textarea {
  width: min(100%, 620px);
  padding: 10px 12px;
  border: 1px solid #aaa;
  border-radius: 6px;
  background: #fff;
  color: #181818;
}

textarea { resize: vertical; }
label { display: inline-block; margin-bottom: 5px; font-weight: 600; }

.navigation, #documents {
  padding: 0;
  list-style: none;
}

.navigation li, #documents li { margin: 10px 0; }
.navigation a, #documents button { width: min(100%, 420px); }

.paragraph {
  margin: 14px 0;
  border: 1px solid #aaa;
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
}

.paragraph summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
}

.paragraph[open] summary { border-bottom: 1px solid #ddd; }

pre {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.paragraph-content {
  max-height: 240px;
  overflow: auto;
  padding: 16px;
}

.conversation-event {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-align: left;
}

.conversation-event h3 { margin: 0 0 8px; }
#message:not(:empty) { margin-top: 24px; font-weight: 600; }

@media (max-width: 480px) {
  body { padding: 12px; }
  main { padding: 24px 16px; }
}
