:root {
  --navy: #132c32;
  --navy2: #1d3b40;
  --teal: #137d72;
  --teal-light: #e8f4ef;
  --ink: #193338;
  --muted: #738184;
  --paper: #f7f8f4;
  --line: #e2e8e3;
  --white: #fff;
  --gold: #ba7b32;
  --radius: 14px;
  --shadow: 0 5px 22px #183e3410;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.3;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
  line-height: 1.5;
}
small {
  font-size: 12px;
}
input,
textarea,
select {
  color: var(--ink);
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 230px;
  background: var(--navy);
  color: #c3d2d1;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 29px 18px 20px;
  z-index: 20;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin: 0 7px 28px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  height: 39px;
  width: 39px;
  background: #f0f1c8;
  color: var(--navy);
  font-size: 26px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border-radius: 10px;
  line-height: 1;
  position: relative;
  letter-spacing: -1px;
}
.brand-mark span {
  position: absolute;
  font-size: 12px;
  top: 5px;
  right: 3px;
}
.brand strong {
  font-size: 17px;
  display: block;
  letter-spacing: 1px;
}
.brand small {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #9cafac;
  display: block;
  margin-top: 3px;
}
.workspace-label {
  font-size: 11px;
  color: #9fb6b1;
  padding: 0 10px 20px;
  border-bottom: 1px solid #ffffff12;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #89bea0;
  flex-shrink: 0;
}
.nav-section {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #698983;
  padding: 20px 14px 8px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #bacac6;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 2px 0;
  transition: background 0.15s;
}
.nav-item:hover {
  background: #ffffff08;
  text-decoration: none;
  color: #fff;
}
.nav-item.active {
  background: #37564f;
  color: #fff;
  box-shadow: inset 2px 0 #d9e8ad;
}
.nav-icon {
  font-size: 16px;
  width: 19px;
  text-align: center;
  color: #8eaaa0;
}
.nav-item.active .nav-icon {
  color: #d9e8ad;
}
.nav-counter {
  margin-left: auto;
  font-size: 10px;
  background: #ffffff10;
  min-width: 18px;
  text-align: center;
  border-radius: 5px;
}
.sidebar-foot {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-top: 1px solid #ffffff12;
  padding: 20px 10px 0;
  margin-top: auto;
  font-size: 11px;
  padding-top: 20px;
}
.sidebar-foot .status-dot {
  margin-top: 6px;
}
.sidebar-foot small {
  display: block;
  color: #72928a;
  font-size: 9px;
  margin-top: 4px;
}
.main-shell {
  margin-left: 230px;
  width: calc(100% - 230px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff90;
}
.breadcrumb {
  font-size: 11px;
  color: #99a39e;
  letter-spacing: 0.2px;
}
.breadcrumb span {
  padding: 0 10px;
  color: #c2c9c3;
}
.breadcrumb strong {
  color: #66766e;
  font-weight: 500;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 11px;
  color: #8a9792;
}
.sync-indicator {
  border: 1px solid var(--line);
  background: #fff;
  color: #667b71;
  font-size: 10px;
  border-radius: 20px;
  padding: 5px 11px;
}
.sync-indicator.synced::before {
  content: "●";
  color: var(--teal);
  margin-right: 5px;
  font-size: 8px;
}
.mobile-menu {
  display: none;
}
main {
  padding: 35px 38px 48px;
  max-width: 1520px;
  width: 100%;
  margin: auto;
  flex: 1;
}
.page-footer {
  font-size: 10px;
  color: #92a098;
  display: flex;
  justify-content: space-between;
  padding: 18px 38px;
  border-top: 1px solid var(--line);
  gap: 20px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 9px;
  max-width: 730px;
}
.eyebrow {
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 9px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s;
}
.button.primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 3px 8px #137d7216;
}
.button.primary:hover {
  background: #0d685f;
}
.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: #496056;
}
.button.secondary:hover {
  border-color: #a2bbb0;
  background: #f4f9f6;
}
.button.ghost {
  background: transparent;
  color: var(--teal);
  padding: 6px 0;
}
.button.small {
  padding: 5px 10px;
  font-size: 11px;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  padding: 8px;
  border-radius: 5px;
}
.icon-button:hover {
  background: #f0f4ee;
}
.hero {
  position: relative;
  background: #e9efdf;
  border: 1px solid #e0e7d8;
  border-radius: var(--radius);
  padding: 30px 32px;
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-bottom: 27px;
}
.hero h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.6;
}
.hero p {
  max-width: 600px;
  color: #6c7c64;
  font-size: 12px;
  margin-bottom: 17px;
}
.hero .eyebrow {
  color: #718058;
}
.hero-visual {
  flex: 0 0 190px;
  position: relative;
  min-height: 130px;
  border-left: 1px solid #bdceb1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 35px;
  gap: 12px;
}
.hero-visual span {
  font-family: Georgia, serif;
  color: #809171;
  font-size: 11px;
  letter-spacing: 1px;
}
.hero-visual strong {
  font-size: 17px;
  font-weight: 500;
  color: #526348;
}
.hero-visual .line {
  height: 1px;
  background: #bfd1b2;
  width: 95px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 27px 0 14px;
  gap: 16px;
}
.section-heading h2 {
  font-size: 16px;
}
.section-heading span {
  font-size: 10px;
  color: var(--muted);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 15px 0 25px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px 20px 17px;
}
.stat-label {
  font-size: 11px;
  color: #7a8c80;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.stat-number {
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: -1px;
  color: var(--navy);
  font-weight: 600;
  margin: 8px 0 3px;
}
.stat-caption {
  font-size: 10px;
  color: #9aa49c;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px;
  margin-bottom: 20px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
}
.panel-title h2 {
  font-size: 16px;
}
.panel-title p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  display: flex;
  gap: 13px;
  padding: 16px 0;
  border-top: 1px solid #eef1eb;
}
.step:first-child {
  border-top: 0;
  padding-top: 2px;
}
.step-number {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f0f4e9;
  color: #6f8569;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}
.step h3 {
  font-size: 12px;
}
.step p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.step .button {
  margin-left: auto;
  align-self: center;
}
.note {
  border: 1px solid #e8e8d2;
  background: #f9f9ec;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 12px;
  color: #828063;
  line-height: 1.8;
  margin: 16px 0;
}
.note strong {
  color: #575f45;
}
.note.teal {
  background: #edf6f1;
  border-color: #dceade;
  color: #688274;
}
.note.error {
  background: #fff0ed;
  border-color: #e5bbae;
  color: #94452f;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin: 0 0 21px;
  align-items: center;
  flex-wrap: wrap;
}
.search-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 13px;
  min-width: 240px;
  flex: 1;
  max-width: 400px;
  font-size: 12px;
}
.filter-select {
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 130px;
  font-size: 12px;
}
.count-label {
  margin-left: auto;
  font-size: 11px;
  color: #8c9a90;
}
.records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.record-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.record-card:hover {
  border-color: #b9cec0;
  box-shadow: var(--shadow);
}
.record-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.record-id {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #a0aaa2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.record-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.record-meta {
  color: #8a978c;
  font-size: 10px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.record-description {
  font-size: 12px;
  color: #65796a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.record-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 15px;
}
.tag {
  padding: 2px 7px;
  background: #f3f5ef;
  color: #809171;
  border-radius: 4px;
  font-size: 9px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f3ee;
  color: #7c8c74;
  font-size: 9px;
  letter-spacing: 0.2px;
  line-height: 1.7;
}
.badge.green {
  color: #398467;
  background: #edf6f0;
}
.badge.amber {
  color: #a2813f;
  background: #faf4e6;
}
.badge.blue {
  color: #5d7e91;
  background: #edf3f6;
}
.badge.red {
  color: #9b614e;
  background: #f8eee7;
}
.badge.human {
  background: #fff6df;
  color: #96713d;
  font-size: 8px;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  margin-left: 7px;
  font-weight: 600;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 15px;
  margin-top: 14px;
  border-top: 1px solid #eff2ec;
  gap: 6px;
}
.metric-row strong {
  font-size: 13px;
  font-weight: 500;
  display: block;
}
.metric-row small {
  font-size: 9px;
  color: #9ca99c;
}
.empty-state {
  border: 1px dashed #d1ddce;
  background: #ffffff90;
  border-radius: var(--radius);
  padding: 55px 28px;
  text-align: center;
  grid-column: 1/-1;
}
.empty-icon {
  width: 44px;
  height: 44px;
  border: 1px solid #dce7d8;
  background: #f2f6eb;
  border-radius: 12px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #719368;
}
.empty-state h3 {
  font-size: 16px;
  margin-bottom: 9px;
}
.empty-state p {
  font-size: 12px;
  color: #879480;
  max-width: 550px;
  margin: 0 auto 20px;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tab {
  padding: 12px 20px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  color: #7c8d7d;
}
.tab.active {
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field.wide {
  grid-column: 1/-1;
}
.field label,
.field-label {
  font-size: 11px;
  color: #526956;
  display: block;
}
.required {
  color: #b0734c;
  margin-left: 3px;
}
.field input,
.field textarea,
.field select {
  border: 1px solid #d9e3d8;
  background: #fff;
  border-radius: 7px;
  padding: 9px 11px;
  width: 100%;
  font-size: 12px;
  outline-color: #5a9a83;
}
.field textarea {
  min-height: 87px;
  resize: vertical;
  line-height: 1.7;
}
.field .hint {
  color: #94a08f;
  font-size: 10px;
}
.field input[type="checkbox"] {
  width: auto;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  grid-column: 1/-1;
  background: #fbf8ee;
  padding: 12px 14px;
  border-radius: 7px;
}
.check-field input {
  margin-top: 4px;
  accent-color: var(--teal);
}
.check-field label {
  font-size: 12px;
  color: #7b724e;
}
.form-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 23px;
}
.form-section h3 {
  font-size: 14px;
  margin-bottom: 16px;
}
.form-section summary {
  font-size: 13px;
  cursor: pointer;
  color: #61735c;
  padding: 3px 0;
  list-style-position: inside;
}
.form-section[open] summary {
  margin-bottom: 19px;
}
.ref-options {
  max-height: 170px;
  overflow: auto;
  border: 1px solid #dce5d9;
  border-radius: 7px;
  padding: 6px 12px;
  background: #fff;
}
.ref-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f3ec;
  font-size: 11px;
  color: #708167;
}
.ref-option:last-child {
  border: 0;
}
.ref-option input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--teal);
}
.ref-option span {
  overflow-wrap: anywhere;
}
.help-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  font-size: 11px;
  line-height: 1.8;
}
.detail-list dt {
  color: #819177;
}
.detail-list dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #526747;
}
.detail-list .nested {
  grid-column: 1/-1;
}
.data-block {
  margin: 15px 0;
  padding: 16px;
  background: #f6f8f2;
  border-radius: 8px;
  border: 1px solid #e8ede2;
}
.data-block h3 {
  font-size: 12px;
  margin-bottom: 12px;
  color: #70835f;
}
.data-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.data-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #eef1e9;
  padding: 7px 0;
  font-size: 12px;
}
.data-row:last-child {
  border-bottom: 0;
}
.data-row > span:first-child {
  color: #819276;
  overflow-wrap: anywhere;
}
.data-row > strong {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}
.score-total {
  font-size: 24px;
  color: var(--teal);
  letter-spacing: -1px;
}
.score-row {
  display: grid;
  grid-template-columns: 150px 80px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.score-row input {
  min-width: 0;
  width: 100%;
  border: 1px solid #dce5d6;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12px;
}
.score-row label {
  font-size: 11px;
  color: #6d7f61;
}
.score-row .score-label small {
  font-size: 9px;
  color: #a1ab97;
  display: block;
}
.score-row .reason {
  font-size: 11px;
}
.code-area {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px !important;
  line-height: 1.8;
  min-height: 210px !important;
  tab-size: 2;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full-width {
  grid-column: 1/-1;
}
.prompt-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.prompt {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}
.prompt summary {
  cursor: pointer;
  font-size: 13px;
  color: #5c7453;
}
.prompt pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.8 ui-monospace,
    monospace;
  color: #6d7a67;
  margin: 15px 0;
}
.report-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.report-grid > .panel {
  margin: 0;
}
.report-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.report-toolbar input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}
.account-contacts {
  margin-top: 16px;
  border-top: 1px solid #edf1e8;
  padding-top: 12px;
  font-size: 11px;
  color: #819276;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.progress-track {
  height: 5px;
  background: #edf1e8;
  border-radius: 3px;
  margin: 12px 0;
  overflow: hidden;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: #6d9d7a;
  border-radius: 3px;
}
.inline-link {
  font-size: 11px;
}
.review-state {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.human-panel {
  border: 1px solid #e8dec5;
  background: #fffaf0;
}
.muted {
  color: var(--muted);
}
.separator {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.path-text {
  font:
    10px/1.8 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  color: #789068;
}
.notice-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
dialog {
  padding: 0;
  border: 1px solid #d8e2d3;
  border-radius: 16px;
  max-width: 850px;
  width: calc(100% - 40px);
  max-height: calc(100vh - 50px);
  color: var(--ink);
  box-shadow: 0 30px 90px #142f3330;
  background: #fbfcf8;
}
dialog::backdrop {
  background: #11292a69;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 26px 30px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.dialog-head h2 {
  font-size: 22px;
}
.dialog-head .eyebrow {
  font-size: 8px;
}
.dialog-head .icon-button {
  color: #8b9a83;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: #fbfcf8f5;
  backdrop-filter: blur(10px);
  z-index: 2;
}
.dialog-actions > span {
  color: #a0aa97;
  font-size: 10px;
}
.dialog-actions > div {
  display: flex;
  gap: 9px;
}
#editor-fields {
  padding: 25px 30px 30px;
}
#form-error {
  margin: 20px 30px 0;
  border: 1px solid #e5bdaf;
  border-radius: 7px;
  background: #fff1ec;
  padding: 12px;
  color: #a4543a;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 27px;
  right: 28px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 12px;
  max-width: 430px;
}
#toast.error {
  background: #9c533b;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 240px;
  z-index: 100;
  background: #fff;
  padding: 10px;
}
.skip-link:focus {
  top: 8px;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
}
@media (min-width: 1500px) {
  main {
    padding-left: 48px;
    padding-right: 48px;
  }
  .records-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.space-top {
  margin-top: 13px;
}
.evidence-area {
  width: 100%;
  min-height: 280px;
  margin: 13px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: #617658;
  background: #fff;
}
.ranked-item {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.ranked-item:first-of-type {
  border-top: 0;
}
.ranked-item h3 {
  font-size: 12px;
  margin-bottom: 5px;
}
.map-label {
  font-size: 10px;
  color: #8b9982;
  font-weight: 500;
  margin: 18px 0 5px;
}
.buyer-products {
  margin: 0 0 25px;
}
.buyer-products .tag {
  font-size: 11px;
  padding: 6px 12px;
  background: #eaf1e2;
  color: #698050;
}
.hero h2 {
  white-space: pre-line;
}
progress.progress-track {
  display: block;
  width: 100%;
  border: 0;
  appearance: none;
  background: #edf1e8;
}
progress.progress-track::-webkit-progress-bar {
  background: #edf1e8;
  border-radius: 3px;
}
progress.progress-track::-webkit-progress-value {
  background: #6d9d7a;
  border-radius: 3px;
}
progress.progress-track::-moz-progress-bar {
  background: #6d9d7a;
  border-radius: 3px;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 202px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .main-shell {
    margin-left: 202px;
    width: calc(100% - 202px);
  }
  main {
    padding: 27px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 17px;
  }
  .hero-visual {
    flex-basis: 155px;
    padding-left: 23px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .page-footer {
    padding: 18px 25px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    width: 230px;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 40px #132c3230;
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  .mobile-menu {
    display: block;
    font-size: 19px;
    margin-left: -8px;
  }
  .topbar {
    height: 61px;
    gap: 12px;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar-right {
    gap: 10px;
  }
  #today-label {
    display: none;
  }
  .hero {
    padding: 25px;
  }
  .hero-visual {
    display: none;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .records-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .record-card {
    padding: 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading > .button {
    font-size: 11px;
    padding: 8px 12px;
  }
  .report-grid,
  .prompt-list {
    grid-template-columns: 1fr;
  }
  .page-footer {
    flex-direction: column;
    gap: 5px;
  }
  .score-row {
    grid-template-columns: 120px 70px 1fr;
  }
  .skip-link {
    left: 30px;
  }
}
@media (max-width: 560px) {
  main {
    padding: 23px 17px;
  }
  .topbar {
    padding: 0 17px;
  }
  .records-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  .hero h2 {
    font-size: 21px;
  }
  .hero p {
    font-size: 11px;
  }
  .hero {
    padding: 22px;
  }
  .page-heading {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 21px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .toolbar {
    gap: 8px;
  }
  .search-box {
    min-width: 100%;
    max-width: none;
  }
  .count-label {
    font-size: 10px;
  }
  .filter-select {
    flex: 1;
    min-width: 0;
  }
  .panel {
    padding: 20px;
  }
  .dialog-head {
    padding: 21px;
  }
  .dialog-head h2 {
    font-size: 20px;
  }
  #editor-fields {
    padding: 21px;
  }
  .dialog-actions {
    padding: 16px 21px;
  }
  .dialog-actions > span {
    display: none;
  }
  .dialog-actions > div {
    width: 100%;
    justify-content: flex-end;
  }
  .score-row {
    grid-template-columns: 1fr 70px;
  }
  .score-row .reason {
    grid-column: 1/-1;
  }
  .step {
    gap: 10px;
  }
  .step .button {
    font-size: 10px;
    padding: 5px;
  }
  .stat-number {
    font-size: 28px;
  }
  .stat-card {
    padding: 16px;
  }
  .detail-list {
    grid-template-columns: 105px 1fr;
  }
  .topbar-right .sync-indicator {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .full-width {
    grid-column: auto;
  }
  #toast {
    left: 17px;
    right: 17px;
    bottom: 17px;
  }
  .page-footer {
    padding: 16px 17px;
  }
}

.feedback-overview {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 22px;
}
.feedback-flow {
  color: var(--teal);
  font-weight: 600;
  font-size: 13px;
}
.feedback-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0;
}
.feedback-stats strong {
  display: block;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
}
.feedback-stats span {
  color: var(--muted);
  font-size: 11px;
}
.feedback-details {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 16px 0 4px;
  font-size: 12px;
}
.feedback-details dt {
  color: var(--muted);
}
.feedback-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.voice-quote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--teal);
  background: var(--teal-light);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.field-locked input,
.field-locked textarea,
.field-locked select {
  background: #f3f5f2;
  color: #61706a;
  opacity: 1;
  cursor: default;
}
.ref-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .feedback-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feedback-overview {
    padding: 18px;
  }
}

.snapshot-proof {
  margin: 12px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The login gate must hide the workspace before its first authenticated render. */
[hidden] {
  display: none !important;
}
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background: radial-gradient(ellipse at top left, #e4f0e9, var(--paper) 65%);
}
.auth-card {
  width: 100%;
  max-width: 470px;
  padding: 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 26px;
}
.auth-intro {
  color: var(--muted);
  margin: 12px 0 22px;
  font-size: 13px;
}
.auth-form,
.member-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.auth-form .button {
  width: 100%;
}
.auth-card > .help-text {
  margin-top: 22px;
}
.auth-error {
  color: #9a3934;
  padding: 10px 12px;
  background: #fff0ed;
  border-radius: 8px;
  font-size: 12px;
}
.account-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-name {
  color: var(--ink);
  font-size: 11px;
}
.account-action {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 3px 0;
  font-size: 11px;
}
.password-dialog {
  max-width: 460px;
  padding: 30px;
}
.member-grid {
  margin-top: 18px;
}
.member-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}
.member-check input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.member-form .help-text:empty {
  display: none;
}
@media (max-width: 800px) {
  .topbar {
    min-height: 74px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .topbar-right {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .account-controls {
    justify-content: flex-end;
  }
}
@media (max-width: 560px) {
  .auth-card {
    padding: 28px 22px;
  }
  .account-controls {
    width: 100%;
  }
  .topbar-right #today-label {
    display: none;
  }
}
