:root {
  --coral:#ff6655;
  --butter:#ffd966;
  --paper:#f7f4ec;
  --ink:#171717;
  --blue:#789cff;
  --muted:#68665f;
  --line:#e4e0d6;
  --white:#fffefa;
  --focus-ring:#4d4942;
  --radius:12px;
  --shadow:0 2px 5px #25201506,0 10px 24px #25201505;
  font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,input,select,textarea {
  font:inherit
}

button,a,input,select,textarea,summary {
  -webkit-tap-highlight-color:transparent
}

button {
  cursor:pointer
}

button:disabled {
  cursor:not-allowed;
  opacity:.48
}

button,a,summary {
  touch-action:manipulation
}

button:active:not(:disabled) {
  transform:translateY(1px)
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--focus-ring);
  outline-offset:2px
}

button:focus-visible,input:not([type=checkbox]):focus-visible,textarea:focus-visible,select:focus-visible {
  outline-offset:-2px
}

button {
  transition:background-color 120ms ease,border-color 120ms ease,box-shadow 120ms ease
}

a {
  color:#3559b7;
  text-underline-offset:3px
}

button svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8
}

h1,h2,h3,p {
  margin:0
}

h1,h2,h3 {
  font-optical-sizing:auto
}

h1 {
  font-size:clamp(1.65rem,2.5vw,2.3rem);
  letter-spacing:-.035em;
  line-height:1.16;
  font-weight:650
}

h2 {
  font-size:1.25rem;
  letter-spacing:-.02em;
  line-height:1.3
}

h3 {
  font-size:1rem;
  line-height:1.4
}

p {
  overflow-wrap:anywhere
}

small {
  font-size:.8rem
}

[hidden] {
  display:none!important
}

.muted {
  color:var(--muted)
}

.eyebrow,.small-label {
  font-size:.69rem;
  font-weight:700;
  letter-spacing:.13em;
  line-height:1.5
}

.eyebrow {
  color:var(--muted)
}

.wordmark {
  font-family:Georgia,"Times New Roman",serif;
  font-size:3rem;
  line-height:1;
  letter-spacing:-.07em;
  font-weight:700;
  position:relative;
  width:max-content
}

.wordmark:after {
  content:"";
  position:absolute;
  background:var(--coral);
  height:3px;
  bottom:-7px;
  left:3px;
  right:6px;
  border-radius:9px;
  transform:rotate(-3deg)
}

.shell {
  display:grid;
  grid-template-columns:268px minmax(0,1fr);
  min-height:100vh
}

.sidebar {
  background:#f0ede4;
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:29px 16px 18px;
  border-right:1px solid var(--line);
  overflow:auto
}

.brand {
  display:flex;
  flex-direction:column;
  gap:23px;
  text-decoration:none;
  color:var(--ink);
  padding:0 16px
}

.brand-label {
  font-size:.64rem;
  letter-spacing:.15em;
  font-weight:700
}

.workspace-label {
  display:flex;
  gap:7px;
  align-items:center;
  color:var(--muted);
  font-size:.78rem;
  padding:15px 16px 25px
}

.status-dot {
  width:6px;
  height:6px;
  background:#688673;
  border-radius:50%;
  flex:none
}

.view-nav {
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:25px
}

.nav-button {
  border:0;
  background:transparent;
  border-radius:9px;
  text-align:left;
  padding:11px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#56534b;
  font-weight:550
}

.nav-button:hover {
  background:#e7e3d9
}

.nav-button[aria-current="page"] {
  color:var(--ink);
  background:var(--white);
  box-shadow:0 1px 3px #17171707
}

.nav-count {
  font-size:.75rem;
  color:var(--muted);
  background:#e9e5db;
  min-width:25px;
  text-align:center;
  border-radius:6px;
  padding:1px 6px
}

.sidebar-section {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 12px 10px
}

.sidebar-section h2 {
  font-size:.65rem;
  letter-spacing:.12em;
  color:var(--muted)
}

.text-button {
  font-size:.8rem;
  color:#9d3327;
  border:0;
  background:transparent;
  border-radius:5px;
  padding:4px 0
}

.text-button:hover {
  text-decoration:underline
}

.proposal-list {
  display:flex;
  flex-direction:column;
  gap:5px
}

.proposal-nav {
  width:100%;
  border:1px solid transparent;
  background:transparent;
  text-align:left;
  padding:13px 12px;
  border-radius:10px
}

.proposal-nav:hover {
  background:#e9e5dc
}

.proposal-nav.active {
  background:var(--white);
  border-color:#e1dace;
  box-shadow:var(--shadow)
}

