/*
 * Only the chaejomgi visual theme: system fonts, white surfaces, black
 * controls and borders. Layout, spacing, sizing and breakpoints remain
 * untouched in the original styles.css.
 */
:root {
  color-scheme:light;
  --ink:#000;--muted:#555;--line:#dedede;--blue:#000;
  --blue-deep:#222;--blue-light:#f2f2f2;--surface:#fff;
  --wash:#fff;--shadow:none;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
}
body {color:#000;background:#fff}
a {color:inherit}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible {outline-color:#000}
.topbar,.footer {background:#fff;border-color:#d9d9d9}
.brand-name small,.top-pill {color:#555}
.top-pill {background:#fff;border:1px solid #ddd}
.button-outline,.small-link {background:#fff;color:#000;border-color:#000}
.button-outline:hover,.small-link:hover {background:#f0f0f0;color:#000}
.button-primary,.small-link.primary {background:#000;color:#fff;border-color:#000}
.button-primary:hover,.small-link.primary:hover {background:#222;color:#fff}
.button,.filter-panel,.result-card,.sidebar-note,.segmented,.segment,.choice,
.filter-group select,.sort-control select,.searchbar,.demo-banner,.tag,
.small-link,.empty-state,.empty-icon,.test-warning,.frame-toolbar,
.iframe-wrap,dialog,.close-button {border-radius:0;box-shadow:none}
.content-subtitle,.filter-help,.card-summary,.posted,
.card-source,.bottom-note,.footer,.dialog-description,.tiny-note {color:#555}
.section-kicker,.content-top .section-kicker,
.official-link,.text-button {color:#000}
.demo-dot,.source-dot {background:#000}
.filter-panel {border-color:#000;background:#fff}
.filter-label {color:#000}
.filter-group select,.sort-control select {background-color:#fff;border-color:#000;color:#000}
.segmented {background:#fff;border:1px solid #000}
.segment {color:#000;background:#fff}
.segment.is-active {background:#000;color:#fff;box-shadow:none}
.choice {border-color:#000;background:#fff;color:#000}
.choice.is-active {background:#000;border-color:#000;color:#fff}
.sidebar-note {background:#fff;border-color:#ddd}
.note-symbol {background:#fff;border:1px solid #000;color:#000}
.searchbar {background:#fff;border-color:#000;box-shadow:none}
.searchbar:focus-within {border-color:#000;box-shadow:0 0 0 1px #000}
.searchbar input {color:#000}
.demo-banner {background:#fff;border-color:#ddd;color:#555}
.demo-banner strong {color:#000}
.results-count strong,.content-top h1,.card-title,.filter-heading h2 {color:#000}
.result-card {background:#fff;border-color:#ddd}
.result-card:hover {border-color:#000;box-shadow:none}
.tag,.tag.neutral,.tag.amber,.tag.green {color:#333;background:#fff;border:1px solid #ddd}
.small-link.disabled {color:#777}
.empty-state {background:#fff;border-color:#ddd}
.empty-icon {color:#000;background:#fff}
.bottom-note a {color:#000}
dialog {background:#fff;border-color:#000;box-shadow:0 10px 32px rgba(0,0,0,.15)}
dialog::backdrop {background:rgba(0,0,0,.35);backdrop-filter:none}
.close-button {background:#fff;color:#000;border:1px solid #000}
.test-warning {background:#fff;color:#555;border-color:#ddd}
.frame-toolbar {background:#f5f5f5;color:#000;border-color:#000}
.iframe-wrap {background:#fff;border-color:#000}


/* Result cards show only metadata badges, title, and actions. */
.result-card .card-bottom { justify-content:flex-end; }

/* Paging control should disappear completely when all matches are visible. */
.more-results { display:flex;justify-content:center;margin:18px 0; }
.more-results button[hidden] { display:none!important; }

/* Related answers: native accessible modal, preserving archive page state. */
.answer-dialog { width:min(760px,calc(100% - 28px));max-height:min(85vh,900px);padding:0;
  margin:auto;border:1px solid #222;border-radius:12px;background:#fff;color:#111;
  box-shadow:0 16px 52px rgba(0,0,0,.18); }
.answer-dialog::backdrop {background:rgba(0,0,0,.52);backdrop-filter:none}
.answer-dialog-head {display:flex;justify-content:space-between;align-items:flex-start;gap:14px;
  padding:22px 23px 17px;border-bottom:1px solid #ddd}
.answer-dialog-kicker {color:#555;font-size:12px;font-weight:650;margin:0 0 8px}
.answer-dialog-head h2 {font-size:19px;font-weight:750;line-height:1.45;margin:0}
.answer-dialog-count {font-size:12px;color:#666;margin:7px 0 0}
.answer-dialog-close {flex:0 0 auto;width:36px;height:36px;border:1px solid #bbb;background:#fff;
  color:#222;font-size:24px;border-radius:8px;cursor:pointer}
.answer-dialog-close:hover {background:#f4f4f4}
.answer-dialog-list {display:grid;gap:12px;padding:16px 20px 24px;max-height:calc(85vh - 140px);overflow-y:auto}
.answer-dialog-list .result-card {padding:15px}
.answer-dialog-list .card-title {font-size:15px}
.answer-dialog-list .card-bottom {margin-top:13px;padding-top:12px}
.answer-dialog .card-actions {flex-wrap:wrap}
.answer-dialog .small-link {overflow-wrap:anywhere;max-width:100%}
@media(max-width:710px) {
 .answer-dialog-head {padding:17px}
 .answer-dialog-list {padding:12px}
 .answer-dialog-head h2 {font-size:16px}
 .answer-dialog-list .result-card {padding:13px}
}

/* First official download login reminder; matches the existing monochrome theme. */
.download-login-dialog {width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:23px;border:1px solid #222;border-radius:12px;background:#fff;color:#111;box-shadow:0 16px 52px rgba(0,0,0,.18)}
.download-login-dialog::backdrop {background:rgba(0,0,0,.52);backdrop-filter:none}
.download-login-head {display:flex;align-items:center;justify-content:space-between;gap:16px}
.download-login-head h2 {margin:0;font-size:19px;font-weight:750;letter-spacing:-.4px}
.download-login-dialog p {margin:19px 0 23px;font-size:15px;line-height:1.8;word-break:keep-all;color:#333}
.download-login-actions {display:flex;gap:10px;flex-wrap:wrap}
.download-login-actions .button {flex:1;min-height:48px;padding:11px 13px;white-space:normal;text-align:center;font-size:13px}
@media(max-width:440px){.download-login-dialog{padding:19px}.download-login-actions{flex-direction:column}.download-login-actions .button{width:100%}}

/* Let file actions wrap instead of spilling out of narrow result cards. */
.result-card .card-actions {flex-wrap:wrap;justify-content:flex-end;max-width:100%}
.result-card .small-link {max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:keep-all;text-align:center;min-height:36px}
.initial-loading {padding:20px;border:1px solid #ddd;color:#555;font-size:13px;line-height:1.6}
@media(max-width:390px){
 .result-card .card-actions {justify-content:stretch}
 .result-card .small-link {flex:1 1 auto}
}
