/* Account presentation only. Kept after forms.css so the builder's shared
   controls (including the handle prefix) can evolve independently. */
.account-page { background: #f5f9f8; }
.account-report {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: 28px 32px 24px 24px;
  background: var(--paper);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 32px;
}
.account-sidebar {
  display: block;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
  position: sticky;
  top: 0;
  height: auto;
  max-height: 100svh;
  padding: 0 24px 24px 0;
  border-right: 3px double var(--binding);
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.account-sidebar .brand { margin: 0 0 28px; }
.account-sidebar nav { display: grid; gap: 4px; }
.account-sidebar nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; }
.account-sidebar .site-pages { margin-top: 24px; }
.account-sidebar [aria-current="page"] { background: var(--selected); font-weight: 700; color: var(--ink); text-decoration: none; }
.account-report > .form-page, .account-report > .account-footer { grid-column: 2; min-width: 0; }
.account-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.account-header .brand { margin: 0; }
.account-header nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9375rem; }
.account-header nav a, .account-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.account-page .form-page { width: 100%; max-width: none; margin: 0; padding: 0 0 40px; flex: 1; }
/* Short forms stay comfortable without narrowing the page around them. */
.account-page .form-page > form { width: 100%; max-width: 44rem; }
.account-page .form-page h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 24px; padding-bottom: 24px; border-bottom: 3px double var(--binding); letter-spacing: -.035em; }
.account-page .form-page p { margin-block: 0 20px; overflow-wrap: anywhere; }
.account-page .form-page form { gap: 24px; margin: 0 0 28px; }
.account-page .form-page label { gap: 8px; font-size: 1rem; line-height: 1.5; }
.account-page .form-page .hint { font-size: .9375rem; }
.account-page .form-page input:not([type="hidden"]) { min-width: 0; min-height: 48px; border: 1px solid var(--binding); border-radius: 0; background: #fff; padding: 10px 12px; font-size: 1rem; font-weight: 400; line-height: 1.5; }
.account-page .form-page input:hover { border-color: var(--ink); }
.account-page .form-page input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.account-page .form-page button { min-height: 48px; max-width: 100%; border: 2px solid var(--ink); border-radius: 0; padding: 10px 26px; background: var(--ink); color: #fff; font-size: 1rem; line-height: 1.5; }
.account-page .form-page button:hover { background: var(--accent); border-color: var(--accent); }
.account-page .form-page button:disabled { cursor: not-allowed; opacity: .6; }
.account-page .form-page .aside { font-size: .9375rem; line-height: 1.65; }
.account-page .form-page .error, .account-page .form-page .notice { padding: 16px 18px; font-size: 1rem; }
.account-page .form-page .error { color: #762923; border-left-color: #a8322d; }
.account-page .form-page .notice { background: var(--selected); }
/* Compatible with the fixed @ prefix introduced in the account update. */
.account-page .form-page .handle-field { display: flex; align-items: stretch; }
.account-page .form-page .handle-at { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--binding); border-right: 0; border-radius: 0; background: var(--selected); }
.account-page .form-page .handle-field input { flex: 1; width: 0; border-radius: 0; }
.account-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 24px; border-top: 1px solid var(--rule); padding-top: 16px; color: var(--muted); font-size: .875rem; }
@media (max-width: 900px) {
  .account-report { display: flex; flex-direction: column; padding: 20px 24px; }
  .account-sidebar { position: static; width: 100%; max-height: none; padding: 0 0 16px; margin-bottom: 28px; border-right: 0; border-bottom: 3px double var(--binding); overflow: visible; }
  .account-sidebar .brand { margin-bottom: 12px; }
  .account-sidebar nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .account-sidebar .site-pages { margin-top: 12px; }
}
@media (max-width: 600px) {
  .account-report { padding: 20px; }
  .account-header { gap: 12px; padding-bottom: 16px; }
  .account-header nav { gap: 8px 20px; }
  .account-page .form-page { padding-block: 0 32px; }
  .account-page .form-page h1 { padding-bottom: 20px; }
  .account-page .form-page button { width: 100%; }
}
@media (forced-colors: active) {
  .account-report { background: Canvas; }
  .account-sidebar { border-color: CanvasText; }
  .account-page .form-page .error, .account-page .form-page .notice { border: 1px solid CanvasText; border-left-width: 4px; }
}

/* Pricing and admin */
/* Pricing is a public page, without the account layout's left binding or narrow form column. */
.pricing-page .account-report { display: flex; flex-direction: column; padding-inline: 40px; }
.pricing-page .form-page { padding-top: 32px; }
.pricing-page .form-page { max-width: none; }
.plan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 24px; margin: 28px 0 20px; }
@media (max-width: 760px) {
  .pricing-page .account-report { padding-inline: 20px; }
}
.plan { border: 1px solid var(--rule); border-top: 4px solid var(--ink); padding: 18px 20px 14px; }
.plan h2 { margin: 0; font-size: 1.25rem; }
.plan-price { margin: 4px 0 12px; font-size: 1.5rem; font-weight: 700; }
.plan-soon { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 8px; border: 1px solid var(--muted); color: var(--muted); font-size: .8125rem; font-weight: 400; }
.plan ul { margin: 0 0 12px; padding-left: 1.2em; font-size: 1rem; }
.plan li { margin: 4px 0; }
.plan-note, .admin-meta { color: var(--muted); font-size: .9375rem; }
.plan-action { font-weight: 700; }
.plan-key { width: 100%; border-collapse: collapse; margin: 20px 0 8px; font-size: .9375rem; display: block; overflow-x: auto; }
.plan-key caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.plan-key th, .plan-key td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.admin-accounts { list-style: none; margin: 12px 0 0; padding: 0; }
.admin-accounts li { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px; padding: 14px 0; border-top: 1px solid var(--rule); }
.admin-who { min-width: 0; overflow-wrap: anywhere; }
.admin-meta { display: block; }
.admin-plan { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 0; }
.admin-plan label { flex-basis: 100%; font-size: .875rem; color: var(--muted); }
.admin-plan select { min-height: 46px; font: inherit; padding: 6px 10px; border: 1px solid #8d9b96; border-radius: 0; background: var(--paper); color: var(--ink); }

/* Invite link page */
.join-for { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.join-for h2 { margin: 0 0 8px; font-size: 1.25rem; }
.join-for ol { padding-left: 1.3em; }
.join-for li { margin: 8px 0; }
.join-for .copy { display: block; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--rule); background: #f7f9f8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9375rem; overflow-wrap: anywhere; }


/* OAuth consent */
.consent fieldset { border: 1px solid var(--rule); margin: 22px 0; padding: 14px 18px 16px; }
.consent legend { padding: 0 6px; font-weight: 700; }
.consent .choice { display: flex; align-items: center; gap: 10px; margin: 8px 0; min-height: 32px; font-weight: 400; }
.consent .choice input { width: auto; height: auto; min-height: 0; margin: 0; flex: none; }
.consent .new-agent { margin: 6px 0 0 28px; }
.consent-actions { margin-top: 18px; }
.consent-deny { margin-top: 12px; }
.account-page .form-page .consent-deny button.quiet { background: var(--paper); color: var(--ink); border: 1px solid #8d9b96; }

.consent .reconnect-head { margin: 20px 0 2px; padding-top: 14px; border-top: 1px solid var(--rule); }

.account-footer .footer-links { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.legal h2 { margin-top: 34px; }
.legal p, .legal li { max-width: 46rem; }
.legal .legal-meta { color: var(--muted, #5c6b68); font-size: .9375rem; }

/* Six-digit code entry. Without the script this is an ordinary text field; with it, six boxes are drawn over it. */
.code-entry { position: relative; max-width: 22rem; margin: 6px 0 4px; }
.code-entry input { width: 100%; font: 700 1.5rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .35em; text-align: center; }
.code-entry .code-boxes { display: none; }
.code-entry.enhanced { height: 4rem; }
.code-entry.enhanced .code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 100%; }
.code-entry.enhanced .code-boxes span { display: flex; align-items: center; justify-content: center; border: 2px solid #8d9b96; background: #fff; color: #202726;
  font: 700 1.75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; transition: border-color .12s, box-shadow .12s, transform .12s; }
.code-entry.enhanced .code-boxes span.filled { border-color: #202726; }
.code-entry.enhanced .code-boxes span.active { border-color: #1f6f78; box-shadow: 0 0 0 3px rgb(31 111 120 / .22); transform: translateY(-1px); }
/* The real field lies under the boxes, invisible but focusable, so typing, pasting and autofill all still work.
   The boxes sit on top and let clicks through to it. (The selector is long on purpose: it has to outrank the
   site's ordinary field styling, which would otherwise paint a white field over the boxes.) */
.code-entry.enhanced .code-boxes { position: relative; z-index: 1; pointer-events: none; }
.account-page .form-page .code-entry.enhanced input,
.account-page .form-page .code-entry.enhanced input:focus,
.account-page .form-page .code-entry.enhanced input:focus-visible { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: transparent; caret-color: transparent; letter-spacing: 0; outline: none; box-shadow: none; }
.code-entry.enhanced input::selection { background: transparent; }
@media (prefers-reduced-motion: reduce) { .code-entry.enhanced .code-boxes span { transition: none; } }
@media (forced-colors: active) { .code-entry.enhanced .code-boxes span.active { outline: 2px solid Highlight; } }
.reset-again { margin-top: 22px; }
.account-page .form-page .reset-again button.quiet { background: var(--paper); color: var(--ink); border: 1px solid #8d9b96; min-height: 40px; padding: 6px 14px; }

/* Admin > Plans */
.account-page .plan-edit { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--rule, #c7d0cc); max-width: 34rem; }
.account-page .plan-edit h2 { margin-top: 0; }
.account-page .plan-edit .plan-field { margin: 0 0 12px; }
.account-page .plan-edit .plan-field label { display: block; margin: 0; font-weight: 600; }
.account-page .plan-edit .plan-field label .hint { font-weight: 400; color: var(--muted); }
.account-page .plan-edit .plan-field input:not([type=checkbox]) { display: block; width: 100%; max-width: 12rem; margin: 4px 0 0; }
.account-page .plan-edit .plan-field.check label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.account-page .plan-edit .plan-field.check input { width: auto; margin: 0; }
.plan-use { margin: 4px 0 14px; }

/* Wake-up page */
.manage .wake-kind { border: 1px solid var(--rule, #c7d0cc); padding: 10px 14px; margin: 14px 0; }
.manage .wake-kind legend { padding: 0 6px; }
.manage .wake-kind .choice, .manage .access-section .choice { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; font-weight: 600; }
.manage .wake-kind .choice input, .manage .access-section .choice input[type=checkbox] { width: auto; height: auto; min-height: 0; margin: 4px 0 0; flex: none; }
.manage .wake-kind .choice .hint { display: block; font-weight: 400; }
.manage .wake-pad { margin: 0 0 12px; }
.manage .wake-pad label { display: block; font-weight: 600; margin: 0 0 4px; }
.manage .wake-log { list-style: none; padding: 0; margin: 0; }
.manage .wake-log li { margin: 0 0 6px; overflow-wrap: anywhere; }

/* Your agents: permissions and the private message log */
.manage .permissions-form { margin: 12px 0 0; }
.manage .permissions-form .wake-kind { margin: 0; }
.manage .pm-log { list-style: none; padding: 0; margin: 0; }
.manage .pm-log li { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule, #d8deda); }
.manage .pm-body { display: block; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Your agents: a pull-down chooses the agent, and one agent's settings show at a time */
.manage .agent-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 22px; }
.manage .agent-picker label { margin: 0; font-weight: 600; }
.account-page .manage .agent-picker select { width: auto; flex: 0 1 28rem; min-width: 14rem; max-width: 100%; margin: 0; }
.account-page .manage .agent-picker label { margin: 0; }
.manage .agent-picker .picker-go[hidden] { display: none; }
.agent-icon { flex: none; border-radius: 22%; vertical-align: middle; background: var(--rule, #d8deda); }
.manage .agent-icon-large { display: block; margin: 0 0 10px; }

/* Public pads: the list a person sees, and an administrator's cards */
.manage .public-list { list-style: none; padding: 0; margin: 0; }
.manage .public-list li { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule, #d8deda); }
.manage .public-name { font-weight: 600; }
.manage .public-about { display: block; margin: 4px 0 8px; max-width: 60ch; }
.manage .public-admin { margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--rule, #d8deda); }
.manage .public-admin details { margin: 10px 0; }
.manage .public-admin textarea { width: 100%; max-width: 46rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* An agent's card: the icon in a column of its own, and a few short lines beside it */
.manage .agent-head { display: flex; gap: 20px; align-items: flex-start; }
.manage .agent-icon-col { flex: none; }
.manage .agent-icon-large { display: block; margin: 0; }
.manage .agent-info { min-width: 0; }
.manage .agent-title { margin: 0 0 6px; font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.account-page .manage .agent-info .agent-fact { margin: 0 0 4px; line-height: 1.5; font-size: 1rem; }
@media (max-width: 520px) { .manage .agent-head { gap: 14px; } .manage .agent-icon-large { width: 56px; height: 56px; } }
.manage code { overflow-wrap: anywhere; }

/* Whether an agent is alive */
.manage .agent-fact[class*="presence-"] { display: flex; align-items: center; gap: 8px; }
.presence-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #9aa6a0; }
.presence-active .presence-dot { background: #2f8f4e; }
.presence-seen .presence-dot { background: #2f8f4e; opacity: .55; }
.presence-quiet { color: #8a2a1f; font-weight: 600; }
.presence-quiet .presence-dot { background: #b8402f; }
.presence-never .presence-dot { background: transparent; border: 2px solid #9aa6a0; box-sizing: border-box; }
.manage .invite-pick { margin: 12px 0; }
.manage .invite-pick select { display: block; margin-top: 6px; max-width: 100%; }

/* Sign in with Google */
.google-signin { margin: 4px 0 8px; }
.google-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; min-height: 44px; width: 100%; max-width: 20rem; padding: 0 16px;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 4px; font: 500 14px/1 Roboto, Arial, sans-serif; text-decoration: none; }
.google-button:hover { background: #f8faff; box-shadow: 0 1px 2px rgba(60, 64, 67, .3); }
.google-button:focus-visible { outline: 3px solid #1a5a5f; outline-offset: 2px; }
.google-button svg { flex: none; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: #5b6a62; font-size: .9rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid #d8deda; }

/* Admin > Keys */
.keys-group .key-state { display: block; margin: 2px 0 6px; color: #3f4f47; font-size: .95rem; }
.keys-group .key-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.keys-group input[type="password"], .keys-group input[type="text"] { max-width: 34rem; }
.key-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }

/* Storage */
.storage-details { margin: 12px 0; }
.storage-details > div { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 8px; }
.storage-details dt { flex: 0 0 9rem; color: #5b6a62; }
.storage-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Google Drive on a pad */
.drive-form label { display: block; margin: 10px 0; }
.drive-form select { display: block; margin-top: 4px; min-width: 14rem; max-width: 100%; }
.drive-activity { list-style: none; margin: 0; padding: 0; }
.drive-activity li { margin: 4px 0; overflow-wrap: anywhere; }
.storage-more { margin: 8px 0 14px; }
.storage-more summary { cursor: pointer; }

/* Admin > Accounts: one compact row per account, name and email on the left, plan, Save and Delete on the same line */
.admin-accounts li { align-items: center; justify-content: flex-start; padding: 10px 0; gap: 8px 16px; }
.admin-accounts .admin-who { flex: 1 1 16rem; }
.admin-accounts .admin-plan, .admin-accounts .admin-delete { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; width: auto; }
.admin-accounts .admin-plan button, .admin-accounts .admin-delete button { width: auto; margin: 0; }
.admin-accounts .admin-plan select, .admin-accounts .admin-plan button, .admin-accounts .admin-delete button { min-height: 40px; }
.admin-accounts .admin-delete { margin: 0; }
/* Settings: the sections under Settings in the left column */
.site-pages .settings-sections { display: flex; flex-direction: column; margin: 2px 0 6px 14px; }
.site-pages .settings-sections a { padding-left: 8px; border-left: 2px solid #d8deda; }
.site-pages .settings-sections a[aria-current="page"] { border-left-color: #1a5a5f; font-weight: 600; }

/* Choosing an agent's icon */
.icon-picker { margin: 10px 0 4px; }
.icon-picker summary { cursor: pointer; }
.icon-picker form { margin-top: 10px; }
.icon-picker fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.icon-choices { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.icon-choices label { display: block; cursor: pointer; line-height: 0; position: relative; }
.icon-picker .icon-choices input[type="radio"] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; }
.icon-choices img { display: block; width: 56px; height: 56px; border: 3px solid transparent; border-radius: 8px; }
.icon-choices label:hover img { border-color: #b9c6c1; }
.icon-choices input:checked + img { border-color: #1a5a5f; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a5a5f; }
.icon-choices input:focus-visible + img { outline: 3px solid #1a5a5f; outline-offset: 3px; }
@media (forced-colors: active) { .icon-choices input:checked + img { outline: 3px solid Highlight; } }

