/* Adapted from exported Results-A.css; selectors scoped, mock data excluded. */

    .discovery { --paper:#FBF8F1; --panel:#F2ECDE; --ink:#201B14; --text:#37312A; --muted:#645D4F; --line:#E7DFCE;
          --navy:#182B45; --navy2:#22374f; --navline:#33496a; --navmut:#AEB7C4; --cream:#F1EADB;
          --accent:#22415C; --accentH:#16324A; --gold:#A8781A; --goldB:#E0AC43; --hi:#FAF6EC;
          --catgold:#8A6A1E; --topmatch:#EBDCB8; }
    .discovery, .discovery * { box-sizing:border-box; }
    .discovery { font-family:'Public Sans',system-ui,sans-serif; color:var(--text); background:var(--paper); }
    .discovery a { color:var(--accent); text-decoration:none; }
    .discovery a:hover { color:var(--accentH); }
    .discovery .brand { display:flex; align-items:center; gap:12px; text-decoration:none; }
    .discovery .wm { font-family:'Source Serif 4',Georgia,serif; font-weight:600; font-size:27px; color:var(--ink); line-height:1; }
    .discovery .nav a { color:var(--muted); font-size:15px; font-weight:500; }
    .discovery .nav a.on { color:var(--ink); font-weight:600; }
    .discovery .nav .go { color:var(--accent); font-weight:600; }
    .discovery .hsearch { width:340px; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #d9cfb8; border-radius:12px; padding:7px 8px 7px 14px; }
    .discovery .hsearch .q { flex:1; font-size:15px; color:var(--ink); font-weight:500; }
    .discovery .hsearch .clr { font:inherit; font-size:15px; color:#8d8471; background:transparent; border:0; cursor:pointer; padding:0 2px; }
    .discovery .hsearch .clr:hover { color:var(--ink); }
    .discovery .hsearch:focus-within { border-color:var(--goldB); box-shadow:0 0 0 3px rgba(224,172,67,.3); }
    .discovery .hmic { width:34px; height:34px; border-radius:50%; border:0; background:transparent; padding:0; cursor:pointer; display:flex; align-items:center; justify-content:center; }
    .discovery .hmic:hover { transform:translateY(-1px); }

    /* full-height navy rail */
    .discovery .rail { background:var(--navy); padding:30px 26px; color:var(--cream); }
    .discovery .rail .rh { display:flex; align-items:center; justify-content:space-between; }
    .discovery .rail .rt { font-size:12px; letter-spacing:.14em; text-transform:uppercase; font-weight:700; color:#fff; }
    .discovery .rail .clear { font-size:12px; font-weight:600; color:var(--goldB); }
    .discovery .qline { margin-top:16px; padding-bottom:16px; border-bottom:1px solid var(--navline); }
    .discovery .ql-lab { font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--navmut); }
    .discovery .ql-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-top:6px; }
    .discovery .ql-term { font-family:'Source Serif 4',Georgia,serif; font-size:24px; font-weight:600; color:#fff; line-height:1.1; }
    .discovery .ql-clear { font:inherit; font-size:12px; font-weight:600; color:var(--goldB); background:transparent; border:0; padding:0; cursor:pointer; text-decoration:underline; text-underline-offset:3px; flex:none; }
    .discovery .ql-clear:hover { color:#f2ce8c; }
    .discovery .fsec { margin-top:16px; }
    .discovery .fsec h4 { font-size:11.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--navmut); font-weight:700; margin:0 0 10px; }
    .discovery .fnone { font-size:12.5px; color:#7686a0; line-height:1.5; }
    .discovery .qpills { display:flex; flex-wrap:wrap; gap:8px; }
    .discovery .rsec.adv { border-top:1px solid var(--navline); margin-top:6px; padding-top:6px; }
    .discovery .advhead { display:flex; align-items:center; justify-content:space-between; width:100%; font:inherit; font-size:11.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--navmut); background:transparent; border:0; padding:8px 0; cursor:pointer; }
    .discovery .advhead:hover { color:var(--cream); }
    .discovery .advchev { color:var(--navmut); }
    .discovery .advlabel { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--navmut); margin:4px 0 8px; }
    .discovery .rail .qpill { display:inline-flex; align-items:center; gap:9px; font-size:14px; font-weight:600; color:var(--navy); background:var(--goldB); border-radius:20px; padding:6px 9px 6px 14px; }
    .discovery .rail .qpill.land { animation:pilldrop .34s cubic-bezier(.2,1.5,.5,1) both; }
    .discovery .rail .qpill button.x { font:inherit; font-size:11px; line-height:1; border:0; cursor:pointer; color:var(--navy); }
    @keyframes pilldrop { from { transform:scale(.6); opacity:0; } to { transform:scale(1); opacity:1; } }
    .discovery .rail .qpill .x { width:18px; height:18px; border-radius:50%; background:rgba(24,43,69,.22); display:flex; align-items:center; justify-content:center; font-size:11px; }
    .discovery .rail .scope { font-size:12px; color:var(--navmut); margin-top:10px; line-height:1.5; }
    .discovery .seg { display:flex; background:var(--navy2); border:1px solid var(--navline); border-radius:9px; padding:3px; margin-top:12px; }
    .discovery .seg button { flex:1; font:inherit; font-size:12px; font-weight:600; border:0; background:transparent; color:var(--navmut); border-radius:6px; padding:6px 4px; cursor:pointer; }
    .discovery .seg button.on { background:var(--cream); color:var(--navy); }
    .discovery .rsec { border-top:1px solid var(--navline); margin-top:18px; padding-top:16px; }
    .discovery .rsec h4 { font-size:11.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--navmut); font-weight:700; margin:0 0 10px; }
    .discovery .rail label { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--cream); padding:5px 0; cursor:pointer; }
    .discovery .rail input[type=checkbox] { width:15px; height:15px; accent-color:var(--goldB); flex:none; }
    .discovery .rail .opt { display:flex; align-items:center; justify-content:space-between; }
    .discovery .toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13.5px; color:var(--cream); padding:2px 0; }
    .discovery .toggle .tsub { font-size:11.5px; color:var(--navmut); margin-top:3px; }
    .discovery .sw { width:36px; height:21px; border-radius:11px; background:var(--navline); position:relative; flex:none; cursor:pointer; }
    .discovery .sw.on { background:var(--goldB); }
    .discovery .sw i { position:absolute; top:2px; left:2px; width:17px; height:17px; border-radius:50%; background:#fff; transition:left .15s; }
    .discovery .sw.on i { left:17px; }
    .discovery .sw:hover { box-shadow:0 0 0 3px rgba(255,255,255,.09); }
    .discovery .sw.on:hover { background:#ecbb54; }
    .discovery .seg button:not(.on):hover { color:#fff; }
    .discovery .rail label:hover { background:rgba(255,255,255,.06); border-radius:8px; margin:0 -10px; padding:5px 10px; }
    .discovery .railbrowse { border-top:1px solid var(--navline); margin-top:20px; padding-top:16px; }
    .discovery .railbrowse a { display:flex; align-items:center; justify-content:space-between; font-size:14px; font-weight:600; color:var(--goldB); }
    .discovery .rnote { font-size:11px; color:#7686a0; line-height:1.5; margin-top:16px; }

    /* results column */
    .discovery .results { padding:32px 56px 40px 44px; }
    .discovery .eyebrow { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); font-weight:700; }
    .discovery .h1 { font-family:'Source Serif 4',Georgia,serif; font-weight:600; font-size:42px; color:var(--ink); margin:6px 0 0; letter-spacing:-.01em; }
    .discovery .h1 .qmark { color:var(--gold); }
    .discovery .h1clear { vertical-align:middle; margin-left:14px; width:34px; height:34px; border-radius:50%; border:0; background:var(--panel); color:var(--muted); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
    .discovery .h1clear:hover { background:var(--goldB); color:var(--navy); }
    .discovery .h1clear:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
    .discovery .countline { font-size:15px; color:var(--muted); margin:10px 0 0; }
    .discovery .countline b { color:var(--text); }
    .discovery .sortrow { display:flex; align-items:center; gap:9px; }
    .discovery .pill { font:inherit; font-size:13px; font-weight:600; color:var(--text); background:#fff; border:1px solid var(--line); border-radius:20px; padding:7px 14px; cursor:pointer; }
    .discovery .pill.on { background:var(--goldB); color:var(--navy); border-color:var(--goldB); }

    .discovery .refine { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-top:20px; padding:2px 0; }
    .discovery .refine .rl { font-size:12.5px; color:#6b5f3f; font-weight:700; }
    .discovery .refine .rl b { color:#7A5A16; }
    .discovery .rchip { font:inherit; border:0; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--accent); background:#fff; border-radius:20px; padding:6px 12px; box-shadow:0 1px 2px rgba(138,106,30,.18); transition:transform .12s ease, box-shadow .12s ease; }
    .discovery .rchip .plus { color:var(--navy); font-weight:700; }
    .discovery .rchip:hover { background:#FCF5E4; box-shadow:0 3px 8px rgba(138,106,30,.24); transform:translateY(-1px); }
    .discovery .rchip:hover .plus { color:var(--gold); }
    .discovery .rchip:active { transform:translateY(0) scale(.97); }
    .discovery .rchip:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
    .discovery .rchip.taking { background:var(--gold); color:#fff; box-shadow:none; transform:scale(.94); }
    .discovery .rchip.taking .plus { color:#fff; }

    /* the chip that flies to Refine */
    .discovery .flier { position:absolute; z-index:5; display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:#fff; background:var(--gold); border-radius:20px; padding:6px 12px; white-space:nowrap; pointer-events:none;
      animation:flyto .52s cubic-bezier(.55,-0.1,.3,1) forwards; }
    @keyframes flyto {
      0% { transform:translate(-50%,-50%) scale(1); opacity:1; }
      70% { opacity:1; }
      100% { transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.82); opacity:.25; background:var(--goldB); color:var(--navy); }
    }
    @media (prefers-reduced-motion: reduce) {
      .discovery .flier { display:none; }
      .discovery .rail .qpill.land { animation:none; }
      .discovery .rchip:hover { transform:none; }
    }

    /* result rows */
    .discovery .row { display:grid; grid-template-columns:176px 1fr; gap:18px; padding:16px; border-radius:14px; }
    .discovery .row + .row { border-top:1px solid var(--line); }
    .discovery .row:hover { background:var(--hi); }
    .discovery .poster { position:relative; width:176px; height:104px; border-radius:12px; overflow:hidden; display:block; background:#e7dec9; cursor:pointer; }
    .discovery .poster img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s ease; }
    .discovery .poster .scrim { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,0) 55%,rgba(0,0,0,.35)); transition:background .2s ease; }
    .discovery .poster .dur { position:absolute; right:8px; bottom:8px; font-size:11.5px; font-weight:600; color:#fff; background:rgba(24,43,69,.9); padding:2px 7px; border-radius:6px; transition:opacity .15s ease; }
    .discovery .poster .pplay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
    .discovery .poster .pplay span { width:44px; height:44px; border-radius:50%; background:rgba(24,43,69,.62); display:flex; align-items:center; justify-content:center; transition:transform .18s ease, background .18s ease, box-shadow .18s ease; }
    /* hover anywhere on the row says: this plays */
    .discovery .poster .from { position:absolute; left:8px; bottom:8px; right:8px; font-size:11.5px; font-weight:700; letter-spacing:.03em; color:var(--navy); background:var(--goldB); padding:3px 8px; border-radius:7px; text-align:center; opacity:0; transform:translateY(4px); transition:opacity .18s ease, transform .18s ease; }
    .discovery .row:hover .poster .pplay span, .discovery .poster:focus-visible .pplay span { transform:scale(1.16); background:var(--navy); box-shadow:0 0 0 3px rgba(224,172,67,.85); }
    .discovery .row:hover .poster img { transform:scale(1.05); }
    .discovery .row:hover .poster .scrim { background:linear-gradient(180deg,rgba(0,0,0,.06) 40%,rgba(0,0,0,.5)); }
    .discovery .row:hover .poster .dur { opacity:0; }
    .discovery .row:hover .poster .from, .discovery .poster:focus-visible .from { opacity:1; transform:translateY(0); }
    .discovery .poster:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
    @media (prefers-reduced-motion: reduce) {
      .discovery .poster img, .discovery .poster .pplay span, .discovery .poster .from { transition:none; }
      .discovery .row:hover .poster img { transform:none; }
      .discovery .row:hover .poster .pplay span { transform:none; }
    }
    .discovery .poster.miss { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; background:repeating-linear-gradient(135deg,#efe7d4,#efe7d4 9px,#eae0c9 9px,#eae0c9 18px); border:1px solid var(--line); }
    .discovery .poster.miss .mt { font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#a99a78; }
    .discovery .poster.miss .ms { font-size:12px; font-weight:600; color:var(--accent); transition:color .15s ease; }
    .discovery .row:hover .poster.miss { border-color:var(--goldB); background:repeating-linear-gradient(135deg,#f4eddc,#f4eddc 9px,#efe5cf 9px,#efe5cf 18px); }
    .discovery .row:hover .poster.miss .ms { color:var(--navy); text-decoration:underline; }

    .discovery .ql { font-family:'Source Serif 4',Georgia,serif; font-weight:600; font-size:21px; line-height:1.26; color:var(--ink); margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    .discovery .ql mark { background:transparent; color:var(--gold); font-weight:700; }
    .discovery .cat.match mark { background:transparent; color:inherit; font-weight:800; text-decoration:underline; text-underline-offset:2px; }
    .discovery .ex { font-family:'Source Serif 4',Georgia,serif; font-size:15px; line-height:1.5; color:#4a463f; margin:7px 0 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .discovery .ex mark { background:transparent; color:var(--gold); font-weight:700; }
    .discovery .meta { display:flex; align-items:center; gap:9px; margin:7px 0 0; font-size:12.5px; color:var(--muted); }
    .discovery .tags { display:flex; align-items:center; gap:9px; flex-wrap:nowrap; overflow:hidden; margin-top:10px; }
    .discovery .cat { display:inline-flex; align-items:center; font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:#8a7a52; background:#F1E9D5; border-radius:6px; padding:4px 10px; }
    .discovery .cat:hover { background:#EADFC4; color:#6f6039; }
    .discovery .cat.match { background:var(--goldB); color:var(--navy); font-weight:800; }
    .discovery .cat.match:hover { background:#ecbb54; color:var(--navy); }
    .discovery .top { display:inline-flex; align-items:center; font-size:12.5px; font-weight:600; border-radius:20px; padding:4px 12px; background:#F6EFDD; color:#9c8c68; }
    .discovery .top:hover { background:#EFE4C9; color:#7d6d48; }
    .discovery .top.match { background:#FCF5E4; color:#5a4526; font-weight:700; box-shadow:inset 0 0 0 1.5px var(--goldB); }
    .discovery .top.match:hover { background:var(--goldB); color:var(--navy); box-shadow:inset 0 0 0 1.5px var(--goldB); }
    .discovery .ment { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; color:#a08e6a; }
    .discovery .ment .ml { font-size:9.5px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:#b6a377; border:1px solid #e6d9bd; border-radius:4px; padding:1px 4px; }
    /* a passing mention that is what the search matched: gold, but dashed — it is not what the answer is about */
    .discovery .ment.match { color:#5a4526; font-weight:700; background:#FCF5E4; border:1.5px dashed var(--goldB); border-radius:20px; padding:2px 11px; }
    .discovery .ment.match .ml { color:#9a7a2c; border-color:var(--goldB); background:#fff; }
    .discovery .ment.match:hover { background:#F7EBD2; }

    /* browse-all-topics (cleared-state entry) */
    .discovery .browse { margin-top:34px; border-top:1px solid var(--line); padding-top:24px; }
    .discovery .browse .bh { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px; }
    .discovery .browse .bt { font-family:'Source Serif 4',Georgia,serif; font-size:20px; font-weight:600; color:var(--ink); }
    .discovery .browse .bs { font-size:12.5px; color:var(--muted); }
    .discovery .catgrid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
    .discovery .catcard { display:flex; align-items:baseline; justify-content:space-between; gap:10px; background:var(--panel); border-radius:11px; padding:12px 15px; }
    .discovery .catcard:hover { background:#eadfc6; }
    .discovery .catcard .cn { font-size:14.5px; font-weight:600; color:var(--ink); }
    .discovery .catcard .cc { font-size:13px; color:var(--muted); font-weight:600; flex:none; }
    .discovery .wall { background:var(--cream); border-radius:16px; padding:30px 34px; margin-top:14px; }
    .discovery .wall h2 { font-family:'Source Serif 4',Georgia,serif; font-size:27px; font-weight:600; color:var(--ink); margin:0; letter-spacing:-.01em; }
    .discovery .wall p { font-size:15px; line-height:1.6; color:#4a463f; margin:10px 0 0; max-width:620px; }
    .discovery .wall p b { color:var(--ink); font-weight:600; }
    .discovery .wallacts { display:flex; align-items:center; gap:12px; margin-top:20px; flex-wrap:wrap; }
    .discovery .wall .btn { display:inline-flex; align-items:center; gap:9px; font:inherit; font-size:14.5px; font-weight:700; color:var(--navy); background:var(--goldB); border:0; border-radius:12px; padding:12px 18px; cursor:pointer; }
    .discovery .wall .btn:hover { background:#ecbb54; }
    .discovery .wall .btn.alt { background:#fff; color:var(--accent); box-shadow:inset 0 0 0 1.5px var(--line); }
    .discovery .wall .btn.alt:hover { background:var(--panel); color:var(--accentH); }
    .discovery .wall .btn:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
    .discovery .wallkeep { font-size:12.5px; color:var(--muted); margin-top:14px; }
    .discovery .foot { font-size:11.5px; color:#9a948a; line-height:1.6; margin:24px 0 0; border-top:1px solid var(--line); padding-top:14px; }
