.markdown-preview input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
}

.wiki-link {
  color: var(--accent);
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid #a99aff;
}

.wiki-link:hover { background: #f0edff; }

.wiki-link.missing {
  color: #9c654e;
  border-bottom-style: dashed;
  cursor: help;
}

.info-marker {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  margin: 0 .2em;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .78em;
  font-weight: 800;
  vertical-align: .08em;
}

#properties-panel {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.properties-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.properties-list div {
  display: grid;
  grid-template-columns: minmax(70px, .8fr) minmax(90px, 1.2fr);
  gap: 9px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid #e9e5dc;
  border-radius: 6px;
  background: #faf9f6;
}

.properties-list dt {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}

.properties-list dd {
  margin: 0;
  font-size: 13px;
  word-break: break-word;
}

.save-state {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.save-state.dirty {
  color: #9c5a18;
  font-weight: 650;
}

.external-state {
  max-width: 260px;
  padding: 4px 7px;
  border: 1px solid #e1bd73;
  border-radius: 5px;
  background: #fff8e8;
  color: #8a5b12;
  font-size: 11px;
  line-height: 1.25;
}

.operation-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e2aaaa;
  border-radius: 7px;
  background: #fff1f1;
  color: #8f2525;
  font-size: 13px;
}

.brand-link {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 5px 0;
  font-size: 18px;
  font-weight: 750;
}

.brand-link:hover {
  border: 0;
  color: #dcd4ff;
}

.note-icon,
.activity-icon,
.legend-diamond {
  flex: 0 0 16px;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.attention-seen {
  color: #fff;
  text-shadow: -1px 0 #8a847b, 0 1px #8a847b, 1px 0 #8a847b, 0 -1px #8a847b;
}

.attention-created { color: #24a05a; }
.attention-modified { color: #d5a21b; }
.attention-deleted { color: var(--danger); }

main.home-mode #workspace { grid-column: 2; }

#workspace.home {
  overflow: auto;
  padding: 32px clamp(22px, 4vw, 64px);
}

.home-inner { max-width: 1040px; margin: 0 auto; }

.home-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.home-heading h1 { margin: 2px 0 5px; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; }
.home-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--accent) !important; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.attention-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; }
.attention-legend span { display: inline-flex; align-items: center; gap: 4px; }

.activity-feed { display: grid; gap: 8px; }

.activity-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  border-color: #e4dfd6;
  box-shadow: 0 1px 0 rgba(40, 34, 28, .03);
}

.activity-item:hover { border-color: #b8aaff; background: #fbfaff; }
.activity-static { cursor: default; }
.activity-static:hover { border-color: #e4dfd6; background: var(--paper); }
.deleted-event { border-left: 3px solid #d79a9a; }
.activity-copy { display: grid; min-width: 0; }
.activity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span, .activity-item time { color: var(--muted); font-size: 12px; }
.activity-copy small { margin-top: 2px; color: #9a5959; font-size: 11px; }
.activity-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-item time { white-space: nowrap; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.plan-card { overflow: hidden; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 11px; background: var(--paper); box-shadow: 0 5px 18px rgba(42, 36, 28, .06); }
.plan-card-heading { display: flex; align-items: baseline; gap: 8px; padding: 13px 16px 10px; font-size: 17px; font-weight: 760; }
.plan-card-heading small { color: var(--muted); font-size: 11px; font-weight: 550; }
.plan-content.markdown-preview { height: auto; overflow: visible; border: 0; border-radius: 0; padding: 0 16px 15px; background: transparent; }
.plan-content ul { padding-left: 21px; }
.plan-content .task-item input { cursor: pointer; }
.dashboard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.dashboard-actions .external-state { max-width: 290px; }
.dashboard-actions button:disabled { cursor: default; opacity: .55; }
.plan-today { border-top-color: #d39b20; background: #fffdf7; }
.plan-tomorrow { border-top-color: #5b83cb; background: #f9fbff; }
.plan-week { border-top-color: #7b5cc7; }
.plan-month { border-top-color: #3f9a78; background: #f8fdfa; }
.compact-feed { gap: 7px; }
.activity-item.compact { grid-template-columns: 18px minmax(0, 1fr); gap: 7px; padding: 9px 8px; border-radius: 7px; }
.activity-item.compact .activity-icon { font-size: 14px; }
.activity-item.compact time { grid-column: 2; font-size: 10px; white-space: normal; }
.activity-item.compact .activity-copy span { font-size: 10px; }

@media (max-width: 1050px) {
  main.home-mode { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  main.home-mode > aside { grid-row: 1 / 3; }
  main.home-mode #workspace { grid-column: 2; grid-row: 1; }
  main.home-mode #history-panel { display: block; grid-column: 2; grid-row: 2; max-height: 230px; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  main.home-mode #workspace { grid-column: auto; min-height: 66vh; }
  main.home-mode #history-panel { display: block; border-left: 0; border-top: 1px solid var(--line); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .home-heading { display: grid; align-items: start; }
  .activity-item { grid-template-columns: 22px minmax(0, 1fr); }
  .activity-item time { grid-column: 2; }
}
.admin-service-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.admin-service-form label { display: grid; gap: 5px; }
.admin-service-form .wide { grid-column: 1 / -1; }
.admin-service-form input,
.admin-service-form textarea,
.admin-service-form select { padding: 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.admin-secret { word-break: break-all; margin-top: 14px; padding: 12px; border-radius: 8px; background: #f1eee7; }
@media (max-width: 620px) { .admin-service-form { grid-template-columns: 1fr; } }
