/* Registrar — workspace, student grades, transcript.
   Inherits the site's body font so it sits inside any customer theme; the
   transcript alone sets its own face (--wr-font, default Times New Roman so
   diacritics such as ẹ ọ ṣ render correctly). */

.wig-reg, .wig-transcript {
  --wr-ink: #1c2733;
  --wr-muted: #5b6673;
  --wr-rule: #d9dde3;
  --wr-soft: #f3f5f7;
  --wr-accent: #2f5d50;
  --wr-pending: #b7791f;
  --wr-error: #a4262c;
  color: var(--wr-ink);
}

.wig-reg { max-width: 100%; }
.wig-reg h2, .wig-reg .wr-h2 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .5rem; }
.wig-reg h3 { font-size: 1.125rem; margin: 0 0 .75rem; }
.wr-meta, .wr-note, .wr-item-meta { color: var(--wr-muted); font-size: .875rem; }
.wr-note { max-width: 70ch; }
.wr-empty { color: var(--wr-muted); padding: 1rem 0; }
.wr-crumb { font-size: .875rem; margin-bottom: .5rem; }
.wr-ws-head { margin-bottom: 1rem; }

.wr-tabs { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-bottom: 1px solid var(--wr-rule); margin-bottom: 1.25rem; }
.wr-tabs a { padding: .5rem 0; text-decoration: none; color: var(--wr-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.wr-tabs a[aria-current="page"] { color: var(--wr-ink); border-bottom-color: var(--wr-accent); font-weight: 600; }
.wr-tabs a:focus-visible, .wig-reg :focus-visible { outline: 2px solid var(--wr-accent); outline-offset: 2px; }

.wr-flash:not(:empty) { padding: .625rem .875rem; margin-bottom: 1rem; border-left: 4px solid var(--wr-accent); background: var(--wr-soft); }
.wr-flash.is-error { border-left-color: var(--wr-error); }
.wr-banner { padding: .75rem 1rem; background: var(--wr-soft); border-left: 4px solid var(--wr-pending); }

.wr-block { margin: 0 0 2.5rem; }
.wr-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem; }

.wr-btn { appearance: none; border: 1px solid var(--wr-accent); background: var(--wr-accent); color: #fff; padding: .5rem 1rem; border-radius: 4px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.wr-btn:disabled { opacity: .45; cursor: not-allowed; }
.wr-btn-quiet { background: transparent; color: var(--wr-accent); }
.wr-btn-strong { padding: .625rem 1.25rem; font-weight: 600; }
.wr-link { appearance: none; border: 0; background: none; padding: 0; color: var(--wr-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.wr-danger { color: var(--wr-error); }

.wr-scroll { overflow-x: auto; max-width: 100%; }
.wr-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.wr-table th, .wr-table td { text-align: left; padding: .5rem .625rem; border-bottom: 1px solid var(--wr-rule); vertical-align: top; }
.wr-table thead th { font-size: .8125rem; color: var(--wr-muted); font-weight: 600; border-bottom-width: 2px; }
.wr-num { text-align: right !important; }

/* The grid is the working surface: sticky names, quiet cells, a dot for unposted. */
.wr-grid-wrap { border: 1px solid var(--wr-rule); border-radius: 4px; max-height: 70vh; }
.wr-grid thead th { position: sticky; top: 0; background: #fff; z-index: 2; vertical-align: bottom; min-width: 7rem; }
.wr-grid .wr-sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 11rem; font-weight: 500; }
.wr-grid thead .wr-sticky { z-index: 3; }
.wr-item { display: block; color: var(--wr-ink); }
.wr-item-meta { display: block; font-weight: 400; }
.wr-cell { position: relative; padding: .25rem !important; }
.wr-cell input { width: 100%; min-width: 4.5rem; box-sizing: border-box; text-align: right; border: 1px solid transparent; background: transparent; padding: .375rem .5rem; font: inherit; border-radius: 3px; }
.wr-cell input:hover { border-color: var(--wr-rule); }
.wr-cell input:focus { border-color: var(--wr-accent); background: #fff; outline: none; }
.wr-cell.is-pending::after { content: ""; position: absolute; top: .45rem; left: .35rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--wr-pending); }
.wr-cell.is-saving input { opacity: .5; }
.wr-cell.is-error input { border-color: var(--wr-error); }
.wr-total { font-weight: 600; white-space: nowrap; }

.wr-items { list-style: none; margin: 0 0 1rem; padding: 0; }
.wr-items li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--wr-rule); }
.wr-items .wr-item-meta { display: inline; }
.wr-row-actions { white-space: nowrap; }

.wr-form { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.wr-form label { display: flex; flex-direction: column; font-size: .875rem; color: var(--wr-muted); gap: .25rem; }
.wr-form input, .wr-form select { font: inherit; color: var(--wr-ink); padding: .375rem .5rem; border: 1px solid var(--wr-rule); border-radius: 4px; }
.wr-form-actions { display: flex; gap: 1rem; align-items: center; width: 100%; }
.wr-cat-form, .wr-final-form { display: block; }
.wr-cats input[name="name"] { width: 100%; min-width: 10rem; }
.wr-cats input[type="number"] { width: 6rem; text-align: right; }
.wr-cat-total.is-error { color: var(--wr-error); font-weight: 600; }
.wr-inc label { display: inline-flex; flex-direction: row; align-items: center; gap: .375rem; }

/* Student grades */
.wr-card { border-top: 3px solid var(--wr-accent); padding: 1rem 0 1.5rem; margin-bottom: 1.5rem; }
.wr-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.wr-card-head h3 { margin: 0; }
.wr-grade-big { text-align: right; }
.wr-letter { display: block; font-size: 2rem; line-height: 1; font-weight: 700; }
.wr-sub { display: block; font-size: .8125rem; color: var(--wr-muted); }
.wr-feedback td { color: var(--wr-muted); font-size: .9rem; border-bottom-style: dashed; }
.wr-feedback p { margin: 0; }
.wr-foot-link { margin-top: 1rem; }
.wr-actions { margin-bottom: 1rem; }

/* Transcript — a document, not an app screen. */
.wig-transcript { position: relative; font-family: var(--wr-font, 'Times New Roman', Times, serif); font-size: 15px; line-height: 1.45; max-width: 60rem; background: #fff; padding: 2.5rem; border: 1px solid var(--wr-rule); overflow: hidden; }
.wig-transcript .wt-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 6rem; font-weight: 700; letter-spacing: .08em; color: rgba(164, 38, 44, .08); pointer-events: none; white-space: nowrap; }
.wt-mast { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 1.5rem; align-items: start; border-bottom: 3px double var(--wr-ink); padding-bottom: 1rem; }
.wt-brand img { max-width: 100%; max-height: 90px; }
.wt-inst-name { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.wt-motto { font-style: italic; margin-top: .25rem; }
.wt-program { font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.wt-issued { font-weight: 700; margin-top: .25rem; }
.wt-inst { font-style: normal; text-align: right; }
.wt-title { text-align: center; font-size: 1.1rem; font-weight: 700; margin: 1.25rem 0 1rem; letter-spacing: .02em; }
.wt-student h3, .wt-notes h3 { font-size: 1rem; margin: 0 0 .5rem; padding: .3rem .6rem; background: var(--wr-soft); border-left: 4px solid var(--wr-accent); }
.wt-student dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .15rem 1.5rem; margin: 0 0 1.5rem; padding: 0 .6rem; }
.wt-student dl div { display: flex; gap: .4rem; }
.wt-student dt::after { content: ":"; }
.wt-student dd { margin: 0; }
.wt-term { break-inside: avoid; margin-bottom: 1.25rem; }
.wt-term table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wt-term caption { text-align: left; font-weight: 700; padding: .3rem .6rem; background: var(--wr-soft); }
.wt-term th, .wt-term td { padding: .25rem .6rem; text-align: left; border-bottom: 1px solid var(--wr-rule); }
.wt-term thead th { font-weight: 700; }
.wt-term tfoot td { border-bottom: 0; padding-top: .35rem; }
.wt-term tfoot span { margin-right: 2.5rem; white-space: nowrap; }
.wt-notes { break-before: page; margin-top: 2rem; }
.wt-notes-body { padding: 0 .6rem; }
.wt-key { display: flex; gap: 2rem; align-items: flex-start; padding: 0 .6rem; margin-top: 1rem; }
.wt-scale { border-collapse: collapse; min-width: 9rem; }
.wt-scale caption { font-weight: 700; text-align: left; }
.wt-scale td { border: 1px solid var(--wr-ink); padding: .1rem .75rem; }
.wt-legend { max-width: 70ch; margin: 0; }
.wt-cert { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin-top: 2.5rem; font-weight: 700; }
.wt-cert span { margin-right: .35rem; }
.wt-line { display: inline-block; width: 14rem; border-bottom: 1px solid var(--wr-ink); height: 1em; vertical-align: bottom; }
.wt-line.wt-short { width: 7rem; }
.wt-footer { font-size: .85rem; margin-top: 1.5rem; text-align: center; }

@media (max-width: 720px) {
  .wt-mast { grid-template-columns: 1fr; }
  .wt-inst { text-align: left; }
  .wt-student dl { grid-template-columns: 1fr; }
  .wig-transcript { padding: 1.25rem; }
  .wr-card-head { flex-direction: column; }
  .wr-grade-big { text-align: left; }
}

@media print {
  body * { visibility: hidden; }
  .wig-transcript, .wig-transcript * { visibility: visible; }
  .wig-transcript { position: absolute; left: 0; top: 0; border: 0; padding: 0; max-width: none; }
  .wr-actions { display: none; }
}

@media (prefers-reduced-motion: reduce) { .wig-reg * { transition: none !important; } }

/* Issued transcripts: verification block, verification page */
.wt-verify { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--wr-rule); break-inside: avoid; }
.wt-verify svg { flex: none; width: 132px; height: 132px; }
.wt-verify p { margin: 0 0 .35rem; }
.wt-small { font-size: .8rem; color: var(--wr-muted); }
.wr-break { word-break: break-all; }
.wr-verify { max-width: 62rem; }
.wr-verify-form input[name="code"] { font-size: 1.1rem; letter-spacing: .04em; min-width: 18rem; text-transform: uppercase; }
.wr-result { margin: 1.25rem 0; padding: 1rem 1.25rem; border-left: 6px solid var(--wr-accent); background: var(--wr-soft); }
.wr-result h2 { margin: 0 0 .35rem; font-size: 1.3rem; }
.wr-result.is-revoked { border-left-color: var(--wr-pending); }
.wr-result.is-bad { border-left-color: var(--wr-error); }
.wr-keys { margin-top: 2rem; font-size: .9rem; }
.wr-issued ul { padding-left: 1.2rem; }
