:root {
  --bg: #DBF0F7;
  --bg-card: #FFFFFF;
  --bg-elevated: #F7FBFD;
  --border: #C9DEE8;
  --border-strong: #9DBBC9;
  --text: #1F2937;
  --text-muted: #5B6770;
  --accent: #2E6B82;
  --accent-dim: #5BA5C4;
  --accent-glow: rgba(91, 165, 196, 0.18);
  --accent-soft: #F0D4D3;
  --accent-soft-strong: #E2A6A4;
  /* Kaikki EN/RU gloss chips — EN yellow; RU surface #F0D4D3 from REF/color-scheme.txt */
  --translation-en-bg: #fff9e6;
  --translation-en-border: #c9a227;
  --translation-en-text: #7a5f00;
  --translation-ru-bg: #f0d4d3;
  --translation-ru-border: #b85552;
  --translation-ru-text: #6c2524;
  --error: #B23A3A;
  --error-soft: #F7DCDB;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --radius: 12px;
  --shadow: 0 8px 28px rgba(46, 107, 130, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, var(--accent-glow), transparent),
    linear-gradient(180deg, var(--bg) 0%, #F7FBFD 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-left: env(safe-area-inset-left, 0);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

.header-extra-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-extra-nav--single {
  gap: 0.85rem;
}

.header-extra-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.header-extra-nav a:hover {
  color: var(--accent);
}

.header-user {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  box-shadow: 0 2px 8px rgba(46, 107, 130, 0.15);
  flex-shrink: 0;
}

.header-avatar-link {
  display: inline-block;
  line-height: 0;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
  transition: box-shadow 0.12s ease, transform 0.06s ease;
}

.header-avatar-link:hover {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.header-avatar-link:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 3px;
}

.header-avatar-link:active {
  transform: scale(0.97);
}

.layout {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem calc(1.5rem + env(safe-area-inset-right, 0)) 3rem
    calc(1.5rem + env(safe-area-inset-left, 0));
}

.messages {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.messages__item {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.messages__item--success {
  background: #E8F6ED;
  border-color: #7CB69B;
  color: #1B4D3A;
}

.messages__item--error {
  background: var(--error-soft);
  border-color: var(--accent-soft-strong);
  color: var(--error);
}

.profile-page.centered-card {
  max-width: 560px;
}

.profile-email {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.profile-avatar-block {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.profile-page-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.35rem 0 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--border);
  color: var(--text);
}

.profile-page .profile-section-title:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.profile-hint {
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
}

/* Sign out (profile): light red from REF/color-scheme.txt — #F0D4D3 */
.profile-signout {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--accent-soft-strong);
}

.profile-signout-form {
  margin: 0;
}

.profile-signout__btn {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent-soft-strong);
  background: var(--accent-soft);
  color: var(--error);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease,
    box-shadow 0.12s ease;
}

.profile-signout__btn:hover {
  background: var(--error-soft);
  border-color: var(--accent-soft-strong);
  color: var(--error);
  box-shadow: 0 2px 10px rgba(178, 58, 58, 0.14);
}

.profile-signout__btn:focus-visible {
  outline: 2px solid var(--accent-soft-strong);
  outline-offset: 2px;
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.field-label input {
  margin-top: 0.2rem;
}

.field-label--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.field-label--checkbox input {
  margin-top: 0.35rem;
  width: auto;
  flex-shrink: 0;
}

input[type="file"].profile-avatar-input,
input.profile-avatar-input[type="file"] {
  padding: 0.45rem 0.5rem;
  font-size: 0.92rem;
}

.centered-card,
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.75rem;
}

.centered-card {
  max-width: 520px;
  margin: 1.25rem auto;
  position: relative;
}

.centered-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dim) 60%, var(--accent-soft) 100%);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

p {
  margin-top: 0;
  color: var(--text-muted);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dim);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.inline-form input {
  flex: 1 1 220px;
}

