:root {
  --hhs-green: #174f38;
  --hhs-green-dark: #103b2a;
  --hhs-gold: #c8a34b;
  --hhs-cream: #f7f4ec;
  --hhs-ink: #17211c;
  --hhs-muted: #637068;
  --hhs-border: #d8e0da;
  --hhs-danger: #9f2d2d;
  --hhs-warn: #7a5a12;
  --hhs-ok: #21643f;
}

.jsm-hhs, .jsm-hhs * { box-sizing: border-box; }
.jsm-hhs { width: 100%; max-width: 900px; margin: 0 auto; color: var(--hhs-ink); font-family: inherit; }
.jsm-hhs button, .jsm-hhs input, .jsm-hhs select, .jsm-hhs textarea { font: inherit; }
.hhs-shell { overflow: hidden; border: 1px solid var(--hhs-border); border-radius: 24px; background: #fff; box-shadow: 0 16px 45px rgba(20,48,35,.09); }
.hhs-header { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg,var(--hhs-green-dark),var(--hhs-green)); }
.hhs-logo { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; border-radius: 12px; background: #fff; padding: 5px; }
.hhs-logo-fallback { display: grid; place-items: center; color: var(--hhs-green); font-weight: 800; }
.hhs-brand { margin: 0 0 2px; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; opacity: .84; }
.hhs-title { margin: 0; color: inherit; font-size: clamp(1.25rem,4vw,1.8rem); line-height: 1.15; }
.hhs-progress { height: 7px; background: #e9eee9; }
.hhs-progress span { display: block; height: 100%; background: var(--hhs-gold); transition: width .25s ease; }
.hhs-body { padding: clamp(18px,4vw,30px); }
.hhs-heading { margin: 0 0 8px; color: var(--hhs-green-dark); font-size: clamp(1.25rem,4vw,1.75rem); }
.hhs-lead { margin: 0 0 20px; color: var(--hhs-muted); line-height: 1.55; }
.hhs-subheading { margin: 24px 0 10px; color: var(--hhs-green-dark); font-size: 1.08rem; }
.hhs-grid { display: grid; gap: 16px; }
.hhs-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.hhs-field { display: grid; gap: 7px; }
.hhs-field label { font-weight: 700; }
.hhs-input, .hhs-select, .hhs-textarea { width: 100%; border: 1px solid #bcc8c0; border-radius: 12px; background: #fff; color: var(--hhs-ink); padding: 11px 12px; }
.hhs-input, .hhs-select { min-height: 48px; }
.hhs-input:focus, .hhs-select:focus, .hhs-textarea:focus, .hhs-btn:focus-visible, .hhs-capture:focus-visible { outline: 3px solid rgba(200,163,75,.45); outline-offset: 2px; }
.hhs-step-list { display: grid; gap: 12px; margin: 20px 0; }
.hhs-step-row { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; }
.hhs-step-row > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--hhs-green); color: #fff; font-weight: 800; }
.hhs-step-row small { display: block; margin-top: 3px; color: var(--hhs-muted); }
.hhs-callout { margin: 16px 0; border-left: 5px solid var(--hhs-gold); border-radius: 10px; background: #fff9e9; padding: 14px 16px; color: #574719; line-height: 1.5; }
.hhs-callout-danger { border-left-color: var(--hhs-danger); background: #fff2f2; color: #6e2424; }
.hhs-callout-warn { border-left-color: var(--hhs-warn); background: #fff8e6; color: #674c12; }
.hhs-check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.hhs-check input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--hhs-green); }
.hhs-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.hhs-check-card { border: 1px solid var(--hhs-border); border-radius: 12px; padding: 12px; background: #fff; }
.hhs-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 22px; }
.hhs-actions-end { justify-content: flex-end; }
.hhs-btn { min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 10px 16px; cursor: pointer; font-weight: 750; line-height: 1.2; }
.hhs-btn:disabled { cursor: not-allowed; opacity: .48; }
.hhs-btn-primary { background: var(--hhs-green); color: #fff; }
.hhs-btn-primary:hover:not(:disabled) { background: var(--hhs-green-dark); }
.hhs-btn-secondary { border-color: var(--hhs-border); background: #fff; color: var(--hhs-ink); }
.hhs-camera { position: relative; overflow: hidden; width: 100%; max-height: 72vh; aspect-ratio: 3/4; margin-top: 16px; border-radius: 18px; background: #111; }
.hhs-camera video { width: 100%; height: 100%; object-fit: cover; }
.hhs-camera-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center,transparent 34%,rgba(0,0,0,.34) 75%); pointer-events: none; }
.hhs-guide { position: absolute; inset: 6%; display: grid; place-items: center; pointer-events: none; }
.hhs-guide svg { width: 100%; height: 100%; }
.hhs-guide-fill { fill: rgba(255,255,255,.05); stroke: none; }
.hhs-guide-line { fill: none; stroke: rgba(255,255,255,.95); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5 4; }
.hhs-camera-status { position: absolute; left: 12px; right: 12px; bottom: 12px; border-radius: 999px; background: rgba(0,0,0,.66); color: #fff; padding: 9px 12px; text-align: center; font-size: .9rem; }
.hhs-camera-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.hhs-capture { width: 68px; height: 68px; border: 6px solid #fff; border-radius: 50%; background: var(--hhs-gold); box-shadow: 0 0 0 2px var(--hhs-green); cursor: pointer; }
.hhs-photo-review { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; margin-top: 16px; border: 1px solid var(--hhs-border); border-radius: 18px; padding: 12px; background: var(--hhs-cream); }
.hhs-photo-review img { width: 100%; max-height: 440px; object-fit: contain; border-radius: 12px; background: #111; }
.hhs-photo-review div { display: grid; gap: 5px; min-width: 150px; }
.hhs-photo-review small, .hhs-review-card small { color: var(--hhs-muted); }
.hhs-review-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.hhs-review-card { overflow: hidden; border: 1px solid var(--hhs-border); border-radius: 14px; background: #fff; }
.hhs-review-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #111; }
.hhs-review-card div { display: grid; gap: 5px; padding: 12px; }
.hhs-link { width: max-content; border: 0; background: transparent; color: var(--hhs-green); padding: 0; text-decoration: underline; cursor: pointer; }
.hhs-centre { display: grid; justify-items: center; text-align: center; padding: 34px 0; }
.hhs-spinner { width: 54px; height: 54px; margin-bottom: 18px; border: 6px solid #e0e7e2; border-top-color: var(--hhs-green); border-radius: 50%; animation: hhs-spin .9s linear infinite; }
@keyframes hhs-spin { to { transform: rotate(360deg); } }
.hhs-result-head { border-radius: 18px; padding: 20px; }
.hhs-result-head h3 { margin: 3px 0 8px; font-size: clamp(1.35rem,4vw,2rem); }
.hhs-result-head p { margin: 0; line-height: 1.55; }
.hhs-result-kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.hhs-danger { background: #fff0f0; border: 1px solid #efc7c7; color: #762424; }
.hhs-warn { background: #fff8e4; border: 1px solid #ead69b; color: #634a12; }
.hhs-ok { background: #eff8f1; border: 1px solid #c8dfcf; color: #1c5536; }
.hhs-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.hhs-metrics > div { display: grid; gap: 4px; border: 1px solid var(--hhs-border); border-radius: 12px; padding: 12px; }
.hhs-metrics small { color: var(--hhs-muted); }
.hhs-findings { display: grid; gap: 10px; }
.hhs-findings article { border: 1px solid var(--hhs-border); border-radius: 14px; padding: 14px; }
.hhs-findings p { margin: 8px 0; line-height: 1.5; }
.hhs-findings small { color: var(--hhs-muted); }
.hhs-finding-top { display: flex; justify-content: space-between; gap: 10px; }
.hhs-finding-top span { color: var(--hhs-muted); font-size: .86rem; }
.hhs-result-list { margin: 0; padding-left: 1.3rem; }
.hhs-result-list li { margin: 8px 0; line-height: 1.5; }
.hhs-error { color: var(--hhs-danger); font-weight: 700; }
.hhs-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

@media (max-width:700px) {
  .hhs-grid-2, .hhs-check-grid, .hhs-review-grid, .hhs-metrics { grid-template-columns: 1fr; }
  .hhs-photo-review { grid-template-columns: 1fr; }
  .hhs-photo-review div { min-width: 0; }
  .hhs-actions .hhs-btn { flex: 1 1 140px; }
  .hhs-camera { max-height: none; }
}

@media print {
  .hhs-header, .hhs-progress, .hhs-actions { display: none !important; }
  .hhs-shell { border: 0; box-shadow: none; }
  .hhs-body { padding: 0; }
}
