/* Base styles carried over from the original dashboard, reformatted. */
:root {
  color-scheme: light;
  --ink:#1b302d;
  --muted:#61716b;
  --green:#1b453b;
  --teal:#276a59;
  --pale:#edf3ef;
  --paper:#f6f7f3;
  --line:#dde3dc;
  --red:#a23f2c;
  --red-bg:#fbeee8;
  --amber:#865b17;
  --amber-bg:#fbf1d9;
  --blue:#385b85;
  --blue-bg:#edf1f8;
  --white:#fff;
  --radius:10px;
  font-family:
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: .5;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
a {
  color: var(--teal);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #d28b24;
  outline-offset: 4px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -.3px;
}
h3 {
  font-size: 15px;
  line-height: 1.4;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.strong {
  font-weight: 650;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.eyeline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-weight: 650;
  color: var(--muted);
}
.icon {
  width: 19px;
  height: 19px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  z-index: 100;
  background: white;
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
.shell {
  display: grid;
  grid-template-columns: 222px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: #e8eee9;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 22px;
  position: fixed;
  width: 222px;
  inset: 0 auto 0 0;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px 32px;
}
.brand-symbol {
  border: 1px solid #718c7f;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #e1d5aa;
}
.brand strong {
  font-size: 23px;
  line-height: 1;
  letter-spacing: -.5px;
}
.brand small {
  display: block;
  margin-top: 5px;
  color: #c6d6ce;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  margin: 10px 14px;
  color: #b1c8ba;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  border: 0;
  background: none;
  color: #d2e1d7;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 6px;
  font-size: 13px;
}
.nav button.active {
  background: #e6eedf;
  color: #214435;
  font-weight: 650;
}
.nav button:hover:not(.active) {
  background: #2a5247;
}
.nav .count {
  margin-left: auto;
  border-radius: 4px;
  background: #ffffff18;
  min-width: 22px;
  text-align: center;
  font-size: 11px;
}
.nav .active .count {
  background: #cfdbcb;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 28px 14px 0;
  font-size: 12px;
  color: #c6d6ce;
}
.sidebar-bottom p {
  margin: 7px 0 14px;
}
.sidebar-bottom .icon {
  width: 16px;
}
.local {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
}
.local-dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #c7d7a8;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 68px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}
.breadcrumb {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.demo-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #d1dccd;
  border-radius: 4px;
  color: #385140;
  font-size: 11px;
  white-space: nowrap;
}
.demo-label:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6b8546;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 13px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 37px;
  text-decoration: none;
}
.btn:hover {
  background: #f1f4ee;
  border-color: #b1c1b6;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn.primary:hover {
  background: #2a5b4c;
}
.btn.danger {
  color: var(--red);
  background: var(--red-bg);
  border-color: #ebc4b6;
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
}
.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}
.text-btn:hover {
  text-decoration: underline;
}
.text-btn .icon {
  width: 14px;
}
.main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px 38px 40px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.heading-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.date-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
  text-align: right;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 26px;
  overflow: hidden;
}
.metric {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
  padding: 20px 16px 17px;
  position: relative;
  min-width: 0;
}
.metric:last-child {
  border-right: 0;
}
.metric:hover {
  background: #f4f7f1;
}
.metric-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  min-height: 32px;
  color: var(--muted);
}
.metric-value {
  display: block;
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.metric-caption {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.metric.red .metric-value {
  color: var(--red);
}
.metric.amber .metric-value {
  color: var(--amber);
}
.metric.green .metric-value {
  color: var(--teal);
}
.metric.red {
  background: #fcf6f2;
}
.metric.amber {
  background: #fffdf7;
}
.grid-attention {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  margin-bottom: 26px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.panel-body {
  padding: 0 22px 22px;
}
.panel-head .icon {
  width: 17px;
}
.attention-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.attention-head > .icon {
  color: var(--red);
}
.attention-list {
  padding: 0 22px;
}
.attention-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border-top: 1px solid #e9ece5;
  padding: 14px 0;
}
.attention-copy {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.attention-marker {
  margin-top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}
.attention-row h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.attention-row p {
  font-size: 11px;
  color: var(--muted);
}
.attention-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.attention-row .btn {
  padding: 6px 9px;
  min-height: 32px;
}
.panel-foot {
  padding: 14px 22px;
  background: #fafbf8;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.walkthrough {
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.walkthrough h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -.5px;
  max-width: 190px;
}
.walkthrough > p {
  color: #cbd9d0;
  font-size: 12px;
  margin: 9px 0 15px;
}
.walk-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  text-align: left;
  border: 0;
  border-top: 1px solid #426256;
  padding: 15px 0;
  background: none;
  color: #fff;
  width: 100%;
}
.walk-step:hover strong {
  text-decoration: underline;
}
.step-num {
  border: 1px solid #71887b;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  font-size: 11px;
  color: #e7dbb2;
}
.walk-step strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.walk-step small {
  display: block;
  color: #cbd9d0;
  font-size: 11px;
  line-height: 1.55;
  margin-top: 3px;
}
.walkthrough-foot {
  margin-top: auto;
  color: #d5dfd2;
  font-size: 10px;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 22px;
}
.chart-total {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.7px;
  margin-bottom: 12px;
}
.chart-total small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.stackbar {
  height: 12px;
  display: flex;
  gap: 3px;
  border-radius: 4px;
  overflow: hidden;
  margin: 15px 0 18px;
}
.stackbar span {
  min-width: 0;
  background: var(--green);
}
.legend-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  margin: 9px 0;
}
.legend-row strong {
  margin-left: auto;
  font-weight: 600;
}
.swatch {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
  flex: none;
}
.bar-row {
  font-size: 11px;
  margin: 15px 0;
}
.bar-row .label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.bar-track {
  height: 7px;
  background: #eff2eb;
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 3px;
}
.caption {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 15px;
}
.chart-controls select {
  font-size: 11px;
  padding: 5px;
  min-height: 30px;
}
.trend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.trend-table th {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  padding: 8px 5px;
}
.trend-table th:first-child {
  text-align: left;
}
.trend-table td {
  padding: 10px 5px;
  text-align: right;
  border-top: 1px solid #edf0e8;
}
.trend-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.heat {
  display: inline-block;
  border-radius: 4px;
  background: #e4eee2;
  min-width: 25px;
  padding: 4px;
  text-align: center;
  color: #294e3a;
}
.workflow-strip {
  margin-top: 24px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}
.workflow-strip .icon {
  width: 13px;
}
.workflow-strip strong {
  color: #385747;
  font-weight: 600;
}
.badge {
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  background: var(--pale);
  color: #426151;
}
.badge.red {
  color: var(--red);
  background: var(--red-bg);
}
.badge.amber {
  color: var(--amber);
  background: var(--amber-bg);
}
.badge.blue {
  color: var(--blue);
  background: var(--blue-bg);
}
.badge.green {
  background: #eaf2e5;
  color: #396238;
}
.badge.neutral {
  background: #eff1ed;
  color: #57675d;
}
.badge .icon {
  width: 11px;
  height: 11px;
}
.filters {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.filter-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 15px;
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.search-wrap > .icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: var(--muted);
  width: 17px;
}
.search-wrap input {
  padding-left: 38px;
  width: 100%;
}
.filter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 140px 140px;
  gap: 12px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #51645b;
}
input,
select,
textarea {
  border: 1px solid #ccd6cb;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 9px 10px;
  font-size: 12px;
  min-height: 38px;
  max-width: 100%;
  width: 100%;
}
label > input,
label > select,
label > textarea {
  margin-top: 5px;
}
textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.6;
}
input[type=checkbox] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: var(--teal);
  flex: none;
  margin: 2px 0;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
}
.table-wrap {
  overflow: auto;
}
table.register {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  min-width: 850px;
}
.register th {
  background: #fafbf8;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  padding: 11px 14px;
}
.register th:first-child,
.register td:first-child {
  padding-left: 22px;
}
.register th button {
  border: 0;
  background: none;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.register th button .icon {
  width: 12px;
  height: 12px;
}
.register td {
  padding: 16px 14px;
  border-bottom: 1px solid #e8ece5;
  vertical-align: top;
  line-height: 1.5;
}
.register tr:last-child td {
  border-bottom: 0;
}
.register tbody tr:hover {
  background: #fafbf7;
}
.register .action-cell {
  min-width: 220px;
  max-width: 340px;
}
.action-link {
  font-size: 11px;
  letter-spacing: .3px;
}
.table-description {
  font-size: 12px;
  margin: 5px 0 3px;
  color: var(--ink);
}
.table-topic {
  font-size: 10px;
  color: var(--muted);
}
.person {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
}
.avatar {
  background: #edf1e7;
  color: #52704b;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.due-text {
  font-size: 10px;
  margin-top: 5px;
  white-space: nowrap;
}
.red-text {
  color: var(--red);
}
.amber-text {
  color: var(--amber);
}
.empty {
  padding: 50px 24px;
  text-align: center;
}
.empty h3 {
  margin-bottom: 8px;
}
.empty p {
  color: var(--muted);
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 23px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
}
.tab.active {
  border-bottom-color: var(--green);
  color: var(--green);
  font-weight: 650;
}
.tab span {
  font-size: 10px;
  background: #e8eee3;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}
.notice {
  background: #eef3eb;
  border: 1px solid #d8e3d3;
  border-radius: 6px;
  font-size: 12px;
  padding: 13px 16px;
  display: flex;
  gap: 10px;
  line-height: 1.65;
  margin-bottom: 22px;
}
.notice.warning {
  background: var(--amber-bg);
  border-color: #e6d8af;
  color: #725020;
}
.notice .icon {
  margin-top: 2px;
}
.queue-group {
  margin-bottom: 24px;
}
.queue-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.queue-group-head h2 {
  font-size: 15px;
}
.queue-group-head p {
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
}
.draft-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.draft-row:last-child {
  border-bottom: 0;
}
.draft-row h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 7px 0;
}
.draft-row p {
  font-size: 11px;
  color: var(--muted);
}
.draft-row .draft-top {
  display: flex;
  gap: 8px;
  align-items: center;
}
.draft-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.alert-text {
  color: var(--amber);
  font-size: 11px;
  margin-top: 8px;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.record-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.record-card h2 {
  font-size: 15px;
  min-height: 42px;
}
.record-card .btn {
  align-self: flex-start;
  margin-top: auto;
}
.record-card .sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reminder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.reminder-row:last-child {
  border: 0;
}
.reminder-row h3 {
  font-size: 13px;
  margin: 7px 0;
}
.reminder-row p {
  font-size: 12px;
  color: var(--muted);
}
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.info-block {
  padding: 22px;
}
.info-block h2 {
  margin-bottom: 13px;
}
.info-block p,
.info-block li {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.info-block ul,
.info-block ol {
  padding-left: 18px;
  margin: 10px 0;
}
.info-block li {
  padding: 5px 0;
}
.topic-list {
  columns: 2;
  margin: 0;
  padding-left: 18px;
}
.footer-note {
  font-size: 10px;
  color: var(--muted);
  margin: 24px 0 0;
}
.storage-warning {
  margin: 0;
  border-radius: 0;
  text-align: center;
  background: var(--amber-bg);
  padding: 7px 15px;
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(980px, calc(100% - 40px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 24px 90px #122c3540;
  background: #fff;
}
dialog::backdrop {
  background: #17332a80;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 23px 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
  position: sticky;
  top: 0;
  z-index: 2;
}
.dialog-head h2 {
  font-size: 21px;
  margin: 5px 0 2px;
}
.dialog-head p {
  font-size: 12px;
  color: var(--muted);
}
.close-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
}
.dialog-content {
  padding: 24px 28px;
}
.detail-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}
.source-panel {
  background: #f5f7f1;
  border: 1px solid #e0e5da;
  border-radius: 8px;
  padding: 20px;
}
.source-panel h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.field-read {
  border-top: 1px solid #dce3d5;
  margin-top: 16px;
  padding-top: 14px;
}
.field-read dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.field-read dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.field-read:first-of-type {
  margin-top: 14px;
}
.form-section h3 {
  margin: 0 0 14px;
}
.form-fields {
  display: grid;
  gap: 14px;
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.mapping {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.mapping summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mapping table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 13px;
}
.mapping th,
.mapping td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.mapping th {
  font-weight: 600;
  background: #f4f6f0;
}
.mapping td {
  width: 50%;
}
.mapping td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.timeline li {
  border-left: 1px solid #cad8c7;
  padding: 0 0 18px 18px;
  position: relative;
  font-size: 11px;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b7c55;
}
.timeline li p {
  margin-top: 4px;
  color: var(--muted);
}
.timeline li strong {
  font-weight: 600;
}
.detail-section {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.detail-section > h3 {
  margin-bottom: 12px;
}
.evidence-box {
  border: 1px dashed #bccdb6;
  padding: 16px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
  background: #fafbf6;
}
.evidence-box p + p {
  margin-top: 7px;
}
.form-error {
  font-size: 12px;
  color: var(--red);
  background: var(--red-bg);
  padding: 10px 12px;
  border-radius: 5px;
  margin-bottom: 14px;
}
.form-error:empty {
  display: none;
}
.source-item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.source-item h3 {
  font-size: 12px;
  margin: 8px 0;
}
.source-item p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.source-item .badge {
  margin-right: 8px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  padding: 12px 20px;
  box-shadow: 0 5px 25px #152b3420;
  border-radius: 7px;
  font-size: 13px;
  z-index: 99;
  max-width: calc(100% - 32px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
#toast.visible {
  opacity: 1;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.spaced {
  margin-top: 20px;
}
.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
@media (min-width: 1600px) {
  .main {
    padding-top: 38px;
  }
  .metric {
    padding: 22px;
  }
  .grid-attention {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .attention-row {
    padding: 18px 0;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 195px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .topbar {
    padding: 0 25px;
  }
  .main {
    padding: 27px 25px;
  }
  .metric {
    padding: 16px 10px;
  }
  .metric-label {
    font-size: 10px;
  }
  .grid-attention {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
  }
  .charts {
    gap: 18px;
  }
  .filter-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel-head {
    padding: 18px;
  }
  .panel-body {
    padding: 0 18px 18px;
  }
  .attention-list {
    padding: 0 18px;
  }
  .charts .panel-head {
    align-items: flex-start;
  }
  .charts .panel-head h2 {
    font-size: 15px;
  }
}
@media (max-width: 960px) {
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  .metric {
    border-bottom: 1px solid var(--line);
  }
  .metric:nth-child(4) {
    border-right: 0;
  }
  .metric:nth-child(n+5) {
    border-bottom: 0;
  }
  .metric-label {
    min-height: 20px;
  }
  .grid-attention {
    grid-template-columns: 1fr;
  }
  .walkthrough {
    display: block;
  }
  .walkthrough h2 {
    max-width: none;
  }
  .walkthrough > p {
    margin-bottom: 10px;
  }
  .walk-step {
    padding: 11px 0;
  }
  .charts {
    grid-template-columns: 1fr 1fr;
  }
  .charts .panel:last-child {
    grid-column: 1/-1;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    flex-direction: column;
  }
  .date-note {
    display: none;
  }
  .topbar {
    gap: 10px;
  }
  .breadcrumb {
    font-size: 11px;
    gap: 7px;
  }
  .top-actions {
    gap: 8px;
  }
  .top-actions .btn {
    padding: 7px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .workspace {
    width: 100%;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 18px 0;
    display: block;
  }
  .brand {
    padding: 0 0 14px;
    gap: 9px;
  }
  .brand-symbol {
    width: 29px;
    height: 29px;
    border-radius: 7px;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand small {
    font-size: 8px;
    margin-top: 3px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .nav button {
    width: auto;
    flex-shrink: 0;
    font-size: 11px;
    padding: 9px 10px;
    gap: 7px;
  }
  .nav .icon {
    width: 15px;
    height: 15px;
  }
  .nav .count {
    min-width: 16px;
  }
  .topbar {
    height: 52px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .top-actions .btn {
    font-size: 10px;
    min-height: 29px;
  }
  .top-actions .btn .icon {
    width: 13px;
    height: 13px;
  }
  .main {
    padding: 25px 18px;
  }
  .page-heading {
    gap: 13px;
    margin-bottom: 19px;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 12px;
    line-height: 1.6;
  }
  .heading-actions .btn {
    font-size: 11px;
    padding: 8px 10px;
  }
  .metrics {
    margin-bottom: 20px;
  }
  .metric {
    padding: 13px 10px;
  }
  .metric-value {
    font-size: 26px;
  }
  .metric-label {
    font-size: 10px;
    min-height: 30px;
  }
  .metric-caption {
    font-size: 9px;
  }
  .grid-attention {
    margin-bottom: 20px;
  }
  .attention-row {
    padding: 14px 0;
    gap: 8px;
  }
  .attention-row h3 {
    font-size: 12px;
  }
  .attention-row .btn {
    font-size: 10px;
  }
  .attention-copy {
    gap: 8px;
  }
  .attention-meta {
    gap: 5px;
    flex-wrap: wrap;
  }
  .charts {
    grid-template-columns: 1fr;
  }
  .charts .panel:last-child {
    grid-column: auto;
  }
  .charts .panel-head h2 {
    font-size: 17px;
  }
  .filter-top {
    align-items: stretch;
    gap: 8px;
  }
  .filters {
    padding: 16px;
  }
  .filter-fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .search-wrap {
    max-width: none;
  }
  .filter-top .btn {
    font-size: 10px;
  }
  .queue-group-head {
    align-items: flex-start;
  }
  .queue-group-head h2 {
    font-size: 14px;
  }
  .draft-row {
    padding: 17px;
    grid-template-columns: 1fr;
  }
  .draft-row .btn {
    justify-self: start;
  }
  .record-grid,
  .two-column {
    grid-template-columns: 1fr;
  }
  .record-card h2 {
    min-height: 0;
  }
  .reminder-row {
    padding: 17px;
    grid-template-columns: 1fr;
  }
  .reminder-row .btn {
    justify-self: start;
  }
  .workflow-strip {
    gap: 9px;
    font-size: 10px;
  }
  .workflow-strip .icon {
    width: 10px;
  }
  .topic-list {
    columns: 1;
  }
  .tabs {
    gap: 18px;
  }
  .tab {
    font-size: 11px;
  }
  .panel-foot {
    padding: 13px 17px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .dialog-head {
    padding: 17px 18px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
  .dialog-content {
    padding: 19px 18px;
  }
  dialog {
    width: calc(100% - 20px);
    max-height: 94vh;
    border-radius: 9px;
  }
  .source-panel {
    padding: 16px;
  }
  .form-pair {
    grid-template-columns: 1fr;
  }
  .mapping table {
    font-size: 10px;
  }
  .mapping td,
  .mapping th {
    padding: 8px;
  }
  .form-actions .btn {
    flex: 1;
  }
  .notice {
    padding: 12px;
    font-size: 11px;
  }
  .topbar .breadcrumb strong {
    display: none;
  }
  .topbar .breadcrumb .divider {
    display: none;
  }
  .heading-actions {
    flex-shrink: 1;
  }
  .date-note {
    display: none;
  }
}
.sidebar {
  overflow-y: auto;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Workspace screens and the dark theme. */
:root {
  --surface:#fff;
  --green-light:#edf3ef;
}
.workspace-banner {
  padding: 10px 32px;
  background: var(--green-light);
  color: var(--ink);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--paper);
}
.login-card {
  width: min(100%, 470px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 60px #173f3812;
}
.login-card h1 {
  font-size: 28px;
}
.login-card p {
  font-size: 13px;
  line-height: 1.7;
  margin: 18px 0;
}
.login-card .btn {
  margin-top: 20px;
}
.local-test {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.local-test .btn {
  margin-right: 8px;
}
.question-section {
  margin-top: 24px;
}
.question-entry {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.question-entry h3 {
  font-size: 16px;
  margin: 8px 0;
}
.question-entry p {
  font-size: 14px;
  line-height: 1.7;
  margin: 12px 0;
}
.question-entry details {
  margin: 12px 0;
  font-size: 12px;
}
.entry-template {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}
.entry-template > label {
  min-width: 260px;
}
.import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.source-text {
  white-space: pre-wrap;
  font: 13px/1.7 system-ui;
  max-height: 65vh;
  overflow: auto;
  padding-right: 16px;
}
.mapping-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin: 18px 0;
  display: grid;
  gap: 12px;
}
.mapping-row legend {
  padding: 0 6px;
  font-weight: 600;
}
.map-root {
  margin-top: 24px;
  padding: 22px;
  border-radius: 10px;
  background: var(--green);
  color: white;
  max-width: 600px;
}
.living-map {
  margin: 0 0 30px 20px;
  border-left: 2px solid var(--line);
  padding-left: 25px;
}
.map-branch {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.map-branch summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.map-node {
  border-left: 3px solid var(--green);
  padding: 15px 20px;
  margin: 14px 0 0 18px;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  max-width: 720px;
}
.map-node p {
  font-size: 13px;
  line-height: 1.7;
  margin: 10px 0;
}
.map-node.verified {
  border-color: #729857;
  background: var(--green-light);
}
.changed-highlight {
  padding: 12px;
  background: var(--amber-bg);
  border-radius: 6px;
}
.timeline-diff {
  font-size: 13px;
  line-height: 1.6;
  margin: 20px 0;
}
.timeline-diff > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-diff del {
  color: var(--muted);
}
.timeline-diff mark {
  background: var(--amber-bg);
  color: var(--ink);
  padding: 2px 5px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 18px;
}
.evidence-card {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.evidence-card img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: var(--paper);
}
.evidence-card figcaption {
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.evidence-card p {
  margin: 7px 0;
}
#sketch {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: white;
  touch-action: none;
  cursor: crosshair;
}
.table-scroll {
  overflow: auto;
}
.table-scroll button {
  pointer-events: none;
  opacity: .8;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
label.checkbox {
  display: flex;
}
input,
textarea,
select {
  max-width: 100%;
  background: var(--surface);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.info-block form {
  margin-top: 18px;
}
.info-block + .info-block {
  margin-top: 18px;
}
.source-item p {
  white-space: pre-wrap;
}
.workspace .nav {
  padding-bottom: 10px;
}
:root[data-theme=dark] {
  --paper:#172420;
  --surface:#20312b;
  --ink:#edf1e8;
  --muted:#b1beb4;
  --line:#3c5045;
  --green:#90b39f;
  --green-light:#2d4537;
  --amber:#e4bc75;
  --amber-bg:#453c28;
  --red:#ef9b92;
  --red-bg:#4b302d;
  --blue:#aacddd;
  --blue-bg:#293e47;
  color-scheme: dark;
}
[data-theme=dark] body,
[data-theme=dark] .main,
[data-theme=dark] .workspace {
  background: #172420;
  color: #edf1e8;
}
[data-theme=dark] .panel,
[data-theme=dark] .metric,
[data-theme=dark] .filters,
[data-theme=dark] .topbar,
[data-theme=dark] dialog,
[data-theme=dark] .source-panel,
[data-theme=dark] .evidence-box,
[data-theme=dark] .form-section,
[data-theme=dark] .login-card {
  background: #20312b;
  color: #edf1e8;
  border-color: #3c5045;
}
[data-theme=dark] th,
[data-theme=dark] .status-track,
[data-theme=dark] .source-item,
[data-theme=dark] .notice {
  background: #293c32;
  color: #edf1e8;
}
[data-theme=dark] .btn.primary {
  background: #a7c3ae;
  color: #172420;
}
[data-theme=dark] .btn {
  color: #edf1e8;
  border-color: #61796a;
}
[data-theme=dark] .btn.primary:hover {
  background: #bed4c0;
}
[data-theme=dark] .badge.neutral {
  background: #364d40;
  color: #edf1e8;
}
[data-theme=dark] .badge.green {
  background: #405c42;
  color: #d7efd3;
}
[data-theme=dark] .form-error {
  background: #4b302d;
  color: #ffd0c9;
}
[data-theme=dark] .map-root {
  background: #385c49;
}
[data-theme=dark] .brand-symbol {
  color: #172420;
}
[data-theme=dark] .timeline-diff mark {
  color: #edf1e8;
}
[data-theme=dark] .checkbox input {
  accent-color: #a7c3ae;
}
@media (max-width: 900px) {
  .import-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    overflow-y: auto;
  }
  .topbar {
    height: auto;
    min-height: 66px;
    gap: 15px;
    padding: 12px 20px;
    flex-wrap: wrap;
  }
  .workspace-banner {
    padding: 10px 20px;
  }
  .entry-template {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 25px;
  }
  .question-entry p {
    font-size: 13px;
  }
  .map-branch summary {
    font-size: 13px;
  }
  .living-map {
    padding-left: 12px;
    margin-left: 8px;
  }
  .map-node {
    margin-left: 5px;
    padding: 12px;
  }
  .topbar .small {
    display: block;
  }
  .entry-template > label {
    min-width: 0;
  }
}
[data-theme=dark] {
  --teal:#a7cbb6;
}
[data-theme=dark] .sidebar {
  background: #13271f;
  color: #d5e3d9;
}
[data-theme=dark] .brand,
[data-theme=dark] .brand small,
[data-theme=dark] .nav-label,
[data-theme=dark] .sidebar-bottom,
[data-theme=dark] .nav button {
  color: #d5e3d9;
}
[data-theme=dark] .nav button.active {
  background: #365542;
  color: #f2f5eb;
}
[data-theme=dark] .btn:not(.primary):not(.danger) {
  background: #30483a;
  color: #f2f5eb;
}
[data-theme=dark] .walkthrough {
  background: #304b3b;
  color: #f2f5eb;
}
[data-theme=dark] .walkthrough small,
[data-theme=dark] .walkthrough p,
[data-theme=dark] .walkthrough-foot {
  color: #d0ded2;
}
[data-theme=dark] label {
  color: #cbd8ce;
}
.dialog-head,
.close-btn {
  background: var(--surface);
  color: var(--ink);
}
.guidance p {
  white-space: pre-wrap;
  color: var(--ink);
}
.guidance summary {
  font-weight: 650;
  cursor: pointer;
}
.photo-name {
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
}
.draft-actions {
  justify-content: flex-start;
  margin: 0 0 20px;
}
.login-card .brand-symbol {
  background: var(--green);
  color: var(--surface);
}
.login-card .brand small {
  color: var(--muted);
}
.skip-link {
  background: var(--surface);
  color: var(--ink);
}
[data-theme=dark] {
  --pale:#30483a;
  --white:#20312b;
}
[data-theme=dark] .badge:not(.red):not(.amber):not(.blue):not(.green):not(.neutral) {
  color: #e5f0e8;
  background: #30483a;
}
[data-theme=dark] .notice.warning {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: #826d3e;
}
[data-theme=dark] .btn.danger {
  background: var(--red-bg);
  color: #ffd0c9;
  border-color: #aa736d;
}
[data-theme=dark] .close-btn:hover,
[data-theme=dark] .register tbody tr:hover,
[data-theme=dark] .panel-foot {
  background: #293c32;
  color: var(--ink);
}
[data-theme=dark] .tab span {
  background: #30483a;
  color: var(--ink);
}
[data-theme=dark] .workflow-strip strong {
  color: var(--teal);
}
[data-theme=dark] #toast {
  background: #a7c3ae;
  color: #172420;
}
[data-theme=dark] .login-card .brand-symbol {
  color: #172420;
}
@media (max-width: 600px) {
  .top-actions {
    flex-wrap: wrap;
  }
  .form-actions .btn {
    flex-basis: 100%;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .dialog-content .btn {
    white-space: normal;
  }
}

/* Template additions. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.brand-symbol img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.workspace-banner {
  overflow-wrap: anywhere;
}

.record-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 20px;
  margin: 12px 0 16px;
}
.record-fields dt {
  font-size: 12px;
  color: var(--muted);
}
.record-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Step-by-step entry, built for a phone held in one hand.
   Text is at least 16px (phones do not zoom in on 16px inputs) and every
   control is at least 44px tall. */
.entry-step {
  font-size: 16px;
  line-height: 1.5;
  max-width: 760px;
  padding: 20px;
}
.entry-step h2 {
  font-size: 22px;
  margin: 6px 0 8px;
}
.entry-step h3 {
  font-size: 17px;
  margin: 18px 0 8px;
}
.entry-step label,
.entry-step legend,
.entry-step .form-hint,
.entry-step .small,
.entry-step p {
  font-size: 16px;
}
.entry-step input[type="text"],
.entry-step input[type="date"],
.entry-step input:not([type]),
.entry-step select,
.entry-step textarea {
  font-size: 16px;
  min-height: 48px;
  width: 100%;
  max-width: 100%;
}
.entry-step textarea {
  min-height: 120px;
}
.entry-step .btn,
.entry-step .text-btn,
.entry-secondary .btn {
  min-height: 48px;
  font-size: 16px;
  padding: 10px 18px;
}
.entry-step .text-btn {
  min-height: 44px;
  text-align: left;
}
.entry-step .form-fields {
  display: grid;
  gap: 14px;
}
.entry-form-name {
  font-weight: 650;
}
.entry-question {
  font-size: 18px;
  margin-bottom: 12px;
}
.entry-progress p {
  margin: 0 0 6px;
}
.entry-progress:focus {
  outline: none;
}
.entry-bar {
  height: 8px;
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 14px;
}
.entry-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
}
.choices {
  border: 0;
  padding: 0;
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.choices legend {
  font-weight: 650;
  margin-bottom: 8px;
}
.choice {
  position: relative;
  display: flex;
  margin: 0;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60px;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 18px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.choice input:focus-visible + span {
  outline: 3px solid #d28b24;
  outline-offset: 2px;
}
.choice input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.choice-improve input:checked + span {
  border-color: var(--amber);
  background: var(--amber);
}
.entry-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  margin-top: 20px;
  background: inherit;
  border-top: 1px solid var(--line);
  z-index: 5;
}
.entry-nav .btn {
  min-width: 120px;
}
.entry-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.entry-photos .photo-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.photo-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 600;
  cursor: pointer;
}
.photo-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.photo-picker:focus-within {
  outline: 3px solid #d28b24;
  outline-offset: 2px;
}
.entry-photo {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.entry-photo img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--line);
}
.entry-photos-view {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.entry-photos-view .entry-photo {
  display: block;
  width: 120px;
}
.entry-missing {
  border-left: 4px solid var(--amber);
  background: var(--amber-bg);
  padding: 10px 14px;
  border-radius: 6px;
}
.entry-missing ul {
  margin: 0;
  padding-left: 18px;
}
.entry-complete {
  color: var(--teal);
  font-weight: 650;
}
.entry-summary {
  padding-left: 20px;
}
.entry-summary li {
  margin-bottom: 10px;
}
.entry-step .checkbox {
  min-height: 48px;
  align-items: center;
}
.entry-step .checkbox input {
  width: 24px;
  height: 24px;
}
.entry-submit {
  width: 100%;
  margin-top: 12px;
}
@media (max-width: 600px) {
  .entry-step {
    padding: 14px;
  }
  .choices {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   Layout and sizes: role menu, phone bottom bar, readable text.
   Comes last so it wins over the original styles above.
   =================================================================== */

/* Nothing a person must read is under 14px; body text is 16px. */
:root {
  font-size: 16px;
}
body {
  font-size: 16px;
}
#toast,
.action-link,
.alert-text,
.attention-row .btn,
.attention-row h3,
.attention-row p,
.avatar,
.badge,
.bar-row,
.brand small,
.breadcrumb,
.btn,
.caption,
.chart-controls select,
.chart-total small,
.checkbox,
.date-note,
.demo-label,
.dialog-head p,
.draft-meta,
.draft-row h3,
.draft-row p,
.due-text,
.empty p,
.evidence-box,
.evidence-card figcaption,
.eyeline,
.field-read dd,
.field-read dt,
.filter-top .btn,
.footer-note,
.form-error,
.form-hint,
.heading-actions .btn,
.info-block li,
.info-block p,
.legend-row,
.local,
.login-card p,
.map-branch summary,
.map-node p,
.mapping summary,
.mapping table,
.metric-caption,
.metric-label,
.mono,
.nav .count,
.nav button,
.nav-label,
.notice,
.page-heading p,
.panel-foot,
.panel-head p,
.person,
.question-entry details,
.question-entry p,
.queue-group-head p,
.record-fields dt,
.register th,
.reminder-row h3,
.reminder-row p,
.sidebar-bottom,
.small,
.source-item h3,
.source-item p,
.step-num,
.storage-warning,
.tab,
.tab span,
.table-description,
.table-topic,
.text-btn,
.timeline li,
.timeline-diff,
.top-actions .btn,
.topbar,
.trend-table,
.walk-step small,
.walk-step strong,
.walkthrough > p,
.walkthrough-foot,
.workflow-strip,
.workspace-banner,
input,
label,
select,
small,
table.register,
textarea {
  font-size: 14px;
}
p,
li,
td,
label,
input,
select,
textarea,
.btn,
.info-block p,
.info-block li,
.page-heading p,
.login-card p,
.question-entry p,
.source-item p,
.map-node p,
.empty p,
.panel-head p,
.notice,
.timeline li,
.table-description,
.form-error {
  font-size: 16px;
}
.small,
small,
.caption,
.form-hint,
.footer-note,
.mono,
.badge,
.metric-label,
.panel-foot,
.due-text,
.table-topic,
.register th,
.legend-row,
.bar-row {
  font-size: 14px;
}
.brand small {
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: none;
}
.nav-label {
  font-size: 14px;
  letter-spacing: 0.3px;
}
.label-text {
  display: block;
}
.label-text .muted {
  font-weight: 400;
}
.label-hint {
  display: block;
  font-weight: 400;
  font-size: 14px;
  color: var(--muted);
}

/* Top bar: notifications bell with a count; theme and sign-out on a computer. */
.topbar {
  height: auto;
  min-height: 64px;
  font-size: 14px;
}
.topbar-brand {
  display: none;
}
.topbar-brand .brand {
  padding: 0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-person {
  color: var(--muted);
  font-size: 14px;
}
.top-desktop {
  display: flex;
  gap: 10px;
}
.bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.bell .icon {
  width: 22px;
  height: 22px;
}
.bell .count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  font-weight: 700;
}

/* Main menu: vertical in the sidebar on a computer. */
.nav-short {
  display: none;
}
.nav button {
  font-size: 15px;
  min-height: 48px;
}
.nav .count {
  font-size: 14px;
}

/* Messages sit in the page, never over a button. */
.toast-slot:empty,
.dialog-toast:empty {
  display: none;
}
.toast-message {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 5px solid var(--teal);
  background: var(--pale);
  color: var(--ink);
  font-size: 16px;
}
.dialog-toast {
  padding: 10px 24px 0;
}
#toast {
  top: calc(12px + env(safe-area-inset-top, 0px));
  bottom: auto;
}
#toast .toast-message {
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}

/* Home, To do, More. */
.needs-list,
.todo-list,
.more-list,
.first-run-steps {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.first-run-steps {
  list-style: decimal;
  padding-left: 22px;
  margin-bottom: 18px;
}
.need,
.more-link,
.todo-item {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  text-align: left;
}
.more-link {
  justify-content: flex-start;
}
.more-link .count {
  margin-left: auto;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 13px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.btn.big {
  min-height: 56px;
  font-size: 18px;
  padding: 12px 24px;
}
.metrics.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metrics.compact .metric {
  min-height: 0;
}
.view-tabs {
  margin-bottom: 16px;
}
.entry-step-title {
  font-size: 20px;
  margin: 0 0 4px;
}

/* Phones: menu becomes a bar at the bottom of the screen, within thumb reach. */
@media (max-width: 700px) {
  .shell {
    display: block;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    width: auto;
    height: auto;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    display: block;
    z-index: 40;
    box-shadow: 0 -2px 12px #0002;
  }
  .sidebar .brand,
  .sidebar .nav-label {
    display: none;
  }
  .nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    overflow: visible;
    padding: 0;
  }
  .nav button {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: auto;
    min-width: 0;
    min-height: 60px;
    padding: 6px 2px;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    border-radius: 10px;
  }
  .nav .icon {
    width: 22px;
    height: 22px;
  }
  .nav-full {
    display: none;
  }
  .nav-short {
    display: block;
    overflow-wrap: anywhere;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 56px;
    height: auto;
    padding: 6px 16px;
  }
  .topbar-brand {
    display: block;
  }
  .topbar .brand {
    gap: 8px;
  }
  .topbar .brand-symbol {
    width: 32px;
    height: 32px;
  }
  .topbar .brand strong {
    font-size: 18px;
  }
  .topbar .brand small,
  .top-person,
  .top-desktop {
    display: none;
  }
  .main {
    padding: 16px 16px 24px;
  }
  .page-heading {
    margin-bottom: 14px;
  }
  .page-heading p {
    font-size: 16px;
  }
  h1 {
    font-size: 24px;
  }
  .metrics.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .entry-nav {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  /* Every tap target at least 44px tall. */
  .btn,
  .text-btn,
  .tab,
  .close-btn,
  .register th button,
  input:not([type=checkbox]):not([type=radio]),
  select,
  summary,
  .checkbox {
    min-height: 44px;
  }
  .text-btn,
  summary {
    display: inline-flex;
    align-items: center;
  }
  .close-btn {
    min-width: 44px;
  }
}

/* The logo square always sits on the brand colour, wherever it appears. */
.brand-symbol,
[data-theme=dark] .brand-symbol {
  background: var(--brand, #1b453b);
  border-color: #ffffff55;
  color: #fff;
}

/* The notification count keeps white on dark red in both themes. */
.bell .count,
[data-theme=dark] .bell .count {
  background: #a23f2c;
  color: #fff;
}

.panel .more-list,
.panel .needs-list,
.panel .todo-list {
  padding: 0;
  margin-left: 0;
}
.panel .more-list li,
.panel .needs-list li,
.panel .todo-list li {
  margin: 0;
}

/* People. */
.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.person-row.inactive strong {
  text-decoration: line-through;
}
.setup-link {
  overflow-wrap: anywhere;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* Sign-in card logo: the same brand square in both themes. */
.login-card .brand-symbol,
[data-theme=dark] .login-card .brand-symbol {
  background: var(--brand, #1b453b);
  color: #fff;
}