.proposal-nav-title {
  display:block;
  font-size:.86rem;
  line-height:1.45;
  font-weight:580
}

.proposal-nav-meta {
  display:flex;
  gap:7px;
  margin-top:9px;
  align-items:center;
  font-size:.7rem;
  color:var(--muted)
}

.proposal-nav.active .proposal-nav-title {
  color:#9a3227
}

.rounds {
  margin:22px 10px 0;
  padding-top:18px;
  border-top:1px solid #ddd8cd;
  font-size:.76rem;
  color:var(--muted)
}

summary {
  cursor:pointer;
  list-style-position:outside;
  padding:4px 0;
  font-weight:600
}

summary::marker {
  font-size:.8em
}

.round {
  margin-top:13px
}

.round strong {
  display:block;
  color:#44413a;
  font-weight:550
}

.round span {
  font-size:.71rem
}

.sidebar-footer {
  margin:28px 9px 0;
  padding-top:21px;
  border-top:1px solid #ddd8cd
}

.sidebar-footer p {
  font-size:.76rem;
  color:var(--muted);
  margin:7px 0 15px
}

.sidebar-footer .button {
  width:100%;
  font-size:.79rem
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  padding:9px 16px;
  border:1px solid #d9d4c9;
  border-radius:9px;
  font-size:.86rem;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
  color:var(--ink);
  box-shadow:0 1px 2px #17171706
}

.button.primary {
  background-color:var(--coral);
  background-image:linear-gradient(#ffffff1a,#ffffff00);
  border-color:#e15d4e;
  box-shadow:0 2px 3px #aa433016
}

.button.primary:hover {
  background-color:#ff7a6b
}

.button.secondary {
  background:#fffdf7
}

.button.secondary:hover {
  background:#f1eee6
}

.button.quiet {
  background:transparent;
  box-shadow:none;
  border-color:transparent;
  color:var(--muted)
}

.button.quiet:hover {
  background:#eae6dc;
  color:var(--ink)
}

.button.small {
  padding:6px 10px;
  min-height:32px;
  font-size:.75rem
}

.icon-button {
  background:transparent;
  border:0;
  width:36px;
  height:36px;
  border-radius:8px;
  font-size:1.5rem;
  color:var(--muted)
}

.icon-button:hover {
  background:#eae6dc
}

.badge {
  display:inline-flex;
  align-items:center;
  width:max-content;
  border:1px solid transparent;
  border-radius:5px;
  padding:2px 6px;
  font-size:.65rem;
  line-height:1.45;
  letter-spacing:.01em;
  font-weight:600;
  white-space:nowrap
}

.badge.bug {
  color:#8e372b;
  background:#ffe2d9
}

.badge.product {
  color:#654c10;
  background:#ffedb4
}

.badge.investigation {
  color:#3859a6;
  background:#e6ecff
}

.badge.draft {
  color:#615b50;
  background:#ebe6db
}

.badge.approved,.badge.completed,.badge.succeeded {
  color:#345c42;
  background:#e3eee4
}

.badge.deferred,.badge.waiting_for_permission,.badge.stale {
  color:#775b0f;
  background:#f8edc7
}

.badge.rejected,.badge.failed,.badge.blocked,.badge.interrupted {
  color:#974338;
  background:#f9e3dc
}

.badge.running,.badge.preparing,.badge.queued,.badge.validating,.badge.publishing {
  background:#e7edff;
  color:#3553a0
}

.badge.cancelled {
  color:var(--muted);
  background:#eae6de
}

main {
  min-width:0
}

.workspace-toolbar {
  height:77px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 35px;
  background:#f7f4ecd9;
  backdrop-filter:blur(15px);
  border-bottom:1px solid var(--line)
}

.workspace-toolbar>div:first-child {
  display:flex;
  gap:17px;
  align-items:center
}

#workspace-caption {
  color:var(--muted);
  font-size:.78rem
}

.connection-status {
  font-size:.72rem;
  color:var(--muted);
  display:flex;
  gap:7px;
  align-items:center
}

.connection-status:before {
  content:"";
  width:6px;
  height:6px;
  background:#6c8970;
  border-radius:50%
}

.connection-status.offline:before {
  background:var(--coral)
}

.notice {
  margin:20px 30px 0;
  padding:12px 15px;
  border:1px solid #e7b4a9;
  background:#fff0ea;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:.85rem
}

.permission-banner {
  margin:20px 30px 0;
  background:#fff0be;
  border:1px solid #e7d48c;
  border-radius:10px;
  padding:13px 16px;
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:center;
  font-size:.85rem
}

.page-header {
  padding:34px 35px 25px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px
}

