/* Educational transcript-verification demo: shared styles */
:root {
  --header-bg: #1f3a7a;
  --header-bg-2: #2d4f9a;
  --accent: #2b4d9b;
  --ink: #111;
  --muted: #666;
  --rule: #999;
  --page-bg: #fff;
  --demo-bg: #fff4d6;
  --demo-border: #d99a00;
  --demo-ink: #6b4a00;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  /* font-family: Arial, Helvetica, sans-serif; */
  font-size: 16px;
}

/* Header */
 .site-header {
    background: linear-gradient(
        to bottom,
        #1c467c 0%,
        #14366b 45%,
        #0e2a54 100%
    );
    color: white;
    font-family: "Times New Roman", serif;
    font-variant: small-caps;
    display: flex;
    align-items: center;
    font-size: large;
    font-weight: normal;
    padding: 4px 12px;
    min-height: 100px;
    gap: 0;
}
.site-header h1 {
  font-family: "Times New Roman", Times, serif;
    font-size: 35px;
    font-weight: 400;
    font-variant: small-caps;
    letter-spacing: 1px;
    color: white;
    text-align: left;
    padding: 0px 10px;
    margin-left: 0px;
}
.site-header img {
  width: 120px;
  height: 180px;
  height: auto;
  margin-left: 10px;
}

/* Layout */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 16px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.content { margin: 0 auto; flex: 1 1 auto; min-width: 0; }
/* Centre the transcript-verification search section */
.layout {
  justify-content: center;
}

