/* pages.css — shared shell for punt.guru static content pages
   (about, contact, terms, privacy). Built on brand.css tokens so these stay
   visually consistent with the home page without duplicating its hero styles. */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
.page-header {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px clamp(20px, 5vw, 40px);
}
.page-header__home {
  display: inline-block;
}
.page-header__logo {
  height: 30px;
  width: auto;
  display: block;
}

/* ── Main content ───────────────────────────────────────── */
.page-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(20px, 5vw, 40px) 64px;
}
.page-eyebrow {
  margin: 0 0 12px;
  font: 600 13px/1 var(--pg-font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pg-gold);
}
.page-title {
  margin: 0 0 10px;
  font-family: var(--pg-font-display);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--pg-text-strong);
}
/* Auth pages run a single narrow centered column so the heading, tagline, and
   form share one width. Without this the card sits at the left edge of the wide
   content column with dead space beside it. */
.page-main--narrow {
  max-width: 480px;
}
.page-main--narrow .auth-card {
  max-width: 100%;
}
.page-lede {
  margin: 0 0 32px;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.5;
  color: var(--pg-text-muted);
}

.page-draft {
  margin: 0 0 32px;
  padding: 13px 16px;
  border-radius: var(--pg-radius-m);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.07);
  color: var(--pg-gold);
  font-size: 14px;
  line-height: 1.5;
}

.page-prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--pg-text);
}
.page-prose h2 {
  margin: 40px 0 12px;
  font-family: var(--pg-font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--pg-text-strong);
}
.page-prose h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--pg-text-strong);
}
.page-prose p {
  margin: 0 0 16px;
}
.page-prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
.page-prose li {
  margin: 0 0 8px;
}
.page-prose a {
  color: var(--pg-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-prose a:hover {
  color: var(--pg-gold-bright);
}
.page-prose strong {
  color: var(--pg-text-strong);
}
.page-contact-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.page-contact-list li {
  margin: 0 0 14px;
}
.page-updated {
  margin-top: 40px;
  font-size: 13px;
  color: var(--pg-text-faint);
}

/* ── Footer ─────────────────────────────────────────────── */
.page-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--pg-shell);
}
.page-footer__inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.page-footer__logo {
  height: 26px;
  width: auto;
  align-self: flex-start;
}
.page-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.page-footer__nav a {
  color: var(--pg-text-muted);
  text-decoration: none;
  font-size: 14px;
}
.page-footer__nav a:hover {
  color: var(--pg-text);
}
.page-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--pg-text-faint);
}
.page-age {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--pg-radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  font-size: 12px;
  color: var(--pg-text-muted);
}

/* ── Auth card (login / account) ───────────────────────────
   Reuses page tokens (surface, radius, gold accents) rather than
   inventing a parallel style — same visual language as the CTA
   forms on the home page, scoped for the static-page shell. */
.auth-card {
  max-width: 420px;
  margin-top: 28px;
  padding: clamp(20px, 4vw, 28px);
  border-radius: var(--pg-radius-l);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--pg-surface);
  box-shadow: var(--pg-e2);
}
.auth-card__tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  border-radius: var(--pg-radius-m);
  background: var(--pg-shell);
}
.auth-card__tab {
  flex: 1;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--pg-radius-s);
  background: transparent;
  font-family: var(--pg-font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--pg-text-muted);
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}
.auth-card__tab:hover {
  color: var(--pg-text);
}
.auth-card__tab[aria-selected='true'] {
  background: var(--pg-surface-2);
  color: var(--pg-text-strong);
}
.auth-card__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-card__form[hidden] {
  display: none;
}
.auth-card__form label {
  margin-top: 12px;
  font-family: var(--pg-font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--pg-text-muted);
}
.auth-card__form input {
  padding: 12px 14px;
  border-radius: var(--pg-radius-s);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--pg-shell);
  font-family: var(--pg-font-body);
  font-size: 15px;
  color: var(--pg-text-strong);
}
.auth-card__form input::placeholder {
  color: var(--pg-text-faint);
}
.auth-card__form input:focus-visible {
  outline: 2px solid var(--pg-gold);
  outline-offset: 1px;
}
.auth-card__hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pg-text-faint);
}
.auth-card__submit {
  margin-top: 20px;
  padding: 13px 16px;
  border: 0;
  border-radius: var(--pg-radius-pill);
  background: var(--pg-cta-gradient);
  font-family: var(--pg-font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--pg-cta-text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}
.auth-card__submit:hover,
.auth-card__submit:focus-visible {
  box-shadow: var(--pg-e2);
  transform: translateY(-1px);
}
.auth-card__submit:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}
.auth-card__submit--link {
  display: block;
  text-align: center;
  text-decoration: none;
}
/* The `hidden` attribute must beat the display rules above — otherwise a
   dynamically-revealed control (e.g. the /account "Open Telegram to connect"
   link, whose href is minted on demand) shows before it is ready. Mirrors the
   existing [hidden] overrides on .auth-card__form / __notice / __field-error. */
.auth-card__submit[hidden],
.auth-card__submit--link[hidden] {
  display: none;
}
.auth-card__submit--quiet {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--pg-text-muted);
}
.auth-card__submit--quiet:hover,
.auth-card__submit--quiet:focus-visible {
  color: var(--pg-text-strong);
  box-shadow: none;
}
.auth-card__status {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pg-text-muted);
}
.auth-card__notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 13px 15px;
  border-radius: var(--pg-radius-s);
  border: 1px solid color-mix(in srgb, var(--pg-win) 45%, transparent);
  background: color-mix(in srgb, var(--pg-win) 13%, transparent);
}
.auth-card__notice[hidden] {
  display: none;
}
.auth-card__notice svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--pg-win);
}
.auth-card__notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--pg-text);
}
.auth-card__notice strong {
  font-weight: 700;
  color: var(--pg-win);
}
/* Info variant: the Google-continues-below notice on /login#create. Gold, not
   win-green — nothing has succeeded yet, it is orientation copy. */