.page-header .eyebrow {
  display:block;
  margin-bottom:9px
}

.page-header p {
  color:var(--muted);
  font-size:.87rem;
  margin-top:12px;
  max-width:58ch
}

.header-actions {
  display:flex;
  gap:8px;
  align-items:center;
  padding-top:23px
}

.proposal-heading {
  max-width:850px
}

.heading-meta {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:15px
}

.heading-meta .muted {
  font-size:.75rem;
  margin-left:3px
}

.review-layout {
  display:grid;
  grid-template-columns:minmax(390px,1fr) 326px;
  gap:25px;
  padding:0 35px 40px;
  align-items:start
}

.review-primary {
  min-width:0
}

.tabbar {
  display:flex;
  gap:25px;
  border-bottom:1px solid var(--line);
  margin-bottom:24px
}

.tab {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:.86rem;
  font-weight:550;
  padding:11px 0 13px;
  position:relative
}

.tab[aria-selected="true"] {
  color:var(--ink)
}

.tab[aria-selected="true"]:after {
  content:"";
  position:absolute;
  bottom:-1px;
  height:3px;
  left:0;
  right:0;
  background:var(--coral);
  border-radius:3px
}

.tab-count {
  margin-left:6px;
  font-size:.7rem;
  background:#e9e4d9;
  padding:1px 5px;
  border-radius:4px
}

.panel {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
  margin-bottom:18px
}

.panel-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:15px
}

.panel .eyebrow {
  margin-bottom:12px;
  display:block
}

.summary-text {
  font-size:1.02rem;
  line-height:1.65;
  white-space:pre-wrap
}

.body-text {
  font-size:.89rem;
  line-height:1.7;
  white-space:pre-wrap;
  color:#4e4a42
}

.section-heading {
  font-size:.91rem;
  margin:25px 0 12px;
  font-weight:650
}

.acceptance {
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:12px
}

.acceptance li {
  display:flex;
  gap:10px;
  font-size:.86rem;
  line-height:1.6;
  white-space:pre-wrap
}

.check-mark {
  width:17px;
  height:17px;
  flex:none;
  border:1px solid #d3cec2;
  border-radius:5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#7b8b6c;
  font-size:.68rem;
  margin-top:3px;
  background:#f8f8f0
}

.links {
  display:grid;
  gap:8px;
  font-size:.85rem
}

.empty-panel {
  text-align:center;
  padding:44px 25px;
  background:#f4f0e8;
  border:1px dashed #d9d3c6;
  border-radius:var(--radius)
}

.empty-panel h2 {
  margin-bottom:10px
}

.empty-panel p {
  font-size:.87rem;
  color:var(--muted);
  max-width:45ch;
  margin:auto
}

.empty-panel .button {
  margin-top:20px
}

.approval-box {
  background:#eeeadf;
  border:1px solid #ded7c8;
  border-radius:var(--radius);
  padding:21px 23px
}

.approval-box p {
  font-size:.8rem;
  color:#5d574e;
  line-height:1.6;
  margin:9px 0 17px
}

.approval-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center
}

.scope-note {
  font-size:.74rem;
  color:var(--muted);
  margin-top:14px
}

.attention {
  border-left:3px solid #d6a92e;
  background:#fff5d8;
  padding:12px 14px;
  margin-bottom:18px;
  font-size:.83rem;
  line-height:1.6;
  border-radius:0 8px 8px 0
}

.evidence-panel {
  position:sticky;
  top:22px;
  background:#eeeadf;
  border:1px solid #e1dacd;
  border-radius:var(--radius);
  padding:18px
}

.evidence-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:17px
}

.evidence-title h2 {
  font-size:.85rem
}

.evidence-navigation {
  display:flex;
  gap:4px;
  align-items:center
}

.evidence-navigation .icon-button {
  height:29px;
  width:29px;
  font-size:1rem
}

.evidence-count {
  font-size:.7rem;
  color:var(--muted);
  font-variant-numeric:tabular-nums
}

.evidence-quote {
  font-size:.89rem;
  line-height:1.65;
  white-space:pre-wrap;
  margin:0 0 15px;
  max-height:240px;
  overflow:auto
}

.evidence-meta {
  font-size:.7rem;
  color:var(--muted);
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px
}

.screenshot-button {
  display:flex;
  width:100%;
  border:0;
  justify-content:center;
  background:#e3dfd5;
  padding:12px;
  border-radius:10px;
  position:relative;
  overflow:hidden
}

.screenshot-button:hover {
  background:#dad4c7
}

.screenshot-button img {
  display:block;
  max-width:100%;
  height:340px;
  object-fit:contain;
  border-radius:7px
}

