:root {
  --ink: #111111;
  --muted: #6d6d69;
  --soft: #f5f5f2;
  --paper: #fafaf8;
  --white: #ffffff;
  --line: #deded9;
  --line-strong: #b8b8b2;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  color: var(--ink);
  background: var(--white);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--white);
  background: var(--ink);
  font: 400 20px "DM Serif Display", serif;
}
.brand strong, .brand small, .project-switcher strong, .project-switcher small, .profile strong, .profile small { display: block; }
.brand strong { font-weight: 700; font-size: 16px; }
.brand small, .project-switcher small, .profile small { color: var(--muted); font-size: 11px; }
.project-switcher, .profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.project-switcher { margin: 28px 0 22px; padding: 11px; }
.project-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ink); border-radius: 8px; font-size: 11px; font-weight: 700; }
.chevron { color: var(--muted); }
.nav-label { margin: 18px 12px 7px; color: #999994; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: #555552;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.nav-item:hover { color: var(--ink); background: var(--soft); }
.nav-item.active { color: var(--white); background: var(--ink); }
.nav-item span { width: 19px; text-align: center; }
.nav-item b { display: grid; place-items: center; min-width: 21px; height: 21px; margin-left: auto; padding: 0 6px; border-radius: 11px; color: inherit; background: rgba(127,127,127,.18); font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.status-dot { display: flex; align-items: center; gap: 10px; padding: 14px 7px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.status-dot strong, .status-dot small { display: block; font-size: 10px; }
.status-dot small { color: var(--muted); }
.profile { width: 100%; padding: 10px; }
.profile > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--white); background: var(--ink); font-size: 10px; font-weight: 700; }

main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 40px;
  background: rgba(250,250,248,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.crumb { display: flex; gap: 9px; font-size: 12px; }
.crumb span { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.search { display: flex; align-items: center; gap: 9px; width: 250px; height: 40px; padding: 0 13px; color: var(--muted); text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.search kbd { margin-left: auto; padding: 2px 5px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; }
.icon-button { position: relative; width: 40px; height: 40px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.icon-button i { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: var(--ink); border-radius: 50%; }
.icon-button.plain { background: transparent; border: 0; }
.primary, .secondary { height: 44px; padding: 0 19px; border: 1px solid var(--ink); border-radius: 9px; font-weight: 700; cursor: pointer; }
.primary { color: var(--white); background: var(--ink); }
.primary:hover { background: #333332; }
.primary.small { height: 40px; font-size: 12px; }
.primary.full { width: 100%; }
.secondary { color: var(--ink); background: var(--white); }
.mobile-menu { display: none; }

.page-head { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(440px, .8fr); gap: 60px; align-items: end; padding: 58px 40px 34px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.page-head h1 { margin: 9px 0 20px; font-size: clamp(42px, 5vw, 68px); font-weight: 600; line-height: 1; letter-spacing: -.055em; }
.page-head h1 em { font-family: "DM Serif Display", serif; font-weight: 400; font-style: italic; letter-spacing: -.025em; }
.lede { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.head-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.head-metrics article { display: flex; flex-direction: column; min-height: 128px; padding: 17px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.head-metrics span, .head-metrics small { color: var(--muted); font-size: 10px; }
.head-metrics strong { margin: auto 0 2px; font-size: 36px; font-weight: 600; letter-spacing: -.05em; }

.workflow { margin: 0 40px 38px; padding: 20px 22px; color: var(--white); background: var(--ink); border-radius: 14px; }
.workflow-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.workflow-title span { font-size: 13px; font-weight: 700; }
.workflow-title small { color: #aaa; }
.workflow ol { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 0; padding: 0; list-style: none; }
.workflow li { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #3d3d3b; border-radius: 9px; }
.workflow li > span { display: grid; place-items: center; width: 24px; height: 24px; color: #aaa; background: #2a2a29; border-radius: 50%; font-size: 10px; font-weight: 700; }
.workflow li.done { background: #20201f; }
.workflow li.done > span { color: var(--ink); background: var(--white); }
.workflow strong, .workflow small { display: block; }
.workflow strong { font-size: 10px; }
.workflow small { margin-top: 2px; color: #999; font-size: 9px; }

.queue { padding: 0 40px 64px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.section-title h2, .architecture h2 { margin: 0 0 5px; font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -.035em; }
.section-title p { margin: 0; color: var(--muted); font-size: 12px; }
.filters { display: flex; padding: 3px; background: #ecece8; border-radius: 9px; }
.filters button { padding: 8px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; }
.filters button.active { color: var(--white); background: var(--ink); }
.filters span { margin-left: 3px; opacity: .65; }
.queue-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.feedback-list { padding: 8px; background: var(--soft); border-right: 1px solid var(--line); }
.feedback-card { display: block; width: 100%; margin-bottom: 4px; padding: 16px; color: var(--ink); text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.feedback-card:hover { background: rgba(255,255,255,.7); }
.feedback-card.selected { background: var(--white); border-color: var(--line-strong); }
.feedback-card[hidden] { display: none; }
.priority { display: inline-flex; padding: 4px 7px; color: var(--ink); background: #e9e9e5; border: 1px solid #d7d7d2; border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.priority.approved { color: var(--white); background: var(--ink); border-color: var(--ink); }
.priority.progress { background: var(--white); border-style: dashed; }
.card-time { float: right; color: #90908b; font-size: 10px; }
.feedback-card > strong { display: block; margin: 10px 0 5px; font-size: 13px; line-height: 1.35; }
.feedback-card > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: #83837e; font-size: 9px; }
.card-meta span + span::before { content: "·"; margin-right: 6px; }
.avatar { display: grid !important; place-items: center; width: 24px; height: 24px; margin-left: auto !important; color: var(--white); background: var(--ink) !important; border-radius: 50%; font-weight: 700; }
.avatar::before { display: none; }
.detail-panel { padding: 25px 27px; }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; }
.ticket { margin-right: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.detail-panel h2 { margin: 17px 0 6px; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.detail-copy { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.capture { overflow: hidden; background: #f0f0ed; border: 1px solid var(--line-strong); border-radius: 11px; }
.browser-bar { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; background: #e5e5e1; }
.browser-bar i { width: 6px; height: 6px; background: #bcbcb7; border-radius: 50%; }
.browser-bar span { margin-left: 5px; padding: 3px 9px; color: #858580; background: #f8f8f6; border-radius: 4px; font-size: 8px; }
.mock-app { display: grid; grid-template-columns: 68px 1fr; height: 215px; }
.detail-screenshot { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #efefec; }
.detail-screenshot[hidden], .mock-app[hidden] { display: none; }
.mock-nav { background: var(--white); border-right: 1px solid var(--line); }
.mock-body { position: relative; padding: 23px; }
.mock-title { width: 35%; height: 13px; background: #bdbdb8; border-radius: 4px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mock-cards i { height: 110px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.mock-cards i:first-child { outline: 2px solid var(--ink); outline-offset: 2px; }
.annotation { position: absolute; top: 64px; left: 22%; display: flex; align-items: center; gap: 7px; }
.annotation b { display: grid; place-items: center; width: 22px; height: 22px; color: var(--white); background: var(--ink); border-radius: 50%; font-size: 10px; }
.annotation span { padding: 6px 8px; color: var(--white); background: var(--ink); border-radius: 5px; font-size: 8px; }
.context-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 14px 0; }
.context-grid div { padding: 10px; background: var(--soft); border: 1px solid #ecece8; border-radius: 7px; }
.context-grid span, .context-grid strong { display: block; }
.context-grid span { color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.context-grid strong { margin-top: 4px; font-size: 10px; }
.approval-box { display: flex; gap: 11px; padding: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.shield { display: grid; flex: 0 0 26px; place-items: center; height: 26px; color: var(--white); background: var(--ink); border-radius: 50%; }
.approval-box strong { font-size: 11px; }
.approval-box p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.architecture { display: grid; grid-template-columns: .65fr 1fr; gap: 54px; margin: 0 40px 50px; padding: 34px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.architecture > div:first-child > p:last-child { max-width: 360px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.integration-cards { display: grid; gap: 7px; }
.integration-cards article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; }
.integration-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--white); background: var(--ink) !important; border-radius: 8px; font-weight: 700; }
.integration-cards strong, .integration-cards small { display: block; }
.integration-cards strong { font-size: 12px; }
.integration-cards small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.integration-cards article > b { padding: 4px 6px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 5px; font-size: 9px; }
footer { display: flex; align-items: center; gap: 22px; padding: 24px 40px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
footer span { color: var(--ink); font-weight: 700; }
footer p { margin: 0; }
footer a { margin-left: auto; color: var(--ink); }

dialog { width: calc(100% - 32px); max-width: 520px; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 28px 80px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.64); backdrop-filter: blur(3px); }
dialog form { position: relative; padding: 30px; }
dialog h2 { margin: 7px 0 10px; font-size: 27px; letter-spacing: -.03em; }
dialog p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
dialog pre { margin: 20px 0; padding: 15px; color: #eee; background: var(--ink); border-radius: 8px; font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; background: var(--soft); border: 0; border-radius: 50%; font-size: 20px; }
.brand-mark.large { width: 44px; height: 44px; margin-bottom: 18px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; padding: 12px 16px; color: var(--white); background: var(--ink); border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(90px); transition: .25s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .page-head { grid-template-columns: 1fr; gap: 24px; }
  .workflow ol { grid-template-columns: repeat(3, 1fr); }
  .queue-layout { grid-template-columns: 300px 1fr; }
  .architecture { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; width: 260px; transform: translateX(-100%); transition: .25s; }
  .sidebar.open { box-shadow: 18px 0 50px rgba(0,0,0,.18); transform: none; }
  .topbar { height: 66px; padding: 0 16px; }
  .mobile-menu { display: block; background: transparent; border: 0; font-size: 20px; }
  .crumb { display: none; }
  .search { justify-content: center; width: 40px; padding: 0; }
  .search span:nth-child(2), .search kbd, .primary.small { display: none; }
  .page-head, .queue { padding-left: 16px; padding-right: 16px; }
  .page-head { padding-top: 34px; }
  .head-metrics { grid-template-columns: repeat(3, 165px); overflow: auto; padding-bottom: 5px; }
  .workflow { margin: 0 16px 32px; padding: 16px; overflow: auto; }
  .workflow-title small { display: none; }
  .workflow ol { grid-template-columns: repeat(6, 142px); }
  .section-title { flex-direction: column; align-items: flex-start; gap: 14px; }
  .filters { width: 100%; overflow: auto; }
  .queue-layout { grid-template-columns: 1fr; }
  .feedback-list { display: flex; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .feedback-card { min-width: 260px; }
  .detail-panel { padding: 20px 16px; }
  .architecture { margin: 0 16px 32px; padding: 22px 18px; gap: 22px; }
  .integration-cards article { grid-template-columns: auto 1fr; }
  .integration-cards article > b { grid-column: 2; width: fit-content; }
  footer { flex-direction: column; align-items: flex-start; gap: 7px; padding: 22px 16px; }
  footer a { margin-left: 0; }
  .mock-app { height: 180px; }
  .mock-cards i { height: 82px; }
}

@media (max-width: 520px) {
  .page-head h1 { font-size: 39px; }
  .head-metrics article { min-height: 116px; }
  .detail-actions { display: grid; grid-template-columns: 1fr; }
  .detail-actions .primary { grid-row: 1; }
  .context-grid { grid-template-columns: 1fr 1fr; }
  .annotation span { max-width: 120px; }
  .capture { margin-right: -5px; margin-left: -5px; }
}
