@import url('assets/community-fonts/fonts.css');
:root {
  font-family:
    'MiSans Community',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  color: #192b46;
  background: #f4f7fc;
  font-synthesis: none;
  font-weight: 400;
  font-language-override: 'ZHS';
  line-height: 1.65;
  --blue: #155cde;
  --muted: #596b83;
  --line: #dce4f0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #80aefa;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.feedback-number {
  color: var(--muted);
  font-weight: 400;
}
.feedback-details summary {
  cursor: pointer;
  color: var(--blue);
  padding: 8px 0;
}
.feedback-details .when-open,
.feedback-details[open] .when-closed {
  display: none;
}
.feedback-details[open] .when-open {
  display: inline;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: #ffffffeb;
  padding: 16px max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
}
.topbar nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.topbar nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
.topbar nav a[aria-current] {
  color: var(--blue);
  font-weight: 600;
}
.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.application-shell {
  max-width: 900px;
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin: 0 0 12px;
}
h1,
h2,
h3,
strong,
b {
  font-weight: 600;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
h2 {
  font-size: 22px;
  margin: 0 0 8px;
  line-height: 1.4;
}
h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
p {
  margin: 0 0 14px;
}
.lead {
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 30px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 5px 20px #203c6505;
}
.aside {
  color: var(--muted);
  font-size: 14px;
}
.aside h3 {
  color: #263c5a;
}
.aside p {
  margin-bottom: 24px;
}
.number {
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  background: #edf3ff;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 14px;
  margin-right: 8px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
}
.section-intro {
  margin-bottom: 24px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
  min-width: 0;
}
.fields .field {
  margin: 0;
}
.wide {
  grid-column: 1/-1;
}
label,
legend {
  font-size: 14px;
  font-weight: 400;
}
input:not([type='radio']):not([type='checkbox']),
textarea,
select {
  width: 100%;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  padding: 11px 12px;
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
input::placeholder,
textarea::placeholder {
  color: #7a899c;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  margin-bottom: 10px;
}
.choices {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f7f9fc;
  border: 1px solid var(--line);
  padding: 13px 16px;
  border-radius: 11px;
  cursor: pointer;
  flex: 1;
  min-width: 160px;
}
.choice:has(input:checked) {
  border-color: var(--blue);
  background: #edf4ff;
}
.choice input {
  margin-top: 6px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.quiz-domain {
  margin: 28px 0 12px;
  color: var(--blue);
}
.question {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.question legend {
  padding-top: 20px;
}
.question .choices {
  flex-direction: column;
  gap: 8px;
}
.question .choice {
  padding: 9px 12px;
  font-weight: 400;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0;
}
.check input {
  margin-top: 5px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
button,
.button {
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  background: #edf2fa;
  color: #244264;
}
button.primary,
.button.primary {
  background: var(--blue);
  color: #fff;
}
button:hover,
.button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.message {
  font-size: 14px;
  white-space: pre-wrap;
  color: #174ca3;
  margin: 12px 0;
}
.message.error {
  color: #b32331;
}
.success {
  border-color: #b7ddc8;
  background: #f2faf6;
}
.success h2 {
  color: #21633b;
}
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 145px 155px auto;
  gap: 12px;
  margin: 20px 0;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.filters button {
  align-self: end;
}
.list {
  display: grid;
  gap: 12px;
}
.feedback-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  overflow-wrap: anywhere;
}
.feedback-card h3 {
  margin: 10px 0 8px;
}
.feedback-card p {
  white-space: pre-wrap;
  font-size: 14px;
  color: var(--muted);
}
.badge {
  font-size: 12px;
  display: inline-flex;
  background: #edf3ff;
  color: #2855a0;
  border-radius: 6px;
  padding: 3px 8px;
  margin-right: 7px;
}
.badge.bug {
  background: #fff0eb;
  color: #a24328;
}
.meta {
  font-size: 12px;
  color: var(--muted);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.pager span {
  font-size: 13px;
  color: var(--muted);
}
.empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.reply {
  border-left: 3px solid #91b4ec;
  padding: 8px 14px;
  margin-top: 14px;
  background: #f5f8ff;
}
.footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 36px;
}
.admin-shell {
  max-width: 1420px;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.record-button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.record-button[aria-pressed='true'] {
  border-color: var(--blue);
  background: #edf4ff;
}
.record-button strong {
  display: block;
  margin: 6px 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  font-size: 14px;
  margin: 0;
}
.detail-grid dt,
.detail-grid dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-grid dt {
  color: var(--muted);
}
.score {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.score span {
  padding: 12px;
  background: #edf4ff;
  border-radius: 10px;
}
.answer {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.answer p {
  margin: 4px 0;
}
.answer.wrong {
  color: #ab3541;
}
.admin-form {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.admin-form textarea {
  min-height: 100px;
}
.admin-intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.admin-filters {
  grid-template-columns: 1fr 140px;
}
.admin-filters .search {
  grid-column: 1/-1;
}
.notice {
  padding: 12px 16px;
  background: #f2f6fd;
  border-radius: 10px;
  font-size: 13px;
  color: #415775;
  margin: 18px 0;
}
@media (max-width: 850px) {
  .layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .aside {
    display: none;
  }
  .shell {
    padding-top: 32px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters .search {
    grid-column: 1/-1;
  }
  .topbar {
    padding: 14px 20px;
  }
  .admin-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-layout > .panel {
    margin-bottom: 0;
  }
}
@media (max-width: 520px) {
  .shell {
    padding: 28px 16px 40px;
  }
  .panel {
    padding: 20px;
    border-radius: 16px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .topbar nav {
    gap: 18px;
  }
  .choices {
    flex-direction: column;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid dt {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .detail-grid dd {
    padding-top: 3px;
  }
  .pager {
    flex-wrap: wrap;
  }
  .actions > button {
    width: 100%;
  }
  .filters {
    gap: 10px;
  }
  .filters button {
    grid-column: 1/-1;
  }
  .admin-filters {
    grid-template-columns: 1fr;
  }
  .admin-filters .search {
    grid-column: auto;
  }
}

.score-title {
  margin-top: 24px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.upload-box {
  min-width: 0;
  padding: 22px;
  border: 1px dashed #b8c9e5;
  border-radius: 16px;
  background: #f8faff;
}
.upload-box h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  border-color: #b7c9eb;
  background: #edf3ff;
  color: #325fab;
  font-weight: 600;
}
.upload-button:hover {
  background: #e1ebff;
  border-color: #7198d8;
}
.upload-list {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}
.upload-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #dfe7f4;
  font-size: 13px;
}
.upload-list li span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.remove-upload {
  padding: 5px 9px;
  font-size: 12px;
  flex-shrink: 0;
}
#upload-total {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}
