:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --subtle: #f2f2ef;
  --border: #e6e5e1;
  --border-strong: #d6d4ce;
  --text: #16150f;
  --text-2: #57554d;
  --text-3: #8b887e;
  --accent: #ff6338;
  --accent-ink: #d9481f;
  --accent-soft: #fff1ec;
  --green: #1f8a4c;
  --green-soft: #e8f5ec;
  --amber: #a86400;
  --amber-soft: #fdf3e1;
  --blue: #2457c5;
  --blue-soft: #eaf0fc;
  --red: #c0352b;
  --red-soft: #fcebea;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(22, 21, 15, .04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: 22px; line-height: 1.3; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { height: 26px; width: auto; }
.brand .sep { width: 1px; height: 20px; background: var(--border-strong); }
.brand .org { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em; flex: none; }
.avatar.team { background: var(--accent); }
.who .name { font-weight: 500; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); cursor: pointer; }
.linkbtn:hover { color: var(--text); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; padding: 10px 10px 12px; text-decoration: none; color: var(--text-2);
  white-space: nowrap; font-weight: 500; display: flex; align-items: center; gap: 6px;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--subtle); color: var(--text-2); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.count.hot { background: var(--accent); color: #fff; }

.banner { background: var(--text); color: #fff; font-size: 13px; }
.banner .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 12px; }
.banner a { color: #fff; font-weight: 500; }

main.wrap { padding-top: 32px; padding-bottom: 56px; }

/* ---------- page header ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ph .eyebrow { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.ph p { color: var(--text-2); margin-top: 4px; max-width: 640px; }

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.card-h a { font-size: 13px; color: var(--text-2); text-decoration: none; }
.card-h a:hover { color: var(--text); }
.card-b { padding: 18px; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--border); background: #fcfcfb; border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; }
.cols-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.stat { padding: 16px 18px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 12px; color: var(--text-2); }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 500; }
.list .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.list .meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.list a.row { text-decoration: none; display: flex; gap: 12px; align-items: center; width: 100%; }
.list li:has(> a.row):hover { background: #fcfcfb; }
.chev { color: var(--text-3); flex: none; }

.empty { padding: 28px 18px; text-align: center; color: var(--text-3); }

/* ---------- status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--subtle); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }

.bar { height: 6px; background: var(--subtle); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.bar.accent > i { background: var(--accent); }
.bar.green > i { background: var(--green); }

/* ---------- phases ---------- */
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phase { padding: 16px 18px 18px; border-right: 1px solid var(--border); position: relative; }
.phase:last-child { border-right: 0; }
.phase .line { height: 3px; border-radius: 2px; background: var(--subtle); margin-bottom: 12px; }
.phase.done .line { background: var(--text); }
.phase.now .line { background: linear-gradient(90deg, var(--accent) var(--p, 40%), var(--subtle) var(--p, 40%)); }
.phase .n { font-size: 12px; color: var(--text-3); }
.phase .t { font-weight: 600; margin-top: 2px; }
.phase.now .n { color: var(--accent-ink); font-weight: 500; }
.phase .d { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 110px 28px minmax(0, 1fr); gap: 0 12px; }
.tl .when { text-align: right; font-size: 13px; color: var(--text-2); padding-top: 18px; font-weight: 500; }
.tl .rail { position: relative; display: flex; justify-content: center; }
.tl .rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-strong); }
.tl li:first-child .rail::before { top: 22px; }
.tl li:last-child .rail::before { bottom: calc(100% - 22px); }
.tl .dot { position: relative; margin-top: 16px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.tl .done .dot { background: var(--text); border-color: var(--text); }
.tl .current .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl .body { padding: 14px 0 18px; border-bottom: 1px solid var(--border); }
.tl li:last-child .body { border-bottom: 0; }
.tl .body .title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl .body p { color: var(--text-2); margin-top: 4px; }
.tl .see { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.tl .see b { color: var(--text); font-weight: 500; }
.tl .upcoming .title { color: var(--text-2); }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 10px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(22, 21, 15, .08); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--text); margin: 2px 0 0; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.field + .field { margin-top: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
input[type=file] { font: inherit; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--subtle); }
.btn.primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn.primary:hover { background: #33312a; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--subtle); }
.btn.danger { color: var(--red); }
.inline { display: inline; margin: 0; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 20px; font-size: 13.5px; border: 1px solid; }
.flash.ok { background: var(--green-soft); color: var(--green); border-color: #cfe9d8; }
.flash.err { background: var(--red-soft); color: var(--red); border-color: #f3d1ce; }

/* ---------- tasks ---------- */
details.task { border-bottom: 1px solid var(--border); }
details.task:last-child { border-bottom: 0; }
details.task > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; gap: 12px; align-items: center; }
details.task > summary::-webkit-details-marker { display: none; }
details.task > summary:hover { background: #fcfcfb; }
details.task[open] > summary { background: #fcfcfb; }
details.task .tbody { padding: 4px 18px 20px 50px; }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.tick.done { background: var(--text); border-color: var(--text); }
.tick.sent { border-color: var(--blue); border-style: dashed; }
.tick svg { width: 11px; height: 11px; }
.caret { margin-left: auto; color: var(--text-3); transition: transform .15s; flex: none; }
details[open] .caret { transform: rotate(90deg); }

.answer { background: var(--subtle); border-radius: 6px; padding: 12px 14px; font-size: 13.5px; }
.answer dt { font-size: 12px; color: var(--text-3); }
.answer dd { margin: 2px 0 10px; }
.answer dd:last-child { margin-bottom: 0; }

/* ---------- feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .mark { width: 8px; height: 8px; border-radius: 50%; margin: 7px 0 0 4px; background: var(--accent); }
.feed .log .mark { background: var(--border-strong); }
.feed .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; }
.feed .log .txt { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; padding: 2px; background: var(--surface); }
.seg a { padding: 4px 10px; border-radius: 4px; text-decoration: none; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg a.on { background: var(--subtle); color: var(--text); }

/* ---------- thread ---------- */
.msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.msg .h { display: flex; gap: 8px; align-items: baseline; }
.msg .h b { font-weight: 600; }
.msg .txt { margin-top: 4px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.link:hover td { background: #fcfcfb; cursor: pointer; }
.table td a.cell { text-decoration: none; font-weight: 500; }
.scroll-x { overflow-x: auto; }

/* ---------- team card ---------- */
.person { display: flex; gap: 12px; align-items: center; }
.person .avatar { width: 36px; height: 36px; font-size: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- system cards ---------- */
.sys { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sys:last-child { border-bottom: 0; }
.sys .top-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sys .nm { font-weight: 500; font-size: 13.5px; }
.sys .bar { margin-top: 8px; }

.sysgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sysgrid .card { margin: 0; }
.sysgrid .card + .card { margin: 0; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box .logo { height: 28px; margin: 0 auto 28px; }
.auth-box .card-b { padding: 28px; }
.auth-box h1 { font-size: 18px; text-align: center; }
.auth-box .lead { text-align: center; color: var(--text-2); margin: 6px 0 22px; font-size: 13.5px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 18px; }

.next { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.next .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.next .k { font-size: 12px; color: var(--text-3); }

.section-title { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin: 28px 0 10px; }
.section-title:first-child { margin-top: 0; }

.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq .a { padding: 0 18px 16px; color: var(--text-2); }

.foot { text-align: center; color: var(--text-3); font-size: 12px; padding: 0 0 32px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase:nth-child(2) { border-right: 0; }
  .phase:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .sysgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 20px; }
  .who .name, .brand .sep, .brand .tag { display: none; }
  .brand img { height: 22px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .tl li { grid-template-columns: 20px minmax(0, 1fr); }
  .tl .when { display: none; }
  .tl .body .wl { display: inline; }
  details.task .tbody { padding-left: 18px; }
  .card-h, .card-b, .list > li, .feed li, .stat, .phase, .sys { padding-left: 16px; padding-right: 16px; }
  .table th, .table td { padding-left: 14px; padding-right: 14px; }
}
.tl .body .wl { display: none; font-size: 12px; color: var(--text-3); font-weight: 500; }
