.flush { margin-top: 0; }
.card { margin-bottom: 20px; }
.top-gap { margin-top: 14px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.field { min-width: 0; }
.field label { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
@media (min-width: 620px) {
  .field-wide { grid-column: 1 / -1; }
}
textarea { resize: vertical; }

button, .btn, label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
input:not([type="file"]):not([type="hidden"]), select, textarea {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
}
input[type="checkbox"] {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  flex: 0 0 44px;
  cursor: pointer;
  accent-color: var(--accent);
}

.err-msg { color: var(--warn); font-weight: 600; margin: 8px 0; overflow-wrap: anywhere; }
.warn-box {
  background: var(--chip);
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 10px 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.subhead { margin-top: 16px; }
.subhead h3 { margin-bottom: 4px; }

.list { list-style: none; padding: 0; margin: 12px 0 0; }
.list li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.list li.is-excluded { opacity: 0.68; }
.item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}
.title { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.meta { font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.bullet-body { margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}
.check-label {
  cursor: pointer;
  font-size: 14px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  min-width: 0;
}
.stage-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 160px;
}
.stage-inline select {
  width: auto;
  flex: 1 1 130px;
  min-width: 44px;
}

.kw-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 4px;
}
.kw-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.kw-score {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
}
.match-svg {
  width: 100%;
  max-width: 100%;
  height: 12px;
  display: block;
  margin-bottom: 8px;
}
.bar-bg { fill: var(--line); }
.bar-fg { fill: var(--accent); }
.kw-note { margin: 0 0 10px; }
.kw-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
}
.kw-box { min-width: 0; }
.kw-label { font-weight: 600; margin-bottom: 6px; }
.pill-wrap { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.pill { overflow-wrap: anywhere; max-width: 100%; margin: 0; }
.pill.miss {
  border: 1px solid var(--warn);
  color: var(--warn);
  background: var(--surface);
}

.resume-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  overflow-wrap: anywhere;
}
.rs-cover {
  border-bottom: 2px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.rs-name { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.rs-headline { font-weight: 600; color: var(--muted); margin: 4px 0 2px; overflow-wrap: anywhere; }
.rs-contact { font-size: 14px; color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; }
.rs-sec {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  margin: 14px 0 8px;
}
.rs-role-block { margin-bottom: 10px; }
.rs-role-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-weight: 600;
}
.rs-dates { font-size: 14px; color: var(--muted); font-weight: 400; }
.rs-bullets { margin: 4px 0 0; padding-left: 20px; }
.rs-bullets li { margin-bottom: 4px; overflow-wrap: anywhere; }
.rs-para { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 8px;
}
.stage-chip {
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

@media print {
  .no-print, header.top, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: 100%; padding: 0; margin: 0; }
  .tailor-section, .resume-sheet {
    border: none;
    padding: 0;
    margin: 0;
    background: #fff;
    color: #000;
  }
  .rs-headline, .rs-contact, .rs-dates { color: #222; }
  .rs-sec, .rs-cover { border-color: #999; }
}
