/* ═══════════════════════════════════════════════════════════
   PuniCodex TYPE — Scholarly Transliteration Interface
   ═══════════════════════════════════════════════════════════ */

/* ── Page Layout ────────────────────────────────────────── */
.type-page {
    background: var(--void);
    min-height: 100vh;
    padding-top: 80px;
}

/* ── Hero ──────────────────────────────────────────────── */
.type-hero {
    padding: 60px 0 40px;
    text-align: center;
}

/* Brand integration §4.13 — two-column hero: Monolith & Cursor left, copy right. */
.type-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.type-monolith {
    width: min(330px, 70vw);
}

@media (min-width: 900px) {
    .type-hero-grid {
        grid-template-columns: auto 1fr;
        gap: 3rem;
        text-align: left;
    }
    .type-hero-copy .type-subtitle {
        margin-left: 0;
    }
    .type-hero-copy .type-masthead {
        align-items: flex-start;
    }
}

/* Camel wordmark masthead (brand §4.1). */
.type-masthead {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-wordmark-img {
    width: min(320px, 70vw);
    height: auto;
}

.type-hero .section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.type-hero .display-lg {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ivory);
    margin-bottom: 24px;
}

.type-hero .type-accent {
    color: var(--gold);
}

.type-subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: var(--stone);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ── Workspace ─────────────────────────────────────────── */
.type-workspace {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Filter ────────────────────────────────────────────── */
.type-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.type-filter label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
}

.type-filter select {
    background: var(--surface);
    border: 1px solid var(--gold-dim);
    color: var(--ivory);
    font-family: var(--font-body);
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.type-filter select:focus {
    border-color: var(--gold);
}

.type-filter select option {
    background: var(--void);
    color: var(--ivory);
}

/* ── Input Area ────────────────────────────────────────── */
.type-input-area {
    position: relative;
    margin-bottom: 16px;
}

.type-input {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--gold-dim);
    border-radius: 16px;
    padding: 24px 28px;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--ivory);
    letter-spacing: 0.02em;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    caret-color: var(--gold);
}

.type-input::placeholder {
    color: var(--stone-dim);
    font-weight: 400;
    font-style: italic;
}

.type-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.type-input.success-flash {
    animation: successFlash 0.4s ease;
}

@keyframes successFlash {
    0% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.0); }
    50% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0.3); border-color: var(--gold); }
    100% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.0); }
}

.type-input.reject-flash {
    animation: rejectFlash 0.25s ease;
}

@keyframes rejectFlash {
    0% { border-color: var(--ember); box-shadow: 0 0 0 4px rgba(192, 108, 84, 0.3); }
    100% { border-color: var(--gold-dim); box-shadow: none; }
}

/* Preview overlay */
.type-preview {
    position: absolute;
    top: 50%;
    left: 28px;
    transform: translateY(-50%);
    pointer-events: none;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.4;
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 56px);
}

/* Hide underlying input text when exact-match preview is shown */
.type-input.preview-active {
    color: transparent;
}

.type-preview .preview-typed {
    color: transparent;
}

.type-preview .preview-hint {
    color: var(--stone);
}

.type-preview .preview-error {
    color: var(--ember);
}

.type-preview.preview-locked {
    opacity: 1;
}

.type-preview.preview-locked .preview-convert {
    color: var(--gold);
    animation: previewGlow 0.6s ease;
}

@keyframes previewGlow {
    0% { text-shadow: none; }
    50% { text-shadow: 0 0 20px var(--gold), 0 0 40px rgba(212, 175, 55, 0.3); }
    100% { text-shadow: none; }
}

.type-preview.preview-invalid {
    opacity: 0.6;
}

/* ── Suggestions ───────────────────────────────────────── */
.type-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 32px;
}

.suggestion-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone-dim);
    margin-right: 4px;
}

.suggestion-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gold);
    cursor: default;
    transition: all 0.2s;
}

.suggestion-char:hover {
    background: var(--gold);
    color: var(--void);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ── Status ────────────────────────────────────────────── */
.type-status {
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.status-hint { color: var(--stone-dim); }
.status-pending { color: var(--amber); }
.status-ok { color: #5C9E68; }
.status-error { color: var(--ember); }

/* ── Completions ───────────────────────────────────────── */
.type-completions {
    margin-bottom: 20px;
}

.completion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.completion-item:hover {
    border-color: var(--gold-dim);
    background: rgba(212, 175, 55, 0.05);
    transform: translateX(4px);
}

.completion-pantheon {
    font-size: 1rem;
    flex-shrink: 0;
}

.completion-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ivory);
    flex: 1;
}

.completion-typed {
    color: var(--ivory);
}

.completion-remaining {
    color: var(--stone);
}

.completion-unicode {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold);
    flex-shrink: 0;
}

/* ── Breakdown ─────────────────────────────────────────── */
.type-breakdown {
    margin-bottom: 24px;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gold-dim);
}

