:root {
    --primary-color: #007bff;
    --success-color: green;
    --exposure-color: orange;
    --padding-base: 24px;

    /* Primary Colors */
    --blue-midnight: #01232C;
    --brand-green: #00C57B;
    --orange-web: #F98D00;

    /* Secondary Colors */
    --dark-green: #009960;
    --light-green: #67E7B1;
    --extra-light-green: #F0FDF7;
    --soft-light-green: #FBFEFD;
    --info-blue: #365AC7;
    --info-light-blue: #A0B2E6;
    --beige: #E1D7D3;
    --light-beige: #F0EBE2;

    /* Greyscale */
    --black: #1A1A1A;
    --grey-600: #4E4E4E;
    --grey-500: #949899;
    --grey-400: #C6CBCC;
    --grey-300: #E1E5E5;
    --grey-200: #EDF1F2;
    --grey-100: #F8F9FA;

    /* Alert Colors */
    --red-danger: #FF1F1F;
    --warning: #FFCB45;
    --success: #00C57B;
}

/* Typography */
h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 145%;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 125%;
}

.spline-sans-body16 {
    font-size: 16px;
}

.spline-sans-body14 {
    font-size: 14px;
}

.spline-sans-body12 {
    font-size: 12px;
}

.spline-sans-body16.semibold {
    font-weight: 600;
}

.spline-sans-body14.medium,
.spline-sans-body12.medium {
    font-weight: 500;
}

.spline-sans-body16.regular,
.spline-sans-body14.regular,
.spline-sans-body12.regular {
    font-weight: 400;
}

* {
    box-sizing: border-box;
}

/* QR code slot: fixed position; surface = ui_core Card (see Card/card.css) */
#report-qrcode-container.ui-card {
    position: fixed;
    top: 32px;
    left: calc(50% + 332px);
    z-index: 200;
    width: 180px;
    max-width: calc(100vw - 24px);
    padding: 0;
    gap: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

#report-qrcode-container .ui-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

#report-qrcode-container p {
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-500);
}

#continue-on-phone {
    height: 65px;
    width: auto;
}

#report-qrcode {
    margin: 0;
    padding: 0;
    width: 100%;
}

#report-qrcode img {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
}

/* iOS: avoid horizontal rubber-band — 100vw + fixed layers can exceed layout width; lock x scroll on this flow */
html:has(#report-layout) {
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* Report Layout Section */
#report-layout {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Flow Header Styles */
.flow-header {
    line-height: 1.5;
    color: var(--blue-midnight);
    text-align: left;
    padding: 16px 0;
}

.flow-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 auto;
    padding: 0;
    color: var(--blue-midnight);
}

#generatingMessage h3 {
    margin: 0 auto;
    width: 80%;
}

.flow-header h3 span {
    color: var(--brand-green);
}

.flow-header p {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--grey-600);
}

.flow-header p.center {
    text-align: center;
}

.flow-header#thankYouMessage {
    padding: 16px 20px;
    text-align: center;
}

.report-description {
    color: var(--grey-600);
    font-size: 14px;
    margin: 8px 0 16px 0;
    line-height: 1.4;
    text-align: center;
    font-style: italic;
}

/* Animation Classes */
.slide-up-fade-in {
    animation: slideUpFadeIn 0.4s ease-out;
}

@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Help overlay (full-screen panel) */
#callOverlay.call-overlay-panel {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    flex-direction: column;
    background-color: #fff;
    box-sizing: border-box;
}

.call-overlay-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: env(safe-area-inset-top, 0) 20px env(safe-area-inset-bottom, 24px);
}

.call-overlay-toolbar {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 48px;
}

.call-overlay-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 9999px;
    background: transparent;
    cursor: pointer;
    color: var(--blue-midnight);
    font: inherit;
}

.call-overlay-close:hover {
    background: var(--grey-100);
}

.call-overlay-close img {
    display: block;
    width: 24px;
    height: 24px;
}

.call-overlay-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 8px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.call-overlay-emoji {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 16px;
}

.call-overlay-title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--blue-midnight);
}

.call-overlay-text {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--grey-600);
    max-width: 28rem;
}

.call-overlay-text:last-child {
    margin-bottom: 0;
}

.call-overlay-text a {
    color: var(--brand-green);
    font-weight: 600;
    text-decoration: none;
}

.call-overlay-text a:hover {
    text-decoration: underline;
}

