/*
 * auth.css — Devise authentication form styles.
 * Uses M3 tokens from theme.css and shared classes from layout.css (btn, divider).
 */

/* ── Auth card — centred narrow container ──────────────────────────────────── */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: var(--pv-space-xl);
}

.auth-card__title {
  font-family: var(--md-sys-typescale-headline-small-font, 'Roboto', sans-serif);
  font-size: var(--md-sys-typescale-headline-small-size, 1.5rem);
  font-weight: var(--md-sys-typescale-headline-small-weight, 400);
  color: var(--md-sys-color-on-surface);
  margin: 0 0 var(--pv-space-lg);
}

.auth-card__section-title {
  font-family: var(--md-sys-typescale-title-medium-font, 'Roboto', sans-serif);
  font-size: var(--md-sys-typescale-title-medium-size, 1rem);
  font-weight: var(--md-sys-typescale-title-medium-weight, 500);
  color: var(--md-sys-color-on-surface);
  margin: var(--pv-space-md) 0 var(--pv-space-sm);
}

.auth-card__note {
  font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
  color: var(--md-sys-color-on-surface-variant);
  margin: var(--pv-space-sm) 0 0;
}

.auth-card__danger-btn {
  margin-top: var(--pv-space-sm);
  color: var(--md-sys-color-error);
  border-color: var(--md-sys-color-error);
}

.auth-card__danger-btn:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-error) 8%, transparent);
  color: var(--md-sys-color-error);
}

/* ── Auth field — label + input pair ──────────────────────────────────────── */
.auth-field {
  margin-bottom: var(--pv-space-md);
}

.auth-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
  font-weight: var(--md-sys-typescale-label-large-weight, 500);
  color: var(--md-sys-color-on-surface-variant);
}

.auth-field__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font-family: 'Roboto', sans-serif;
  font-size: var(--md-sys-typescale-body-large-size, 1rem);
  color: var(--md-sys-color-on-surface);
  background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--md-sys-motion-duration-short1, 100ms) ease;
}

.auth-field__input:focus {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.auth-field__hint {
  font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 6px;
}

/* ── Checkbox row (remember me) ───────────────────────────────────────────── */
.auth-check {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  margin-bottom: var(--pv-space-md);
}

.auth-check__input {
  accent-color: var(--md-sys-color-primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.auth-check__label {
  font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}

/* ── Actions row ──────────────────────────────────────────────────────────── */
.auth-actions {
  margin-top: var(--pv-space-lg);
}

.auth-actions .btn {
  width: 100%;
  justify-content: center;
}

/* ── Error block ──────────────────────────────────────────────────────────── */
.auth-errors {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border-radius: var(--md-sys-shape-corner-small);
  padding: var(--pv-space-sm) var(--pv-space-md);
  margin-bottom: var(--pv-space-md);
}

.auth-errors__title {
  font-weight: 500;
  margin: 0 0 var(--pv-space-sm);
}

.auth-errors__list {
  margin: 0;
  padding-left: 1.25rem;
}

.auth-errors__list li {
  font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
}

/* ── Inter-form nav links ─────────────────────────────────────────────────── */
.auth-links {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
  margin-top: var(--pv-space-lg);
  padding-top: var(--pv-space-md);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.auth-links a {
  font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
  color: var(--md-sys-color-primary);
}

/* ── App-bar auth controls ────────────────────────────────────────────────── */
.app-bar__auth {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  margin-left: auto;
}

.app-bar__user-email {
  font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.app-bar__icon {
  display: none;
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-bar__account,
.app-bar__sign-out {
  color: var(--md-sys-color-on-surface);
}

.app-bar__account:hover,
.app-bar__sign-out:hover {
  color: var(--md-sys-color-on-surface);
  background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}

/* Icon-only through medium (matches bottom-nav / rail breakpoint). */
@media (max-width: 839px) {
  .app-bar__user-email {
    display: none;
  }

  .app-bar__icon {
    display: inline-flex;
  }

  .app-bar__label {
    display: none;
  }

  .app-bar__account,
  .app-bar__sign-out {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }
}
/* ── Curate home and ambiguity review ─────────────────────────────────────── */
.curate-hero {
  margin-bottom: var(--pv-space-xl);
}

.curate-hero__eyebrow {
  margin: 0 0 var(--pv-space-xs);
  color: var(--md-sys-color-primary);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.curate-hero h1 {
  margin: 0;
  font-size: var(--md-sys-typescale-headline-large-size);
  line-height: var(--md-sys-typescale-headline-large-line);
}

.curate-hero > p:last-child {
  margin: var(--pv-space-sm) 0 0;
  color: var(--md-sys-color-on-surface-variant);
}

.ambiguity-group-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
}

.ambiguity-occurrence-list {
  display: grid;
  gap: var(--pv-space-lg);
}

.ambiguity-group {
  display: grid;
  gap: 4px;
  padding: var(--pv-space-sm) var(--pv-space-md);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}

.ambiguity-group-list > li + li .ambiguity-group {
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.ambiguity-group:hover {
  background: var(--md-sys-color-surface-container-low);
}

.ambiguity-group__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pv-space-xs) var(--pv-space-md);
}

.ambiguity-group__label {
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
}

.ambiguity-group__count {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.ambiguity-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-xs) var(--pv-space-md);
}

.ambiguity-choice {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-small-size, 12px);
  line-height: 1.35;
}

.ambiguity-choice__headword {
  color: var(--md-sys-color-primary);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.ambiguity-choice__definition {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ambiguity-resolution__prompt {
  margin: 0 0 var(--pv-space-sm);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.ambiguity-apply-all {
  display: grid;
  gap: var(--pv-space-sm);
  margin-bottom: var(--pv-space-xl);
  padding: var(--pv-space-md);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-low);
}

.ambiguity-apply-all h2 {
  margin: 0;
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
}

.ambiguity-apply-all > p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.ambiguity-apply-all__choices {
  display: grid;
  gap: var(--pv-space-sm);
  margin: var(--pv-space-xs) 0 0;
  padding: 0;
  list-style: none;
}

.ambiguity-apply-all__choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pv-space-sm);
}

.ambiguity-apply-all__definition {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-small-size, 12px);
}

.ambiguity-sense-group {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  overflow: hidden;
  border-radius: var(--md-sys-shape-corner-medium);
}

.ambiguity-sense-group__segment {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 56px;
  padding: var(--pv-space-sm) var(--pv-space-md);
  border: 1px solid var(--md-sys-color-outline);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background-color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard),
              color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}

.ambiguity-sense-group__segment + .ambiguity-sense-group__segment {
  border-left: 0;
}

.ambiguity-sense-group__segment:first-child {
  border-radius: var(--md-sys-shape-corner-medium) 0 0 var(--md-sys-shape-corner-medium);
}

.ambiguity-sense-group__segment:last-child {
  border-radius: 0 var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium) 0;
}

.ambiguity-sense-group__segment:only-child {
  border-radius: var(--md-sys-shape-corner-medium);
}

.ambiguity-sense-group__segment:hover {
  background: var(--md-sys-color-surface-container-high);
}

.ambiguity-sense-group__segment.is-selected {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.ambiguity-sense-group__headword {
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.ambiguity-sense-group__definition {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-small-size, 12px);
  line-height: 1.3;
}

.ambiguity-sense-group__segment.is-selected .ambiguity-sense-group__definition {
  color: var(--md-sys-color-on-secondary-container);
}

.ambiguity-resolution__error {
  display: block;
  margin-top: var(--pv-space-xs);
  color: var(--md-sys-color-error);
  font-size: var(--md-sys-typescale-label-small-size);
}

.ambiguity-pagination {
  display: flex;
  align-items: center;
  gap: var(--pv-space-md);
  margin-bottom: var(--pv-space-lg);
}

.ambiguity-pagination--bottom {
  margin-top: var(--pv-space-lg);
  margin-bottom: 0;
}

.ambiguity-pagination__status {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.curate-empty {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  padding: var(--pv-space-lg);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface-variant);
}

.curate-empty p {
  margin: 0;
}

.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;
}
/*
 * entries.css — Word hub (entry page) styles.
 * Sections: identity, hear, forms, examples, corpus, related.
 */

/* ── Entry header ───────────────────────────────────────────────────────────── */
.entry-header {
  margin-bottom: var(--pv-space-xl);
}

.entry-admin-actions {
  margin: 0 0 var(--pv-space-md);
}

