:root {
  font:
    16px/1.6 system-ui,
    sans-serif;
  color: #20252c;
  background: #f7f8fa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
#notice {
  max-width: 960px;
  margin: auto;
  padding: 16px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d7dbe0;
}
nav,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
button,
input,
select,
textarea {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid #adb5c0;
  border-radius: 4px;
}
button {
  cursor: pointer;
  background: #fff;
  color: #20252c;
}
button.primary {
  background: #245fc4;
  color: #fff;
  border-color: #245fc4;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.danger {
  color: #a12323;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #4388ed;
  outline-offset: 3px;
}
label {
  display: block;
  margin: 12px 0;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  max-width: 620px;
  background: white;
}
textarea {
  min-height: 90px;
}
.json {
  min-height: 340px;
  font: 14px/1.5 monospace;
  max-width: none;
}
section,
article {
  background: white;
  border: 1px solid #d7dbe0;
  border-radius: 5px;
  padding: 16px;
  margin: 16px 0;
}
h1 {
  font-size: 24px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#notice:empty {
  display: none;
}
#notice {
  color: #9b2121;
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  overflow-wrap: anywhere;
}
.scroll {
  overflow: auto;
}
.muted {
  color: #626a75;
  font-size: 14px;
}
.message {
  border-left: 3px solid #9ba9ba;
}
.message.user {
  border-left-color: #2464c4;
}
.message audio {
  width: 100%;
  max-width: 450px;
}
.exam-image {
  max-width: 100%;
  max-height: 440px;
}
.recorder {
  position: sticky;
  bottom: 0;
  padding: 14px;
  background: #f7f8fa;
  border-top: 1px solid #ddd;
  z-index: 1;
}
.recorder button {
  min-width: 180px;
}
.cue {
  animation: pulse 1.5s infinite;
  border-color: #245fc4;
  box-shadow: 0 0 0 3px #245fc433;
}
.recording {
  background: #af2424 !important;
  color: white !important;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
}
fieldset {
  border: 1px solid #ddd;
  margin: 12px 0;
}
a {
  color: #245fc4;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px #245fc422;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cue {
    animation: none;
  }
}
@media (max-width: 600px) {
  header {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
  td,
  th {
    padding: 6px;
    font-size: 14px;
  }
  .actions button {
    flex: 1;
  }
}
