:root {
  color-scheme: light dark;
  --paper: light-dark(#faf9f6, #141513);
  --ink: light-dark(#20211e, #f6f4ec);
  --muted: light-dark(#5f625b, #b3b5ab);
  --line: light-dark(#d6d7ce, #41443b);
  --field: light-dark(#fffefa, #1b1d19);
  --gutter: clamp(24px, 3.4vw, 70px);
  font: 16px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
:root:has(meta[name=color-scheme][content=dark]) { color-scheme: dark }
:root:has(meta[name=color-scheme][content=light]) { color-scheme: light }
* { box-sizing: border-box }
body, p, h1, h2, ul { margin: 0 }
body { -webkit-font-smoothing: antialiased }
button, input { font: inherit; color: inherit }
button { cursor: pointer }
a { color: inherit; text-decoration: none }
a:hover { text-decoration: underline; text-underline-offset: 4px }
:focus-visible { outline: 3px solid #ac7128; outline-offset: 3px }
[hidden] { display: none !important }
.skip { position: absolute; left: 15px; top: -80px; z-index: 10; padding: 10px; background: var(--paper) }
.skip:focus { top: 10px }
.entry { display: grid; grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); grid-template-rows: 1fr auto; min-height: 100vh; min-height: 100svh }
.passage {
  position: relative; isolation: isolate; grid-area: 1 / 1 / 3 / 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(24px, 4vh, 52px) var(--gutter) clamp(145px, 17vh, 185px);
  min-height: 660px; color: #faf7ee;
  background: #171913 url(assets/kavren-passage.webp) 53% 50% / cover;
}
.passage::before, .passage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1 }
.passage::before { background: linear-gradient(0deg, #0b0c0be8 0%, #100e0b77 27%, transparent 66%), linear-gradient(110deg, #100f0e36, transparent 65%) }
.passage::after { background: radial-gradient(ellipse at 63% 49%, #ffb14c35, transparent 42%); mix-blend-mode: screen }
.signature { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; font-weight: 600; font-size: 26px; letter-spacing: -.07em }
.signature img { width: 38px; height: 38px }
.signature:hover { text-decoration: none }
.statement p { font-size: clamp(38px, 4.5vw, 80px); line-height: .99; letter-spacing: -.068em; font-weight: 500 }
.statement span { font: 400 1em/1.08 RelayPixel, monospace; letter-spacing: -.045em }
.sheet { grid-area: 1 / 2 / 3 / 3; display: flex; flex-direction: column; padding: clamp(16px, 3.2vh, 40px) var(--gutter) 20px; min-width: 0 }
.utility, .legal { display: flex; align-items: center }
.utility { justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px }
.utility a, .legal a { display: inline-flex; align-items: center; min-height: 44px }
#theme { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent }
#theme:hover { background: var(--field) }
#theme span { width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%) }
.auth-form { width: min(100%, 390px); margin: auto; padding-block: clamp(44px, 7vh, 84px) }
h1 { font-size: clamp(34px, 3.2vw, 52px); font-weight: 500; line-height: 1.1; letter-spacing: -.065em }
.auth-intro { max-width: 38ch; margin: 11px 0 34px; color: var(--muted); font-size: 15px }
form, .auth-field { display: grid }
form { gap: 18px }
.auth-field { gap: 7px }
label { font-size: 14px; font-weight: 600 }
.auth-field input {
  min-width: 0; width: 100%; min-height: 51px; border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 15px; background: var(--field); font-size: 16px;
}
input::placeholder { color: var(--muted); opacity: .79 }
input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px }
.auth-field small { color: var(--muted); font-size: 12px }
.password-field { position: relative }
.password-field input { padding-right: 56px }
#password-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 46px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; border-radius: 7px; color: var(--muted) }
#password-toggle svg { width: 19px }
#password-toggle:not([aria-pressed=true]) .slash { display: none }
.auth-submit { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; min-height: 51px; border: 0; border-radius: 8px; padding: 12px 17px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px }
.auth-submit span { font-size: 20px; line-height: 1 }
.auth-submit:hover { opacity: .88 }
.account-switch { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted) }
.account-switch a { margin-left: 3px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px }
.form-error { margin-bottom: 18px; border-inline-start: 3px solid currentColor; padding: 9px 12px; color: light-dark(#963e18,#ffac80); background: light-dark(#fae8dd,#39271d); font-size: 14px }
.legal { justify-content: center; gap: 24px; font-size: 12px; color: var(--muted) }
.entry-guide { grid-area: 2 / 1; position: relative; min-width: 0; color: #faf7ee; padding: 0 var(--gutter) clamp(22px, 4vh, 50px) }
.entry-guide a { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #ffffff45; padding-block: 14px 2px }
.entry-guide a:hover { text-decoration: none }
.entry-guide a:is(:hover,:focus-visible) strong { text-decoration: underline; text-underline-offset: 4px }
.entry-guide strong { display: block; font-size: 16px; font-weight: 500 }
.entry-guide code { color: #d3c2a9; font: 12px/1.6 Inter, "Segoe UI", system-ui, sans-serif }
.entry-guide b { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff55; border-radius: 50%; font-weight: 400 }
@media (prefers-reduced-motion: no-preference) {
  .passage::after { animation: daylight 7s ease-in-out infinite alternate }
  .statement p, .auth-form h1, .auth-intro, .auth-field, .auth-submit { animation: settle .55s cubic-bezier(.2,.72,.2,1) both }
  .auth-intro { animation-delay: 50ms }
  .auth-field { animation-delay: 90ms }
  .auth-field + .auth-field, .auth-submit { animation-delay: 140ms }
  @keyframes settle { from { opacity: 0; transform: translateY(9px) } }
  @keyframes daylight { from { opacity: .15; transform: translateY(-1%) } to { opacity: .95 } }
}
@media (max-width: 739px) {
  .entry { display: flex; flex-direction: column }
  .passage { min-height: 202px; padding: 19px 24px 22px; gap: 25px; background-position: center 46% }
  .passage::after { animation: none }
  .signature { font-size: 20px; gap: 8px }
  .signature img { width: 29px; height: 29px }
  .login-entry .passage { min-height: 0; padding: 14px 24px; background-position: center 42% }
  .login-entry .statement { display: none }
  .statement p { font-size: 37px }
  .sheet { padding: 5px 24px 12px; flex: 1 }
  .utility { gap: 4px; margin-inline-end: -7px }
  .utility > a { white-space: nowrap }
  .auth-form { padding: 20px 0 28px }
  .auth-intro { margin: 9px 0 23px }
  .entry-guide { padding: 0 24px 14px; background: #191914 }
  .entry-guide a { border-top: 0 }
}