/* Body */
body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    width: 100%;
    min-height: 100dvh;
    font-family: "Spline Sans", sans-serif;
    font-size: 15px;
    font-optical-sizing: auto;
    letter-spacing: 0;
    font-style: normal;
    color: var(--blue-midnight);
    padding-bottom: 24px;
}

body,
.full-width-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Header & Logo */
.page-header {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-right a {
    margin-right: 16px;
    text-decoration: none;
    color: var(--grey-600);
}

#newReportButton {
    display: flex;
    align-items: center;
}

.page-header a {
    line-height: 0;
}

.page-header .logo {
    width: 200px;
    height: auto;
    margin: 0;
}

#newReportButton {
    margin: 0;
}

/* Lucide circle-help — not a filled pill button */
#showCallOverlayBtn.header-help-btn {
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: var(--brand-green);
    cursor: pointer;
    font: inherit;
}

#showCallOverlayBtn.header-help-btn:hover {
    background: var(--extra-light-green, #f0fdf7);
}

#showCallOverlayBtn.header-help-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Button Styling */
button {
    font-family: "Spline Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0;
    border: none;
    cursor: pointer;
    padding: 8px 24px 8px 24px;
    border-radius: 100px;
    margin: 0;
    color: white;
    background-color: var(--brand-green);
    display: flex;
    justify-content: center;
    flex-direction: row;
    white-space: nowrap;
}

button img {
    vertical-align: bottom;
    margin-right: 4px;
}

button:disabled {
    cursor: not-allowed;
    background-color: var(--grey-300);
}

button.secondary {
    color: var(--brand-green);
    background-color: transparent;
    border: 1px solid var(--brand-green);
}

button.secondary:disabled {
    cursor: not-allowed;
    color: var(--grey-300);
    border-color: var(--grey-300);
}

.action-control-container {
    padding: 12px;
}

.bottom-button-container {
    padding: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

#shareAndAddContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
}

/* ui_core Button inherits #reportDesc 14px and has no icon gap; bridge without editing synced ui_core */
#shareAndAddContainer .ui-button,
.report-completed-header .ui-button {
    gap: var(--cs8, 8px);
    font-size: 1rem;
    line-height: 1.5;
}

/* Long primary CTA label: allow wrap while keeping ui_core md padding + pill */
.report-completed-header .ui-button.md {
    white-space: normal;
}

.upload-prompt {
    text-align: left;
    width: 100%;
    height: 100%;
    line-height: normal;
    display: flex;
    gap: 6px;
    flex-direction: column;
    justify-content: center;
    white-space: wrap;
    margin: 0 auto;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-line {
    width: 100%;
    padding: 8px;
    font-size: 18px;
    box-sizing: border-box;
    position: relative;
}

.dropdown-content {
    z-index: 100000000;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    margin-top: 2px;
}

.dropdown-content div {
    color: black;
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-content div:hover {
    background-color: #ddd;
}

#imageInput {
    display: none;
}

img {
    height: auto;
}

.prompt-container {
    position: relative;
    width: 100%;
    padding: 20px;
    background-color: var(--grey-100);
}

/* HECA Header */
#reportHeader a,
#reportHeader span {
    line-height: 0;
}

#hecaInfo {
    width: 20px;
    height: 20px;
    position: relative;
    top: 3px;
}

/* Report Headers */
#reportHeader, #hybridReportHeader {
    padding: 0 12px;
}

div#reportDesc {
    font-size: 14px;
    padding: 0 0 20px 0;
    position: relative;
}

/* Report description sparkle icon styling */
#reportDesc .sparkle-icon {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
}

/* Hazards */
#hazardReports {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    padding-bottom: 0;
    transition: padding-bottom 0.3s ease;
}

/* Collapsed job steps (reorder mode): stack headers tightly */
#hazardReports:has(.job-step-container.reorder-mode) {
    gap: 1px;
}

/* SDS */
#sdsReports {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--grey-200);
    padding: 12px;
    margin-top: 20px;
}

