/* SLAA Journal Archive — Public Portal Styles */
.jrn-portal {
    --ink:     #1c1a2e;
    --paper:   #f4f2ff;
    --cream:   #ebe7ff;
    --rule:    #c4b8f0;
    --violet:  #6d46d4;
    --violet-lt: #9b7fe8;
    --muted:   #5c5480;
    --hit:     #e8f4ff;
    --hit-bdr: #6099d4;
    --card-bg: #faf9ff;
    --shadow:  rgba(60,40,120,0.10);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
}

/* Loading */
.jrn-portal-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px; gap: 16px;
}
.jrn-loading-logo { font-size: 1.8rem; font-weight: 700; color: var(--ink); }
.jrn-loading-logo span { color: var(--violet-lt); }
.jrn-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--rule);
    border-top-color: var(--violet);
    border-radius: 50%;
    animation: jrn-spin 0.8s linear infinite;
}
.jrn-loading-msg { font-size: 0.85rem; color: var(--muted); }
@keyframes jrn-spin { to { transform: rotate(360deg); } }
.jrn-load-error { text-align: center; color: #8b1a1a; font-size: 0.9rem; line-height: 1.6; }

/* Top bar */
.jrn-portal-bar {
    background: var(--ink); border-radius: 8px 8px 0 0;
    padding: 14px 20px; display: flex; align-items: center; gap: 16px;
}
.jrn-bar-brand { flex-shrink: 0; }
.jrn-bar-title { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1; }
.jrn-bar-title span { color: var(--violet-lt); }
.jrn-bar-sub { font-size: 0.62rem; color: #a098c8; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.jrn-search-wrap { flex: 1; position: relative; }
.jrn-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #888; pointer-events: none; }
.jrn-search-input {
    width: 100%; padding: 9px 14px 9px 36px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px; color: #fff; font-size: 0.9rem; outline: none;
    transition: border-color 0.15s;
}
.jrn-search-input::placeholder { color: rgba(255,255,255,0.4); }
.jrn-search-input:focus { border-color: var(--violet-lt); }
.jrn-count { font-size: 0.75rem; color: #a098c8; font-family: monospace; white-space: nowrap; flex-shrink: 0; }

/* Layout */
.jrn-portal-layout {
    display: grid; grid-template-columns: 200px 1fr;
    background: #fff; border: 1px solid var(--rule);
    border-top: none; border-radius: 0 0 8px 8px; min-height: 400px;
}

/* Sidebar */
.jrn-sidebar {
    border-right: 1px solid var(--rule); padding: 20px 16px;
    background: var(--cream); border-radius: 0 0 0 8px;
}
.jrn-filter-group { margin-bottom: 20px; }
.jrn-filter-label {
    display: block; font-size: 0.65rem; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
.jrn-select {
    width: 100%; padding: 6px 8px; border: 1px solid var(--rule);
    border-radius: 4px; background: #fff; font-size: 0.82rem; color: var(--ink);
    cursor: pointer; outline: none;
}
.jrn-select:focus { border-color: var(--violet); }
.jrn-clear-btn {
    width: 100%; padding: 7px; background: none; border: 1px solid var(--rule);
    border-radius: 4px; font-size: 0.8rem; color: var(--muted);
    cursor: pointer; transition: all 0.15s; margin-top: 8px;
}
.jrn-clear-btn:hover { border-color: #8b1a1a; color: #8b1a1a; background: #fff; }

/* Main */
.jrn-main { padding: 20px 22px; }
.jrn-sort-bar {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.jrn-sort-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.jrn-sort-btn {
    background: none; border: 1px solid var(--rule); border-radius: 4px;
    padding: 3px 10px; font-size: 0.78rem; color: var(--ink); cursor: pointer; transition: all 0.15s;
}
.jrn-sort-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.jrn-sort-btn:hover:not(.active) { border-color: var(--violet); }

/* Cards */
.jrn-card {
    background: var(--card-bg); border: 1px solid var(--rule);
    border-radius: 7px; padding: 16px 18px; margin-bottom: 10px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.jrn-card:hover { box-shadow: 0 3px 12px var(--shadow); border-color: var(--violet); }
.jrn-card.jrn-card-open { border-color: var(--violet); box-shadow: 0 4px 18px var(--shadow); }
.jrn-card-head { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }

/* Issue badge */
.jrn-issue-badge {
    flex-shrink: 0; background: var(--ink); color: #fff;
    border-radius: 6px; padding: 8px 12px; text-align: center; min-width: 72px;
    border-bottom: 3px solid var(--violet);
}
.jrn-badge-label { font-size: 0.5rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet-lt); margin-bottom: 4px; }
.jrn-badge-vol { font-size: 0.85rem; font-weight: 700; line-height: 1.2; }
.jrn-badge-iss { font-size: 0.75rem; color: var(--rule); margin-top: 2px; }

.jrn-card-meta { flex: 1; min-width: 0; }
.jrn-card-title { font-size: 0.975rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.jrn-card-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.jrn-meta-info { font-size: 0.78rem; color: var(--muted); }
.jrn-words { font-size: 0.7rem; color: var(--muted); font-family: monospace; white-space: nowrap; margin-left: auto; }
.jrn-btns { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.jrn-dl {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; background: var(--ink); color: #fff;
    border: none; border-radius: 4px; font-size: 0.75rem; font-weight: 500;
    cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s;
}
.jrn-dl:hover { background: var(--violet); color: #fff; }
.jrn-expand {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 4px 10px; background: none; color: var(--muted);
    border: 1px solid var(--rule); border-radius: 4px; font-size: 0.75rem;
    cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.jrn-expand:hover { border-color: var(--violet); color: var(--ink); }
.jrn-excerpt {
    font-size: 0.82rem; color: var(--muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.jrn-excerpt mark, .jrn-full-text mark {
    background: var(--hit); border-bottom: 1px solid var(--hit-bdr);
    border-radius: 2px; padding: 0 1px; color: var(--ink);
}
.jrn-card-body { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule); }
.jrn-full-text {
    font-size: 0.85rem; line-height: 1.7; color: var(--ink);
    white-space: pre-wrap; max-height: 500px; overflow-y: auto;
    padding: 10px 14px; background: var(--paper);
    border: 1px solid var(--rule); border-radius: 5px;
}
.jrn-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.jrn-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }

@media (max-width: 680px) {
    .jrn-portal-layout { grid-template-columns: 1fr; }
    .jrn-sidebar { border-right: none; border-bottom: 1px solid var(--rule); border-radius: 0; }
    .jrn-portal-bar { flex-wrap: wrap; }
    .jrn-bar-brand { display: none; }
}
