/* ═══════════════════════════════════════════════════════════════════════
   URL Analyzer — Page-Specific Styles
   Uses home.css for nav/footer. This file handles analyzer elements.
   ═══════════════════════════════════════════════════════════════════════ */

/* Variables not in home.css */
:root { --blue-600: #2563eb; --blue-500: #3b82f6; --cyan-500: #06b6d4; }

/* Body layout override for this standalone page */
body { min-height: 100vh; display: flex; flex-direction: column; }

/* Global button overrides for this page */
.ua-btn-ghost { padding: .5rem 1.1rem; border-radius: 8px; color: var(--slate-300); text-decoration: none; font-size: .85rem; font-weight: 500; transition: all .2s; }
.ua-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.05); }
.ua-btn-solid { padding: .55rem 1.2rem; border-radius: 8px; background: linear-gradient(135deg, var(--blue-600), var(--blue-500)); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; transition: all .2s; }
.ua-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(46,134,222,.3); }

/* ── Main ── */
.ua-main { flex: 1; padding-top: 80px; }

/* ── Input Section ── */
.ua-input-section { padding: 5rem 2rem 4rem; text-align: center; }
.ua-input-inner { max-width: 960px; margin: 0 auto; }
.ua-badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan-500); margin-bottom: 1.2rem; }
.ua-input-section h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: #fff; margin-bottom: .75rem; letter-spacing: -.5px; }
.ua-subtitle { font-size: 1.05rem; color: var(--slate-400); line-height: 1.7; margin-bottom: 2.5rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.ua-subtitle a { color: var(--cyan-500); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; cursor: pointer; transition: color .2s; }
.ua-subtitle a:hover { color: #38bdf8; }

.ua-form-card { background: rgba(30,41,59,.6); border: 1px solid rgba(51,65,85,.5); border-radius: 16px; padding: 2rem 2.5rem; max-width: 900px; margin: 0 auto; }
.ua-form-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.ua-field { text-align: left; }
.ua-field label { display: block; font-size: .78rem; font-weight: 600; color: #ffffff; margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .05em; }
.ua-field label i { margin-right: .3rem; font-size: .7rem; }
.ua-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: #fff; font-size: .72rem; }
.ua-field input {
    width: 100%; padding: .75rem 1rem; border-radius: 8px;
    background: rgba(15,23,42,.8); border: 1px solid rgba(51,65,85,.6);
    color: #fff; font-size: .9rem; font-family: inherit;
    transition: border-color .2s;
}
.ua-field input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,134,222,.15); }
.ua-field input::placeholder { color: var(--slate-600); }

.ua-analyze-btn {
    width: 100%; padding: .9rem; border: none; border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff; font-size: 1rem; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all .2s; letter-spacing: .02em;
}
.ua-analyze-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(46,134,222,.35); }
.ua-analyze-btn i { margin-right: .4rem; }

