/* ============================================================
   TruthChecker — Namespaced CSS for WWW4 Integration
   Based on RoboDoc / Medical_Critic_2 style.css
   All selectors scoped under .tc-app
   ============================================================ */

/* ---- Scope Container + CSS Variables ---- */
.tc-app {
    --bg:         #f8f8fa;
    --bg-warm:    #fafaf9;
    --surface:    #ffffff;
    --surface-2:  #f3f3f6;
    --surface-3:  #eeeef2;

    --border:     rgba(0, 0, 0, 0.06);
    --border-s:   rgba(0, 0, 0, 0.08);

    --text:       #1a1a2e;
    --text-2:     #3d3d56;
    --text-3:     #6b6b80;
    --text-4:     #9999ad;

    --accent:     #4f46e5;
    --accent-soft:#ededfc;
    --accent-hover:#4338ca;

    --green:      #16a34a;
    --green-bg:   #f0fdf4;
    --yellow:     #ca8a04;
    --yellow-bg:  #fefce8;
    --red:        #dc2626;
    --red-bg:     #fef2f2;

    --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg:  0 10px 30px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-xl:  0 20px 50px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);

    --radius:     12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-full:9999px;

    --header-h:   72px;
}

/* ---- Layout ---- */
.tc-app .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}

/* ---- Page Titles ---- */
.tc-app .page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.tc-app .page-subtitle {
    font-size: 15px;
    color: var(--text-4);
    font-weight: 400;
    margin-bottom: 40px;
}

/* ---- Input Card ---- */
.tc-app .input-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}
.tc-app .input-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.tc-app .input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.tc-app .url-input {
    flex: 1;
    background: var(--surface-2);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    padding: 14px 20px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}
.tc-app .url-input:hover { border-color: var(--border-s); }
.tc-app .url-input:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}
.tc-app .url-input::placeholder { color: var(--text-4); }

.tc-app .provider-select {
    background: var(--surface-2);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    padding: 14px 20px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    min-width: 150px;
    transition: all 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%239999ad' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.tc-app .provider-select:hover { border-color: var(--border-s); }
.tc-app .provider-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08); }

/* ---- Buttons ---- */
.tc-app .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}
.tc-app .btn-primary {
    background: var(--text);
    color: #fff;
    padding: 14px 32px;
    box-shadow: var(--shadow-sm);
}
.tc-app .btn-primary:hover {
    background: #000;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.tc-app .btn-primary:active { transform: translateY(0); }
.tc-app .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.tc-app .btn-secondary {
    background: var(--surface);
    color: var(--text-2);
    padding: 10px 20px;
    border: 1px solid var(--border-s);
    font-size: 14px;
}
.tc-app .btn-secondary:hover { background: var(--surface-2); }

.tc-app .btn-ghost {
    background: transparent;
    color: var(--text-3);
    padding: 10px 16px;
    font-size: 14px;
}
.tc-app .btn-ghost:hover { color: var(--text); background: var(--surface-2); border-radius: var(--radius); }

/* ---- Status Messages ---- */
.tc-app .status {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    display: none;
    font-weight: 500;
}
.tc-app .status.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--accent-soft);
    color: var(--accent);
}
.tc-app .status.error {
    display: block;
    background: var(--red-bg);
    color: var(--red);
}
.tc-app .spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Article Info Bar ---- */
.tc-app .article-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: none;
    box-shadow: var(--shadow-xs);
}
.tc-app .article-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.tc-app .article-info .meta {
    font-size: 13px;
    color: var(--text-4);
}
.tc-app .article-info a { color: var(--accent); text-decoration: none; }
.tc-app .article-info a:hover { text-decoration: underline; }

/* ---- Result Cards ---- */
.tc-app .result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}
.tc-app .result-card:hover { box-shadow: var(--shadow-md); }

.tc-app .result-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.tc-app .result-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.tc-app .result-header .provider-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.tc-app .result-meta {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-4);
    font-weight: 500;
}

.tc-app .result-body {
    padding: 32px;
    line-height: 1.8;
    font-size: 14.5px;
    color: var(--text-2);
}

