/* Sign-in dialog, per-minute usage meter, throttle notice, footer, legal pages.  Uses the site's theme tokens only. */
.meter { align-self: center; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter.full { color: var(--down); border-color: var(--down); }

.authcard { max-width: 420px; margin: 8vh auto 0; padding: 26px 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.authcard h1 { font-size: 24px; margin-top: 6px; }
.authcard p { margin: 0; }
.authcard .authseg { align-self: flex-start; }
.authcard .field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text2); }
.authcard .field input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--page); color: var(--text); font-size: 15px; outline: none; }
.authcard .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.authcard .autherr { min-height: 1.3em; color: var(--down); font-size: 13px; }
.authcard .btn.primary { padding: 11px 14px; font-weight: 700; background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.authcard .btn.primary:disabled { opacity: .6; cursor: progress; }
.authcard .fine { font-size: 12px; }

.throttle { max-width: 560px; margin: 8vh auto 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-fill); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.throttle p { margin: 0; }
.throttle.floating { margin: 0 0 14px; max-width: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.throttle.floating p:first-child { flex: 1 1 320px; }

.foot p { margin: 4px 0; }

/* legal pages (static/legal/*.html) */
.legal { max-width: 760px; margin: 40px auto; padding: 0 20px 60px; color: var(--text); line-height: 1.6; }
.legal h1 { font-size: 28px; margin-bottom: 4px; } .legal h2 { font-size: 18px; margin: 26px 0 6px; }
.legal ul { padding-left: 1.2em; } .legal li { margin: 6px 0; }
.legal a { color: var(--accent); }

/* narrow screens: the header holds brand + search + meter + 4 buttons, so let the actions wrap instead of overflowing the page */
.topbar-actions { flex-wrap: wrap; }
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-actions { width: 100%; margin-left: 0; justify-content: flex-start; gap: 6px; }
  .meter { font-size: 11px; padding: 3px 8px; }
  .topbar-actions .btn { padding: 5px 9px; font-size: 13px; }
}

/* sign-in lives in a modal dialog (the site itself needs no account) */
.authdialog { border: 0; padding: 0; background: transparent; width: min(440px, calc(100% - 32px)); color: var(--text); overflow: visible; }
.authdialog::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
.authdialog .authcard { margin: 0; position: relative; }
.authclose { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--text2); font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.authclose:hover { color: var(--text); background: var(--hover, rgba(127,127,127,.15)); }
.authcard .social { display: flex; flex-direction: column; gap: 8px; }
.authcard .social:empty { display: none; }
.social-btn { display: flex; justify-content: center; align-items: center; padding: 10px 14px; text-decoration: none; font-weight: 600; }
.authcard .or { text-align: center; font-size: 12px; margin: 2px 0; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.topbar-actions .btn.primary { font-weight: 700; background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.topbar .who { align-self: center; font-size: 12px; color: var(--text2); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
