/* BabelFish — prototype stylesheet.
   No framework, no JS: the old pages were 66 KB of which 3.9% was content.
   Whole file is a few KB and is the only render-blocking request. */

:root {
    --ink: #14181f;
    --ink-soft: #55606f;
    --ink-faint: #8b95a3;
    --line: #e3e7ee;
    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --accent: #713395;        /* sampled from the original logo */
    --accent-dark: #5b2878;
    --accent-soft: #f3edf7;
    --accent-line: #d9c7e4;
    --radius: 10px;
    --wrap: 1080px;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}

/* Light theme only — dark mode removed at review. */


* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 0 0 .35rem; }

.sr, .skip {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
    position: static; width: auto; height: auto; clip: auto;
    padding: .6rem 1rem; background: var(--accent); color: #fff;
}

/* ---------------------------------------------------------------- header */
.site-head {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky; top: 0; z-index: 10;
}
.head-inner {
    display: flex; align-items: center; gap: 1.5rem;
    min-height: 58px; flex-wrap: wrap;
}
.brand { color: var(--ink); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark span { color: var(--accent); }

.nav { display: flex; gap: .15rem; flex-wrap: wrap; margin-left: auto; }
.nav a {
    padding: .3rem .55rem; border-radius: 6px;
    font-size: .88rem; color: var(--ink-soft);
}
.nav a:hover { background: var(--bg-soft); color: var(--accent); text-decoration: none; }
.nav-more { color: var(--accent) !important; }

/* ------------------------------------------------------------------ hero */
.hero {
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    border-bottom: 1px solid var(--line);
    padding: 2.75rem 0 2.25rem;
}
.hero h1 { margin-bottom: .35rem; }
.hero-sub { color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 58ch; }
.hero-lang { padding-bottom: 1.75rem; }

/* -------------------------------------------------- translation widget */
.tx {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    max-width: 700px;
    box-shadow: 0 1px 2px rgba(20, 24, 31, .04);
}
.tx-langs { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.tx select {
    flex: 1 1 0; min-width: 0;
    font: inherit; font-size: .92rem;
    padding: .45rem .5rem;
    border: 1px solid var(--line); border-radius: 7px;
    background: var(--bg); color: var(--ink);
}
.tx-arrow { color: var(--ink-faint); }
.tx textarea {
    width: 100%; font: inherit; resize: vertical;
    padding: .7rem .8rem;
    border: 1px solid var(--line); border-radius: 7px;
    background: var(--bg); color: var(--ink);
}
.tx textarea:focus, .tx select:focus {
    outline: 2px solid var(--accent); outline-offset: -1px;
}
.tx-actions {
    display: flex; align-items: center; gap: .9rem;
    margin-top: .7rem; flex-wrap: wrap;
}
.tx button {
    font: inherit; font-weight: 600;
    padding: .55rem 1.3rem;
    border: 0; border-radius: 7px;
    background: var(--accent); color: #fff; cursor: pointer;
}
.tx button:hover { background: var(--accent-dark); }
.tx-note { font-size: .82rem; color: var(--ink-faint); }

/* ------------------------------------------------------------------ band */
.band { padding: 2.25rem 0; border-bottom: 1px solid var(--line); }
.band-sub { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: .93rem; }
.more { margin-top: 1.1rem; font-size: .93rem; }

/* ----------------------------------------------------------- lang grid */
.lang-grid {
    display: grid; gap: .6rem;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    margin-top: 1rem;
}
.lang-card {
    display: flex; flex-direction: column;
    padding: .8rem .9rem;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg);
}
.lang-card:hover {
    border-color: var(--accent); background: var(--accent-soft);
    text-decoration: none;
}
.lang-name { font-weight: 600; color: var(--ink); }
.lang-sub { font-size: .78rem; color: var(--ink-faint); }

/* --------------------------------------------------------- phrase list */
.phrase-list { list-style: none; margin: 0; padding: 0; }
.phrase-list li { border-bottom: 1px solid var(--line); }
.phrase-list li:first-child { border-top: 1px solid var(--line); }
.phrase-list a {
    display: flex; align-items: baseline; gap: 1rem;
    padding: .7rem .2rem;
}
.phrase-list a:hover { background: var(--bg-soft); text-decoration: none; }
.pl-title { flex: 1 1 auto; color: var(--ink); }
.phrase-list a:hover .pl-title { color: var(--accent); }
.pl-meta { flex: 0 0 auto; font-size: .8rem; color: var(--ink-faint); }

/* ------------------------------------------------------------------ doc */
.doc { padding: 2rem 0 1rem; max-width: 760px; }
.doc-body { color: var(--ink-soft); }
.doc-body p { margin: 0 0 1rem; }

.in-lang { color: var(--ink-faint); font-weight: 400; }

.answers { margin: 1.75rem 0; }
.answer-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.answer {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: .85rem 1rem;
    margin-bottom: .6rem;
    background: var(--bg);
}
.answer-body { font-size: 1.05rem; }
.answer-body p { margin: 0 0 .4rem; }
.answer-by {
    margin: .5rem 0 0; font-size: .8rem; color: var(--ink-faint);
    display: flex; gap: .6rem;
}
.answer-by .by { font-weight: 600; color: var(--ink-soft); }

.usage {
    margin: 1.5rem 0; padding: 1rem 1.1rem;
    background: var(--bg-soft); border-radius: var(--radius);
    font-size: .95rem;
}
.usage h3 { margin: 0 0 .6rem; font-size: 1rem; }
.usage ul { margin: 0 0 .8rem; padding-left: 1.1rem; }
.usage .s_before { color: var(--ink-soft); }
.usage .s_after { color: var(--ink); }
.usage .p_before, .usage .p_after { font-weight: 600; }
.usage .t_small { font-size: .78rem; color: var(--ink-faint); }

.tags { margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
    font-size: .8rem; padding: .2rem .55rem;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 20px; color: var(--ink-soft);
}
.tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ------------------------------------------------------------ tag cloud */
.tag-cloud {
    list-style: none; margin: 1rem 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: .4rem;
}
.tag-cloud a {
    display: inline-flex; align-items: baseline; gap: .35rem;
    font-size: .88rem; padding: .3rem .65rem;
    border: 1px solid var(--line); border-radius: 20px;
    color: var(--ink-soft);
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tc-n { font-size: .74rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------- footer */
.site-foot {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding: 2rem 0 2.5rem;
    margin-top: 1rem;
    font-size: .9rem;
}
.foot-langs h2 { font-size: .95rem; margin-bottom: .6rem; }
.foot-langs ul {
    list-style: none; margin: 0 0 1.5rem; padding: 0;
    display: grid; gap: .3rem .9rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.foot-meta { border-top: 1px solid var(--line); padding-top: 1rem; }
.foot-nav { display: flex; gap: 1rem; margin-bottom: .5rem; }
.fine { color: var(--ink-faint); margin: 0; font-size: .84rem; }

@media (max-width: 640px) {
    body { font-size: 16px; }
    .nav { width: 100%; margin-left: 0; }
    .tx-langs { flex-wrap: wrap; }
    .phrase-list a { flex-direction: column; gap: .15rem; }
}

/* --------------------------------------------------------------- pager */
.pager {
    display: flex; align-items: center; gap: 1rem;
    margin-top: 1.25rem; font-size: .9rem;
}
.pager-pos { color: var(--ink-faint); }

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }

/* ------------------------------------------------------------ authority */
/* Trust strip. The site's strongest asset is that people search for it by
   name — 69,883 brand clicks at 12.2% CTR — so longevity is worth stating. */
.authority {
    background: var(--accent-soft);
    border-bottom: 1px solid var(--accent-line);
}
.authority-inner {
    display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
    padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.auth-item { display: flex; flex-direction: column; }
.auth-num {
    font-size: 1.35rem; font-weight: 700;
    color: var(--accent-dark); letter-spacing: -0.02em; line-height: 1.15;
}
.auth-lbl { font-size: .84rem; color: var(--ink-soft); }

@media (max-width: 640px) {
    .authority-inner { gap: .9rem 2rem; }
    .auth-num { font-size: 1.15rem; }
}

/* ------------------------------------------------------- explainer page */
.lede { font-size: 1.08rem; color: var(--ink); }
.notice {
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: .85rem 1rem;
    margin: 1.25rem 0 1.75rem;
    font-size: .93rem;
}
.notice strong { color: var(--accent-dark); }
.doc h2 { margin-top: 1.75rem; }

/* ---------------------------------------------------------------- votes */
/* Historical only — voting is closed. Kept visually quiet so they read as a
   record rather than a live control. */
.votes { margin-left: auto; display: inline-flex; gap: .55rem; white-space: nowrap; }
.v-up { color: #3d7a3d; }
.v-down { color: #a35050; }

/* ------------------------------------------------------------ no answer */
.no-answer {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    color: var(--ink-soft);
    font-size: .95rem;
    background: var(--bg-soft);
}

/* ------------------------------------------------------- translate result */
.tx-result {
    margin-top: .8rem;
    padding: .8rem 1rem;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    border-radius: var(--radius);
    font-size: 1.1rem;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}
.tx-error {
    border-color: #e0c2c2;
    background: #fdf4f4;
    color: #8a3d3d;
    font-size: .95rem;
}