.entry-admin-actions__link {
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.entry-admin-actions__link:hover {
  text-decoration: underline;
}

/* ── Timing JSON editor (admin) ─────────────────────────────────────────────── */
.entry-timing-header {
  margin-bottom: var(--pv-space-lg);
}

.entry-timing-header__title {
  margin: 0 0 var(--pv-space-sm);
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
  color: var(--md-sys-color-on-surface);
}

.entry-timing-header__lede {
  margin: 0;
  max-width: 40rem;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.entry-timing-empty {
  color: var(--md-sys-color-on-surface-variant);
}

.entry-timing-form {
  display: grid;
  gap: var(--pv-space-lg);
  margin-bottom: var(--pv-space-xl);
}

.entry-timing-fieldset {
  margin: 0;
  padding: var(--pv-space-md);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-low);
}

.entry-timing-fieldset__legend {
  padding: 0 var(--pv-space-xs);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
  color: var(--md-sys-color-on-surface);
}

.entry-timing-fieldset__label {
  font-weight: 400;
  color: var(--md-sys-color-on-surface-variant);
}

.entry-timing-fieldset__label-block {
  display: block;
  margin-bottom: var(--pv-space-xs);
  font-size: var(--md-sys-typescale-label-medium-size);
  color: var(--md-sys-color-on-surface-variant);
}

.entry-timing-textarea {
  width: 100%;
  max-width: 48rem;
  min-height: 18rem;
  padding: var(--pv-space-sm);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  tab-size: 2;
  resize: vertical;
}

.entry-timing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-md);
  align-items: center;
}

.familiarity-control {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--pv-space-sm);
  margin-top: var(--pv-space-md);
  width: 28rem;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.familiarity-control__label {
  color: var(--md-sys-color-on-surface-variant);
  display: inline-block;
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  flex: none;
  max-width: 5.5rem;
  text-align: right;
  width: 5.5rem;
  overflow: hidden;
  transition: max-width 350ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 175ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.familiarity-control--compact {
  margin-top: 0;
}

.familiarity-control--compact .familiarity-control__segments {
  height: 40px;
}

.familiarity-control__segments {
  display: inline-flex;
  flex: none;
  margin-left: auto;
  overflow: hidden;
  width: 22rem;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.familiarity-control__segment {
  align-items: center;
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: var(--md-sys-typescale-label-large-size);
  gap: var(--pv-space-xs);
  flex: 1 1 0;
  justify-content: center;
  min-height: 36px;
  padding: 0 var(--pv-space-md);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: background-color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard),
              color var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}

.familiarity-control__icon {
  display: inline-flex;
  font-size: 20px;
  line-height: 1;
}

.familiarity-control__text {
  display: inline-block;
  max-width: 5rem;
  overflow: hidden;
  transition: max-width 350ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 175ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.familiarity-control--condensed {
  gap: 0;
  width: 7.5rem;
}

.familiarity-control--expanding .familiarity-control__label,
.familiarity-control--expanding .familiarity-control__text {
  opacity: 0;
}

.familiarity-control--condensed .familiarity-control__label,
.familiarity-control--condensed .familiarity-control__text {
  max-width: 0;
  opacity: 0;
  transition-duration: 350ms, 0ms;
}

.familiarity-control--condensed .familiarity-control__label {
  width: 0;
}

.familiarity-control--condensed .familiarity-control__segment {
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

.familiarity-control--condensed .familiarity-control__segments {
  width: 7.5rem;
}

.familiarity-control__segment:first-child {
  border-radius: var(--md-sys-shape-corner-medium) 0 0 var(--md-sys-shape-corner-medium);
}

.familiarity-control__segment:last-child {
  border-radius: 0 var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium) 0;
}

.familiarity-control--compact .familiarity-control__segment {
  min-height: 40px;
}

.familiarity-control--compact .familiarity-control__segment:first-child {
  border-radius: 20px 0 0 20px;
}

.familiarity-control--compact .familiarity-control__segment:last-child {
  border-radius: 0 20px 20px 0;
}

.familiarity-control__segment + .familiarity-control__segment {
  border-left: 0;
}

.familiarity-control__segment:hover {
  background-color: var(--md-sys-color-surface-container-high);
}

.familiarity-control__segment.is-selected {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.familiarity-control__error {
  color: var(--md-sys-color-error);
  font-size: var(--md-sys-typescale-label-small-size);
}

@media (max-width: 480px) {
  .familiarity-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .familiarity-control__segment {
    padding: 0 var(--pv-space-sm);
  }
}

@media (max-width: 768px) {
  .familiarity-control,
  .familiarity-control--condensed {
    width: 7.5rem;
  }

  .familiarity-control__label,
  .familiarity-control__text {
    display: none;
  }

  .familiarity-control__segments,
  .familiarity-control--condensed .familiarity-control__segments {
    width: 7.5rem;
  }

  .familiarity-control__icon {
    display: inline-flex;
  }
}

.entry-back {
  font-size: var(--md-sys-typescale-label-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--pv-space-md);
  display: block;
}

/* ── Section anchors / nav ──────────────────────────────────────────────────── */
.section-nav {
  display: flex;
  gap: var(--pv-space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--pv-space-xl);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding-bottom: var(--pv-space-sm);
}

.section-nav__link {
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  color: var(--md-sys-color-on-surface-variant);
  padding: var(--pv-space-xs) var(--pv-space-sm);
  border-radius: var(--md-sys-shape-corner-small);
}

.section-nav__link:hover {
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

/* ── Hub sections ───────────────────────────────────────────────────────────── */
.hub-section {
  margin-bottom: var(--pv-space-xl);
  scroll-margin-top: 80px; /* offset for sticky app bar */
}

.hub-section__title {
  font-family: var(--md-sys-typescale-title-medium-font);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
  color: var(--md-sys-color-on-surface);
  margin: 0 0 var(--pv-space-md);
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
}

.hub-section__title .material-symbols-outlined {
  font-size: 20px;
  color: var(--md-sys-color-primary);
}

.hub-section__lede {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  margin: 0 0 var(--pv-space-md);
}

.pronunciation-samples {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-md);
  max-width: 100%;
}

.pronunciation-samples reading-sample {
  display: block;
  max-width: 100%;
}

/* ── Identity section ───────────────────────────────────────────────────────── */
.sense-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
}

.sense-item {
  padding: 0;
}

.sense-item__index {
  font-size: var(--md-sys-typescale-label-small-size);
  font-weight: var(--md-sys-typescale-label-small-weight);
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--pv-space-xs);
}

.sense-item__definition {
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface);
  margin: 0;
}

.sense-item__definition + div {
  margin-top: var(--pv-space-xs);
}

/* ── Hear section ───────────────────────────────────────────────────────────── */
.hear-player {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-corner-large);
  padding: var(--pv-space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-md);
}

.hear-player__audio {
  width: 100%;
  border-radius: var(--md-sys-shape-corner-small);
}

.hear-player__syllabics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-xs);
  align-items: center;
}

/* A single syllable node in the Hear panel.
   Gets .syllable--active when the playhead is in the syllable's own
   [start, end) (if timed) or the parent word's interval (fallback). */
.syllable {
  display: inline-block;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  border-radius: var(--md-sys-shape-corner-small);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: 500;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard),
              color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.syllable--active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

/* Separator between first and second utterance */
.syllabic-repeat-divider {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
  padding: 0 var(--pv-space-xs);
}

.hear-player__label {
  font-size: var(--md-sys-typescale-label-small-size);
  color: var(--md-sys-color-on-surface-variant);
}

/* ── Examples section ───────────────────────────────────────────────────────── */
.example-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-md);
}

.example-item {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: var(--pv-space-md);
  border-left: 3px solid var(--md-sys-color-primary-container);
}

.example-item__mus {
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface);
  display: block;
  margin-bottom: var(--pv-space-xs);
}

.example-item__en {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  font-style: italic;
  display: block;
}

.example-item__permalink {
  display: inline-block;
  margin-top: var(--pv-space-xs);
  color: var(--md-sys-color-outline);
  opacity: 0.6;
}

.example-item__permalink:hover { opacity: 1; }

/* ── Token highlighting (examples + corpus passages on hub) ─────────────────── */

/* Base token — plain text fallback */
.example-token {
  display: inline;
}

/* Token resolves to a lexical entry (other than the current one) */
.example-token--linked,
.passage-token--linked {
  cursor: pointer;
  border-radius: var(--md-sys-shape-corner-extra-small);
  padding: 1px 3px;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.example-token--linked:hover,
.passage-token--linked:hover {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  text-decoration: none;
}

/* Token matches THE CURRENT entry — permanent highlight */
.example-token--highlight,
.passage-token--highlight {
  display: inline;
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-radius: var(--md-sys-shape-corner-extra-small);
  padding: 1px 3px;
  font-weight: 500;
}

/* ── Example detail page ────────────────────────────────────────────────────── */
.example-page {
  max-width: 780px;
  margin: 0 auto;
}

.example-header {
  margin-bottom: var(--pv-space-md);
}

.example-body {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large);
  padding: var(--pv-space-lg);
  border-left: 4px solid var(--md-sys-color-primary-container);
}