.image-hint {
  font-size:.68rem;
  color:var(--muted);
  text-align:center;
  margin:9px 0 0
}

.asset-tabs {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:10px 0
}

.asset-tabs button {
  font-size:.7rem;
  padding:4px 8px;
  border:1px solid #d4ccbe;
  background:#f8f4eb;
  border-radius:6px
}

.asset-tabs button[aria-pressed="true"] {
  --focus-ring:var(--paper);
  background:var(--ink);
  color:white;
  border-color:var(--ink)
}

.evidence-id {
  font-size:.65rem;
  color:var(--muted);
  margin-top:15px;
  word-break:break-all
}

.missing-asset {
  font-size:.78rem;
  color:var(--muted);
  padding:25px;
  text-align:center;
  background:#e6e1d7;
  border-radius:8px
}

.feedback-toolbar {
  padding:0 35px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px
}

.search-field {
  position:relative;
  max-width:420px;
  flex:1
}

.search-field input {
  width:100%;
  min-height:42px;
  border:1px solid #dcd5c8;
  border-radius:9px;
  background:#fffefa;
  padding:10px 13px;
  font-size:.84rem
}

.feedback-selected {
  display:flex;
  gap:9px;
  align-items:center;
  font-size:.78rem;
  color:var(--muted)
}

.feedback-grid {
  padding:0 35px 35px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(245px,1fr));
  gap:18px
}

.feedback-card {
  border:1px solid var(--line);
  background:var(--white);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column
}

.feedback-card.selected {
  border-color:#ec8a7c;
  box-shadow:0 0 0 1px #ec8a7c
}

.feedback-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:13px 16px;
  color:var(--muted);
  font-size:.7rem
}

.feedback-card-top label {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:.7rem;
  font-weight:500
}

.feedback-card .screenshot-button {
  border-radius:0;
  padding:15px;
  background:#eeeae1
}

.feedback-card .screenshot-button img {
  height:240px
}

.feedback-card-body {
  padding:17px;
  display:flex;
  flex-direction:column;
  gap:14px;
  flex:1
}

.feedback-card-body .comment {
  font-size:.85rem;
  line-height:1.6;
  white-space:pre-wrap
}

.feedback-card-bottom {
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:5px
}

.source-group-chip {
  font-size:.67rem;
  color:#685021;
  background:#fff1c7;
  border:0;
  padding:4px 7px;
  border-radius:5px;
  text-align:left
}

.feedback-card .meta {
  font-size:.7rem;
  color:var(--muted)
}

.discussion-panel {
  display:flex;
  flex-direction:column;
  height:clamp(360px,85dvh,960px);
  min-height:360px;
  gap:14px
}

.conversation {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  gap:18px;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  padding:4px 8px 4px 4px
}

.conversation:focus-visible {
  outline:2px solid var(--focus-ring);
  outline-offset:-2px;
  border-radius:var(--radius)
}

.conversation > * {
  flex-shrink:0
}

.conversation .empty-panel {
  margin:auto 0
}

.chat-latest {
  align-self:center;
  flex:none
}

.message {
  max-width:94%;
  align-self:flex-start;
  background:#fffefa;
  border:1px solid var(--line);
  border-radius:13px 13px 13px 3px;
  padding:17px 19px;
  box-shadow:var(--shadow)
}

.message.user {
  align-self:flex-end;
  background:#ffe0d7;
  border-color:#f6c9bc;
  border-radius:13px 13px 3px 13px
}

.message-role {
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.045em;
  margin-bottom:8px;
  color:#74675e
}

.message-text {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:.87rem;
  line-height:1.7
}

.message-time {
  font-size:.63rem;
  color:var(--muted);
  margin-top:9px
}

.chat-intro {
  font-size:.79rem;
  color:var(--muted);
  flex:none;
  line-height:1.65
}

.chat-form {
  flex:none;
  background:var(--white);
  border:1px solid #d9d2c4;
  border-radius:var(--radius);
  padding:12px;
  box-shadow:var(--shadow)
}

.chat-form textarea {
  width:100%;
  resize:vertical;
  min-height:70px;
  max-height:120px;
  border:0;
  background:transparent;
  padding:6px;
  font-size:.87rem;
  line-height:1.6
}

.chat-form:has(textarea:focus-visible) {
  outline:2px solid var(--focus-ring);
  outline-offset:-2px
}

.chat-form:has(textarea:focus-visible) textarea {
  outline:none
}

.chat-form-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:3px 3px 0
}

.chat-form-footer small {
  font-size:.68rem;
  color:var(--muted)
}