.chemicalContainerHeader {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.chemicalContainerHeader p {
    margin: 0;
}

.chemicalList {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.hide-chemicals {
    display: none;
}

.show-chemicals {
    display: flex;
}

/* ── Job Step Container ─────────────────────────────────────────── */
.job-step-container {
    border: none;
    border-radius: 0;
    overflow: visible;
    background-color: var(--grey-100);
    width: 100%;
}

.job-step-header {
    background-color: var(--grey-100);
    padding: 20px;
    margin: 0;
    border-bottom: 1px white solid;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: none;
}

.job-step-header:hover {
    background-color: var(--grey-100);
}

.job-step-container.reorder-mode .job-step-header {
    cursor: default;
    gap: 0;
}

/* Reorder mode (steps collapsed): chevron | grip | title; Lucide 24×24 matches chevron */
.job-step-container.reorder-mode .job-step-header .job-step-drag-handle {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    z-index: auto;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--grey-400, #949899);
    margin-right: 16px;
}

.job-step-container.reorder-mode .job-step-header .job-step-drag-handle svg {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}

.job-step-container.reorder-mode .job-step-header .job-step-drag-handle:hover {
    color: var(--brand-green, #00c57b);
}

.job-step-container.reorder-mode .job-step-header h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.job-step-container.reorder-mode .step-chevron {
    transform: rotate(-90deg);
    transform-origin: center;
    margin-right: 4px;
}

.step-chevron {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--blue-500);
    transition: transform 0.2s ease;
}

/* Match ui_core Typography h1 (.ui-typography.h1): regular weight; label = semibold */
.job-step-header h3 {
    margin: 0;
    padding-right: 4px; /* improve rag */
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 2.25rem;
    text-transform: none;
    letter-spacing: -.01rem;
    color: var(--blue-midnight);
}

.job-step-header h3 .job-step-label {
    font-weight: 600;
}

.job-step-hazards {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: var(--grey-100);
}

/* ── Hazard Card (3-section bordered card) ──────────────────────── */
.hazard-element {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin-bottom: 0;
    width: 100%;
    background-color: transparent;
    border-radius: 12px;
    border: none;
    box-shadow: none;
    /* overflow: visible lets the ui_core tooltip on .risk-badge escape the card.
       Inner containers provide their own border-radius. */
    overflow: visible;
}

/* Top section: hazard title + risk badge */
.hazard-element .hazard-description-container {
    background: white;
    border: 1px solid var(--grey-300);
    border-radius: 12px 12px 0 0;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 64px;
}

/* Middle section: safeguards */
.hazard-element .direct-controls {
    background: white;
    border: 1px solid var(--grey-300);
    border-top: none;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Bottom section: delete button */
.hazard-delete-row {
    background: white;
    border: 1px solid var(--grey-300);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hazard-description-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* ui_core: .ui-typography.body16 + .weight-semibold (override local utilities; do not edit ui_core) */
.hazard-element #hazard-description-title p {
    font-family: var(--font-spline, "Spline Sans", sans-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    color: var(--blue-midnight);
}

#exposureFlag p span {
    color: var(--red-danger);
}

/* "Safeguards:" label */
.direct-controls > .safeguards-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-midnight);
    margin: 0;
}

.hazard-element p {
    margin: 0;
}

/* Hazard action buttons inside direct-controls */
/* Link-style actions only — do not match .risk-badge (pill uses .level-*). */
.hazard-element button:not(.risk-badge) {
    font-size: 14px;
    text-align: left;
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: 0;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-green);
    background-color: transparent;
    justify-content: flex-start;
}

.hazard-element button.delete-button {
    color: var(--red-danger);
    font-size: 14px;
}

/* ── Risk Badge (per-hazard pill) ───────────────────────────────── */
.risk-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 1000px;
    flex-shrink: 0;
    cursor: default;
}

.risk-badge--interactive {
    cursor: help;
}

/* ui_core sets display:inline-flex on .ui-tooltip-trigger; keep the pill as block-flex. */
.hazard-element .risk-badge.ui-tooltip-trigger {
    display: flex;
}

/* Do not set color: inherit — it overrides .level-* on the button and the SVG stays black. */
.hazard-element button.risk-badge {
    width: auto;
    align-self: center;
    text-align: center;
    justify-content: center;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    font-weight: inherit;
    -webkit-tap-highlight-color: transparent;
}