.inline-form button {
  flex: 0 0 auto;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.auth-form .field-full {
  display: block;
}

.auth-form button {
  margin-top: 0.4rem;
  width: fit-content;
}

input,
button {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

button:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 2px;
}

.muted-link {
  color: var(--text-muted);
}

.muted-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.muted-link a:hover {
  text-decoration: underline;
}

.form-status {
  display: block;
  margin: 0 0 0.25rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--accent-soft);
  color: #6E2A2A;
  border: 1px solid var(--accent-soft-strong);
}

.form-status.is-error {
  background: var(--error-soft);
  color: var(--error);
  border-color: var(--accent-soft-strong);
}

.account-deleted-notice {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  background: #e8f6ed;
  color: #1b4d3a;
  border-color: #7cb69b;
}

.profile-delete-account {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-strong);
}

.profile-delete-account__label {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-delete-account__link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--error);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.profile-delete-account__link:hover {
  color: #8f2e2e;
}

.delete-account-confirm__message {
  margin: 0 0 1rem;
  color: var(--text);
  line-height: 1.55;
}

.delete-account-confirm__hint {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}

.delete-account-goodbye-btn {
  width: 100%;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--accent-soft-strong);
  background: var(--error-soft);
  color: var(--error);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.delete-account-goodbye-btn:hover {
  background: var(--accent-soft);
  border-color: var(--error);
  color: #6e2a2a;
}

.delete-account-goodbye-btn:focus-visible {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.92rem;
}

.control-page {
  margin: 0 auto;
}

.control-page__cards {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.control-page__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.control-page__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 36rem;
}

/* —— Staff /data page: two-panel layout —— */
.staff-data-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 52rem;
}

.staff-data-page__intro {
  margin-bottom: 0.75rem;
}

.staff-data-page__nav {
  margin: 0 0 0.25rem;
}

.staff-data-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.staff-data-section__header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.staff-data-section__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
  line-height: 1.25;
}

.staff-data-section__lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 40rem;
}

.staff-data-section__lead code {
  font-size: 0.88em;
}

.staff-data-section--ru .staff-data-section__lead strong {
  color: var(--text);
  font-weight: 600;
}

.staff-data-chart-wrap {
  position: relative;
  height: min(68vh, 820px);
  min-height: 220px;
  margin: 0;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 0.5rem;
}

.staff-data-ru-table-wrap {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: inset 0 1px 2px rgba(46, 107, 130, 0.04);
}

.staff-data-ru-table {
  width: 100%;
  min-width: 22rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.staff-data-ru-table th,
.staff-data-ru-table td {
  padding: 0.55rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.staff-data-ru-table tbody tr:last-child td {
  border-bottom: none;
}

.staff-data-ru-table thead th {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(46, 107, 130, 0.09) 0%, rgba(46, 107, 130, 0.04) 100%);
  border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
}

.staff-data-ru-table thead th:first-child {
  border-radius: 10px 0 0 0;
}

.staff-data-ru-table thead th:last-child {
  border-radius: 0 10px 0 0;
}

.staff-data-ru-table tbody tr {
  transition: background-color 0.1s ease;
}

.staff-data-ru-table tbody tr:nth-child(even) {
  background: rgba(46, 107, 130, 0.04);
}

.staff-data-ru-table tbody tr:hover {
  background: rgba(46, 107, 130, 0.09);
}

.staff-data-ru-table tbody td:first-child,
.staff-data-ru-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 6px 0 12px -8px rgba(31, 41, 55, 0.35);
}

.staff-data-ru-table thead th:first-child {
  z-index: 3;
  background: linear-gradient(180deg, rgba(239, 249, 252, 1) 0%, rgba(231, 244, 248, 1) 100%);
}

.staff-data-ru-table tbody td:first-child {
  background: var(--bg-elevated);
}

.staff-data-ru-table tbody tr:nth-child(even) td:first-child {
  background: #eef6f9;
}

.staff-data-ru-table tbody tr:hover td:first-child {
  background: #e3f0f5;
}

.staff-data-ru-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}

.staff-data-ru-table__num--ratio {
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--accent);
}

.staff-data-ru-table__pos {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text);
  padding: 0.15rem 0.4rem;
  background: rgba(46, 107, 130, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(46, 107, 130, 0.18);
}

.staff-data-ru-table__empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem 1rem;
  font-style: italic;
}