.chat-activity {
  width:100%;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#f0ede580;
  padding:0 14px;
  font-size:.78rem
}

.chat-activity-details > summary {
  cursor:pointer;
  padding:12px 0
}

.chat-activity-title {
  font-weight:600;
  color:var(--ink)
}

.chat-activity-preview {
  display:block;
  margin:4px 0 0 16px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.chat-activity-list {
  list-style:none;
  margin:0;
  padding:0 0 12px
}

.chat-activity-step {
  border-top:1px solid var(--line);
  padding:12px 0
}

.chat-step-label {
  font-size:.7rem;
  font-weight:600;
  margin-bottom:5px
}

.chat-step-text {
  font-size:.78rem;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:0;
  color:var(--ink)
}

.chat-activity-actions {
  display:flex;
  justify-content:flex-end;
  padding:0 0 8px
}

.chat-activity-empty {
  padding-bottom:12px
}

.chat-activity .job-error {
  margin:0 0 12px
}

.draft-card {
  background:#fff4d5;
  border:1px solid #e6d49c;
  border-radius:var(--radius);
  padding:20px;
  margin:20px 0
}

.conversation .draft-card {
  margin:0
}

.draft-card h3 {
  margin:8px 0
}

.draft-card p {
  font-size:.84rem;
  line-height:1.6
}

.draft-card .button {
  margin-top:15px
}

.suggestion-highlights {
  margin:12px 0;
  padding-left:20px;
  font-size:.84rem;
  line-height:1.6
}

.suggestion-highlights li + li {
  margin-top:7px
}

.suggestion-detail {
  font-size:.78rem;
  margin-top:12px
}

.suggestion-detail summary {
  cursor:pointer;
  width:max-content
}

.suggestion-detail section {
  border-top:1px solid #e6d49c;
  margin-top:12px;
  padding-top:12px
}

.suggestion-detail .small-label {
  margin:12px 0 4px
}

.suggestion-card .suggestion-caption,.suggestion-card .suggestion-status {
  font-size:.74rem;
  color:var(--muted);
  margin-top:10px
}

.job-card {
  margin-bottom:18px
}

.job-heading {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:14px
}

.job-heading h3 {
  margin-bottom:5px
}

.job-time {
  font-size:.71rem;
  color:var(--muted)
}

.job-actions {
  display:flex;
  gap:6px;
  margin:15px 0 0
}

.event-list {
  margin:20px 0 0;
  padding:0;
  list-style:none
}

.event {
  padding:12px 0 12px 18px;
  border-left:1px solid #ddd7cb;
  position:relative
}

.event:before {
  content:"";
  position:absolute;
  left:-3px;
  top:19px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#aaa28e
}

.event-head {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:.73rem;
  color:var(--muted)
}

.event-head strong {
  color:#4a453c;
  font-weight:600
}

.event-body {
  font-size:.78rem;
  line-height:1.6;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin-top:5px
}

.event details pre {
  font-size:.72rem;
  max-height:200px;
  overflow:auto
}

.job-error {
  font-size:.81rem;
  color:#953e32;
  background:#fff0e9;
  border-radius:7px;
  padding:12px;
  white-space:pre-wrap
}

.decision-record {
  padding:10px 0;
  border-bottom:1px solid var(--line);
  font-size:.8rem
}

.decision-record:last-child {
  border:0
}

.decision-record p {
  font-size:.76rem;
  color:var(--muted);
  margin-top:4px;
  white-space:pre-wrap
}

.welcome {
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:35px;
  gap:22px
}

.welcome .wordmark {
  font-size:4.5rem;
  margin-bottom:15px
}

.welcome h1 {
  font-size:1.6rem
}

.welcome p {
  color:var(--muted);
  font-size:.93rem;
  max-width:45ch;
  line-height:1.7
}

.welcome .error {
  color:#9d3327
}

.skip-link {
  position:fixed;
  left:15px;
  top:-80px;
  background:var(--ink);
  color:white;
  padding:10px 15px;
  z-index:100
}

.skip-link:focus {
  top:10px
}

.toast {
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:25px;
  max-width:90vw;
  background:var(--ink);
  color:#fffefa;
  border:1px solid #454139;
  border-radius:10px;
  padding:12px 19px;
  font-size:.83rem;
  box-shadow:0 8px 30px #17171728;
  z-index:50
}

dialog {
  width:min(700px,calc(100vw - 32px));
  padding:0;
  border:1px solid #d3ccbd;
  border-radius:17px;
  background:var(--white);
  color:var(--ink);
  box-shadow:0 30px 80px #17171740;
  max-height:calc(100dvh - 48px)
}

dialog::backdrop {
  background:#26221866;
  backdrop-filter:blur(3px)
}

.dialog-header {
  padding:23px 26px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border-bottom:1px solid var(--line)
}

.dialog-header .eyebrow {
  display:block;
  margin-bottom:6px
}

.dialog-body {
  padding:23px 26px;
  display:flex;
  flex-direction:column;
  gap:20px;
  max-height:calc(100dvh - 240px);
  overflow:auto;
  font-size:.88rem
}

.dialog-footer {
  display:flex;
  justify-content:flex-end;
  gap:9px;
  padding:17px 26px;
  border-top:1px solid var(--line);
  background:#f4f0e7
}

.editor-body>label,.dialog-body>label,.editor-more>label {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-weight:600;
  font-size:.8rem
}

.dialog-body input[type=text],.dialog-body input:not([type]),.dialog-body textarea,.dialog-body select {
  width:100%;
  background:white;
  color:var(--ink);
  border:1px solid #d8d1c3;
  padding:10px 11px;
  border-radius:8px;
  font-size:.87rem;
  line-height:1.5;
  font-weight:400
}

.dialog-body textarea {
  resize:vertical;
  min-height:70px
}

.form-row {
  display:flex;
  gap:17px
}

.form-row>label {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:7px;
  font-size:.8rem;
  font-weight:600
}

.field-hint {
  font-size:.73rem;
  font-weight:400;
  color:var(--muted)
}

fieldset {
  border:0;
  padding:0;
  margin:0
}

legend {
  font-size:.8rem;
  font-weight:600;
  margin-bottom:9px
}

.check-options {
  display:flex;
  gap:15px;
  flex-wrap:wrap
}

.check-options label,.source-option {
  display:flex;
  gap:9px;
  align-items:flex-start;
  font-size:.82rem;
  font-weight:400
}

.check-options label {
  padding:9px 13px;
  background:#f1ede4;
  border:1px solid #e0d9cb;
  border-radius:8px
}

input[type=checkbox] {
  accent-color:#ad493b;
  width:16px;
  height:16px;
  flex:none;
  margin:2px 0 0
}

.editor-evidence {
  border-top:1px solid var(--line);
  padding-top:15px
}

.editor-evidence>p {
  margin:8px 0 13px
}

.source-options {
  max-height:220px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:8px
}

.source-option {
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  line-height:1.5
}

.source-option:last-child {
  border-bottom:0
}

.source-option span {
  display:block;
  font-size:.75rem;
  color:var(--muted);
  margin-top:3px
}

.editor-more {
  border-top:1px solid var(--line);
  padding-top:12px
}

.editor-more>label {
  margin-top:15px
}

.form-error {
  color:#9b3428;
  font-size:.84rem;
  padding:10px 12px;
  background:#ffebe4;
  border-radius:7px
}

.revision-summary {
  border:1px solid var(--line);
  border-radius:9px;
  padding:15px;
  background:#f3f0e7
}

.revision-summary strong {
  display:block
}

.revision-summary p {
  font-size:.8rem;
  margin-top:9px;
  line-height:1.6;
  white-space:pre-wrap
}

.revision-summary small {
  display:block;
  color:var(--muted);
  margin-top:10px
}

.code-block {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  max-height:380px;
  overflow:auto;
  background:#eeeae2;
  border:1px solid #dfd7c8;
  border-radius:8px;
  padding:15px;
  font-size:.76rem
}

.image-dialog {
  width:min(1000px,calc(100vw - 32px));
  background:#eae6dd
}

.image-dialog .dialog-header {
  background:var(--white)
}

#image-body {
  display:flex;
  justify-content:center;
  padding:22px;
  overflow:auto;
  max-height:calc(100dvh - 150px)
}