/* Rendered Markdown inside results */
.tc-app .result-body h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 12px;
    letter-spacing: -0.3px;
}
.tc-app .result-body h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.2px;
}
.tc-app .result-body h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 8px;
}
.tc-app .result-body p { margin: 10px 0; }
.tc-app .result-body ul, .tc-app .result-body ol { margin: 10px 0 10px 24px; }
.tc-app .result-body li { margin: 6px 0; }
.tc-app .result-body strong { color: var(--text); font-weight: 600; }
.tc-app .result-body em { color: var(--text-3); font-style: italic; }
.tc-app .result-body code {
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.tc-app .result-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 20px;
    margin: 16px 0;
    color: var(--text-3);
    background: var(--surface-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* ---- Thinking / Chain-of-Thought ---- */
.tc-app .thinking-toggle {
    background: var(--surface-2);
    border-radius: var(--radius);
    margin: 0 32px 16px;
    overflow: hidden;
}
.tc-app .thinking-toggle summary {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-4);
    cursor: pointer;
    transition: color 0.2s;
}
.tc-app .thinking-toggle summary:hover { color: var(--text-3); }
.tc-app .thinking-content {
    padding: 16px 20px;
    font-size: 13px;
    color: var(--text-4);
    line-height: 1.7;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

/* ---- Trust Score ---- */
.tc-app .trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.tc-app .trust-high { background: var(--green-bg); color: var(--green); }
.tc-app .trust-med  { background: var(--yellow-bg); color: var(--yellow); }
.tc-app .trust-low  { background: var(--red-bg); color: var(--red); }

/* ---- Search Bar ---- */
.tc-app .search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}
.tc-app .search-input {
    flex: 1;
    background: var(--surface);
    border: 1.5px solid var(--border-s);
    border-radius: var(--radius);
    padding: 14px 20px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
}
.tc-app .search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}
.tc-app .search-input::placeholder { color: var(--text-4); }

/* ---- Library Report List ---- */
.tc-app .report-list { display: flex; flex-direction: column; gap: 12px; }

.tc-app .report-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}
.tc-app .report-row .report-item {
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.tc-app .report-row .btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-4);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tc-app .report-row .btn-delete:hover {
    background: var(--red-bg);
    color: var(--red);
    border-color: rgba(220, 38, 38, 0.2);
}
.tc-app .report-row .btn-delete:active {
    transform: scale(0.95);
}
.tc-app .report-row .btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tc-app .delete-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.tc-app .report-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--shadow-xs);
}
.tc-app .report-item:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.tc-app .report-row:hover .report-item {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: var(--shadow-md);
}
.tc-app .report-row:hover .btn-delete {
    border-color: rgba(79, 70, 229, 0.2);
    border-left: none;
}
.tc-app .report-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.tc-app .report-item .url {
    font-size: 13px;
    color: var(--accent);
    word-break: break-all;
    margin-bottom: 12px;
    opacity: 0.8;
}
.tc-app .report-item .meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-4);
    flex-wrap: wrap;
    align-items: center;
}
.tc-app .badge-provider {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---- Report Meta (single report view) ---- */
.tc-app .report-meta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}
.tc-app .report-meta-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.4px;
}
.tc-app .report-meta-card .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-4);
    align-items: center;
}
.tc-app .report-meta-card .meta-row a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.tc-app .report-meta-card .meta-row a:hover { text-decoration: underline; }

.tc-app .actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

/* ---- Pagination ---- */
.tc-app .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}
.tc-app .pagination button {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-3);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.tc-app .pagination button:hover { background: var(--surface-2); color: var(--text); }
.tc-app .pagination button.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}
.tc-app .pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---- Empty State ---- */
.tc-app .empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-4);
}
.tc-app .empty-state h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text);
}
.tc-app .empty-state p { font-size: 15px; margin-bottom: 24px; color: var(--text-4); }
.tc-app .empty-state a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ---- Loading ---- */
.tc-app .loading {
    text-align: center;
    padding: 60px;
    color: var(--text-4);
    font-size: 14px;
}

/* ---- Library Header ---- */
.tc-app .library-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 32px;
}
.tc-app .library-count {
    font-size: 14px;
    color: var(--text-4);
    font-weight: 500;
    padding: 4px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-full);
}

/* ============================================================
   Annotated Article Viewer & Summary Card
   ============================================================ */