.risk-badge-text {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.hazard-element .risk-badge .risk-badge-info {
    flex-shrink: 0;
    display: block;
    color: currentColor;
}

.hazard-element .risk-badge .risk-badge-info circle,
.hazard-element .risk-badge .risk-badge-info path {
    stroke: currentColor;
}

.hazard-element button.risk-badge--interactive:focus-visible {
    outline: 2px solid var(--uicore-ring, var(--color-green-500));
    outline-offset: 2px;
}

/* Tooltip overrides — scoped to the risk badge.
   Force white: .level-* span (0,1,1) beats .ui-tooltip color:#fff (0,1,0) otherwise. */
.risk-badge .risk-badge-tooltip {
    max-width: min(16rem, calc(100vw - 2rem));
    text-align: center;
    white-space: normal;
    color: #fff;
}

.risk-badge .risk-badge-tooltip p {
    font-size: 0.8125rem;
    line-height: 1.35;
    margin: 0;
    color: #fff;
}

/* ── Checkbox + control row ─────────────────────────────────────── */
.direct-control-options {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.direct-control-options label {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
    padding: 10px 0 10px 0;
    cursor: pointer;
}

.direct-control-options .option {
    flex: 1;
}

/* Control Type Label */
.controlType {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: var(--grey-100);
    color: var(--grey-600);
    text-transform: uppercase;
    vertical-align: middle;
}

/* Checkboxes — handled by ui_core/Checkbox */

/* Company Info Form Styles */
.company-info-form {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.company-info-form h3,
.upload-prompt h3 {
    color: var(--blue-midnight);
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group textarea {
    width: 100%;
    height: 18vh;
    padding: 16px;
    border: 1px solid var(--grey-300);
    border-radius: 8px;
    font-size: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Site Selector in Form */
.site-selector-form-group {
    margin-top: 16px;
}

.site-selector-form-group select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 35px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Spline Sans', sans-serif;
    background-color: white;
    color: var(--grey-700);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    transition: border-color 0.2s ease;
}

.site-selector-form-group select:focus {
    outline: none;
    border-color: var(--info-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Form and Input Styling */
.form-group input,
.form-group select,
.asset-field input,
.asset-field select,
.control-name-input input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Spline Sans', sans-serif;
    background-color: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.asset-field input:focus,
.asset-field select:focus,
.control-name-input input:focus {
    outline: none;
    border-color: var(--info-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input::placeholder,
.form-group select::placeholder,
.asset-field input::placeholder,
.asset-field select::placeholder,
.control-name-input input::placeholder {
    color: #9ca3af;
}

/* Company Info Form Styles */
.company-info-form button {
    text-align: center;
    width: 80%;
    margin: 0 auto;
}

/* Sample Photo Overlay Styling */
div#sampleOverlay {
    background-color: rgba(0,0,0,0.25);
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 100dvw;
    z-index: 100;
    display: none;    
}

div#sampleOverlayContent {
    position: absolute;
    top: 5dvh;
    left: 50dvw;
    transform: translateX(-50%);
    width: 600px;
    height: 90dvh;
    margin: 0;
    padding: 0;
    background-color: white;
    border-radius: 6px;
    border: 24px white solid;
    display: flex;
    flex-direction: column;
}

#sampleOverlayImages {
    overflow-y: scroll;
    -ms-overflow-style: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-400);
}

#sampleOverlayImages::-webkit-scrollbar {
    height: 6px;
}

#sampleOverlayImages::-webkit-scrollbar-track {
    background: var(--white);
}

#sampleOverlayImages::-webkit-scrollbar-thumb {
    background: var(--grey20);
    border-radius: 4px;
}

img.sample-image {
    display: block;
    width: 100%;
    height: 35dvh;
    object-fit: cover;
    object-position: center;
    margin-bottom: 6px;
    cursor: pointer;
}

img#closeSampleOverlayBtn {
    cursor: pointer;
    width: 36px;
    height: 36px;
}

div#sampleHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 0;
}

#sampleHeader h1 {
    font-size: 20px;
    text-align: center;
    flex: 2;
}

#sampleHeader::after {
    content: "";
    display: block;
    width: 36px;
    height: 36px;
}

/* Guidance Content Styles */
.guidance-content {
    text-align: left;
}

.guidance-content ul, 
.guidance-content ol {
    list-style-type: none;
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 0;
}

.guidance-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 920px) {
    #report-qrcode-container {
        display: none;
    }
}

@media screen and (max-width: 700px) {
    /* Header & Logo */
    .page-header {
        flex-wrap: wrap;
    }

    .page-header .logo {
        width: 150px;
    }

    .upload-prompt {
        font-size: 16px;
    }

    div#sampleOverlayContent {
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        background-color: white;
        border-radius: 0;
        border: none;
    }
    
    div#sampleHeader {
        padding: 12px 16px;
    }

    /* Buttons */
    .column-button-container {
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: space-between;
        padding: 0 24px;
    }

    .hazard-element .column-button-container {
        display: block;
        padding: 0;
    }

    .hazard-element .column-button-container button {
        text-align: left;
        width: unset;
    }

    .hazard-element {
        width: 100%;
        flex-wrap: wrap;
    }

    .hazard-element button:not(.risk-badge) {
        margin: 8px 0;
    }

    .hazard-headers {
        display: none;
    }
    
    .flow-header h3 {
        width: 100%;
    }
}

