/* Shared application UI. The landing designs own everything outside dialogs. */
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
dialog {
  --silver: #e1e6eb;
  --blue: #83b7df;
  --muted: #a1adba;
  --line: #ffffff20;
  color-scheme: dark;
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  color: var(--silver);
  background: #11171e;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overscroll-behavior: contain;
  font: 400 14px/1.6 Inter, sans-serif;
}
dialog::backdrop { background: #020710dc; }
dialog *, dialog *::before, dialog *::after { box-sizing: border-box; }
dialog h2, dialog p { margin: 0; }
dialog button, dialog input, dialog select, dialog textarea { font: inherit; color: inherit; }
dialog button { cursor: pointer; }
dialog a { color: inherit; text-decoration: none; }
dialog :focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 32px; border-bottom: 1px solid var(--line); }
.dialog-heading h2, .legal-dialog h2 { font: 500 26px/1.2 Inter, sans-serif; letter-spacing: -.04em; }
.dialog-heading p { margin-top: 7px; color: var(--blue); font-size: 12px; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--silver); }
.dialog-close:hover { background: #ffffff0c; }
.application-dialog { width: 940px; }
.application-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); gap: 32px; padding: 28px 32px 36px; }
.application-main { min-width: 0; }
.application-state:not(:empty) { padding: 18px 0; color: #c0cdd9; }
.registration-step { border: 1px solid var(--line); padding: 22px; }
dialog .eyebrow { font: 500 10px/1.6 Inter, sans-serif; letter-spacing: .1em; color: var(--blue); }
.registration-step p { margin: 16px 0 24px; color: var(--muted); }
dialog .button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 12px 24px; border: 1px solid transparent; border-radius: 30px; background: var(--blue); color: #071422; font: 500 13px/1.5 Inter, sans-serif; }
dialog .button:hover { background: #b4d7f1; }
.registration-step .button, .submit-button { width: 100%; }
#application-form { display: grid; gap: 17px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
dialog label { display: flex; flex-direction: column; gap: 7px; color: #bdc9d5; font-size: 12px; }
dialog input, dialog select, dialog textarea { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #ffffff30; border-radius: 5px; background: #1a242f; padding: 12px 13px; font-size: 16px; line-height: 1.4; }
dialog input::placeholder, dialog textarea::placeholder { color: #97a7b6; }
dialog textarea { resize: vertical; max-height: 250px; }
.consent { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 12px; }
.consent input { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; accent-color: var(--blue); flex-shrink: 0; }
.consent button { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.form-error { color: #ffc0b8; font-size: 13px; }
dialog button:disabled { opacity: .6; cursor: wait; }
.application-terms { align-self: start; background: #090f16; border: 1px solid var(--line); padding: 20px; }
.terms-highlight { display: flex; flex-direction: column; gap: 5px; background: #83b7df10; padding: 16px; margin: 14px 0 22px; }
.terms-highlight span { font-size: 10px; color: var(--muted); }
.terms-highlight strong { font-size: 17px; }
.terms-highlight strong + span { margin-top: 13px; }
.application-terms ul { list-style: none; margin: 0; padding: 8px 0 0; font-size: 12px; color: #becbd7; }
.application-terms li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.application-terms .terms-note { font-size: 12px; color: var(--muted); margin-top: 18px; }
.text-button { border: 0; background: transparent; padding: 12px 0; color: var(--blue); min-height: 44px; }
.legal-dialog { width: 570px; padding: 32px; }
.legal-dialog .dialog-close { float: right; margin: -12px -12px 12px 16px; }
.legal-dialog h2 { margin-bottom: 24px; overflow-wrap: anywhere; }
.legal-dialog p { color: #becbd7; margin-top: 16px; }
.mobile-menu { width: 440px; }
.mobile-menu .dialog-heading { padding: 20px 24px; align-items: center; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 12px 24px 24px; }
.mobile-menu nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font: 400 22px/1.3 Inter, sans-serif; }
@media (max-width: 700px) {
  .application-layout { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
  .dialog-heading { padding: 20px 22px; gap: 12px; }
  .dialog-heading h2 { font-size: 23px; }
  .field-row { grid-template-columns: 1fr; }
  .application-terms { padding: 18px; }
  .legal-dialog { padding: 24px; }
}
