/* Account controls extend the existing paper, pine and sand palette. */
.site-header .nav { gap: 24px; }
.site-header .nav-links { margin-left: auto; }
.auth-header { position: relative; min-width: 0; }
.auth-actions, .auth-member { display: flex; align-items: center; gap: 10px; }
.auth-button { min-height: 44px; padding: 9px 16px; border: 1px solid #ffffff80; color: white; background: transparent; font-size: 12px; line-height: 1.3; cursor: pointer; transition: background .16s, border-color .16s; }
.auth-button-register { background: var(--sand); border-color: var(--sand); color: #192b28; }
.auth-button-register:hover { background: #e6cfa6; border-color: #e6cfa6; }
.auth-button-login:hover { background: #ffffff18; border-color: white; }
.auth-identity { max-width: 200px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.auth-header-status { position: absolute; top: calc(100% + 8px); right: 0; width: min(300px, 80vw); font-size: 11px; line-height: 1.5; text-align: right; color: #fff8eb; background: #20322f; }
.auth-header-status:not(:empty) { padding: 8px 12px; }
.auth-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #0a1c2450; overflow-y: auto; }
.auth-dialog::backdrop { background: #102925b8; }
.auth-dialog-inner { position: relative; padding: 38px 34px 24px; }
.auth-close { position: absolute; top: 7px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.auth-close:hover { color: var(--ink); }
.auth-eyebrow { display: block; margin: 4px 25px 15px 0; color: var(--muted); font-size: 10px; letter-spacing: 1.4px; }
.auth-dialog h2 { font: 400 35px/1.12 Georgia, serif; letter-spacing: -1px; margin: 0; }
.auth-description { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 16px 0 25px; }
.auth-dialog fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.auth-field { margin-top: 17px; }
.auth-field:first-child { margin-top: 0; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.auth-field input { display: block; width: 100%; min-height: 48px; padding: 11px 12px; background: #fffdf8; color: var(--ink); border: 1px solid #a6b3a8; border-radius: 0; font-size: 16px; line-height: 1.4; }
.auth-field input:focus-visible { outline-offset: 2px; }
.auth-field small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.auth-status { min-height: 20px; margin: 17px 0 13px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.auth-status[data-state="error"] { color: #963b27; }
.auth-status[data-state="success"] { color: var(--pine); }
.auth-submit { width: 100%; min-height: 48px; justify-content: space-between; }
.auth-switch-line { padding-top: 17px; margin: 20px 0 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.auth-switch { min-height: 44px; border: 0; background: transparent; color: var(--pine); font-size: 12px; padding: 5px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.auth-secure-notice { padding: 15px; border: 1px solid var(--line); font-size: 13px; line-height: 1.7; background: var(--soft); }
.auth-secure-notice a { display: inline-block; padding: 8px 0; color: var(--pine); }
.auth-dialog button:disabled, .auth-button:disabled { cursor: wait; opacity: .65; }
.auth-field input:disabled { background: var(--soft); color: var(--muted); }
@media (max-width: 1100px) {
  .site-header .nav { flex-wrap: wrap; height: auto; min-height: 98px; gap: 12px 20px; padding: 18px 0; }
  .site-header .brand { flex: 1; }
  .site-header .nav-links { order: 3; width: 100%; margin-left: 0; justify-content: flex-end; }
  .site-header .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .hero-content { padding-top: 145px; }
}
@media (max-width: 700px) {
  .site-header .nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0 8px; }
  .site-header .brand { font-size: 18px; }
  .site-header .brand span { letter-spacing: 1.4px; font-size: 8px; }
  .site-header .nav-links { grid-column: 1 / -1; justify-content: space-between; gap: 8px; }
  .site-header .nav-links a:nth-child(n) { display: inline-flex; font-size: 11px; }
  .auth-actions, .auth-member { gap: 6px; }
  .auth-button { padding: 9px 11px; font-size: 11px; }
  .auth-member { max-width: 170px; }
  .auth-identity { max-width: 100px; font-size: 10px; }
  .auth-dialog-inner { padding: 38px 24px 20px; }
  .auth-dialog h2 { font-size: 31px; }
  .hero-content { padding-top: 145px; }
}
@media (max-width: 370px) {
  .site-header .nav { grid-template-columns: 1fr; }
  .site-header .brand { text-align: center; }
  .auth-header { justify-self: center; }
  .auth-member { max-width: 100%; }
  .auth-identity { max-width: 185px; }
  .site-header .nav-links { grid-column: 1; }
  .hero-content { padding-top: 200px; }
}
@media (prefers-reduced-motion: reduce) { .auth-button { transition: none; } }
@media print { .auth-dialog { display: none; } }

.auth-result-page{min-height:100svh;display:grid;place-items:center;padding:28px}
.auth-result-card{max-width:620px;width:100%;padding:clamp(26px,6vw,56px);border:1px solid var(--line);background:var(--paper)}
.auth-result-card .eyebrow{color:var(--muted);margin:0 0 20px}
.auth-result-card h1{font:400 clamp(30px,5vw,44px)/1.15 Georgia,serif;letter-spacing:-1px;margin:0 0 22px;max-width:none}
.auth-result-card p:not(.eyebrow){color:var(--muted);margin-bottom:26px}
.auth-result-card .button{min-height:48px}
