/* ClientPier: one small stylesheet for the public pages, the widget and the team area. No fonts, no images, nothing from other sites. */
:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1d2733; --muted: #5b6672; --line: #dfe3e8;
  --accent: #2563eb; --ok: #1a7f4b; --warn: #8a5a00; --err: #b3261e; --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14181d; --card: #1c2229; --text: #e8ecf0; --muted: #9aa5b1; --line: #2d3640; --accent: #7aa0ff; --ok: #5fcf95; --warn: #e0b04a; --err: #ff8a80; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.7rem; margin: 1rem 0 .4rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 0; }
p { margin: .4rem 0 .8rem; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sep { margin: 0 .5rem; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page main { flex: 1; padding-bottom: 2rem; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.foot { border-top: 1px solid var(--line); padding-top: 1rem; padding-bottom: 1.5rem; color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: .8rem 0; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.hero { padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2.2rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.plan ul { padding-left: 1.1rem; margin: .4rem 0; }
.price { font-size: 1.3rem; font-weight: 700; margin: .2rem 0; }
.doc { max-width: 46rem; padding-top: 1rem; }
.doc h2 { font-size: 1.1rem; }
.empty { color: var(--muted); padding: 1rem 0; }
.code { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; overflow-x: auto; font-size: .85rem; }

.btn, button.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-quiet { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-danger { background: var(--err); }
@media (prefers-color-scheme: dark) { .btn, button.btn, .vote.voted { color: #0b1220; } .btn-quiet { color: var(--accent); } }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.inline { display: inline; }
form.stack { display: grid; gap: .7rem; }
label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
input[type=text], input[type=email], input[type=search], textarea, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; width: 100%;
}
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .8rem 0; }
.toolbar input[type=search] { flex: 1 1 200px; width: auto; }
.toolbar select { width: auto; }
summary { cursor: pointer; font-weight: 600; }
details.card[open] summary { margin-bottom: .6rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.notice { border-radius: 8px; padding: .55rem .8rem; margin: .7rem 0; border: 1px solid var(--line); background: var(--card); }
.notice-error { border-color: var(--err); color: var(--err); }
.notice-ok { border-color: var(--ok); color: var(--ok); }
.notice-warn { border-color: var(--warn); color: var(--warn); }

.board-head { border-top: 4px solid var(--accent); padding-top: .4rem; }
.tabs { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--line); margin: .6rem 0; }
.tabs a { padding: .4rem 0; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.who { margin: .2rem 0 .6rem; color: var(--muted); }

.post { display: flex; gap: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: .6rem 0; }
.votebox { flex: 0 0 auto; }
.vote { display: inline-flex; flex-direction: column; align-items: center; min-width: 3.2rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; text-decoration: none; cursor: pointer; line-height: 1.2; }
button.vote:hover, a.vote:hover { border-color: var(--accent); }
.vote.voted { background: var(--accent); border-color: var(--accent); color: #fff; }
.count { font-weight: 700; }
.post .main { flex: 1 1 auto; min-width: 0; }
.post h3 a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.post h3 a:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .85rem; margin: .2rem 0 0; }
.plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment { border-left: 3px solid var(--line); padding: .2rem .8rem; margin: .8rem 0; }
.comment.official { border-left-color: var(--accent); }
.statusline { margin-bottom: .6rem; }
.boardrow h3 { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); vertical-align: middle; }
.badge-planned { border-color: #7b5cff; color: #7b5cff; }
.badge-under-review { border-color: #b8860b; color: #b8860b; }
.badge-in-progress { border-color: #0a8ea0; color: #0a8ea0; }
.badge-shipped { border-color: var(--ok); color: var(--ok); }
.badge-declined { border-color: var(--muted); color: var(--muted); }
.badge-official { border-color: var(--accent); color: var(--accent); }

.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; align-items: start; }
.column h2 { margin-top: .4rem; }
.road-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
.road-card a { color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.entry h2, .entry h3 { margin-top: 0; }

/* the widget's iframe page */
.embed { padding: .6rem .8rem; }
.embed h1 { font-size: 1.15rem; margin-top: .4rem; }
.embed .post { padding: .5rem .7rem; }
.embed-foot { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 1rem; }

.team h1 { margin-top: 1.2rem; }
@media (max-width: 520px) { .post { gap: .6rem; padding: .7rem; } .hero h1 { font-size: 1.7rem; } }
.brand img { display: block; height: 30px; width: auto; }

/* ---- CRM */
.team .wrap, .top .wrap { max-width: 1180px; }
table.list { width: 100%; border-collapse: collapse; margin: .6rem 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.list th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
table.list tr.done td { color: var(--muted); text-decoration: line-through; }
.late { color: var(--err); font-weight: 600; }
.actions form + form { margin-left: .6rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.stat { text-align: center; }
.statnum { font-size: 1.8rem; font-weight: 700; margin: 0; }
.pipeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.stagecol { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 .7rem .7rem; min-width: 0; }
.stagecol h2 { font-size: 1rem; margin-top: .7rem; }
.deal { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
.deal h3 { margin: 0 0 .2rem; font-size: 1rem; overflow-wrap: anywhere; }
.deal .moves { display: flex; flex-wrap: wrap; gap: .2rem .7rem; margin: .4rem 0 0; font-size: .85rem; }
.tl { border-left: 3px solid var(--line); padding: .1rem .8rem; margin: .7rem 0; }
.tl-note { border-left-color: var(--accent); }
.badge-won { border-color: var(--ok); color: var(--ok); }
.badge-lost { border-color: var(--muted); color: var(--muted); }
.searchbox input[type=search] { width: 9rem; padding: .25rem .5rem; }
@media (max-width: 700px) { .pipeline { grid-auto-flow: row; grid-auto-columns: auto; } table.list { display: block; overflow-x: auto; } }

/* Round 3 (mobile QA 2026-11-28): tap targets of at least 44 px on phones and touch screens */
@media (max-width: 640px), (pointer: coarse) {
  .brand, .top nav a, .tabs a, .foot a { display: inline-flex; align-items: center; min-height: 44px; }
  .tabs a { padding-top: 0; padding-bottom: 0; }
  .btn, button.btn, .vote, input[type=text], input[type=email], input[type=search], select { min-height: 44px; }
  .linkish { min-height: 44px; padding: .5rem 0; }
}
