/* Original light layout (TRACE v1–v15). Later theme layers override most colors. */
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1b2934;
  background: #f2f5f7;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #cba45a;
  outline-offset: 2px;
}
.shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 260px;
  background: #14283a;
  color: #fff;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px;
}
.brand svg {
  color: #d4b16a;
}
.brand strong {
  display: block;
  font-size: 29px;
  letter-spacing: 3px;
}
.brand small {
  font-size: 11px;
  color: #b6c5cf;
}
.side-note {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: #b7c6ce;
  margin: 40px 12px 12px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav button {
  background: none;
  border: 0;
  color: #d6e0e7;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  text-align: left;
  border-radius: 9px;
}
.sidebar nav button.active,
.sidebar nav button:hover {
  background: #2a4558;
  color: white;
}
.sidebar-footer {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.6;
  color: #a5b8c5;
  padding: 16px 12px;
}
main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 38px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
h1 {
  font-size: 29px;
  margin: 0 0 6px;
}
header p {
  margin: 0;
  color: #657585;
}
.pill {
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 800;
  color: #7b632d;
  background: #f8ebcb;
  border: 1px solid #e8d29d;
  border-radius: 20px;
  padding: 9px 12px;
  white-space: nowrap;
}
.notice {
  background: #fff8e7;
  border-left: 4px solid #c6a25b;
  color: #68552f;
  padding: 14px 18px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.panel {
  background: white;
  border: 1px solid #dce4e9;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 4px 20px #1c36450a;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
}
.section-head h2 {
  margin: 0;
  font-size: 19px;
}
.section-head span {
  font-size: 12px;
  color: #6e7f8b;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-bottom: 24px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #405463;
}
input,
select,
textarea {
  border: 1px solid #ccd8df;
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: #243b49;
  min-width: 0;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 58px;
}
.task-summary {
  padding: 18px;
  background: #edf3f3;
  border-left: 4px solid #425a4a;
  border-radius: 8px;
  margin-bottom: 26px;
}
.task-summary strong,
.task-summary small {
  display: block;
}
.task-summary small {
  margin-top: 5px;
  color: #61747d;
}
.task-summary p {
  margin: 12px 0 0;
  font-size: 13px;
  color: #576d75;
}
.measure {
  padding: 18px 0;
  border-top: 1px solid #e6edf0;
}
.measure-title {
  display: flex;
  gap: 12px;
  align-items: start;
  font-size: 14px;
}
.num {
  background: #e8eef1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.rating-row {
  display: flex;
  gap: 9px;
  margin: 14px 0;
}
.choice {
  background: #f7f9fa;
  border: 1px solid #ccd9df;
  border-radius: 8px;
  padding: 9px 14px;
  color: #526570;
  font-size: 12px;
  font-weight: 700;
}
.choice.chosen.good {
  background: #e3f2e9;
  color: #256744;
  border-color: #70b28b;
}
.choice.chosen.bad {
  background: #fbe9e8;
  color: #9b3d38;
  border-color: #e0a6a2;
}
.choice.chosen.neutral {
  background: #e9edf2;
  color: #364d64;
  border-color: #a9b8c9;
}
.lower {
  margin-top: 20px;
  margin-bottom: 6px;
}
.hint {
  font-size: 12px;
  color: #687e8c;
  margin: 8px 0 22px;
}
.wide {
  margin-bottom: 20px;
}
.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
}
.primary {
  background: #2f5947;
  color: white;
}
.secondary {
  background: #eaf0f3;
  color: #24455b;
}
.danger {
  background: #fcecec;
  color: #973d3d;
}
.error {
  color: #a33d36;
  font-size: 13px;
}
.filter {
  width: 270px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.metrics div {
  background: #f0f4f6;
  padding: 16px;
  border-radius: 10px;
}
.metrics strong {
  font-size: 25px;
  display: block;
}
.metrics small {
  font-size: 11px;
  color: #687a85;
}
.records {
  display: grid;
  gap: 9px;
}
.record {
  width: 100%;
  border: 1px solid #e0e8ec;
  background: white;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 14px;
}
.record.selected {
  border-color: #54876e;
  background: #f3f8f5;
}
.record strong,
.record small {
  display: block;
}
.record small {
  color: #6b7f8b;
  font-size: 11px;
  margin-top: 5px;
}
.record > div:last-child {
  text-align: right;
}
.rating-badge {
  background: #dce9df;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 800;
}
.detail {
  border-top: 1px solid #e1e8ec;
  margin-top: 25px;
  padding-top: 15px;
  font-size: 13px;
  line-height: 1.7;
}
.detail li {
  margin-bottom: 6px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.standard {
  border-top: 1px solid #e0e8ec;
  padding: 20px 0;
}
.standard strong,
.standard small {
  display: block;
}
.standard small {
  color: #6c7d87;
  margin-top: 5px;
}
.standard li {
  font-size: 13px;
  margin: 6px 0;
}
.aar {
  background: #f3f6f7;
  border: 1px solid #e1e8eb;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 20px;
  font-size: 12px;
  line-height: 1.7;
  margin: 20px 0;
}
footer {
  color: #82919b;
  font-size: 11px;
  text-align: center;
  padding: 30px 0;
}
@media (max-width: 850px) {
  .shell {
    display: block;
  }
  .sidebar {
    width: 100%;
    padding: 16px;
  }
  .brand strong {
    font-size: 24px;
  }
  .side-note,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    margin-top: 16px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 11px;
  }
  main {
    padding: 20px 15px;
  }
  header {
    align-items: flex-start;
  }
  h1 {
    font-size: 23px;
  }
  .pill {
    font-size: 9px;
  }
  .panel {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .metrics div {
    padding: 10px;
  }
  .metrics strong {
    font-size: 20px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .filter {
    width: 100%;
  }
}
@media (max-width: 420px) {
  .pill {
    display: none;
  }
  .choice {
    padding: 9px 10px;
  }
  .record {
    align-items: flex-start;
  }
  .record strong {
    font-size: 12px;
  }
}

nav button.active {
  background: #2a4558 !important;
  color: #fff !important;
}
.hidden {
  display: none !important;
}
.statrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.detail-note {
  color: #526570;
}
.app-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
}
.section-sub {
  color: #6c7d87;
  font-size: 12px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-note {
  font-size: 12px;
  color: #7b632d;
  margin: 6px 0 18px;
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.empty {
  padding: 24px;
  color: #687a85;
  text-align: center;
}
.record:focus-visible {
  outline: 3px solid #cba45a;
}
.progress-track {
  height: 14px;
  background: #e3e9ed;
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.dash-card {
  border: 1px solid #dce4e9;
  border-radius: 12px;
  padding: 18px;
  background: white;
}
.dash-card h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.dash-number {
  font-size: 32px;
  font-weight: 800;
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #637785;
  margin: 8px 0;
}
.alert-info {
  background: #f3f6fa;
  border-left: 3px solid #68849a;
  padding: 12px;
  margin: 14px 0;
  font-size: 12px;
  line-height: 1.6;
}
.fieldgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.draft-note {
  color: #8a6533;
  font-size: 12px;
}
.aar {
  white-space: pre-wrap;
}