.layout .content {
  flex: 0 1 560px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.layout .section-title {
  text-align: center;
}

.layout .search-form {
  margin: 0 auto;
}

.layout .demo-hint {
  margin-left: auto;
  margin-right: auto;
}

.layout .form-message {
  text-align: center;
}
/* Transcript page: use the full page width */
.layout:has(.document) {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 16px 20px 40px;
}

.layout:has(.document) .content {
  width: 100%;
  max-width: none;
  flex: 1 1 100%;
  margin: 0;
}

.layout:has(.document) .document {
  width: 100%;
}

/* Search page */
.section-title {
  color: var(--accent);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-variant: small-caps;
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: 0.02em;
}
.search-form {
  width: 100%;
  border-collapse: collapse;
  max-width: 560px;
}
.search-form td {
  border-bottom: 1px solid #ddd;
  padding: 7px 6px;
  font-size: 11px;
  vertical-align: middle;
}
.search-form td:first-child { text-align: right; color: #333; width: 42%; }
.search-form input[type="text"] {
  width: 100%;
  max-width: 220px;
  border: 0;
  border-bottom: 1px solid #333;
  padding: 3px 2px;
  font: inherit;
  outline: none;
  background: transparent;
}
.search-form button {
  font: inherit;
  font-size: 11px;
  padding: 2px 16px;
  border: 1px solid #777;
  background: #eee;
  cursor: pointer;
}
.search-form button:hover { background: #ddd; }
.form-message { font-size: 11px; color: #a00; margin: 6px 0 0; min-height: 1.2em; }
.demo-hint {
  margin-top: 28px;
  font-size: 11px;
  color: var(--muted);
  border: 1px dashed #bbb;
  padding: 10px 12px;
  max-width: 560px;
}
.demo-hint code { background: #f3f3f3; padding: 1px 4px; }
.footer-note {
  text-align: center;
  color: #888;
  font-size: 9px;
  margin-top: 120px;
}

/* Transcript page */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  border: 1px solid var(--accent);
  padding: 4px 12px;
  background: #fff;
}
.back-link:hover { background: #eef2fa; }

.document {
  position: relative;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 22px 26px 30px;
  font-family: "Arial", Times, serif;
  font-size: 11.5px;
  line-height: 1.3;
  overflow: hidden;
}
.document .watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.document .watermark span {
  position: absolute;
  color: rgba(0,0,0,0.07);
  font-size: 13px;
  /* font-style: italic; */
  white-space: nowrap;
  transform: rotate(-30deg);
}
.doc-serial { text-align: right; font-size: 10px; margin-bottom: 4px; }
.doc-title { text-align: center; margin: 0; font-size: 13px; font-weight: bold; }
.doc-subtitle { text-align: center; margin: 2px 0 14px; font-size: 13px; font-weight: bold; }

.identity {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 10.5px;
}
.student-photo {
  flex: 0 0 74px;
  width: 90px;
  height: 100px;
  border: 1px solid #99999900;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f1f1f1;
}
.identity .cols {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 2px;
}
.identity .field { display: flex; gap: 6px; }
.identity .field b { color: blue;
  white-space: nowrap;
  width: 145px;
 }
 .identity .field span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  font-weight: normal;
  font-style: semi-bold;
  color: #111;
}
/* .photo {
  flex: 0 0 74px;
  height: 90px;
  border: 1px solid #999;
  background: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9px;
  color: #777;
  padding: 4px;
}
  */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.courses {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  min-width: 520px;
}
table.courses th {
  border: 1px solid #000;
  background: #f4f4f4;
  padding: 5px 4px;
  text-align: center;
}
table.courses th:nth-child(3) { text-align: center; }
table.courses td {
  padding: 2px 4px;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  white-space: nowrap;
  
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", Arial, sans-serif;
  /* font-style: bold; */
}
table.courses td.title { white-space: normal; }
table.courses td.num { text-align: center; }
table.courses td.sem {
  font-weight: bold;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}
table.courses tbody.sem-group tr:last-child td { border-bottom: 1px solid #bbb; }
table.courses tbody.sem-group:last-of-type tr:last-child td { border-bottom: 1px solid #000; }

.footnote { font-size: 10.5px; margin: 6px 0 12px ; color: #248208; }

.summary {
  
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  max-width: 560px;
  margin-bottom: 8px;
  
}
.summary .value {
  color: blue;
  font-weight: bold;
}
.status {
  font-size: 10.5px;
  margin-bottom: 20px;
  font-weight: bold;
  color: blue;
}

.summary .k { font-weight: bold; display: inline-block; min-width: 150px; }
.sign-block { text-align: right; font-size: 10.5px; margin: 10px 0 14px; }
.sign-block .line { display: inline-block; border-top: 1px solid #000; min-width: 190px; padding-top: 2px; }
.status { font-size: 10.5px; margin-bottom: 20px; }

.scheme { margin: 0 auto 10px; border-collapse: collapse; font-size: 10.5px; }
.scheme caption { font-weight: bold; text-align: left; margin-bottom: 3px; }
.scheme th, .scheme td { border: 1px solid #000; padding: 2px 10px; text-align: center; }
.scheme th { background: #f4f4f4; }
.formula { text-align: center; font-size: 10.5px; margin: 8px 0; }
.abbr { margin: 0 auto 8px; border-collapse: collapse; font-size: 10.5px; }
.abbr th, .abbr td { border: 1px solid #000; padding: 2px 10px; }
.abbr td:first-child { text-align: left; min-width: 70px; }
.abbr-note { text-align: center; font-size: 9.5px; }
.doc-footer { font-size: 10px; margin-top: 10px; }
.doc-footer p { margin: 2px 0; }
.doc-disclaimer { text-align: center; color: #888; font-size: 9px; margin-top: 18px; }

/* Responsive */
@media (max-width: 760px) {
  .layout { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 30px; }
  .side-nav { flex: none; width: 100%; border-top: 0; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
  .side-nav ul { display: flex; gap: 14px; flex-wrap: wrap; }
  .side-nav li { margin: 0; }
  .side-nav a { padding: 2px 6px; border-left: 0; border-bottom: 2px solid transparent; }
  .side-nav a.active { border-bottom-color: var(--accent); }
  .document { padding: 14px 12px 20px; }
  .identity { flex-direction: column-reverse; }
  .photo { align-self: flex-start; }
  .identity .cols { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .search-form td:first-child { width: 36%; }
  .site-header h1 { font-size: 14px; }
}
@media (max-width: 420px) {
  .scheme th, .scheme td, .abbr th, .abbr td { padding: 2px 5px; }
  table.courses { font-size: 10px; }
}
