:root {
  font:
    16px/1.55 system-ui,
    sans-serif;
  color: #182d38;
  background: #f0f4f6;
  --ink: #182d38;
  --muted: #49606b;
  --accent: #075e61;
  --border: #dbe4e8;
  --soft: #edf4f5;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
:focus-visible {
  outline: 3px solid #237982;
  outline-offset: 3px;
}
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px;
}
main.wrap {
  padding-bottom: 64px;
}
.top {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}
.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  background: #fff;
  padding: 12px;
  z-index: 1;
}
.skip:focus {
  top: 8px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 19px 0 6px;
}
.nav a {
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.nav a[aria-current] {
  background: #dceced;
  color: #08494b;
}
.nav a:hover,
.quiet:hover {
  background: #e3eeef;
}
#sync {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
}
.intro {
  margin: 17px 0 22px;
}
.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  text-transform: uppercase;
  color: #32666a;
  margin: 0 0 4px;
}
h1,
h2,
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2.45rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.058em;
  margin: 0 0 7px;
  font-weight: 850;
}
h2 {
  font-size: 1.37rem;
  line-height: 1.2;
  letter-spacing: -0.024em;
  margin: 0 0 13px;
  font-weight: 800;
}
p {
  margin: 5px 0 12px;
  color: var(--muted);
}
small,
.muted {
  color: var(--muted);
  font-weight: 500;
}
.back {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  font-weight: 750;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 19px;
  margin: 0 0 13px;
  box-shadow: 0 1px 2px #18344007;
  min-width: 0;
}
.sheet {
  padding: 23px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 13px;
}
.metrics .card {
  margin: 0;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 680;
}
.metric strong {
  display: block;
  font-size: clamp(1.34rem, 3.4vw, 2.18rem);
  line-height: 1.18;
  margin: 4px 0;
  font-weight: 850;
  letter-spacing: -0.038em;
  overflow-wrap: anywhere;
}
.metric small {
  font-size: 0.76rem;
  line-height: 1.3;
  display: block;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 15px;
}
.fields:empty {
  display: none;
}
label {
  display: block;
  font-weight: 680;
  margin: 4px 0 11px;
  color: #314853;
  font-size: 0.91rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
input:not([type='checkbox']),
select,
textarea {
  display: block;
  margin-top: 5px;
  min-height: 42px;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  border: 1px solid #b8c8ce;
  border-radius: 9px;
  background: #fff;
}
input[type='file'] {
  font-size: 0.88rem;
  font-weight: 500;
}
input[type='checkbox'] {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  margin: 0;
}
textarea {
  resize: vertical;
}
button,
.button {
  min-height: 43px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 9px;
  padding: 8px 13px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-size: 0.91rem;
  font-weight: 760;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
.secondary {
  background: #e7f0f0;
  color: #14484b;
  border-color: #cfe0e0;
}
.quiet {
  background: transparent;
  color: #335761;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
}
.actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.note {
  font-size: 0.83rem;
  margin: 5px 0 8px;
}
.attention {
  color: #735417;
}
.alert,
.conflict {
  background: #fff6e5;
  border: 1px solid #e9d5aa;
  color: #674719;
  padding: 9px 13px;
  border-radius: 9px;
  margin: 8px 0 12px;
}
.conflict {
  padding: 14px;
}
.conflict p {
  color: inherit;
  margin: 0 0 5px;
}
.notice-ok {
  background: #e9f3ee;
  border-color: #d4e5dc;
  color: #21563d;
}
.jump {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--accent);
}
.jump:hover {
  border-color: #67989b;
}
.jump small {
  display: block;
  font-size: 0.83rem;
}
summary {
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 760;
}
.card > details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
details[open] > summary {
  margin-bottom: 10px;
}
fieldset {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  min-width: 0;
}
legend {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 5px;
}
.checks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.checks label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  min-height: 36px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.78rem;
}
.checks label:has(:checked) {
  background: #e2efef;
  border-color: #a8c7c7;
}
.checks input {
  flex: none;
}
.grade-inputs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.upload {
  margin-top: 10px;
}
.upload img {
  display: block;
  max-width: 210px;
  max-height: 140px;
  object-fit: contain;
  border-radius: 8px;
  background: #f1f5f6;
}
.search {
  max-width: 420px;
}
.saved-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  align-items: center;
}
.saved-row label {
  margin: 0;
  display: flex;
  align-items: center;
  padding: 8px;
}
.saved-row a {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.saved-row a:hover strong {
  text-decoration: underline;
}
.saved-row a span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.saved-row img {
  width: 47px;
  height: 47px;
  object-fit: cover;
  background: var(--soft);
  border-radius: 8px;
}
.saved-row small {
  display: block;
  font-size: 0.77rem;
}
.row-values {
  text-align: right;
  overflow-wrap: anywhere;
}
.row-values strong {
  display: block;
  color: #11494c;
}
.danger {
  color: #8b282b;
}
.login {
  max-width: 440px;
  margin: 38px auto;
}
@media (max-width: 620px) {
  .wrap {
    padding: 0 14px;
  }
  .top-inner {
    min-height: 51px;
  }
  .nav {
    padding-top: 12px;
    gap: 3px;
  }
  .nav a {
    padding: 7px 10px;
    font-size: 0.89rem;
  }
  #sync {
    flex-basis: 100%;
    margin: 3px 0 0 10px;
  }
  .intro {
    margin: 12px 0 13px;
  }
  .intro p:not(.eyebrow) {
    font-size: 0.88rem;
  }
  .card,
  .sheet {
    padding: 13px;
    border-radius: 12px;
  }
  .metrics {
    gap: 6px;
  }
  .metric.card {
    padding: 8px;
  }
  .metric span {
    font-size: 0.72rem;
    line-height: 1.24;
  }
  .metric small {
    font-size: 0.64rem;
  }
  .metric strong {
    font-size: 1.17rem;
  }
  .fields {
    gap: 0 9px;
  }
  .fields label {
    font-size: 0.79rem;
  }
  .checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .checks label {
    min-height: 39px;
  }
  .grade-inputs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .saved-row {
    gap: 6px;
  }
  .saved-row img {
    width: 34px;
    height: 34px;
  }
  .saved-row a {
    gap: 5px;
  }
  .saved-row a strong {
    font-size: 0.9rem;
  }
  .row-values {
    font-size: 0.82rem;
  }
  .saved-row label {
    padding: 5px;
  }
  .actions {
    gap: 5px;
  }
  h2 {
    font-size: 1.21rem;
  }
}
@media (max-width: 330px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fields:not(.grade-inputs) {
    grid-template-columns: 1fr;
  }
}