.auth-card__notice--info {
  border-color: color-mix(in srgb, var(--pg-gold) 45%, transparent);
  background: color-mix(in srgb, var(--pg-gold) 12%, transparent);
}
.auth-card__notice--info svg {
  color: var(--pg-gold);
}
.auth-card__notice--info strong {
  color: var(--pg-gold-bright);
}
/* Marks the Google button the notice points at, so the eye lands on it without
   reading. Border only: it is a highlight, not a second primary. */
.auth-card__google--intent {
  border-color: color-mix(in srgb, var(--pg-gold) 55%, transparent);
}
.auth-card__google--intent:hover,
.auth-card__google--intent:focus-visible {
  border-color: var(--pg-gold);
}
.auth-card__field-error {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--pg-loss);
}
.auth-card__field-error[hidden] {
  display: none;
}
.auth-card__field-error svg {
  flex: none;
  width: 15px;
  height: 15px;
}
.auth-card__form input.auth-card__input--error {
  border-color: var(--pg-loss);
}
.auth-card__form input.auth-card__input--error:focus-visible {
  outline-color: var(--pg-loss);
}
.auth-card__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  font-family: var(--pg-font-body);
  font-size: 13px;
  color: var(--pg-text-faint);
}
.auth-card__divider::before,
.auth-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.auth-card__google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: var(--pg-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 18, 33, 0.55);
  font-family: var(--pg-font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--pg-text-strong);
  cursor: pointer;
  transition:
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    background 160ms,
    border-color 160ms;
}
.auth-card__google:hover,
.auth-card__google:focus-visible {
  transform: translateY(-1px);
  background: rgba(18, 30, 52, 0.72);
  border-color: rgba(255, 255, 255, 0.34);
}
.auth-card__google:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}
.auth-card__google svg {
  width: 18px;
  height: 18px;
}
/* A button that reads as a link — used for the "use a password instead" escape hatch. */
.auth-card__linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
/* Hide the card while the routing decision resolves, so the user never sees the
   sign-up tab flip to sign-in. Removed as soon as a route is applied. */
#auth-card.auth-card--resolving {
  visibility: hidden;
}

/* ── Result states (verify / link / join / reset) ──────────
   ONE treatment for every terminal state on the auth pages, so a dead link on
   /verify looks like a dead link on /join. Each page previously hand-rolled its
   own: plain body copy in the neutral form card, no icon, no heading, and the
   only way out buried as a text link inside a sentence. The shape here is
   status icon → heading → one line of plain copy → full-width recovery button,
   which is the same action affordance every other screen already gives. */
.auth-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.auth-result[hidden] {
  display: none;
}
.auth-result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: var(--pg-radius-pill);
}
.auth-result__icon svg {
  width: 22px;
  height: 22px;
}
.auth-result--error .auth-result__icon {
  border: 1px solid color-mix(in srgb, var(--pg-loss) 45%, transparent);
  background: color-mix(in srgb, var(--pg-loss) 13%, transparent);
  color: var(--pg-loss);
}
.auth-result--success .auth-result__icon {
  border: 1px solid color-mix(in srgb, var(--pg-win) 45%, transparent);
  background: color-mix(in srgb, var(--pg-win) 13%, transparent);
  color: var(--pg-win);
}
.auth-result__title {
  margin: 0 0 8px;
  font-family: var(--pg-font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  color: var(--pg-text-strong);
}
.auth-result__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--pg-text-muted);
}
/* Actions stretch to the card width — a recovery button is never a text link
   tucked inside a sentence. Column flex so a second, quieter action stacks. */
.auth-result__actions {
  display: flex;
  flex-direction: column;
  width: 100%;
}
/* The aside is for genuinely secondary help ("still stuck? contact us"), and it
   always carries a real link — never an un-actionable instruction. */
.auth-result__aside {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pg-text-faint);
}
.auth-result__aside a {
  color: var(--pg-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-result__aside a:hover {
  color: var(--pg-text);
}

/* ── /connect (OAuth consent) ───────────────────────────── */
.consent-card {
  padding: 22px 22px 20px;
}
.consent-form {
  display: grid;
  gap: 18px;
}
.consent-client {
  display: grid;
  gap: 6px;
}
.consent-client__name {
  margin: 0;
  font-family: var(--pg-font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--pg-text-strong);
}
.consent-client__host,
.consent-destination,
.consent-viewer,
.consent-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--pg-text-muted);
}
.consent-client__host strong,
.consent-destination strong,
.consent-viewer strong {
  color: var(--pg-text);
  font-weight: 600;
}
.consent-warning {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--pg-radius-m);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.07);
  color: var(--pg-gold);
  font-size: 14px;
  line-height: 1.5;
}
.consent-warning strong {
  color: var(--pg-gold-bright);
}
.consent-link {
  color: var(--pg-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-scopes {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 4px;
}
.consent-scopes__legend {
  padding: 0;
  margin: 0 0 8px;
  font: 600 13px/1 var(--pg-font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pg-gold);
}
.consent-scope {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--pg-radius-m);
  cursor: pointer;
}
.consent-scope:hover {
  background: rgba(255, 255, 255, 0.04);
}
.consent-scope input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--pg-gold);
}
.consent-scope__text {
  display: grid;
  gap: 2px;
}
.consent-scope__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--pg-text-strong);
}
.consent-scope__desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--pg-text-muted);
}
.consent-actions {
  display: grid;
  gap: 10px;
}
.consent-cancel {
  justify-self: center;
}
