:root {
  color-scheme: light;
  --navy: #101f38;
  --blue: #254f82;
  --sky: #b6d5ed;
  --paper: #f7f9fc;
  --ink: #172b47;
  --muted: #52677d;
  --line: #d7e1ec;
  --white: #fff;
  --green: #245746;
  --green-bg: #e6f2ec;
  --gold: #795018;
  --gold-bg: #fcf0d8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
a {
  color: var(--blue);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #467bad;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 9;
  color: var(--navy);
  background: white;
  padding: 0.65rem;
}
.skip:focus {
  top: 0.5rem;
}
[hidden] {
  display: none !important;
}
body[data-session="guest"] .signed,
body[data-session="signed"] .guest {
  display: none;
}
.top {
  background: var(--navy);
  color: white;
}
.top-inner,
footer {
  max-width: 1390px;
  width: 100%;
  margin: auto;
  padding: 1.15rem 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
}
.top-inner {
  min-height: 84px;
}
.top a {
  text-decoration: none;
  color: inherit;
}
.brand {
  font:
    2.75rem/0.76 Georgia,
    serif;
  letter-spacing: -0.15rem;
  display: inline-block;
}
.brand span {
  display: block;
  font:
    600 0.56rem/1.3 Arial,
    sans-serif;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  margin-top: 0.65rem;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.9rem;
}
.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.outline-header {
  border: 1px solid #8ba1bd;
  padding: 0 1rem;
  border-radius: 3px;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
  padding-block: 1.5rem;
}
.foot-brand {
  font-family: Georgia, serif;
  color: var(--blue);
  font-size: 1rem;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
}
h1 {
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
h1 em {
  font-family: Georgia, serif;
  color: var(--blue);
  font-weight: 400;
}
h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.landing {
  max-width: 1180px;
  min-height: clamp(520px, 75vh, 760px);
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.9fr;
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
  padding: 3rem 6%;
}
.landing h1 {
  font-size: clamp(3.3rem, 6.2vw, 6rem);
  max-width: 650px;
}
.intro {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
  max-width: 32rem;
  margin: 1.25rem 0 2rem;
}
.access-note {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
  max-width: 26rem;
  margin: 1rem 0 0;
}
.portrait {
  position: relative;
  isolation: isolate;
  padding: 0 0.8rem 1rem 0;
}
.portrait:before {
  position: absolute;
  content: "";
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 1rem;
  top: 1.2rem;
  border: 1px solid #99b2ca;
  border-radius: 42% 42% 4px 4px;
}
.portrait img {
  display: block;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 45% 45% 3px 3px;
}
.portrait figcaption {
  position: absolute;
  left: -0.7rem;
  bottom: 1.7rem;
  background: var(--navy);
  color: white;
  padding: 0.75rem 1rem;
  font:
    italic 1.05rem Georgia,
    serif;
}
.panel {
  max-width: 1150px;
  margin: auto;
  padding: clamp(1.4rem, 4vw, 3.5rem) 5% 4rem;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.head p,
.sub,
.hint,
.empty,
.meta {
  color: var(--muted);
  line-height: 1.55;
}
.head p {
  margin-top: 0.55rem;
}
.head .kicker {
  margin: 0 0 0.55rem;
}
.button,
.tabs button,
.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 4px;
  line-height: 1.3;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
}
.primary {
  background: var(--navy);
  color: white;
}
.primary:hover {
  background: var(--blue);
}
.secondary {
  background: white;
  color: var(--blue);
  border-color: #aabdd1;
}
.secondary:hover,
.tabs button:hover {
  background: #e8f1f8;
}
.text-button {
  background: transparent;
  color: var(--blue);
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.45rem 0.2rem;
}
.tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.7rem 0.85rem;
  border-bottom: 3px solid transparent;
}
.tabs button[aria-current="page"] {
  color: var(--navy);
  border-color: var(--blue);
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.05rem, 3.5vw, 2rem);
  margin: 0 0 1rem;
}
.card h2,
.card h3 {
  margin-bottom: 0.65rem;
}
.form {
  max-width: 52rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  min-width: 0;
}
.field > span,
.legend {
  font-size: 0.94rem;
  font-weight: 600;
}
.field input,
.field select,
.field textarea,
.readbox {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid #abbccc;
  border-radius: 4px;
  padding: 0.72rem 0.78rem;
  min-height: 46px;
}
.field input[readonly] {
  background: #eff3f7;
  color: var(--muted);
}
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='m3 4 5 5 5-5' fill='none' stroke='%23254f82' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}
.hint,
.meta {
  font-size: 0.88rem;
}
.empty {
  padding: 0.7rem 0;
}
.actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.message,
.inline-error {
  margin-bottom: 1rem;
  border-left: 4px solid #5c8d79;
  background: var(--green-bg);
  color: #1b4235;
  padding: 0.9rem 1.1rem;
  line-height: 1.5;
}
.message.error,
.inline-error {
  border-color: #af5648;
  background: #fcf0ec;
  color: #7b352c;
}
.upload {
  padding: 1.2rem;
  background: #eff5fa;
  border: 1px dashed #a3bbd2;
  border-radius: 6px;
  margin: 0.25rem 0 1rem;
}
.upload h3 {
  margin: 0 0 0.3rem;
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0;
}
.file-list li,
.record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.file-list li:last-child,
.record:last-child {
  border: 0;
}
.record .record-info {
  flex: 1;
  min-width: 0;
}
.record h3 {
  margin: 0.1rem 0;
}
.filename,
.record h3,
.readbox {
  overflow-wrap: anywhere;
}
.pill {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  border-radius: 100px;
  display: inline-block;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}
