/* MTL brand (docs/architecture/brand-mtl.md): Exo, navy headings, MTL blue actions, pale blue bands,
   red only for errors, square corners, no shadows. Shared by the front door and the site index. */
@font-face { font-family: "Exo"; font-weight: 100 900; font-display: swap; src: url(/frontdoor/exo-latin.woff2) format("woff2"); }
:root {
  --navy: #133559; --blue: #004B80; --blue-dark: #003660; --pale: #E9F0F8; --sky: #92C5EB;
  --text: #2B2B2B; --muted: #4D4D4D; --line: #C9D3DE; --field: #5F6B7A; --red: #C4252C; --white: #FFFFFF;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Exo", "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.55; color: var(--text); background: var(--white); }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Photo bands: flat navy overlay so white text holds 4.5:1 anywhere on the photo. */
.photo { position: relative; color: var(--white); background: var(--navy) url(/frontdoor/terminal.jpg) center / cover no-repeat; }
.photo::before { content: ""; position: absolute; inset: 0; background: rgba(19, 53, 89, 0.84); }
.photo > * { position: relative; }
.photo a { color: var(--white); }
.photo :focus-visible { outline-color: var(--white); }
.credit { font-size: 13px; margin: 0; }
.inside.by { font-size: 16px; margin-top: 12px; }
.credit-dark { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.open-app { display: none; font-size: 15px; font-weight: 600; margin-top: 6px; }

/* Front door: photo left, panel right; stacked on phones. */
.door { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); min-height: 100vh; }
.door .photo { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px 28px; }
.name { font-size: 44px; line-height: 1.15; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.01em; }
.inside { font-size: 20px; line-height: 1.5; max-width: 30em; margin: 0; }
.story { margin: auto 0 48px; }
.panel { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px 28px; }
.views { width: 100%; max-width: 400px; margin: auto 0; }
.view h1 { color: var(--navy); font-size: 30px; line-height: 1.2; font-weight: 700; margin: 0 0 8px; }
.view h1:focus { outline: none; }
.intro { color: var(--muted); margin: 0 0 24px; }
footer.help { color: var(--muted); font-size: 15px; margin-top: 40px; }

.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input { width: 100%; height: 48px; padding: 0 14px; font: inherit; color: var(--text); background: var(--white);
  border: 1px solid var(--field); border-radius: 2px; }
input:focus-visible { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
input[aria-invalid="true"] { border: 2px solid var(--red); }
.control { position: relative; }
.control input { padding-right: 76px; }
.toggle { position: absolute; right: 4px; top: 4px; height: 40px; min-width: 64px; border: 0; background: none;
  color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; border-radius: 2px; }
.field-error { color: var(--red); font-size: 15px; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 16px;
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; border-radius: 2px; cursor: pointer; }
.primary { background: var(--blue); color: var(--white); border: 2px solid var(--blue); }
.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.secondary { background: var(--white); color: var(--blue); border: 2px solid var(--blue); }
.secondary:hover { background: var(--pale); }
.btn[aria-busy="true"] { cursor: progress; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.row { display: flex; justify-content: flex-end; margin: -6px 0 20px; }
.divider { color: var(--muted); margin: 28px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.back { margin: 16px 0 0; }

.alert { display: none; margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--red); background: #FBEDEE; color: #8E1B21; border-radius: 2px; }
.alert.show { display: block; }
.alert.info { border-color: var(--blue); background: var(--pale); color: var(--navy); }

.rules { list-style: none; margin: -6px 0 18px; padding: 0; font-size: 15px; color: var(--muted); }
.rules li { display: flex; gap: 8px; align-items: baseline; }
.rules li::before { content: "\25CB"; color: var(--field); width: 1em; }
.rules li.met { color: var(--navy); }
.rules li.met::before { content: "\2713"; color: var(--blue); font-weight: 700; }

.qr { display: flex; gap: 20px; align-items: center; margin: 0 0 18px; padding: 16px; background: var(--pale); }
.qr-code { flex: none; width: 152px; height: 152px; background: var(--white); padding: 6px; }
.qr-code svg { display: block; width: 100%; height: 100%; }
.secret { font-size: 15px; color: var(--navy); margin: 0; }
.secret code { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.04em; word-break: break-all; margin: 4px 0 6px; color: var(--text); }

@media (max-width: 860px) {
  .door { display: block; min-height: 0; }
  .door .photo { padding: 28px 20px 14px; }
  .name { font-size: 28px; margin-bottom: 8px; }
  .inside { font-size: 16px; }
  .story { margin: 0 0 16px; }
  .panel { padding: 28px 20px 24px; }
  .views { max-width: none; }
  .view h1 { font-size: 26px; }
  .qr { flex-direction: column; align-items: flex-start; }
  .open-app { display: block; }
  .inside.by { font-size: 14px; margin-top: 4px; }
}

/* Site index */
.top { padding: 28px 56px 40px; }
.top-bar { display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.top h1 { font-size: 40px; line-height: 1.15; margin: 0 0 10px; }
.top p.lead { font-size: 19px; margin: 0; max-width: 38em; }
.signout { color: var(--white); font-weight: 600; }
.contents { max-width: 880px; padding: 16px 56px 40px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.items h2 { font-size: 22px; margin: 0 0 6px; color: var(--navy); }
.items h2 a { color: var(--blue); }
.items p { margin: 0; color: var(--muted); max-width: 40em; }
.contents footer { color: var(--muted); margin-top: 32px; font-size: 15px; }
@media (max-width: 860px) {
  .top { padding: 20px 20px 28px; }
  .top-bar { margin-bottom: 24px; }
  .top h1 { font-size: 30px; }
  .top p.lead { font-size: 17px; }
  .contents { padding: 8px 20px 32px; }
}
