/* The outside layout (#536): app/templates/outside.html. Pages reached from a
   link or before signing in. One column about 36rem wide, phone-first. It uses
   the tokens in app.css, so dark mode follows the system appearance with no rule
   of its own here (an outside visitor has no rail to switch it). */

body.outside { min-height:100vh; display:flex; flex-direction:column; background:var(--ground); }
.out-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding:14px 16px; border-bottom:1px solid var(--rule); background:var(--surface); }
.out-brand { font-family:var(--serif); font-size:1.15rem; font-weight:600; letter-spacing:-.01em; }
.out-context { font-size:.82rem; color:var(--muted); text-align:right; }
.out-main { flex:1 0 auto; width:100%; max-width:36rem; margin:0 auto; padding:24px 16px 32px; }
.out-main h1 { font-size:1.6rem; margin-top:.4rem; }
.out-main button, .out-main .btn { min-height:44px; }
.out-main input, .out-main select { min-height:44px; }
.out-auth-card { margin-top:18px; padding:20px; }
.out-pw__form { margin-top:12px; }
.out-pw__name-label { margin-top:0; }
.out-pw__submit { margin-top:16px; }
.out-pw > summary { list-style:none; cursor:pointer; }
.out-pw > summary::-webkit-details-marker { display:none; }
.out-pw[open] > summary { margin-bottom:0; }

/* Buttons that fill the width, for a thumb. */
.out-wide, a.out-wide, button.out-wide { display:flex; align-items:center; justify-content:center; width:100%;
  min-height:48px; font-size:.95rem; border-radius:8px; }
.out-or { display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--muted); font-size:.8rem; }
.out-or::before, .out-or::after { content:""; flex:1; height:1px; background:var(--rule); }
.out-alert { margin:16px 0 0; padding:10px 14px; border-radius:8px; background:var(--surface);
  border:1px solid var(--bad-line); border-left:4px solid var(--sev-high); font-size:.9rem; }
.out-alert.notice { border-color:var(--warn-line); border-left-color:var(--ochre); }
.out-foot { margin:14px 0 0; font-size:.82rem; color:var(--muted); }
.out-field { position:relative; }
.out-field .out-show { all:unset; position:absolute; right:10px; top:50%; transform:translateY(-50%); cursor:pointer;
  color:var(--accent); font-size:.82rem; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.out-field input { padding-right:4.5rem; }

/* The submit region: in the flow on a desktop, pinned to the bottom on a phone. */
.out-submit { width:100%; max-width:36rem; margin:0 auto; padding:0 16px 24px; }
.out-submit:not(:has(*)) { display:none; }

@media (max-width: 760px) {
  .out-submit { position:sticky; bottom:0; z-index:20; max-width:none; padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    background:var(--surface); border-top:1px solid var(--rule); box-shadow:0 -6px 16px rgba(14,28,27,.08); }
  .out-submit .out-wide, .out-submit > .btn { width:100%; min-height:48px; }
  .out-submit .ah { display:flex; width:100%; align-items:center; gap:8px; }
  .out-submit .ah > .out-wide { flex:1; margin-top:0; }
}
/* The same short cross-fade as app.css (#1455), so moving to and from the portal is one motion. */
@media (prefers-reduced-motion:no-preference) {
  @view-transition { navigation:auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration:.12s; }
}