.staff-console {
  --staff-console-bg: #0f1419;
  --staff-console-header: #1c2433;
  --staff-console-hairline: rgba(255, 255, 255, 0.08);
  --staff-console-text: #c8d0da;
  --staff-console-prompt: #3ddc9a;
  --staff-console-sudo: #f0b429;
  margin: 1.25rem 0 0;
  max-width: 42rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--staff-console-hairline);
  box-shadow: 0 12px 40px rgba(15, 20, 25, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.2);
  background: var(--staff-console-bg);
}

.staff-console__titlebar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  background: var(--staff-console-header);
  border-bottom: 1px solid var(--staff-console-hairline);
}

.staff-console__traffic {
  display: inline-flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.staff-console__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.staff-console__dot--r {
  background: #ff5f56;
}

.staff-console__dot--y {
  background: #ffbd2e;
}

.staff-console__dot--g {
  background: #27c93f;
}

.staff-console__title {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(200, 208, 218, 0.72);
}

.staff-console__pre {
  margin: 0;
  padding: 1rem 1rem 1.1rem;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--staff-console-text);
  background: var(--staff-console-bg);
  overflow-x: auto;
  tab-size: 2;
}

.staff-console__pre code {
  font-family: inherit;
  background: none;
  padding: 0;
  border: 0;
  color: inherit;
}

.staff-console__line {
  display: block;
}

.staff-console__line + .staff-console__line {
  margin-top: 0.4rem;
}

.staff-console__prompt {
  color: var(--staff-console-prompt);
  font-weight: 600;
  user-select: none;
  margin-right: 0.15rem;
}

.staff-console__input {
  color: var(--staff-console-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.staff-console__sudo {
  color: var(--staff-console-sudo);
  font-weight: 600;
}

.control-step__heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.control-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.control-step__desc {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.control-step__code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.88em;
  background: var(--bg-elevated);
  padding: 0.12em 0.35em;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.control-step__source {
  font-weight: 600;
  color: var(--text);
}

.control-step__list {
  margin: 0 0 1.25rem 1.15rem;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.control-step__list li {
  margin-bottom: 0.65rem;
}

.control-step__list li:last-child {
  margin-bottom: 0;
}

.control-stats {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.control-stats__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}

.control-stats__row:last-child {
  border-bottom: none;
}

.control-stats__row dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.control-stats__row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  text-align: right;
}

.control-stats__row--block {
  grid-template-columns: 1fr;
}

.control-stats__row--block dt {
  padding-bottom: 0.25rem;
}

.control-stats__row--block dd {
  text-align: left;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text);
}

.control-pending-verbs {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.control-pending-verbs li {
  margin-bottom: 0.35rem;
}

.control-last-run {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border-strong);
}

.control-last-run__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.control-stats--compact .control-stats__row {
  padding: 0.5rem 0.85rem;
}

.control-stats--compact .control-stats__row dt {
  font-size: 0.88rem;
}

.control-stats--compact .control-stats__row dd {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.control-verb-page .control-verb-back {
  margin: 0 0 1rem;
}

.control-verb-page__title {
  margin-bottom: 0.5rem;
}

.control-verb-page__lead {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.control-verb-panel {
  margin-bottom: 1.75rem;
}

.control-verb-panel:last-child {
  margin-bottom: 0;
}

.control-verb-panel__heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Conjugation heading + TTS pill — scoped under article.pp-lexeme-conjugation for reliable specificity. */
.pp-lexeme-conjugation .control-verb-panel__heading.pp-conjugation-panel-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pp-lexeme-conjugation .pp-conjugation-panel-heading__title {
  line-height: 1.25;
}

.pp-lexeme-conjugation .pp-conjugation-tts-badge {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.75rem;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
  border-radius: 999px;
  /* REF/color-scheme.txt #F0D4D3 + matching reds from :root (Kaikki RU chip family). */
  color: var(--translation-ru-text);
  background: var(--accent-soft);
  border: 1px solid var(--translation-ru-border);
  box-shadow: 0 1px 2px rgba(108, 37, 36, 0.1);
}

@media (prefers-color-scheme: dark) {
  .pp-lexeme-conjugation .pp-conjugation-tts-badge {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }
}

.control-verb-meta .control-stats__row dd {
  text-align: left;
  font-weight: 500;
  max-width: 70%;
}

.control-verb-definitions {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.55;
}

.control-verb-definitions li {
  margin-bottom: 0.5rem;
}

.control-verb-mode {
  margin-bottom: 1.5rem;
}

.control-verb-mode:last-child {
  margin-bottom: 0;
}

.control-verb-mode__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.control-verb-bucket {
  margin-bottom: 1.1rem;
  margin-left: 0.15rem;
}

.control-verb-bucket:last-child {
  margin-bottom: 0;
}

.control-verb-bucket__title {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.control-verb-tense {
  margin-bottom: 1rem;
  margin-left: 0.25rem;
}

.control-verb-tense:last-child {
  margin-bottom: 0;
}

.control-verb-tense__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text-muted);
}

.control-verb-forms {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
}

.control-verb-forms li.control-verb-form-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.28rem;
  padding: 0.12rem 0;
  border-bottom: 1px dashed var(--border);
}

.control-verb-forms li.control-verb-form-row:last-child {
  border-bottom: none;
}

.control-verb-form-row__text {
  flex: 1 1 auto;
  min-width: 0;
}

button.pp-conjug-tts-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: calc(2.15rem * 0.5);
  height: calc(2.15rem * 0.5);
  min-width: calc(2.15rem * 0.5);
  min-height: calc(2.15rem * 0.5);
  max-width: calc(2.15rem * 0.5);
  max-height: calc(2.15rem * 0.5);
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-weight: 400;
  font-size: 0;
  line-height: 0;
}

button.pp-conjug-tts-play:hover {
  border-color: var(--accent);
  color: var(--accent-dim);
  background: var(--bg-card);
}

button.pp-conjug-tts-play:active {
  transform: translateY(1px);
}

.pp-conjug-tts-play:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 1px;
}

