/* Compact account controls on every screen, plus mobile navigation. */
.auth-card > .language-picker { width: max-content; max-width: 100%; margin-bottom: 26px; }
.auth-card > .language-picker summary {
  width: max-content;
  min-height: 44px;
  padding: 10px 12px;
  gap: 8px;
  border: 1px solid #c4cac0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.auth-card > .language-picker summary > span:not(.language-chevron) { display: none; }
.auth-card > .language-picker .language-options { left: 0; right: auto; }
.auth-card > .language-picker summary:focus-visible { outline: 3px solid #a0834c; outline-offset: 3px; }
.referral-box .referral-link-label { display: block; margin: 22px 0 8px; color: #d4dfcc; font-size: 12px; font-weight: 400; }
.referral-box .copy-row .button { flex-shrink: 0; white-space: nowrap; }
.main-nav .mobile-member-link { display: none; }

@media (max-width: 720px) {
  .main-nav .mobile-member-link {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-top: 18px;
    padding: 16px 20px;
    min-height: 54px;
    color: #222018;
  }

  .workspace-top { padding: 0 16px; gap: 10px; }
  .workspace-top > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workspace-top > div { gap: 8px; flex-shrink: 0; }
  .workspace-top .avatar { display: none; }
  .workspace-top .sidebar-button,
  .workspace-top .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--ink);
    line-height: 1;
    cursor: pointer;
  }
  .workspace-top .sidebar-button { background: var(--ink); color: #fff; font-size: 22px; }
  .workspace-top .sidebar-button[aria-expanded="true"] { background: #344631; }
  .workspace-top .icon-button { background: #fff; color: var(--ink); font-size: 24px; }
  .workspace-top .language-picker summary { min-height: 44px; }
  .workspace-top .language-picker summary > span:not(.language-chevron) { display: none; }

  .affiliate-enrollment .affiliate-consent {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid #b6beae;
    border-radius: 10px;
    background: #f3f5ee;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.7;
    cursor: pointer;
  }
  /* Explicit drawing keeps the empty and checked states visible on mobile browsers. */
  .affiliate-consent input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: grid;
    place-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin: 2px 0 0;
    padding: 0;
    border: 2px solid #526347;
    border-radius: 5px;
    background: #fff;
    color: #fff;
    cursor: pointer;
  }
  .affiliate-consent input[type="checkbox"]:checked { background: #344631; border-color: #344631; }
  .affiliate-consent input[type="checkbox"]:checked::after {
    content: "";
    width: 7px;
    height: 12px;
    margin-top: -3px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .affiliate-enrollment > .button { width: 100%; min-height: 50px; white-space: normal; }
  .workspace-top button:focus-visible,
  .auth-card .language-picker summary:focus-visible,
  .affiliate-consent input:focus-visible { outline: 3px solid #a0834c; outline-offset: 3px; }
}

@media (forced-colors: active) and (max-width: 720px) {
  .affiliate-consent input[type="checkbox"] { appearance: auto; }
  .affiliate-consent input[type="checkbox"]::after { display: none; }
}