.example-page__mus {
  font-size: var(--md-sys-typescale-title-medium-size);
  line-height: 2;
  color: var(--md-sys-color-on-surface);
  margin-bottom: var(--pv-space-md);
}

.example-page__en {
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface-variant);
  font-style: italic;
  border-left: 3px solid var(--md-sys-color-outline-variant);
  padding-left: var(--pv-space-md);
  margin: 0 0 var(--pv-space-md);
}

.example-page__attribution {
  font-size: var(--md-sys-typescale-label-small-size);
  color: var(--md-sys-color-outline);
  margin: 0;
}

/* ── Corpus section ─────────────────────────────────────────────────────────── */
.passage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
}

.passage-item {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: var(--pv-space-md);
}

.passage-item__ref {
  display: block;
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  color: var(--md-sys-color-primary);
  margin-bottom: var(--pv-space-xs);
  text-decoration: none;
}

.passage-item__ref:hover {
  text-decoration: underline;
}

.passage-item__mus {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface);
  margin: 0 0 var(--pv-space-xs);
}

.passage-item__en {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  font-style: italic;
  margin: 0;
}

/* ── Forms section ──────────────────────────────────────────────────────────── */
.forms-morph-family {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
  align-items: center;
}

/* Paradigm collapsible */
.paradigm {
  margin-bottom: var(--pv-space-md);
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  overflow: hidden;
}

.paradigm__summary {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  padding: var(--pv-space-md);
  cursor: pointer;
  list-style: none;
  font-size: var(--md-sys-typescale-title-small-size);
  font-weight: var(--md-sys-typescale-title-small-weight);
  color: var(--md-sys-color-on-surface);
}

.paradigm__summary::-webkit-details-marker { display: none; }

.paradigm__label {
  flex: 1;
}

/* Scrollable table wrapper */
.paradigm__table-wrap {
  overflow-x: auto;
  padding: 0 var(--pv-space-md) var(--pv-space-md);
}

.paradigm__table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--md-sys-typescale-body-small-size);
}

.paradigm__th {
  text-align: left;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  border-bottom: 2px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-small-size);
  font-weight: var(--md-sys-typescale-label-small-weight);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.paradigm__th--person { min-width: 140px; }

.paradigm__td {
  padding: var(--pv-space-xs) var(--pv-space-sm);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  vertical-align: top;
}

.paradigm__td--person {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-small-size);
  font-weight: normal;
  text-align: left;
  white-space: nowrap;
}

.paradigm__row:last-child .paradigm__td { border-bottom: none; }

.form-surface {
  display: block;
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.form-na {
  color: var(--md-sys-color-outline);
  font-size: var(--md-sys-typescale-body-small-size);
}

@media (max-width: 760px) {
  .paradigm__table-wrap {
    overflow-x: visible;
    padding: 0 var(--pv-space-sm) var(--pv-space-sm);
  }

  .paradigm__table,
  .paradigm__table tbody,
  .paradigm__table tr,
  .paradigm__table th,
  .paradigm__table td {
    display: block;
    width: 100%;
  }

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

  .paradigm__row {
    margin-bottom: var(--pv-space-sm);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    overflow: hidden;
  }

  .paradigm__row:last-child {
    margin-bottom: 0;
  }

  .paradigm__td {
    box-sizing: border-box;
    padding: var(--pv-space-sm);
  }

  .paradigm__row:last-child .paradigm__td {
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
  }

  .paradigm__row .paradigm__td:last-child {
    border-bottom: none;
  }

  .paradigm__td--person {
    min-width: 0;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
    font-size: var(--md-sys-typescale-label-medium-size);
    font-weight: var(--md-sys-typescale-label-medium-weight);
    text-align: left;
    white-space: normal;
  }

  .paradigm__td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr);
    column-gap: var(--pv-space-sm);
    text-align: right;
  }

  .paradigm__td[data-label]::before {
    content: attr(data-label);
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-label-small-size);
    font-weight: var(--md-sys-typescale-label-small-weight);
    text-align: left;
  }

  .paradigm__td[data-label] .form-surface,
  .paradigm__td[data-label] .form-na {
    grid-column: 2;
    overflow-wrap: anywhere;
  }
}

/* ── Related section ────────────────────────────────────────────────────────── */
.related-group {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
  margin-bottom: var(--pv-space-md);
}

.related-subgroup {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
}

.related-subgroup__label {
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  color: var(--md-sys-color-on-surface-variant);
  white-space: nowrap;
  min-width: 120px;
}

.related-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-xs);
}

.related-chip {
  display: inline-block;
  padding: 3px var(--pv-space-sm);
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-radius: var(--md-sys-shape-corner-full, 999px);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  text-decoration: none;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.related-chip:hover {
  background-color: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
  text-decoration: none;
}
/*
 * layout.css — Application shell layout (top app bar, main content, page grid).
 * Uses M3 CSS tokens from theme.css. Never hardcodes colors or font sizes here.
 */

/* ── Reset / base ────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  font-family: 'Roboto', sans-serif;
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Top app bar ────────────────────────────────────────────────────────────── */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  height: 64px;
  padding: 0 var(--pv-space-md);
  background-color: var(--md-sys-color-surface-container);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.app-bar__title {
  font-family: var(--md-sys-typescale-title-large-font);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  line-height: var(--md-sys-typescale-title-large-line);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  flex: 1;
}

.app-bar__title:hover {
  text-decoration: none;
}

/* ── Primary navigation ───────────────────────────────────────────────────── */
.app-shell {
  min-height: calc(100vh - 64px);
}

.primary-nav {
  display: flex;
  gap: var(--pv-space-sm);
  background-color: var(--md-sys-color-surface-container);
}

.primary-nav__destination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--pv-space-xs);
  min-width: 96px;
  min-height: 64px;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  border-radius: var(--md-sys-shape-corner-large);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  text-decoration: none;
}

.primary-nav__destination:hover {
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface-container-high);
}

.primary-nav__destination--active {
  color: var(--md-sys-color-on-secondary-container);
  background-color: var(--md-sys-color-secondary-container);
}

.primary-nav__icon {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.primary-nav__destination--active .primary-nav__icon {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.app-shell__content {
  min-width: 0;
}

/* ── Page container ─────────────────────────────────────────────────────────── */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--pv-space-xl) var(--pv-space-md);
}

/* ── Flash notices ──────────────────────────────────────────────────────────── */
.flash-container {
  max-width: 960px;
  margin: var(--pv-space-md) auto 0;
  padding: 0 var(--pv-space-md);
}

@media (min-width: 840px) {
  .app-shell {
    display: flex;
    align-items: stretch;
  }

  .primary-nav {
    position: sticky;
    top: 64px;
    align-self: flex-start;
    flex: 0 0 112px;
    flex-direction: column;
    min-height: calc(100vh - 64px);
    padding: var(--pv-space-lg) var(--pv-space-sm);
  }

  .primary-nav__destination {
    flex-direction: column;
    min-width: 88px;
  }

  .app-shell__content {
    flex: 1;
  }

  .page-container {
    max-width: 960px;
  }
}

@media (max-width: 839px) {
  .app-shell {
    padding-bottom: 80px;
  }

  .primary-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    justify-content: space-around;
    padding: var(--pv-space-xs) var(--pv-space-md);
    border-top: 1px solid var(--md-sys-color-outline-variant);
  }

  .primary-nav__destination {
    flex: 1;
    flex-direction: column;
    min-height: 64px;
  }
}

.flash-notice,
.flash-alert {
  padding: var(--pv-space-sm) var(--pv-space-md);
  border-radius: var(--md-sys-shape-corner-small);
  margin-bottom: var(--pv-space-sm);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.flash-notice {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.flash-alert {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

/* ── Section surface (entry hub panels, etc.) ───────────────────────────────── */
.surface {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: var(--pv-space-lg);
  margin-bottom: var(--pv-space-md);
}

.surface--elevated {
  background-color: var(--md-sys-color-surface-container);
  box-shadow: 0 var(--md-sys-elevation-level1) var(--md-sys-elevation-level2) rgba(0,0,0,0.12);
}

/* ── Badge / chip ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px var(--pv-space-sm);
  border-radius: var(--md-sys-shape-corner-full);
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-size: var(--md-sys-typescale-label-small-size);
  font-weight: var(--md-sys-typescale-label-small-weight);
  line-height: var(--md-sys-typescale-label-small-line);
}

/* ── Divider ────────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  margin: var(--pv-space-md) 0;
}

/* ── M3-style form controls (replaces @material/web components) ─────────────── */

/* Outlined text field — floating label pattern */
.text-field {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  width: 100%;
}

.text-field__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font-family: 'Roboto', sans-serif;
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface);
  background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  outline: none;
  transition: border-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.text-field__input:focus {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.text-field__label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
  transition: all var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
  background: var(--md-sys-color-background);
  padding: 0 4px;
}

/* Float label when input has content or is focused */
.text-field__input:not(:placeholder-shown) + .text-field__label,
.text-field__input:focus + .text-field__label {
  top: 0;
  font-size: var(--md-sys-typescale-label-small-size);
  color: var(--md-sys-color-primary);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  font-family: 'Roboto', sans-serif;
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  letter-spacing: 0.006em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard),
              background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.btn--filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.btn--filled:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 92%, var(--md-sys-color-on-primary));
  box-shadow: var(--md-sys-elevation-1);
}

