:root {
  color-scheme: light;
  --ink: #172433;
  --muted: #536176;
  --navy: #111e2c;
  --paper: #f5f5f0;
  --line: #87919e;
  --sand: #edd39a;
  --focus: #11759e;
  font-family: 'Instrument Sans', Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  width: min(1120px, 100%);
  min-height: 614px;
  margin-inline: auto;
  border: 1px solid #e1e4e0;
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 70px #15243614;
}

.login-identity {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: clamp(30px, 5vw, 62px);
  color: var(--sand);
  background: radial-gradient(ellipse at 85% 60%, #26394b 0%, transparent 66%), var(--navy);
}

.login-identity::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(to right, #e4ecf416 1px, transparent 1px),
    linear-gradient(to bottom, #e4ecf416 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(155deg, transparent 6%, #000 68%);
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.055em; line-height: 1; }
.brand span:not(.brand-mark) { display: block; margin-top: 5px; color: #d5dfe9; font-size: 13px; }
.brand-mark { display: block; flex: none; width: 34px; height: 34px; border: 2px solid currentColor; position: relative; }
.brand-mark::before { content: ''; position: absolute; inset: 5px 11px 5px 5px; border: 1px solid currentColor; }
.brand-mark::after { content: ''; position: absolute; width: 1px; background: currentColor; inset: 5px 5px 5px auto; }

.facade-drawing {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: 1.47;
  align-self: center;
  color: #ecd29a;
}

.facade-outline {
  display: block;
  position: absolute;
  inset: 15% 16% 17% 5%;
  border: 1px solid #ecd29ab8;
  border-top-width: 2px;
  background: linear-gradient(115deg, #ecd29a15, #ecd29a04 55%);
  box-shadow: 12px 10px 0 -1px #1c2d3c, 12px 10px 0 #ecd29a49;
}

.facade-outline::before {
  content: '';
  position: absolute;
  top: 45%;
  inset-inline: 0;
  border-top: 1px solid #ecd29a60;
}

.facade-door, .facade-window {
  display: block;
  position: absolute;
  border: 1px solid #ecd29aab;
  box-shadow: inset 0 0 0 3px #1c2d3c;
  background: linear-gradient(145deg, #b3c1cf24 1%, #b3c1cf02 60%);
}

.facade-door { inset: 56% 63% 0 16%; }
.facade-window { inset-inline: 49% 12%; }
.facade-window-top { inset-block: 13% 65%; }
.facade-window-bottom { inset-block: 56% 14%; }
.facade-window::before { content: ''; position: absolute; inset: 0 auto 0 52%; border-left: 1px solid #ecd29aab; }

.facade-detail {
  position: absolute;
  z-index: 1;
  right: 9%;
  top: 50%;
  width: 46%;
  height: 43%;
  border: 1px dashed #ecd29a;
}

.facade-detail::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sand);
}

.dimension { position: absolute; color: #ecd29a87; }
.dimension-width { inset: auto 16% 3% 5%; border-bottom: 1px solid; }
.dimension-height { inset: 15% 5% 17% auto; border-right: 1px solid; }
.dimension::before, .dimension::after { content: ''; position: absolute; background: currentColor; }
.dimension-width::before, .dimension-width::after { width: 1px; height: 9px; bottom: -4px; }
.dimension-width::before { left: 0; }
.dimension-width::after { right: 0; }
.dimension-height::before, .dimension-height::after { width: 9px; height: 1px; right: -4px; }
.dimension-height::before { top: 0; }
.dimension-height::after { bottom: 0; }

.identity-caption {
  max-width: 16ch;
  margin: 0;
  color: #f9f6ef;
  font-size: clamp(25px, 3.5vw, 47px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -.058em;
  text-wrap: balance;
}

.account-card {
  display: grid;
  align-items: center;
  padding: clamp(32px, 5vw, 76px);
}

.account-content { width: min(100%, 350px); margin-inline: auto; }

h1 {
  margin: 0 0 clamp(22px, 4vh, 34px);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 670;
  letter-spacing: -.055em;
}

form, .code-field { display: grid; gap: 8px; }

label { color: var(--ink); font-size: 14px; font-weight: 650; }
input + label, .code-field { margin-top: 11px; }

input, button {
  min-width: 0;
  min-height: 50px;
  padding: 10px 14px;
  color: inherit;
  font: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

input { width: 100%; font-size: 16px; }
input:hover { border-color: #6f7b87; }
small { font-size: 13px; color: var(--muted); }
button { touch-action: manipulation; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:is(input, button, h1):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.primary { margin-top: 13px; color: #fff; background: var(--navy); border-color: var(--navy); }
.primary:hover:not(:disabled) { background: #223649; }
.secondary { width: 100%; margin-top: 13px; }
.secondary:hover:not(:disabled) { background: #f3f5f6; }

.status, .error { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.status:not(:empty), .error:not(:empty) { margin-top: 13px; }
.error:not(:empty) { color: #873426; background: #fff0eb; padding: 10px 12px; border-radius: 8px; }

@media (max-width: 720px) {
  .login-layout { grid-template-columns: 1fr; min-height: 0; max-width: 495px; border-radius: 21px; }
  .login-identity { gap: 28px; min-height: 174px; padding: 23px clamp(20px, 5vw, 33px); }
  .brand { gap: 9px; width: fit-content; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark::before { inset: 4px 9px 4px 4px; }
  .brand-mark::after { inset: 4px 4px 4px auto; }
  .brand strong { font-size: 23px; }
  .brand span:not(.brand-mark) { font-size: 11px; }
  .identity-caption { max-width: 12ch; font-size: clamp(23px, 6vw, 30px); }
  .facade-drawing { position: absolute; right: clamp(20px, 5vw, 33px); bottom: 18px; width: min(37%, 154px); }
  .account-card { padding: clamp(22px, 6vw, 33px); }
  .account-content { width: 100%; }
}

@media (max-width: 355px) {
  body { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
  .login-identity { min-height: 158px; gap: 20px; }
  .facade-drawing { right: 17px; width: 31%; }
}
