/* Reservado do Pamoody — o mesmo papel e tinta do portal, sem enfeites: é uma ferramenta de trabalho. */
:root { --paper: #f6f5f1; --sheet: #fff; --ink: #121214; --muted: #5f5d58; --line: #d9d6cf; --yolk: #ffd31a; --red: #c8341f;
  --new: #ffd31a; --doing: #4c8bf5; --answered: #2e9d5b; --archived: #a3a09a; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --paper: #131315; --sheet: #1c1c1f; --ink: #f1efe9; --muted: #a3a09a; --line: #34343a; --red: #ff6b55; color-scheme: dark; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--ink); background: var(--sheet); padding: 7px 12px; border-radius: 3px; }
button:hover { background: var(--yolk); color: #121214; }
button.ghost { border-color: transparent; background: none; }
input, select, textarea { background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; padding: 7px 9px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.brand { margin: 0; font-weight: 900; letter-spacing: .04em; }
.brand span { font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 4px; }

.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login form { width: min(340px, 100%); display: grid; gap: 14px; background: var(--sheet); border: 1px solid var(--ink); padding: 24px; }
.login label { display: grid; gap: 6px; font-weight: 600; }
.login button[type=submit] { background: var(--yolk); color: #121214; font-weight: 700; }
.note { margin: 0; color: var(--red); }

.app { height: 100%; display: grid; grid-template-rows: auto auto 1fr; }
.top { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-bottom: 1px solid var(--ink); }
.top .kinds { flex: 1; }
.stamp { color: var(--muted); font-size: 13px; white-space: nowrap; }
.kinds, .states { display: flex; gap: 4px; flex-wrap: wrap; }
.kinds button, .states button { border-color: var(--line); }
.kinds button[aria-pressed=true], .states button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.kinds b, .states b { font-weight: 400; opacity: .7; margin-left: 4px; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.bar input[type=search] { flex: 1; min-width: 180px; }

.split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; min-height: 0; }
.list { list-style: none; margin: 0; padding: 0; overflow: auto; border-right: 1px solid var(--line); }
.list li { padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 2px; border-left: 4px solid transparent; }
.list li:hover { background: var(--sheet); }
.list li[aria-current=true] { background: var(--sheet); border-left-color: var(--ink); }
.list .row1 { display: flex; gap: 8px; align-items: baseline; }
.list .who { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.is-new .who::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--new); border: 1px solid var(--ink); margin-right: 6px; }
.list time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.list .snip { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .empty { cursor: default; color: var(--muted); }
.kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { font-size: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; }

.detail { overflow: auto; padding: 20px 24px 40px; }
.detail .placeholder { color: var(--muted); }
.detail h1 { font-size: 22px; margin: 4px 0 2px; }
.detail .sub { color: var(--muted); margin: 0 0 16px; }
.detail .sub a { color: inherit; }
.detail .body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sheet); border: 1px solid var(--line); padding: 14px 16px; margin: 0 0 16px; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 18px; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.detail h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; }
.status { display: flex; gap: 4px; flex-wrap: wrap; }
.status button { display: inline-flex; align-items: center; gap: 6px; border-color: var(--line); }
.status button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.status button[aria-pressed=true] { border-color: var(--ink); font-weight: 700; }
.detail textarea { width: 100%; min-height: 110px; resize: vertical; }
.detail .tags-in { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.actions .reply { background: var(--yolk); color: #121214; font-weight: 700; }
.actions .del { border-color: var(--red); color: var(--red); margin-left: auto; }
.actions .del:hover { background: var(--red); color: #fff; }
.saved { color: var(--muted); font-size: 13px; margin-left: 8px; }
.back { display: none; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 8px; }
  .top .kinds { order: 3; flex-basis: 100%; }
  .app.reading .list, .app:not(.reading) .detail { display: none; }
  .back { display: inline-block; margin-bottom: 10px; }
  .detail { padding: 16px; }
}
