/* Improve: problems, ideas, wisdom and the inbox. Only what the base kit does not already give. */

/* ---- problems ---- */
.row.prob.on > .rl { background: var(--accent-soft); }
.prop.st-open select { color: var(--warn); background-color: var(--warn-soft); }
.prop.st-looking select { color: var(--accent); background-color: var(--accent-soft); }
.prop.st-solved select { color: var(--ok); background-color: var(--ok-soft); }
.pb-sol { padding: 10px 12px; border-radius: var(--r-sm); background: var(--ok-soft); } .pb-sol h3 { color: var(--ok); } .pb-sol p { margin: 0; }
.pb-cl { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pb-c { display: flex; gap: 10px; align-items: flex-start; } .pb-cb { flex: 1; min-width: 0; }
.pb-ch { display: flex; gap: 8px; align-items: baseline; font-size: .82rem; margin-bottom: 2px; } .pb-ch .muted { font-size: .76rem; }
.pb-c .prose { margin: 0; font-size: .9rem; background: var(--surface-2); padding: 8px 10px; border-radius: 4px 12px 12px 12px; }
.pb-c.me .prose { background: var(--accent-soft); }
.pb-c .more { margin-top: 4px; }
.pb-none { color: var(--muted); font-size: .86rem; }
.pb-add { display: flex; gap: 10px; align-items: flex-start; } .pb-addb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pb-how { margin-top: 18px; } .pb-how .hint { display: block; max-width: 64ch; }

/* ---- ideas ---- */
.row.idea .rc .ic { color: var(--improve); width: 18px; height: 18px; }
.rt.wrap { white-space: normal; }
.btn.improve { background: var(--improve-soft); border-color: transparent; color: var(--improve); } .btn.improve:hover { background: var(--improve); color: #fff; }

/* ---- wisdom ---- */
.wis-list { display: flex; flex-direction: column; gap: 10px; }
.wis-card { display: flex; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.wis-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.wis-ic .ic { width: 19px; height: 19px; }
.wis-card.burned .wis-ic { background: var(--danger-soft); color: var(--danger); }
.wis-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wis-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .wis-h h2 { font-size: 1.02rem; flex: 1; min-width: 0; } .wis-h .menu { margin-left: auto; }
.wis-h .menu > summary { opacity: 0; } .wis-card:hover .wis-h .menu > summary, .wis-h .menu[open] > summary { opacity: 1; }
.wis-rule { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .94rem; line-height: 1.45; white-space: pre-wrap; }
.wis-rule span { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.wis-card .more .prose { margin: 0; background: var(--surface-2); padding: 8px 12px; border-radius: var(--r-sm); font-size: .88rem; }
.wis-meta { margin-top: 2px; } .wis-tag { color: var(--accent); font-weight: 500; }
.wis-form .card-b { padding: 18px; }
.wis-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wis-k { position: relative; cursor: pointer; } .wis-k input { position: absolute; opacity: 0; inset: 0; }
.wis-kb { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--r); transition: background .12s, border-color .12s; }
.wis-kb .ic { width: 20px; height: 20px; margin-bottom: 4px; } .wis-kb b { font-size: .94rem; } .wis-kb small { color: var(--muted); }
.wis-k.burned .wis-kb .ic { color: var(--danger); } .wis-k.learned .wis-kb .ic { color: var(--ok); }
.wis-k input:checked + .wis-kb { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.wis-k input:focus-visible + .wis-kb { box-shadow: var(--ring); }

/* ---- inbox ---- */
.inbox .page-main { padding-bottom: 24px; }
.ib { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; min-height: calc(100vh - var(--top-h) - 150px); }
.ib-list { border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; padding: 8px; gap: 2px; background: var(--side); }
.ib-conv { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--text); }
.ib-conv:hover { background: var(--surface-2); } .ib-conv.on { background: var(--accent-soft); }
.ib-conv .ib-g { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font: 700 1rem var(--display); color: var(--text-2); flex: none; }
.ib-conv.all .ib-g { background: var(--accent-soft); color: var(--accent); } .ib-conv .ib-g .ic { width: 16px; height: 16px; }
.ib-ct { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; } .ib-ct b { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-ct small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-conv time { font-size: .72rem; color: var(--text-3); flex: none; }
.ib-thread { display: flex; flex-direction: column; min-width: 0; }
.ib-th { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); } .ib-th h2 { font-size: 1rem; }
.ib-msgs { list-style: none; margin: 0; padding: 16px 18px; flex: 1; overflow-y: auto; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 10px; max-height: 60vh; }
.ib-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; } .ib-msg.cont { margin-bottom: -6px; }
.ib-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.ib-av { width: 26px; flex: none; }
.ib-bb { min-width: 0; } .ib-bb p { margin: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); font-size: .92rem; white-space: pre-wrap; line-height: 1.45; }
.ib-msg.mine .ib-bb p { background: var(--accent); color: var(--accent-ink); border-radius: 14px 4px 14px 14px; }
.ib-msg.cont .ib-bb p { border-radius: 14px; }
.ib-mh { display: flex; gap: 8px; align-items: baseline; font-size: .76rem; color: var(--muted); margin: 0 4px 3px; } .ib-mh b { color: var(--text); } .ib-msg.mine .ib-mh { justify-content: flex-end; }
.ib-task { display: inline-flex; align-items: center; gap: 4px; margin: 4px 4px 0; font-size: .78rem; color: var(--accent); text-decoration: none; font-weight: 500; } .ib-task .ic { width: 12px; height: 12px; }
.ib-empty { align-self: stretch; } .ib-empty .empty { border: 0; }
.ib-compose { padding: 12px 18px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.ib-cr { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.ib-cr select { height: 38px; } .ib-cr textarea { min-height: 38px; } .ib-cr .btn { height: 38px; }
.ib-about { margin: 0; font-size: .84rem; color: var(--muted); display: flex; align-items: center; gap: 6px; } .ib-about a { color: var(--accent); text-decoration: none; font-weight: 500; }
@media (max-width: 900px) {
  .ib { grid-template-columns: 1fr; min-height: 0; }
  .ib-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; gap: 6px; }
  .ib-conv { flex: none; width: 170px; padding: 6px 8px; } .ib-conv time { display: none; }
  .ib-msgs { max-height: none; } .ib-msg { max-width: 92%; }
  .ib-cr { grid-template-columns: 1fr auto; } .ib-cr select { grid-column: 1 / -1; }
}
@media (max-width: 720px) { .wis-kind { grid-template-columns: 1fr; } .wis-card { padding: 12px; gap: 10px; } .wis-h .menu > summary { opacity: 1; } }
@media (max-width: 720px) { .row.prob .ra .btn .bt { display: inline; } }
