:root {
  --forest: #163c2d;
  --forest-2: #245b43;
  --ink: #17231d;
  --muted: #647269;
  --paper: #f3f1ea;
  --surface: #fffefa;
  --line: #d9ded7;
  --yellow: #e9b949;
  --red: #b65247;
  --blue: #376f91;
  --mint: #dceee4;
  --shadow: 0 18px 55px rgba(20, 45, 34, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.noscript {
  background: var(--red);
  color: white;
  padding: 12px;
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--forest);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 28px 20px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  color: white;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--yellow);
  border-radius: 8px;
  color: var(--forest);
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.11em;
}

.brand small {
  color: #bed3c6;
  font-size: 10px;
  margin-top: 3px;
}

.rail-nav {
  display: grid;
  gap: 5px;
  margin-top: 48px;
}

.nav-item {
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: #c9dbd1;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--yellow);
  color: white;
}

.rail-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: auto;
  padding: 20px 6px 0;
}

.rail-foot p {
  color: #a9c1b4;
  font-size: 10px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.public-signal,
.live-badge {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.public-signal i,
.live-badge i {
  background: #5ed28f;
  border-radius: 100%;
  box-shadow: 0 0 0 4px rgba(94, 210, 143, 0.12);
  height: 7px;
  width: 7px;
}

.main-stage {
  min-width: 0;
  padding: 0 clamp(24px, 4vw, 64px);
}

.command-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 106px;
}

.kicker {
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 31px;
}

h2 {
  font-size: 25px;
}

.command-actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.search-control span {
  color: var(--muted);
  display: block;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.search-control input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  height: 39px;
  min-width: 230px;
  padding: 0 12px;
}

.command-button,
.quiet-button,
.danger-button {
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  min-height: 39px;
  padding: 0 14px;
}

.command-button {
  background: var(--forest);
  border: 1px solid var(--forest);
  color: white;
}

.quiet-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--forest);
}

.danger-button {
  background: #faece9;
  border: 1px solid #e9c0ba;
  color: #843a32;
}

.view {
  padding: 34px 0 30px;
}

.metric-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-strip article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 9px 28px rgba(20, 45, 34, 0.04);
  min-width: 0;
  padding: 19px;
}

.metric-strip span,
.task-head,
.document-head {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metric-strip strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  margin: 9px 0 5px;
}

.metric-strip small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  line-height: 1.4;
}

.work-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  margin-top: 38px;
}

.signal-column {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.section-toolbar {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.section-toolbar.compact {
  align-items: center;
}

.page-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.page-heading > div > p:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.segment {
  background: #e8e9e3;
  border-radius: 7px;
  display: flex;
  padding: 3px;
}

.segment button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  padding: 7px 9px;
}

.segment button.active {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(25, 42, 34, 0.08);
  color: var(--forest);
}

.task-table,
.document-table {
  margin-top: 16px;
}

.task-head,
.task-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(190px, 1.6fr) 0.7fr 0.7fr 0.65fr;
}

.task-head,
.document-head {
  padding: 0 12px 9px;
}

.task-row,
.document-row {
  align-items: center;
  border-top: 1px solid var(--line);
  min-height: 66px;
  padding: 10px 12px;
}

.task-row:hover,
.document-row:hover {
  background: rgba(255, 254, 250, 0.66);
}

.task-row strong,
.document-row strong {
  font-size: 12px;
}

.task-row span,
.document-row span,
.document-row time {
  color: var(--muted);
  font-size: 11px;
}

.status-chip,
.policy-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px !important;
  font-weight: 800;
  justify-self: start;
  padding: 5px 8px;
  text-transform: uppercase;
}

.status-open {
  background: #f9e8e5;
  color: #853c33 !important;
}

.status-review {
  background: #e6eff5;
  color: #315f79 !important;
}

.status-done,
.policy-chip {
  background: var(--mint);
  color: var(--forest) !important;
}

.signal-list,
.activity-timeline {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.signal-list li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.signal-list strong,
.activity-timeline strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.signal-list span,
.activity-timeline span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-top: 5px;
}

