* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #1a1d23;
  margin: 0;
  padding: 0;
}
header.topbar {
  background: #1f2530;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
header.topbar h1 { font-size: 18px; margin: 0; }
header.topbar nav { margin-left: auto; display: flex; gap: 16px; }
header.topbar nav a { color: #c9d1e0; text-decoration: none; font-size: 14px; }
header.topbar nav a:hover { color: #fff; }
header.topbar .breadcrumb { color: #9aa4b8; font-size: 14px; }
header.topbar .breadcrumb::before { content: "/"; margin-right: 8px; color: #4a5164; }

main { max-width: 1080px; margin: 24px auto; padding: 0 20px 60px; }

.card {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 16px; color: #444; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}
.status-ok { background: #e3f6e8; color: #1c7a34; }
.status-missing { background: #fbe6e6; color: #a3271f; }
.status-later { background: #eef0f3; color: #6b7280; }

.module-list { display: flex; flex-direction: column; gap: 4px; }
.module-card { display: flex; flex-direction: column; gap: 10px; }
.module-card h2 { font-size: 17px; color: #1a1d23; }
.module-explanation { margin: 0; color: #555; font-size: 14px; line-height: 1.5; }
.module-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.module-footer .actions { margin-top: 0; }

form .field { margin-bottom: 14px; }
form label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
form input[type=text], form select {
  width: 100%; max-width: 320px; padding: 8px 10px;
  border: 1px solid #ccd1d9; border-radius: 6px; font-size: 14px;
}
button.primary {
  background: #2a5bd7; color: #fff; border: none; border-radius: 6px;
  padding: 10px 18px; font-size: 14px; cursor: pointer;
}
button.primary:hover { background: #2149b0; }
button.primary:disabled { background: #99a3b8; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th, table td {
  text-align: left; padding: 6px 10px; border-bottom: 1px solid #edeff2;
  white-space: nowrap;
}
table th { background: #f1f3f6; color: #444; font-weight: 600; }
table tr:hover td { background: #fafbfd; }

.summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.summary-grid .stat { background: #f8f9fb; border-radius: 6px; padding: 10px 14px; }
.summary-grid .stat .label { font-size: 12px; color: #777; }
.summary-grid .stat .value { font-size: 18px; font-weight: 700; margin-top: 2px; }

.actions { margin-top: 16px; display: flex; gap: 10px; }
.actions a.button, .actions button {
  display: inline-block; padding: 8px 14px; border-radius: 6px; font-size: 13px;
  text-decoration: none; border: 1px solid #ccd1d9; color: #333; background: #fff;
}
.actions a.button:hover { background: #f1f3f6; }

.details-toggle summary { cursor: pointer; color: #2a5bd7; font-size: 13px; margin: 10px 0; }

.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

.table-scroll { overflow-x: auto; border: 1px solid #edeff2; border-radius: 6px; }
table.keyword-table { width: max-content; min-width: 100%; }
table.keyword-table th, table.keyword-table td { min-width: 110px; }
table.keyword-table th.col-select, table.keyword-table td.col-select {
  min-width: 40px; max-width: 40px; width: 40px; text-align: center;
  position: sticky; left: 0; background: #fff; box-shadow: 1px 0 0 #edeff2;
}
table.keyword-table th.col-select { background: #f1f3f6; z-index: 2; }
table.keyword-table td.col-select { z-index: 1; }
table.keyword-table th.col-searchterm, table.keyword-table td.col-searchterm {
  min-width: 220px; max-width: 320px; white-space: normal; word-break: break-word;
  position: sticky; left: 40px; background: #fff; box-shadow: 1px 0 0 #edeff2;
}
table.keyword-table th.col-searchterm { background: #f1f3f6; z-index: 1; }

pre.raw {
  background: #1a1d23; color: #d7dce3; padding: 16px; border-radius: 6px;
  overflow-x: auto; font-size: 12.5px; line-height: 1.5;
}

.error-box { background: #fbe6e6; color: #7a1f18; padding: 14px 18px; border-radius: 6px; }
.muted { color: #888; font-size: 12px; }
.special-value { color: #a3271f; font-style: italic; }
