/* Shared primitives; page skins set variables rather than copying rules. */
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font-family: var(--font-body);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--button-gap, 8px);
  min-height: var(--button-height, 44px);
  padding: var(--button-padding, 12px 24px);
  border-radius: var(--button-radius, var(--radius-control));
  border: 1px solid transparent;
  font: 700 var(--button-font, 14px)/1.5 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--duration-fast),
    color var(--duration-fast),
    box-shadow var(--duration-fast);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: var(--button-primary-bg, var(--accent));
  color: var(--button-primary-text, var(--on-accent));
  border-color: var(--button-primary-bg, var(--accent));
}
.btn-primary:hover:not(:disabled) {
  background: var(--button-primary-hover, var(--accent-hover));
  border-color: var(--button-primary-hover, var(--accent-hover));
}
.btn-secondary {
  background: transparent;
  color: inherit;
  border-color: var(--border-control);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}
.brand-mark {
  width: 32px;
  height: 26px;
  flex-shrink: 0;
  color: var(--text-accent);
}
.theme-select {
  color-scheme: inherit;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  color: var(--text);
  font: 600 14px var(--font-body);
  cursor: pointer;
}
.preferences {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
}
.preferences label {
  flex: 1;
}
.site-preferences {
  display: flex;
  justify-content: center;
  padding: var(--space-6);
}
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-switcher summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 64px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: var(--radius-control);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}
.lang-switcher summary::-webkit-details-marker {
  display: none;
}
.lang-current {
  text-transform: uppercase;
}
.lang-switcher summary svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-switcher[open] summary,
.lang-switcher summary:hover {
  color: var(--text);
  background: rgb(204 178 255 / 14%);
}
.lang-switcher[open] summary svg {
  transform: rotate(180deg);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 164px;
  padding: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-studio);
  z-index: 1;
}
.lang-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.lang-menu a[aria-current="page"] {
  color: var(--text-accent);
  font-weight: 700;
  background: var(--accent-soft);
}
.lang-menu a:hover {
  background: var(--surface-hover);
}
.lang-switcher summary:focus-visible,
.lang-menu a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Monthly / yearly billing switch (landing pricing, account plans). */
.billing-toggle[hidden] {
  display: none;
}
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-raised);
}
.billing-toggle button {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 15px var(--font-body);
  cursor: pointer;
}
.billing-toggle button span {
  margin-left: 6px;
  color: var(--text-muted);
  font-weight: 500;
}
.billing-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}
.billing-toggle button[aria-pressed="true"] span {
  color: inherit;
}
.billing-toggle button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.app-banner {
  position: fixed;
  inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-panel);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-action);
}
.app-banner-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: -4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.app-banner-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.app-banner-icon {
  flex: none;
  border-radius: 10px;
}
.app-banner-text {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.app-banner-text strong {
  font-size: 15px;
}
.app-banner-text span {
  font-size: 13px;
  color: var(--text-muted);
}
.app-banner-cta {
  --button-height: 38px;
  --button-padding: 6px 16px;
  flex: none;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.store-badges a {
  display: block;
  line-height: 0;
  border-radius: 8px;
}
.store-badges img {
  height: 56px;
  width: auto;
}
/* The Google Play PNG carries transparent padding; match the visible heights. */
.store-badges .store-badge-ios img {
  height: 42px;
  margin: 7px 0;
}
[data-mobile-os="ios"] .store-badge-android,
[data-mobile-os="android"] .store-badge-ios {
  display: none;
}