/* ---- Section Tabs ---- */
.tc-app .section-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
}
.tc-app .section-tab {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-3);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.tc-app .section-tab:hover { color: var(--text); }
.tc-app .section-tab.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.tc-app .section-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}
.tc-app .tab-count-red    { background: var(--red-bg); color: var(--red); }
.tc-app .tab-count-orange { background: #fff7ed; color: #ea580c; }
.tc-app .tab-count-yellow { background: var(--yellow-bg); color: var(--yellow); }

.tc-app .tab-panel { display: none; }
.tc-app .tab-panel.active { display: block; }

/* ---- Summary Card ---- */
.tc-app .summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.tc-app .summary-header {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}
.tc-app .trust-ring {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-weight: 800;
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
}
.tc-app .trust-ring::after {
    content: '/10';
    font-size: 11px;
    font-weight: 600;
    opacity: 0.6;
    margin-top: 2px;
}
.tc-app .trust-ring.ring-high { background: var(--green-bg); color: var(--green); border: 3px solid rgba(22, 163, 74, 0.2); }
.tc-app .trust-ring.ring-med  { background: var(--yellow-bg); color: var(--yellow); border: 3px solid rgba(202, 138, 4, 0.2); }
.tc-app .trust-ring.ring-low  { background: var(--red-bg); color: var(--red); border: 3px solid rgba(220, 38, 38, 0.2); }

.tc-app .summary-headline { flex: 1; }
.tc-app .summary-headline .trust-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.tc-app .summary-headline .verdict {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-2);
    line-height: 1.5;
}
.tc-app .error-pills {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.tc-app .error-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
}
.tc-app .error-pill .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.tc-app .pill-red    { background: var(--red-bg); color: var(--red); }
.tc-app .pill-red .dot    { background: var(--red); }
.tc-app .pill-orange { background: #fff7ed; color: #ea580c; }
.tc-app .pill-orange .dot { background: #ea580c; }
.tc-app .pill-yellow { background: var(--yellow-bg); color: var(--yellow); }
.tc-app .pill-yellow .dot { background: var(--yellow); }

.tc-app .summary-body {
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.tc-app .summary-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-4);
    margin-bottom: 12px;
}
.tc-app .summary-section ul {
    list-style: none;
    padding: 0;
}
.tc-app .summary-section li {
    font-size: 14px;
    color: var(--text-2);
    padding: 6px 0;
    line-height: 1.5;
    display: flex;
    gap: 8px;
}
.tc-app .summary-section li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 7px;
}
.tc-app .summary-section.gets-right li::before { background: var(--green); }
.tc-app .summary-advisory {
    grid-column: 1 / -1;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
}
.tc-app .summary-advisory h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-4);
    margin-bottom: 8px;
}