.btn--outlined {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
}

.btn--outlined:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.btn--text {
  background-color: transparent;
  color: var(--md-sys-color-primary);
  padding: 0 12px;
}

.btn--text:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.btn .material-symbols-outlined {
  font-size: 18px;
}
/*
 * passages.css — Corpus passage page styles.
 */

.passage-page {
  max-width: 780px;
  margin: 0 auto;
}

.passage-header {
  margin-bottom: var(--pv-space-xl);
}

.passage-ref {
  font-family: var(--md-sys-typescale-title-large-font);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  color: var(--md-sys-color-on-surface);
  margin: 0 0 var(--pv-space-xs);
}

.passage-corpus-label {
  font-size: var(--md-sys-typescale-label-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.passage-text {
  margin-bottom: var(--pv-space-xl);
}

/* Mvskoke text with clickable tokens */
.passage-mus {
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: 2;
  margin-bottom: var(--pv-space-md);
}

.passage-token {
  display: inline;
}

/* Tokens with a lexicon match are clickable */
.passage-token--linked {
  cursor: pointer;
  border-radius: var(--md-sys-shape-corner-extra-small);
  padding: 1px 2px;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.passage-token--linked:hover {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

/* Token that matches the current entry (used when passage is shown from hub) */
.passage-token--highlight {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-radius: var(--md-sys-shape-corner-extra-small);
  padding: 1px 3px;
  font-weight: 500;
}

.passage-eng {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  font-style: italic;
  border-left: 3px solid var(--md-sys-color-outline-variant);
  padding-left: var(--pv-space-md);
  margin: 0;
}

.passage-curation-toggle,
.passage-curation-mode {
  display: inline-block;
  margin-top: var(--pv-space-sm);
  font-size: var(--md-sys-typescale-label-large-size);
}

.passage-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-md);
  align-items: baseline;
}

.passage-edit-warning {
  margin-bottom: var(--pv-space-lg);
  padding: var(--pv-space-md);
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-radius: var(--md-sys-shape-corner-medium);
}

.passage-edit-warning p {
  margin: 0 0 var(--pv-space-sm);
}

.passage-edit-warning p:last-child {
  margin-bottom: 0;
}

.passage-edit-form {
  display: grid;
  gap: var(--pv-space-md);
  margin-bottom: var(--pv-space-xl);
}

.passage-edit-form label {
  display: grid;
  gap: var(--pv-space-xs);
}

.passage-edit-form textarea {
  width: 100%;
  max-width: 40rem;
  padding: var(--pv-space-sm);
  font: inherit;
  line-height: 1.5;
}

.passage-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-md);
  align-items: center;
}

.passage-edit-cancel {
  font-size: var(--md-sys-typescale-label-large-size);
}

.passage-edit-rematch {
  padding: var(--pv-space-md);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.passage-edit-rematch h2 {
  margin: 0 0 var(--pv-space-sm);
  font-size: var(--md-sys-typescale-title-medium-size);
}

.passage-edit-rematch p {
  margin: 0 0 var(--pv-space-md);
  color: var(--md-sys-color-on-surface-variant);
}

.passage-edit-rematch-button {
  cursor: pointer;
}

.passage-curation-panel {
  margin-top: var(--pv-space-xl);
  padding: var(--pv-space-md);
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
}

.passage-curation-selection {
  min-height: 1.5em;
  font-weight: 500;
}

.passage-curation-panel label {
  display: grid;
  gap: var(--pv-space-xs);
}

.passage-curation-panel input[type="search"] {
  max-width: 32rem;
  padding: var(--pv-space-sm);
}

.curation-entry-results {
  display: grid;
  gap: var(--pv-space-xs);
  max-width: 32rem;
  margin: var(--pv-space-xs) 0 var(--pv-space-sm);
}

.curation-entry-result {
  text-align: left;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  cursor: pointer;
}

.curation-entry-status {
  margin: 0;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
}

.passage-curation-next {
  margin-top: var(--pv-space-md);
}

.curation-review-actions {
  display: flex;
  gap: var(--pv-space-sm);
  margin-bottom: var(--pv-space-md);
}

.curation-match-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--pv-space-sm);
}

.curation-match-mode a {
  text-decoration: none;
  padding: 2px 8px;
  border-radius: var(--md-sys-shape-corner-extra-small);
  color: var(--md-sys-color-on-surface-variant);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.curation-match-mode a.is-active {
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  border-color: transparent;
  font-weight: 600;
}

.curation-match-mode-hint {
  font-size: var(--md-sys-typescale-label-small-size);
  color: var(--md-sys-color-on-surface-variant);
}

.curation-candidate-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--pv-space-sm);
}

.curation-candidate {
  padding: var(--pv-space-md);
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-small);
}

.curation-candidate label {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
}

.curation-candidate-state {
  font-size: var(--md-sys-typescale-label-small-size);
  color: var(--md-sys-color-on-surface-variant);
  text-transform: capitalize;
}

.curation-candidate-context {
  margin: var(--pv-space-sm) 0 0;
}

.curation-candidate-context mark {
  padding: 1px 3px;
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-radius: var(--md-sys-shape-corner-extra-small);
}

/* ── Occurrence curation widget ─────────────────────────────────────────────
   Hover a matched token → a small popover appears above it with
   suppress (✕) and confirm (✓) actions.
   
   Key: inline-block on the group so position:relative creates a
   stacking context for the absolute popover.
─────────────────────────────────────────────────────────────────────────── */

.passage-token-group {
  display: inline-block;
  position: relative;
}

/* Popover — invisible by default.
   Use opacity+visibility (not display) so we can add a hide delay.
   The delay gives the mouse time to reach the popover diagonally
   before it fades — even if the path briefly exits the token's box. */
.occ-curation {
  display: flex;            /* always in flow so transitions work */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  /* Hide: wait 150ms before fading out */
  transition: opacity 80ms ease, visibility 0s linear 150ms;

  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  align-items: center;
  gap: 4px;
  background-color: var(--md-sys-color-surface-container-highest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: 3px 6px 6px;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Reveal immediately on hover */
.passage-token-group:hover .occ-curation {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 80ms ease, visibility 0s linear 0s;
}

/* Each match gets its own label + buttons */
.occ-curation__item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.occ-curation__label {
  font-size: 10px;
  font-family: monospace;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Divider between multiple matches on one token */
.occ-curation__item + .occ-curation__item {
  border-left: 1px solid var(--md-sys-color-outline-variant);
  padding-left: 4px;
  margin-left: 2px;
}

/* Suppress / confirm links — rendered via link_to (inline <a>, no form) */
.occ-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 100ms ease;
}

.occ-btn--suppress { color: var(--md-sys-color-error); }
.occ-btn--suppress:hover { background-color: var(--md-sys-color-error-container); }

.occ-btn--confirm  { color: var(--md-sys-color-tertiary); }
.occ-btn--confirm:hover  { background-color: var(--md-sys-color-tertiary-container); }

/* Corpus landing — work entry points */
.corpus-landing__header {
  margin-bottom: var(--pv-space-xl);
}

.corpus-landing__heading {
  margin: 0 0 var(--pv-space-sm);
}

.corpus-landing__lede {
  margin: 0;
  max-width: 36rem;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line);
}

.corpus-landing__works {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pv-space-md);
}

.corpus-work-card {
  display: flex;
  align-items: center;
  gap: var(--pv-space-md);
  padding: var(--pv-space-lg);
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  transition: background-color var(--md-sys-motion-duration-short2)
    var(--md-sys-motion-easing-standard);
}

.corpus-work-card:hover {
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

.corpus-work-card__icon {
  flex: 0 0 auto;
  font-size: 32px;
  color: var(--md-sys-color-primary);
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 32;
}

.corpus-work-card__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: var(--pv-space-xs);
}

.corpus-work-card__title {
  font-family: var(--md-sys-typescale-title-large-font);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  line-height: var(--md-sys-typescale-title-large-line);
}

.corpus-work-card__description {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  line-height: var(--md-sys-typescale-body-medium-line);
}

.corpus-work-card__meta {
  font-size: var(--md-sys-typescale-label-large-size);
  color: var(--md-sys-color-on-surface-variant);
}

