/*
Theme Name: University Report Lookup
Description: A two-field lookup and editable credential reports for a university project.
Version: 1.1.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: university-report-lookup
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
@font-face {
    font-family: Montserrat;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("assets/montserrat-latin.woff2") format("woff2");
}
:root {
    --ucr-ink: #142c42;
    --ucr-teal: #006c61;
    --ucr-green: #01a769;
    --ucr-line: #ced9dd;
    color-scheme: light;
}
body.ucr-site { margin: 0; color: var(--ucr-ink); background: #f1f5f4; }
.ucr-site, .ucr-site input, .ucr-site button {
    font-family: Montserrat, "Avenir Next", Arial, sans-serif;
}
.ucr-site *, .ucr-site *::before, .ucr-site *::after { box-sizing: border-box; }
.ucr-site [hidden] { display: none !important; }
.ucr-site :focus-visible { outline: 3px solid #175fba; outline-offset: 3px; }
.lookup-stage {
    position: relative;
    --logo-inset: clamp(18px, 4.1vh, 38px);
    --logo-height: 52px;
    min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
    padding: clamp(24px, 6vh, 64px) 20px 24px;
    background: var(--ucr-green) url("assets/waves.svg") center center / 100% 100% no-repeat;
}
.lookup-brand {
    position: absolute; top: var(--logo-inset); left: clamp(20px, 5.9vw, 40px);
    width: 230px; height: var(--logo-height);
}
.lookup-brand .custom-logo-link, .lookup-brand img { display: block; width: 100%; height: 100%; }
.lookup-brand img { object-fit: contain; object-position: left top; }
.admin-bar .lookup-stage { min-height: calc(100svh - 32px); }
.lookup-card {
    width: 100%; max-width: 552px; background: #fff; border-radius: 16px;
    padding: 42px 48px 43px; box-shadow: 0 5px 20px rgb(0 50 37 / 7%);
}
.lookup-card header { margin-bottom: 29px; }
.lookup-card h1 { margin: 0; color: var(--ucr-teal); font-size: 25px; font-weight: 650; line-height: 1.3; letter-spacing: -.035em; }
.lookup-card header p { margin: 5px 0 0; color: #465a60; font-size: 14px; line-height: 1.5; }
.lookup-fields { display: grid; gap: 20px; }
.lookup-field { display: grid; gap: 7px; }
.lookup-field label { font-size: 15.5px; font-weight: 450; line-height: 1.4; }
.lookup-field input {
    width: 100%; padding: 10px 15px; background: #fff; color: var(--ucr-ink);
    border: 1px solid #929b9a; border-radius: 8px; font-size: 16px; line-height: 1.45;
    min-height: 46px; appearance: none;
}
.lookup-field input::placeholder { color: #747e81; opacity: 1; }
.lookup-field input:focus { border-color: var(--ucr-teal); }
.lookup-submit {
    display: block; width: 100%; margin: 26px 0 0; padding: 12px 16px; min-height: 48px;
    border: 0; border-radius: 100px; background: #006e60; color: white;
    font-size: 16px; font-weight: 700; line-height: 1.5; cursor: pointer;
}
.lookup-submit:hover { background: #005b50; }
.lookup-submit:disabled { background: #999; color: #fff; cursor: default; }
.lookup-error { margin: 17px 0 0; color: #9c3027; font-size: 14px; line-height: 1.55; }
.record-stage { min-height: 100vh; padding: 22px max(14px, 4vw) 60px; background: #edf2f0; }
.record-wrap { max-width: 850px; margin: 0 auto; }
.record-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 2px 14px; color: #344e47; font-size: 13px; line-height: 1.5;
}
.record-bar p { margin: 0; }
.return-link, .original-link { color: #00675a; font: inherit; font-weight: 600; text-underline-offset: 3px; }
.report-paper { overflow-wrap: anywhere; background: white; box-shadow: 0 3px 20px rgb(27 62 48 / 9%); }
.source-image { display: block; width: 100%; height: auto; }
.record-sheet {
    padding: 7.6% 7.9% 6.5%; font-family: Arial, Helvetica, sans-serif;
    color: #142d41; line-height: 1.43; font-size: 16px;
}
.sheet-head { border-bottom: 1.5px solid #246177; padding-bottom: 17px; margin-bottom: 21px; }
.sheet-mast, .sheet-foot, .assessment-end { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sheet-mast { margin-bottom: 18px; align-items: flex-start; }
.project-mark { display: inline-block; color: #176044; font: bold 15px/1.2 Georgia, serif; border-top: 2px solid #176044; border-bottom: 1px solid #176044; padding: 5px 0; }
.sheet-meta, .report-rows { margin: 0; }
.sheet-meta { display: grid; gap: 4px; font-size: 14px; }
.sheet-meta div { display: grid; grid-template-columns: auto 1fr; gap: 18px; }
.sheet-meta dt { color: #46606c; }
.sheet-meta dd, .report-rows dd { margin: 0; }
.sheet-meta dd { text-align: end; }
.sheet-head h1 { margin: 0; font: 400 clamp(25px, 4.5vw, 39px)/1.13 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.sheet-head p { margin: 8px 0 0; color: #3e5866; }
.record-sheet h2 { margin: 0 0 7px; font-size: 20px; line-height: 1.25; }
.sheet-section, .person-section { margin-top: 21px; }
.person-section { display: flex; align-items: flex-start; gap: 22px; }
.person-data { flex: 1; min-width: 0; }
.person-photo { width: 15.5%; height: auto; max-height: 150px; object-fit: contain; }
.report-rows > div { display: grid; grid-template-columns: 32% 1fr; gap: 14px; padding: 5px 0; border-bottom: 1px solid #d7e0e4; }
.person-data .report-rows > div { grid-template-columns: 40% 1fr; }
.report-rows dt { color: #405866; }
.report-rows dd, .sheet-copy { white-space: pre-line; }
.summary-box { margin-top: 21px; padding: 16px 18px; border-left: 3px solid #1a6576; background: #ebf1f3; }
.summary-box h2, .assessment-end h2 { font-size: 16px; }
.summary-box h2 { color: #145466; }
.summary-box p { margin: 5px 0 0; font: 400 clamp(23px,3vw,29px)/1.25 Georgia, serif; white-space: pre-line; }
.sheet-copy { margin: 6px 0 0; }
.assessment-end { margin-top: 26px; }
.assessment-end > .scope { flex: 1; }
.signoff { display: flex; align-items: center; gap: 14px; max-width: 55%; }
.record-seal { width: 85px; max-width: 27vw; max-height: 88px; object-fit: contain; }
.signed-by { min-width: 70px; max-width: 180px; color: #435966; font-size: 13px; }
.signed-by img { display: block; max-width: 100%; width: 138px; height: 56px; object-fit: contain; }
.signed-by span { display: block; border-top: 1px solid #b9c8cd; margin-top: 3px; padding-top: 3px; }
.sheet-foot { margin-top: 28px; border-top: 1.5px solid #246177; padding-top: 16px; color: #4a6269; font-size: 13px; }
.supplied-original { margin: 0; }
.source-toggle { display: none; }
.source-pair .record-sheet {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0;
}
.basic-page { max-width: 850px; margin: 2rem auto; padding: 2rem; background: white; }
.basic-page img { max-width: 100%; height: auto; }
@media (max-width: 700px) {
    .record-stage { padding: 15px 10px 32px; }
    .record-bar { font-size: 12px; }
    .record-sheet, .source-pair .record-sheet { position: static; width: auto; height: auto; overflow: visible; clip-path: none; padding: 26px 20px; }
    .source-pair > .supplied-original { display: none; }
    .source-toggle { display: block; padding: 0 20px 22px; color: var(--ucr-teal); font-size: 14px; }
    .source-toggle summary { cursor: pointer; }
    .source-toggle .source-image { margin-top: 12px; }
    .sheet-mast { gap: 12px; }
    .sheet-head h1 { font-size: clamp(25px, 6.5vw, 35px); }
    .sheet-meta { font-size: 12px; }
    .sheet-meta div { gap: 8px; }
    .record-sheet h2 { font-size: 18px; }
    .person-section { gap: 12px; }
    .person-photo { width: 72px; max-height: 100px; }
    .record-sheet { font-size: 15px; }
    .assessment-end h2, .summary-box h2 { font-size: 15px; }
    .signoff { gap: 8px; }
}
@media (max-width: 520px) {
    .lookup-stage { --logo-height: 42px; }
    .lookup-brand { width: 182px; }
    .lookup-stage { padding: 20px 18px; background-size: max(165%, 680px) 100%; background-position: 45% center; }
    .admin-bar .lookup-stage { min-height: calc(100svh - 46px); }
    .lookup-card { padding: 31px 26px 33px; border-radius: 14px; }
    .lookup-card h1 { font-size: 23px; }
    .record-sheet, .source-pair .record-sheet { padding: 23px 16px; }
    .report-rows > div, .person-data .report-rows > div { grid-template-columns: minmax(0,.77fr) minmax(0,1fr); gap: 10px; }
    .person-data .report-rows > div { display: block; }
    .person-data dt { font-size: 13px; }
    .assessment-end { display: grid; gap: 12px; }
    .signoff { max-width: 100%; justify-content: flex-end; }
}
@media (max-height: 640px) {
    .lookup-stage { padding-top: calc(var(--logo-inset) + var(--logo-height) + 20px); }
}
@media print {
    @page { margin: 8mm; }
    .record-stage, .record-wrap, .report-paper { margin: 0; padding: 0; max-width: none; background: white; box-shadow: none; }
    .record-bar, .source-toggle, #wpadminbar { display: none !important; }
    .source-pair > .supplied-original { display: block; }
    .source-pair .record-sheet { display: none; }
    .source-image { max-height: 279mm; object-fit: contain; }
    .record-sheet { padding: 6mm; font-size: 11pt; }
    .sheet-section, .summary-box, .assessment-end { break-inside: avoid; }
}
