/* Question of the day: card on the home page, archive, suggestions, admin (src/views/daily.tsx) */
.dq {
  --dq-gold: #c9a24c;
  position: relative; border-radius: 22px; padding: 18px 18px 14px; color: var(--text);
  background: var(--card-bg, var(--surface)); border: 1px solid var(--card-border, var(--border)); box-shadow: var(--card-shadow, var(--shadow));
  overflow: hidden;
}
.dq::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), var(--dq-gold)); }
.dq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-bottom: 10px; }
.dq-title { display: flex; white-space: nowrap; align-items: center; gap: 8px; font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dq-title svg { color: var(--accent); }
.dq-kind { padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.dq-kind.know { background: var(--gold-soft); color: var(--gold); }
.dq-q { font-family: var(--font-display); font-size: 1.22rem; font-weight: 800; line-height: 1.22; letter-spacing: -.015em; margin: 0 0 14px; }
.dq-opts { display: grid; gap: 8px; }
.dq-opts.two { grid-template-columns: 1fr 1fr; }
.dq-vs { display: none; }
.dq-opt {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 12px; border-radius: 14px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--text); text-align: start;
  background: var(--surface-2); border: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 2px rgba(0,0,0,.06);
  transition: transform .15s ease, border-color .15s ease, background .15s ease; overflow: hidden;
}
.dq-opts.two .dq-opt { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 16px 8px 14px; }
.dq-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.dq-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--text); flex: none; }
.dq-opts.two .dq-ico { width: 52px; height: 52px; border-radius: 16px; }
.dq-ico svg { width: 26px; height: 26px; }
.dq-letter { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface); font-size: .78rem; font-weight: 800; color: var(--muted); flex: none; }