/* ---- Annotated Article ---- */
.tc-app .annotated-article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.tc-app .annotated-article-header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.tc-app .annotated-article-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.tc-app .annotated-article-header .legend {
    margin-left: auto;
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-4);
}
.tc-app .legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.tc-app .legend-dot {
    width: 12px; height: 12px;
    border-radius: 3px;
}
.tc-app .legend-dot.yellow { background: #fef9c3; border: 1px solid #eab308; }
.tc-app .legend-dot.orange { background: #ffedd5; border: 1px solid #ea580c; }
.tc-app .legend-dot.red    { background: #fee2e2; border: 1px solid #dc2626; }

.tc-app .annotated-article-body {
    padding: 32px;
    font-size: 15px;
    line-height: 2;
    color: var(--text-2);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Annotation highlights */
.tc-app .ann {
    position: relative;
    cursor: help;
    border-radius: 3px;
    padding: 1px 2px;
    margin: 0 -2px;
    transition: filter 0.15s;
}
.tc-app .ann:hover { filter: brightness(0.92); }
.tc-app .ann-yellow { background: #fef9c3; border-bottom: 2px solid #eab308; }
.tc-app .ann-orange { background: #ffedd5; border-bottom: 2px solid #ea580c; }
.tc-app .ann-red    { background: #fee2e2; border-bottom: 2px solid #dc2626; }

/* Annotation tooltip */
.tc-app .ann-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
    width: 340px;
    max-width: 90vw;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    white-space: normal;
    pointer-events: none;
}
.tc-app .ann-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text);
}
.tc-app .ann:hover .ann-tip { display: block; }
.tc-app .ann-tip-title {
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tc-app .ann-tip-severity {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}
.tc-app .ann-tip-severity.s-yellow { background: #eab308; }
.tc-app .ann-tip-severity.s-orange { background: #ea580c; }
.tc-app .ann-tip-severity.s-red    { background: #dc2626; }
.tc-app .ann-tip-checkpoint {
    display: block;
    font-size: 11px;
    opacity: 0.6;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Hero Section (Homepage) ---- */
.tc-app .hero {
    text-align: center;
    padding: 60px 40px 40px;
    max-width: 720px;
    margin: 0 auto;
}
.tc-app .hero-mascot {
    width: 200px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.1));
    animation: hero-float 4s ease-in-out infinite;
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.tc-app .hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.tc-app .hero-tagline {
    font-size: 17px;
    color: var(--text-3);
    font-weight: 400;
    margin-bottom: 36px;
}
.tc-app .hero-input-row {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}
.tc-app .hero-input-row .url-input {
    flex: 1;
    font-size: 16px;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
}
.tc-app .btn-check {
    background: var(--accent);
    color: #fff;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.tc-app .btn-check:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}
.tc-app .btn-check:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.tc-app .hero-status {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    min-height: 24px;
}
.tc-app .hero-status.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--accent);
}
.tc-app .hero-status.error {
    color: var(--red);
}

/* ---- Public Feed (Card Grid) ---- */
.tc-app .feed-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 40px 80px;
}
.tc-app .feed-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}
.tc-app .feed-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.tc-app .feed-count {
    font-size: 13px;
    color: var(--text-4);
    font-weight: 500;
}
.tc-app .feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.tc-app .feed-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
}
.tc-app .feed-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.tc-app .feed-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.tc-app .feed-card-score {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}
.tc-app .feed-card-score.score-high { background: var(--green-bg); color: var(--green); border: 2px solid rgba(22, 163, 74, 0.2); }
.tc-app .feed-card-score.score-med  { background: var(--yellow-bg); color: var(--yellow); border: 2px solid rgba(202, 138, 4, 0.2); }
.tc-app .feed-card-score.score-low  { background: var(--red-bg); color: var(--red); border: 2px solid rgba(220, 38, 38, 0.2); }
.tc-app .feed-card-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--text-4);
    margin-left: auto;
}
.tc-app .feed-card-type.type-medical { background: #ede9fe; color: #7c3aed; }
.tc-app .feed-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tc-app .feed-card-domain {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 12px;
    opacity: 0.8;
}
.tc-app .feed-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.tc-app .feed-card-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.tc-app .feed-card-user {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
}
.tc-app .feed-card-date {
    font-size: 11px;
    color: var(--text-4);
    margin-left: auto;
}
.tc-app .feed-load-more {
    text-align: center;
    margin-top: 32px;
}

/* ---- Share Bar ---- */
.tc-app .share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.tc-app .share-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    margin-right: 4px;
}
.tc-app .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-s);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.tc-app .share-btn:hover {
    background: var(--surface-2);
    transform: translateY(-1px);
}
.tc-app .share-btn svg { width: 16px; height: 16px; }
.tc-app .share-btn.share-x:hover { color: #000; border-color: #000; }
.tc-app .share-btn.share-fb:hover { color: #1877f2; border-color: #1877f2; }
.tc-app .share-btn.share-li:hover { color: #0a66c2; border-color: #0a66c2; }
.tc-app .share-btn.share-wa:hover { color: #25d366; border-color: #25d366; }
.tc-app .share-btn.share-copy:hover { color: var(--accent); border-color: var(--accent); }
.tc-app .share-copied {
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    animation: fadeInOut 2s ease forwards;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---- Dashboard Cards ---- */
.tc-app .dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.tc-app .dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
}
.tc-app .dash-card:hover {
    box-shadow: var(--shadow-md);
}
.tc-app .dash-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tc-app .dash-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tc-app .dash-card-title a {
    color: inherit;
    text-decoration: none;
}
.tc-app .dash-card-title a:hover { color: var(--accent); }
.tc-app .dash-card-domain {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 10px;
    opacity: 0.8;
}
.tc-app .dash-card-comment {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-radius: var(--radius);
    min-height: 40px;
}
.tc-app .dash-card-comment-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    outline: none;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}
.tc-app .dash-card-comment-input:focus {
    border-color: var(--accent);
}
.tc-app .dash-card-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-4);
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.tc-app .dash-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.tc-app .dash-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-s);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-3);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tc-app .dash-btn:hover { background: var(--surface-2); color: var(--text); }
.tc-app .dash-btn-danger:hover { background: var(--red-bg); color: var(--red); border-color: rgba(220,38,38,0.2); }
.tc-app .dash-btn-toggle {
    position: relative;
}
.tc-app .visibility-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.tc-app .visibility-dot.public { background: var(--green); }
.tc-app .visibility-dot.private { background: var(--text-4); }

/* ---- Disclaimer Page ---- */
.tc-app .disclaimer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 40px 80px;
}
.tc-app .disclaimer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-sm);
}
.tc-app .disclaimer-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.tc-app .disclaimer-card .updated {
    font-size: 13px;
    color: var(--text-4);
    margin-bottom: 32px;
}
.tc-app .disclaimer-card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 10px;
}
.tc-app .disclaimer-card p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-2);
    margin-bottom: 12px;
}
.tc-app .disclaimer-card ul {
    margin: 8px 0 16px 24px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-2);
}
.tc-app .disclaimer-card li { margin-bottom: 4px; }