.corpus-work-card__chevron {
  flex: 0 0 auto;
  color: var(--md-sys-color-on-surface-variant);
}

/* Passages index (within a work) — legacy flat list retained for fallbacks */
.passages-index__heading {
  margin-bottom: var(--pv-space-xl);
}

.passages-index__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--pv-space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.passages-index__item a {
  display: block;
  padding: var(--pv-space-sm) var(--pv-space-md);
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-small);
  font-size: var(--md-sys-typescale-label-large-size);
  color: var(--md-sys-color-on-surface);
}

.passages-index__item a:hover {
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

/* Browse: books / chapters */
.corpus-browse__header {
  margin-bottom: var(--pv-space-xl);
}

.corpus-browse__heading {
  margin: 0 0 var(--pv-space-sm);
}

.corpus-browse__lede {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-large-size);
}

.corpus-browse__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--pv-space-sm);
}

.corpus-browse__grid--chapters {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}

.corpus-browse-card {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-xs);
  min-height: 72px;
  padding: var(--pv-space-md);
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
}

.corpus-browse-card:hover {
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

.corpus-browse-card--chapter {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
}

.corpus-browse-card__title {
  font-family: var(--md-sys-typescale-title-medium-font);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
  line-height: var(--md-sys-typescale-title-medium-line);
}

.corpus-browse-card--chapter .corpus-browse-card__title {
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
}

.corpus-browse-card__meta {
  font-size: var(--md-sys-typescale-label-medium-size);
  color: var(--md-sys-color-on-surface-variant);
}

/* Chapter reader */
.corpus-reader {
  max-width: 900px;
}

.corpus-reader__header {
  margin-bottom: var(--pv-space-lg);
}

.corpus-reader__heading {
  margin: 0;
}

/* Reading mode: linked words inherit body color unless highlight is on. */
.corpus-reader .passage-token--linked {
  color: inherit;
  text-decoration: none;
}

.corpus-reader .passage-token--linked:hover,
.corpus-reader .passage-token--linked:focus-visible {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  text-decoration: none;
}

/* Toggle on: linked words read as primary green at rest; hover unchanged. */
.corpus-reader--highlight-links .passage-token--linked {
  color: var(--md-sys-color-primary);
}

.corpus-reader--highlight-links .passage-token--linked:hover,
.corpus-reader--highlight-links .passage-token--linked:focus-visible {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.corpus-display-controls {
  display: grid;
  gap: var(--pv-space-md);
  margin-bottom: var(--pv-space-xl);
  padding: var(--pv-space-md);
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
}

.corpus-display-controls__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pv-space-sm);
}

.corpus-display-controls__label {
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  margin-right: var(--pv-space-xs);
}

.corpus-toggle {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--md-sys-shape-corner-small);
  border: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-label-large-size);
  text-decoration: none;
}

.corpus-toggle:hover {
  text-decoration: none;
  border-color: var(--md-sys-color-primary);
}

.corpus-toggle--active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
  font-weight: 600;
}

.corpus-chapter {
  display: grid;
  gap: var(--pv-space-md);
}

.corpus-verse {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: var(--pv-space-sm);
  align-items: start;
  margin: 0;
}

.corpus-verse__number {
  display: block;
  width: 100%;
  padding-top: 0.35em; /* optically align with body-large first line */
  text-align: right;
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: 500;
  line-height: 1.4;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.corpus-verse__number:hover {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
}

.corpus-verse__body {
  min-width: 0;
}

.corpus-verse__body.passage-mus {
  margin: 0;
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: 2;
}

.corpus-verse__body.passage-text {
  margin: 0;
}

.corpus-verse__body .passage-mus {
  margin-bottom: var(--pv-space-md);
}

.corpus-verse__body .passage-eng {
  margin: 0;
}

/* Side-by-side — number gutter + mus + eng */
.corpus-side-by-side__headers,
.corpus-verse-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--pv-space-sm);
  align-items: start;
}

.corpus-side-by-side__headers {
  margin-bottom: var(--pv-space-md);
  padding-bottom: var(--pv-space-sm);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.corpus-side-by-side__label {
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant);
}

.corpus-verse-row {
  margin-bottom: var(--pv-space-md);
}

.corpus-verse-row .corpus-verse__number {
  padding-top: 0.35em;
}

.corpus-verse-cell .passage-mus,
.corpus-verse-cell .passage-eng {
  margin: 0;
}

/* Give mus/eng columns a little breathing room from each other */
.corpus-verse-row .corpus-verse-cell + .corpus-verse-cell,
.corpus-side-by-side__headers .corpus-side-by-side__label + .corpus-side-by-side__label {
  margin-left: var(--pv-space-md);
}

@media (max-width: 768px) {
  .corpus-side-by-side__headers {
    display: none;
  }

  .corpus-verse-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    row-gap: var(--pv-space-sm);
  }

  .corpus-verse-row .corpus-verse__number {
    grid-row: 1 / span 2;
  }

  .corpus-verse-row .corpus-verse-cell + .corpus-verse-cell {
    margin-left: 0;
  }
}
.quiz-page {
  --quiz-color-incorrect-container: #3a120e;
}

.quiz-page__intro {
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: var(--pv-space-xl);
}

.quiz-history-list {
  margin: 0;
}

.quiz-history-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pv-space-md);
  list-style: none;
  margin: 0 0 var(--pv-space-xl);
  padding: var(--pv-space-lg);
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container-low);
}

.quiz-history-stats__item {
  display: grid;
  gap: var(--pv-space-2xs, 2px);
  text-align: center;
}

.quiz-history-stats__value {
  font-size: var(--md-sys-typescale-headline-small-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quiz-history-stats__label {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
}

.quiz-history-review__heading {
  margin: 0 0 var(--pv-space-md);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

@media (max-width: 720px) {
  .quiz-history-stats {
    grid-template-columns: 1fr;
  }
}

.quiz-list {
  display: grid;
  gap: var(--pv-space-xl);
}

.quiz-section {
  padding: var(--pv-space-lg);
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-surface-container-low);
}

.quiz-section__header {
  margin-bottom: var(--pv-space-md);
}

.quiz-section__header h2 {
  margin: 0;
}

.quiz-section__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-xs);
  list-style: none;
  margin: var(--pv-space-xs) 0 0;
  padding: 0;
}

.quiz-section__badges .badge {
  border-radius: var(--md-sys-shape-corner-small);
}

.quiz-section__header p {
  margin: var(--pv-space-xs) 0 0;
  color: var(--md-sys-color-on-surface-variant);
}

.quiz-question__prompt {
  padding: var(--pv-space-lg);
  margin-bottom: var(--pv-space-md);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container);
  text-align: center;
}

.quiz-question__label {
  margin: 0 0 var(--pv-space-sm);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
}

.quiz-question__stimulus {
  margin: 0;
  font-size: var(--md-sys-typescale-headline-small-size);
  font-weight: 500;
}

.quiz-answer-form {
  display: grid;
  gap: var(--pv-space-sm);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--pv-space-md);
  min-height: 76px;
  padding: var(--pv-space-md);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.quiz-option:hover,
.quiz-option:has(input:focus-visible) {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container-high);
}

.quiz-option:has(input:checked) {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
}

/* Fixed 48px gutter: radio while answering, speaker after reveal.
   Sized to match .quiz-option__audio so text often stays put. */
.quiz-option__lead {
  display: inline-flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.quiz-option__lead input {
  margin: 0;
}

.quiz-option__content {
  display: flex;
  align-items: center;
  gap: var(--pv-space-md);
  min-width: 0;
  width: 100%;
}

.quiz-option__text {
  font-size: var(--md-sys-typescale-body-large-size);
  text-wrap: balance;
}

.quiz-option__revelation {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 400;
}

.quiz-option__audio,
.quiz-audio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--md-sys-color-on-secondary-container);
  background: var(--md-sys-color-secondary-container);
  cursor: pointer;
}

.quiz-audio-button {
  font: inherit;
}

.quiz-answer-form__submit {
  justify-self: start;
  margin-top: var(--pv-space-sm);
}

.quiz-feedback {
  display: grid;
  gap: var(--pv-space-md);
}

.quiz-feedback .quiz-question__prompt {
  margin-bottom: 0;
}

.quiz-feedback__result {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  margin: 0;
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: 500;
}

.quiz-feedback__result--correct {
  color: var(--md-sys-color-primary);
}

.quiz-feedback__result--incorrect {
  color: var(--md-sys-color-error);
}

.quiz-feedback__options {
  display: grid;
  gap: var(--pv-space-sm);
}

.quiz-option--feedback {
  cursor: default;
}

.quiz-option--feedback:hover {
  border-color: var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
}

.quiz-option--correct,
.quiz-option--correct:hover {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
}

