@font-face{font-family:DM Sans;src:url("fonts/dm-sans-latin-400-normal.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:DM Sans;src:url("fonts/dm-sans-latin-600-normal.woff2") format("woff2");font-style:normal;font-weight:600 800;font-display:swap}
@font-face{font-family:Barlow Condensed;src:url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");font-weight:700;font-display:swap}
:root {
  color-scheme: light;
  --ink: #20211f;
  --paper: #f6f5f1;
  --line: #dcdcd5;
  --muted: #5d605a;
  --accent: #af2930;
  --accent-hover: #932028;
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  font: 100%/1.45 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, input, select { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #3a6b9b; outline-offset: 3px;
}
a { color: var(--accent); }
[hidden] { display: none !important; }
.icon { display: inline-block; flex: 0 0 auto; }
.shell, .mast-inner { width: min(1200px, calc(100% - 88px)); margin-inline: auto; }
.masthead { background: #1d1e1d; color: #fff; }
.mast-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; }
.identity { display: flex; align-items: center; gap: 12px; }
.crest { width: 39px; height: 44px; display: grid; place-items: center; }
.crest img { width: auto; height: 39px; filter: brightness(0) invert(1); }
.identity-text { border-left: 1px solid #53544f; padding-left: 13px; display: grid; gap: 1px; }
.identity-text strong { font: 700 24px/.95 var(--heading); letter-spacing: .035em; }
.identity-text span { color: #d2d2c9; font-size: 12px; }
.rank { display: flex; align-items: stretch; justify-content: flex-end; gap: 5px; width: 74px; height: 11px; border-left: 16px solid #343631; background: #b42a32; padding-right: 5px; transform: skew(-12deg); }
.rank i { width: 3px; background: #f6ece8; }
.signout, .quiet-btn { background: transparent; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.signout { color: #f6f5f1; border: 1px solid #62635f; padding: 0 15px; border-radius: 8px; }
.signout:hover { background: #333531; }
.quiet-btn { border: 0; padding: 0 9px; border-radius: 5px; font-size: 14px; }
.quiet-btn:hover { background: #f2f1ed; }
h1, h2 { font-family: var(--heading); font-weight: 700; }
h1 { font-size: clamp(43px, 4.7vw, 69px); line-height: .98; letter-spacing: -.015em; }
h2 { font-size: 28px; line-height: 1.1; }
.intro { color: var(--muted); margin-top: 11px; font-size: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; min-height: 50px; padding: 11px 20px; font-weight: 600; text-decoration: none; font-size: 16px; transition: background .14s, transform .14s; }
.btn:active { transform: translateY(1px); }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: white; color: var(--ink); border-color: #bfc1b9; }
.secondary:hover { background: #f3f3ee; }
.login-layout { margin-block: clamp(34px, 8vh, 92px); display: grid; grid-template-columns: 1.1fr 1fr; max-width: 1080px; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; box-shadow: 0 14px 50px #20211f08; }
.login-art { min-height: 520px; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 64% 37%, #a04243 0%, #72252c 55%, #4f171f 100%); }
.login-art::before { content: ""; position: absolute; inset: 0; opacity: .22; background: repeating-linear-gradient(103deg, transparent 0 3px, #42171a 3px 4px); }
.paper-cover, .paper-under { position: absolute; width: 115%; height: 78%; left: 5%; top: 18%; transform: rotate(-12deg); background: #eeece5; box-shadow: -3px 15px 30px #2d111c62; }
.paper-under { transform: rotate(-18deg) translate(-1%, 3%); background: #dedbd0; }
.paper-cover { background: #fff url("capa.webp") top left/100% auto no-repeat; }
.belt-edge { position: absolute; bottom: 10%; left: -14%; width: 142%; height: max(48px, 10%); transform: rotate(9deg); background: repeating-linear-gradient(0deg,#181917 0 3px,#232421 3px 4px); box-shadow: 0 5px 8px #241b1c55; border-block: 3px solid #121310; }
.belt-edge span { position: absolute; inset: 0 12% 0 50%; background: linear-gradient(90deg,transparent 0 47%,#f6ede4 47% 51%,transparent 51% 60%,#f6ede4 60% 64%,transparent 64% 73%,#f6ede4 73% 77%,transparent 77% 86%,#f6ede4 86% 90%,transparent 90%), repeating-linear-gradient(0deg,#ae2830 0 3px,#b83438 3px 4px); border-inline: 4px solid #d6c7ba; }
.login-card { align-self: center; padding: clamp(32px, 5vw, 68px); }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.login-card h1 { font-size: clamp(42px, 4vw, 58px); }
.login-card .intro { max-width: 360px; }
.login-form { display: grid; gap: 19px; margin-top: 28px; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, legend { font-size: 14px; font-weight: 600; }
legend { padding: 0 0 8px; }
input:not([type="hidden"],[type="radio"]), select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 13px; border: 1px solid #bfc1b9; border-radius: 7px; background-color: #fff; font-size: 16px; }
input::placeholder { color: #74766e; }
input[aria-invalid], select[aria-invalid] { border-color: var(--accent); }
input[type="date"] { display: block; max-width: 100%; min-height: 48px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.input-with-button, .select-wrap { position: relative; }
.input-with-button input { padding-right: 50px !important; }
.eye { position: absolute; top: 2px; right: 2px; height: calc(100% - 4px); width: 44px; display: grid; place-items: center; border: none; background: transparent; color: var(--muted); border-radius: 4px; }
.eye[aria-pressed="true"] { color: var(--accent); background: #f8ebe9; }
.login-submit { margin-top: 4px; justify-content: space-between; }
.alert { background: #fff0ec; border-left: 3px solid var(--accent); border-radius: 3px; padding: 11px 13px; color: #84232b; font-size: 14px; }
.editor-layout { padding-block: clamp(31px, 5vw, 63px) 60px; }
.page-heading { margin-bottom: clamp(23px, 2.7vw, 36px); }
.editor-grid { display: grid; grid-template-columns: minmax(310px,.8fr) minmax(0,1.32fr); gap: 24px; align-items: start; }
.panel { padding: clamp(20px, 2.3vw, 30px); background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.form-panel h2 { margin-bottom: 25px; }
#diploma-form { display: grid; gap: 20px; }
.segments { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f0f0eb; border: 1px solid #dedfd8; border-radius: 9px; }
.segments label { position: relative; cursor: pointer; border-radius: 6px; }
.segments input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segments span { display: flex; min-height: 42px; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 6px; color: var(--muted); }
.segments input:checked + span { color: #8e242c; background: #fff; border-color: #dcd9d0; box-shadow: 0 1px 3px #201f1a14; }
.segments input:focus-visible + span { outline: 3px solid #3a6b9b; outline-offset: 1px; }
.select-wrap select { appearance: none; padding-right: 36px; cursor: pointer; }
.select-wrap > svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #62655e; width: 16px; }
.fields-pair { display: grid; grid-template-columns: minmax(90px,.83fr) minmax(139px,1.17fr); gap: 12px; }
.hint, .format-help, .preview-meta { font-size: 13px; color: var(--muted); }
#data-help { margin-top: -11px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -6px; margin-bottom: 13px; }
.preview-head .quiet-btn { margin-right: -7px; }
.workmat { display: grid; place-items: center; padding: clamp(15px, 2.5vw, 33px); border: 1px solid #d7d8ce; border-radius: 8px; background-color: #e8e8e1; background-image: radial-gradient(#cbcdbf .8px, transparent .85px); background-size: 7px 7px; }
.sheet { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 297/210; background: #fff; color: var(--muted); font-size: 14px; box-shadow: 0 3px 9px #33362829, 0 0 0 1px #33362812; }
.sheet img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preview-meta { margin-top: 9px; display: flex; justify-content: space-between; align-items: start; gap: 10px; min-height: 22px; font-size: 12px; }
.preview-meta > :first-child { flex: none; }
#preview-status { text-align: right; }
#preview-status.error { color: var(--accent); }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 19px; margin-top: 12px; }
.format-help { text-align: center; margin-top: 10px; }
.download-feedback { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; margin-top: 8px; }
.download-feedback a { padding: 9px 2px; font-weight: 600; }
.btn:disabled { cursor: wait; opacity: .72; }
#zoom-dialog { width: min(1250px, 96vw); max-width: 96vw; max-height: 94vh; max-height: 94dvh; padding: 12px; color: var(--ink); border: none; border-radius: 10px; }
#zoom-dialog::backdrop { background: #191a18ba; }
.zoom-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 5px 9px; }
.zoom-scroll { overflow: auto; max-height: calc(91vh - 70px); max-height: calc(91dvh - 70px); border: 1px solid var(--line); }
.zoom-scroll img { display: block; width: max(100%, 820px); height: auto; }
.error-page { padding-block: 50px; }
.error-page a { margin-top: 24px; }
@media (max-width: 900px) {
  .shell, .mast-inner { width: calc(100% - 48px); }
  .editor-grid { grid-template-columns: minmax(292px,.85fr) minmax(0,1fr); gap: 15px; }
  .panel { padding: 20px; }
  .downloads { gap: 8px; }
  .downloads .btn { padding-inline: 10px; }
  .login-card { padding: 34px; }
}
@media (max-width: 720px) {
  .mast-inner { min-height: 64px; }
  .shell, .mast-inner { width: calc(100% - 32px); }
  .editor-grid { grid-template-columns: minmax(0,1fr); }
  .page-heading { margin-bottom: 20px; }
  .login-layout { display: flex; flex-direction: column; max-width: 480px; margin-block: 22px; }
  .login-art { min-height: 0; height: 142px; }
  .paper-cover, .paper-under { height: 255%; width: 81%; left: 16%; top: 24%; }
  .belt-edge { bottom: -10%; height: 29%; transform: rotate(5deg); }
  .login-card { width: 100%; padding: 25px; }
  .login-form { margin-top: 22px; gap: 15px; }
  .panel { padding: 20px; }
  .editor-layout { padding-block: 27px 32px; }
  .form-panel h2 { margin-bottom: 19px; }
  #diploma-form { gap: 17px; }
  .preview-head { margin-bottom: 9px; }
  .identity-text strong { font-size: 22px; }
  .crest { width: 31px; }
  .crest img { height: 34px; }
  .intro { margin-top: 8px; }
}
@media (max-width: 360px) {
  .panel, .login-card { padding: 16px; }
  .fields-pair { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: 1fr; }
  .login-art { height: 100px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