.breakdown-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ivory);
}

.breakdown-tier {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid;
}

.tier-dual { color: var(--gold); border-color: var(--gold); }
.tier-1 { color: #5C9E68; border-color: #5C9E68; }
.tier-2 { color: var(--amber); border-color: var(--amber); }

.breakdown-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.breakdown-index {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-dim);
    border-radius: 50%;
    font-size: 0.65rem;
    color: var(--void);
    flex-shrink: 0;
}

.breakdown-from {
    color: var(--stone);
    min-width: 20px;
    text-align: center;
}

.breakdown-arrow {
    color: var(--stone-dim);
}

.breakdown-to {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
}

.type-stress { color: var(--ember); }
.type-length { color: #6B9BD0; }
.type-dual { color: var(--gold); }
.type-special { color: #B084EB; }
.type-drop { color: var(--stone-dim); text-decoration: line-through; }
.type-merge { color: var(--amber); }
.type-same { color: var(--stone); }

.breakdown-type {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.breakdown-type.type-stress { background: rgba(192, 108, 84, 0.15); }
.breakdown-type.type-length { background: rgba(107, 155, 208, 0.15); }
.breakdown-type.type-dual { background: rgba(212, 175, 55, 0.15); }
.breakdown-type.type-special { background: rgba(176, 132, 235, 0.15); }
.breakdown-type.type-drop { background: rgba(120, 120, 120, 0.15); }

.breakdown-note {
    color: var(--stone-dim);
    font-size: 0.75rem;
    margin-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.breakdown-stack {
    margin-left: auto;
    font-size: 0.8em;
    opacity: 0.7;
}

/* ── Result ────────────────────────────────────────────── */
.type-result {
    transition: opacity 0.4s, transform 0.4s;
}

.type-result.hidden {
    display: none;
}

.type-result.reveal {
    animation: resultReveal 0.5s ease;
}

@keyframes resultReveal {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--gold-dim);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone-dim);
}

.result-tier {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid;
}

.result-unicode {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
    word-break: break-all;
}

.result-greek {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--stone);
    margin-bottom: 8px;
    font-style: italic;
}

.result-variations {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--white-faint);
    border-radius: 8px;
}

.result-variations.hidden {
    display: none;
}

.result-variations-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-variations-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--stone-dim);
}

.result-variations-hint {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--stone-dim);
    margin: 0;
    line-height: 1.4;
}

.variations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    justify-content: center;
}

.variation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.variation-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--white-faint);
    color: var(--white-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variation-chip:hover,
.variation-chip:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-dim);
    color: var(--ivory);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.variation-chip:active {
    transform: translateY(1px);
}

.variation-chip .variation-type {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    opacity: 0.8;
}

.variation-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 100%;
}

.variation-source {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--stone-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--white-faint);
    border-radius: 3px;
    padding: 2px 5px;
    line-height: 1;
}

.variation-owned { border-color: var(--gold); color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.variation-owned:hover, .variation-owned:focus { background: rgba(212, 175, 55, 0.18); }

.variation-ideal { border-color: var(--secondary); color: var(--secondary); background: rgba(65, 105, 225, 0.08); }
.variation-ideal:hover, .variation-ideal:focus { background: rgba(65, 105, 225, 0.18); }

.variation-alt-stress { border-color: var(--ember); color: var(--ember); background: rgba(192, 108, 84, 0.08); }
.variation-alt-stress:hover, .variation-alt-stress:focus { background: rgba(192, 108, 84, 0.18); }

.variation-alt { border-color: #a080c0; color: #a080c0; background: rgba(160, 128, 192, 0.08); }
.variation-alt:hover, .variation-alt:focus { background: rgba(160, 128, 192, 0.18); }

.variation-macron-only { border-color: var(--stone); color: var(--stone); background: rgba(150, 150, 150, 0.08); }
.variation-macron-only:hover, .variation-macron-only:focus { background: rgba(150, 150, 150, 0.18); }

.variation-ascii { border-color: var(--white-faint); color: var(--white-dim); font-style: italic; }
.variation-ascii:hover, .variation-ascii:focus { background: rgba(255, 255, 255, 0.12); }

.variation-decomposed { border-color: var(--primary); color: var(--primary); background: rgba(212, 175, 55, 0.08); font-size: 0.8rem; }
.variation-decomposed:hover, .variation-decomposed:focus { background: rgba(212, 175, 55, 0.18); }

.result-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gold-dim);
}

.result-key {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone-dim);
}

.result-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ivory);
    text-align: right;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.result-actions .btn {
    min-width: 140px;
}

.result-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.source-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-dim);
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    padding: 3px 8px;
    line-height: 1;
}

.result-lore {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--white-faint);
    border-radius: 8px;
}

.result-lore.hidden {
    display: none;
}

.result-lore-header {
    font-family: var(--font-display);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--stone-dim);
    margin-bottom: 12px;
}