/* On a miss, mark the right answer with border only so the filled
   incorrect choice stays the strongest selected-state signal. */
.quiz-feedback--incorrect .quiz-option--correct,
.quiz-feedback--incorrect .quiz-option--correct:hover {
  background: var(--md-sys-color-surface);
}

.quiz-option--incorrect,
.quiz-option--incorrect:hover {
  border-color: var(--md-sys-color-error);
  background: var(--quiz-color-incorrect-container, #3a120e);
  color: #fff;
}

.quiz-option--incorrect .quiz-option__revelation {
  color: rgb(255 255 255 / 78%);
}

.quiz-option__status {
  flex: 0 0 auto;
  margin-left: auto;
}

.quiz-option--correct .quiz-option__status {
  color: var(--md-sys-color-primary);
}

.quiz-option--incorrect .quiz-option__status {
  color: var(--md-sys-color-error);
}

.quiz-feedback__familiarity {
  display: grid;
  gap: var(--pv-space-sm);
  padding: var(--pv-space-md);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container);
}

.quiz-feedback__familiarity-prompt {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.quiz-feedback__actions {
  display: flex;
  align-items: center;
  gap: var(--pv-space-md);
}

.quiz-empty {
  color: var(--md-sys-color-on-surface-variant);
}

@media (max-width: 480px) {
  .quiz-option {
    padding: 8px;
  }
}
/*
 * search.css — Search page styles.
 */

.search-page {
  max-width: 960px;
  margin: 0 auto;
}

.search-hero {
  text-align: center;
  padding: var(--pv-space-2xl) 0 var(--pv-space-xl);
  max-width: 55%;
  margin-inline: auto;
}

.search-hero--compact {
  padding-bottom: var(--pv-space-md);
}

.search-hero__wordmark {
  font-family: var(--md-sys-typescale-display-large-font);
  font-size: var(--md-sys-typescale-display-large-size);
  font-weight: var(--md-sys-typescale-display-large-weight);
  line-height: var(--md-sys-typescale-display-large-line);
  color: var(--md-sys-color-primary);
  letter-spacing: -1px;
  margin: 0 0 var(--pv-space-sm);
}

.search-hero__subtitle {
  font-size: var(--md-sys-typescale-title-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 var(--pv-space-xl);
}

.search-hero__browse {
  color: var(--md-sys-color-on-surface-variant);
  margin: var(--pv-space-md) 0 0;
}

.search-form {
  display: flex;
  gap: var(--pv-space-sm);
  align-items: stretch;
}

.search-form__icon {
  display: inline-flex;
  align-items: center;
}

.search-form__icon md-circular-progress {
  --md-circular-progress-size: 20px;
  --md-circular-progress-active-indicator-width: 4;
}

.search-form md-outlined-text-field {
  flex: 1;
}

.search-form md-filled-button {
  --md-filled-button-container-height: 56px;
  --md-filled-button-container-shape: var(--md-sys-shape-corner-extra-small);
}

.search-results {
  margin-top: var(--pv-space-xl);
}

.search-tabs {
  display: flex;
  gap: var(--pv-space-xs);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  margin-bottom: var(--pv-space-lg);
}

.search-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  font: inherit;
  font-weight: var(--md-sys-typescale-label-large-weight);
  padding: var(--pv-space-sm) var(--pv-space-md);
}

.search-tab[aria-selected="true"] {
  border-bottom-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.search-tab:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.search-result-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
  margin-bottom: var(--pv-space-lg);
}

.search-filter-chip {
  align-items: center;
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  display: inline-flex;
  font-size: var(--md-sys-typescale-label-large-size);
  gap: var(--pv-space-xs);
  min-height: 40px;
  padding: 0 var(--pv-space-md);
}

.search-filter-chip:has(input:checked) {
  background-color: var(--md-sys-color-secondary-container);
  border-color: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary-container);
}

.search-filter-chip input {
  accent-color: var(--md-sys-color-secondary);
  margin: 0;
}

.search-filter-chip:focus-within {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.search-tab-panel[hidden] {
  display: none;
}

.search-results__heading {
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--pv-space-md);
}

.search-result-group + .search-result-group {
  margin-top: var(--pv-space-2xl);
}

.search-result-group__explanation,
.search-semantic-only-notice {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.search-result-group__explanation {
  margin: calc(-1 * var(--pv-space-sm)) 0 var(--pv-space-md);
}

.search-semantic-only-notice {
  background-color: var(--md-sys-color-secondary-container);
  border-left: 3px solid var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary-container);
  margin: 0 0 var(--pv-space-lg);
  padding: var(--pv-space-sm) var(--pv-space-md);
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
}

.result-card {
  display: block;
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  padding: var(--pv-space-md);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.result-card:hover {
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

.result-card__headword {
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  color: var(--md-sys-color-primary);
  margin: 0 0 var(--pv-space-xs);
}

.result-card__syllabic {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  letter-spacing: 0.04em;
}

.result-card__meta {
  display: flex;
  align-items: center;
  gap: var(--pv-space-sm);
  margin: var(--pv-space-xs) 0 var(--pv-space-sm);
}

.badge__icon {
  font-size: var(--md-sys-typescale-label-medium-size);
  vertical-align: middle;
}

.result-card__definition {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface);
  margin: 0;
}

.search-empty {
  text-align: center;
  padding: var(--pv-space-2xl);
  color: var(--md-sys-color-on-surface-variant);
}

/* ── Homepage ─────────────────────────────────────────────────────────────── */
.home-section {
  padding: var(--pv-space-2xl) 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.home-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--pv-space-md);
  margin-bottom: var(--pv-space-lg);
}

.home-section__header h2,
.home-section__header p,
.explore-grid h3,
.ranking-panel h3,
.review-card h3,
.featured-passage h3,
.passage-card__ref {
  margin-top: 0;
}

.home-section__header h2 {
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
  margin-bottom: var(--pv-space-xs);
}

.home-section__header p:last-child {
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 0;
}

.home-section__eyebrow {
  color: var(--md-sys-color-primary);
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  letter-spacing: 0.08em;
  margin: 0 0 var(--pv-space-xs);
  text-transform: uppercase;
}

.home-section__link {
  flex: none;
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.passage-card,
.featured-passage,
.ranking-panel,
.review-card {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
}

.discover-card {
  display: block;
}

.word-card {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  box-sizing: border-box;
  display: block;
  flex: 1;
  padding: var(--pv-space-lg);
}

.word-card__top {
  display: block;
}

.word-card__header {
  align-items: flex-start;
  display: flex;
  gap: var(--pv-space-md);
}

.word-card__title-block {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: var(--pv-space-xs);
  max-width: 100%;
  min-width: 0;
}

.word-card__lead {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
}

.word-card__headword {
  color: var(--md-sys-color-primary);
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
  margin: 0;
}

.word-card__syllabic {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  letter-spacing: 0.04em;
  margin: 0;
}

.word-card__head-tools {
  align-items: center;
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
}

.word-card__actions {
  align-items: flex-start;
  display: flex;
  flex: none;
  gap: var(--pv-space-sm);
  margin-left: auto;
}

.word-card__actions .word-card__action {
  margin-left: 0;
}

.word-card__headword a {
  color: inherit;
  text-decoration: none;
}

.word-card__headword a:hover {
  text-decoration: underline;
}

.word-card__type {
  border-radius: var(--md-sys-shape-corner-small);
}

.word-card__action {
  align-items: center;
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-primary);
  display: inline-flex;
  flex: none;
  height: 40px;
  justify-content: center;
  margin-left: auto;
  text-decoration: none;
  width: 40px;
}

.word-card__action:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.word-card__action .material-symbols-outlined {
  font-size: 20px;
}

.word-card__senses {
  font-size: var(--md-sys-typescale-title-medium-size);
  margin: var(--pv-space-sm) 0 var(--pv-space-md);
  padding-left: var(--pv-space-lg);
}

.word-card__senses li {
  padding: var(--pv-space-xs) 0;
}

.word-card__sense--matched {
  color: var(--md-sys-color-primary);
  font-weight: 500;
}

.word-card__sense-match {
  background-color: var(--md-sys-color-secondary-container);
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-secondary-container);
  font-size: var(--md-sys-typescale-label-small-size);
  font-weight: var(--md-sys-typescale-label-small-weight);
  margin-left: var(--pv-space-xs);
  padding: 2px var(--pv-space-xs);
}

.word-card__matched-forms {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  margin: calc(-1 * var(--pv-space-xs)) 0 var(--pv-space-md);
}

.word-card__matched-forms strong {
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

.word-card__matched-forms-more {
  display: block;
  margin-top: var(--pv-space-xs);
}

.word-card__matched-forms-more summary {
  color: var(--md-sys-color-primary);
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  list-style: none;
}

.word-card__matched-forms-more summary::-webkit-details-marker {
  display: none;
}

.word-card__matched-forms-more > strong {
  display: block;
  margin-top: var(--pv-space-xs);
}

.word-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-sm) var(--pv-space-md);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.word-card__examples {
  width: 100%;
}

