:root {
  color: #172b4d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: rgb(128, 128, 128);
}

.topbar {
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: #0b5dcc;
  box-shadow: 0 1px 1px #091e4240;
}

.topbar a {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.topbar > span { font-size: 12px; opacity: .85; }
.page-shell { padding: 48px 20px; }

.card-search {
  width: min(960px, 100%);
  margin: 0 auto 18px;
  padding: 16px 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px #091e4240;
}

.card-search label { display: block; margin-bottom: 7px; font-weight: 600; }
.card-search > div { display: flex; gap: 8px; }
.card-search input { min-width: 0; flex: 1; padding: 10px 12px; border: 2px solid #8590a2; border-radius: 4px; color: #172b4d; font: inherit; }
.card-search input:focus { border-color: #0c66e4; outline: 2px solid #85b8ff; }
.card-search button { padding: 10px 18px; border: 0; border-radius: 4px; color: #fff; background: #0c66e4; font: inherit; font-weight: 600; cursor: pointer; }
.card-search button:hover { background: #0055cc; }
.card-search small { display: block; margin-top: 7px; color: #626f86; }
.input-error { width: min(960px, 100%); margin: 0 auto; padding: 12px 16px; border-radius: 4px; color: #ae2e24; background: #ffebe6; font-weight: 600; }

.trello-card, .card-error {
  width: min(960px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f2f4;
  box-shadow: 0 12px 32px #091e4260;
}

.card-error { padding: 36px; }
.card-error h1 { margin-top: 0; }
.card-cover { display: block; width: 100%; max-height: 300px; object-fit: cover; }

.card-title { display: flex; gap: 14px; padding: 24px 28px 8px; }
.title-icon { padding-top: 2px; font-size: 22px; }
h1 { margin: 0 0 5px; font-size: 23px; line-height: 1.2; }
.card-title p { margin: 0; color: #44546f; }
.archived { margin-left: 8px; padding: 2px 6px; border-radius: 3px; background: #dcdfe4; }

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; padding: 14px 28px 32px; }
.metadata { display: flex; flex-wrap: wrap; gap: 18px; margin-left: 38px; margin-bottom: 28px; }
.meta-group h2, .card-sidebar h2 { margin: 0 0 6px; color: #44546f; font-size: 11px; text-transform: uppercase; }
.avatars { display: flex; gap: 4px; }
.avatar { width: 32px; height: 32px; display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; color: #fff; background: #0c66e4; font-size: 11px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.labels { display: flex; flex-wrap: wrap; gap: 4px; }
.label { min-width: 42px; min-height: 32px; padding: 8px 12px; border-radius: 3px; background: #8590a2; color: #fff; font-weight: 600; }
.label-green { background: #1f845a; } .label-yellow { background: #e2b203; color: #172b4d; }
.label-orange { background: #e56910; } .label-red { background: #c9372c; }
.label-purple { background: #8f7ee7; } .label-blue { background: #0c66e4; }
.label-sky { background: #227d9b; } .label-lime { background: #6a9a23; }
.label-pink { background: #ae4787; } .label-black { background: #44546f; }
.date-badge { display: block; padding: 7px 10px; border-radius: 3px; background: #dcdfe4; }
.date-badge.complete { background: #1f845a; color: #fff; }

.card-section { margin-bottom: 30px; }
.card-section > h2 { display: flex; gap: 15px; align-items: center; margin: 0 0 12px; font-size: 16px; }
.card-section > h2 span { width: 23px; text-align: center; font-size: 20px; font-weight: 400; }
.description { margin-left: 38px; padding: 14px 16px; border-radius: 3px; background: #fff; white-space: pre-wrap; line-height: 1.55; }
.custom-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-left: 38px; }
.custom-field h3 { margin: 0 0 6px; color: #44546f; font-size: 12px; }
.custom-field-value { min-height: 36px; padding: 9px 11px; border: 1px solid #8590a2; border-radius: 4px; background: #fff; overflow-wrap: anywhere; }
.custom-field-value.empty { color: #626f86; }
.check-progress { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; margin: 0 0 8px; color: #44546f; font-size: 11px; }
.check-progress > div { height: 8px; overflow: hidden; border-radius: 5px; background: #dcdfe4; }
.check-progress i { display: block; height: 100%; border-radius: 5px; background: #0c66e4; }
.checklist ul { margin: 0; padding: 0 0 0 38px; list-style: none; }
.checklist li { padding: 8px 0; }
.checklist li span { margin-right: 8px; font-size: 18px; }
.checklist li.checked { color: #626f86; text-decoration: line-through; }

.attachment { display: flex; gap: 12px; margin: 0 0 10px 38px; color: #172b4d; text-decoration: none; }
.attachment:hover strong { text-decoration: underline; }
.attachment-preview { width: 110px; height: 72px; display: flex; flex: 0 0 110px; align-items: center; justify-content: center; overflow: hidden; border-radius: 3px; background: #dcdfe4; color: #44546f; }
.attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.attachment > span:last-child { padding-top: 8px; }
.attachment small { display: block; margin-top: 7px; color: #44546f; }
.comment { display: grid; grid-template-columns: 32px 1fr; gap: 8px; margin: 0 0 18px; }
.comment p { margin: 0 0 6px; }
.comment time { margin-left: 4px; color: #626f86; font-size: 12px; }
.comment-body { display: inline-block; padding: 10px 12px; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px #091e4240; white-space: pre-wrap; line-height: 1.45; }
.muted { margin-left: 38px; color: #626f86; }
.card-sidebar > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 9px 10px; border-radius: 3px; background: #dcdfe4; }
.card-sidebar > div span { color: #44546f; }

@media (max-width: 700px) {
  .page-shell { padding: 18px 8px; }
  .card-title { padding: 20px 18px 8px; }
  .card-grid { grid-template-columns: 1fr; padding: 12px 18px 24px; }
  .card-sidebar { order: -1; margin-left: 38px; }
  .card-sidebar > div { display: inline-flex; margin: 0 4px 6px 0; }
  .card-sidebar > div span { display: none; }
  .metadata { margin-left: 0; }
  .custom-fields { margin-left: 0; }
  .attachment { margin-left: 0; }
  .card-search > div { display: grid; }
}