@media screen and (max-width: 410px) {
    .column-button-container {
        flex-direction: column;
    }

    .column-button-container button,
    .column-button-container .ui-button {
        width: 100%;
    }
}

/* Save as PDF Styling */
@media print {
    * {
        text-align: left;
    }
    
    section#report-layout {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    #showCallOverlayBtn,
    #report-qrcode-container,
    .column-button-container,
    .hazard-delete-row,
    #printButton,
    #copyButton,
    #thankYouMessage img,
    #closePagePrompt {
        display: none !important;
        padding: 0;
    }
    
    #thankYouMessage p::after {
        content: '.';
    }
    
    #reportDesc {
        order: 2;
        padding-top: 0 !important;
    }
    
    #reportDesc .flow-header {
        padding-top: 0 !important;
    }
    
    .flow-header h3,
    .flow-header p,
    #reportInfo {
        margin: 8px 0;
        text-align: left !important;
    }
}

/* Risk Score Styling */
#riskScoreDisplay {
    padding: 4px 10px;
    border-radius: 100px;
    flex-shrink: 0;
    text-align: center;
}

#riskScoreDisplay p {
    margin: 0;
    white-space: nowrap;
}

#riskScoreDisplay small {
    opacity: 0.7;
    font-size: 10px;
}

/* Risk classification styles */
.job-risk-score-container {
    display: none; /* Risk score now shown in fixed bar */
}

.level-i {
    color: var(--success-dark);
    background-color: var(--success-light);
    border: 1px solid var(--success);
}

.level-i span {
    color: var(--success-dark);
    font-weight: 600;
}
.level-ii {
    color: var(--success-dark);
    background-color: var(--success-light);
    border: 1px solid var(--success);
}

.level-ii span {
    color: var(--success-dark);
    font-weight: 600;
}

.level-iii {
    color: var(--warning-dark);
    background-color: #FDF3AD;
    border: 1px solid var(--warning-dark);
}

.level-iii span {
    color: var(--warning-dark);
    font-weight: 600;
}

.level-iv {
    color: var(--warning-superdark);
    background-color: var(--warning);
    border: 1px solid var(--warning-dark);
}

.level-iv span {
    color: var(--warning-superdark);
    font-weight: 600;
}

.level-v {
    color: var(--danger-dark);
    background-color: var(--danger-light);
    border: 1px solid var(--danger);
}

.level-v span {
    color: var(--danger-dark);
    font-weight: 600;
}

.level-vi {
    color: #6a1b9a;
    background-color: #cc83f9;
    border: 1px solid #370e51;
}

.level-vi span {
    color: #6a1b9a;
    font-weight: 600;
}

/* Asset Info Fields Styles */
.asset-info-container {
    margin-top: 12px;
}

.asset-field {
    margin-top: 8px;
    position: relative;
}

.asset-field:first-child {
    margin-top: 0;
}

.asset-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Top Save (demo) — below .report-meta-primary; full width on small screens */
.report-completed-header {
    display: block;
    margin: 0;
    padding: 0 20px 4px;
    box-sizing: border-box;
}

/* Report metadata — primary panel + secondary list */
.report-metadata {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 20px;
    padding: 0;
    background: transparent;
    border: none;
    font-family: 'Spline Sans', sans-serif;
}

/* Primary — task description (h2 scale); protected fields as ui_core Tags below */
.report-meta-primary {
    padding: 20px;
}

.report-meta-primary__value {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.5rem;
    font-weight: 400;
    color: var(--blue-midnight);
}

.report-meta-primary__freq {
    margin: 8px 0 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 400;
    color: var(--blue-midnight);
}

.report-meta-primary__freq strong {
    font-weight: 600;
    color: var(--blue-midnight);
}

/* Secondary: ui_core Tag (outline + default + sm), flex-wrap row */
.report-meta-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
}

.report-metadata .report-meta-secondary .report-meta-tag.ui-tag {
    max-width: 100%;
    white-space: normal;
}