.ua-error-banner {
    margin-bottom: 1rem; padding: 1rem 1.2rem; border-radius: 10px;
    background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35);
    color: #fca5a5; font-size: .88rem; line-height: 1.6; text-align: left;
}
.ua-error-banner strong { color: #f87171; display: block; margin-bottom: .3rem; font-size: .92rem; }

/* ── Paste Fallback ── */
.ua-paste-fallback { margin-top: .5rem; }
.ua-paste-divider { text-align: center; margin: .75rem 0 1.25rem; position: relative; }
.ua-paste-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(51,65,85,.5); }
.ua-paste-divider span { position: relative; padding: 0 1rem; background: rgba(30,41,59,.6); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-400); }
.ua-paste-fields { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.ua-paste-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ua-paste-fields textarea {
    width: 100%; padding: .75rem 1rem; border-radius: 8px;
    background: rgba(15,23,42,.8); border: 1px solid rgba(51,65,85,.6);
    color: #fff; font-size: .88rem; font-family: inherit; line-height: 1.6;
    resize: vertical; transition: border-color .2s;
}
.ua-paste-fields textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,134,222,.15); }
.ua-paste-fields textarea::placeholder { color: var(--slate-600); }
.ua-paste-disclaimer { font-size: .78rem; color: var(--slate-500); line-height: 1.6; margin-bottom: 1rem; text-align: left; }
.ua-paste-disclaimer i { color: #fbbf24; margin-right: .3rem; }
@media(max-width:640px) { .ua-paste-row { grid-template-columns: 1fr; } }

.ua-limit-note { margin-top: 1rem; font-size: .8rem; color: #fff; }
.ua-limit-note i { margin-right: .3rem; }

/* ── Loading / Progress ── */
.ua-loading { display: flex; align-items: center; justify-content: center; padding: 6rem 2rem; min-height: 60vh; }
.ua-loading-inner { text-align: center; max-width: 520px; width: 100%; }

.ua-loader-icon {
    position: relative; width: 80px; height: 80px; margin: 0 auto 2rem;
}
.ua-loader-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 3px solid rgba(51,65,85,.3);
    border-top-color: var(--blue-500); border-right-color: var(--cyan-500);
    animation: uaSpin 1.2s linear infinite;
}
.ua-loader-icon i {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: var(--blue-400);
    animation: uaIconPulse 2s ease-in-out infinite;
}
@keyframes uaSpin { to { transform: rotate(360deg); } }
@keyframes uaIconPulse { 0%,100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }

.ua-loader-title {
    font-family: 'Inter', sans-serif; font-size: 1.5rem; font-weight: 700;
    color: #fff; margin: 0 0 .5rem; letter-spacing: -.02em;
}
.ua-loader-subtitle {
    font-size: .85rem; color: var(--slate-500); line-height: 1.5;
    margin: 0 0 2.5rem;
}

.ua-stepper { width: 100%; }
.ua-stepper-track {
    width: 100%; height: 8px; border-radius: 4px;
    background: rgba(51,65,85,.5); overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.4);
    margin-bottom: 1rem;
}
.ua-stepper-fill {
    height: 100%; width: 0; border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #22d3ee);
    background-size: 200% 100%;
    animation: uaShimmer 1.5s linear infinite;
    transition: width 1s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 16px rgba(6,182,212,.5), 0 2px 4px rgba(6,182,212,.3);
}
@keyframes uaShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.ua-stepper-labels {
    display: flex; justify-content: space-between;
}
.ua-stepper-step {
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; color: rgba(148,163,184,.4);
    transition: color .4s, text-shadow .4s;
    position: relative; padding-top: .2rem;
}
.ua-stepper-step.active {
    color: #fff;
    text-shadow: 0 0 12px rgba(59,130,246,.5);
}
.ua-stepper-step.done {
    color: #4ade80;
}
.ua-stepper-step.done::before {
    content: '\2713\00a0';
    font-size: .6rem;
}

/* ── Results ── */
.ua-results { padding: 2rem 2rem 4rem; }
.ua-results-inner { max-width: 900px; margin: 0 auto; }