.live-badge {
  color: var(--forest);
}

.document-head,
.document-row {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(190px, 1.5fr) 0.7fr 0.6fr 0.65fr auto;
}

.sample-upload-zone {
  align-items: center;
  background: var(--surface);
  border: 1px dashed #91ad9d;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 24px;
  min-height: 128px;
  padding: 20px;
  text-align: center;
}

.sample-upload-zone:hover,
.sample-upload-zone.dragging {
  background: var(--mint);
  border-color: var(--forest-2);
}

.sample-upload-zone strong {
  font-size: 13px;
}

.sample-upload-zone span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
}

.sample-upload-zone input {
  display: none;
}

.sample-share-notice {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.document-action {
  background: var(--mint);
  border: 0;
  border-radius: 6px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 800;
  min-height: 32px;
  padding: 0 10px;
}

.activity-timeline {
  margin-left: 12px;
  max-width: 850px;
}

.activity-timeline li {
  border-left: 2px solid var(--line);
  padding: 0 0 26px 28px;
  position: relative;
}

.activity-timeline li::before {
  background: var(--yellow);
  border: 4px solid var(--paper);
  border-radius: 100%;
  content: "";
  height: 13px;
  left: -8px;
  position: absolute;
  top: 0;
  width: 13px;
}

.device-list {
  display: grid;
  gap: 1px;
  margin-top: 16px;
}

.device-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(180px, 1fr) minmax(330px, 1.5fr) auto;
  margin-top: -1px;
  padding: 18px;
}

.device-row:first-child {
  border-radius: 7px 7px 0 0;
}

.device-row:last-child {
  border-radius: 0 0 7px 7px;
}

.device-name strong,
.device-name span {
  display: block;
}

.device-name strong {
  font-size: 13px;
}

.device-name span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.scope-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.scope-switches label {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
}

.scope-switches input {
  accent-color: var(--forest-2);
  height: 16px;
  width: 16px;
}

.device-state {
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.privacy-layout {
  display: grid;
  gap: 60px;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
}

.privacy-layout h2 {
  font-size: 44px;
  line-height: 1.05;
}

.privacy-lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.boundary-list {
  margin: 0;
}

.boundary-list div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: 150px 1fr;
  padding: 17px 0;
}

.boundary-list dt {
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 800;
}

.boundary-list dd {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  padding: 28px;
  text-align: center;
}

.stage-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  padding: 20px 0 30px;
  text-transform: uppercase;
}

@media (max-width: 1050px) {
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-grid,
  .privacy-layout {
    grid-template-columns: 1fr;
  }

  .signal-column {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }

  .device-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .rail {
    min-height: auto;
    padding: 16px;
    position: static;
  }

  .rail-nav {
    display: flex;
    margin-top: 18px;
    overflow-x: auto;
  }

  .nav-item {
    border-bottom: 3px solid transparent;
    border-left: 0;
    flex: 0 0 auto;
    padding: 9px 12px;
  }

  .nav-item:hover,
  .nav-item.active {
    border-bottom-color: var(--yellow);
    border-left-color: transparent;
  }

  .rail-foot {
    display: none;
  }

  .main-stage {
    padding: 0 16px;
  }

  .command-bar,
  .command-actions,
  .section-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .command-bar {
    padding: 22px 0;
  }

  .search-control input {
    min-width: 0;
    width: 100%;
  }

  .command-button {
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .task-head,
  .document-head {
    display: none;
  }

  .task-row,
  .document-row {
    align-items: start;
    grid-template-columns: 1fr 1fr;
    padding: 14px 6px;
  }

  .task-row > :first-child,
  .document-row > :first-child {
    grid-column: 1 / -1;
  }

  .document-row .document-action {
    justify-self: start;
  }

  .boundary-list div {
    grid-template-columns: 1fr;
  }

  .privacy-layout h2 {
    font-size: 36px;
  }
}

@media (max-width: 420px) {
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .segment {
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}