:root {
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    sans-serif;
  color-scheme: dark;
  --bg:#080f1d;
  --panel:#101e31;
  --edge:#2b4058;
  --text:#e8f1fa;
  --muted:#a4b7ca;
  --mint:#7aead0;
  --cyan:#8ccfff;
  --warning:#f2c08d;
  --danger:#ffa6a6;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .5;
}
a {
  color: var(--mint);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -.035em;
  margin-bottom: 12px;
}
h2 {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 12px;
}
h3 {
  font-size: 15px;
}
button,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
}
[hidden],
.hide {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  top: 10px;
  left: 20px;
  z-index: 10;
  background: var(--mint);
  color: var(--bg);
  padding: 12px;
}
.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
}
.app-header {
  height: 78px;
  padding: 14px max(24px, calc((100vw - 1400px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--edge);
  background: #0b1525;
  position: sticky;
  top: 0;
  z-index: 5;
}
.logo {
  font-size: 23px;
  font-weight: 850;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--text);
}
.logo span {
  color: var(--mint);
}
.logo small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .2em;
  font-weight: 600;
}
.connection {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.status-marker {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 2px;
  flex-shrink: 0;
}
.connection[data-state=synced] .status-marker {
  background: var(--mint);
}
.connection[data-state=syncing] .status-marker,
.connection[data-state=pending] .status-marker {
  background: var(--cyan);
}
.connection[data-state=offline] .status-marker,
.connection[data-state=error] .status-marker {
  background: var(--warning);
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 0 28px 48px;
}
.view-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--edge);
  padding: 16px 0;
  margin-bottom: 28px;
}
.view-nav button {
  padding: 10px 18px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 650;
}
.view-nav button[aria-current=page] {
  color: var(--mint);
  background: #143033;
  border-color: #305c5c;
}
.view-nav button span {
  margin-right: 8px;
}
.view-nav .nav-logout {
  margin-left: auto;
  font-size: 12px;
}
.eyebrow {
  color: var(--mint);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 750;
  margin-bottom: 8px;
}
.muted,
.help,
.metric-label {
  color: var(--muted);
}
.help {
  font-size: 12px;
  line-height: 1.6;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.page-heading p {
  margin-bottom: 0;
}
.panel {
  border: 1px solid var(--edge);
  background: var(--panel);
  border-radius: 12px;
  padding: 24px;
  min-width: 0;
}
.section-heading,
.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.section-heading h2 {
  margin-bottom: 8px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.metrics > div {
  background: #0d1a2b;
  border: 1px solid var(--edge);
  border-radius: 9px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.metric-label {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.metrics strong {
  font-size: 32px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.metrics > div:last-child strong {
  color: var(--warning);
}
.metrics .help {
  margin: 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
}
.dashboard-side {
  display: grid;
  gap: 20px;
  align-content: start;
}
.attention-panel {
  border-top: 2px solid var(--cyan);
}
.resume-panel {
  border-top: 2px solid var(--mint);
}
.sync-panel p {
  margin-bottom: 12px;
}
.card-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.issue-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #0c1829;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  transition: background-color .14s, border-color .14s;
}
.issue-card:hover {
  border-color: #54768b;
  background: #15263b;
}
.issue-card[aria-current=true] {
  border-color: var(--mint);
  box-shadow: inset 3px 0 var(--mint);
}
.issue-card.is-conflict {
  border-left: 3px solid var(--warning);
}
.issue-card.is-pending {
  border-right: 3px solid var(--cyan);
}
.issue-card strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
  font-weight: 650;
  margin: 5px 0 8px;
}
.issue-card .excerpt {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.issue-id {
  color: var(--muted);
  font-size: 10px;
  font-family: Consolas, monospace;
}
.badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1.5;
  padding: 3px 7px;
  border: 1px solid #3b5167;
  border-radius: 5px;
  color: #c5d6e7;
  background: #14243a;
}
.badge.warning {
  border-color: #74604c;
  color: var(--warning);
  background: #302b28;
}
.badge.mint {
  color: var(--mint);
  border-color: #386359;
  background: #163130;
}
.badge.cyan {
  color: var(--cyan);
  border-color: #375f7c;
  background: #142d43;
}
.signal-reason {
  color: var(--warning);
  font-size: 11px;
  margin-bottom: 10px;
}
.empty-state {
  font-size: 13px;
  color: var(--muted);
  padding: 22px 0;
  margin: 0;
}
.resume-title {
  font-size: 20px;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.btn {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 11px 16px;
  background: var(--mint);
  color: #0a2421;
  font-weight: 700;
  font-size: 13px;
  min-height: 44px;
  transition: background-color .14s, border-color .14s;
}
.btn:hover:not(:disabled) {
  background: #a0f3e0;
}
.btn.secondary {
  background: #1d354d;
  color: var(--text);
  border-color: #3b5871;
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--edge);
}
.btn.secondary:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) {
  border-color: var(--cyan);
  background: #203b53;
}
.text-button {
  background: transparent;
  color: var(--mint);
  border: 0;
  padding: 7px 0;
  min-height: 36px;
  font-size: 12px;
  text-align: left;
}
.text-button:hover {
  text-decoration: underline;
}
.text-button:disabled {
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #bfd0df;
  margin: 16px 0 7px;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid #354d65;
  border-radius: 7px;
  background: #0a1626;
  color: var(--text);
  padding: 12px;
  font-size: 14px;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--mint);
  outline: 2px solid #76e8ce33;
  outline-offset: 0;
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}
textarea::placeholder,
input::placeholder {
  color: #839cb4;
}
.capture-panel textarea {
  min-height: 135px;
}
.capture-panel .buttons .help {
  flex: 1;
  min-width: 130px;
}
.save-state {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--edge);
  padding: 5px 8px;
  border-radius: 5px;
  white-space: normal;
}
.save-state[data-state=saved],
.save-state[data-state=synced] {
  color: var(--mint);
  border-color: #346355;
}
.save-state[data-state=saving] {
  color: var(--cyan);
}
.save-state[data-state=error] {
  color: var(--warning);
  border-color: #74604c;
}
.notice {
  border: 1px solid #346355;
  border-left: 3px solid var(--mint);
  padding: 12px 16px;
  margin-top: 16px;
  background: #143031;
  border-radius: 6px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.notice.warning {
  border-color: #74604c;
  border-left-color: var(--warning);
  background: #302b28;
}
.notice:empty {
  display: none;
}
.auth {
  max-width: 500px;
  margin: 64px auto;
}
.auth h1 {
  font-size: 32px;
  margin: 20px 0;
}
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.issue-browser {
  padding: 20px;
}
.issue-browser .card-list {
  max-height: 65vh;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
  scrollbar-color: #3b5a73 #101e31;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}
.filter-row label {
  font-size: 11px;
}
.check-label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 400;
}
.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint);
  padding: 0;
}
.editor-heading h2 {
  font-size: 23px;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}
