:root{
  --bg:#faf8f4; --card:#fff; --ink:#1d2330; --muted:#6b7280; --line:#e9e4da; --accent:#2f3e5c; --accent-soft:#eef1f7;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --sans:Inter,-apple-system,"Segoe UI",system-ui,sans-serif;
  --shadow:0 1px 2px rgba(29,35,48,.04),0 6px 20px rgba(29,35,48,.05);
}
*{box-sizing:border-box} html{background:var(--bg)}
body{margin:0;color:var(--ink);font:15px/1.6 var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none} .wrap{max-width:1040px;margin:0 auto;padding:0 24px}
.top{border-bottom:1px solid var(--line);background:rgba(250,248,244,.9);position:sticky;top:0;backdrop-filter:blur(8px);z-index:5}
.top-in{display:flex;align-items:center;justify-content:space-between;height:60px}
.brand{font-family:var(--serif);font-size:20px;font-weight:600;letter-spacing:.2px;display:flex;align-items:center;gap:10px}
.mark{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--accent);color:#fff;font-size:16px}
nav{display:flex;gap:22px;font-size:14px} nav .on{font-weight:600;border-bottom:2px solid var(--accent);padding-bottom:2px}
.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;padding:44px 0 22px}
.eyebrow{margin:0 0 6px;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:600}
h1{font-family:var(--serif);font-weight:600;font-size:34px;line-height:1.15;margin:0 0 8px;letter-spacing:-.2px}
.sub{margin:0;color:var(--muted)}
.btn{font:inherit;font-weight:600;font-size:14px;padding:10px 18px;border-radius:10px;border:1px solid var(--accent);background:var(--accent);color:#fff;cursor:pointer;transition:.15s}
.btn:hover{background:#243050} .btn:disabled{opacity:.6;cursor:wait}
.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.actions .hint{margin:0 0 0 4px}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn.ghost:disabled:hover{background:transparent}
.btn.ghost{background:transparent;color:var(--accent)} .btn.ghost:hover{background:var(--accent-soft)}
.filters{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 24px} .filters.tight{margin-bottom:10px}
.chip{font-size:13px;padding:6px 13px;border-radius:999px;border:1px solid var(--line);background:#fff;color:#444;transition:.15s}
.chip i{font-style:normal;color:var(--muted);margin-left:4px} .chip:hover{border-color:#cfc8ba}
.chip.active{background:var(--accent);border-color:var(--accent);color:#fff} .chip.active i{color:#cbd3e4}
.seg{display:inline-flex;border:1px solid var(--line);background:#fff;border-radius:999px;padding:3px;gap:2px}
.seg a{font-size:13px;padding:5px 14px;border-radius:999px;color:#555;white-space:nowrap;transition:.15s}
.seg a:hover{background:var(--accent-soft)} .seg a.on{background:var(--accent);color:#fff;font-weight:600}
.cards{display:grid;gap:14px;padding-bottom:40px}
.card{display:block;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px 22px;box-shadow:var(--shadow);transition:.18s}
.card:hover{transform:translateY(-1px);border-color:#d6cfc0;box-shadow:0 2px 4px rgba(29,35,48,.05),0 10px 28px rgba(29,35,48,.08)}
.card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12.5px}
.when{margin-left:auto;color:var(--muted)} .conf{color:var(--muted)}
.card h3{margin:10px 0 2px;font-size:17px;font-weight:650;letter-spacing:-.1px}
.msg{margin:0 0 8px;color:#4b5362;font-size:14px;word-break:break-word}
.take{margin:0 0 10px;padding-left:12px;border-left:3px solid var(--line);font-family:var(--serif);font-size:16px;color:#2a3140}
.meta{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:12.5px} .meta a{color:var(--accent);font-weight:600}
.badge{font-size:11.5px;font-weight:650;padding:3px 10px;border-radius:999px;letter-spacing:.02em;background:#eee;color:#444}
.badge.big{font-size:12.5px;padding:4px 12px}
.v-code_bug{background:#fbe9ea;color:#a3262f} .v-data_problem{background:#fdf1d9;color:#8a5a00}
.v-external_infra{background:#e6f0fb;color:#1f5aa6} .v-deploy_noise{background:#eceff3;color:#475467}
.v-ignore{background:#e8f5ec;color:#25704a} .v-done{background:#e7edf6;color:#36507c} .v-pending{background:#f1ece1;color:#7a705c}
.chip.v-done,.chip.v-code_bug,.chip.v-data_problem,.chip.v-external_infra,.chip.v-deploy_noise,.chip.v-ignore,.chip.v-pending{background:#fff;color:#444}
.chip.active[class*="v-"]{background:var(--accent);color:#fff}
.warn{color:#9a5b00;background:#fff5df;padding:1px 8px;border-radius:6px;font-size:11.5px}
.b-p1{background:#fbe3e5;color:#99202a} .b-p2{background:#fdf0d6;color:#8a5a00} .b-p3{background:#eceff3;color:#5a6577}
.card.pri-p1{border-left:3px solid #c0444f} .card.pri-p2{border-left:3px solid #e0a94a}
.why{margin:0 0 8px;font-size:12.5px;color:#5a6577}
.filed{color:var(--accent);font-weight:600}
.sibs{margin:10px 0 0;font-size:13px}
.split{color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:0 7px;font-size:11.5px}
.empty{padding:60px 0;text-align:center;color:var(--muted)}
.hero-do{display:flex;gap:10px;align-items:center}
.runbar{background:#fff;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:12px;padding:14px 18px;margin:0 0 18px;box-shadow:var(--shadow)}
.runbar-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.runbar-top form{margin-left:auto}
.runbar .hint{margin:0} .runbar p.hint{margin:8px 0 0;font-size:12.5px}
.runbar .note{color:#8a5a00}
.runbar.done{border-left-color:#2f8a57} .runbar.over_budget,.runbar.stopped{border-left-color:#e0a94a}
.runbar.failed{border-left-color:#c0444f}
.meter{height:6px;border-radius:999px;background:var(--accent-soft);overflow:hidden;margin-top:10px}
.meter span{display:block;height:100%;background:var(--accent);transition:width .4s}
.crumb{margin:26px 0 0;font-size:14px;color:var(--muted)} .crumb a:hover{color:var(--ink)}
.d-head{padding:14px 0 22px}
.d-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.d-top form{margin-left:auto} .d-head h1{margin-top:12px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px 24px;box-shadow:var(--shadow);margin-bottom:18px}
.panel.center{text-align:center;padding:40px} .panel h2{font-family:var(--serif);font-size:19px;margin:0 0 10px}
.lead{background:linear-gradient(180deg,#fff,#fbfaf6)} .big-line{font-family:var(--serif);font-size:23px;line-height:1.4;margin:0 0 14px}
.pills{display:flex;gap:8px;flex-wrap:wrap} .pill{font-size:12.5px;padding:4px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent)}
.pill.bad{background:#fff5df;color:#9a5b00}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px} .grid .panel{margin-bottom:0} .grid{margin-bottom:18px}
.steps{list-style:none;margin:0;padding:0;display:grid;gap:14px} .steps li{position:relative}
.steps .why{display:block;margin:7px 0 8px;color:#4b5362;line-height:1.5}
.kind{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:2px 8px;border-radius:6px;margin-right:8px;background:#eee}
.k-sql{background:#e6f0fb;color:#1f5aa6} .k-check{background:#fdf1d9;color:#8a5a00} .k-code_fix{background:#fbe9ea;color:#a3262f} .k-none{background:#eceff3;color:#475467}
pre{background:#f6f3ec;border:1px solid var(--line);border-radius:10px;padding:12px 14px;overflow:auto;font-size:12.5px;margin:8px 0 4px;white-space:pre-wrap}
.snip{position:relative} .snip pre{margin:7px 0 0;padding-right:42px}
.copy{position:absolute;top:14px;right:10px;display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line);background:#fff;border-radius:7px;color:#7d7566;cursor:pointer;opacity:.75;transition:opacity .15s,color .15s}
.snip:hover .copy,.copy:focus-visible{opacity:1} .copy:hover{color:#2d2a24}
.copy.ok{color:#2f7a47;border-color:#2f7a47;opacity:1} .copy.ok svg{display:none} .copy.ok:after{content:"✓";font-size:14px;font-weight:700}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:#f6f3ec;padding:1px 6px;border-radius:6px;word-break:break-all}
.fix-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:6px}
.branch{display:flex;align-items:center;gap:8px} .branch label{font-size:13px;color:var(--muted)}
.branch input{font:inherit;font-size:13px;font-family:ui-monospace,Menlo,monospace;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;min-width:330px}
pre.diff{max-height:460px;font-size:12px;line-height:1.5}
/* Follow-up chat */
.chat .hint.top{margin:-4px 0 22px}
.turn{position:relative;margin:0 0 22px}
.turn.user{display:flex;justify-content:flex-end}
.turn.user p{margin:0;padding:9px 15px;background:#f1ece2;border-radius:14px 14px 4px 14px;max-width:78%;font-size:14.5px;line-height:1.5}
.turn.assistant .reply{white-space:pre-wrap;font-size:15px;line-height:1.65;color:#36322b;padding-right:36px}
.turn.assistant .copy.flat{top:-4px;right:0;border-color:transparent;background:transparent;opacity:0}
.turn.assistant:hover .copy.flat,.copy.flat:focus-visible{opacity:.7} .turn.assistant .copy.flat:hover{opacity:1;border-color:var(--line);background:#fff}
.turn.pending .reply{color:var(--muted);animation:pulse 1.3s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:.45}50%{opacity:1}}
.turn.failed .reply{color:#a3262f}
.composer{margin-top:22px;border:1px solid var(--line);border-radius:14px;background:#fff;transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:#c8b89a;box-shadow:0 0 0 3px rgba(200,184,154,.16)}
.composer textarea{display:block;width:100%;box-sizing:border-box;border:0;background:transparent;font:inherit;font-size:15px;line-height:1.55;padding:14px 16px 2px;resize:none;outline:none;max-height:220px;overflow-y:auto}
.composer textarea::placeholder{color:#a8a192}
.composer-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:2px 10px 10px 16px}
.composer-foot .hint{margin:0;font-size:12px}
.btn.sm{padding:7px 18px;font-size:14px}
.what{margin:0;padding-left:0;list-style:none;display:grid;gap:11px}
.what li{padding-left:18px;position:relative;line-height:1.55} .what li:before{content:"";position:absolute;left:0;top:9px;width:5px;height:5px;border-radius:50%;background:#b9ae99}
.hint{color:var(--muted);font-size:13px;margin:12px 0 0}
.foot-actions{display:flex;justify-content:space-between;align-items:center;margin:6px 0 40px}
.foot{padding-top:18px;padding-bottom:36px;color:#a39d90;font-size:12.5px;border-top:1px solid var(--line)}
@media(max-width:760px){.grid{grid-template-columns:1fr}.hero{flex-direction:column;align-items:flex-start}h1{font-size:28px}}

/* GitHub sync */
.filters .label{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600;align-self:center;margin-right:4px}
.sync{padding:22px 24px 14px}
.sync-base{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--line)}
.sync-base .right{margin-left:auto}
.axis-head{display:flex;justify-content:space-between;gap:16px;padding:14px 148px 6px 248px;font-size:12px;color:var(--muted)}
.sync-row{display:grid;grid-template-columns:230px 1fr 130px;gap:18px;align-items:center;padding:14px 8px;margin:0 -8px;border-radius:10px;transition:.15s}
.sync-row:hover{background:#faf8f4}
.sync-row .name{display:flex;flex-direction:column;line-height:1.35} .sync-row .name .hint{margin:0;font-size:12px}
.bars{display:grid;grid-template-columns:1fr 2px 1fr;align-items:center;min-height:30px}
.bars.missing{display:block;color:var(--muted);font-size:13px}
.side{display:flex;align-items:center;gap:8px;height:22px}
.side.left{justify-content:flex-end} .side.right{justify-content:flex-start}
.mid{height:34px;background:#cfc8ba;border-radius:2px}
.bar{display:block;height:100%;border-radius:6px;min-width:0;transition:width .4s ease}
.bar.behind{background:linear-gradient(90deg,#f1b66a,#e8963a)} .bar.ahead{background:linear-gradient(90deg,#6f86c0,#3f5a9a)}
.num{font-size:13px;font-weight:650;color:#3b4252;min-width:18px}
.side.left .num{text-align:right}
.state{display:flex;flex-direction:column;align-items:flex-start;gap:2px} .state .hint{margin:0;font-size:12px}
.st{font-size:11.5px;font-weight:650;padding:3px 10px;border-radius:999px;background:#eee;color:#444}
.st.big{font-size:12.5px;padding:4px 12px}
.st-in_sync{background:#e8f5ec;color:#25704a} .st-behind{background:#fdf1d9;color:#8a5a00}
.st-ahead{background:#e6ecf8;color:#2f4a86} .st-diverged{background:#fbe9ea;color:#a3262f} .st-missing{background:#eceff3;color:#667085}
.legend{margin-top:10px;padding-top:14px;border-top:1px solid var(--line)}
.vs{font-family:var(--sans);font-size:15px;font-weight:500;color:var(--muted);margin:0 6px}
.commits{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.groups{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.group{border-left:2px solid var(--line);padding-left:12px}
.group .lead{display:grid;gap:2px}
.kids{list-style:none;margin:8px 0 0;padding:0 0 0 16px;display:grid;gap:8px;border-left:1px dashed var(--line)}
.kids li{display:grid;gap:2px}
.groups .subj{font-size:14px;color:#2a3140;word-break:break-word}
.groups .subj a{color:var(--accent);font-weight:650} .groups .hint{margin:0;font-size:12px}
.pick{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:13px}
.pick input{accent-color:var(--accent);width:14px;height:14px;margin:0}
.pick-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.pick-foot input[name=branch]{flex:1;min-width:200px;font:inherit;font-size:12.5px;font-family:ui-monospace,Menlo,monospace;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}
.opened{background:#eef6ef;border:1px solid #cfe3d2;color:#1f5130;border-radius:12px;padding:12px 16px;margin:0 0 18px;font-size:14px}
.opened a{color:inherit;text-decoration:underline}
.commits li{display:grid;gap:2px} .commits .subj{font-size:14px;color:#2a3140;word-break:break-word}
.commits .subj a{color:var(--accent);font-weight:650} .commits .hint{margin:0;font-size:12px}
@media(max-width:760px){.sync-row{grid-template-columns:1fr}.axis-head{padding:14px 0 6px}}

.notice{background:#fff5df;color:#8a5a00;border:1px solid #f0dcae;border-radius:10px;padding:10px 14px;margin-bottom:16px;font-size:13.5px}

/* A failed action reports itself here instead of replacing the page with a JSON error. */
.problem{background:#fdf0ee;border:1px solid #f0d3cd;color:#8a3324;border-radius:12px;padding:12px 16px;margin:0 0 18px;font-size:14px}
.problem strong{font-weight:600}
.hint.warn{color:#9a5b00}

/* A link has to look like one: the reset above strips colour and underline from every anchor. */
a.btn{display:inline-block;text-decoration:none;white-space:nowrap}
a.plain{color:var(--accent);font-weight:650;text-decoration:underline}
.notice.resume{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.notice.resume>div{flex:1;min-width:260px}
.notice.resume .btn{background:#8a5a00;border-color:#8a5a00}
.notice.resume .btn:hover{background:#6d4700;border-color:#6d4700}

/* Conflict resolution. Laid out like a merge tool: the files down the side, one whole file
   at a time on the right, every conflict shown inline with the markers git wrote. */
[hidden]{display:none !important}   /* a class must never be able to reveal a hidden store */
.merge-top{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap;
  padding:12px 16px;margin-bottom:14px;background:var(--card);border:1px solid var(--line);border-radius:12px;font-size:14px}
.merge-top .arrow{color:var(--muted);margin:0 4px}
.merge-top .hint{margin:0;font-size:12.5px}
.merge{display:grid;grid-template-columns:270px minmax(0,1fr);gap:0;align-items:start;
  border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card)}
.merge-foot{grid-column:1/-1;display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:14px 18px;border-top:1px solid var(--line);background:#faf8f4}
.merge-foot .hint{margin:0}

/* The file list. */
.filelist{border-right:1px solid var(--line);background:#faf8f4;align-self:stretch}
.fl-head{padding:14px 16px;font-size:13px;font-weight:650;color:#3b4252;border-bottom:1px solid var(--line)}
.fl{display:grid;gap:2px;width:100%;text-align:left;border:0;cursor:pointer;background:transparent;
  font:inherit;padding:11px 16px;border-bottom:1px solid var(--line);
  border-left:3px solid transparent;transition:.12s}
.fl:hover{background:#f3efe7}
.fl.on{background:#fff;border-left-color:var(--accent)}
.fl-name{font-family:ui-monospace,Menlo,monospace;font-size:13px;color:#2a3140;word-break:break-all}
.fl-path{font-size:11px;color:var(--muted);word-break:break-all}
.fl-done{display:none;margin-left:8px;font-family:var(--sans);font-size:10.5px;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;color:#2f8a57}
.fl.resolved{border-left-color:#2f8a57}
.fl.resolved .fl-done{display:inline}
.fl.resolved .fl-name{color:var(--muted)}

/* One file. */
.pane{min-width:0}
.pane-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 16px;
  border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:3}
.pane-head .cpath{flex:1;min-width:120px;font-family:ui-monospace,Menlo,monospace;font-size:13px;
  font-weight:600;color:#2a3140;word-break:break-all}
.count{font-size:12.5px;font-weight:650;color:#a3262f;white-space:nowrap}
.count.ok{color:#2f8a57}
.navc{border:1px solid var(--line);background:#fff;font:inherit;font-size:12px;padding:5px 10px;
  border-radius:7px;cursor:pointer;color:#5c5648}
.navc:hover{background:#f3efe7}
.oneside{padding:16px}

/* The code. Every line reads the same: one background, one colour. What marks a conflict is the
   band down its left edge and git's own marker lines, not a patchwork of tints. */
.code-view{max-height:72vh;overflow:auto;background:#fff;
  font-family:ui-monospace,Menlo,monospace;font-size:12.5px;line-height:1.65}
.row{display:flex;align-items:flex-start;width:max-content;min-width:100%;background:#fff}
.row .n{flex:0 0 58px;padding:0 12px 0 6px;text-align:right;color:#bdb4a2;user-select:none;
  position:sticky;left:0;z-index:1;background:#fff;border-right:1px solid rgba(0,0,0,.05)}
.row code{display:block;padding:0 18px 0 12px;white-space:pre;color:#2a3140;tab-size:2}
.settled,.region{border-left:3px solid transparent;width:max-content;min-width:100%}

/* The folded run of settled lines, and the bar over a conflict: both pinned to the left edge so
   they stay readable however far the code is scrolled sideways. */
.more{display:block;width:max-content;min-width:100%;border:0;padding:0;text-align:left;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#eef1f7;cursor:pointer}
.more span{display:inline-block;position:sticky;left:0;padding:5px 14px 5px 70px;
  font-family:var(--sans);font-size:11.5px;color:#3f5a9a;font-weight:600}
.more:hover{background:#e3e9f4}

/* A conflict: a band down the side until a change is accepted, then it goes green and the
   rejected side and the markers drop out, leaving the file as it will be written. */
.region{border-left-color:#e8963a}
.region .row.mark{background:#fff6e2}
.region .row.mark .n{background:#fff6e2}
.region .row.mark code{color:#8a5a00;font-weight:650}
.rbar{width:max-content;min-width:100%;background:#fff6e2;border-top:1px solid #f0dcae}
.rbar-in{display:inline-flex;align-items:center;gap:10px;position:sticky;left:0;
  padding:6px 14px 6px 70px;font-family:var(--sans);font-size:12px}
.rbar button{border:0;background:transparent;font:inherit;color:#3f5a9a;font-weight:650;cursor:pointer;padding:0}
.rbar button:hover{text-decoration:underline}
.rbar .sep{color:#cfc8ba}
.rbar .rdone{display:none;color:#2f8a57;font-weight:650;align-items:center;gap:10px}
.region.took{border-left-color:#2f8a57}
.region.took .rbar{background:#eef7f1;border-top-color:#cfe3d2}
.region.took .rchoose{display:none}
.region.took .rdone{display:inline-flex}
.region.took .row.mark{display:none}
.region.took-ours .row.theirs{display:none}
.region.took-theirs .row.ours{display:none}

select.choose{font:inherit;font-size:13px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;max-width:100%}
@media(max-width:820px){.merge{grid-template-columns:1fr}.filelist{border-right:0;border-bottom:1px solid var(--line)}}