/* ---- Disclaimer Modal ---- */
.tc-app .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.tc-app .modal-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    text-align: center;
}
.tc-app .modal-card h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}
.tc-app .modal-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
    margin-bottom: 24px;
    text-align: left;
}
.tc-app .modal-card .btn { width: 100%; padding: 14px; }

/* ---- Toast Notification ---- */
.tc-app .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: toast-in 0.3s ease;
}
.tc-app .toast.toast-success { background: var(--green); }
.tc-app .toast.toast-error { background: var(--red); }
@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .tc-app .feed-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tc-app .container { padding: 24px 20px 60px; }
    .tc-app .input-card { padding: 24px; }
    .tc-app .input-row { flex-direction: column; }
    .tc-app .hero { padding: 40px 20px 24px; }
    .tc-app .hero-mascot { width: 150px; }
    .tc-app .hero-title { font-size: 30px; }
    .tc-app .hero-tagline { font-size: 15px; }
    .tc-app .hero-input-row { flex-direction: column; }
    .tc-app .feed-section { padding: 24px 20px 60px; }
    .tc-app .feed-grid { grid-template-columns: 1fr; }
    .tc-app .dash-grid { grid-template-columns: 1fr; }
    .tc-app .result-body { padding: 20px; }
    .tc-app .result-header { padding: 16px 20px; }
    .tc-app .report-meta-card { padding: 24px; }
    .tc-app .page-title { font-size: 24px; }
    .tc-app .share-bar { gap: 6px; }
    .tc-app .share-btn { padding: 6px 12px; font-size: 12px; }
    .tc-app .disclaimer-container { padding: 24px 20px 60px; }
    .tc-app .disclaimer-card { padding: 28px; }
    .tc-app .scanner-options { flex-direction: column; }
    .tc-app .scope-selector { flex-direction: column; }
    .tc-app .scanner-header-bar { flex-direction: column; gap: 16px; }
    .tc-app .summary-body { grid-template-columns: 1fr; }
}

/* ============================================================
   Site Scanner Styles
   ============================================================ */

/* ---- Scanner Options ---- */
.tc-app .scanner-options {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    align-items: flex-start;
}
.tc-app .option-group { flex: 1; }
.tc-app .option-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-4);
    margin-bottom: 10px;
}

/* Scope Selector (segmented control) */
.tc-app .scope-selector {
    display: flex;
    gap: 0;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 4px;
}
.tc-app .scope-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tc-app .scope-btn:hover { color: var(--text); }
.tc-app .scope-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.tc-app .scope-icon {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.6;
}
.tc-app .scope-btn.active .scope-icon { opacity: 1; }

