/* One calm surface for finding, comparing and remembering schools. */
.discovery-search-tools { display:flex; align-items:flex-start; flex-wrap:wrap; gap:12px; margin:14px 0; }
.discovery-criteria, .discovery-recents { border:1px solid var(--uw-line,#dce4ee); border-radius:18px; background:var(--uw-surface,#fff); min-width:160px; }
.discovery-criteria { flex:1; }
.discovery-open-workspace { display:flex; align-items:center; justify-content:center; gap:8px; min-height:47px; padding:0 18px; border:1px solid var(--uw-line,#dce4ee); border-radius:16px; background:var(--uw-surface,#fff); color:var(--uw-blue,#086ad8); text-decoration:none; font-size:14px; white-space:nowrap; }
.discovery-open-workspace svg { width:18px; }
.discovery-criteria>summary, .discovery-recents>summary { cursor:pointer; display:flex; align-items:center; gap:9px; padding:13px 18px; font-weight:650; list-style:none; }
.discovery-criteria summary svg { width:18px; }
.discovery-criteria-count, #discovery-criteria-count { color:var(--uw-blue,#086ad8); font-size:12px; }
#discovery-criteria-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding:4px 18px 18px; }
#discovery-criteria-form label, .discovery-saved-filters label { display:grid; gap:6px; color:var(--uw-muted,#526279); font-size:13px; }
#discovery-criteria-form input, #discovery-criteria-form select, .discovery-saved-filters select { width:100%; min-width:0; min-height:43px; border:1px solid var(--uw-line,#dce4ee); border-radius:10px; background:var(--uw-surface,#fff); color:var(--uw-text,#192740); padding:9px 11px; }
.discovery-form-actions { display:flex; align-items:end; justify-content:end; gap:8px; }
.discovery-muted { color:var(--uw-muted,#526279); font-size:13px; line-height:1.6; }
#discovery-criteria-result:empty { display:none; }
.discovery-recents { max-width:100%; }
.discovery-recent-list { display:grid; gap:4px; padding:4px 10px 12px; max-height:300px; overflow:auto; }
.discovery-recent-list button { display:flex; align-items:center; text-align:left; gap:10px; border:0; background:transparent; color:var(--uw-text,#192740); padding:10px; border-radius:10px; }
.discovery-recent-list button:hover { background:var(--uw-surface-soft,#eef5ff); }
.discovery-recent-list svg { width:18px; flex-shrink:0; color:#3485b2; }
.discovery-recent-list small { display:block; color:var(--uw-muted,#526279); margin-top:3px; }
.discovery-shelf-tabs { display:flex; align-items:center; gap:8px; margin-bottom:22px; padding-bottom:14px; border-bottom:1px solid var(--uw-line,#dce4ee); }
.discovery-shelf-tabs button, .discovery-topic-bar button { border:0; border-radius:30px; padding:10px 18px; background:var(--uw-surface,#fff); color:var(--uw-muted,#526279); font-weight:650; }
.discovery-shelf-tabs button[aria-pressed=true], .discovery-topic-bar button[aria-pressed=true] { color:#0654b0; background:#e0eeff; }
.discovery-shelf-tabs a { margin-left:auto; font-size:14px; text-decoration:none; }
.discovery-workspace-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); align-items:start; gap:24px; }
.discovery-workspace-grid[hidden], #discovery-saved-experiences[hidden] { display:none; }
.discovery-candidates { display:grid; gap:16px; min-width:0; }
.discovery-candidate { border:1px solid var(--uw-line,#dce4ee); background:var(--uw-surface,#fff); border-radius:22px; padding:20px; box-shadow:0 8px 30px #31537508; min-width:0; }
.discovery-candidate header { display:flex; align-items:center; gap:14px; }
.discovery-candidate header>.school-photo, .discovery-candidate header>img { width:64px; height:64px; flex:0 0 64px; border-radius:14px; object-fit:cover; overflow:hidden; }
.discovery-candidate header img { width:64px; height:64px; object-fit:cover; }
.discovery-candidate header>div:not(.school-photo) { flex:1; min-width:0; }
.discovery-candidate h3 { margin:3px 0; font-size:17px; line-height:1.5; }
.discovery-candidate h3 button, .discovery-experience-card h4 button { background:transparent; border:0; color:inherit; padding:0; font:inherit; text-align:left; overflow-wrap:anywhere; }
.discovery-candidate small, .discovery-experience-card small { color:var(--uw-muted,#526279); }
.discovery-candidate-facts { display:flex; flex-wrap:wrap; gap:8px 20px; margin:14px 0; color:var(--uw-muted,#526279); font-size:13px; }
.discovery-interest { display:flex; align-items:center; gap:3px; margin:10px 0; }
.discovery-interest button { font-size:25px; padding:2px 5px; min-width:34px; min-height:40px; border:0; background:transparent; color:#aeb9c7; }
.discovery-interest button[aria-pressed=true] { color:#d54973; }
.discovery-interest small { margin-left:8px; }
.discovery-note-label textarea { width:100%; box-sizing:border-box; resize:vertical; min-height:64px; padding:11px 13px; border:1px solid var(--uw-line,#dce4ee); border-radius:12px; background:var(--uw-surface-soft,#f6f8fc); color:var(--uw-text,#192740); font:inherit; font-size:14px; }
.discovery-candidate footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.discovery-candidate footer label { display:flex; gap:7px; align-items:center; font-size:14px; }
.discovery-candidate footer label { white-space:nowrap; }
.discovery-candidate footer input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; flex:none; margin:0; }
.discovery-ranking { position:sticky; top:90px; border-radius:24px; padding:22px; background:linear-gradient(145deg,#e8f4f3,#eff3fd); border:1px solid #dae7ef; color:#1b354d; }
.discovery-ranking-title { display:flex; align-items:center; justify-content:space-between; }
.discovery-ranking h3 { margin:0; font-size:20px; }
.discovery-ranking-title>span { font-size:13px; }
.discovery-ranking ol { display:grid; gap:10px; padding:0; margin:20px 0; list-style:none; }
.discovery-ranking li { display:flex; align-items:center; gap:10px; padding:12px; background:#ffffffd6; border-radius:15px; border:1px solid #fff; cursor:grab; }
.discovery-rank-number { color:#206975; font-size:23px; font-weight:750; width:22px; flex-shrink:0; }
.discovery-ranking li>div:first-of-type { flex:1; min-width:0; overflow-wrap:anywhere; }
.discovery-ranking strong { font-size:13px; display:block; }
.discovery-ranking li small { color:#546b7c; font-size:12px; display:block; }
.discovery-rank-controls { display:grid; grid-template-columns:repeat(3,28px); }
.discovery-rank-controls button { border:0; background:transparent; min-height:34px; color:#355b72; }
.discovery-rank-controls button:disabled { opacity:.3; }
#discovery-use-preferences { width:100%; margin-top:16px; }
.discovery-comparison { grid-column:1/-1; min-width:0; }
#selection-workspace[data-home-university="國立中央大學"] .discovery-ranking { position:static; }
.discovery-comparison .compare-scroll { overflow:auto; max-width:100%; }
.discovery-empty { padding:40px 24px; text-align:center; background:var(--uw-surface,#fff); border-radius:20px; color:var(--uw-muted,#526279); }
.discovery-topic-bar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.discovery-topic-bar .discovery-refresh { margin-left:auto; background:transparent; font-size:13px; }
.discovery-experience-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.discovery-experience-card { padding:22px; border:1px solid var(--uw-line,#dce4ee); border-radius:20px; background:var(--uw-surface,#fff); min-width:0; }
.discovery-experience-card h4 { margin:10px 0; font-size:17px; }
.discovery-experience-card p { line-height:1.8; color:var(--uw-muted,#526279); margin:0 0 18px; font-size:14px; }
.discovery-source-footer { display:flex; flex-wrap:wrap; align-items:center; gap:8px; justify-content:space-between; }
.discovery-tags { display:flex; flex-wrap:wrap; gap:5px; }
.discovery-tags span { padding:4px 8px; border-radius:7px; background:var(--uw-surface-soft,#eff4fa); font-size:12px; color:var(--uw-muted,#526279); }
.discovery-bookmark { display:inline-flex; align-items:center; gap:5px; padding:8px; border:0; border-radius:10px; background:transparent; color:var(--uw-muted,#526279); font-size:13px; }
.discovery-bookmark.saved { background:#e3f2ed; color:#236956; }
.discovery-bookmark svg { width:17px; height:17px; }
.discovery-saved-filters { display:flex; gap:16px; margin-bottom:22px; }
.discovery-saved-filters label { flex:1; }
.discovery-saved-group { margin:24px 0; }
.discovery-saved-group h3 { font-size:18px; }
.discovery-source-note { margin-top:24px; color:var(--uw-muted,#526279); font-size:13px; }
.discovery-source-note summary { cursor:pointer; }
#discovery-reader { width:min(800px,calc(100vw - 32px)); max-height:85dvh; padding:30px; border:1px solid var(--uw-line,#dce4ee); border-radius:24px; background:var(--uw-surface,#fff); color:var(--uw-text,#192740); box-shadow:0 24px 100px #10254340; box-sizing:border-box; }
#discovery-reader::backdrop { background:#13263f55; backdrop-filter:blur(8px); }
.discovery-reader-heading { display:flex; gap:20px; align-items:flex-start; justify-content:space-between; }
.discovery-reader-heading h2 { font-size:23px; margin:8px 0; line-height:1.4; }
.discovery-reader-heading>button { border:0; background:var(--uw-surface-soft,#eef3fa); color:inherit; border-radius:50%; width:40px; height:40px; flex-shrink:0; font-size:25px; }
.discovery-reader-meta { display:flex; align-items:center; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--uw-muted,#526279); margin:10px 0 24px; }
.discovery-reader-summary, .discovery-reader-themes p, .discovery-reader-original p { line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; }
.discovery-reader-themes section { border-top:1px solid var(--uw-line,#dce4ee); margin-top:24px; padding-top:15px; }
.discovery-reader-original { margin:24px 0; padding:16px; border-radius:14px; background:var(--uw-surface-soft,#f3f6fb); }
.discovery-preview-extras { border-top:1px solid var(--uw-line,#dce4ee); margin:14px 0; padding-top:10px; }
.discovery-preview-extras h5 { font-size:13px; margin:10px 0 5px; color:var(--uw-text,#192740); }
.discovery-preview-extras p { font-size:13px; line-height:1.65; margin:0; }
.discovery-preview-extras a, .discovery-preview-extras button { font-size:12px; }
.discovery-match { margin:8px 0; color:#65758a; font-size:12px; }
.discovery-match.match { color:#227352; }.discovery-match.mismatch { color:#ab4b26; }
.discovery-match summary { cursor:pointer; }
[data-theme="dark"] .discovery-ranking { background:linear-gradient(135deg,#173a3c,#223551); border-color:#365166; color:#edf5ff; }
[data-theme="dark"] .discovery-ranking li { background:#233e52; border-color:#3c536a; }
[data-theme="dark"] .discovery-ranking li small, [data-theme="dark"] .discovery-rank-controls button, [data-theme="dark"] .discovery-rank-number { color:#c3ddd8; }
@media (max-width:1000px) { .discovery-workspace-grid { grid-template-columns:minmax(0,1fr); }.discovery-ranking { position:static; } }
@media (max-width:700px) { #discovery-criteria-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.discovery-form-actions { grid-column:1/-1; }.discovery-experience-grid { grid-template-columns:minmax(0,1fr); }.discovery-search-tools>* { width:100%; }.discovery-shelf-tabs a { font-size:12px; }.discovery-shelf-tabs button { padding:10px 12px; }#discovery-reader { padding:20px; }.discovery-candidate { padding:16px; }.discovery-saved-filters { flex-direction:column; }.discovery-ranking { padding:18px; }.discovery-ranking li { padding:10px; } }
@media (prefers-reduced-motion:reduce) { .discovery-candidate, #discovery-reader { scroll-behavior:auto; } }

/* Chinese write-ups of student experiences */
.discovery-digest-badge { display:inline-block; padding:2px 9px; border-radius:999px; background:var(--uw-blue-soft,#e4f0ff); color:var(--uw-blue-strong,#0a4a9c); font-size:12px; font-weight:700; letter-spacing:.02em; }
.discovery-experience-card.has-digest { border-color:color-mix(in srgb,var(--uw-blue,#1d6fdc) 30%,var(--uw-line,#dce4ee)); }
.discovery-original-title { margin:2px 0 6px; font-size:12px; color:var(--uw-muted,#526279); overflow-wrap:anywhere; }
.discovery-reader-themes ul { margin:8px 0 0; padding-left:1.3em; line-height:1.85; }
.discovery-reader-themes li { margin:4px 0; overflow-wrap:anywhere; }
.discovery-reader-tips { background:var(--uw-surface-soft,#eef3fa); border-radius:16px; padding:14px 18px !important; }
.discovery-reader-tips h3 { margin-top:0; }
.discovery-other-sources { margin-top:22px; border:1px solid var(--uw-line,#dce4ee); border-radius:16px; padding:12px 16px; }
.discovery-other-sources > summary { cursor:pointer; font-weight:700; }
.discovery-other-sources > summary span, .discovery-other-sources h4 span { margin-left:6px; padding:1px 8px; border-radius:999px; background:var(--uw-surface-soft,#eef3fa); font-size:12px; font-weight:600; }
.discovery-other-sources section { margin-top:14px; }
.discovery-other-sources h4 { margin:0 0 6px; font-size:14px; }
.discovery-other-sources ul { margin:0; padding:0; list-style:none; display:grid; gap:6px; }
.discovery-other-sources li { display:flex; flex-wrap:wrap; gap:4px 12px; align-items:baseline; font-size:14px; }
.discovery-other-sources li a { overflow-wrap:anywhere; }
.discovery-other-sources small { color:var(--uw-muted,#526279); }
