/*
 * me.css — styling for the /me transparency page.
 *
 * Quiet, editorial register, consistent with the rest of the site. The page
 * reuses the static-page reading column; these rules style only the elements
 * unique to /me (the facts list, the raw localStorage reveal, the reset
 * block). Populated client-side by js/me.js.
 */

.me-lede {
    font-size: 1.05em;
    color: var(--color-ink);
}

.me-reasons {
    margin: var(--space-sm) 0 var(--space-lg);
    padding-left: 1.3em;
}

.me-reasons li {
    margin: var(--space-xs) 0;
}

/* Low-history framing */
.me-firstvisit {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--color-ink-muted);
}

/* Summary facts -------------------------------------------------- */

.me-facts {
    margin: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
}

.me-fact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-md);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
}

.me-fact dt {
    font-family: var(--font-sans);
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-ink-muted);
    margin: 0;
}

.me-fact dd {
    margin: 0;
    text-align: right;
    font-size: 0.85em;
    color: var(--color-ink);
}

.me-viewed-wrap {
    margin: var(--space-lg) 0;
}

.me-viewed-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.95em;
}

/* Column widths: give the Views and Last view columns generous fixed room
   and let the title take the rest. */
/* Title takes all remaining space; the two value columns are equal and narrow. */
.me-col-title { width: auto; }
.me-col-views,
.me-col-when { width: 4.75rem; }

.me-viewed-table th {
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-sm) var(--space-xs) 0;
    vertical-align: bottom;
}

.me-viewed-table td {
    padding: var(--space-xs) var(--space-sm) var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: baseline;
}

.me-viewed-table th:last-child,
.me-viewed-table td:last-child {
    padding-right: 0;
}

/* Views and Last view columns: right-aligned, with smaller cell type */
.me-viewed-table .me-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.me-viewed-table .me-when {
    text-align: right;
    white-space: nowrap;
}

.me-viewed-table td.me-num,
.me-viewed-table td.me-when {
    font-size: 0.85em;
}

/* Sortable header buttons — look like header labels, behave like controls */
.me-sort-btn {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1em;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-ink-muted);
    text-align: left;
    white-space: nowrap;
    transition: color 0.12s ease;
}

.me-num .me-sort-btn,
.me-col-when .me-sort-btn {
    justify-content: flex-end;
    text-align: right;
}

.me-sort-btn:hover {
    color: var(--color-primary);
}

.me-viewed-table th[aria-sort="ascending"] .me-sort-btn,
.me-viewed-table th[aria-sort="descending"] .me-sort-btn {
    color: var(--color-ink);
}

.me-sort-arrow {
    font-size: 0.9em;
}

/* Reset ---------------------------------------------------------- */

.me-reset {
    margin: var(--space-xl) 0;
}

.me-reset-button {
    font-family: var(--font-sans);
    font-size: 0.9em;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.me-reset-button:hover {
    background: var(--color-primary);
    color: var(--color-bg);
}

.me-reset-done {
    font-family: var(--font-sans);
    font-size: 0.9em;
    color: var(--color-ink-muted);
    margin-top: var(--space-sm);
}
