:root {
    --bg: #f8faf7;
    --surface: #ffffff;
    --text: #1b2a20;
    --muted: #59695d;
    --brand: #14532d;
    --brand-soft: #dff3e5;
    --line: #d7e5da;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, #eef8f0 0%, transparent 36%),
        radial-gradient(circle at 85% 5%, #e6f5ea 0%, transparent 30%),
        var(--bg);
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.logo {
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
    font-size: 1.1rem;
}

.hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 32px 0;
    padding: 24px;
}

h1 {
    margin-top: 22px;
    font-size: 1.9rem;
}

.search-form {
    display: grid;
    gap: 12px;
}

.search-form input[type="text"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 1rem;
}

.search-form fieldset {
    border: 1px dashed var(--line);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px;
}

.search-form.compact {
    grid-template-columns: 1fr repeat(4, auto) auto;
    align-items: center;
    margin: 16px 0 22px;
}

.search-form button {
    border: 0;
    background: var(--brand);
    color: #fff;
    border-radius: 8px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 600;
}

.summary {
    color: var(--muted);
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 11px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    background: var(--brand-soft);
}

.th-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.th-link:hover {
    text-decoration: underline;
}

.aged-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0c4a6e;
    font-size: 0.75rem;
    font-weight: 700;
}

.score-badge {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.85rem;
    font-weight: 700;
}

.score-red {
    background: #fee2e2;
    color: #991b1b;
}

.score-orange {
    background: #ffedd5;
    color: #9a3412;
}

.score-blue {
    background: #dbeafe;
    color: #1e3a8a;
}

.score-green {
    background: #dcfce7;
    color: #166534;
}

.row-available td {
    background: #ecfdf1;
}

.availability {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.85rem;
    font-weight: 600;
}

.availability.available {
    background: #dcfce7;
    color: #166534;
}

.availability.registered {
    background: #f1f5f9;
    color: #334155;
}

.availability.unknown {
    background: #fef3c7;
    color: #92400e;
}

.register-btn {
    text-decoration: none;
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--text);
    background: #ffffff;
    font-weight: 600;
}

.register-btn-available {
    border-color: #16a34a;
    background: #16a34a;
    color: #ffffff;
}

.google-index-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 700;
}

.google-indexed {
    background: #dcfce7;
    color: #166534;
}

.google-not-indexed {
    background: #fee2e2;
    color: #991b1b;
}

.google-unknown {
    background: #e5e7eb;
    color: #374151;
}

.google-pending {
    background: #f3f4f6;
    color: #4b5563;
}

.spam-risk-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 700;
}

.spam-clean {
    background: #dcfce7;
    color: #166534;
}

.spam-suspicious {
    background: #ffedd5;
    color: #9a3412;
}

.spam-high-risk {
    background: #fee2e2;
    color: #991b1b;
}

.spam-unknown {
    background: #e5e7eb;
    color: #374151;
}

.spam-pending {
    background: #f3f4f6;
    color: #4b5563;
}

.backlink-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 700;
}

.backlink-0 {
    background: #e5e7eb;
    color: #374151;
}

.backlink-10 {
    background: #dbeafe;
    color: #1e3a8a;
}

.backlink-50 {
    background: #dcfce7;
    color: #166534;
}

.backlink-100 {
    background: #bbf7d0;
    color: #14532d;
}

.backlink-500 {
    background: #fef3c7;
    color: #92400e;
}

.backlink-1000 {
    background: #ede9fe;
    color: #5b21b6;
}

.backlink-unknown {
    background: #e5e7eb;
    color: #374151;
}

.backlink-pending {
    background: #f3f4f6;
    color: #4b5563;
}

.history-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-btn {
    text-decoration: none;
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 9px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
}

.history-btn-disabled {
    pointer-events: none;
    opacity: 0.65;
}

.history-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 700;
}

.history-has-archive {
    background: #dbeafe;
    color: #1e3a8a;
}

.history-no-archive {
    background: #e5e7eb;
    color: #374151;
}

.history-pending {
    background: #f3f4f6;
    color: #4b5563;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.pagination a {
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
}

.pagination a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.related {
    margin: 28px 0 40px;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-grid a {
    text-decoration: none;
    color: var(--brand);
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 7px 12px;
}

@media (max-width: 760px) {
    .search-form.compact {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }
}