.ua-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(51,65,85,.4); gap: .5rem; flex-wrap: wrap; }
.ua-analyzed-url { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ua-analyzed-url i { color: var(--blue-500); flex-shrink: 0; }
.ua-new-btn { padding: .5rem 1rem; border-radius: 8px; border: 1px solid rgba(51,65,85,.6); background: transparent; color: var(--slate-300); font-size: .8rem; font-weight: 500; cursor: pointer; transition: all .2s; font-family: inherit; white-space: nowrap; }
.ua-new-btn:hover { border-color: var(--blue-500); color: #fff; }
.ua-new-btn i { margin-right: .3rem; }
.ua-pdf-btn { margin-top: 1.2rem; padding: .55rem 1.4rem; border-radius: 8px; border: 1px solid rgba(245,158,11,.4); background: transparent; color: #f59e0b; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; white-space: nowrap; }
.ua-pdf-btn:hover { border-color: #f59e0b; color: #fff; background: rgba(245,158,11,.1); }
.ua-pdf-btn i { margin-right: .35rem; }

/* Page Title & Meta */
.ua-page-meta { margin-bottom: 2rem; background: rgba(30,41,59,.5); border: 1px solid rgba(51,65,85,.4); border-radius: 12px; padding: 1rem 1.25rem; }
.ua-meta-item { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem 0; }
.ua-meta-item + .ua-meta-item { border-top: 1px solid rgba(51,65,85,.3); }
.ua-meta-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-400); white-space: nowrap; min-width: 155px; padding-top: .15rem; }
.ua-meta-label i { margin-right: .35rem; font-size: .65rem; }
.ua-meta-value { font-size: .88rem; color: #e2e8f0; line-height: 1.5; word-break: break-word; }

/* Score hero — Half-Moon Arc (matches Content Editor) */
.ua-score-hero { text-align: center; margin-bottom: 3rem; display: flex; flex-direction: column; align-items: center; }
.ua-arc-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 132px;
    overflow: visible;
}
.ua-arc-svg {
    display: block;
    transform: rotate(0deg);
    filter: drop-shadow(0 0 10px rgba(56,189,248,.38)) drop-shadow(0 0 22px rgba(56,189,248,.15));
}
.ua-arc-bg { fill: none; stroke: rgba(51,65,85,.3); }
.ua-arc-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1), stroke 0.3s ease; }
.ua-arc-value {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ua-arc-value span {
    font-size: 4.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(255,255,255,.15);
}
.ua-tier-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 24px;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}
.ua-tier-label.tier-elite { color: #22d3ee; text-shadow: 0 0 10px rgba(34,211,238,.5); }
.ua-tier-label.tier-strong { color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,.4); }
.ua-tier-label.tier-good { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,.3); }
.ua-tier-label.tier-needs { color: #f87171; text-shadow: 0 0 8px rgba(248,113,113,.3); }

.ua-score-meta { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; }
.ua-meta-item { font-size: .95rem; color: #ffffff; display: flex; align-items: center; gap: .4rem; }
.ua-meta-item i { color: var(--blue-500); font-size: .8rem; }
.ua-meta-item a { color: var(--blue-500); text-decoration: none; font-size: .8rem; font-weight: 600; margin-left: .2rem; cursor: pointer; transition: color .2s; }
.ua-meta-item a:hover { color: #38bdf8; }

/* Scores grid */
.ua-scores-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.ua-score-card { background: rgba(30,41,59,.6); border: 1px solid rgba(51,65,85,.4); border-radius: 14px; padding: 1.5rem; transition: all .2s; }
.ua-score-card:hover { border-color: rgba(46,134,222,.3); }
.ua-card-header { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.ua-card-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(46,134,222,.12); display: flex; align-items: center; justify-content: center; color: var(--blue-500); font-size: .8rem; }
.ua-card-title { font-size: 1rem; font-weight: 700; color: #fff; flex: 1; }
.ua-card-val { font-size: 1.6rem; font-weight: 800; color: #fff; }
.ua-card-bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; margin-bottom: 1rem; }
.ua-bar-fill { height: 100%; border-radius: 3px; transition: width 1s ease; width: 0; }
.ua-card-details { display: flex; flex-direction: column; gap: .45rem; }
.ua-detail-row { display: flex; justify-content: space-between; font-size: .88rem; color: #ffffff; }
.ua-detail-row span:last-child { font-weight: 700; }

/* "What does this mean?" link */
.ua-card-info { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid rgba(51,65,85,.3); }
.ua-card-info a { font-size: .82rem; color: var(--blue-500); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; transition: color .2s; }
.ua-card-info a:hover { color: #38bdf8; }

/* ── Scraped Content Preview ── */
.ua-content-preview {
    background: rgba(30,41,59,.4);
    border: 1px solid rgba(51,65,85,.4);
    border-radius: 14px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}
.ua-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(51,65,85,.3);
}
.ua-content-header h3 {
    font-size: .92rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ua-content-header h3 i { color: var(--blue-500); font-size: .8rem; }
.ua-content-note { color: var(--slate-500); cursor: help; font-size: .7rem; position: relative; }
.ua-content-note sup { font-size: .65rem; }
.ua-security-warn {
    background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4);
    color: #fca5a5; padding: .6rem 1rem; border-radius: 8px;
    font-size: .8rem; margin-bottom: .5rem;
    display: flex; align-items: center; gap: .5rem;
}
.ua-security-warn i { color: #f87171; font-size: .9rem; }
.ua-content-header-actions { display: flex; align-items: center; gap: .5rem; }
.ua-source-btn {
    background: rgba(51,65,85,.4); border: 1px solid rgba(51,65,85,.5);
    color: var(--slate-400); padding: .35rem .75rem; border-radius: 6px;
    font-size: .72rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: .35rem;
    font-family: inherit; transition: all .2s;
}
.ua-source-btn:hover { border-color: var(--blue-500); color: #fff; background: rgba(46,134,222,.15); }
.ua-source-btn i { font-size: .65rem; }
.ua-content-source {
    padding: 1.5rem; max-height: 400px; overflow: auto;
    font-size: .78rem; line-height: 1.6; color: #a5f3fc;
    background: rgba(2,6,23,.6); margin: 0;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    white-space: pre-wrap; word-break: break-word;
    border-top: 1px solid rgba(51,65,85,.3);
}
.ua-toggle-btn {
    background: none;
    border: 1px solid rgba(51,65,85,.5);
    color: var(--slate-400);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .7rem;
    transition: all .2s;
}
.ua-toggle-btn:hover { border-color: var(--blue-500); color: #fff; }
.ua-content-body {
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    font-size: .88rem;
    line-height: 1.8;
    color: #1e293b;
    background: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: max-height .4s ease;
}
.ua-content-body.ua-content-expanded {
    max-height: none;
}
.ua-content-body h1, .ua-content-body h2, .ua-content-body h3,
.ua-content-body h4, .ua-content-body h5, .ua-content-body h6 {
    color: #0f172a;
    margin: 1.2rem 0 .5rem;
    font-weight: 700;
}
.ua-content-body h1 { font-size: 1.3rem; }
.ua-content-body h2 { font-size: 1.1rem; }
.ua-content-body h3 { font-size: 1rem; }
.ua-content-body p { margin-bottom: .75rem; }
.ua-content-body ul, .ua-content-body ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.ua-content-body li { margin-bottom: .3rem; }
.ua-content-body a { color: #2563eb; text-decoration: underline; }
.ua-content-body a:hover { color: #1d4ed8; }
/* Custom scrollbar */
.ua-content-body::-webkit-scrollbar { width: 6px; }
.ua-content-body::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 3px; }
.ua-content-body::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
.ua-content-body::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── Info Modals (same styling as Content Editor) ── */
.cie-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cie-modal {
    position: relative;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(56,189,248,.4);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(56,189,248,.15), 0 25px 50px rgba(0,0,0,.5);
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
}
.cie-modal h3 { color: #f1f5f9; font-size: 1.15rem; font-weight: 700; margin: 0 0 1rem; line-height: 1.4; }
.cie-modal h4 { color: #e2e8f0; font-size: 1rem; font-weight: 700; margin: 1.2rem 0 0.5rem; }
.cie-modal p { margin: 0.6rem 0; color: #cbd5e1; }
.cie-modal ul { margin: 0.6rem 0; padding-left: 1.4rem; }
.cie-modal li { margin-bottom: 0.5rem; color: #cbd5e1; }
.cie-modal li strong { color: #f1f5f9; }
.cie-modal-close {
    position: absolute;
    top: 0.75rem; right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.cie-modal-close:hover { color: #f1f5f9; }

/* ── Topical Coverage + Related Keywords ── */
.ua-topical-section { margin-top: 2rem; margin-bottom: 2.5rem; }
.ua-topical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ua-topical-card {
    background: rgba(30,41,59,.6); border: 1px solid rgba(51,65,85,.5);
    border-radius: 14px; padding: 1.5rem; display: flex; flex-direction: column;
}
.ua-topical-header { margin-bottom: 1rem; }
.ua-topical-header h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; display: flex; align-items: center; gap: .5rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-topical-header h3 i { color: var(--cyan-500); font-size: .85rem; }
.ua-topical-title-row { display: flex; align-items: center; justify-content: space-between; }
.ua-topical-score {
    font-size: .85rem; font-weight: 800; color: #fff; padding: .25rem .65rem;
    border-radius: 6px; min-width: 32px; text-align: center;
}
.ua-topical-topic {
    font-size: .78rem; color: #fff; margin-top: .4rem;
    font-style: italic; display: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ua-topical-subtitle { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .3rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-topical-bar {
    height: 4px; background: rgba(51,65,85,.5); border-radius: 2px;
    margin-bottom: 1rem; overflow: hidden;
}
.ua-topical-bar .ua-bar-fill { height: 100%; border-radius: 2px; transition: width 1s ease; width: 0; }

.ua-topical-terms { flex: 1; }
.ua-term-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .45rem 0; border-bottom: 1px solid rgba(51,65,85,.3);
    font-size: .85rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ua-term-row:last-child { border-bottom: none; }
.ua-term-left { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.ua-term-left i { font-size: .75rem; flex-shrink: 0; }
.ua-term-text { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-term-count { font-size: .7rem; color: var(--slate-500); background: rgba(51,65,85,.5); padding: .1rem .4rem; border-radius: 4px; flex-shrink: 0; }

.ua-term-badges { display: flex; gap: 3px; flex-shrink: 0; margin-left: .5rem; }
.ua-placement-badge {
    width: 20px; height: 20px; border-radius: 4px; font-size: .6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    background: rgba(51,65,85,.4); color: var(--slate-600);
    transition: all .2s;
}
.ua-placement-badge.active { background: rgba(74,222,128,.15); color: #4ade80; }

.ua-topical-legend {
    display: flex; gap: .75rem; padding-top: .75rem; margin-top: .5rem;
    border-top: 1px solid rgba(51,65,85,.3); justify-content: flex-end;
}
.ua-topical-legend span { font-size: .68rem; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: .2rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-topical-legend strong { color: #fff; font-weight: 700; }

/* Related Keywords */
.ua-related-list { flex: 1; }
.ua-related-row {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem 0; border-bottom: 1px solid rgba(51,65,85,.2);
    font-size: .85rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ua-related-num { color: rgba(255,255,255,.4); font-size: .75rem; font-weight: 600; min-width: 1.5rem; }
.ua-related-row:last-child { border-bottom: none; }
.ua-related-kw { color: #fff; overflow: hidden; text-overflow: ellipsis; }
.ua-related-empty { text-align: center; padding: 2rem 1rem; color: var(--slate-500); font-size: .85rem; }

/* CTA */
.ua-cta-section { text-align: center; padding: 2.5rem; background: rgba(30,41,59,.4); border: 1px solid rgba(51,65,85,.3); border-radius: 16px; margin-top: 2.5rem; }
.ua-cta-section h3 { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: .75rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-cta-section p { font-size: .95rem; color: #fff; margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.7; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.ua-cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Limit section */
.ua-limit-section { display: flex; align-items: center; justify-content: center; padding: 6rem 2rem; text-align: center; }
.ua-limit-inner { max-width: 500px; }
.ua-limit-icon { font-size: 3rem; color: var(--amber-500); margin-bottom: 1.5rem; }
.ua-limit-section h2 { font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.ua-limit-section p { font-size: 1rem; color: var(--slate-400); line-height: 1.7; margin-bottom: 2rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .ua-form-row { grid-template-columns: 1fr; }
    .ua-scores-grid { grid-template-columns: 1fr; }
    .ua-results-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .ua-analyzed-url { max-width: 100%; }
    .ua-score-meta { flex-direction: column; gap: .5rem; }
    .ua-input-section { padding: 3rem 1rem 2rem; }
    .ua-arc-wrap { width: 200px; height: 110px; }
    .ua-arc-value span { font-size: 3rem; }
    .ua-arc-value { bottom: 6px; }
    .ua-topical-grid { grid-template-columns: 1fr; }
    .ua-term-badges { gap: 2px; }
    .ua-placement-badge { width: 18px; height: 18px; font-size: .55rem; }
    .ua-stepper-step { font-size: .55rem; }
    .ua-loader-title { font-size: 1.2rem; }
    .ua-loader-icon { width: 60px; height: 60px; }
}

/* ── Past Analyses History Table ── */
.ua-history { padding: 0 1.5rem 2rem; }
.ua-history-inner { max-width: 1000px; margin: 0 auto; }
.ua-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ua-history-header h2 { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; margin: 0; display: flex; align-items: center; gap: .5rem; }
.ua-history-header h2 i { color: #94a3b8; font-size: .9rem; }
.ua-history-count { font-size: .75rem; color: #64748b; font-weight: 600; background: rgba(51,65,85,.5); padding: .25rem .7rem; border-radius: 50px; }
.ua-history-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #334155; background: rgba(15,23,42,.6); }
.ua-history-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.ua-history-table thead th { padding: .7rem .75rem; text-align: left; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; background: rgba(30,41,59,.8); border-bottom: 1px solid #334155; white-space: nowrap; }
.ua-history-table tbody tr { border-bottom: 1px solid rgba(51,65,85,.4); transition: background .15s; }
.ua-history-table tbody tr:last-child { border-bottom: none; }
.ua-history-table tbody tr:hover { background: rgba(51,65,85,.3); }
.ua-history-table td { padding: .6rem .75rem; color: #e2e8f0; white-space: nowrap; }
.ua-hist-url { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ua-hist-url a { color: #22d3ee; text-decoration: none; }
.ua-hist-url a:hover { text-decoration: underline; }
.ua-hist-kw { color: #94a3b8; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ua-hist-score { text-align: center; }
.ua-hist-words { text-align: center; color: #94a3b8; }
.ua-hist-date { color: #64748b; font-size: .75rem; }
.ua-hist-action { text-align: center; white-space: nowrap; }
.ua-hist-view, .ua-hist-rerun { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: #94a3b8; transition: all .15s; }
.ua-hist-view:hover { background: rgba(34,211,238,.1); color: #22d3ee; }
.ua-hist-rerun:hover { background: rgba(251,191,36,.1); color: #fbbf24; }
.ua-score-good { color: #4ade80; font-weight: 700; }
.ua-score-ok { color: #fbbf24; font-weight: 700; }
.ua-score-low { color: #ef4444; font-weight: 700; }
.ua-score-na { color: #475569; }

/* ── Optimize CTA (logged-in only) ── */
.ua-optimize-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: .75rem; padding: .6rem 1.4rem; border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #0f172a;
    font-size: .88rem; font-weight: 700; text-decoration: none;
    transition: all .2s; box-shadow: 0 4px 16px rgba(245,158,11,.25);
}
.ua-optimize-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(245,158,11,.4); color: #0f172a; }

.ua-optimize-cta-bottom { text-align: center; margin-top: 2rem; padding: 1.5rem; border-radius: 12px; background: linear-gradient(135deg, rgba(245,158,11,.06), rgba(217,119,6,.04)); border: 1px solid rgba(245,158,11,.2); }
.ua-optimize-cta-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 2rem; border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #0f172a;
    font-size: 1rem; font-weight: 700; text-decoration: none;
    transition: all .2s; box-shadow: 0 4px 16px rgba(245,158,11,.25);
}
.ua-optimize-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(245,158,11,.4); color: #0f172a; }
.ua-optimize-cta-sub { font-size: .8rem; color: #94a3b8; margin: .75rem 0 0; }

/* ── Keyword checkboxes ── */
.ua-term-row { display: flex; align-items: center; gap: .5rem; }
.ua-kw-check { width: 16px; height: 16px; accent-color: #f59e0b; cursor: pointer; flex-shrink: 0; }
.ua-related-row { display: flex; align-items: center; gap: .5rem; }
.ua-kw-select-all { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; margin-bottom: .5rem; font-size: .78rem; color: #94a3b8; cursor: pointer; user-select: none; }
.ua-kw-select-all input { accent-color: #f59e0b; cursor: pointer; }
