/* DefCheck redesign — tokens and layout per design_handoff_defcheck_redesign */

/* ===== Base ===== */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #2b2f36;
  background: #f7f8f6;
}
a { color: #5a8f1f; text-decoration: none; }
a:hover { color: #436c15; text-decoration: underline; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.micro-label {
  font-size: 12px; font-weight: bold; letter-spacing: 1px;
  color: #8a94a3; text-transform: uppercase;
}

/* ===== Header ===== */
.site-header { background: #fff; border-bottom: 1px solid #e7e9e4; }
.site-header .inner {
  max-width: 1140px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap;
}
.site-header img.logo { width: 230px; max-width: min(230px, 55vw); height: auto; display: block; }
.badge-free {
  background: #f0f7e6; color: #5a8f1f; font-size: 12px; font-weight: bold;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.site-nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; flex-wrap: wrap; }
.site-nav a { color: #55677c; }
.site-nav a.active { color: #2b2f36; font-weight: bold; }

/* ===== Hero ===== */
.hero { background: #fff; }
.hero .inner { max-width: 1140px; margin: 0 auto; padding: 34px 24px 30px; }
.hero h1 {
  margin: 0 0 10px; font-size: clamp(24px, 4.5vw, 32px); font-weight: bold;
  letter-spacing: -0.5px; line-height: 1.2; text-wrap: pretty;
}
.hero p.sub { margin: 0; font-size: 17px; color: #55677c; max-width: 760px; text-wrap: pretty; }
.trust-row { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; font-size: 13px; color: #55677c; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: #8cc63f; flex: none; }

/* ===== Main two-column area ===== */
.main-cols {
  flex: 1 0 auto; max-width: 1140px; width: 100%; margin: 0 auto;
  padding: 26px 24px 8px; display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}
.col-tool { flex: 11; min-width: min(420px, 100%); }
.col-findings { flex: 9; min-width: min(360px, 100%); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 11px 18px; font-size: 15px; border-radius: 8px 8px 0 0; }
.tabs a.active {
  background: #fff; border: 1px solid #e7e9e4; border-bottom: none;
  color: #2b2f36; font-weight: bold; position: relative; top: 1px; cursor: default;
}
.tabs a.active:hover { color: #2b2f36; text-decoration: none; }
.tabs a.inactive { color: #5a8f1f; cursor: pointer; }
.tabs a.inactive:hover { background: #eef2ea; text-decoration: none; }

/* ===== Tool card ===== */
.tool-card {
  background: #fff; border: 1px solid #e7e9e4; border-radius: 0 10px 10px 10px;
  padding: 24px; box-shadow: 0 1px 3px rgba(43,47,54,0.04);
}

/* Error banner */
.error-banner {
  background: #fdf1ee; border: 1px solid #f2cfc6; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 18px; display: flex; gap: 12px;
}
.error-banner .eb-badge {
  width: 22px; height: 22px; border-radius: 50%; background: #b02a2a; color: #fff;
  font-weight: bold; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none;
}
.error-banner .eb-title { font-weight: bold; font-size: 14.5px; color: #8f1f1f; }
.error-banner .eb-body { font-size: 13.5px; color: #7a4a41; margin-top: 4px; text-wrap: pretty; }
.error-banner .eb-contact { font-size: 12.5px; color: #7a4a41; margin-top: 6px; }
.error-banner .eb-contact a { color: #8f1f1f; text-decoration: underline; }

/* Dropzones */
.dropzone {
  border: 2px dashed #dfe3da; background: #fcfcfb; border-radius: 10px;
  padding: 30px 20px; text-align: center; cursor: pointer;
}
.dropzone:hover, .dropzone.dragover, .dropzone.attached { border-color: #8cc63f; background: #fafcf6; }
.dropzone img.dz-icon { width: 27px; height: 27px; opacity: 0.75; }
.dz-title { font-weight: bold; font-size: 15px; margin-top: 8px; color: #2b2f36; overflow-wrap: anywhere; }
.dz-hint { font-size: 13px; color: #8a94a3; margin-top: 3px; }
.dropzone.attached .dz-hint { color: #5a8f1f; }
.paired-intro { margin: 0 0 14px; font-size: 14px; color: #55677c; text-wrap: pretty; }
.paired-zones { display: flex; gap: 14px; flex-wrap: wrap; }
.paired-zones .dropzone { flex: 1; min-width: 150px; padding: 22px 16px; }
.dz-step { font-size: 11px; font-weight: bold; letter-spacing: 1px; color: #8a94a3; text-transform: uppercase; }
.paired-zones .dz-title { font-size: 14px; margin-top: 6px; }
.paired-zones .dz-hint { font-size: 12px; }
.paired-note { font-size: 12.5px; color: #8a94a3; margin-top: 8px; }

/* Options row */
.options-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.options-row label {
  display: flex; align-items: center; gap: 7px; font-size: 14px; color: #55677c; cursor: pointer;
}
.options-row .ignore-link { font-size: 13px; margin-left: auto; cursor: pointer; }

/* Action buttons */
.actions-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-primary {
  flex: 2; border: none; background: #8cc63f; color: #fff; font-weight: bold; font-size: 17px;
  padding: 13px 24px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: #7db82f; }
.btn-neutral {
  flex: 1; background: #fff; color: #55677c; border: 1px solid #dfe3da; font-size: 15px;
  padding: 13px 24px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.btn-neutral:hover { border-color: #8a94a3; color: #2b2f36; }

/* Progress */
.progress-wrap { margin-top: 18px; }
.progress-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #2b2f36; font-weight: bold; }
.progress-head .cancel-link { margin-left: auto; font-size: 13px; font-weight: normal; cursor: pointer; }
.progress-track { height: 8px; background: #eef0eb; border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: #8cc63f; border-radius: 4px; transition: width 0.5s ease; }
.progress-note { font-size: 12.5px; color: #8a94a3; margin-top: 8px; }

.privacy-note { margin-top: 14px; font-size: 12.5px; color: #8a94a3; text-wrap: pretty; }

/* Working state: freeze inputs */
.is-working .dropzone, .is-working .options-row { pointer-events: none; opacity: 0.55; }

/* ===== Legend card ===== */
.legend-card {
  background: #fff; border: 1px solid #e7e9e4; border-radius: 10px;
  padding: 18px 22px; margin-top: 16px;
}
.legend-card .micro-label { margin-bottom: 10px; }
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 13.5px; color: #55677c; }
.legend-grid span.item { display: flex; align-items: center; gap: 8px; }
.swatch { width: 13px; height: 13px; border: 1px solid rgba(0,0,0,0.15); border-radius: 3px; flex: none; }

/* ===== Findings panel ===== */
.findings-card {
  background: #fff; border: 1px solid #e7e9e4; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(43,47,54,0.04); overflow: hidden;
}
.fp-header { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid #eef0eb; }
.fp-header .fp-title { font-weight: bold; font-size: 16px; }
.btn-copy {
  margin-left: auto; border: 1px solid #dfe3da; background: #fff; color: #55677c;
  border-radius: 6px; padding: 5px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-copy:hover { border-color: #8cc63f; color: #5a8f1f; }

/* Empty state: 3 steps */
.fp-empty { padding: 26px 24px; }
.fp-step { display: flex; gap: 14px; margin-bottom: 20px; }
.fp-step .num {
  width: 26px; height: 26px; border-radius: 50%; background: #f0f7e6; color: #5a8f1f;
  font-weight: bold; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}
.fp-step .txt { font-size: 14px; color: #55677c; text-wrap: pretty; }
.fp-step .txt strong { color: #2b2f36; }
.fp-sample-link { font-size: 14px; cursor: pointer; }

/* Post-check state */
.fp-summary { padding: 16px 20px; border-bottom: 1px solid #eef0eb; }
.pills { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pill { font-size: 12.5px; font-weight: bold; padding: 4px 10px; border-radius: 6px; }
.pill-pink { background: #fdeef9; color: #a4247f; }
.pill-red { background: #fdeeee; color: #b02a2a; }
.pill-green { background: #f0f7e6; color: #5a8f1f; }
.fp-top-title {
  font-size: 11.5px; font-weight: bold; letter-spacing: 1px; color: #8a94a3;
  text-transform: uppercase; margin-bottom: 8px;
}
.top-list { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; color: #2b2f36; }
.top-list .row { display: flex; gap: 8px; }
.top-list .pg { color: #8a94a3; flex: none; }
.top-list .dim { color: #8a94a3; }
.fp-warn {
  padding: 12px 20px; background: #fdf1ee; border-top: 1px solid #f2cfc6; border-bottom: 1px solid #f2cfc6;
  font-size: 13px; color: #7a4a41; text-wrap: pretty;
}
.fp-warn strong { color: #8f1f1f; }
.fp-full-label {
  padding: 10px 20px 0; font-size: 11.5px; font-weight: bold; letter-spacing: 1px;
  color: #8a94a3; text-transform: uppercase; background: #fafaf8;
}
#reportText {
  width: 100%; height: 260px; border: none; padding: 10px 20px 14px;
  font-family: "Courier New", Courier, monospace; font-size: 12.5px; line-height: 1.5;
  background: #fafaf8; color: #2b2f36; resize: vertical; display: block; outline: none;
}
.fp-banner { padding: 12px 20px; background: #f0f7e6; font-size: 13px; color: #436c15; text-wrap: pretty; }

/* ===== "Why it matters" strip ===== */
.how-strip { max-width: 1140px; width: 100%; margin: 0 auto; padding: 26px 24px 40px; }
.how-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.how-card { flex: 1; min-width: 240px; background: #fff; border: 1px solid #e7e9e4; border-radius: 10px; padding: 20px 22px; }
.how-card .t { font-weight: bold; font-size: 15px; margin-bottom: 6px; }
.how-card .b { font-size: 13.5px; color: #55677c; text-wrap: pretty; }

/* ===== Footer ===== */
.site-footer { flex-shrink: 0; background: #2b2f36; color: #a8afb8; font-size: 13.5px; padding: 22px 0; margin-top: auto; }
.site-footer .inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.site-footer .links { margin-left: auto; display: flex; gap: 18px; }
.site-footer a { color: #a8afb8; }
.site-footer a:hover { color: #fff; }

/* ===== Ignore-list modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43,47,54,0.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 10px; width: 100%; max-width: 400px; padding: 20px 22px;
  box-shadow: 0 10px 40px rgba(43,47,54,0.25);
}
.modal .m-title { font-weight: bold; font-size: 16px; margin-bottom: 6px; }
.modal .m-hint { font-size: 13px; color: #8a94a3; margin-bottom: 10px; }
.modal textarea {
  width: 100%; height: 180px; border: 1px solid #dfe3da; border-radius: 8px; padding: 10px;
  font-family: inherit; font-size: 14px; resize: vertical;
}
.modal .m-actions { display: flex; gap: 10px; margin-top: 12px; justify-content: flex-end; }
.modal .m-actions .btn-primary { flex: none; font-size: 14px; padding: 8px 18px; }
.modal .m-actions .btn-neutral { flex: none; font-size: 14px; padding: 8px 18px; }

/* ===== Instant CSS tooltips ===== */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #2b2f36; color: #fff; font-size: 12.5px; font-weight: normal; line-height: 1.4;
  padding: 8px 10px; border-radius: 6px; width: max-content; max-width: 260px;
  text-align: left; z-index: 60; pointer-events: none; white-space: normal;
}
[data-tip]:hover::before {
  content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #2b2f36; z-index: 60; pointer-events: none;
}

/* ===== Content pages (About / FAQ / Legal) ===== */
.content-narrow { flex: 1 0 auto; max-width: 860px; width: 100%; margin: 0 auto; padding: 36px 24px 48px; line-height: 1.6; }
.content-narrow h1 { margin: 0 0 22px; font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.5px; }
.content-narrow h2 { margin: 34px 0 16px; font-size: 22px; letter-spacing: -0.3px; }
.content-card { background: #fff; border: 1px solid #e7e9e4; border-radius: 10px; padding: 28px 30px; font-size: 15px; color: #3d4550; }
.content-card p { margin: 0 0 16px; text-wrap: pretty; }
.content-card p:last-child { margin-bottom: 0; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cards-grid .card { background: #fff; border: 1px solid #e7e9e4; border-radius: 10px; padding: 22px 24px; }
.cards-grid .card .t { font-weight: bold; margin-bottom: 6px; }
.cards-grid .card .b { font-size: 14px; color: #55677c; text-wrap: pretty; }
.qa-list { display: flex; flex-direction: column; gap: 14px; }
.qa-card { background: #fff; border: 1px solid #e7e9e4; border-radius: 10px; padding: 22px 26px; }
.qa-card .q { font-weight: bold; font-size: 16px; margin-bottom: 8px; }
.qa-card .a { font-size: 14.5px; color: #3d4550; text-wrap: pretty; }
.qa-card .a p { margin: 0 0 12px; }
.qa-card .a p:last-child { margin-bottom: 0; }
.hl-sample { padding: 0 4px; }

/* Legal page (long-form text inside cards) */
.legal-card { background: #fff; border: 1px solid #e7e9e4; border-radius: 10px; padding: 26px 30px; font-size: 14.5px; color: #3d4550; margin-bottom: 18px; }
.legal-card h4 { margin: 22px 0 8px; font-size: 15.5px; color: #2b2f36; }
.legal-card p { margin: 0 0 12px; text-wrap: pretty; }
.legal-card ul { margin: 0 0 12px; padding-left: 22px; }
.legal-card li { margin-bottom: 6px; }
.legal-updated { font-size: 13px; color: #8a94a3; font-style: italic; margin: 0 0 14px; }
.legal-toc { font-size: 14px; margin-bottom: 20px; display: flex; gap: 18px; flex-wrap: wrap; }