.pp-conjug-tts-play__icon {
  font-size: 0.52rem;
  line-height: 1;
  margin-left: 0.06rem;
  font-weight: 400;
}

article#conjugaison.pp-lexeme-conjugation {
  scroll-margin-top: 5.25rem;
}

.pp-mot-title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.pp-mot-title-row__heading {
  margin-bottom: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.pp-mot-title-row__tools {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex-shrink: 0;
  margin-left: auto;
}

.pp-mot-headline-ru {
  margin: -0.35rem 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 1.05rem;
  line-height: 1.35;
  /* Outer row unboxed; RU surface uses same chip vars as .pp-sense-translations--ru (REF/color-scheme.txt #F0D4D3) */
}

.pp-mot-headline-ru__label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text-muted);
}

.pp-mot-headline-ru__body {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  border: 1px solid var(--translation-ru-border);
  background: var(--translation-ru-bg);
  color: var(--translation-ru-text);
  font-weight: 600;
}

.pp-mot-tts-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
}

button.pp-mot-tts-play:hover {
  border-color: var(--accent);
  color: var(--accent-dim);
  background: var(--bg-card);
}

button.pp-mot-tts-play:active {
  transform: translateY(1px);
}

.pp-mot-tts-play:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 2px;
}

.pp-mot-tts-play__icon {
  font-size: 0.85rem;
  line-height: 1;
  margin-left: 0.15rem;
}

button.pp-mot-jump-conjug__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  width: fit-content;
}

button.pp-mot-jump-conjug__btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-dim);
}

button.pp-mot-jump-conjug__btn:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 2px;
}

button.pp-mot-jump-conjug__btn:active {
  transform: translateY(1px);
}

.control-back {
  margin-top: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pp-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
  align-items: center;
}

.pp-search-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.pp-search-submit {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
}

