:root {
  color-scheme: light;
  font: 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
  --surface: #f5f1ee;
  --field: #f0eae7;
  --ink: #2e2224;
  --muted: #675759;
  --accent: #a21e32;
  --line: #cfbfbb;
  --raised: -6px -6px 16px #ffffffc9, 7px 8px 18px #ac979286;
  --small-raised: -3px -3px 7px #ffffffe0, 3px 4px 8px #ad979183;
  --inset: inset 2px 3px 6px #aa928b88, inset -3px -3px 6px #ffffffe0;
  background: var(--surface);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, p, dl, dd { margin: 0; }
button, input { font: inherit; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.09; letter-spacing: -.052em; }
h2 { font-size: 1.1rem; line-height: 1.35; letter-spacing: -.025em; }
p { color: var(--muted); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
small { display: block; color: var(--muted); font-size: .78rem; font-weight: 640; }
:focus-visible { outline: 3px solid #50368e; outline-offset: 3px; }
::selection { color: white; background: var(--accent); }

.brand { display: flex; align-items: center; gap: .48rem; font-size: 1.25rem; font-weight: 790; letter-spacing: -.045em; }
.brand b { margin-left: .1rem; padding-left: .55rem; border-left: 1px solid #bca8a3; color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .09em; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; margin-right: .15rem; background: var(--surface); border-radius: .65rem; box-shadow: var(--small-raised); }
.mark::before { content: ""; width: 1.15rem; height: 1.05rem; background: linear-gradient(135deg, #ce3447, #8e162d); clip-path: polygon(50% 0, 100% 100%, 72% 100%, 50% 49%, 28% 100%, 0 100%); }

.login { display: grid; min-height: 100vh; min-height: 100svh; place-items: center; padding: clamp(1rem, 5vw, 4rem); }
.login > div, .work section {
  border: 1px solid #ffffffa3;
  border-radius: 1.3rem;
  background: var(--surface);
  box-shadow: var(--raised);
}
.login > div { width: min(100%, 27rem); padding: 2rem; }
.login > .login-card { padding: clamp(1.35rem, 5vw, 2.25rem); }
.login-masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.login h1 { font-size: clamp(1.85rem, 5vw, 2.3rem); margin: 1.6rem 0 1.45rem; }
.login-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; margin-top: .6rem; font-size: .87rem; font-weight: 600; }
.login form .platform-choice { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; text-align: left; overflow-wrap: anywhere; }
.auth-code p { margin: .15rem 0 .8rem; font-size: .88rem; overflow-wrap: anywhere; }
.otp-cells { display: none; }
/* One native input handles selection, paste and autofill. Each numeral sits over its visual cell. */
@supports (width: 1cqi) {
  .otp { --gap: .35rem; position: relative; container-type: inline-size; overflow: clip; border-radius: .65rem; }
  .otp-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
  .otp-cells span { height: 3.15rem; border: 1px solid #998783; border-radius: .65rem; background: var(--field); box-shadow: var(--inset); }
  .otp:focus-within { outline: 3px solid #50368e; outline-offset: 3px; }
  .otp:focus-within .otp-cells span { background: #fffaf7; }
  .otp input, .otp input:focus-visible {
    --step: calc((100cqi + var(--gap)) / 6);
    position: absolute; left: 0; top: 0; height: 100%; width: calc(100% + var(--step));
    border: 0; outline: 0; box-shadow: none; background: transparent; border-radius: 0;
    padding: 0 0 0 calc((var(--step) - var(--gap) - 1ch) / 2);
    font: 600 1.5rem/1 ui-monospace, monospace; letter-spacing: calc(var(--step) - 1ch);
  }
}
.card-art { display: grid; place-content: center; width: 4.9rem; height: 3.5rem; }
.id-card {
  position: relative; width: 9.5rem; height: 6.2rem; border: 1px solid #ffffffcf; border-radius: 1rem;
  background: linear-gradient(135deg, #fffaf6, #e4ceca); box-shadow: -5px -5px 12px #ffffffd9, 8px 11px 16px #b8a39dbf;
  transform: scale(.44) rotate(-9deg);
}
.portrait { position: absolute; left: .85rem; top: 1.15rem; width: 2.65rem; height: 3.4rem; overflow: hidden; border-radius: .55rem; box-shadow: var(--inset); }
.portrait::before, .portrait::after { content: ""; position: absolute; background: #c68f91; border-radius: 50%; }
.portrait::before { width: .95rem; height: .95rem; top: .65rem; left: .85rem; }
.portrait::after { width: 2.1rem; height: 1.65rem; bottom: -.15rem; left: .27rem; }
.card-lines, .card-lines::before, .card-lines::after { position: absolute; height: .3rem; border-radius: 1rem; background: #c99fa1; box-shadow: 0 1px 0 #fff9f7; }
.card-lines { left: 4.25rem; top: 1.7rem; width: 3.75rem; }
.card-lines::before, .card-lines::after { content: ""; left: 0; top: .85rem; width: 2.9rem; }
.card-lines::after { top: 1.7rem; width: 1.95rem; }
.seal { position: absolute; right: -.85rem; bottom: -.8rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 2px solid #f5e0d9; border-radius: 50%; background: linear-gradient(140deg, #c43c4c, #8f1b32); box-shadow: 3px 5px 7px #a58077a3; }
.seal::after { content: ""; width: .95rem; height: .48rem; margin-top: -.18rem; border-left: 3px solid white; border-bottom: 3px solid white; transform: rotate(-36deg); }

.login form, section form { display: grid; gap: .85rem; }
label { display: grid; gap: .35rem; font-size: .84rem; font-weight: 660; }
input {
  display: block; min-width: 0; width: 100%; min-height: 2.75rem;
  border: 1px solid #998783; border-radius: .75rem; padding: .52rem .85rem;
  background: var(--field); color: var(--ink); box-shadow: var(--inset); font-size: 1rem;
}
input::placeholder { color: #72615e; opacity: 1; }
input:focus-visible { background: #fffaf7; }
button { min-height: 2.75rem; border: 1px solid #8e1930; border-radius: .75rem; padding: .5rem 1rem; cursor: pointer; background: linear-gradient(145deg, #b92640, #9f1b32); color: white; font-weight: 660; box-shadow: var(--small-raised); }
button:hover { background: #89172b; }
button:active { box-shadow: inset 2px 3px 6px #771327; }
.login form button { margin-top: .4rem; }
.secondary { color: var(--accent); border-color: #cdbbb7; background: var(--surface); }
.secondary:hover { background: #f3e7e4; }
.secondary:active { box-shadow: var(--inset); }

.app { display: grid; grid-template-columns: 15.75rem minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
aside { display: flex; flex-direction: column; gap: 1.9rem; padding: 2rem 1.35rem; border-right: 1px solid #d9cbc7; box-shadow: 2px 0 0 #fffaf7; min-width: 0; }
aside .brand { margin-left: .3rem; }
.tenant { display: grid; gap: .12rem; padding: .8rem 1rem; border-radius: .85rem; box-shadow: var(--inset); overflow-wrap: anywhere; }
.tenant strong { font-size: 1rem; }
.switch summary { cursor: pointer; color: var(--accent); font-size: .85rem; padding: .35rem 0; }
.switch a { display: block; padding: .3rem 0; }
aside nav { display: grid; gap: .55rem; }
aside nav a[aria-current] { border-inline-start: .2rem solid var(--accent); }
aside nav a { display: flex; align-items: center; gap: .65rem; padding: .65rem .9rem; border-radius: .75rem; background: var(--surface); box-shadow: var(--small-raised); text-decoration: none; font-weight: 680; }
aside nav a::before, .badge::before { content: ""; width: .45rem; height: .45rem; flex: none; border-radius: 50%; background: currentColor; }
footer { margin-top: auto; overflow-wrap: anywhere; color: var(--muted); font-size: .82rem; }
footer button { margin-top: .6rem; }

.work { width: 100%; max-width: 78rem; padding: clamp(1.4rem, 4vw, 3.4rem); min-width: 0; }
.work > a { font-size: .88rem; font-weight: 600; }
header { margin: .5rem 0 2rem; }
header small { margin-bottom: .45rem; color: var(--accent); }
.work > a + header { margin-top: 1.25rem; }
.work section { margin: 1.25rem 0; padding: clamp(1.05rem, 2.5vw, 1.8rem); }
.section-heading, .actions, .pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; }
.section-heading { margin-bottom: 1.15rem; }
.section-heading a, .pager a { font-size: .875rem; font-weight: 620; }
.scroll { overflow-x: auto; }
.mobile-label { display: none; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .93rem; }
td, th { padding: .8rem .6rem; }
th { color: var(--muted); font-size: .78rem; font-weight: 680; }
th, tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
td:first-child a { font-family: ui-monospace, monospace; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; padding: .25rem .62rem; border: 1px solid #cfc4bc; border-radius: 1rem; font-size: .78rem; font-weight: 670; color: #584e47; background: #f0ebe5; }
.SUBMITTED { background: #f4e9cd; color: #664911; border-color: #cabb96; }
.REVIEWED_MANUALLY, .SYNTHETIC_AUTO_PASSED { background: #d6e8da; color: #19503a; border-color: #a0beaa; }
.NEEDS_CHANGES, .SYNTHETIC_NOT_VERIFIED { background: #fbe4e6; color: #8d2233; border-color: #d5a5aa; }
.pager:not(:empty) { margin-top: 1.1rem; }
.empty { padding: 1rem; border-radius: .75rem; background: var(--field); box-shadow: var(--inset); }
dl { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); }
dt, dd { padding: .65rem 0; border-bottom: 1px solid var(--line); }
dt { padding-right: 1.5rem; color: var(--muted); }
dd { overflow-wrap: anywhere; font-weight: 530; }
dt:nth-last-child(2), dd:last-child { border-bottom: 0; }
section form { max-width: 26rem; margin-top: 1.1rem; }
.actions { justify-content: flex-start; }
.document { display: block; max-width: 100%; max-height: 65vh; margin: 1rem auto; }
.alert, .notice, .login p[role="alert"] { padding: .7rem .9rem; border-radius: .65rem; color: #842638; background: #f9e7e8; border-left: .22rem solid #a32b3f; }
.notice { color: #1e4b39; background: #d8e9dd; border-color: #508266; }
.login > div:not(.login-card) > p { margin: 1.25rem 0; }

@media (max-width: 750px) {
  .app { display: block; }
  aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .75rem 1rem; padding: 1rem; border: 0; border-bottom: 1px solid var(--line); box-shadow: 0 2px 0 #fffaf7; }
  aside nav a { width: fit-content; font-size: .85rem; }
  footer { margin: 0; text-align: right; }
  footer button { min-height: 2.25rem; margin-top: .25rem; padding: .25rem .75rem; }
  .work { padding: 1.3rem 1rem; }
}
@media (max-width: 600px) {
  .work header { margin-bottom: 1.4rem; }
  dl { display: block; }
  dt { font-size: .8rem; padding: .7rem 0 .12rem; border: 0; }
  dd { padding: 0 0 .65rem; }
  td, th { padding: .65rem .3rem; }
  table { font-size: .85rem; }
}
@media (forced-colors: active) {
  .mark, .login > div, .work section, .tenant, .badge, aside nav a { border: 1px solid CanvasText; }
  .card-art { display: none; }
}
@media (max-width: 460px) {
  .scroll { overflow: visible; }
  .scroll table, .scroll tbody { display: block; }
  .scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .scroll tbody tr { display: grid; grid-template-columns: minmax(5.5rem, .85fr) minmax(0, 1.15fr); gap: .5rem .75rem; align-items: start; padding: .8rem 0; border-top: 1px solid var(--line); }
  .scroll tbody td { padding: 0; border: 0; }
  .scroll td:first-child a { display: inline-block; padding: .22rem 0; }
  .scroll .mobile-label { display: block; margin-bottom: .08rem; color: var(--muted); font-size: .72rem; font-weight: 650; }
  .tenant summary { font-size: .8rem; }
}

/* The public cover uses the same red ink as the dashboard, on a warmer paper field. */
.home {
  --paper: #faf7f2;
  --red: #a51f32;
  --headline: "Baskervville", Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  min-height: 100svh; overflow-wrap: break-word; border-top: 5px solid var(--red);
  background: var(--paper); color: #2b2422;
}
.home-nav, .hero, .regions, .process, .home-help, .home-footer { width: min(100% - clamp(2.25rem, 8vw, 9rem), 82rem); margin-inline: auto; }
.home-nav { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-block: 0; padding-block: 1.45rem; border-bottom: 1px solid var(--line); }
.home-nav .brand { font-size: 1.28rem; }
.home nav { display: flex; align-items: center; gap: clamp(.85rem, 2.8vw, 2.8rem); }
.home nav a, .home-footer a { font-size: .87rem; font-weight: 650; text-decoration: none; }
.home nav a:not(.entry-link) { color: var(--ink); }
.home nav a:hover, .home-footer a:hover { text-decoration: underline; }
.home .entry-link { display: inline-flex; align-items: center; gap: .65rem; padding: .5rem .95rem; border: 1px solid #cdb8b2; border-radius: 2rem; color: var(--red); }
.home .entry-link:hover { background: #f2e6e1; }
.skip { position: absolute; left: 1.25rem; top: -10rem; padding: .6rem; background: white; z-index: 1; }
.skip:focus { top: .75rem; }
.hero { display: grid; grid-template-columns: .94fr 1.3fr; align-items: center; gap: clamp(2rem, 4vw, 4.5rem); padding-block: clamp(2.8rem, 5vw, 5rem); }
.hero h1 { font: 540 clamp(3.3rem, 5.2vw, 5.75rem)/.99 var(--headline); letter-spacing: -.065em; }
.hero h1 em { display: inline-block; font-weight: 400; color: var(--red); }
.hero-copy p { font-size: clamp(1rem, 1.22vw, 1.13rem); line-height: 1.65; max-width: 40ch; margin: 1.5rem 0 1.7rem; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 1.1rem; min-height: 3rem; padding: .7rem 1.25rem; color: #fff; background: linear-gradient(150deg,#b1263c,#97192e); border: 1px solid #93182c; border-radius: .8rem; text-decoration: none; font-size: .95rem; font-weight: 690; box-shadow: var(--small-raised); }
.home-button:hover { background: #87172a; }
.home-button:active { box-shadow: inset 1px 2px 6px #761326; }
.home figure, .home h3 { margin: 0; }
.archipelago { position: relative; padding: clamp(.35rem,.8vw,.8rem); border-radius: 1.15rem; background: #f6f0e7; box-shadow: var(--raised); border: 1px solid #fffdf8; }
.archipelago img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: .65rem; }
.home h2 { font: 540 clamp(1.95rem, 3.1vw, 3.2rem)/1.08 var(--headline); letter-spacing: -.045em; }
.regions, .process, .home-help { padding-block: clamp(2rem,4vw,3.8rem); border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.regions h2 { margin-bottom: 1.5rem; }
.regional-prints { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem,2.8vw,2.5rem); }
.regional-prints img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: .25rem; background: #f1e3d4; }
.regional-prints figcaption { padding-top: .75rem; font: 540 clamp(1.35rem,2.1vw,1.95rem)/1.15 var(--headline); }
.regional-prints figcaption span { display: block; font: 670 .73rem/1.5 Inter, system-ui, sans-serif; letter-spacing: .05em; margin-bottom: .2rem; color: var(--red); }
.process ol { list-style: decimal-leading-zero; margin: 1.65rem 0 0; padding: 0; display: grid; gap: clamp(1rem,3.8vw,4rem); grid-template-columns: repeat(3,minmax(0,1fr)); }
.process li { margin-left: 1.9rem; padding-left: .28rem; }
.process li::marker { color: var(--red); font: 680 .87rem/1 system-ui,sans-serif; font-variant-numeric: tabular-nums; }
.home h3 { font-size: 1.02rem; line-height: 1.4; }
.process p, .home-help p { font-size: .94rem; line-height: 1.65; margin-top: .5rem; }
.home-help { display: grid; grid-template-columns: .85fr 1.25fr; gap: 2rem; }
.home-help details { border-bottom: 1px solid var(--line); }
.home-help summary { cursor: pointer; padding: .85rem .2rem; font-weight: 630; }
.home-help summary::marker { color: var(--red); }
.home-help p { margin: 0 .2rem 1rem; max-width: 66ch; }
.home-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 0 1.5rem; margin-top: 0; border-top: 2px solid var(--red); text-align: left; }
.home-footer span:first-child { font-size: .77rem; font-weight: 700; letter-spacing: .11em; }
@media(max-width: 820px) {
  .hero { gap: 1.5rem; grid-template-columns: 1fr 1.04fr; }
  .hero h1 { font-size: clamp(2.85rem,6.7vw,3.8rem); }
}
@media(max-width: 650px) {
  .home-nav { gap: .8rem; padding-block: 1.05rem; }
  .home nav a:not(.entry-link) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 1.8rem; padding-block: 2.2rem; }
  .hero h1 { font-size: clamp(3rem,10.5vw,4.2rem); }
  .hero-copy p { margin-block: 1rem 1.2rem; }
  .regional-prints, .process ol, .home-help { grid-template-columns: 1fr; }
  .regional-prints { gap: 1.2rem; }
  .regional-prints figure { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 1rem; }
  .regional-prints figcaption { padding: 0; }
  .home-help { gap: .9rem; }
}
@media(forced-colors: active) {
  .home-button, .entry-link, .archipelago { border: 1px solid ButtonText; }
}

.login-password { display: grid; gap: .35rem; }
.login-password-input { position: relative; }
.login-password-input input { padding-inline-end: 3.4rem; }
.login-password-input input::-ms-reveal { display: none; }
.login form #toggle-password {
  position: absolute;
  inset-inline-end: .2rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.login form #toggle-password[hidden] { display: none; }
#toggle-password svg { width: 1.25rem; height: 1.25rem; }
#toggle-password .password-eye-slash { visibility: hidden; }
#toggle-password.password-visible .password-eye-slash { visibility: visible; }
