:root { color: #171717; background: #f5f6f4; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.58; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: #155c46; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, .button { min-height: 44px; border: 1px solid #8b918d; border-radius: 5px; padding: 9px 15px; background: #fff; color: #171717; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.primary, .button.primary { border-color: #155c46; background: #155c46; color: #fff; }
button.danger { border-color: #a33131; background: #a33131; color: #fff; }
.topbar { min-height: 58px; background: #fff; border-bottom: 1px solid #d8dcd9; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.brand { color: #171717; font-weight: 700; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav form { margin: 0; }
.link-button { min-height: 34px; padding: 0; border: 0; color: #155c46; }
.page { width: min(1180px, calc(100% - 32px)); margin: 32px auto 80px; }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: 0; }
h2 { font-size: 21px; letter-spacing: 0; }
h3 { font-size: 17px; letter-spacing: 0; }
.band { border-top: 1px solid #cdd2ce; padding: 22px 0 28px; }
.inline-form, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
input[type="file"], input[type="text"], input[type="password"], select, textarea { border: 1px solid #9da39f; border-radius: 4px; background: #fff; padding: 10px; min-height: 44px; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
.flash { padding: 12px 14px; border-left: 4px solid #467764; background: #eef4f1; margin-bottom: 18px; }
.flash.error { border-color: #a33131; background: #f8eeee; }
.auth-panel { max-width: 420px; margin: 12vh auto; }
.auth-panel form, .danger-band form { display: grid; gap: 12px; }
.auth-panel input { width: 100%; }
.metrics { display: flex; gap: 32px; margin-bottom: 22px; }
.metrics div { display: grid; }
.metrics strong { font-size: 29px; }
.metrics span { color: #656b67; }
.score-page { width: min(1500px, calc(100% - 28px)); }
.score-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.eyebrow { color: #5d645f; margin-bottom: 4px; }
.score-heading h1 { margin-top: 0; }
.reference-drawer { max-width: 620px; }
.reference-drawer > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #155c46; }
.reference-content { max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #d0d5d1; padding: 18px; }
.answer-switch { display: none; gap: 0; position: sticky; top: 60px; z-index: 15; padding: 8px 0; background: #f5f6f4; }
.answer-switch button { flex: 1; border-radius: 0; }
.answer-switch button.active { color: #fff; background: #155c46; border-color: #155c46; }
.answers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.answer-column { min-width: 0; }
.answer-column > h2 { padding-bottom: 10px; border-bottom: 3px solid #155c46; }
.answer-part { border-bottom: 1px solid #cdd2ce; padding: 4px 0 24px; overflow-wrap: anywhere; }
.markdown { font-family: ui-serif, Georgia, "Songti SC", serif; }
.markdown pre, .raw-answer pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #eceeec; padding: 12px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown table { display: block; overflow-x: auto; border-collapse: collapse; }
.markdown th, .markdown td { border: 1px solid #c7ccc8; padding: 6px 9px; }
.raw-answer summary { cursor: pointer; color: #59605b; min-height: 44px; display: flex; align-items: center; }
.judge-band, .rating-form { margin-top: 40px; border-top: 3px solid #171717; padding-top: 22px; }
.judge-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.judge-list article { border: 1px solid #ccd1cd; padding: 14px; background: #fff; border-radius: 5px; }
.judge-list dl { display: grid; grid-template-columns: 1fr auto; }
.judge-list dt, .judge-list dd { margin: 0; padding: 2px 0; }
.rating-row { border: 0; border-bottom: 1px solid #c8cdc9; margin: 0; padding: 20px 0; }
.rating-row legend { font-weight: 700; font-size: 18px; padding: 0; }
.usability { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 12px 0; }
.usability label, .relative-options label { min-height: 44px; display: flex; align-items: center; gap: 8px; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
.relative-options { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px; }
.relative-options label { background: #fff; border: 1px solid #c9ceca; border-radius: 4px; padding: 8px; }
.note-label { display: block; margin-top: 12px; color: #565d58; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(245,246,244,.96); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #cbd0cc; }
.sticky-actions button { width: 100%; }
.skip-form { margin-top: 18px; text-align: center; }
.ranking-band { margin-top: 34px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #d7dbd8; }
small { color: #737a75; }
.status-line { padding: 12px 0; border-bottom: 1px solid #cdd2ce; }
.danger-band { border-color: #a33131; }

@media (max-width: 760px) {
  .topbar { padding: 0 14px; }
  .topbar nav { gap: 10px; }
  .topbar nav a:first-child { display: none; }
  .page, .score-page { width: calc(100% - 24px); margin-top: 18px; }
  h1 { font-size: 25px; }
  .score-heading { display: block; }
  .reference-drawer { width: 100%; }
  .answer-switch { display: flex; }
  .answers { display: block; }
  .has-js .answer-column { display: none; }
  .has-js .answer-column.active { display: block; }
  .relative-options { grid-template-columns: 1fr 1fr; }
  .judge-list { grid-template-columns: 1fr; }
  .metrics { justify-content: space-between; gap: 12px; }
  .metrics strong { font-size: 24px; }
  .inline-form { align-items: stretch; flex-direction: column; }
  button, .button { width: 100%; }
  .topbar .link-button { width: auto; }
}
