/* ================================================================
   BRUTALIST / TERMINAL — No decoration. No chrome. All data.
   ================================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #000;
    background: #fff;
    min-height: 100vh;
}

a             { color: #0057b8; text-decoration: underline; }
a:visited     { color: #0057b8; }
a:hover       { color: #c00; }

/* ---- Layout ---- */

header {
    border-bottom: 2px solid #000;
    padding: 4px 12px;
}

main {
    padding: 8px 12px;
}

footer {
    border-top: 1px solid #000;
    padding: 4px 12px;
    font-size: 11px;
    color: #666;
    margin-top: 24px;
}

/* ---- Navigation ---- */

nav.main-nav {
    display: flex;
    align-items: baseline;
    gap: 0;
    flex-wrap: wrap;
}

.site-title {
    font-weight: bold;
    color: #000;
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 14px;
}

.site-title:hover { color: #c00; }

.nav-link {
    color: #00c;
    text-decoration: underline;
    margin-right: 1rem;
    font-size: 12px;
}

/* ---- Tables ---- */

table {
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 2px 8px 3px 0;
    font-weight: bold;
    border-bottom: 2px solid #000;
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 3px 8px 3px 0;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

tr:hover td {
    background: #fffff0;
}

/* ---- Inputs & Selects ---- */

input[type="text"],
input[type="password"],
input[type="number"],
select {
    font-family: inherit;
    font-size: 12px;
    border: 1px solid #000;
    padding: 1px 4px;
    background: #fff;
    color: #000;
    height: 22px;
    vertical-align: middle;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: 2px solid #00c;
    outline-offset: -1px;
}

input[type="checkbox"] {
    vertical-align: middle;
    cursor: pointer;
}

/* ---- Buttons ---- */

button,
.btn {
    font-family: inherit;
    font-size: 12px;
    border: 1px solid #000;
    padding: 1px 8px;
    background: #fff;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    height: 22px;
    line-height: 18px;
    vertical-align: middle;
    white-space: nowrap;
}

button:hover,
.btn:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

button:disabled,
.btn:disabled {
    background: #eee;
    color: #999;
    border-color: #999;
    cursor: not-allowed;
}

button:disabled:hover,
.btn:disabled:hover {
    background: #eee;
    color: #999;
}

.btn-danger {
    border-color: #c00;
    color: #c00;
}

.btn-danger:hover {
    background: #c00;
    color: #fff;
}

/* ---- Status ---- */

.status-ok,
.status-captured  { color: #060; }

.status-error,
.status-failed    { color: #c00; }

.status-pending   { color: #840; }

/* ---- Stats bar ---- */

.stats-bar {
    font-size: 12px;
    color: #444;
    margin: 4px 0 6px 0;
    line-height: 2;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 4px;
}

.stats-bar a {
    color: #444;
    text-decoration: none;
}

.stats-bar a:hover {
    color: #c00;
    text-decoration: underline;
}

/* ---- Filter / search row ---- */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 4px 0;
    font-size: 12px;
}

.filter-row label {
    color: #666;
    white-space: nowrap;
}

.filter-row input[type="text"],
.filter-row select {
    width: auto;
}

/* ---- Sort / filter type row ---- */

.controls-row {
    font-size: 12px;
    margin: 4px 0 8px 0;
    color: #444;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    align-items: baseline;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 4px;
}

.controls-row .sep {
    color: #bbb;
    margin: 0 6px;
    user-select: none;
}

.controls-row a {
    color: #444;
    text-decoration: none;
    padding: 0 2px;
}

.controls-row a:hover {
    color: #c00;
    text-decoration: underline;
}

.controls-row a.active {
    font-weight: bold;
    color: #000;
    text-decoration: underline;
}

.controls-row .label {
    color: #888;
    margin-right: 2px;
}

/* ---- Domain table columns ---- */

.domain-col {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registrant-col {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-col {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #444;
}

.code-col {
    white-space: nowrap;
    color: #444;
    font-size: 12px;
}

.date-col {
    white-space: nowrap;
    font-size: 12px;
    color: #333;
}

.tld-col {
    font-size: 12px;
    color: #444;
    white-space: nowrap;
}

.error-short {
    color: #c00;
    font-size: 11px;
    cursor: help;
}

/* ---- Crawl tag links ---- */

.tag-link {
    display: inline-block;
    font-size: 11px;
    font-family: monospace;
    padding: 1px 5px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
}

.tag-link:hover {
    color: #fff;
    border-color: #666;
}

/* ---- Numeric column ---- */

td.num-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- Pivot count links ---- */

.pivot-count {
    font-size: 11px;
    margin-left: 0.6em;
    white-space: nowrap;
}

.pivot-count a {
    color: #0057b8;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.pivot-count a:hover {
    color: #c00;
    text-decoration-style: solid;
}

/* ---- Detail page ---- */

.detail-domain {
    font-size: 18px;
    font-weight: bold;
    margin: 6px 0 4px 0;
    word-break: break-all;
}

.detail-nav {
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-nav .nav-pos {
    color: #666;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    min-width: 5em;
    text-align: center;
    display: inline-block;
}

.detail-nav button {
    height: 20px;
    line-height: 16px;
    padding: 0 6px;
}

.hr {
    border: none;
    border-top: 1px solid #000;
    margin: 6px 0;
}

.hr-light {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 6px 0;
}

/* ---- Inline thumbnails (table rows) ---- */

.thumb-col {
    width: 64px;
    min-width: 64px;
    padding-right: 6px;
}

.thumb-col img {
    width: 64px;
    height: 40px;
    object-fit: cover;
    display: block;
    border: 1px solid #ccc;
}

.thumb-col .thumb-empty {
    width: 64px;
    height: 40px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #aaa;
}

/* ---- Screenshot (detail page) ---- */

.screenshot-wrap {
    margin: 6px 0;
    max-width: 720px;
}

.screenshot-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ccc;
}

.screenshot-placeholder {
    border: 1px solid #ccc;
    padding: 2rem 1rem;
    text-align: center;
    color: #666;
    font-size: 12px;
    background: #fafafa;
    max-width: 720px;
}

/* ---- Key-value table (detail page) ---- */

.kv-table {
    border-collapse: collapse;
    margin: 6px 0;
}

.kv-table td {
    padding: 2px 16px 2px 0;
    border: none;
    vertical-align: top;
    font-size: 13px;
    border-bottom: none;
}

.kv-table td.kv-key {
    color: #666;
    white-space: nowrap;
    min-width: 90px;
    font-size: 12px;
}

.kv-table td.kv-val {
    word-break: break-word;
}

.kv-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    font-weight: bold;
    margin: 10px 0 2px 0;
}

/* ---- Pagination ---- */

.pagination {
    font-size: 12px;
    margin: 8px 0;
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.page-info {
    color: #666;
}

/* ---- Empty state ---- */

.empty-state {
    padding: 2rem 0;
    color: #666;
    font-size: 13px;
}

/* ---- TLD tag ---- */

.tld-tag {
    font-size: 11px;
    color: #666;
    border: 1px solid #aaa;
    padding: 0 3px;
    margin-left: 4px;
    vertical-align: middle;
    text-decoration: none;
}

/* ---- Pivot page heading ---- */

.pivot-heading {
    font-size: 15px;
    font-weight: bold;
    margin: 4px 0 2px 0;
}

.pivot-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.pivot-meta a {
    color: #0057b8;
}

/* Table cell pivot links (registrant, postal, address columns) */
td a.cell-pivot {
    color: #333;
    text-decoration: none;
    border-bottom: 1px dotted #999;
}

td a.cell-pivot:hover {
    color: #0057b8;
    border-bottom-color: #0057b8;
}

/* ---- Gov/Explorer gallery ---- */

.gallery-info-row {
    font-size: 12px;
    color: #666;
    margin: 2px 0 8px 0;
}

/* ---- Bulk selection bar ---- */

.bulk-bar {
    font-size: 12px;
    margin: 4px 0;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Directory pages ---- */

.dir-heading {
    font-size: 15px;
    font-weight: bold;
    margin: 4px 0 2px 0;
}

.dir-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.dir-meta a { color: #0057b8; }

.count-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #444;
    padding-right: 12px;
}

/* ---- Top addresses sub-table on detail page ---- */

.sub-section {
    margin: 4px 0 0 0;
}

.sub-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 2px;
}

.sub-table {
    border-collapse: collapse;
    margin: 0 0 0 0;
    font-size: 12px;
}

.sub-table td {
    padding: 1px 8px 1px 0;
    border: none;
    vertical-align: top;
}

.sub-table a {
    color: #0057b8;
}

.hidden {
    display: none !important;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    header { padding: 4px 8px; }
    main   { padding: 6px 8px; }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .controls-row {
        flex-direction: column;
        gap: 2px;
    }

    th, td { padding: 3px 6px 3px 0; }

    .detail-nav { flex-wrap: wrap; gap: 6px; }

    .registrant-col { max-width: 140px; }
    .domain-col     { max-width: 160px; }
}
