/* Account uses the same paper, type, and navigation as the landing page. */
body[data-page="account"] main {
  min-height: calc(100vh - 220px);
}
body[data-page="account"] h1 {
  font-size: 58px;
  letter-spacing: -2.5px;
}
body[data-page="account"] h2 {
  font-size: 31px;
  letter-spacing: -1px;
  line-height: 1.25;
  margin-bottom: 14px;
}
body[data-page="account"] .site-header a[aria-current="page"] {
  color: var(--accent);
}
body[data-page="account"] .site-footer {
  margin-top: 30px;
}
body[data-page="account"] input,
body[data-page="account"] select {
  width: 100%;
  min-width: 0;
  background: #fffef9;
  border: 1px solid #cbd0c1;
  border-radius: 4px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  min-height: 48px;
}
body[data-page="account"] input:focus-visible,
body[data-page="account"] select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
body[data-page="account"] input::placeholder {
  color: #96998f;
}
body[data-page="account"] button {
  border: 1px solid #cbd0c1;
  border-radius: 4px;
  background: transparent;
  padding: 10px 15px;
  min-height: 40px;
  font-size: 13px;
}
body[data-page="account"] button:hover {
  background: #e9ecdf;
}
body[data-page="account"] button.primary {
  background: var(--green);
  color: #fffef9;
  border-color: var(--green);
}
body[data-page="account"] button.primary:hover {
  background: #253a2f;
}
body[data-page="account"] button.danger {
  color: #913f32;
  border-color: #d7bbb2;
}
body[data-page="account"] button.danger:hover {
  background: #f6e6e0;
}
body[data-page="account"] button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.account-breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 0;
  font-size: 11px;
  color: var(--muted);
}
.account-breadcrumb > span:nth-child(2) {
  color: #a1a695;
}
.session-indicator {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 18px 0 35px;
}
.account-heading .eyebrow {
  color: var(--muted);
}
.account-heading h1 {
  margin: 17px 0 0;
}
.account-person {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding-top: 22px;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 22px;
  background: #e7eade;
  border-radius: 50%;
  color: var(--green);
}
.person-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.account-email {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.account-person > div {
  min-width: 0;
}
body[data-page="account"] .quiet-button {
  border: 0;
  color: var(--muted);
  font-size: 11px;
  margin-left: 15px;
  white-space: nowrap;
}
.account-tabs {
  display: flex;
  gap: 30px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.account-tabs a {
  padding: 13px 0;
}
.account-tabs a:first-child {
  color: var(--green);
  border-bottom: 2px solid var(--green);
  margin-bottom: -1px;
}
.account-tabs a:hover {
  color: var(--accent);
}
.account-overview {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  scroll-margin-top: 25px;
}
.balance-surface {
  border-radius: 6px;
  padding: 28px 34px 0;
  background: #e6eadf;
  color: var(--green);
}
.balance-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.balance-icon {
  font-size: 25px;
  color: #738166;
}
.balance-number {
  font-family: var(--serif);
  font-size: clamp(55px, 6vw, 78px);
  line-height: 1.15;
  letter-spacing: -3px;
  margin: 18px 0 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.balance-unit {
  font-size: 13px;
  margin: 5px 0 27px;
}
.balance-footnote {
  font-size: 11px;
  line-height: 1.6;
  padding: 16px 0;
  border-top: 1px solid #c8d0bc;
}
.plan-surface {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf5;
  padding: 29px 30px 24px;
}
.plan-surface .eyebrow {
  color: var(--muted);
}
.plan-surface h2 {
  margin: 15px 0 11px;
}
.plan-surface > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.plan-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 21px 0 16px;
}
.plan-actions .text-link {
  font-size: 12px;
  gap: 10px;
}
.plan-surface .plan-help {
  font-size: 11px !important;
  line-height: 1.6;
  margin: 0;
}
.account-status {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.account-status:empty {
  display: none;
}
.account-status[data-kind="error"] {
  color: #963e2e;
  border-left: 2px solid #bc6a54;
  padding: 9px 14px;
  background: #f7eae4;
}
.account-status[data-kind="ok"] {
  color: var(--green);
}
.usage-card {
  margin-top: 42px;
  scroll-margin-top: 30px;
}
.usage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.usage-card-head .eyebrow {
  color: var(--muted);
  margin-bottom: 12px;
}
.usage-card-head h2 {
  margin: 0 !important;
}
.heading-period {
  color: var(--accent);
}
.usage-copy {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 20px;
}
.usage-table-wrap {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow-x: auto;
  background: #fbfaf6;
}
.usage-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.usage-table th {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  background: #eeefe7;
}
.usage-table th,
.usage-table td {
  padding: 16px 22px;
  border-bottom: 1px solid #e4e5dc;
  white-space: nowrap;
}
.usage-table th:last-child,
.usage-table td:last-child {
  text-align: right;
}
.usage-table tr:last-child td {
  border-bottom: 0;
}
.usage-table td:nth-child(2) {
  font-weight: 600;
}
.usage-table td:nth-child(3) {
  color: var(--muted);
  font-size: 12px;
}
.usage-table td:nth-child(4) {
  color: var(--green);
  font-size: 12px;
}
.usage-table td:last-child {
  font-variant-numeric: tabular-nums;
}
.usage-table td.usage-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  white-space: normal;
}
.usage-footnote {
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 0;
}
.settings-section {
  margin-top: 52px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.settings-heading .eyebrow {
  color: var(--muted);
  margin-bottom: 12px;
}
.account-security-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  margin-top: 26px;
}
.account-card {
  min-width: 0;
}
.account-security-grid h2 {
  font-family: var(--sans);
  font-size: 16px !important;
  letter-spacing: 0 !important;
  font-weight: 600;
  margin-bottom: 12px;
}
.account-security-grid .usage-card-head {
  margin-bottom: 12px;
}
.account-note-copy {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.identity-list {
  margin: 16px 0;
}
.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.identity-copy {
  min-width: 0;
}
.identity-provider {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.identity-email {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.account-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0 0;
  flex-wrap: wrap;
}
.danger-zone {
  padding-left: 36px;
  border-left: 1px solid var(--line);
}
.deletion-form {
  margin-top: 20px;
}
.deletion-form .auth-control-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.deletion-form input {
  font-size: 12px !important;
}
.deletion-notice {
  color: #963e2e;
  background: #f7eae4;
  font-size: 12px;
  padding: 14px;
  margin: 16px 0;
  line-height: 1.6;
}
.account-local-note {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 24px;
  color: var(--muted);
}
.account-local-note > span {
  font-size: 28px;
  color: #89917b;
}
.account-local-note p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.account-local-note a {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.account-admin-grid {
  margin-top: 26px;
}
.account-admin-grid:has([data-role="adminCard"][style*="none"]) {
  display: none;
}
[data-role="adminCard"] {
  border: 1px dashed var(--line);
  padding: 25px;
}
.admin-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.admin-copy {
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.admin-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-field span,
.admin-row > div {
  display: block;
  font-size: 11px;
  margin: 7px 0;
}
.admin-block-title {
  font-weight: 600;
  margin-bottom: 10px;
}
.admin-block a {
  text-decoration: underline;
}
.account-welcome {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 105px;
  padding: 35px 35px 65px 0;
  align-items: center;
}
.welcome-copy .eyebrow {
  color: var(--muted);
}
.welcome-copy h1 {
  font-size: 61px !important;
  line-height: 1.13;
  margin: 25px 0;
}
.welcome-description {
  max-width: 390px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
}
.welcome-credit {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 28px 0 24px;
  max-width: 390px;
}
.welcome-credit-number {
  font-family: var(--serif);
  font-size: 48px;
  letter-spacing: -1.8px;
  color: var(--green);
}
.welcome-credit strong {
  font-size: 13px;
  font-weight: 600;
}
.welcome-credit p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 5px 0 0;
}
.guest-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.guest-note a {
  display: inline-block;
  margin-top: 6px;
  color: var(--green);
  border-bottom: 1px solid #b4bba7;
}
.sign-in-surface {
  background: #fffef8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 34px;
  box-shadow: 0 16px 34px -30px #354b3f77;
}
.auth-entry-title {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}
.auth-entry-copy {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 26px;
}
.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 9px;
}
.auth-control-row {
  display: grid;
  gap: 12px;
}
.auth-control-row .auth-submit {
  min-height: 47px;
}
.auth-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.65;
}
.auth-otp-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.auth-otp-heading .auth-label {
  margin-bottom: 0;
}
body[data-page="account"] .auth-link-button {
  border: 0;
  padding: 4px 0;
  min-height: 28px;
  color: var(--accent);
  font-size: 11px;
}
.auth-code-input {
  letter-spacing: 10px;
  text-align: center;
  font-size: 22px !important;
  font-variant-numeric: tabular-nums;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #94998b;
  margin: 24px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px !important;
}
.auth-google-mark {
  font-size: 17px;
  font-weight: 700;
}
.auth-inline-status {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.auth-inline-status:empty {
  display: none;
}
.auth-inline-status[data-kind="error"] {
  color: #963e2e;
}
.auth-inline-status[data-kind="ok"] {
  color: var(--green);
}
.sign-in-note {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin: 25px 0 0;
  padding-top: 16px;
}
.auth-entry[aria-busy="true"] {
  opacity: 0.7;
}
.usage-card-focus {
  outline: 2px solid #8e9c7b;
  outline-offset: 12px;
}
@media (max-width: 1020px) {
  .account-welcome {
    gap: 45px;
    padding-right: 0;
  }
  .welcome-copy h1 {
    font-size: 52px !important;
  }
  .account-overview {
    gap: 18px;
    grid-template-columns: 1.1fr 1fr;
  }
  .balance-surface {
    padding: 25px 24px 0;
  }
  .plan-surface {
    padding: 26px 24px;
  }
  .plan-actions {
    flex-wrap: wrap;
    gap: 14px;
  }
  .account-person {
    gap: 10px;
  }
  .account-person .avatar {
    display: none;
  }
  .quiet-button {
    margin-left: 0 !important;
  }
  .account-security-grid {
    gap: 25px;
  }
  .danger-zone {
    padding-left: 24px;
  }
  .deletion-form .auth-control-row {
    grid-template-columns: 1fr;
  }
  .usage-table th,
  .usage-table td {
    padding: 15px;
  }
}
@media (max-width: 700px) {
  .account-breadcrumb {
    padding: 21px 0;
  }
  .account-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 17px 0 25px;
  }
  body[data-page="account"] h1 {
    font-size: 46px;
  }
  .account-heading h1 {
    margin-top: 14px;
  }
  .account-person {
    padding: 0;
    width: 100%;
    justify-content: space-between;
  }
  .account-email {
    font-size: 13px;
  }
  .account-tabs {
    gap: 25px;
    font-size: 12px;
    margin-bottom: 20px;
  }
  .account-overview {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .balance-number {
    font-size: 66px;
  }
  .balance-footnote {
    font-size: 10px;
  }
  .balance-unit {
    margin-bottom: 22px;
  }
  .plan-surface {
    padding: 24px;
  }
  .plan-actions {
    gap: 23px;
  }
  .usage-card {
    margin-top: 34px;
  }
  body[data-page="account"] h2 {
    font-size: 27px;
  }
  .usage-card-head .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  body[data-page="account"] .refresh-button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .usage-copy {
    line-height: 1.6;
    font-size: 12px;
  }
  .usage-table {
    min-width: 560px;
  }
  .usage-footnote {
    line-height: 1.6;
  }
  .settings-section {
    margin-top: 36px;
    padding-top: 28px;
  }
  .account-security-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .danger-zone {
    padding: 25px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .deletion-form .auth-control-row {
    grid-template-columns: 1fr auto;
  }
  .deletion-form button {
    font-size: 11px !important;
  }
  .account-local-note {
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
  }
  .account-local-note p {
    flex: 1;
  }
  .account-local-note a {
    margin-left: 34px;
  }
  .account-welcome {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 15px 0 25px;
  }
  .welcome-copy h1 {
    font-size: 48px !important;
    margin: 20px 0;
  }
  .welcome-description {
    font-size: 14px;
  }
  .welcome-credit {
    margin: 22px 0 18px;
    padding: 18px 0;
  }
  .welcome-credit-number {
    font-size: 42px;
  }
  .sign-in-surface {
    padding: 25px;
  }
  .auth-entry-title {
    font-size: 26px;
  }
  .admin-stack {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .usage-card-focus {
    animation: none;
  }
}
body[data-page="account"]:has(#usage:target) .account-tabs a:first-child,
body[data-page="account"]:has(#settings:target) .account-tabs a:first-child {
  border-bottom-color: transparent;
  color: var(--ink);
}
body[data-page="account"]:has(#usage:target) .account-tabs a[href="#usage"],
body[data-page="account"]:has(#settings:target) .account-tabs a[href="#settings"] {
  border-bottom: 2px solid var(--green);
  margin-bottom: -1px;
  color: var(--green);
}
.auth-entry:has(.auth-google-button[hidden]) .auth-divider {
  display: none;
}
@media (max-width: 700px) {
  .account-welcome .sign-in-surface {
    order: -1;
  }
}
body[data-page="account"]:has(
    [data-role="authPanel"]:not([hidden]) [data-role="authStatus"]:not(:empty)
  )
  .account-status {
  display: none;
}
.auth-loading {
  color: var(--muted);
  font-size: 14px;
  padding: 35px 0;
}
.sign-in-surface:has(.auth-entry:not([hidden])) .auth-loading {
  display: none;
}

/* Account entry explains itself through its actions. */
.account-help { margin-top:24px; max-width:440px; border-top:1px solid var(--border); }
.account-help summary { cursor:pointer; padding:15px 0; font-size:15px; line-height:1.5; }
.account-help p { margin:0 0 18px; font-size:15px; line-height:1.7; color:var(--muted); }
.welcome-description { max-width:32ch; }
.account-help summary { display:flex; align-items:center; justify-content:space-between; gap:20px; list-style:none; }
.account-help summary::-webkit-details-marker { display:none; }
.account-help summary::after { content:''; width:7px; height:7px; flex-shrink:0; border:solid currentColor; border-width:0 1px 1px 0; transform:rotate(45deg); margin-right:4px; }
.account-help[open] summary::after { content:''; transform:rotate(225deg); }
@media(max-width:600px) { body[data-page="account"] .site-header > .button-small { display:none; } }
