/* PadiMi feedback board: a plain, Nolt-style page. */
:root {
  --bg: #f5f5f5;
  --card: #fff;
  --ink: #1f2328;
  --muted: #6a6f77;
  --line: #e6e6e6;
  --soft: #f7f7f8;
  --accent: #b53d28;
  --accent-ink: #fff;
  color-scheme: light;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, system-ui, "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161719; --card: #1f2124; --ink: #ececee; --muted: #a0a4ab; --line: #303236; --soft: #26282c; --accent: #e0644c; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.human-check { position: fixed; right: 16px; bottom: 16px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px 0; gap: 12px; }
.topbar-title { display: inline-block; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.views { display: flex; gap: 6px; margin-top: 10px; }
.views a { font-size: 13px; text-decoration: none; padding: 3px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--card); }
.views a[aria-current=true] { color: var(--accent); border-color: var(--accent); }
.ghost { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; font-size: 13px; }

main { padding: 24px 16px 40px; }
.card { max-width: 580px; margin: 0 auto; background: var(--card); border-radius: 8px; box-shadow: 0 1px 3px #0000000f; overflow: visible; }
.intro { padding: 36px 52px 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.brand img { border-radius: 9px; }
.intro p { color: var(--muted); margin: 0 0 14px; max-width: 320px; }
.intro h2 { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.intro a { text-decoration-style: dotted; }

.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 52px; background: var(--soft); border-block: 1px solid var(--line); }
.tool { background: none; border: 0; padding: 6px 8px; border-radius: 4px; color: var(--muted); font-size: 13px; }
.tool:hover, .tool[aria-expanded=true] { background: var(--line); color: var(--ink); }
.menu { position: relative; }
.popover { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px #00000018; padding: 6px; }
.popover > button { display: block; width: 100%; text-align: start; background: none; border: 0; padding: 7px 10px; border-radius: 4px; font-size: 14px; }
.popover > button:hover { background: var(--soft); }
.popover > button[aria-pressed=true] { color: var(--accent); font-weight: 500; }
.popover-wide { min-width: 240px; padding: 10px 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 10px; }
legend { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
fieldset label { display: block; font-size: 14px; padding: 2px 0; }
.search { flex: 1; min-width: 110px; }
.search input { width: 100%; border: 0; background: none; padding: 6px 8px; font-size: 13px; }
.search input:focus { outline: none; background: var(--card); border-radius: 4px; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 4px; padding: 7px 14px; font-size: 13px; font-weight: 500; }
.primary:hover { filter: brightness(1.06); }
.primary:disabled { opacity: 0.6; cursor: wait; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }

.message { padding: 18px 52px; color: var(--muted); margin: 0; }
.message:empty { display: none; }
.message[data-state=error] { color: #c0392b; }
.posts { list-style: none; margin: 0; padding: 14px 0 24px; }
.post { display: flex; gap: 20px; align-items: flex-start; padding: 14px 52px; }
.post:hover { background: var(--soft); }
.post-link { flex: 1; min-width: 0; text-decoration: none; display: block; }
.post-title { font-size: 15px; font-weight: 500; margin: 0 0 4px; overflow-wrap: anywhere; }
.post-number { color: var(--muted); font-weight: 400; }
.post-excerpt { margin: 0 0 6px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.post-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--dot, #9aa0a6); }
.status-acknowledged { --dot: #b5c22c; }
.status-planned { --dot: #3b82f6; }
.status-in_progress { --dot: #f59e0b; }
.status-completed { --dot: #22a35a; }
.status-closed { --dot: #c0392b; }
.vote { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 5px 12px; font-size: 13px; min-width: 62px; justify-content: center; box-shadow: 0 1px 1px #0000000a; }
.vote-arrow { font-size: 9px; }
.vote[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
.vote:disabled { cursor: default; opacity: 0.6; }
.vote-wide { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vote-wide[aria-pressed=true] { background: var(--card); color: var(--accent); }

/* Kanban */
.kanban { margin: 0 -16px; }
.kanban-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 16px 16px; }
.kanban-bar h1 { font-size: 18px; margin: 0; }
.kanban .message { text-align: center; padding: 0 16px 12px; }
.columns { display: flex; gap: 14px; overflow-x: auto; padding: 16px; border-top: 1px solid var(--line); background: var(--soft); min-height: 60vh; align-items: flex-start; }
.column { flex: 0 0 260px; }
.column-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; background: var(--card); border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; }
.column-count { color: var(--muted); font-weight: 400; }
.column-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kanban-card { background: var(--card); border-radius: 6px; padding: 12px; box-shadow: 0 1px 2px #0000000f; display: grid; gap: 8px; }
.kanban-card .vote { justify-self: end; min-width: 0; padding: 3px 9px; }
.kanban-card .post-excerpt { font-size: 13px; }
.column-empty { color: var(--muted); font-size: 13px; padding: 4px 12px; }

/* Modals */
.modal { width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 48px); border: 0; border-radius: 8px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px #00000040; }
.modal::backdrop { background: #0000008c; }
.modal-small form { padding: 28px 32px; }
.modal h2 { margin: 0 0 18px; font-size: 17px; font-weight: 600; }
.modal-small h2 { text-align: center; }
.close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.modal label { display: block; font-size: 13px; margin: 14px 0 6px; }
.modal label span, .hint { color: var(--muted); font-size: 13px; }
.modal input, .modal select, .modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: var(--card); }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: var(--accent); }
.modal textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.form-error { color: #c0392b; font-size: 13px; margin: 8px 0 0; }
.form-error:empty { display: none; }
.post-head { padding: 30px 40px 20px; }
.post-head .post-title { font-size: 18px; padding-right: 30px; }
.facts { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 16px 0 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.merged-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.post-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 40px; background: var(--soft); border-block: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 20px 40px 4px; }
.entry { display: flex; gap: 14px; padding: 10px 0; }
.avatar { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: #e3d9c6; color: #5a4a2e; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.avatar-team { background: var(--accent); color: var(--accent-ink); }
.entry-body { min-width: 0; flex: 1; }
.entry-text { margin: 4px 0; white-space: pre-line; overflow-wrap: anywhere; }
.entry-text.activity { font-size: 14px; }
.muted { color: var(--muted); }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); margin: 0; }
.team { background: var(--soft); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
.like { background: none; border: 0; padding: 0; font-size: 12px; color: var(--muted); }
.like[aria-pressed=true] { color: var(--accent); }
.comment-form { padding: 10px 40px 28px; }
.comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 10px; background: var(--card); resize: vertical; }
.post-bar + .timeline + .hint { padding: 0 40px 28px; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 0 16px 32px; font-size: 12px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .intro { padding: 28px 22px 22px; }
  .toolbar { padding: 8px 14px; }
  .search { order: 5; flex-basis: 100%; }
  .primary[data-new] { margin-left: auto; }
  .post { padding: 12px 22px; gap: 14px; }
  .message { padding: 16px 22px; }
  .post-head, .post-bar, .timeline, .comment-form { padding-inline: 22px; }
  .topbar { padding-inline: 16px; }
}