.word-card__examples summary {
  align-items: center;
  cursor: pointer;
  border-radius: var(--md-sys-shape-corner-small);
  display: flex;
  gap: var(--pv-space-xs);
  list-style: none;
  padding: var(--pv-space-xs) var(--pv-space-sm);
  width: fit-content;
}

.word-card__examples summary::-webkit-details-marker {
  display: none;
}

.word-card__examples summary:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
  color: var(--md-sys-color-primary);
}

.word-card__examples summary:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.word-card__examples summary .material-symbols-outlined {
  transition: transform var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.word-card__examples[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.word-card__example-list {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  list-style: none;
  margin: 0;
  padding: var(--pv-space-sm) 0 0;
}

.word-card__example {
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: var(--pv-space-sm) 0;
}

.word-card__example:last-child {
  border-bottom: 0;
}

.word-card__example-ref {
  color: var(--md-sys-color-primary);
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
}

.word-card__example-mus,
.word-card__example-eng {
  margin: var(--pv-space-xs) 0 0;
}

.word-card__example-mus {
  color: var(--md-sys-color-on-surface);
}

.word-card__example-eng {
  color: var(--md-sys-color-on-surface-variant);
}

[data-controller="compact-audio"] audio {
  display: none;
}

.compact-audio {
  align-items: center;
  background-color: var(--md-sys-color-primary-container);
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-primary-container);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pv-space-lg);
}

.attestation-rankings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pv-space-md);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pv-space-md);
}

.review-card {
  color: var(--md-sys-color-on-surface);
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-xs);
  padding: var(--pv-space-lg);
  text-decoration: none;
  transition: background-color var(--md-sys-motion-duration-short1) var(--md-sys-motion-easing-standard);
}

.review-card:hover {
  background-color: var(--md-sys-color-surface-container);
  text-decoration: none;
}

.review-card h3 {
  margin-bottom: 0;
}

.review-card__count {
  color: var(--md-sys-color-primary);
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
  margin: 0;
}

.review-card__description {
  color: var(--md-sys-color-on-surface-variant);
  flex: 1;
  font-size: var(--md-sys-typescale-body-medium-size);
  margin: 0 0 var(--pv-space-sm);
}

.review-card__link,
.review-discover__link {
  color: var(--md-sys-color-primary);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.review-summary {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  margin: var(--pv-space-md) 0;
}

.review-discover {
  align-items: center;
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-surface);
  display: flex;
  justify-content: space-between;
  gap: var(--pv-space-md);
  padding: var(--pv-space-md) var(--pv-space-lg);
  text-decoration: none;
}

.review-discover:hover {
  background-color: var(--md-sys-color-surface-container-low);
  text-decoration: none;
}

.review-discover small {
  color: var(--md-sys-color-on-surface-variant);
  display: block;
  margin-top: var(--pv-space-xs);
}

.word-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-sm);
}

.word-type-chip {
  --md-assist-chip-container-height: 40px;
  text-decoration: none;
}

.word-type-chip__count,
.facet-row__count {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
}

.word-type-chip__count {
  background-color: var(--md-sys-color-secondary-container);
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: var(--md-sys-typescale-label-large-weight);
  margin-inline-start: var(--pv-space-xs);
  padding: 2px var(--pv-space-xs);
}

.word-type-chip:hover,
.facet-row:hover {
  text-decoration: none;
}

.facet-list {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-sm);
}

.facet-row {
  align-items: center;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-surface);
  display: flex;
  justify-content: space-between;
  padding: var(--pv-space-md);
}

.facet-row small {
  color: var(--md-sys-color-on-surface-variant);
  display: block;
  margin-top: var(--pv-space-xs);
}

.ranking-panel {
  padding: var(--pv-space-lg);
}

.ranking-list {
  list-style: none;
  margin: 0 0 var(--pv-space-md);
  padding: 0;
}

.ranking-list li {
  align-items: center;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  justify-content: space-between;
  gap: var(--pv-space-md);
  padding: var(--pv-space-sm) 0;
}

.ranking-list li span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}

.passage-card,
.featured-passage {
  padding: var(--pv-space-lg);
}

.passage-card__top {
  align-items: flex-start;
  display: flex;
  gap: var(--pv-space-md);
  margin-bottom: var(--pv-space-md);
}

.passage-card__title-block {
  flex: 1;
  min-width: 0;
}

.passage-card__title-block .passage-corpus-label {
  margin: 0 0 var(--pv-space-xs);
}

.passage-card__action {
  align-items: center;
  background-color: transparent;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-primary);
  display: inline-flex;
  flex: none;
  height: 40px;
  justify-content: center;
  text-decoration: none;
  width: 40px;
}

.passage-card__action:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.passage-card__action .material-symbols-outlined {
  font-size: 20px;
}

.passage-card .passage-text,
.featured-passage .passage-text {
  margin-bottom: var(--pv-space-md);
}

.passage-card__ref {
  margin: 0;
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  line-height: var(--md-sys-typescale-title-large-line);
  color: var(--md-sys-color-on-surface);
}

.passage-card__read {
  display: inline-flex;
}

.passage-card__extra {
  margin-top: var(--pv-space-md);
  padding-top: var(--pv-space-md);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* ── Word browse ──────────────────────────────────────────────────────────── */
.words-page {
  max-width: 780px;
  margin: 0 auto;
}

.words-header {
  margin-bottom: var(--pv-space-xl);
}

.words-header h1 {
  font-size: var(--md-sys-typescale-headline-large-size);
  font-weight: var(--md-sys-typescale-headline-large-weight);
  margin: 0 0 var(--pv-space-sm);
}

.words-header p:last-child,
.words-count {
  color: var(--md-sys-color-on-surface-variant);
}

.words-filters {
  align-items: end;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-medium);
  display: flex;
  flex-wrap: wrap;
  gap: var(--pv-space-md);
  padding: var(--pv-space-md);
}

.words-filters label:not(.words-filter-check) {
  display: flex;
  flex-direction: column;
  gap: var(--pv-space-xs);
  font-size: var(--md-sys-typescale-label-medium-size);
}

.words-filters select {
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  min-height: 40px;
  padding: 0 var(--pv-space-sm);
}

.words-filter-check {
  align-items: center;
  display: inline-flex;
  gap: var(--pv-space-xs);
  min-height: 40px;
}

.words-count {
  margin: var(--pv-space-lg) 0 var(--pv-space-md);
}

.pagination {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: var(--pv-space-md);
  margin-top: var(--pv-space-xl);
}

@media (max-width: 700px) {
  .search-hero {
    max-width: 100%;
  }

  .search-form,
  .discover-card,
  .home-section__header {
    align-items: stretch;
    flex-direction: column;
  }

  .explore-grid,
  .attestation-rankings,
  .review-grid {
    grid-template-columns: 1fr;
  }
}
/*
 * theme.css — Material Design 3 color and typography tokens for Punvyvs.
 *
 * Token naming follows the M3 spec: --md-sys-color-*, --md-sys-typescale-*.
 * Override these here to set the app's brand palette; all components and
 * layout stylesheets reference these vars — never hardcoded colors elsewhere.
 *
 * Palette generated from M3 Theme Builder (https://m3.material.io/theme-builder)
 * Seed color: #5B7C5A (a muted Mvskoke-inspired green).
 */

