/* EZGrader — grader widget, grading chart, print stylesheet. */

.ez {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.3rem 1.25rem 1.1rem;
  margin: 1.4rem 0 1.8rem;
}

.ez-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}

.ez-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-dim);
  flex: 1 1 9rem;
  min-width: 0;
  max-width: 100%;
}
.ez-opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.ez input[type="text"],
.ez input[type="number"],
.ez select {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ez select { cursor: pointer; }
.ez input[name="total"],
.ez input[name="wrong"] { text-align: center; }
.ez input:focus,
.ez select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.ez-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 0.8rem;
}
.ez-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--text);
  cursor: pointer;
}
.ez-check input { accent-color: var(--primary); width: 1.05rem; height: 1.05rem; }

/* headline result */
.ez-out {
  display: block;
  margin-top: 1.1rem;
  min-height: 1.6rem;
}
.ez-scoreline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.ez-scoreline strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.ez-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.92rem;
  color: var(--text-dim);
  font-weight: 550;
}
.ez-hint { font-size: 0.95rem; font-weight: 500; color: var(--text-dim); }
.ez-error { font-size: 0.95rem; font-weight: 600; color: #b91c1c; }

/* letter-grade chips */
.ez-grade {
  display: inline-block;
  min-width: 2.1rem;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  color: #fff;
  background: var(--text-dim);
}
.ez-scoreline .ez-grade { font-size: 1.4rem; padding: 0.2rem 0.8rem; }
.g-A { background: #15803d; }
.g-B { background: #0f766e; }
.g-C { background: #b45309; }
.g-D { background: #c2410c; }
.g-F { background: #b91c1c; }

/* chart table */
.ez-chart { margin-top: 1rem; }
.ez-scroll {
  max-height: 26rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.ez-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.ez-table th,
.ez-table td {
  padding: 0.3rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.ez-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2, var(--surface));
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}
.ez-table td:first-child { font-weight: 700; }
.ez-table .ez-grade { font-size: 0.82rem; padding: 0.05rem 0.45rem; min-width: 1.9rem; }
.ez-hit td { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ez-cap {
  margin: 0.55rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.ez-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.ez-actions button {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--primary);
  background: var(--bg);
  border: 1.5px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  cursor: pointer;
}
.ez-actions button:hover { border-color: var(--primary); }

.ez-print-only { display: none; }

/* scale summary cards on the letter-grades page are plain .prose tables. */

@media (max-width: 480px) {
  .ez { padding: 1rem 0.9rem; }
  .ez-scoreline strong { font-size: 1.7rem; }
}

@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .page-head .desc,
  .ez-controls,
  .ez-out,
  .ez-actions,
  .ad-slot,
  ins.adsbygoogle {
    display: none !important;
  }
  .ez {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
  }
  .ez-scroll {
    max-height: none;
    overflow: visible;
    border: none;
  }
  .ez-print-only {
    display: block;
    font-weight: 700;
    margin: 0 0 0.6rem;
  }
  .ez-table { font-size: 0.8rem; }
  .ez-table thead th { position: static; }
  .ez-hit td { background: none; }
}
