:root { --forest-950: #102a24; --forest-800: #225746; --lime: #b9d868; --line: #dce3dc; --text: #1d2925; --muted: #6d7c75; --danger: #aa3a31; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 0; color: var(--text);
  background: #091e18;
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.access-shell { width: min(350px, 88vw); z-index: 1; display: none; }
body.access-open .access-shell { display: block; animation: reveal .34s cubic-bezier(.22,.9,.3,1) both; }
.welcome { position: fixed; left: 50%; top: 50%; width: max-content; max-width: 88vw; height: 0; transform: translate(-50%, 0); z-index: 1;
  transition: opacity .16s, transform .34s cubic-bezier(.22,.9,.3,1), visibility 0s linear .34s; }
.welcome-brand { position: relative; transform: translateY(calc(-100% - 18px)); display: flex; align-items: center; gap: 20px; color: white; }
.welcome-brand div { min-width: 0; }
.welcome-symbol { width: 64px; height: 64px; flex-shrink: 0; }
.welcome-brand strong { display: block; font-size: clamp(38px, 6vw, 54px); letter-spacing: .12em; font-weight: 500; line-height: 1.1; }
.welcome-brand span { display: block; margin-top: 9px; font-size: clamp(11px, 2.4vw, 14px); letter-spacing: .015em; }
.welcome-login { position: absolute; left: 100%; top: 8px; padding: 4px 0; border-radius: 0; font-size: 16px; font-weight: 400; background: transparent; }
.welcome-login:hover, .welcome-login:focus-visible { background: transparent; color: var(--lime); }
.welcome-brand span, .welcome-login { font-family: Georgia, serif; font-style: italic; }
.horizon { position: fixed; top: 50%; left: 0; right: 0; height: 1mm; transform: translateY(-50%);
  background: linear-gradient(90deg, #937338, #a38a47 18%, #6f8150 38%, #4f7353 55%, #809052 77%, #9b7c3d);
  transition: opacity .16s; }
.branch-leaf { position: absolute; top: 50%; width: var(--leaf-size); height: calc(var(--leaf-size) * .55);
  border-radius: 0 85% 0 85%; background: var(--lime); box-shadow: inset 0 -1px rgba(16,42,36,.25);
  transform-origin: 0 50%; animation: leaf-grow .65s cubic-bezier(.22,.9,.3,1) var(--leaf-delay) both;
  pointer-events: none; }
@keyframes leaf-grow {
  from { opacity: 0; transform: translateY(-50%) rotate(var(--leaf-angle)) scale(0); }
  to { opacity: .9; transform: translateY(-50%) rotate(var(--leaf-angle)) scale(1); }
}
body.access-open .welcome { opacity: 0; visibility: hidden; transform: translate(-50%, -18px); pointer-events: none; }
body.access-open .horizon { opacity: 0; }
.access-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.access-brand strong { display: block; font-size: 13px; color: white; }
.access-brand small { color: white; font-size: 11px; }
.brand-symbol { padding: 9px 10px; border-radius: 9px; color: var(--forest-950); background: var(--lime); font-weight: 800; letter-spacing: .04em; }
.panel { display: grid; gap: 14px; padding: 26px; border-radius: 14px; background: white; box-shadow: 0 12px 34px rgba(16, 42, 36, .12); }
.panel h1 { margin: 0; font-size: 21px; }
#login-form { gap: 16px; padding: 24px; border-radius: 18px; color: white; background: rgba(6,31,24,.58);
  border: 1px solid rgba(230,255,239,.22); box-shadow: 0 20px 60px rgba(0,20,12,.24), inset 0 1px rgba(255,255,255,.1); backdrop-filter: blur(18px); }
#login-form h1 { font-size: 19px; }
#login-form input { color: var(--text); background: white; }
#login-form input:focus-visible { outline-color: var(--lime); }
#login-form a { color: white; }
#login-form button:hover, #login-form button:focus-visible { background: #2d705b; }
.panel h2 { margin: 12px 0 0; font-size: 15px; }
.panel form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; }
input:focus-visible { outline: 2px solid var(--forest-800); outline-offset: 1px; }
button { padding: 10px 14px; border: 0; border-radius: 8px; color: white; background: var(--forest-800); font: inherit; font-weight: 700; cursor: pointer; }
button:hover, button:focus-visible { background: var(--forest-950); }
.hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.message { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #e8f3df; font-size: 13px; }
.message.error { color: white; background: var(--danger); }
code { padding: 8px 10px; border-radius: 6px; background: #f2f5f1; font-size: 14px; letter-spacing: .08em; word-break: break-all; }
a { color: var(--forest-800); }
.access-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; font-size: 12px; }
.access-links a:last-child { flex-basis: 100%; text-align: center; }
button:disabled { opacity: .65; cursor: wait; }
.panel { animation: reveal .34s cubic-bezier(.22,.9,.3,1) both; }
.back-welcome { justify-self: start; padding: 0; background: transparent; color: #d6e9dc; font-size: 12px; font-weight: 400; }
.back-welcome:hover, .back-welcome:focus-visible { background: transparent !important; color: white; text-decoration: underline; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) { .welcome-brand { gap: 12px; } .welcome-symbol { width: 48px; height: 48px; } .welcome-brand span { max-width: 240px; } }
@media (max-width: 600px) { .welcome-login { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .welcome, .horizon { transition: none; } .panel, body.access-open .access-shell { animation: none; }
  .branch-leaf { animation: none; opacity: .9; transform: translateY(-50%) rotate(var(--leaf-angle)); } }
[hidden] { display: none !important; }
