.ditms-page { margin: 0; background: #f3f6f7; color: #172f37; font: 17px/1.6 system-ui, sans-serif; }
.ditms { box-sizing: border-box; }
.ditms [hidden] { display: none !important; }
.ditms * { box-sizing: border-box; }
.ditms-shell { max-width: 860px; margin: 40px auto; padding: 32px; background: #fff; border-radius: 18px; border: 1px solid #dce5e7; }
.ditms-shell h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 12px 0; }
.ditms-shell h2 { font-size: 23px; line-height: 1.4; }
.ditms-eyebrow, .ditms-progress { color: #4b6b75; font-size: 14px; }
.ditms-shell header { padding-bottom: 16px; border-bottom: 1px solid #e2e9eb; }
.ditms-shell section { padding: 18px 0; min-height: 180px; }
.ditms-shell footer, .ditms-help { color: #50636b; font-size: 14px; }
.ditms-shell footer { border-top: 1px solid #e2e9eb; padding-top: 12px; }
.ditms-shell progress { width: 100%; height: 12px; accent-color: #176c73; }
.ditms-button { font: inherit; display: inline-block; border: 1px solid #176c73; border-radius: 9px; background: #176c73; color: #fff; cursor: pointer; padding: 11px 17px; margin: 6px 8px 6px 0; }
.ditms-secondary { background: #fff; color: #176c73; }
.ditms-button:disabled { opacity: .45; cursor: default; }
.ditms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.ditms-card { min-height: 100px; border: 2px solid #b8c8ce; border-radius: 12px; background: #f5f7f8; color: #23434e; font: 600 30px/1 system-ui, sans-serif; cursor: pointer; padding: 20px 4px; }
.ditms-card.is-positive { border: 4px solid #176c73; background: #dff1ed; }
.ditms-card.is-negative { border: 4px dashed #91561f; background: #fff0dc; }
.ditms-card:disabled { cursor: default; }
.ditms-photo { display: flex; align-items: center; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; background: #fff; }
.ditms-photo img { width: 100%; height: 205px; object-fit: contain; display: block; }
.ditms-photo-label { font: 500 13px/1.3 system-ui, sans-serif; }
.ditms-photo.is-chosen { border-color: #b7c3c7; border-style: dashed; background: #edf1f2; }
.ditms-photo.is-chosen img { opacity: .28; }
.ditms-instruction-stack { display: grid; }
.ditms-instruction-stack .ditms-instruction { grid-column: 1; grid-row: 1; }
.ditms-instruction[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
.ditms-material-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 160px)); gap: 14px; }
.ditms-material-preview figure { margin: 0; text-align: center; }
.ditms-material-preview img { max-width: 100%; height: 160px; object-fit: contain; }
.ditms-material-preview figcaption { overflow-wrap: anywhere; }
.ditms button:focus-visible, .ditms a:focus-visible, .ditms input:focus-visible { outline: 3px solid #a64c12; outline-offset: 3px; }
.ditms #ditms-message:not(:empty) { background: #fff0dc; border-radius: 8px; padding: 14px; margin-top: 16px; }
.ditms [aria-busy="true"] { opacity: .65; }
.ditms .code { max-width: 100%; }
.ditms-table-scroll { overflow-x: auto; }
.ditms-program-settings { margin: 18px 0; padding: 12px; background: #fff; border: 1px solid #dce5e7; }
.ditms-followup input[type="number"] { width: 90px; }
.ditms-program-summary { color: #275a64; background: #eaf3f3; padding: 10px 14px; border-radius: 8px; }
.ditms-reports { margin: 24px 0; padding: 20px; background: #fff; border: 1px solid #b8c8ce; border-radius: 8px; }
.ditms-reports details { margin: 16px 0; padding: 12px; border: 1px solid #dce5e7; border-radius: 6px; }
.ditms-reports summary { cursor: pointer; font-size: 15px; font-weight: 600; }
.ditms-reports caption { text-align: left; font-weight: 600; padding: 10px 0; }
.ditms-reports table { min-width: 720px; margin: 10px 0; }
.ditms-reports .ditms-count-chart { table-layout: fixed; max-width: 1000px; }
.ditms-count-chart th:first-child { width: 150px; }
.ditms-count-chart td { text-align: center; padding: 1px 6px; height: 19px; border-right: 1px solid #e0e6e8; color: #66777d; }
.ditms-count-chart .ditms-fill-positive { background: #fae2e2; color: #8a2020; }
.ditms-count-chart .ditms-fill-negative { background: #deecfa; color: #215681; }
.ditms-count-chart .ditms-chart-midline > * { border-top: 3px solid #3b525b; }
.ditms-profile-table td { font-size: 15px; font-weight: 600; }
.ditms-directions { margin-left: 20px; list-style: disc; }
.ditms-directions li { margin: 8px 0; }
.ditms-report-note { padding: 12px; background: #fff3d9; border-left: 4px solid #b88116; }
@media (max-width: 600px) { .ditms-shell { margin: 12px; padding: 20px; } .ditms-grid { gap: 8px; } .ditms-card { min-height: 78px; font-size: 25px; } }
@media (max-width: 600px) { .ditms-photo { padding: 4px; gap: 5px; } .ditms-photo img { height: 96px; } .ditms-photo-label { font-size: 11px; } .ditms-shell h2.ditms-instruction { font-size: 20px; } }

.ditms-delete { margin: 20px 0; padding: 14px; border: 1px solid #c88; background: #fff; }
.ditms-delete summary { color: #992d20; cursor: pointer; font-weight: 600; }
.ditms .ditms-delete-button { border-color: #a12d22; color: #a12d22; }

.ditms .ditms-profile-table tbody th,.ditms .ditms-profile-table tbody td{font-weight:400}.ditms .ditms-profile-table .ditms-reaction-row th,.ditms .ditms-profile-table .ditms-reaction-row td{font-weight:700}.ditms-profile-line{font-size:18px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.ditms-profile-line strong{font-weight:700}