#image-body img {
  max-width:100%;
  height:auto;
  object-fit:contain;
  max-height:calc(100dvh - 195px);
  border-radius:8px
}

.section-loading {
  padding:35px;
  color:var(--muted);
  font-size:.9rem
}

@media(min-width:1600px) {
  .review-layout {
    grid-template-columns:minmax(0,1fr) 375px
  }
  .screenshot-button img {
    height:420px
  }
  .page-header,.workspace-toolbar {
    padding-left:50px;
    padding-right:50px
  }
  .review-layout,.feedback-grid {
    padding-left:50px;
    padding-right:50px
  }
  .feedback-toolbar {
    padding-left:50px;
    padding-right:50px
  }
}

@media(max-width:1150px) {
  .shell {
    grid-template-columns:235px minmax(0,1fr)
  }
  .sidebar {
    padding-left:10px;
    padding-right:10px
  }
  .review-layout {
    grid-template-columns:minmax(300px,1fr) 270px;
    gap:18px;
    padding:0 23px 30px
  }
  .page-header {
    padding:28px 23px 22px
  }
  .workspace-toolbar {
    padding:0 23px
  }
  #workspace-caption {
    display:none
  }
  .evidence-panel {
    padding:15px
  }
  .screenshot-button img {
    height:280px
  }
  .panel {
    padding:20px
  }
  .feedback-grid {
    padding:0 23px 30px
  }
  .feedback-toolbar {
    padding:0 23px 20px
  }
}

