/*
 * Sign-in, consent, the host's pages and errors (body.app). Loaded after
 * site.css by authPage(), hostPage() and errorPage(); host.css adds the event
 * cards and guest list on top.
 */

/* Short pages keep the closing line at the bottom of the window. */
body.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body.app > main {
  flex: 1 0 auto;
}

.app h1 {
  font-size: clamp(40px, 4.6vw, 60px);
  line-height: 1.04;
}
.app .lede {
  max-width: 34em;
  margin-top: 16px;
  font-size: 18px;
}
.app .lede strong {
  color: var(--ink);
  font-weight: 600;
}
.app .fine {
  max-width: 38em;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}
.app .lede a,
.app .fine a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--hair-3);
  text-underline-offset: 3px;
}
.app .lede a:hover,
.app .fine a:hover {
  text-decoration-color: currentColor;
}
.app .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.app .notice {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--butter-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.app .panel {
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.app .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.app .back-link:hover {
  color: var(--ink);
}
.app .back-link svg {
  transform: scaleX(-1);
}

/* Form fields */
.app .field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.app .field input {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: inset 0 1px 2px rgba(57, 35, 51, 0.04);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.2s ease;
}
.app .field input::placeholder {
  color: var(--ink-3);
  opacity: 0.8;
}
.app .field input:hover {
  border-color: var(--hair-3);
}
.app .field input:focus-visible {
  border-color: var(--ink);
  outline-offset: 2px;
}

/* Sign out sits in the header beside My events and Connected agents. */
.site .site-nav .nav-signout {
  display: flex;
  margin: 0;
}
.site .site-nav .nav-signout .nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.site .site-nav .nav-signout .nav-link:hover {
  background: rgba(57, 35, 51, 0.06);
  color: var(--ink);
}
@media (max-width: 599px) {
  .site .site-nav .nav-signout .nav-link {
    padding: 0 12px;
  }
}
@media (max-width: 374px) {
  .site .site-nav .nav-signout .nav-link {
    padding: 0 10px;
  }
}

/* A closing line, not the full marketing footer. */
.app .app-footer {
  margin-top: 96px;
}
.app .app-footer .footer-base {
  border-top: 0;
}

/* Sign-in and consent: one stationery card beside a painting. */
.auth-site .auth-page {
  padding-top: 40px;
}
.auth-site .auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1040px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.auth-site .auth-copy {
  padding: 32px 24px;
}
.auth-site .auth-art {
  display: none;
}
.auth-site h1 {
  font-size: clamp(36px, 4.2vw, 52px);
}
.auth-site form {
  display: grid;
  justify-items: start;
  gap: 20px;
  margin-top: 32px;
}
.auth-site form .field {
  justify-self: stretch;
}
.auth-site form .actions {
  margin-top: 4px;
}

/* Error pages */
.error-site .error-page {
  max-width: 720px;
  padding-top: 72px;
}

@media (min-width: 600px) {
  .auth-site .auth-page {
    padding-top: 56px;
  }
  .auth-site .auth-copy {
    padding: 48px;
  }
  .error-site .error-page {
    padding-top: 96px;
  }
}
@media (min-width: 900px) {
  .auth-site .auth-card {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    min-height: 560px;
    border-radius: var(--r-xl);
  }
  .auth-site .auth-copy {
    align-self: center;
    padding: 64px 56px;
  }
  .auth-site .auth-art {
    display: block;
    background: var(--cream);
  }
  .auth-site .auth-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
@media (max-width: 599px) {
  .app .lede {
    font-size: 17px;
  }
  .app .actions .btn {
    flex: 1 1 auto;
  }
  .app .app-footer {
    margin-top: 72px;
  }
}

/* Sign-in, consent and connected agents (auth.ts) */

/* The header's "Connected agents" link reads "Agents" where site.css hides .nav-more
   (keep this breakpoint in step with site.css). */
.app .site-nav .nav-less {
  display: none;
}
@media (max-width: 419px) {
  .app .site-nav .nav-less {
    display: inline;
  }
}
/* Undo style.css's legacy .actions: its bottom margin and tablet column. */
.app .actions {
  flex-direction: row;
  margin-bottom: 0;
}
.auth-site form .actions {
  justify-self: stretch;
}

.auth-site .lede strong,
.auth-site .fine strong {
  overflow-wrap: anywhere;
}
.auth-site .fine strong {
  color: var(--ink-2);
  font-weight: 600;
}
.auth-site .auth-copy > .lede + .fine {
  margin-top: 12px;
}
.auth-site .auth-copy > form + .fine,
.auth-site .auth-copy > .actions + .fine {
  margin-top: 24px;
}
.auth-site .auth-copy > .lede + .actions,
.auth-site .auth-copy > .fine + .actions {
  margin-top: 32px;
}

/* Consent: what the agent may do, as a calm checklist on a paper inset. */
.auth-site .consent-scope {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  background: var(--paper);
}
.auth-site .consent-scope h2 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}
.auth-site .consent-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.auth-site .consent-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}
.auth-site .consent-list svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  background: var(--olive-soft);
  color: var(--olive);
}
.auth-site .consent-return {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
}
.auth-site .consent-return strong {
  color: var(--ink-2);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.auth-site .consent-scope + .notice {
  margin-top: 16px;
}

/* Connected agents: one panel, one row per agent. */
.host-site .agent-list,
.host-site .agent-empty {
  max-width: 760px;
  margin-top: 40px;
}
.host-site .agent-list {
  padding: 4px 24px;
  list-style: none;
}
.host-site .agent-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
}
.host-site .agent-row + .agent-row {
  border-top: 1px solid var(--hair);
}
.host-site .agent-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.host-site .agent-av-butter {
  background: var(--butter);
}
.host-site .agent-av-blush {
  background: var(--blush);
}
.host-site .agent-av-sky {
  background: var(--sky);
}
.host-site .agent-who {
  min-width: 0;
}
.host-site .agent-name {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.host-site .agent-meta {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.45;
}
.host-site .agent-list + .fine {
  margin-top: 20px;
}
.host-site .agent-empty {
  padding: 32px;
}
.host-site .agent-empty h2 {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.host-site .agent-empty p {
  max-width: 34em;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.host-site .agent-empty .actions {
  margin-top: 24px;
}

@media (max-width: 599px) {
  .auth-site .consent-scope {
    padding: 16px;
  }
  .host-site .agent-list {
    padding-inline: 16px;
  }
  .host-site .agent-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    padding-block: 16px;
  }
  .host-site .agent-avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .host-site .agent-name {
    font-size: 16px;
  }
  .host-site .agent-empty {
    padding: 24px;
  }
}

/* The emailed code: digits set large enough to check at a glance. */
.auth-site .auth-code input {
  max-width: 12em;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.auth-site .auth-code input::placeholder {
  letter-spacing: 0.08em;
}

/* Upload links: a roomy file picker with the same pill as the buttons. */
.auth-site .auth-upload input[type='file'] {
  height: auto;
  padding: 12px;
  font-size: 15px;
  cursor: pointer;
}
.auth-site .auth-upload input[type='file']::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 600 14px var(--font-ui);
  cursor: pointer;
}

/* "Not you? Use a different account": a form button that reads as a link. */
.app .auth-switch {
  margin-top: 8px;
}
.app .link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--hair-3);
  text-underline-offset: 3px;
  cursor: pointer;
}
.app .link-button:hover {
  text-decoration-color: currentColor;
}

