:root {
  color-scheme: light;
  font: 16px / 1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172f2b;
  background: #e9f1ed;
  --paper: #fcfefa;
  --surface: #edf5ef;
  --ink: #172f2b;
  --muted: #4b625b;
  --line: #d3e2d9;
  --accent: #14594c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  width: min(100%, 700px);
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper);
}
.topbar {
  padding: 14px clamp(18px, 5vw, 36px);
  border-bottom: 1px solid var(--line);
}
.topbar a {
  text-decoration: none;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 750;
}
section { padding: clamp(24px, 6vw, 42px) clamp(18px, 5vw, 36px); }
h1, h2, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 6vw, 2.45rem); line-height: 1.12; }
h2 { font-size: 1.3rem; line-height: 1.22; }
a { color: var(--accent); }
button, textarea { font: inherit; }
button {
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .58; cursor: default; }
.secondary { color: var(--accent); background: var(--surface); border-color: var(--line); }
.back { margin: -7px 0 18px; padding-left: 0; color: var(--accent); background: transparent; }
:where(a, button, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.notice, .report-date, .quota { color: var(--muted); font-size: .92rem; }
.notice { margin-top: 12px; }
.report-date { margin-bottom: 5px; }
.reports, .turns { margin: 0; padding: 0; list-style: none; }
.reports { display: grid; gap: 10px; margin-top: 24px; }
.report-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}
.report-link:hover { border-color: var(--accent); }
.report-link strong { display: block; overflow-wrap: anywhere; line-height: 1.3; }
.report-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 9px;
  color: var(--accent);
  background: var(--surface);
}
.chevron { color: var(--accent); font-size: 1.35rem; }
#more, #refresh-thread { margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pdf-panel { margin-top: 16px; }
.pdf-panel a { display: inline-flex; min-height: 44px; align-items: center; }
.pdf-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pdf-view { max-height: 70vh; max-height: 70dvh; overflow: auto; overscroll-behavior: contain; }
.pdf-view canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.discussion {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.turns { display: grid; gap: 13px; margin-top: 15px; }
.turn { display: grid; gap: 5px; }
.message {
  width: fit-content;
  max-width: 95%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  white-space: pre-wrap;
}
.you { justify-self: end; background: var(--surface); }
.message b { display: block; font-size: .78rem; color: var(--muted); }
.quota { margin-top: 15px; }
form { display: grid; gap: 8px; margin-top: 10px; }
textarea {
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  background: white;
  color: var(--ink);
}
form button { justify-self: end; }
