:root {
  color-scheme: light;
  font: 16px system-ui, sans-serif;
  color: #182236;
  background: #f4f6fa;
  --muted: #526078;
  --line: #dce2eb;
  --navy: #112947;
  --blue: #174b80;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
p { line-height: 1.5; }
.wrap { width: min(1100px, calc(100% - 2.4rem)); margin-inline: auto; }
.top { border-top: 4px solid #a61519; border-bottom: 1px solid var(--line); background: #fff; }
.top-content, .section-heading, .account { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-content { min-height: 78px; }
.top img { display: block; object-fit: contain; object-position: left; }
.account { flex-wrap: wrap; justify-content: end; font-size: .875rem; color: var(--muted); }
main { padding-block: 2rem 3rem; }
.hero { padding: clamp(1.7rem, 5vw, 3.4rem); border-radius: .85rem; background: var(--navy); color: white; }
.eyebrow { color: #c4d7ef; font-size: .875rem; font-weight: 650; margin-bottom: .55rem; }
h1 { font-size: clamp(1.75rem, 5vw, 2.85rem); line-height: 1.12; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hero p:last-child { margin-top: .8rem; color: #e4edfb; }
.card { background: white; border: 1px solid var(--line); border-radius: .85rem; }
.sign-in { max-width: 510px; margin: 2rem auto; padding: clamp(1.25rem, 4vw, 2rem); }
.sign-in h1 { font-size: 1.85rem; }
.sign-in p, .section-heading p { color: var(--muted); margin-top: .45rem; }
.sign-in form, #verify { margin-top: 1.25rem; }
.inline { display: flex; align-items: center; gap: .65rem; }
.inline input { flex: 1; min-width: 0; }
#verify input { display: block; max-width: 11rem; margin-bottom: .65rem; }
label { display: block; font-size: .875rem; font-weight: 650; margin-bottom: .35rem; }
input, button, .file-download { font: inherit; border-radius: .5rem; padding: .62rem .85rem; }
input { width: 100%; min-height: 42px; border: 1px solid #acb9c9; color: inherit; }
button, .file-download { white-space: nowrap; display: inline-block; background: var(--blue); color: white; border: 1px solid var(--blue); font-weight: 650; cursor: pointer; text-decoration: none; }
button:disabled { cursor: default; opacity: .6; }
.secondary, .file-download { background: #fff; color: var(--blue); border-color: #a9bdd4; }
button:hover:not(:disabled), .file-download:hover { filter: brightness(.94); }
:focus-visible { outline: 3px solid #e19536; outline-offset: 3px; }
.statements { margin-top: 1.35rem; overflow: hidden; }
.section-heading { padding: 1.35rem 1.55rem; align-items: start; }
.section-heading h2 { font-size: 1.3rem; letter-spacing: -.02em; }
.file-search { min-width: 205px; }
.file-search input { margin-top: .3rem; font-weight: 400; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .85rem 1.55rem; border-top: 1px solid var(--line); }
th { background: #f7f9fc; font-size: .875rem; color: var(--muted); }
td:first-child { font-weight: 650; overflow-wrap: anywhere; }
td:last-child, th:last-child { text-align: right; }
.file-download { padding: .45rem .65rem; font-size: .875rem; }
.empty { padding: 1.2rem 1.55rem; color: var(--muted); border-top: 1px solid var(--line); }
#status:not(:empty) { background: #fff; border: 1px solid var(--line); border-radius: .55rem; color: var(--muted); margin: 1rem auto; max-width: 510px; padding: .8rem 1rem; }
#status.error { color: #8a171c; }
@media (max-width: 650px) {
  .section-heading { flex-direction: column; }
  .file-search { width: 100%; }
  th, td { padding: .8rem .65rem; }
  .section-heading, .empty { padding-inline: .85rem; }
  .account span, th:nth-child(3), td:nth-child(3) { display: none; }
}
@media (max-width: 400px) {
  .inline { align-items: start; flex-direction: column; }
  th, td { font-size: .875rem; }
}
.top img.cota-logo { width: min(210px, 45vw); height: auto; margin-block: .75rem; }
.preview-label { color: #743706; background: #fff0d9; width: fit-content; margin-bottom: .75rem; border: 1px solid #f1cf9e; padding: .35rem .65rem; border-radius: .4rem; font-size: .81rem; font-weight: 750; letter-spacing: .045em; }
.portal-nav { display: flex; gap: .55rem; flex-wrap: wrap; padding-block: 1.15rem; }
.portal-nav [aria-current] { background: var(--navy); color: white; border-color: var(--navy); }
.service-section { margin-bottom: 1rem; overflow: hidden; }
.service-heading { padding: 1.1rem 1.5rem .8rem; }
.service-heading p, .record-row p, .snow-files > p, .proof-empty { color: var(--muted); }
.service-filters, .service-tools { padding: .5rem 1.5rem 1rem; display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; }
.service-filters label { margin-bottom: 0; }
.service-filters input, .request-form input, .request-form select, .request-form textarea { display: block; margin-top: .25rem; }
.service-tools { padding-top: 1rem; padding-bottom: .25rem; }
.ticket-toggles { display: flex; flex-wrap: wrap; gap: .45rem; }
.ticket-toggles [aria-pressed=true] { color: white; background: var(--blue); }
.record-row { border-top: 1px solid var(--line); padding: .85rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.record-row > div { min-width: 0; overflow-wrap: anywhere; }
.record-row p { margin-top: .2rem; font-size: .9rem; white-space: pre-wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,210px),1fr)); gap: 1rem; margin: 0; padding: .9rem 1.5rem; }
.detail-grid dt { font-weight: 700; font-size: .87rem; color: var(--muted); }
.detail-grid dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,235px),1fr)); gap: .75rem; padding: 0 1.5rem 1.1rem; }
.proof-heading, .proof-empty { padding: .35rem 1.5rem .45rem; margin: 0; }
.proof { margin: 0; max-width: 480px; align-self: start; overflow: hidden; border-radius: .55rem; background: var(--navy); }
.proof a { display: grid; color: white; text-decoration: none; }
.proof img, .proof figcaption { grid-area: 1 / 1; min-width: 0; }
.proof img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.proof figcaption { align-self: end; background: #13233a; display: flex; flex-wrap: wrap; gap: .25rem .65rem; padding: .45rem .6rem; font-size: .84rem; }
.request-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; padding: .5rem 1.5rem 1.15rem; align-items: start; }
.request-form label:last-of-type { grid-column: 1 / -1; }
.request-form button { justify-self: start; }
.request-form textarea, .request-form select { width: 100%; font: inherit; color: inherit; padding: .6rem; background: white; border: 1px solid #acb9c9; border-radius: .5rem; }
.request-form textarea { resize: vertical; }
.request-history h3, .snow-files h3 { margin: 0; padding: .85rem 1.5rem .5rem; }
.snow-files > p { padding: 0 1.5rem .7rem; }
.task-grid { background: #f7f9fc; border-block: 1px solid var(--line); margin-block: .55rem; }
@media (max-width: 570px) {
  .service-heading, .record-row, .service-tools, .service-filters, .detail-grid, .photo-grid, .request-form { padding-inline: .9rem; }
  .record-row { align-items: start; flex-direction: column; gap: .7rem; }
  .request-form { grid-template-columns: 1fr; }
}
@media print {
  @page { margin: .5in; }
  body:has(#print-ticket) { background: white; color: black; }
  body:has(#print-ticket) .account, body:has(#print-ticket) .hero, body:has(#print-ticket) .portal-nav,
  body:has(#print-ticket) #status, body:has(#print-ticket) #print-ticket .service-tools { display: none !important; }
  body:has(#print-ticket) main, body:has(#print-ticket) .top-content { width: 100%; padding-block: .3rem; }
  body:has(#print-ticket) #print-ticket { border: none; }
  body:has(#print-ticket) .proof { break-inside: avoid; }
  body:has(#print-ticket) .proof figcaption { background: white; color: black; border-top: 1px solid black; }
}