.result-lore-section {
    margin-bottom: 12px;
}

.result-lore-section:last-child {
    margin-bottom: 0;
}

.result-lore-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 4px;
}

.result-lore-section p {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--ivory);
    margin: 0;
}

.result-lore-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--gold);
    text-decoration: none;
}

.result-lore-link:hover {
    text-decoration: underline;
}

/* ── Explain Section ───────────────────────────────────── */
.type-explain {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.03) 50%, transparent 100%);
}

.explain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .explain-grid { grid-template-columns: 1fr; gap: 24px; }
}

.explain-card {
    background: var(--surface);
    border: 1px solid var(--gold-dim);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
}

.explain-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.explain-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1;
}

.explain-card .heading-md {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ivory);
    margin-bottom: 12px;
}

.explain-card .body-md {
    color: var(--stone);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── Stats ─────────────────────────────────────────────── */
.type-stats {
    padding: 40px 0 80px;
}

.type-stats .stats-bar-inline {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.type-stats .stat-inline {
    text-align: center;
}

.type-stats .stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.type-stats .stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--stone-dim);
    margin-top: 6px;
}

/* ── Keyboard Navigation ───────────────────────────────── */
.completion-item.active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    transform: translateX(6px);
    outline: none;
}

.completion-item.active .completion-unicode {
    color: var(--gold);
    font-weight: 600;
}

/* ── Screen Reader Only ────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── prefers-reduced-motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .type-input,
    .type-preview,
    .suggestion-char,
    .completion-item,
    .explain-card,
    .type-result,
    .result-card {
        transition: none !important;
        animation: none !important;
    }
    .type-input:focus {
        box-shadow: none;
    }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    .type-input {
        padding: 18px 20px;
        font-size: 16px; /* prevent iOS zoom on focus */
    }
    .type-preview {
        font-size: 16px;
    }
    .result-card {
        padding: 24px 20px;
    }
    .result-actions {
        flex-direction: column;
    }
    .result-actions .btn {
        width: 100%;
        min-height: 48px; /* larger touch target */
    }
    .breakdown-note {
        display: none;
    }
    .completion-item {
        padding: 12px 10px; /* larger touch target */
        min-height: 44px;
    }
    .completion-unicode {
        display: none;
    }
    .suggestion-char {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
/* ═══════════════════════════════════════════════════════════
   Stacked Diacritics — Visual Unicode Decomposition
   Injected into temple-base.css and type.css; kept here as
   canonical reference.
   ═══════════════════════════════════════════════════════════ */

.stacked-diacritics {
    display: inline-flex;
    align-items: baseline;
    gap: 0.05em;
    vertical-align: bottom;
    font-family: var(--font-mono, 'SF Mono', Monaco, 'Cascadia Code', monospace);
}

.sd-char {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    vertical-align: bottom;
    min-width: 1ch;
}

.sd-marks {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-size: 0.5em;
    line-height: 0.7;
    height: 0.6em;
    margin-bottom: 0.08em;
    white-space: nowrap;
    opacity: 0.8;
}

.sd-mark {
    display: inline-block;
}

.sd-base {
    font-size: 1em;
    line-height: 1;
}

.sd-plain {
    font-size: 1em;
}


/* ═══════════════════════════════════════════════════════════
   Variant Pills — Scholarly Name Variations (Type Tool)
   ═══════════════════════════════════════════════════════════ */

.variants-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white-dim);
    margin-bottom: 0.5rem;
}

.variants-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border: 1px solid var(--white-faint);
    background: rgba(255, 255, 255, 0.03);
    color: var(--white);
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
}

.variant-pill:hover {
    border-color: var(--primary-dim);
    background: rgba(255, 255, 255, 0.05);
}

.variant-pill-owned {
    border-color: var(--secondary);
    background: rgba(var(--secondary-rgb, 196, 161, 109), 0.08);
}

.variant-pill-owned::after {
    content: 'OWNED';
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    margin-left: 0.4rem;
    padding: 0.08rem 0.3rem;
    border-radius: 4px;
    background: var(--secondary);
    color: var(--black);
    font-weight: 700;
}

.variant-pill-ideal {
    border-color: var(--primary);
    border-style: dashed;
}

.variant-pill-alt-stress {
    border-color: var(--accent);
}

.variant-pill-macron-only {
    border-color: var(--white-dim);
}

.variant-pill-ascii {
    border-color: var(--white-faint);
    border-style: dotted;
    color: var(--white-dim);
}


/* ═══════════════════════════════════════════════════════════
   Type Tool — Etymology Preview
   ═══════════════════════════════════════════════════════════ */

.etymology-form {
    font-family: var(--font-mono);
    font-style: italic;
    color: var(--secondary);
}

.etymology-form::first-letter {
    color: var(--primary);
}

.etymology-lang {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white-dim);
    margin-left: 0.4rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--white-faint);
}