/* results */
.dq-res .dq-opt { cursor: default; }
.dq-res .dq-opt:hover { transform: none; border-color: transparent; }
.dq-bar { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--muted) 18%, transparent); border-radius: 14px; z-index: 0; }
.dq-opt > *:not(.dq-bar) { position: relative; z-index: 1; }
.dq-pct { white-space: nowrap; margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 800; }
.dq-opts.two .dq-pct { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.dq-opts.two .dq-bar { inset: auto 0 0 0; height: var(--h); width: auto !important; border-radius: 0; }
.dq-opt.mine { border-color: var(--accent); }
.dq-opt.mine .dq-bar { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.dq-you { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.dq-opt.right { border-color: var(--ok); }
.dq-opt.right .dq-bar { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.dq-opt.wrong { border-color: var(--loss); }
.dq-mark { font-size: .9rem; }
.dq-verdict { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .86rem; line-height: 1.45; }
.dq-verdict strong { display: block; }
.dq-verdict a { font-weight: 700; }
.dq-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.dq-yday { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--border); font-size: .8rem; color: var(--muted); line-height: 1.4; }
.dq-yday b { color: var(--text); }
.dq-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .8rem; }
.dq-foot a { color: var(--muted); font-weight: 600; }
.dq-foot a:hover { color: var(--accent); }
.dq-login { margin-top: 10px; font-size: .82rem; color: var(--muted); text-align: center; }

.dq { text-align: start; }
.dq-head { position: relative; }
.dq-kind.com { background: var(--blue-soft, var(--surface-2)); color: var(--win, var(--text)); }
.dq-hide-form { margin: 0; margin-inline-start: auto; }
.dq-head .dq-kind { margin-inline-start: auto; }
.dq-head .dq-kind + .dq-hide-form { margin-inline-start: 0; }
.dq-hide { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.dq-hide:hover { color: var(--text); background: var(--surface-3); }
.dq-by { margin: -8px 0 12px; font-size: .8rem; color: var(--muted); }
a.dq-opt { text-decoration: none; }
.dq-text { min-width: 0; overflow-wrap: anywhere; }
.dq-opts.two .dq-text { font-size: 1rem; }
.dq-opt[disabled], .dq-busy .dq-opt { opacity: .6; pointer-events: none; }
.dq-verdict { flex-direction: column; gap: 4px; }
.dq-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dq-res .dq-opt.mine:not(.right):not(.wrong) { border-color: var(--accent); }
.dq-opts.two.dq-res .dq-bar { height: var(--h, 0%); }

/* Under the search on the home page; on very wide screens in the free space right of the page,
   staying in view while scrolling (the page row is 1280px wide, so this needs about 1880px) */
.dq-slot { max-width: 760px; margin: 0 auto 22px; }
@media (min-width: 720px) {
  .dq-slot .dq { display: grid; grid-template-columns: 1fr 1.15fr; gap: 6px 22px; align-items: center; padding: 20px 22px 14px; }
  .dq-slot .dq > :not(.dq-q):not(.dq-opts):not(.dq-by) { grid-column: 1 / -1; }
  .dq-slot .dq-q { margin: 0; font-size: 1.35rem; grid-row: span 2; }
  .dq-slot .dq-by { grid-column: 1; margin: 0; }
  .dq-slot .dq-opts { grid-column: 2; grid-row: 2 / span 2; }
}
.page-row { position: relative; }
@media (min-width: 1880px) {
  .dq-slot { position: absolute; top: 28px; bottom: 56px; inset-inline-start: calc(100% - 16px); width: 290px; max-width: none; margin: 0; }
  .dq-slot .dq { position: sticky; top: 92px; display: block; padding: 18px 18px 14px; }
  .dq-slot .dq-q { font-size: 1.22rem; margin: 0 0 14px; }
  .dq-slot .dq-by { margin: -8px 0 12px; }
  /* Narrow column: title and × on the first line, the kind of question under it */
  .dq-slot .dq-hide-form { order: 2; margin-inline-start: auto; }
  .dq-slot .dq-head::after { content: ""; flex-basis: 100%; order: 3; }
  .dq-slot .dq-head .dq-kind { order: 4; margin-inline-start: 0; }
  .dq-slot .dq-title { order: 1; }
}

/* Archive */
.dq-archive { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.dq-arch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.dq-arch-q { font-size: 1.15rem; margin: 0 0 10px; }
.dq-arch-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dq-arch-opts li { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); overflow: hidden; border: 1px solid transparent; }
.dq-arch-opts li > * { position: relative; z-index: 1; }
.dq-arch-opts li .dq-bar { position: absolute; z-index: 0; }
.dq-arch-opts li.right { border-color: var(--ok); }
.dq-arch-opts li.right .dq-bar { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.dq-arch-opts li.mine { border-color: var(--accent); }
.dq-arch-meta { margin: 10px 0 0; }
.pager { margin: 16px 0; }

/* Suggest */
.dq-suggest-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dq-suggest-opt input[type="text"], .dq-suggest-opt input:not([type]) { flex: 1; min-width: 0; }
.dq-right-pick { display: flex; align-items: center; }
.dq-right-pick input { width: 20px; height: 20px; accent-color: var(--ok); }
.dq-mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dq-mine li { display: grid; gap: 4px; }
.dq-mine-q { font-weight: 600; font-size: .9rem; }

/* Admin */
.dq-adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dq-adm { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.dq-adm-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dq-adm-q { font-weight: 700; margin: 8px 0 6px; }
.dq-adm-opts { margin: 0 0 8px; padding-inline-start: 18px; }
.dq-adm-opts .right { color: var(--ok); font-weight: 700; }
.dq-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dq-next li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; }
.dq-adm-list .row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dq-next-day { font-variant-numeric: tabular-nums; min-width: 88px; }

.w-0 { width: 0%; --h: 0%; }
.w-1 { width: 1%; --h: 1%; }
.w-2 { width: 2%; --h: 2%; }
.w-3 { width: 3%; --h: 3%; }
.w-4 { width: 4%; --h: 4%; }
.w-5 { width: 5%; --h: 5%; }
.w-6 { width: 6%; --h: 6%; }
.w-7 { width: 7%; --h: 7%; }
.w-8 { width: 8%; --h: 8%; }
.w-9 { width: 9%; --h: 9%; }
.w-10 { width: 10%; --h: 10%; }
.w-11 { width: 11%; --h: 11%; }
.w-12 { width: 12%; --h: 12%; }
.w-13 { width: 13%; --h: 13%; }
.w-14 { width: 14%; --h: 14%; }
.w-15 { width: 15%; --h: 15%; }
.w-16 { width: 16%; --h: 16%; }
.w-17 { width: 17%; --h: 17%; }
.w-18 { width: 18%; --h: 18%; }
.w-19 { width: 19%; --h: 19%; }
.w-20 { width: 20%; --h: 20%; }
.w-21 { width: 21%; --h: 21%; }
.w-22 { width: 22%; --h: 22%; }
.w-23 { width: 23%; --h: 23%; }
.w-24 { width: 24%; --h: 24%; }
.w-25 { width: 25%; --h: 25%; }
.w-26 { width: 26%; --h: 26%; }
.w-27 { width: 27%; --h: 27%; }
.w-28 { width: 28%; --h: 28%; }
.w-29 { width: 29%; --h: 29%; }
.w-30 { width: 30%; --h: 30%; }
.w-31 { width: 31%; --h: 31%; }
.w-32 { width: 32%; --h: 32%; }
.w-33 { width: 33%; --h: 33%; }
.w-34 { width: 34%; --h: 34%; }
.w-35 { width: 35%; --h: 35%; }
.w-36 { width: 36%; --h: 36%; }
.w-37 { width: 37%; --h: 37%; }
.w-38 { width: 38%; --h: 38%; }
.w-39 { width: 39%; --h: 39%; }
.w-40 { width: 40%; --h: 40%; }
.w-41 { width: 41%; --h: 41%; }
.w-42 { width: 42%; --h: 42%; }
.w-43 { width: 43%; --h: 43%; }
.w-44 { width: 44%; --h: 44%; }
.w-45 { width: 45%; --h: 45%; }
.w-46 { width: 46%; --h: 46%; }
.w-47 { width: 47%; --h: 47%; }
.w-48 { width: 48%; --h: 48%; }
.w-49 { width: 49%; --h: 49%; }
.w-50 { width: 50%; --h: 50%; }
.w-51 { width: 51%; --h: 51%; }
.w-52 { width: 52%; --h: 52%; }
.w-53 { width: 53%; --h: 53%; }
.w-54 { width: 54%; --h: 54%; }
.w-55 { width: 55%; --h: 55%; }
.w-56 { width: 56%; --h: 56%; }
.w-57 { width: 57%; --h: 57%; }
.w-58 { width: 58%; --h: 58%; }
.w-59 { width: 59%; --h: 59%; }
.w-60 { width: 60%; --h: 60%; }
.w-61 { width: 61%; --h: 61%; }
.w-62 { width: 62%; --h: 62%; }
.w-63 { width: 63%; --h: 63%; }
.w-64 { width: 64%; --h: 64%; }
.w-65 { width: 65%; --h: 65%; }
.w-66 { width: 66%; --h: 66%; }
.w-67 { width: 67%; --h: 67%; }
.w-68 { width: 68%; --h: 68%; }
.w-69 { width: 69%; --h: 69%; }
.w-70 { width: 70%; --h: 70%; }
.w-71 { width: 71%; --h: 71%; }
.w-72 { width: 72%; --h: 72%; }
.w-73 { width: 73%; --h: 73%; }
.w-74 { width: 74%; --h: 74%; }
.w-75 { width: 75%; --h: 75%; }
.w-76 { width: 76%; --h: 76%; }
.w-77 { width: 77%; --h: 77%; }
.w-78 { width: 78%; --h: 78%; }
.w-79 { width: 79%; --h: 79%; }
.w-80 { width: 80%; --h: 80%; }
.w-81 { width: 81%; --h: 81%; }
.w-82 { width: 82%; --h: 82%; }
.w-83 { width: 83%; --h: 83%; }
.w-84 { width: 84%; --h: 84%; }
.w-85 { width: 85%; --h: 85%; }
.w-86 { width: 86%; --h: 86%; }
.w-87 { width: 87%; --h: 87%; }
.w-88 { width: 88%; --h: 88%; }
.w-89 { width: 89%; --h: 89%; }
.w-90 { width: 90%; --h: 90%; }
.w-91 { width: 91%; --h: 91%; }
.w-92 { width: 92%; --h: 92%; }
.w-93 { width: 93%; --h: 93%; }
.w-94 { width: 94%; --h: 94%; }
.w-95 { width: 95%; --h: 95%; }
.w-96 { width: 96%; --h: 96%; }
.w-97 { width: 97%; --h: 97%; }
.w-98 { width: 98%; --h: 98%; }
.w-99 { width: 99%; --h: 99%; }
.w-100 { width: 100%; --h: 100%; }
.dq-in { animation: dq-in .35s ease; }
@keyframes dq-in { from { opacity: .4; transform: scale(.985); } }
.dq-slot { transition: opacity .25s ease, transform .25s ease; }
.dq-slot.dq-out { opacity: 0; transform: translateY(-6px); }
@media (prefers-reduced-motion: reduce) { .dq-in { animation: none; } .dq-slot { transition: none; } }