@media(max-width:950px) {
  .shell {
    grid-template-columns:210px minmax(0,1fr)
  }
  .review-layout {
    grid-template-columns:1fr
  }
  .evidence-panel {
    position:static;
    order:-1
  }
  .evidence-content {
    display:grid;
    grid-template-columns:1fr 150px;
    gap:15px;
    align-items:start
  }
  .evidence-content .screenshot-button img {
    height:200px
  }
  .evidence-content .evidence-id {
    margin-top:10px
  }
  .evidence-content .asset-tabs {
    grid-column:2
  }
  .brand {
    padding-left:12px
  }
  .page-header {
    gap:14px
  }
  .header-actions {
    padding-top:20px
  }
  .tabbar {
    margin-bottom:18px
  }
  .evidence-quote {
    max-height:180px
  }
  .feedback-toolbar {
    flex-wrap:wrap
  }
  .feedback-selected {
    width:100%;
    justify-content:flex-end
  }
}

@media(max-width:650px) {
  :root {
    font-size:15px
  }
  .shell {
    display:block
  }
  .sidebar {
    position:static;
    height:auto;
    padding:20px 18px;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .brand {
    flex-direction:row;
    align-items:center;
    gap:25px;
    padding:0
  }
  .brand .wordmark {
    font-size:2.3rem
  }
  .brand-label {
    font-size:.61rem
  }
  .workspace-label {
    position:absolute;
    right:19px;
    top:22px;
    font-size:.65rem;
    padding:0;
    max-width:80px
  }
  .brand-label {
    display:none
  }
  .view-nav {
    flex-direction:row;
    gap:5px;
    margin:23px 0 16px
  }
  .nav-button {
    padding:9px 10px;
    font-size:.77rem;
    gap:6px;
    flex:1;
    justify-content:center
  }
  .nav-count {
    font-size:.65rem;
    min-width:20px
  }
  .proposal-list {
    flex-direction:row;
    overflow:auto;
    padding-bottom:5px
  }
  .proposal-nav {
    width:230px;
    flex:none
  }
  .sidebar-section {
    padding-left:0;
    padding-right:4px
  }
  .rounds {
    display:none
  }
  .sidebar-footer {
    border:0;
    margin:12px 0 0;
    padding:0;
    display:flex;
    justify-content:flex-end
  }
  .sidebar-footer p,.sidebar-footer .small-label {
    display:none
  }
  .sidebar-footer .button {
    width:auto;
    min-height:32px;
    padding:6px 11px;
    font-size:.73rem
  }
  .workspace-toolbar {
    height:56px;
    padding:0 20px
  }
  .page-header {
    padding:25px 20px 22px;
    display:block
  }
  .header-actions {
    padding-top:17px
  }
  .review-layout {
    padding:0 20px 25px
  }
  .feedback-toolbar {
    padding:0 20px 20px
  }
  .feedback-grid {
    padding:0 20px 25px;
    grid-template-columns:1fr
  }
  .feedback-card .screenshot-button img {
    height:280px
  }
  .notice,.permission-banner {
    margin:16px 20px 0;
    align-items:flex-start
  }
  .permission-banner {
    flex-direction:column
  }
  .panel,.approval-box {
    padding:19px
  }
  .dialog-header,.dialog-body {
    padding-left:20px;
    padding-right:20px
  }
  .dialog-footer {
    padding:15px 20px
  }
  .evidence-content {
    grid-template-columns:1fr 125px
  }
  .evidence-content .screenshot-button img {
    height:180px
  }
  .approval-actions .primary {
    width:100%
  }
  .chat-form-footer {
    align-items:flex-end
  }
  .chat-form-footer small {
    max-width:20ch
  }
  .workspace-toolbar .eyebrow {
    font-size:.6rem
  }
  .connection-status {
    font-size:.66rem
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
  button:active:not(:disabled) {
    transform:none
  }
}

@media(prefers-reduced-transparency:reduce) {
  .workspace-toolbar {
    background:var(--paper);
    backdrop-filter:none
  }
  dialog::backdrop {
    backdrop-filter:none
  }
}

@media(prefers-contrast:more) {
  :root {
    --muted:#49463f;
    --line:#948b7a
  }
  .panel,.evidence-panel,.button,.nav-button[aria-current=page] {
    border:1px solid #817866
  }
  .workspace-toolbar {
    background:var(--paper);
    backdrop-filter:none
  }
}

.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}

.sidebar-empty {
  padding:10px 12px;
  font-size:.78rem
}

.initial-empty {
  margin:0 35px 35px
}

.decision-history {
  margin:20px 0;
  font-size:.78rem;
  color:var(--muted)
}

.sidebar-footer .button+.button {
  margin-top:8px
}

.sidebar-footer .assessment-note {
  font-size:.68rem;
  margin-bottom:0
}

.badge.pr_ready {
  color:#345c42;
  background:#e3eee4
}

@media(max-width:650px) {
  .sidebar-footer {
    flex-wrap:wrap;
    gap:8px
  }
  .sidebar-footer .button+.button {
    margin-top:0
  }
  .sidebar-footer .assessment-note {
    display:block;
    width:100%;
    text-align:right;
    margin:0
  }
  .initial-empty {
    margin:0 20px 25px
  }
}

.dialog-body select {
  min-height:42px
}

.result-links {
  margin-top:15px
}

.result-details {
  margin-top:16px;
  font-size:.76rem;
  color:var(--muted)
}

/* Delivery status remains distinct from evidence and implementation state. */
.badge.merged {
  background:#e5edda;
  color:#354a2f
}

.badge.open {
  background:#e5ebff;
  color:#304b93
}

.badge.partially_merged,.badge.unknown {
  background:#fff0bf;
  color:#665014
}

.badge.closed {
  background:#f3e5df;
  color:#714838
}

.delivery-panel h3 {
  margin:6px 0 10px
}

.delivery-list {
  list-style:none;
  padding:0;
  margin:14px 0 0
}

.delivery-item + .delivery-item {
  border-top:1px solid var(--line);
  margin-top:14px;
  padding-top:14px
}

.delivery-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px
}