.editor-heading .eyebrow {
  font-family: Consolas, monospace;
}
.editor-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--edge);
  margin: 12px 0 18px;
  padding-bottom: 6px;
}
.editor-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 5px;
  font-size: 12px;
  font-weight: 650;
  min-height: 44px;
  border-bottom: 2px solid transparent;
}
.editor-tabs button[aria-selected=true] {
  background: #142d3d;
  border-bottom-color: var(--cyan);
  color: var(--cyan);
  border-radius: 5px 5px 0 0;
}
.editor-section {
  min-height: 340px;
}
.observation-input {
  min-height: 210px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.classification {
  border-top: 1px solid var(--edge);
  margin-top: 24px;
}
.editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 0;
  background: var(--panel);
  border-top: 1px solid var(--edge);
  position: sticky;
  bottom: 0;
  z-index: 1;
}
.editor-back {
  margin-bottom: 16px;
}
.utilities {
  margin-top: 20px;
  border-top: 1px solid var(--edge);
  padding-top: 16px;
}
summary {
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
}
pre {
  font: 12px/1.6 Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
}
.conflict-banner {
  background: #302b28;
  border: 1px solid #74604c;
  border-left: 3px solid var(--warning);
  border-radius: 6px;
  padding: 14px;
  margin: 12px 0;
  color: var(--warning);
  font-size: 12px;
}
.conflict-banner p {
  margin: 5px 0;
}
.view-panel {
  scroll-margin-top: 100px;
}
@media (min-width: 901px) {
  .editor-back {
    display: none;
  }
  .issue-browser {
    position: sticky;
    top: 100px;
  }
}
@media (max-width: 900px) {
  main {
    padding: 0 18px calc(100px + env(safe-area-inset-bottom));
  }
  .app-header {
    height: 66px;
    padding: 12px 18px;
  }
  .logo {
    font-size: 19px;
  }
  .connection {
    font-size: 11px;
    max-width: 160px;
  }
  .view-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;
    background: #0b1525;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    margin: 0;
    border-top: 1px solid var(--edge);
    border-bottom: 0;
    gap: 5px;
  }
  .view-nav button {
    flex: 1;
    padding: 11px 8px;
    font-size: 13px;
  }
  .view-nav .nav-logout {
    flex: 0;
    font-size: 10px;
    padding: 11px 8px;
  }
  .page-heading {
    margin: 24px 0 20px;
    align-items: flex-start;
  }
  .page-heading > .btn {
    padding: 10px;
    font-size: 11px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    grid-template-columns: 1fr 1fr;
  }
  .capture-panel {
    grid-row: 2;
  }
  .metrics {
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics > div {
    padding: 12px 16px;
  }
  .metrics strong {
    font-size: 27px;
  }
  .workspace-layout {
    display: block;
  }
  .workspace-editing #workspaceListColumn {
    display: none;
  }
  #workspaceEditorColumn {
    display: none;
  }
  .workspace-editing #workspaceEditorColumn {
    display: block;
  }
  .issue-browser .card-list {
    max-height: none;
    overflow: visible;
  }
  .editor-actions {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .panel {
    padding: 20px;
  }
  .editor-section {
    min-height: 310px;
  }
  .view-panel {
    scroll-margin-top: 80px;
  }
}
@media (max-width: 520px) {
  .dashboard-side {
    grid-template-columns: 1fr;
  }
  .field-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .panel {
    padding: 18px;
  }
  .section-heading {
    gap: 8px;
  }
  .editor-heading {
    flex-direction: column;
    gap: 0;
  }
  .editor-heading h2 {
    font-size: 21px;
  }
  .editor-tabs {
    gap: 0;
    margin-top: 20px;
  }
  .editor-tabs button {
    font-size: 11px;
  }
  .metrics .text-button {
    font-size: 11px;
  }
  .editor-actions {
    bottom: calc(65px + env(safe-area-inset-bottom));
  }
  .capture-panel .save-state {
    max-width: 120px;
  }
  .filter-row {
    grid-template-columns: 1fr;
  }
  .check-label {
    margin: 8px 0;
  }
  .auth {
    margin-top: 32px;
  }
  .auth h1 {
    font-size: 29px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
#workspaceEditorColumn {
  scroll-margin-top: 96px;
}
@media (max-width: 900px) {
  #workspaceEditorColumn {
    scroll-margin-top: 82px;
  }
}
