* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #092c50; background: #eff4f8; font: 1rem/1.5 system-ui, sans-serif; }
header { position: sticky; top: 0; z-index: 2; background: #082e55; color: white; padding: .25rem max(1rem, calc((100% - 52rem) / 2)); }
.brand { background: transparent; color: inherit; padding-inline: 0; text-align: left; }
main { width: min(calc(100% - 2rem), 52rem); margin: 1rem auto; }
#screen { background: #f9fbfd; border: 1px solid #dce4ed; border-radius: 1rem; padding: clamp(1.1rem,4vw,2rem); box-shadow: 0 12px 34px #11365b12; }
h1,h2,h3 { line-height: 1.2; margin-block: 0 .7rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.55rem,5vw,2rem); }
h2 { font-size: 1.25rem; }
p { overflow-wrap: anywhere; white-space: pre-wrap; }
button,input,textarea,select { font: inherit; min-height: 2.75rem; }
button { border: 1px solid transparent; border-radius: .55rem; background: #0063ce; color: white; padding: .55rem .9rem; font-weight: 650; cursor: pointer; touch-action: manipulation; }
button.secondary { color: #174a82; background: white; border-color: #a9c9ee; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #eb931f; outline-offset: 2px; }
label { display: grid; gap: .3rem; margin-block: .65rem; font-weight: 600; }
input,textarea,select { width: 100%; border: 1px solid #9aadc2; border-radius: .45rem; padding: .55rem .65rem; color: #092c50; background: white; }
textarea { min-height: 5rem; resize: vertical; }
input[readonly] { background: #edf2f7; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: .9rem .3rem; }
#screen > .actions:first-child { margin-top: 0; margin-bottom: 1rem; }
.list { display: grid; gap: .75rem; margin-top: 1rem; }
.item { border: 1px solid #dce4ed; border-radius: .65rem; padding: .8rem; background: white; }
.item p { margin: .25rem 0; }
.person { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .75rem; align-items: start; }
img { display: block; width: min(100%,16rem); max-height: 18rem; object-fit: contain; border-radius: .5rem; }
img.thumb { width: 4rem; height: 4rem; object-fit: cover; }
fieldset { border: 1px solid #dce4ed; border-radius: .65rem; padding: .75rem; margin: 1rem 0; min-width: 0; }
legend { font-weight: 700; }
table { border-collapse: collapse; width: 100%; }
th,td { padding: .4rem; border-bottom: 1px solid #dce4ed; text-align: left; overflow-wrap: anywhere; }
#notice { padding: .75rem 1rem; background: #e4f0ff; border-radius: .55rem; }
#notice.error { background: #fce6e3; color: #78251b; }
#screen.login-screen { min-height: min(42rem,75vh); display: grid; align-content: center; justify-items: center; padding: 3rem clamp(1.25rem,5vw,3.5rem); color: white; text-align: center; background: radial-gradient(ellipse at 50% 100%, #135588 0%, #0a345e 45%, #072748 85%); }
.login-screen h1 { font-size: clamp(2rem,6vw,3.25rem); margin-top: 1.25rem; }
.login-screen p { margin: 0 0 1rem; color: #d7e6f6; }
.login-emblem { width: 5.4rem; height: 6rem; display: grid; place-items: center; background: white; color: #082e55; font-size: 2.9rem; clip-path: polygon(50% 0,95% 16%,95% 60%,80% 82%,50% 100%,20% 82%,5% 60%,5% 16%); }
.login-screen .actions { width: min(100%,24rem); display: grid; }
.login-screen button { background: white; color: #0a345e; }
.login-screen button.secondary { background: transparent; color: white; border-color: #7296ba; }
.email-login { width: min(100%,24rem); text-align: left; }
.email-login .actions { width: 100%; }
.menu-grid { display: grid; gap: .75rem; }
button.menu-card { display: grid; grid-template-columns: 3.15rem minmax(0,1fr) auto; align-items: center; gap: .9rem; width: 100%; padding: .8rem; color: #092c50; background: white; border: 1px solid #d9e5f0; text-align: left; }
button.menu-card:hover,.detail-tabs button:hover { background: #edf5ff; }
.menu-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .65rem; background: #e9f2fc; color: #0754a0; font-size: 1.85rem; line-height: 1; }
.menu-card small { display: block; color: #455e78; font-weight: 400; margin-top: .2rem; }
.chevron { color: #1668b5; font-size: 1.45rem; }
.identity { display: flex; align-items: center; gap: 1rem; }
.identity .thumb { width: 5rem; height: 6rem; }
.identity div { min-width: 0; }
.search-form .actions button { width: 100%; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 1.1rem; border-bottom: 1px solid #dce4ed; }
.detail-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: .4rem .4rem 0 0; padding-inline: .55rem; }
.detail-tabs button[aria-pressed="true"] { border-bottom-color: #0063ce; background: #edf5ff; }
.steps { display: flex; gap: .45rem; padding: 0; list-style: none; margin: 1rem 0 1.4rem; }
.steps li { flex: 1; padding: .45rem .2rem; border-bottom: 3px solid #cedde9; text-align: center; color: #465f79; font-size: .83rem; }
.steps li[aria-current="step"] { color: #0056b8; border-color: #0063ce; font-weight: 700; }
.photo-preview { margin: .75rem auto; background: #eaf1f8; }
form section .item { margin-block: .65rem; }
#screen.success-screen { background: linear-gradient(#075746 0, #08634f 12.5rem, #f9fbfd 12.5rem); }
.success-screen h1 { color: white; text-align: center; margin-bottom: 2.3rem; }
.success-icon { border: 2px solid white; border-radius: 50%; color: white; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; margin: 0 auto .6rem; font-size: 1.5rem; }
#navigation { position: fixed; z-index: 2; bottom: 0; inset-inline: 0; display: flex; justify-content: center; background: white; border-block: 1px solid #cedde9; padding: .25rem .35rem; }
#navigation button { flex: 1; max-width: 8rem; background: white; color: #104b83; border: 0; font-size: .85rem; line-height: 1.25; padding: .35rem .2rem; }
#navigation span { display: block; font-size: 1.45rem; line-height: 1; }
.signed-in main { padding-bottom: 5rem; }
.list:has(> .photo-history-card) { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.list:has(> .photo-history-card) > .actions { grid-column: 1 / -1; }
.photo-history-card { margin: 0; min-width: 0; padding: .55rem; }
.photo-history-card img { width: 100%; aspect-ratio: 4 / 3; max-height: none; object-fit: contain; background: #edf2f7; }
.photo-history-card figcaption { margin-top: .4rem; color: #455e78; font-size: .8rem; text-align: center; }
.photo-trigger,.photo-trigger:disabled { display: block; min-height: 0; padding: 0; border: 0; background: transparent; opacity: 1; }
.photo-trigger:enabled { cursor: zoom-in; }
.photo-history-card .photo-trigger { width: 100%; }
.photo-dialog { max-width: calc(100vw - 1.5rem); max-height: calc(100dvh - 1.5rem); padding: 3rem .5rem .5rem; border: 0; border-radius: .75rem; background: #112743; }
.photo-dialog::backdrop { background: rgb(0 0 0 / 78%); }
.photo-dialog img { width: auto; max-width: min(72rem,calc(100vw - 2.5rem)); max-height: calc(100dvh - 5rem); }
.photo-close { position: absolute; top: .15rem; right: .25rem; width: 2.75rem; padding: 0; background: transparent; font-size: 1.6rem; }
@media (max-width:480px), (pointer:coarse) and (max-width:768px) {
  body { display: flex; flex-direction: column; }
  header { position: static; order: 0; }
  #navigation { position: static; order: 1; }
  main { order: 2; align-self: center; }
  .signed-in main { padding-bottom: 0; }
  main { width: calc(100% - 1rem); margin-top: .6rem; }
  #screen { padding: 1rem; }
  .detail-tabs button { font-size: .85rem; }
  .menu-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
  button.menu-card { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .55rem; overflow-wrap: anywhere; }
  .menu-card .menu-icon { width: 2.25rem; height: 2.25rem; font-size: 1.35rem; }
  .menu-card .chevron,.menu-card small { display: none; }
}
