/* ============================================================
   Server-rendered-page-only styles (Browse All, Cregeen's
   Dictionary). The design tokens and the shared chrome (header,
   footer, page column, shared pieces) live in site-chrome.css,
   which the React app also loads — edit chrome THERE so the two
   front ends stay identical (#313).
   ============================================================ */

.page-byline {
    font-size: 13.5px;
    color: var(--c-muted);
    margin-top: 6px;
}

.corpus-search-input {
    border: 1.5px solid var(--c-border-input);
    background: var(--c-surface);
    border-radius: 14px;
    padding: 10px 22px;
    font-size: 18px;
    color: var(--c-ink);
    outline: none;
    box-shadow: var(--shadow-card);
}

.corpus-search-input:focus {
    border-color: var(--c-heading);
    box-shadow: var(--focus-ring);
}

/* the native clear button sits inside the generous padding - pull it back toward the edge */
.corpus-search-input::-webkit-search-cancel-button {
    margin-right: -12px;
}

/* ============ Browse All ============ */
.browse-controls {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.browse-count {
    font-size: 13.5px;
    color: var(--c-muted);
}

.browse-order {
    display: flex;
    align-items: center;
    gap: 10px;
}

.browse-order-label {
    font-size: 12px;
    color: var(--c-muted);
}

.browse-list {
    display: flex;
    flex-direction: column;
    margin-top: 22px;
}

.browse-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 12px 2px;
    border-bottom: 1px solid var(--c-border-row);
    flex-wrap: wrap;
}

/* fixed-width slot so titles line up regardless of the year label's length */
.browse-year {
    width: 80px;
    flex-shrink: 0;
}

/* title with the source beneath it, both aligned after the year slot */
.browse-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.browse-row a {
    font-family: var(--font-display);
    font-size: 17px;
    text-decoration: none;
    color: var(--c-ink);
}

.browse-row a:hover {
    color: var(--c-link);
}

.browse-source {
    font-size: 13px;
    color: var(--c-muted-2);
    text-align: right;
}

/* ============ Cregeen's Dictionary ============ */
.dict-search {
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
}

.dict-letters {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.dict-letters a {
    font-family: var(--font-display);
    font-size: 19px;
    text-decoration: none;
    padding: 2px 7px;
    color: var(--c-link);
    border-bottom: 2px solid transparent;
}

.dict-letters a.active {
    color: var(--c-accent);
    border-bottom-color: var(--c-accent);
}

.dict-section-label {
    margin-top: 26px;
    margin-bottom: 0;
}

.dict-entry {
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border-row);
    font-size: 15.5px;
    line-height: 1.6;
}

.dict-entry-word,
.dict-entry-word b {
    font-family: var(--font-display);
    font-weight: bold;
    color: var(--c-heading);
}

.dict-entry-def {
    color: var(--c-secondary);
}

/* the source HTML wraps text in `color:windowtext` spans - neutralise them */
.dict-entry [style*="windowtext"] {
    color: inherit !important;
}

.dict-no-results {
    text-align: center;
    margin-top: 40px;
    color: var(--c-secondary);
    font-family: var(--font-display);
    font-size: 17px;
}