.report-metadata .report-meta-secondary .report-meta-tag .ui-tag__inner {
    white-space: normal;
    overflow-wrap: anywhere;
}

.report-metadata .report-meta-secondary .report-meta-tag strong {
    font-weight: 600;
}

.report-metadata .report-meta-secondary .report-meta-tag.ui-tag--outline.ui-tag--default {
    border-color: var(--grey-300, #E1E5E5);
}

/* Bottom Risk Score Styling */
.bottom-risk-score {
    margin: 32px auto 24px auto;
    text-align: center;
}

.bottom-risk-score h2 {
    border-radius: 8px;
    margin: 0 auto;
    padding: 8px 20px;
    font-style: normal;
    font-weight: bold;
    font-size: 1.25em;
    white-space: nowrap;
    max-width: fit-content;
}

/* Add Hazard/Job Step Button Styles */
.add-hazard-button,
.add-job-step-button {
    font-size: 14px;
    text-align: left;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0;
    border: none;
    cursor: pointer;
    padding: 0;
    display: block;
    color: var(--brand-green);
    background-color: transparent;
    width: auto;
}
.add-job-step-button {
    margin: 20px;
}

.add-hazard-button:hover,
.add-job-step-button:hover {
    color: var(--brand-green-dark);
    background-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .asset-field input,
    .asset-field select {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .report-metadata {
        margin: 10px 0 18px;
        gap: 10px;
    }

    .report-completed-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .report-completed-header .ui-button.save-button-top {
        width: 100%;
        box-sizing: border-box;
    }
}

.jsa-workflow-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--green-500, #10b981);
    color: white;
    z-index: 1000;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jsa-workflow-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.jsa-workflow-title {
    font-weight: 600;
    font-size: 16px;
}

.jsa-workflow-container #saveJSAButton {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    min-width: auto;
}

.jsa-workflow-container #saveJSAButton:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Add top padding to body when JSA workflow bar is visible */
body:has(.jsa-workflow-container:not([style*="display: none"])) {
    padding-top: 60px;
}

/* Fallback for browsers that don't support :has() */
.jsa-workflow-active {
    padding-top: 60px !important;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
}

/* Logo ~85% of row width (Figma); help icon fixed right */
.nsc-branding {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.nsc-branding > a,
.nsc-branding > img {
    display: block;
    width: 85%;
    max-width: 400px;
    line-height: 0;
}

.nsc-branding img {
    width: 100%;
    height: auto;
    display: block;
}

.beta-tag {
    position: absolute;
    top: -2px;
    right: -24px;
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: var(--brand-green);
    color: white;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* .flow-header h3, p {
    margin: unset;
    padding: unset;
    text-align: left;
    width: 100%;
} */

/* Sign Up Modal */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--black);
}

.modal-header .highlight {
    color: var(--brand-green);
}

.close {
    color: var(--red-danger);
    font-size: 48px;
    font-weight: lighter;
    margin-top: -40px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: var(--black);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 24px 0;
    color: var(--grey-600);
    font-size: 16px;
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal .form-group input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.modal .form-group input::placeholder {
    color: #9ca3af;
}

.modal .error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
    display: none;
}

.modal .form-group small {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

.signup-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--brand-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.signup-submit-btn:hover {
    background-color: var(--dark-green);
}

.modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.modal-footer p {
    margin: 0;
    color: var(--grey-600);
    font-size: 14px;
}

.modal-footer a {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.messages {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.messages.success {
    background-color: #f0f9ff;
    border-color: #7dd3fc;
    color: #0369a1;
}

/* Sign Up CTA Section */
.signup-cta-section {
    background-color: var(--blue-midnight);
    padding: 40px 20px;
    margin-top: 32px;
    text-align: center;
}

.signup-cta-content h2 {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.signup-cta-content h2 .highlight {
    color: var(--brand-green);
    padding: 8px 0 0 0;
    display: inline-block;
}

.signup-cta-content p {
    color: white;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.signup-cta-button {
    background-color: var(--brand-green) !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-block;
    transition: background-color 0.2s ease;
    border: none;
    width: 90%;
}

.signup-cta-button:hover {
    background-color: var(--dark-green) !important;
}

/* JSA Recommendation + Gather Your Team step styles → see jsa_gather_flow.css */

/* ── Report Attachments ────────────────────────────────────────── */
/* ── Attachments ("N Photos") ───────────────────────────────────── */
.report-attachments {
    padding: 20px;
    margin-top: 8px;
}

.attachments-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.attachments-header svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--black);
}

.attachments-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin: 0;
}

.attachments-count {
    font-weight: 600;
}

.attachments-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.attachments-thumbnails::-webkit-scrollbar {
    display: none;
}

.attachment-thumb {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--grey-100);
}

.attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s ease;
}

.attachment-thumb:hover img {
    opacity: 0.85;
}

/* ── Action Steps Card (bottom, after attachments) ──────────────── */
.report-action-steps {
    border-radius: 6px;
    padding: 12px;
    margin: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-steps-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

.action-steps-body {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}


/* Radar-style ring pulse: 1.5s blip + 2s rest = 3.5s cycle; peak ring 12px (2× previous 6px) */
@keyframes risk-dot-radar-blip {
    0% {
        box-shadow: 0 0 0 3px var(--risk-dot-ring);
        opacity: 1;
        animation-timing-function: ease-out;
    }
    14.143% {
        box-shadow: 0 0 0 8px var(--risk-dot-ring);
        opacity: 1;
        animation-timing-function: ease-in;
    }
    23.143% {
        box-shadow: 0 0 0 8px var(--risk-dot-ring);
        opacity: 0;
        animation-timing-function: linear;
    }
    24.429% {
        box-shadow: 0 0 0 3px var(--risk-dot-ring);
        opacity: 0;
        animation-timing-function: ease-out;
    }
    42.857% {
        box-shadow: 0 0 0 3px var(--risk-dot-ring);
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 0 3px var(--risk-dot-ring);
        opacity: 1;
    }
}

/* ── Fixed Risk Bar ─────────────────────────────────────────────── */
.risk-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 24px 20px;
    background: var(--grey-100);
    border-top: 1px solid var(--grey-300);
    cursor: default;
}

/* Desktop: floating panel — align with .upload-container @ min-width 600px (imageUploader.css) */
@media screen and (min-width: 600px) {
    .risk-bar {
        left: 50%;
        right: auto;
        width: 100%;
        max-width: 600px;
        transform: translateX(-50%);
        bottom: 16px;
        border-radius: 16px;
        border: 1px solid var(--grey-300);
    }
}

.risk-bar.hidden {
    display: none;
}

.risk-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.risk-bar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 10×10px fill + 3px outside ring (lighter) = 16px total — matches Figma; ring animates on ::after */
.risk-bar-dot {
    --risk-dot-ring: transparent;
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: none;
    box-sizing: border-box;
    margin: 3px;
}

.risk-bar-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    box-shadow: 0 0 0 3px var(--risk-dot-ring);
    animation: risk-dot-radar-blip 3.5s infinite;
}

