:root {
  color-scheme: light;
  --paper: #f8f7f4;
  --ink: #192d26;
  --muted: #526359;
  --green: #183d32;
  --rule: #d4d8ce;
  --serif: "Baskervville", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "brand image" "form image";
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(14px, 1.65vw, 32px);
}
.masthead { grid-area: brand; padding: clamp(14px, 2.1vw, 38px) clamp(22px, 3.35vw, 64px); }
.brand { display: inline-flex; gap: 11px; align-items: center; font: 500 25px/1.1 var(--serif); letter-spacing: -.055em; }
.brand img { width: 39px; height: 39px; }
.architecture {
  grid-area: image;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #d5cfbd;
}
.identity-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  filter: saturate(.61) contrast(.96);
}
.architecture::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #21302616;
  background: linear-gradient(160deg, #222f2220, transparent 48%, #5c573014);
}
.account {
  grid-area: form;
  display: grid;
  place-items: center;
  padding: clamp(34px, 5vh, 68px) clamp(32px, 5vw, 90px) clamp(64px, 13vh, 150px);
}
.account-inner { width: 100%; max-width: 404px; }
.intro { margin-bottom: 32px; }
h1 { margin: 0; font: 500 clamp(43px, 4.2vw, 68px)/1.04 var(--serif); letter-spacing: -.062em; }
.intro p { margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
form, .field { display: grid; }
form { gap: 20px; }
.field { gap: 8px; }
label { font-weight: 620; font-size: 14px; }
input {
  min-width: 0;
  width: 100%;
  min-height: 49px;
  padding: 10px 14px;
  border: 1px solid #a5b0a5;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
}
input:hover { border-color: #7a8b7d; }
input:focus { border-color: var(--green); }
:focus-visible { outline: 2px solid #386d52; outline-offset: 3px; }
.password-field { position: relative; }
.password-field input { padding-right: 76px; }
.visibility {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.visibility:hover { text-decoration: underline; text-underline-offset: 3px; }
.hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.notice {
  margin: 0;
  border-left: 3px solid #a34437;
  padding: 10px 12px;
  color: #702c22;
  background: #f5e7e1;
  font-size: 14px;
  line-height: 1.45;
}
.submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 620;
  cursor: pointer;
}
.submit:hover { background: #234d3e; }
.submit:disabled { opacity: .75; cursor: wait; }
.arrow { font: 22px/1 var(--sans); }
.mode-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 7px;
  margin-top: 27px;
  padding-top: 19px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.mode-switch a { color: var(--green); font-weight: 650; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "brand" "image" "form";
    padding: 0 clamp(20px, 6vw, 44px);
  }
  .masthead { padding: 23px 0 18px; }
  .brand { font-size: 23px; gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .architecture { height: clamp(88px, 19svh, 145px); }
  .identity-photo { object-position: center 52%; }
  .account { align-items: start; padding: clamp(28px, 4.8vh, 45px) 0 38px; }
  .account-inner { max-width: 470px; }
  h1 { font-size: 44px; }
  .intro { margin-bottom: 23px; }
  .intro p { margin-top: 9px; }
  form { gap: 16px; }
  .mode-switch { margin-top: 22px; padding-top: 15px; }
}
@media (max-width: 760px) and (max-height: 580px) {
  .entry { grid-template-areas: "brand" "form"; grid-template-rows: auto 1fr; }
  .architecture { display: none; }
  .account { padding-top: 16px; }
}