.pp-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pp-search-results li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.pp-search-pos,
.pp-detail-pos {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.pp-search-sources {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pp-src {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.pp-src--kaikki {
  border: 1px solid var(--border);
}

.pp-src--conjugueur {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.pp-lexeme-senses .pp-senses-intro {
  margin-top: 0;
}

.pp-sense-list {
  margin: 0;
  padding-left: 1.35rem;
  list-style-position: outside;
}

.pp-sense-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.pp-sense-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.pp-sense-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.pp-sense-gloss {
  color: var(--text);
  font-weight: 600;
}

.pp-sense-gloss--empty {
  color: var(--text-muted);
  font-weight: 500;
}

.pp-sense-tags {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pp-sense-tag {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

.pp-sense-tags-empty {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.pp-sense-translations {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.pp-sense-translations--en,
.pp-sense-translations--ru {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.pp-sense-translations__label {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.pp-sense-translations--en .pp-sense-translations__label,
.pp-sense-translations--ru .pp-sense-translations__label {
  flex: 0 0 auto;
  margin-right: 0;
}

.pp-sense-translation {
  color: var(--text);
}

.pp-sense-translations--en .pp-sense-translation {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  border: 1px solid var(--translation-en-border);
  background: var(--translation-en-bg);
  color: var(--translation-en-text);
  font-weight: 600;
}

.pp-sense-translations--ru .pp-sense-translation {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  border: 1px solid var(--translation-ru-border);
  background: var(--translation-ru-bg);
  color: var(--translation-ru-text);
  font-weight: 600;
}

.pp-sense-examples .pp-sense-example-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.pp-sense-example {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.28rem;
  margin-bottom: 0.5rem;
}

.pp-sense-example:last-child {
  margin-bottom: 0;
}

.pp-sense-example__body {
  flex: 1 1 auto;
  min-width: 0;
}

.pp-sense-example__body cite {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.88rem;
  font-style: normal;
}

.pp-sense-example__ru {
  margin: 0.4rem 0 0;
  padding: 0;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.pp-sense-example__ru .pp-sense-translations__label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text-muted);
}

.pp-sense-example__ru-text {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
  border: 1px solid var(--translation-ru-border);
  background: var(--translation-ru-bg);
  color: var(--translation-ru-text);
  font-weight: 600;
}

button.pp-example-tts-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* Inline example control: lock box so global `button { padding; font-weight }` cannot inflate it */
  width: calc(2.15rem * 0.5);
  height: calc(2.15rem * 0.5);
  min-width: calc(2.15rem * 0.5);
  min-height: calc(2.15rem * 0.5);
  max-width: calc(2.15rem * 0.5);
  max-height: calc(2.15rem * 0.5);
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.12rem;
  font-weight: 400;
  font-size: 0;
  line-height: 0;
}

button.pp-example-tts-play:hover {
  border-color: var(--accent);
  color: var(--accent-dim);
  background: var(--bg-card);
}

button.pp-example-tts-play:active {
  transform: translateY(1px);
}

.pp-example-tts-play:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 1px;
}

.pp-example-tts-play__icon {
  font-size: 0.52rem;
  line-height: 1;
  margin-left: 0.06rem;
  font-weight: 400;
}

.pp-pagination {
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
}

/* --- PWA (Missive-style: #pwa-root injects banners) --- */
.pwa-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.pwa-root .pwa-install-banner {
  pointer-events: auto;
}

.pwa-install-banner {
  position: fixed;
  z-index: 200;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0));
  background: rgba(31, 41, 55, 0.94);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(46, 107, 130, 0.25);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pwa-install-banner__inner {
  flex: 1;
  min-width: 0;
  max-width: 640px;
  margin: 0 auto;
}

.pwa-install-banner__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.pwa-install-banner__text {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e5e7eb;
}

.pwa-install-banner__text strong {
  color: #fff;
  font-weight: 600;
}

.pwa-install-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pwa-install-banner__install {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}

.pwa-install-banner__install:hover {
  background: #e5eef2;
}

.pwa-install-banner__later {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
}

.pwa-install-banner__later:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pwa-install-banner--hint .pwa-install-banner__text {
  margin: 0;
  flex: 1;
}

.pwa-install-banner--hint {
  align-items: center;
}

.pwa-install-banner__dismiss {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #9ca3af;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.pwa-install-banner__dismiss:hover {
  color: #fff;
}

@media (max-width: 540px) {
  .header-inner,
  .layout,
  .footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .centered-card {
    padding: 1.25rem;
  }
}
