/* Content Shape Checker. Defaults follow the Census theme tokens (--ink, --canvas, --lime...) when present. */
.hsc {
  --hsc-ink: var(--ink, #172321);
  --hsc-muted: var(--muted, #4A5654);
  --hsc-line: var(--rule, #D9D6CB);
  --hsc-panel: var(--panel, #ECE9DE);
  --hsc-bg: var(--paper, #FBFAF5);
  --hsc-canvas: var(--canvas, #F4F2E9);
  --hsc-lime: var(--lime, #DCFA57);
  --hsc-accent: var(--ink, #172321);
  --hsc-accent-ink: var(--canvas, #F4F2E9);
  --hsc-pass: #008060;
  --hsc-notes: #946B00;
  --hsc-fail: #B84A00;
  --hsc-d1: #F3E7C2;
  --hsc-d1-line: #946B00;
  --hsc-d2: #D6E8F4;
  --hsc-d2-line: #0072B2;
  --hsc-d3: #EEDDEA;
  --hsc-d3-line: #9B5388;
  --hsc-d4: #F6DDCB;
  --hsc-d4-line: #B84A00;
  --hsc-radius: var(--radius-m, 14px);
  --hsc-font: inherit;
  --hsc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color: var(--hsc-ink);
  font-family: var(--hsc-font);
  line-height: 1.55;
  max-width: 900px;
  margin: 0 auto;
}
.hsc *, .hsc *::before, .hsc *::after { box-sizing: border-box; }

.hsc-title { font-size: 1.6em; line-height: 1.2; margin: 0 0 .35em; }
.hsc-intro { color: var(--hsc-muted); margin: 0 0 1.2em; }

.hsc-drop {
  border: 1px solid var(--hsc-line);
  border-radius: var(--hsc-radius);
  background: var(--hsc-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hsc-drop { box-shadow: 0 1px 0 var(--hsc-line), 0 18px 40px -28px rgba(23, 35, 33, .35); }
.hsc-drop.hsc-over { border-color: var(--hsc-ink); box-shadow: 0 0 0 4px var(--hsc-lime); }
.hsc-input {
  display: block;
  width: 100%;
  min-height: 260px;
  padding: 16px;
  border: 0;
  border-radius: var(--hsc-radius) var(--hsc-radius) 0 0;
  background: transparent;
  color: var(--hsc-ink);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}
.hsc-input:focus { outline: none; }
.hsc-drop:focus-within { border-color: var(--hsc-ink); box-shadow: 0 0 0 4px var(--hsc-lime); }
.hsc-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--hsc-line);
  background: var(--hsc-panel);
  border-radius: 0 0 var(--hsc-radius) var(--hsc-radius);
}
.hsc-count { color: var(--hsc-muted); font-size: 13px; margin-right: auto; }
.hsc-upload { position: relative; overflow: hidden; }
.hsc-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.hsc-btn {
  appearance: none;
  border: 2px solid var(--hsc-ink);
  background: var(--hsc-ink);
  color: var(--hsc-accent-ink);
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  transition: background .15s ease, color .15s ease;
}
.hsc-btn:hover { background: var(--hsc-lime); color: var(--hsc-ink); }
.hsc-btn:active { transform: translateY(1px); }
.hsc-btn-ghost { background: transparent; color: var(--hsc-ink); }
.hsc-btn:focus-visible { outline: 3px solid var(--hsc-lime); outline-offset: 2px; }

.hsc-status { min-height: 1.4em; margin: 8px 2px 0; font-size: 14px; color: var(--hsc-muted); }
.hsc-status.hsc-err { color: var(--hsc-fail); }
.hsc-privacy { font-size: 13px; color: var(--hsc-muted); margin: 4px 2px 0; }

.hsc-output { margin-top: 28px; }
.hsc-output[hidden] { display: none; }
.hsc-head { margin-bottom: 14px; }
.hsc-summary { font-size: 1.6em; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
.hsc-sub { color: var(--hsc-muted); margin: 0 0 8px; font-size: 14px; }
.hsc-warn { background: var(--hsc-d1); border-left: 3px solid var(--hsc-notes); padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.hsc-habit { background: var(--hsc-lime); color: var(--hsc-ink); border-radius: 8px; padding: 10px 14px; margin: 10px 0 0; }

.hsc-score { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; }
.hsc-score th, .hsc-score td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--hsc-line); vertical-align: top; }
.hsc-score th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--hsc-muted); font-weight: 600; }
.hsc-score td:nth-child(3) { font-variant-numeric: tabular-nums; }
.hsc-score td:nth-child(4) { color: var(--hsc-muted); }

.hsc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}
.hsc-pass { background: #D3ECE3; color: var(--hsc-pass); }
.hsc-notes { background: #F3E7C2; color: var(--hsc-notes); }
.hsc-fail { background: #F6DDCB; color: var(--hsc-fail); }

.hsc-dim {
  border: 1px solid var(--hsc-line);
  border-left-width: 4px;
  border-radius: var(--hsc-radius);
  padding: 16px 18px;
  margin: 0 0 16px;
  background: var(--hsc-bg);
}
.hsc-dim1 { border-left-color: var(--hsc-d1-line); }
.hsc-dim2 { border-left-color: var(--hsc-d2-line); }
.hsc-dim3 { border-left-color: var(--hsc-d3-line); }
.hsc-dim4 { border-left-color: var(--hsc-d4-line); }
.hsc-geo { border-left-color: var(--hsc-muted); }
.hsc-dim h3, .hsc-full h3 { margin: 0 0 6px; font-size: 1.1em; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hsc-lede { color: var(--hsc-muted); margin: 0 0 12px; font-size: 14px; }
.hsc-note { color: var(--hsc-muted); font-size: 13px; margin: 10px 0 0; }
.hsc-ok { color: var(--hsc-pass); font-weight: 600; margin: 8px 0 0; }
.hsc-fix { margin: 12px 0 6px; font-size: 14px; }

.hsc-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.hsc-metric { background: var(--hsc-panel); border-radius: 8px; padding: 10px 12px; }
.hsc-metric-v { display: block; font-size: 1.15em; font-weight: 700; font-variant-numeric: tabular-nums; }
.hsc-metric-l { display: block; font-size: 12px; color: var(--hsc-muted); }

.hsc-quotes, .hsc-flags { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.hsc-quotes li, .hsc-flags li { margin: 6px 0; }
.hsc-quotes q { quotes: "\201C" "\201D"; }
.hsc-why { color: var(--hsc-muted); font-size: 12px; margin-left: 4px; }
.hsc-more { list-style: none; color: var(--hsc-muted); font-style: italic; }

.hsc-m { border-radius: 3px; padding: 0 2px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; color: inherit; }
.hsc-d1 { background: var(--hsc-d1); text-decoration-color: var(--hsc-d1-line); text-decoration-style: dotted; }
.hsc-d2 { background: var(--hsc-d2); text-decoration-color: var(--hsc-d2-line); text-decoration-style: dashed; }
.hsc-d4 { background: var(--hsc-d4); text-decoration-color: var(--hsc-d4-line); text-decoration-style: wavy; }
.hsc-sflag { border-bottom: 2px solid transparent; }
.hsc-sf1 { border-bottom-color: var(--hsc-d1-line); background: linear-gradient(transparent 70%, var(--hsc-d1) 70%); }
.hsc-sf3 { border-bottom-color: var(--hsc-d3-line); background: linear-gradient(transparent 70%, var(--hsc-d3) 70%); }
.hsc-sf4 { border-bottom-color: var(--hsc-d4-line); background: linear-gradient(transparent 70%, var(--hsc-d4) 70%); }

.hsc-rhythm { margin: 14px 0 4px; }
.hsc-rhythm svg { width: 100%; height: 110px; display: block; background: var(--hsc-panel); border-radius: 8px; }
.hsc-rbar { fill: #B9B6AB; }
.hsc-rbar-f { fill: var(--hsc-d3-line); }
.hsc-median { stroke: var(--hsc-ink); stroke-width: 1; stroke-dasharray: 4 4; opacity: .6; }
.hsc-rhythm figcaption { font-size: 12px; color: var(--hsc-muted); margin-top: 6px; }

.hsc-surface, .hsc-limits {
  border: 1px solid var(--hsc-line);
  border-radius: var(--hsc-radius);
  padding: 10px 16px;
  margin: 0 0 12px;
  font-size: 14px;
}
.hsc-surface summary, .hsc-limits summary, .hsc-method summary { cursor: pointer; font-weight: 600; }
.hsc-surface ul, .hsc-limits ul { margin: 8px 0 4px; padding-left: 18px; }

.hsc-full { margin-top: 24px; }
.hsc-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; margin: 4px 0 12px; }
.hsc-legend-n { color: var(--hsc-muted); }
.hsc-fulltext {
  border: 1px solid var(--hsc-line);
  border-radius: var(--hsc-radius);
  padding: 8px 20px 16px;
  background: var(--hsc-bg);
  font-size: 15px;
  max-height: 720px;
  overflow: auto;
}
.hsc-sec { padding: 10px 0; border-bottom: 1px dashed var(--hsc-line); }
.hsc-sec:last-child { border-bottom: 0; }
.hsc-sec-h { font-weight: 700; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.hsc-sec-h-anon { margin: 0 0 4px; }
.hsc-sig { font-family: var(--hsc-mono); font-size: 11px; font-weight: 400; color: var(--hsc-muted); background: var(--hsc-panel); padding: 1px 6px; border-radius: 4px; }
.hsc-zero { font-size: 12px; color: var(--hsc-d2-line); font-weight: 600; margin: 0 0 4px; }
.hsc-fulltext p { margin: 0 0 10px; }
.hsc-b-li { margin: 0 0 6px; padding-left: 16px; position: relative; }
.hsc-b-li::before { content: ""; position: absolute; left: 3px; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--hsc-muted); }
.hsc-b-tr { font-family: var(--hsc-mono); font-size: 13px; color: var(--hsc-muted); margin: 0 0 4px; }

.hsc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 0; }

.hsc-method { margin-top: 32px; border-top: 1px solid var(--hsc-line); padding-top: 16px; font-size: 14px; }
.hsc-method h2, .hsc-method h3 { font-size: 1.05em; margin: 16px 0 6px; }
.hsc-method p, .hsc-method li { color: var(--hsc-ink); }
.hsc-method ul { padding-left: 18px; }

@media (max-width: 640px) {
  .hsc-score th:nth-child(4), .hsc-score td:nth-child(4) { display: none; }
  .hsc-dim { padding: 14px; }
  .hsc-fulltext { padding: 6px 12px 12px; }
  .hsc-input { min-height: 200px; }
}

.hsc-head-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 14px; }
.hsc-head-note { font-size: 13px; color: var(--hsc-muted); }


/* Claims to verify */
.hsc { --hsc-d5: #D3ECE3; --hsc-d5-line: #008060; }
.hsc-dim5 { border-left-color: var(--hsc-d5-line); }
.hsc-sf5 { border-bottom: 2px dotted var(--hsc-d5-line); background: linear-gradient(transparent 72%, var(--hsc-d5) 72%); }
.hsc-sflag.hsc-sf5.hsc-sf1, .hsc-sflag.hsc-sf5.hsc-sf4, .hsc-sflag.hsc-sf5.hsc-sf3 { border-bottom-style: double; }
.hsc-info { background: var(--hsc-panel); color: var(--hsc-muted); }
.hsc-claimline { margin: 0 0 8px; font-size: 14px; }
.hsc-claimline a { color: var(--hsc-ink); text-decoration-color: var(--hsc-d5-line); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700; }
.hsc-claims { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.hsc-claims li { background: var(--hsc-panel); border-radius: 8px; padding: 10px 12px; margin: 0; }
.hsc-claims q { quotes: "\201C" "\201D"; display: block; margin-top: 4px; }
.hsc-ctags { display: flex; flex-wrap: wrap; gap: 4px; }
.hsc-tag { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--hsc-bg); border: 1px solid var(--hsc-line); color: var(--hsc-muted); text-transform: lowercase; }
.hsc-tag-warn { background: #F6DDCB; border-color: #F6DDCB; color: #B84A00; }
.hsc-tag-ok { background: #D3ECE3; border-color: #D3ECE3; color: #008060; }
.hsc-tag-own { background: #F3E7C2; border-color: #F3E7C2; color: #946B00; }
@media print {
  .hsc-pdim.hsc-dim5 { border-left-color: #008060; }
  .hsc-pchecklist { list-style: none; margin: 2mm 0 0; padding: 0; display: grid; gap: 2mm; font-size: 9.5pt; }
  .hsc-pchecklist li { display: flex; gap: 3mm; align-items: flex-start; break-inside: avoid; margin: 0; }
  .hsc-box { flex: none; width: 3.6mm; height: 3.6mm; border: 1.4px solid #172321; border-radius: .8mm; margin-top: .8mm; }
  .hsc-pchecklist q { display: block; margin-top: .8mm; }
}

/* ---------- PDF / print report ---------- */
.hsc-print { display: none; }
@media print {
  @page { size: A4; margin: 16mm 15mm 20mm; }
  body.hsc-printing > *:not(.hsc-print) { display: none !important; }
  body.hsc-printing { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.hsc-printing .hsc-print {
    display: block !important; max-width: none; margin: 0; font-size: 10.5pt; line-height: 1.5; color: #172321;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; font-family: Manrope, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
  .hsc-print a { color: #172321; text-decoration: underline; text-decoration-color: #9DBF1A; }
  .hsc-ph { display: flex; justify-content: space-between; align-items: center; padding-bottom: 5mm; margin-bottom: 6mm; border-bottom: 3px solid #172321; }
  .hsc-plogo { height: 13mm; width: auto; }
  .hsc-pword { font-size: 15pt; font-weight: 800; }
  .hsc-phmeta { text-align: right; font-size: 9pt; color: #4A5654; display: grid; gap: 1mm; }
  .hsc-ptag { display: inline-block; background: #DCFA57; color: #172321; font-weight: 800; font-size: 8pt; letter-spacing: .06em; text-transform: uppercase; padding: 1mm 3mm; border-radius: 999px; justify-self: end; }
  .hsc-pverdict { background: #F4F2E9; border-radius: 4mm; padding: 5mm 6mm; margin-bottom: 5mm; break-inside: avoid; }
  .hsc-psum { font-size: 18pt; font-weight: 800; letter-spacing: -.01em; margin: 0 0 1mm; line-height: 1.2; }
  .hsc-pstats { margin: 0 0 3mm; color: #4A5654; font-size: 9pt; }
  .hsc-phabit { background: #DCFA57; border-radius: 2.5mm; padding: 2.5mm 4mm; margin: 0; }
  .hsc-pnote { margin: 3mm 0 0; font-size: 9pt; color: #946B00; }
  .hsc-print .hsc-score { margin: 0 0 6mm; font-size: 9.5pt; break-inside: avoid; }
  .hsc-print .hsc-score th, .hsc-print .hsc-score td { padding: 2mm 2.5mm; }
  .hsc-pdim { border-left: 1.2mm solid #D9D6CB; padding: 1mm 0 1mm 4mm; margin: 0 0 6mm; }
  .hsc-pdim.hsc-dim1 { border-left-color: #946B00; } .hsc-pdim.hsc-dim2 { border-left-color: #0072B2; }
  .hsc-pdim.hsc-dim3 { border-left-color: #9B5388; } .hsc-pdim.hsc-dim4 { border-left-color: #B84A00; }
  .hsc-pdim h2, .hsc-pcta h2, .hsc-pappx h2 { font-size: 12.5pt; margin: 0 0 1.5mm; display: flex; gap: 3mm; align-items: center; break-after: avoid; }
  .hsc-pmet { margin: 0 0 2mm; color: #4A5654; font-size: 9pt; }
  .hsc-pfix { margin: 2mm 0 0; font-size: 9.5pt; }
  .hsc-print .hsc-quotes { font-size: 9.5pt; }
  .hsc-print .hsc-quotes li { break-inside: avoid; margin: 1.5mm 0; }
  .hsc-print .hsc-ok { margin: 1mm 0 0; }
  .hsc-pcta { background: #172321; color: #F4F2E9; border-radius: 4mm; padding: 6mm; margin: 8mm 0; break-inside: avoid; }
  .hsc-pcta h2 { color: #F4F2E9; }
  .hsc-pcta ul { list-style: none; margin: 2mm 0 4mm; padding: 0; display: grid; gap: 2.5mm; }
  .hsc-pcta li { display: grid; gap: .5mm; }
  .hsc-pcta a { color: #DCFA57; font-weight: 700; text-decoration: none; font-size: 10.5pt; }
  .hsc-pcta li span { font-size: 8.5pt; color: #C6CECB; }
  .hsc-pdisc { margin: 0; font-size: 8.5pt; color: #C6CECB; }
  .hsc-pappx { margin-top: 8mm; }
  .hsc-print .hsc-fulltext { max-height: none; overflow: visible; border: 1px solid #D9D6CB; font-size: 9.5pt; padding: 2mm 5mm 4mm; }
  .hsc-print .hsc-sec { break-inside: auto; }
  .hsc-print .hsc-sec-h { break-after: avoid; }
}

/* AI-style signals */
.hsc { --hsc-d6: #E4DDF0; --hsc-d6-line: #4B6A7B; }
.hsc-dim6 { border-left-color: var(--hsc-d6-line); }
.hsc-ailine { margin: 0 0 8px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.hsc-ailine > span { color: var(--hsc-muted); }
.hsc-ailine a { text-decoration: none; }
.hsc-aiband { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; }
.hsc-aiband-low { background: #D3ECE3; color: #008060; }
.hsc-aiband-medium { background: #F3E7C2; color: #946B00; }
.hsc-aiband-high { background: #F6DDCB; color: #B84A00; }
.hsc-aiband-too-short { background: var(--hsc-panel); color: var(--hsc-muted); }
.hsc-drivers { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.hsc-drivers li { margin: 4px 0; }
.hsc-acc { margin-top: 14px; background: var(--hsc-panel); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.hsc-aimeter { margin: 4px 0 14px; max-width: 520px; }
.hsc-aitrack { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #D3ECE3 0 33%, #F3E7C2 33% 66%, #F6DDCB 66% 100%); position: relative; overflow: hidden; }
.hsc-aitrack span { position: absolute; left: 0; top: 0; bottom: 0; border-right: 3px solid var(--hsc-ink); background: rgba(23, 35, 33, .12); }
.hsc-aiscale { display: flex; justify-content: space-between; font-size: 11px; color: var(--hsc-muted); margin-top: 4px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hsc-sigs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.hsc-sgl { background: var(--hsc-panel); border-radius: 8px; padding: 10px 12px; margin: 0; font-size: 13px; }
.hsc-sgl p { margin: 6px 0 0; line-height: 1.45; }
.hsc-sigtop { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hsc-siglvl { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--hsc-muted); }
.hsc-sgl-strong .hsc-siglvl { color: #B84A00; }
.hsc-sgl-some .hsc-siglvl { color: #946B00; }
.hsc-sigbar { height: 5px; border-radius: 999px; background: var(--hsc-line); margin-top: 6px; overflow: hidden; }
.hsc-sigbar span { display: block; height: 100%; background: var(--hsc-d6-line); }
.hsc-sgl-strong .hsc-sigbar span { background: #B84A00; }
.hsc-sgl-none { opacity: .7; }
@media print {
  .hsc-pdim.hsc-dim6 { border-left-color: #4B6A7B; }
  .hsc-print .hsc-aimeter-sm { max-width: 90mm; margin: 2mm 0 3mm; }
  .hsc-print .hsc-psig { font-size: 9pt; margin: 0; }
  .hsc-print .hsc-psig td { padding: 1.5mm 2mm; }
  .hsc-print .hsc-psig td:nth-child(2) { font-weight: 700; white-space: nowrap; }
}
