/* ABOUTME: Styles the conversation interface with readable text and responsive controls. */
/* ABOUTME: Keeps identity, expiry, and message actions visible across screen sizes. */
:root {
  color-scheme: light;
  --ink: #172d2a;
  --muted: #546962;
  --line: #d4dfd8;
  --paper: #f3f5ee;
  --accent: #185546;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header,
footer {
  max-width: 1060px;
  margin: auto;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
header {
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--accent);
}
.brand {
  text-decoration: none;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.account {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
}
.account span {
  max-width: 250px;
  overflow-wrap: anywhere;
}
main {
  max-width: 900px;
  padding: 45px 30px;
  margin: auto;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--accent);
}
h1 {
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 650;
  margin: 20px 0;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 0 0 15px;
}
.intro {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 30px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  margin: 20px 0;
}
.panel p {
  color: var(--muted);
  line-height: 1.5;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
}
.pill {
  background: #eef4ef;
  padding: 5px 9px;
  border-radius: 15px;
  font-size: 11px;
  white-space: nowrap;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 14px 0 8px;
}
.row {
  display: flex;
  gap: 10px;
}
input,
textarea,
select {
  font: inherit;
  color: var(--ink);
  background: #fafbf8;
  border: 1px solid #bbc9be;
  border-radius: 6px;
  padding: 12px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.5;
  font:
    14px/1.6 ui-monospace,
    monospace;
}
select {
  max-width: 200px;
  margin-right: 15px;
}
button,
.primary {
  display: inline-block;
  font:
    600 13px ui-sans-serif,
    system-ui,
    sans-serif;
  cursor: pointer;
  border: 1px solid #b6c8bb;
  border-radius: 6px;
  padding: 12px 17px;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
button:hover,
.primary:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.quiet {
  padding: 7px 11px;
  background: transparent;
}
.danger {
  color: #8b3930;
  border-color: #ddc9c6;
}
.privacy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 26px;
}
.privacy strong {
  color: var(--ink);
}
code {
  font:
    12px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
#verified {
  padding-top: 10px;
}
#status {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.5;
  min-height: 21px;
}
#status.error {
  color: #8b3930;
}
.room-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  align-items: start;
}
.room-header h2 {
  margin-top: 9px;
}
.room-header p {
  font-size: 12px;
  margin: 6px 0;
}
.share {
  min-width: 0;
}
.share label {
  margin-top: 0;
}
#qr {
  background: white;
  padding: 5px;
  justify-self: end;
  image-rendering: pixelated;
}
.members {
  grid-column: 1/-1;
  font-size: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
#messages {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
#messages article {
  border: 1px solid var(--line);
  border-left: 3px solid #a0b8ac;
  background: #fff;
  padding: 18px;
  border-radius: 8px;
}
#messages article.mine {
  border-left-color: var(--accent);
}
.message-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
.message-meta time {
  margin-left: auto;
}
.message-meta button {
  padding: 4px 8px;
  font-size: 11px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.6 ui-monospace,
    monospace;
  margin-bottom: 0;
}
.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
.compose-footer span {
  color: var(--muted);
  font-size: 11px;
}
footer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
footer span {
  margin-right: auto;
}
:focus-visible {
  outline: 3px solid #a2c5b8;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  header,
  footer {
    padding: 20px;
  }
  main {
    padding: 30px 20px;
  }
  .panel {
    padding: 19px;
  }
  .row {
    flex-direction: column;
  }
  .room-header {
    grid-template-columns: 1fr;
  }
  .share,
  .members {
    grid-column: 1;
  }
  #qr {
    justify-self: start;
  }
  .compose-footer {
    align-items: stretch;
    flex-direction: column;
  }
  #create-form button {
    margin-top: 12px;
  }
  header .account span {
    max-width: 140px;
    font-size: 11px;
  }
}