:root {
  /* ── Color scheme (light) ─────────────────────────────────────────────── */
  --md-sys-color-primary:            #3a6b39;
  --md-sys-color-on-primary:         #ffffff;
  --md-sys-color-primary-container:  #bbf0b5;
  --md-sys-color-on-primary-container: #002204;

  --md-sys-color-secondary:          #52634f;
  --md-sys-color-on-secondary:       #ffffff;
  --md-sys-color-secondary-container: #d5e8cf;
  --md-sys-color-on-secondary-container: #101f10;

  --md-sys-color-tertiary:           #38656a;
  --md-sys-color-on-tertiary:        #ffffff;
  --md-sys-color-tertiary-container: #bceaef;
  --md-sys-color-on-tertiary-container: #002023;

  --md-sys-color-error:              #ba1a1a;
  --md-sys-color-on-error:           #ffffff;
  --md-sys-color-error-container:    #ffdad6;
  --md-sys-color-on-error-container: #410002;

  --md-sys-color-background:         #fafdf6;
  --md-sys-color-on-background:      #1a1c19;

  --md-sys-color-surface:            #fafdf6;
  --md-sys-color-on-surface:         #1a1c19;
  --md-sys-color-surface-variant:    #dde5d9;
  --md-sys-color-on-surface-variant: #414941;

  --md-sys-color-surface-container-lowest:  #ffffff;
  --md-sys-color-surface-container-low:     #f4f7ef;
  --md-sys-color-surface-container:         #eef1e9;
  --md-sys-color-surface-container-high:    #e8ebe3;
  --md-sys-color-surface-container-highest: #e3e6de;

  --md-sys-color-outline:            #717970;
  --md-sys-color-outline-variant:    #c1c9bd;
  --md-sys-color-shadow:             #000000;
  --md-sys-color-scrim:              #000000;

  --md-sys-color-inverse-surface:    #2f312d;
  --md-sys-color-inverse-on-surface: #f1f4ec;
  --md-sys-color-inverse-primary:    #a0d49a;

  /* ── Shape ─────────────────────────────────────────────────────────────── */
  --md-sys-shape-corner-none:        0px;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small:       8px;
  --md-sys-shape-corner-medium:      12px;
  --md-sys-shape-corner-large:       16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full:        50%;

  /* ── Elevation overlays ─────────────────────────────────────────────────── */
  --md-sys-elevation-level0: 0px;
  --md-sys-elevation-level1: 1px;
  --md-sys-elevation-level2: 3px;
  --md-sys-elevation-level3: 6px;

  /* ── Motion ─────────────────────────────────────────────────────────────── */
  --md-sys-motion-duration-short1:  50ms;
  --md-sys-motion-duration-medium2: 300ms;
  --md-sys-motion-easing-standard:  cubic-bezier(0.2, 0, 0, 1);

  /* ── Typography scale ───────────────────────────────────────────────────── */
  --md-sys-typescale-display-large-font:   'Roboto', sans-serif;
  --md-sys-typescale-display-large-size:   57px;
  --md-sys-typescale-display-large-weight: 400;
  --md-sys-typescale-display-large-line:   64px;

  --md-sys-typescale-headline-large-font:  'Roboto', sans-serif;
  --md-sys-typescale-headline-large-size:  32px;
  --md-sys-typescale-headline-large-weight:400;
  --md-sys-typescale-headline-large-line:  40px;

  --md-sys-typescale-headline-medium-font:  'Roboto', sans-serif;
  --md-sys-typescale-headline-medium-size:  28px;
  --md-sys-typescale-headline-medium-weight:400;
  --md-sys-typescale-headline-medium-line:  36px;

  --md-sys-typescale-title-large-font:   'Roboto', sans-serif;
  --md-sys-typescale-title-large-size:   22px;
  --md-sys-typescale-title-large-weight: 400;
  --md-sys-typescale-title-large-line:   28px;

  --md-sys-typescale-title-medium-font:   'Roboto', sans-serif;
  --md-sys-typescale-title-medium-size:   16px;
  --md-sys-typescale-title-medium-weight: 500;
  --md-sys-typescale-title-medium-line:   24px;

  --md-sys-typescale-body-large-font:   'Roboto', sans-serif;
  --md-sys-typescale-body-large-size:   16px;
  --md-sys-typescale-body-large-weight: 400;
  --md-sys-typescale-body-large-line:   24px;

  --md-sys-typescale-body-medium-font:   'Roboto', sans-serif;
  --md-sys-typescale-body-medium-size:   14px;
  --md-sys-typescale-body-medium-weight: 400;
  --md-sys-typescale-body-medium-line:   20px;

  --md-sys-typescale-label-large-font:   'Roboto', sans-serif;
  --md-sys-typescale-label-large-size:   14px;
  --md-sys-typescale-label-large-weight: 500;
  --md-sys-typescale-label-large-line:   20px;

  --md-sys-typescale-label-medium-font:   'Roboto', sans-serif;
  --md-sys-typescale-label-medium-size:   12px;
  --md-sys-typescale-label-medium-weight: 500;
  --md-sys-typescale-label-medium-line:   16px;

  --md-sys-typescale-label-small-font:   'Roboto', sans-serif;
  --md-sys-typescale-label-small-size:   11px;
  --md-sys-typescale-label-small-weight: 500;
  --md-sys-typescale-label-small-line:   16px;

  /* ── Spacing scale ──────────────────────────────────────────────────────── */
  --pv-space-xs:  4px;
  --pv-space-sm:  8px;
  --pv-space-md:  16px;
  --pv-space-lg:  24px;
  --pv-space-xl:  32px;
  --pv-space-2xl: 48px;

  /* Wire up @material/web tokens to our palette */
  --md-primary-tab-active-indicator-color: var(--md-sys-color-primary);
  --md-filled-button-container-color:      var(--md-sys-color-primary);
  --md-filled-button-label-text-color:     var(--md-sys-color-on-primary);
  --md-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary:            #a0d49a;
    --md-sys-color-on-primary:         #083909;
    --md-sys-color-primary-container:  #225221;
    --md-sys-color-on-primary-container: #bbf0b5;

    --md-sys-color-secondary:          #b9ccb4;
    --md-sys-color-on-secondary:       #253425;
    --md-sys-color-secondary-container:#3b4b3a;
    --md-sys-color-on-secondary-container: #d5e8cf;

    --md-sys-color-background:         #1a1c19;
    --md-sys-color-on-background:      #e3e6de;

    --md-sys-color-surface:            #1a1c19;
    --md-sys-color-on-surface:         #e3e6de;
    --md-sys-color-surface-variant:    #414941;
    --md-sys-color-on-surface-variant: #c1c9bd;

    --md-sys-color-surface-container-lowest:  #141710;
    --md-sys-color-surface-container-low:     #1a1c19;
    --md-sys-color-surface-container:         #1e211d;
    --md-sys-color-surface-container-high:    #282b26;
    --md-sys-color-surface-container-highest: #333530;

    --md-sys-color-outline:            #8b9389;
    --md-sys-color-outline-variant:    #414941;

    --md-sys-color-inverse-surface:    #e3e6de;
    --md-sys-color-inverse-on-surface: #2f312d;
    --md-sys-color-inverse-primary:    #3a6b39;
  }
}

/* ── Typography utility classes ─────────────────────────────────────────────── */
.md-typescale-display-large  { font-family: var(--md-sys-typescale-display-large-font);   font-size: var(--md-sys-typescale-display-large-size);   font-weight: var(--md-sys-typescale-display-large-weight);   line-height: var(--md-sys-typescale-display-large-line); }
.md-typescale-headline-large { font-family: var(--md-sys-typescale-headline-large-font);  font-size: var(--md-sys-typescale-headline-large-size);  font-weight: var(--md-sys-typescale-headline-large-weight); line-height: var(--md-sys-typescale-headline-large-line); }
.md-typescale-headline-medium{ font-family: var(--md-sys-typescale-headline-medium-font); font-size: var(--md-sys-typescale-headline-medium-size); font-weight: var(--md-sys-typescale-headline-medium-weight);line-height: var(--md-sys-typescale-headline-medium-line);}
.md-typescale-title-large    { font-family: var(--md-sys-typescale-title-large-font);     font-size: var(--md-sys-typescale-title-large-size);     font-weight: var(--md-sys-typescale-title-large-weight);    line-height: var(--md-sys-typescale-title-large-line); }
.md-typescale-title-medium   { font-family: var(--md-sys-typescale-title-medium-font);    font-size: var(--md-sys-typescale-title-medium-size);    font-weight: var(--md-sys-typescale-title-medium-weight);   line-height: var(--md-sys-typescale-title-medium-line);}
.md-typescale-body-large     { font-family: var(--md-sys-typescale-body-large-font);      font-size: var(--md-sys-typescale-body-large-size);      font-weight: var(--md-sys-typescale-body-large-weight);     line-height: var(--md-sys-typescale-body-large-line);  }
.md-typescale-body-medium    { font-family: var(--md-sys-typescale-body-medium-font);     font-size: var(--md-sys-typescale-body-medium-size);     font-weight: var(--md-sys-typescale-body-medium-weight);    line-height: var(--md-sys-typescale-body-medium-line); }
.md-typescale-label-large    { font-family: var(--md-sys-typescale-label-large-font);     font-size: var(--md-sys-typescale-label-large-size);     font-weight: var(--md-sys-typescale-label-large-weight);    line-height: var(--md-sys-typescale-label-large-line); }
.md-typescale-label-medium   { font-family: var(--md-sys-typescale-label-medium-font);    font-size: var(--md-sys-typescale-label-medium-size);    font-weight: var(--md-sys-typescale-label-medium-weight);   line-height: var(--md-sys-typescale-label-medium-line);}
.md-typescale-label-small    { font-family: var(--md-sys-typescale-label-small-font);     font-size: var(--md-sys-typescale-label-small-size);     font-weight: var(--md-sys-typescale-label-small-weight);    line-height: var(--md-sys-typescale-label-small-line); }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