/* Report form: a calm list of reasons, an optional note, one checkbox. */
.auth-site .choice-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  justify-self: stretch;
}
.auth-site .choice-list legend {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}
.auth-site .choice-list label,
.auth-site .check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}
.auth-site .choice-list label {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
}
.auth-site .choice-list label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.auth-site .choice-list input,
.auth-site .check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}
.auth-site .report-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink);
  font: 400 16px var(--font-ui);
  resize: vertical;
}
.auth-site .field .optional {
  color: var(--ink-3);
  font-weight: 400;
}

/* Provider choices sit above the email option. */
.auth-site .social-signin {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.auth-site .social-signin form {
  margin: 0;
  display: block;
}
.auth-site .social-button {
  width: 100%;
  justify-content: center;
}
.auth-site .social-apple {
  background: #111;
  color: #fff;
  border-color: #111;
}
.auth-site .social-apple:hover {
  background: #333;
  color: #fff;
}
.auth-site .signin-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 0;
  color: var(--ink-3);
  font-size: 14px;
}
.auth-site .signin-divider::before,
.auth-site .signin-divider::after {
  content: '';
  height: 1px;
  background: var(--hair);
  flex: 1;
}
.legal-page {
  max-width: 780px;
  padding-block: 56px 80px;
  line-height: 1.75;
}
.legal-page h1 {
  font-size: clamp(38px, 6vw, 64px);
}
.legal-page h2 {
  margin-top: 32px;
  font-size: 25px;
}
.legal-page p,
.legal-page ul {
  margin-block: 16px;
}
.legal-page ul {
  padding-left: 24px;
}
.legal-page a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
