/* Lexical-side verb catalog and detail layouts. */
.rh-search-field__input,
.rh-reference-page .rh-search-field__input {
    font-size: max(1rem, 16px);
}

.rh-verb-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--rh-space-2);
    align-items: stretch;
    padding: var(--rh-space-2);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-card);
    background: var(--rh-surface);
    box-shadow: var(--rh-shadow-1);
}

.rh-verb-side {
    display: grid;
    gap: var(--rh-space-2);
    min-width: 0;
    padding: var(--rh-space-3);
    border: 1px solid transparent;
    border-radius: var(--rh-radius-control);
    color: var(--rh-text);
    text-decoration: none;
}

.rh-verb-side:hover,
.rh-verb-side:focus-visible {
    border-color: var(--rh-action);
    background: var(--rh-action-soft);
}

.rh-verb-side--perfective:hover,
.rh-verb-side--perfective:focus-visible {
    border-color: var(--rh-danger);
    background: var(--rh-danger-soft);
}

.rh-verb-side__heading {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rh-space-2);
    align-items: baseline;
    min-width: 0;
}

.rh-verb-side__heading strong {
    min-width: 0;
    color: var(--rh-text);
    font-family: var(--rh-font-display);
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.rh-verb-side__heading span {
    color: var(--rh-text-muted);
    font-size: 0.76rem;
    font-weight: 760;
}

.rh-verb-side__meaning {
    color: var(--rh-text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.rh-verb-side__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rh-space-2);
    margin-top: auto;
}

.rh-verb-list-item__pair-label {
    align-self: center;
    color: var(--rh-text-muted);
    font-size: 0.7rem;
    font-weight: 760;
    writing-mode: vertical-rl;
}

.rh-aspect-partner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.15rem var(--rh-space-3);
    align-items: center;
    max-width: 34rem;
    padding: var(--rh-space-3) var(--rh-space-4);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-control);
    background: var(--rh-surface-subtle);
    color: var(--rh-text);
}

.rh-aspect-partner > span {
    grid-row: 1 / span 2;
    color: var(--rh-text-muted);
    font-size: 0.75rem;
    font-weight: 760;
}

.rh-aspect-partner strong {
    font-family: var(--rh-font-display);
    font-size: 1.25rem;
}

.rh-aspect-partner small {
    min-width: 0;
    color: var(--rh-text-muted);
    overflow-wrap: break-word;
}

.rh-lexical-form-table {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-control);
    background: var(--rh-surface);
}

.rh-lexical-form-table__row {
    display: grid;
    grid-template-columns: minmax(7rem, 0.75fr) minmax(8rem, 1fr);
    border-top: 1px solid var(--rh-border);
}

.rh-lexical-form-table__row:first-child {
    border-top: 0;
}

.rh-lexical-form-table__row > * {
    min-width: 0;
    padding: 0.75rem 0.9rem;
    overflow-wrap: break-word;
}

.rh-lexical-form-table__row > :last-child {
    border-left: 1px solid var(--rh-border);
    font-size: 1.04rem;
    font-weight: 760;
}

.rh-lexical-form-table__row--head {
    background: var(--rh-surface-subtle);
    color: var(--rh-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.rh-reference-subsection {
    display: grid;
    gap: var(--rh-space-3);
    max-width: 34rem;
    padding-top: var(--rh-space-3);
}

.rh-reference-subsection--wide {
    max-width: 46rem;
}

.rh-verb-tense-note {
    display: grid;
    gap: var(--rh-space-1);
    max-width: 46rem;
    margin-top: var(--rh-space-4);
    padding: var(--rh-space-3) var(--rh-space-4);
    border: 1px solid var(--rh-border);
    border-left: 4px solid var(--rh-action);
    border-radius: var(--rh-radius-control);
    background: var(--rh-action-soft);
    color: var(--rh-text);
}

.rh-verb-tense-note p {
    margin: 0;
    color: var(--rh-text-muted);
}

.rh-reflexive-morphology {
    display: grid;
    gap: var(--rh-space-2);
    max-width: 46rem;
    padding: var(--rh-space-4);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-card);
    background: var(--rh-surface-subtle);
}

.rh-reflexive-morphology > span {
    color: var(--rh-text-muted);
    font-size: 0.76rem;
    font-weight: 780;
}

.rh-reflexive-morphology > strong {
    color: var(--rh-text);
    font-family: var(--rh-font-display);
    font-size: clamp(1.2rem, 4vw, 1.55rem);
}

.rh-reflexive-morphology p {
    margin: 0;
    color: var(--rh-text-muted);
}

.rh-related-verb-family {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--rh-space-3);
    max-width: 56rem;
    margin-top: var(--rh-space-4);
}

.rh-related-verb-family > h3 {
    grid-column: 1 / -1;
    margin: 0;
}

.rh-related-verb-family > div,
.rh-related-verb-card {
    display: grid;
    gap: var(--rh-space-1);
    min-width: 0;
    padding: var(--rh-space-3) var(--rh-space-4);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-control);
    background: var(--rh-surface-subtle);
    color: var(--rh-text);
    text-decoration: none;
}

.rh-related-verb-card:hover,
.rh-related-verb-card:focus-visible {
    border-color: var(--rh-action);
    background: var(--rh-action-soft);
}

.rh-related-verb-family span {
    color: var(--rh-text-muted);
    font-size: 0.74rem;
    font-weight: 780;
}

.rh-related-verb-family strong {
    font-family: var(--rh-font-display);
    font-size: 1.22rem;
}

.rh-related-verb-family small,
.rh-related-verb-family p {
    margin: 0;
    color: var(--rh-text-muted);
    overflow-wrap: anywhere;
}

.rh-reference-subsection h3 {
    margin: 0;
}

.rh-compact-form-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--rh-space-2);
    margin: 0;
}

.rh-compact-form-list > div {
    display: grid;
    gap: 0.2rem;
    padding: var(--rh-space-3);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-control);
    background: var(--rh-surface-subtle);
}

.rh-compact-form-list dt {
    color: var(--rh-text-muted);
    font-size: 0.76rem;
}

.rh-compact-form-list dd {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 780;
}

.rh-past-grid--single {
    grid-template-columns: minmax(0, 32rem);
}

@media (max-width: 44rem) {
    .rh-verb-list-item {
        grid-template-columns: 1fr;
    }

    .rh-verb-list-item__pair-label {
        justify-self: center;
        writing-mode: horizontal-tb;
    }

    .rh-aspect-partner {
        grid-template-columns: 1fr;
    }

    .rh-aspect-partner > span {
        grid-row: auto;
    }

    .rh-compact-form-list {
        grid-template-columns: 1fr;
    }

    .rh-related-verb-family {
        grid-template-columns: 1fr;
    }
}