/* Fill = risk-badge border color; ring = risk-badge background (lighter) — matches .risk-badge / .level-* */
.risk-bar-dot.level-i,
.risk-bar-dot.level-ii {
    --risk-dot-ring: var(--success-light);
    background-color: var(--success-dark);
}

/* Darker fill, lighter ring (same rule as other levels; badge uses light fill + dark border) */
.risk-bar-dot.level-iii {
    --risk-dot-ring: #fcf08f;
    background-color: var(--warning-dark);
}

.risk-bar-dot.level-iv {
    --risk-dot-ring: var(--warning);
    background-color: var(--warning-superdark);
}

.risk-bar-dot.level-v {
    --risk-dot-ring: var(--danger-light);
    background-color: var(--danger-dark);
}

.risk-bar-dot.level-vi {
    --risk-dot-ring: #cc83f9;
    background-color: #6a1b9a;
}

@media (prefers-reduced-motion: reduce) {
    .risk-bar-dot::after {
        animation: none;
        opacity: 1;
    }
}

.risk-bar-score {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-midnight);
    white-space: nowrap;
    cursor: pointer;
    /* button reset */
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.risk-bar-cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-midnight);
    white-space: nowrap;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    text-align: right;
    max-width: 55%;
    /* button reset */
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

/* Bottom padding to avoid content hiding behind fixed / floating bar */
body.risk-bar-active {
    padding-bottom: 76px;
}

@media screen and (min-width: 600px) {
    body.risk-bar-active {
        /* bar sits at bottom: 16px + ~taller padded panel */
        padding-bottom: 96px;
    }
}

/* Print: hide risk bar */
@media print {
    .risk-bar,
    .report-attachments {
        display: none !important;
    }
}