.delivery-heading a {
  font-weight:600
}

.delivery-meta {
  color:var(--muted);
  font-size:.8rem;
  margin-top:6px
}

.delivery-warning {
  color:#795018;
  font-size:.86rem;
  margin-top:8px
}

/* AI output stays bounded; status and the next action precede the details. */
.activity-panel {
  height:min(720px,70dvh);
  min-height:360px;
  overflow:auto;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  padding:2px 8px 8px 2px
}
.output-scroll,.chat-activity-list {
  max-height:min(320px,45dvh);
  overflow:auto;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  overflow-wrap:anywhere
}
.output-scroll {
  margin-top:10px;
  padding:2px 10px 2px 2px
}
.output-scroll .code-block,.output-scroll .body-text,.output-scroll .message-text {
  max-height:none;
  overflow:visible
}
.output-disclosure > summary {
  padding:6px 0;
  font-size:.76rem;
  font-weight:600;
  color:var(--muted);
  cursor:pointer
}
.output-disclosure[open] > summary {
  color:var(--ink)
}
/* Only keyed containers own scrolling; their children flow naturally so
   polling cannot reset an untracked nested scrollbar. */
.readable-output > .output-scroll:first-child {
  margin-top:0
}
.job-progress {
  background:#f1eee5;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:12px 14px;
  margin:10px 0 14px
}
.progress-title {
  display:block;
  font-size:.88rem;
  line-height:1.4
}
.progress-next {
  font-size:.8rem;
  line-height:1.5;
  margin:5px 0 0;
  color:var(--ink)
}
.progress-detail,.progress-updated {
  display:block;
  font-size:.72rem;
  line-height:1.5;
  color:var(--muted);
  margin:6px 0 0
}
.chat-activity .job-progress {
  margin:0 0 4px;
  background:transparent;
  border:0;
  padding:0 0 8px
}
.output-scroll:focus-visible,.activity-panel:focus-visible,.chat-activity-list:focus-visible {
  outline:2px solid var(--focus-ring);
  outline-offset:-2px;
  border-radius:6px
}

/* The conversation owns vertical scrolling; expanded messages and tool details
   flow inside it instead of competing with its scrollbar. */
.conversation .output-scroll,
.conversation .chat-activity-list,
.conversation .chat-step-text,
.conversation .code-block {
  max-height:none;
  overflow:visible;
  overscroll-behavior:auto;
  scrollbar-gutter:auto
}
.conversation {
  padding-right:18px
}

.conversation .message {
  min-width:0;
  max-width:100%
}
.conversation .message-text {
  margin:0
}