.pill.pending {
  background: var(--gold-bg);
  color: var(--gold);
}
.pill.corrected {
  background: var(--green-bg);
  color: var(--green);
}
.pill.to-send {
  background: #e8eff7;
  color: var(--blue);
}
.pill.paper {
  background: #eaeef3;
  color: #485e74;
}
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.summary span {
  background: #e8eff7;
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
}
.summary strong {
  color: var(--blue);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: end;
}
.filters .field {
  flex: 1;
  min-width: 9rem;
}
.grade {
  font:
    2.2rem/1.1 Georgia,
    serif;
  color: var(--blue);
  margin: 0.8rem 0;
}
.grade small {
  font:
    1rem Arial,
    sans-serif;
  color: var(--muted);
}
.feedback {
  white-space: pre-wrap;
  line-height: 1.65;
}
.group-title {
  margin: 1.5rem 0 0.4rem;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  gap: 0.65rem;
}
.attachment {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.75rem;
  min-width: 0;
}
.attachment img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #f1f5f9;
}
.attachment a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  overflow-wrap: anywhere;
}
.attachment .links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 44px;
}
.check input {
  height: 19px;
  width: 19px;
}
.separator {
  margin: 1.3rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.batch-row {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.mono {
  font-family: monospace;
}
.loading {
  padding: 2rem 0;
  color: var(--muted);
}
.danger-text {
  color: #934638;
}
.status-line {
  margin: 0.65rem 0;
  color: var(--blue);
}
.cards-title {
  margin: 1.4rem 0 0.7rem;
}
@media (max-width: 690px) {
  .top-inner,
  footer {
    padding: 1rem 5%;
  }
  .top-inner {
    min-height: 73px;
  }
  .brand {
    font-size: 2.4rem;
  }
  .landing {
    grid-template-columns: 1fr;
    gap: 1.7rem;
    padding: 2.5rem 6%;
  }
  .portrait {
    max-width: 360px;
    width: 90%;
    justify-self: center;
  }
  .portrait img {
    max-height: 290px;
    object-position: center 30%;
  }
  .panel {
    padding-left: 4.5%;
    padding-right: 4.5%;
  }
  .head {
    align-items: start;
    flex-direction: column;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .record {
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
  }
  .record .record-info {
    flex-basis: 62%;
  }
  .record .button {
    min-height: 40px;
    padding: 0.5rem 0.75rem;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    padding: 0.55rem 0.65rem;
    font-size: 0.88rem;
  }
  .filters {
    gap: 0.1rem 0.7rem;
  }
  .filters .field {
    min-width: 42%;
  }
  .intro {
    font-size: 1.05rem;
    margin-bottom: 1.3rem;
  }
  .upload .actions {
    gap: 0.4rem;
  }
  .upload .button {
    padding: 0.65rem 0.75rem;
  }
  .top nav {
    gap: 0.65rem;
  }
  .file-list li {
    gap: 0.5rem;
  }
  .file-list .text-button {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
