/* AuVia design language (au-pcb-editor/docs/ui-design.md), light and Compact density, for the web.
   The canvas is pushed toward white; glass, hairlines, type scale and metrics follow the spec:
   toolbar 38, sidebar 244, status bar 22, gutter 6, rows 26, body 13. Accent only for selection and focus;
   primary actions are dark capsules. */
:root {
  --canvas: #f7f7f5;
  --grid: rgba(70, 60, 45, 0.10);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-thick: rgba(255, 255, 255, 0.92);
  --hairline: rgba(60, 50, 35, 0.12);
  --highlight: rgba(255, 255, 255, 0.9);
  --sep: rgba(60, 50, 35, 0.10);
  --text: #1d1c1a;
  --text-2: #57554f;
  --text-3: #69665f;
  --fill: rgba(60, 50, 35, 0.05);
  --fill-2: rgba(60, 50, 35, 0.10);
  --row-sel: rgba(60, 50, 35, 0.075);
  --card: #ffffff;
  --field: #ffffff;
  --accent: #0a5fd4;
  --accent-soft: rgba(10, 102, 224, 0.10);
  --primary: #1d1c1a;
  --primary-fg: #faf9f5;
  --ok: #21733f;
  --warn: #9c5405;
  --danger: #c0311d;
  --violet: #7c5cff;
  --shadow: 0 10px 32px rgba(50, 40, 25, 0.08), 0 1px 4px rgba(50, 40, 25, 0.05);
  --shadow-thick: 0 24px 60px rgba(40, 30, 20, 0.16), 0 2px 8px rgba(40, 30, 20, 0.08);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --toolbar: 38px;
  --sidebar: 244px;
  --statusbar: 22px;
  --gutter: 6px;
  --row: 26px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.005em;
  color: var(--text);
  background-color: var(--canvas);
  background-image: radial-gradient(var(--grid) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.meta { color: var(--text-3); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }

/* ---------- glass ---------- */
.glass, .toolbar, .statusbar {
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 0.5px solid var(--hairline);
  box-shadow: inset 0 0.5px 0 var(--highlight), var(--shadow);
}

/* ---------- app shell ---------- */
body.app { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.toolbar {
  display: flex; align-items: center; gap: 12px; min-height: var(--toolbar);
  padding: 0 10px 0 12px;
  border-width: 0 0 0.5px; box-shadow: inset 0 0.5px 0 var(--highlight);
  position: relative; z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.brand-sub { color: var(--text-3); font-weight: 400; font-size: 12px; }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--primary); display: inline-grid; place-items: center; }
.mark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.tool-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* segmented control: fill track, white "on" segment with hairline */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--fill-2); }
.seg a { height: 24px; padding: 0 12px; border-radius: 7px; display: inline-flex; align-items: center; color: var(--text-2); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.on { background: #fff; color: var(--text); box-shadow: 0 0 0 0.5px var(--hairline), 0 0.5px 1px rgba(0,0,0,.08); }
.seg.small a { height: 22px; padding: 0 10px; font-size: 12px; }

.pill-btn {
  height: 26px; padding: 0 10px; border-radius: 13px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--fill); border: 0.5px solid var(--hairline);
  color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer;
}
.pill-btn:hover { background: var(--fill-2); color: var(--text); }
.sync { margin: 0; }
.ic { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.ic.big { width: 28px; height: 28px; color: var(--text-3); stroke-width: 1.2; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-3); opacity: .55; }
.dot.ok { background: var(--ok); opacity: 1; }
.dot.warn { background: var(--warn); opacity: 1; }
.dot.bad { background: var(--danger); opacity: 1; }
.rows .dot, .tr .dot { width: 6px; height: 6px; }

.me { position: relative; }
.me summary { list-style: none; cursor: pointer; display: grid; place-items: center; }
.me summary::-webkit-details-marker { display: none; }
.me img, .avatar { width: 24px; height: 24px; border-radius: 50%; border: 0.5px solid var(--hairline); }
.avatar { display: grid; place-items: center; background: var(--fill-2); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.menu {
  position: absolute; right: 0; top: 32px; min-width: 220px; padding: 5px;
  background: var(--glass-thick); backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  border: 0.5px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-thick);
}
.menu-head { padding: 6px 9px 8px; border-bottom: 0.5px solid var(--sep); margin-bottom: 4px; }
.menu form { margin: 0; }
.menu-item { width: 100%; height: 28px; text-align: left; padding: 0 9px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.menu-item:hover { background: var(--accent); color: #fff; }

.frame { display: grid; grid-template-columns: var(--sidebar) 1fr; gap: var(--gutter); padding: var(--gutter); min-height: 0; }
.frame.solo { grid-template-columns: 1fr; }
.sidebar { border-radius: 14px; padding: 8px 6px; overflow-y: auto; min-height: 0; }
.content { overflow-y: auto; min-height: 0; min-width: 0; padding: 12px 16px 40px; }
.content > * { max-width: 1080px; }

.statusbar {
  display: flex; align-items: center; gap: 10px; padding: 0 12px; min-height: var(--statusbar); white-space: nowrap; overflow: hidden;
  font-size: 11.5px; color: var(--text-3);
  border-width: 0.5px 0 0; box-shadow: none;
}
.statusbar .sep { width: 0.5px; height: 11px; background: var(--hairline); }
.statusbar .grow { flex: 1; }

/* ---------- sidebar rows ---------- */
.section-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 600; color: var(--text-3);
  padding: 0 4px; margin: 18px 0 6px;
}
.section-label > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.sidebar .section-label { margin: 4px 0 4px; padding: 0 8px; }
.section-label .count { font-weight: 400; }
.section-label .link { color: var(--text-2); }
.section-label .link:hover { color: var(--text); }
.rows { display: grid; gap: 1px; }
.row {
  height: var(--row); border-radius: 7px; padding: 0 8px;
  display: grid; grid-template-columns: 6px 28px 1fr auto; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text);
}
.row:hover { background: var(--fill); }
.row.sel { background: var(--row-sel); font-weight: 500; }
.row .code { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.row.sel .code { color: var(--accent); }
.row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .trail { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.pad { padding: 8px; }

/* ---------- page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { margin: 2px 0 4px; }
.page-title .sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.crumbs { display: flex; gap: 6px; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.crumbs a:hover { color: var(--text); }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 10;
  padding: 7px 14px; border-radius: 14px; font-size: 12px;
  background: var(--glass-thick); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 0.5px solid var(--hairline); box-shadow: var(--shadow-thick);
  animation: toast 4s forwards;
}
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

.card { background: var(--card); border: 0.5px solid var(--hairline); border-radius: 11px; box-shadow: 0 1px 2px rgba(50, 40, 25, 0.04); }
.card.pad { padding: 12px 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 12px; }
.tile { background: var(--card); border: 0.5px solid var(--hairline); border-radius: 11px; padding: 10px 12px; display: grid; gap: 2px; }
a.tile:hover { border-color: rgba(60, 50, 35, 0.22); }
.tile-label { font-size: 11px; font-weight: 600; color: var(--text-3); }
.tile-value { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* timeline: one aligned structure */
.timeline { display: grid; }
.tl-row {
  display: grid; grid-template-columns: 34px minmax(140px, 1.4fr) 108px minmax(80px, 1fr) 104px;
  align-items: center; gap: 10px; height: 30px; padding: 0 12px;
  border-bottom: 0.5px solid var(--sep);
}
.tl-row:last-child { border-bottom: 0; }
.tl-row:hover { background: var(--fill); }
.tl-row .code { font-size: 11px; color: var(--text-3); }
.tl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-dates { color: var(--text-2); font-size: 11.5px; }

/* tables as grids */
.table { display: grid; overflow: hidden; }
.tr {
  display: grid; grid-template-columns: 40px minmax(160px, 1fr) 90px 72px 50px 104px;
  align-items: center; gap: 10px; min-height: 30px; padding: 4px 12px;
  border-bottom: 0.5px solid var(--sep);
}
.tr:last-child { border-bottom: 0; }
a.tr:hover { background: var(--fill); }
.tr.th { min-height: 26px; font-size: 11px; font-weight: 600; color: var(--text-3); background: rgba(60, 50, 35, 0.025); }
.c-num { color: var(--text-3); }
.c-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-pts { text-align: right; }
.empty-row { display: block; }
.people .tr { grid-template-columns: minmax(200px, 1fr) 96px 96px 118px 110px 56px; }
.person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person img { width: 22px; height: 22px; border-radius: 50%; }
.person > span { display: grid; line-height: 1.25; min-width: 0; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.u-passed { background: rgba(33, 115, 63, 0.10); color: var(--ok); }
.u-failed { background: rgba(192, 49, 29, 0.10); color: var(--danger); }
.u-blocked { background: rgba(156, 84, 5, 0.10); color: var(--warn); }

/* detail pages */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.props { display: grid; }
.prop { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 0 12px; border-bottom: 0.5px solid var(--sep); }
.prop:last-child { border-bottom: 0; }
.prop > span:first-child { color: var(--text-2); }
.prop a { color: var(--text); border-bottom: 0.5px solid var(--hairline); }
.prop.bar { min-height: 24px; }
.prose { padding: 12px 16px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 8px; }
.prose a { color: var(--accent); }
.prose code { font-family: var(--mono); font-size: 12px; background: var(--fill); padding: 1px 4px; border-radius: 4px; }
.prose img { max-width: 100%; }
.prose h1, .prose h2, .prose h3 { font-size: 13px; margin: 12px 0 6px; }

/* sprint board */
.board { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.board .section-label { margin-top: 6px; }
.col-body { display: grid; gap: 6px; align-content: start; min-height: 60px; padding: 4px; border-radius: 11px; background: var(--fill); }
.kcard { background: var(--card); border: 0.5px solid var(--hairline); border-radius: 9px; padding: 8px 9px; display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(50, 40, 25, 0.05); }
.kcard:hover { border-color: rgba(60, 50, 35, 0.25); }
.k-title { font-size: 12.5px; line-height: 1.35; }
.k-meta { display: flex; gap: 8px; font-size: 11px; color: var(--text-3); }
.k-meta .pts { margin-left: auto; color: var(--text-2); }
.k-empty { color: var(--text-3); text-align: center; padding: 10px 0; font-size: 12px; }

progress { width: 100%; height: 4px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 2px; background: var(--fill-2); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--fill-2); border-radius: 2px; }
progress::-webkit-progress-value { background: var(--text); border-radius: 2px; }
progress::-moz-progress-bar { background: var(--text); border-radius: 2px; }
progress.wide { height: 5px; margin: 10px 0 2px; }

/* controls */
button, .btn { font: inherit; cursor: pointer; }
.btn, button.primary {
  height: 28px; padding: 0 14px; border-radius: 14px; border: 0;
  background: var(--primary); color: var(--primary-fg); display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
}
button.mini { height: 24px; padding: 0 10px; border-radius: 7px; border: 0.5px solid var(--hairline); background: var(--fill); color: var(--text); font-size: 12px; }
button.mini:hover { background: var(--fill-2); }
select, input {
  font: inherit; font-size: 12.5px; color: var(--text); height: 26px; padding: 0 8px;
  background: var(--field); border: 0.5px solid var(--hairline); border-radius: 7px;
}
.field-row { display: flex; gap: 8px; margin-top: 10px; }
.field-row input { flex: 1; min-width: 0; }

.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 80px 20px; max-width: 420px; margin: 0 auto; }

/* ---------- sign-in sheet ---------- */
body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.sheet {
  width: 100%; max-width: 380px; padding: 22px 24px 20px; border-radius: 18px;
  background: var(--glass-thick); backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  border: 0.5px solid var(--hairline); box-shadow: inset 0 0.5px 0 var(--highlight), var(--shadow-thick);
  display: grid; gap: 8px;
}
.sheet h1 { font-size: 17px; margin-top: 14px; }
.sheet .btn.google { justify-content: center; height: 34px; border-radius: 17px; margin-top: 10px; }
.sheet .btn.google svg { background: #fff; border-radius: 50%; padding: 2px; width: 20px; height: 20px; }
.alert { font-size: 12px; padding: 8px 10px; border-radius: 9px; background: rgba(192, 49, 29, 0.08); color: var(--danger); }
.fine { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }


/* ---------- editing ---------- */
.actions { display: flex; gap: 6px; align-items: center; }
.actions form { margin: 0; }
.mini.danger, summary.mini.danger { color: var(--danger); }
summary.mini { list-style: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 7px; border: 0.5px solid var(--hairline); background: var(--fill); font-size: 12px; cursor: pointer; }
summary.mini::-webkit-details-marker { display: none; }
.confirm { position: relative; }
.confirm-card {
  position: absolute; right: 0; top: 30px; z-index: 6; width: 280px; padding: 12px; display: grid; gap: 8px;
  background: var(--glass-thick); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 0.5px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-thick);
}
.wide-input { width: 100%; height: 30px; font-size: 13px; font-weight: 500; }
textarea {
  font: inherit; font-size: 12.5px; color: var(--text); width: 100%; resize: vertical;
  background: var(--field); border: 0.5px solid var(--hairline); border-radius: 9px; padding: 8px 10px;
}
.body-edit { font-family: var(--mono); font-size: 12px; line-height: 1.55; padding: 10px 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.props select, .props input { max-width: 150px; }
.num-in { width: 70px; text-align: right; font-family: var(--mono); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 10px; }
.filters input[type=search] { width: 200px; }
.check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.check input { height: auto; }
.tr.closed .c-title, .kcard.closed .k-title { color: var(--text-3); text-decoration: line-through; }
.tr .code { font-size: 10.5px; color: var(--text-3); margin-right: 4px; }

/* UAT */
.uat-form { display: grid; gap: 10px; }
.seg-radio { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--fill-2); width: max-content; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-flex; align-items: center; height: 26px; padding: 0 14px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg-radio input:checked + span { background: #fff; color: var(--text); box-shadow: 0 0 0 0.5px var(--hairline), 0 0.5px 1px rgba(0,0,0,.08); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); }
.uat-table .tr { grid-template-columns: 40px minmax(160px, 1fr) 70px 160px 44px 90px; }
.ok-text { color: var(--ok); } .bad-text { color: var(--danger); } .warn-text { color: var(--warn); }
.runs { display: grid; }
.run { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 0.5px solid var(--sep); }
.run:last-child { border-bottom: 0; }
a.run:hover { background: var(--fill); }
.run-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* discussion and activity */
.comments { display: grid; }
.cmt { padding: 10px 14px; border-bottom: 0.5px solid var(--sep); }
.cmt .prose { padding: 4px 0 0; }
.cmt-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; padding: 10px 12px; background: rgba(60, 50, 35, 0.02); }
.activity { display: grid; }
.act { padding: 7px 12px; border-bottom: 0.5px solid var(--sep); font-size: 12px; display: grid; gap: 1px; }
.act:last-child { border-bottom: 0; }

/* board drag and drop */
.board { grid-template-columns: repeat(7, minmax(150px, 1fr)); }
.kcard[draggable=true] { cursor: grab; }
.kcard.dragging { opacity: 0.4; }
.kcard.saving { opacity: 0.6; }
.col.over .col-body { background: var(--accent-soft); outline: 1px dashed var(--accent); }

/* roadmap */
.roadmap { padding: 6px 0; }
.rm-row { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 12px; height: 28px; padding: 0 14px; }
a.rm-row:hover { background: var(--fill); }
.rm-head { height: 10px; }
.rm-labels { height: 16px; }
.rm-ticks { position: relative; height: 16px; font-size: 10.5px; color: var(--text-3); }
.rm-ticks span { position: absolute; top: 0; padding-left: 3px; white-space: nowrap; }
.rm-name { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-name .code { color: var(--text-3); width: 28px; flex: none; }
.rm-svg { width: 100%; height: 18px; display: block; overflow: visible; }
.rm-svg .tick { stroke: var(--sep); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rm-svg .bar { fill: var(--fill-2); }
.rm-svg .bar-done { fill: var(--text); }
.rm-svg .today { stroke: var(--danger); stroke-width: 1; vector-effect: non-scaling-stroke; }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sw { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin-left: 8px; }
.sw-bar { background: var(--fill-2); } .sw-done { background: var(--text); } .sw-today { width: 1px; height: 10px; background: var(--danger); }


.editor { margin-top: 8px; }
.editor[open] summary { margin-bottom: 4px; }
.board { grid-template-columns: repeat(7, minmax(132px, 1fr)); }

/* ---------- projects ---------- */
.brand-name { white-space: nowrap; }
.switcher { position: relative; }
.switcher summary {
  list-style: none; cursor: pointer; height: 26px; padding: 0 8px 0 10px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap;
  border: 0.5px solid var(--hairline); background: #fff;
}
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover { background: var(--fill); }
.switcher .menu { left: 0; right: auto; min-width: 260px; }
.sw-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ic.chev { width: 12px; height: 12px; color: var(--text-3); }
.menu a.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: auto; min-height: 28px; padding: 4px 9px; }
.menu a.menu-item.on { background: var(--row-sel); font-weight: 500; }
.menu a.menu-item:hover { background: var(--accent); color: #fff; }
.menu a.menu-item:hover .meta { color: rgba(255,255,255,.8); }
.menu-sep { height: 0.5px; background: var(--sep); margin: 4px 2px; }
.pill-btn.on { background: #fff; color: var(--text); }
.pill-btn .lbl { white-space: nowrap; }
.pill-btn { white-space: nowrap; text-decoration: none; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 12px; }
.pcard { background: var(--card); border: 0.5px solid var(--hairline); border-radius: 11px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(50,40,25,.04); }
.pcard:hover { border-color: rgba(60, 50, 35, 0.24); }
.pc-head { display: flex; align-items: center; justify-content: space-between; }
.pc-name { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.pc-rows .prop { padding: 0; min-height: 26px; }

.hint { margin: 0 4px 8px; max-width: 760px; }
.people-list { display: grid; }
.person-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 0.5px solid var(--sep); margin: 0; }
.person-row:last-child { border-bottom: 0; }
.person-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; justify-content: flex-end; }
.ctl { display: grid; gap: 2px; }
.ctl .meta { font-size: 10.5px; }
.proj-table .tr { grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.2fr) 140px 110px 90px; }
.proj-table a { border-bottom: 0.5px solid var(--hairline); }
.add-project { margin-top: 8px; display: grid; gap: 6px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.grid-form label { display: grid; gap: 3px; }
.grid-form input { width: 100%; }

/* ---------- responsive ----------
   > 1180: sidebar + content (+ detail column on item pages)
   ≤ 1180: detail pages stack, details first
   ≤ 980: milestones become a horizontal strip above the content; sync shows only its dot
   ≤ 700: toolbar wraps onto two lines, the page scrolls as a whole, tables drop minor columns */
.table { overflow-x: auto; }
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .side-col { order: -1; }
  .props select, .props input { max-width: 200px; }
}
@media (max-width: 980px) {
  .frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { border-radius: 11px; padding: 4px; overflow-x: auto; overflow-y: hidden; }
  .sidebar .section-label { display: none; }
  .sidebar .rows { display: flex; gap: 4px; }
  .sidebar .row { display: inline-flex; flex: none; gap: 6px; height: 26px; }
  .sidebar .row .name { max-width: 160px; }
  .sidebar .row .trail { display: none; }
  .pill-btn .lbl { display: none; }
  .board { grid-template-columns: repeat(7, minmax(160px, 1fr)); }
}
@media (max-width: 700px) {
  body.app { height: auto; min-height: 100vh; overflow: visible; }
  .frame { padding: 4px; }
  .content { overflow: visible; padding: 8px 6px 40px; }
  .toolbar { flex-wrap: wrap; padding: 6px 8px; gap: 6px; row-gap: 6px; position: sticky; top: 0; }
  .brand-name { display: none; }
  .seg { order: 5; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; }
  .seg a { flex: 1 0 auto; justify-content: center; padding: 0 10px; }
  .tool-right { gap: 6px; }
  .sw-name { max-width: 130px; }
  .page-head { align-items: flex-start; }
  .tr { grid-template-columns: 34px minmax(0, 1fr) 96px; }
  .tr .c-type, .tr .c-sprint, .tr .c-pts { display: none; }
  .tl-row { grid-template-columns: 30px minmax(0, 1fr) 96px; }
  .tl-row .tl-dates, .tl-row .tl-bar { display: none; }
  .uat-table .tr { grid-template-columns: 34px minmax(0, 1fr) 90px; }
  .uat-table .tr > :nth-child(3), .uat-table .tr > :nth-child(4), .uat-table .tr > :nth-child(5) { display: none; }
  .proj-table .tr { grid-template-columns: minmax(0, 1fr) 90px; }
  .proj-table .tr > :nth-child(2), .proj-table .tr > :nth-child(3), .proj-table .tr > :nth-child(4) { display: none; }
  .person-row { grid-template-columns: minmax(0, 1fr); }
  .person-ctl { justify-content: flex-start; }
  .rm-row { grid-template-columns: 110px minmax(0, 1fr); padding: 0 8px; }
  .rm-name { font-size: 12px; }
  .filters input[type=search] { width: 100%; }
  .seg-radio { width: 100%; }
  .seg-radio label { flex: 1; }
  .seg-radio span { justify-content: center; width: 100%; }
  .hide-sm { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .run { grid-template-columns: 64px minmax(0, 1fr); }
  .run > .meta { grid-column: 2; }
  .confirm-card { right: auto; left: 0; width: min(280px, 86vw); }
}