.tc-app .limit-select {
    background: var(--surface-2);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%239999ad' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.tc-app .limit-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08); }

.tc-app .scan-start-btn {
    margin-top: 24px;
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ---- Scanner Dashboard ---- */
.tc-app .scanner-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.tc-app .scanner-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.tc-app .scanner-domain {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.tc-app .scanner-scope-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* Heartbeat */
.tc-app .heartbeat-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tc-app .heartbeat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tc-app .heartbeat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tc-app .hb-running {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    animation: hb-pulse 1.5s ease-in-out infinite;
}
.tc-app .hb-running + .heartbeat-label { color: var(--green); }

.tc-app .hb-paused {
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.2);
}
.tc-app .hb-paused + .heartbeat-label { color: var(--yellow); }

.tc-app .hb-stopped, .tc-app .hb-failed {
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}
.tc-app .hb-stopped + .heartbeat-label, .tc-app .hb-failed + .heartbeat-label { color: var(--red); }

.tc-app .hb-completed {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
.tc-app .hb-completed + .heartbeat-label { color: var(--accent); }

.tc-app .hb-stale {
    background: var(--red);
    animation: hb-pulse 0.6s ease-in-out infinite;
}
.tc-app .hb-stale + .heartbeat-label { color: var(--red); }

@keyframes hb-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Controls */
.tc-app .scanner-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tc-app .btn-stop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(220, 38, 38, 0.2);
    transition: all 0.2s;
}
.tc-app .btn-stop:hover {
    background: var(--red);
    color: #fff;
}

/* Progress Card */
.tc-app .scanner-progress-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.tc-app .progress-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}
.tc-app .progress-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.tc-app .progress-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}

/* Progress bar */
.tc-app .progress-bar {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}
.tc-app .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #818cf8 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
    position: relative;
}
.tc-app .progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: progress-shimmer 1.5s ease-in-out infinite;
}
@keyframes progress-shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.tc-app .progress-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.tc-app .stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}
.tc-app .stat-chip .stat-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
}
.tc-app .stat-done .stat-dot { background: var(--green); }
.tc-app .stat-fail .stat-dot { background: var(--red); }
.tc-app .stat-skip .stat-dot { background: var(--text-4); }
.tc-app .stat-avg .stat-dot { background: var(--accent); }

/* URL List */
.tc-app .scanner-url-list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}
.tc-app .url-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
}
.tc-app .url-list-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.tc-app .url-list-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-4);
    background: var(--surface-2);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.tc-app .url-list {
    max-height: 600px;
    overflow-y: auto;
}
.tc-app .url-list::-webkit-scrollbar { width: 6px; }
.tc-app .url-list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

.tc-app .url-row {
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.tc-app .url-row:last-child { border-bottom: none; }
.tc-app .url-row:hover { background: var(--surface-2); }
.tc-app .url-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.tc-app .url-row-info {
    flex: 1;
    min-width: 0;
}
.tc-app .url-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-app .url-row-title a { color: var(--text); text-decoration: none; }
.tc-app .url-row-title a:hover { color: var(--accent); }
.tc-app .url-row-url {
    font-size: 12px;
    color: var(--text-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-app .url-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.tc-app .url-error {
    font-size: 11px;
    color: var(--red);
    margin-top: 4px;
}

/* URL Status badges */
.tc-app .url-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.tc-app .url-status-queued { background: var(--surface-2); color: var(--text-4); }
.tc-app .url-status-analyzing { background: var(--accent-soft); color: var(--accent); animation: status-pulse 1.2s ease-in-out infinite; }
.tc-app .url-status-done { background: var(--green-bg); color: var(--green); }
.tc-app .url-status-failed { background: var(--red-bg); color: var(--red); }
.tc-app .url-status-skipped { background: var(--surface-2); color: var(--text-4); }

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Analyzing row highlight */
.tc-app .url-analyzing {
    background: rgba(79, 70, 229, 0.03);
    border-left: 3px solid var(--accent);
}

/* ---- Past Scans Section ---- */
.tc-app .past-scans-section { margin-top: 48px; }
.tc-app .section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}
.tc-app .past-scans-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tc-app .past-scan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
}
.tc-app .past-scan-item:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.tc-app .past-scan-domain {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.tc-app .past-scan-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--text-4);
    align-items: center;
}
.tc-app .past-scan-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tc-app .past-scan-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}
.tc-app .job-status-running { background: var(--green-bg); color: var(--green); }
.tc-app .job-status-paused { background: var(--yellow-bg); color: var(--yellow); }
.tc-app .job-status-stopped { background: var(--red-bg); color: var(--red); }
.tc-app .job-status-completed { background: var(--accent-soft); color: var(--accent); }
.tc-app .job-status-failed { background: var(--red-bg); color: var(--red); }
