/* Hidden Data Checker (/tools/hidden-data-checker/): report layout. Tokens from ft-shell only. */
.hdc-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--ft-space-1); margin: 0; color: var(--ft-ink-2); font-size: var(--ft-text-sm); }
.hdc-more__btn { padding: 0 0.5rem; }
.hdc-refused { display: grid; gap: var(--ft-space-2); }
.hdc-refused .ft-note { margin: 0; }

/* Before the first check */
.hdc-drop .ft-drop__file { min-height: 1.45em; }
.hdc-drop .ft-drop__file:empty { display: block; }
.hdc-results[data-hdc-opening] .hdc-placeholder { min-height: 44rem; }
.hdc-placeholder { min-height: 15rem; padding: var(--ft-space-5); border: 1px dashed var(--ft-line-strong); border-radius: var(--ft-radius-l); color: var(--ft-ink-2); font-size: var(--ft-text-sm); }
.hdc-placeholder__lead { margin: 0 0 var(--ft-space-3); color: var(--ft-ink); font-size: var(--ft-text-md); }
.hdc-checks { display: grid; gap: var(--ft-space-2); margin: 0; padding: 0; list-style: none; }
.hdc-checks li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--ft-space-3); line-height: 1.45; }
.hdc-checks__kind { color: var(--ft-ink); font-weight: 650; }
@media (max-width: 40rem) { .hdc-checks li { grid-template-columns: minmax(0, 1fr); gap: 0; } .hdc-placeholder { padding: var(--ft-space-4); } }

/* Summary of several files and report downloads */
.hdc-filelist { display: grid; gap: var(--ft-space-2); margin: 0; padding: 0; list-style: none; }
.hdc-filelink { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--ft-space-1) var(--ft-space-4); min-height: var(--ft-target); padding: var(--ft-space-2) var(--ft-space-3); border: 1px solid var(--ft-line); border-radius: var(--ft-radius); background: var(--ft-surface); color: var(--ft-ink); text-decoration: none; }
.hdc-filelink:hover { border-color: var(--ft-accent); }
.hdc-filelink__name { font-weight: 650; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--ft-line-strong); text-underline-offset: 0.18em; }
.hdc-filelink__meta { grid-column: 1; color: var(--ft-ink-2); font-size: var(--ft-text-xs); }
.hdc-filelink .hdc-counts { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 40rem) { .hdc-filelink { grid-template-columns: minmax(0, 1fr); } .hdc-filelink .hdc-counts { grid-column: 1; grid-row: auto; } }
.hdc-reportbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ft-space-2) var(--ft-space-4); padding: var(--ft-space-3) var(--ft-space-4); border-radius: var(--ft-radius); background: var(--ft-surface-2); }

/* Risk words and counts: colour plus the word itself */
.hdc-counts { display: flex; flex-wrap: wrap; gap: var(--ft-space-1); margin: 0; padding: 0; list-style: none; }
.hdc-risk, .hdc-count { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: var(--ft-text-xs); font-weight: 700; white-space: nowrap; line-height: 1.4; }
.hdc-risk::before, .hdc-count::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.hdc-risk--high, .hdc-count--high { background: var(--ft-bad-soft); color: var(--ft-bad); }
.hdc-risk--medium, .hdc-count--medium { background: var(--ft-warn-soft); color: var(--ft-warn); }
.hdc-risk--low, .hdc-count--low { background: var(--ft-info-soft); color: var(--ft-info); }
.hdc-count--none { background: var(--ft-ok-soft); color: var(--ft-ok); }
.hdc-risk--medium::before, .hdc-count--medium::before { border-radius: 1px; transform: rotate(45deg) scale(0.9); }
.hdc-risk--low::before, .hdc-count--low::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }

/* One file's report */
.hdc-report { display: grid; gap: var(--ft-space-4); padding-top: var(--ft-space-5); border-top: 1px solid var(--ft-line); scroll-margin-top: var(--ft-space-4); }
.hdc-report:first-of-type { padding-top: var(--ft-space-2); border-top: 0; }
.hdc-report:focus { outline: none; }
.hdc-report:focus-visible { outline: 3px solid var(--ft-focus); outline-offset: 4px; border-radius: var(--ft-radius-s); }
.hdc-report__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ft-space-2) var(--ft-space-4); }
.hdc-report__title { margin: 0; color: var(--ft-ink); font-size: var(--ft-text-xl); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.hdc-report__meta { margin: var(--ft-space-1) 0 0; color: var(--ft-ink-2); font-size: var(--ft-text-sm); }
.hdc-report .ft-note { margin: 0; }
.hdc-clean { display: grid; gap: var(--ft-space-2); padding: var(--ft-space-4); border: 1px solid var(--ft-line); border-radius: var(--ft-radius); background: var(--ft-surface-2); }
.hdc-clean__what { margin: 0; color: var(--ft-ink-2); font-size: var(--ft-text-sm); max-width: var(--ft-measure); }
.hdc-clean__result:empty { display: none; }
.hdc-clean__result .ft-note ul { margin: var(--ft-space-1) 0 0; padding-left: 1.2em; }
.hdc-photo { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-space-2); margin: 0; }
.hdc-photo img { display: block; max-width: 100%; max-height: 18rem; width: auto; height: auto; border: 1px solid var(--ft-line); border-radius: var(--ft-radius); background: var(--ft-surface-2); }
.hdc-photo figcaption, .hdc-figure figcaption { color: var(--ft-ink-2); font-size: var(--ft-text-sm); }

.hdc-group { display: grid; gap: var(--ft-space-3); }
.hdc-group__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ft-space-2); margin: 0; color: var(--ft-ink); font-size: var(--ft-text-md); font-weight: 650; }
.hdc-findings { display: grid; gap: var(--ft-space-3); margin: 0; padding: 0; list-style: none; }
.hdc-finding { display: grid; gap: var(--ft-space-2); min-width: 0; padding: var(--ft-space-4); border: 1px solid var(--ft-line); border-left: 4px solid var(--ft-info); border-radius: var(--ft-radius); background: var(--ft-surface); }
.hdc-finding--high { border-left-color: var(--ft-bad); }
.hdc-finding--medium { border-left-color: var(--ft-warn); }
.hdc-finding__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ft-space-1) var(--ft-space-3); }
.hdc-finding__title { margin: 0; color: var(--ft-ink); font-size: var(--ft-text-md); font-weight: 700; line-height: 1.35; }
.hdc-finding__tag { color: var(--ft-ok); font-size: var(--ft-text-xs); font-weight: 650; }
.hdc-finding__summary { margin: 0; color: var(--ft-ink-2); font-size: var(--ft-text-sm); max-width: var(--ft-measure); }
.hdc-finding__fix { margin: 0; padding-top: var(--ft-space-2); border-top: 1px solid var(--ft-line); color: var(--ft-ink); font-size: var(--ft-text-sm); max-width: var(--ft-measure); }
.hdc-finding__fix strong { font-weight: 650; }
.hdc-items { display: grid; gap: var(--ft-space-2); margin: 0; padding: 0; list-style: none; }
.hdc-item { display: grid; gap: 2px; min-width: 0; }
.hdc-item__label { margin: 0; color: var(--ft-ink); font-size: var(--ft-text-sm); font-weight: 650; }
.hdc-item__loc { margin-left: var(--ft-space-1); color: var(--ft-ink-3); font-weight: 500; }
.hdc-item__value { margin: 0; padding: var(--ft-space-1) var(--ft-space-3); border-left: 3px solid var(--ft-line-strong); background: var(--ft-surface-2); color: var(--ft-ink); font-size: var(--ft-text-sm); white-space: pre-wrap; overflow-wrap: anywhere; max-width: var(--ft-measure); }
.hdc-item__value--code { font-family: var(--ft-font-mono); font-size: var(--ft-text-xs); max-height: 16rem; overflow: auto; }
.hdc-item__meta { margin: 0; color: var(--ft-ink-2); font-size: var(--ft-text-xs); overflow-wrap: anywhere; max-width: var(--ft-measure); }
.hdc-item .ft-btnrow { margin-top: var(--ft-space-1); }
.hdc-item--inline { grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr); align-items: baseline; gap: var(--ft-space-1) var(--ft-space-3); }
.hdc-item--inline .hdc-item__value { padding: 0; border: 0; background: none; font-weight: 600; }
@media (max-width: 40rem) { .hdc-item--inline { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.hdc-gpsrow { gap: var(--ft-space-3); }
.hdc-more-items { justify-self: start; }

/* Cropped picture: the whole stored picture, the shown part outlined, the rest dimmed */
.hdc-figure { display: grid; gap: var(--ft-space-2); margin: var(--ft-space-1) 0 0; }
.hdc-crop { position: relative; display: inline-block; justify-self: start; max-width: 100%; overflow: hidden; border: 1px solid var(--ft-line); border-radius: var(--ft-radius); line-height: 0; background: var(--ft-surface-2); }
.hdc-crop img { display: block; max-width: 100%; max-height: 20rem; width: auto; height: auto; }
.hdc-crop__box { position: absolute; left: var(--hdc-l); top: var(--hdc-t); right: var(--hdc-r); bottom: var(--hdc-b); outline: 3px dashed var(--ft-surface); box-shadow: 0 0 0 2px var(--ft-ink), 0 0 0 100vmax color-mix(in srgb, var(--ft-frame-deep) 62%, transparent); pointer-events: none; }
.hdc-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ft-space-3); margin: var(--ft-space-1) 0 0; max-width: 40rem; }
.hdc-compare figure { display: grid; gap: var(--ft-space-1); margin: 0; align-content: start; }
.hdc-compare img { display: block; width: 100%; height: auto; max-height: 12rem; object-fit: contain; border: 1px solid var(--ft-line); border-radius: var(--ft-radius); background: var(--ft-surface-2); }
.hdc-compare figcaption { color: var(--ft-ink-2); font-size: var(--ft-text-xs); }
.hdc-gps { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--ft-space-4); margin: 0; font-size: var(--ft-text-sm); }
.hdc-gps dt { color: var(--ft-ink-2); }
.hdc-gps dd { margin: 0; color: var(--ft-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.hdc-mini { max-height: 18rem; }
.hdc-mini .ft-table { font-size: var(--ft-text-xs); }
.hdc-mini .ft-table td { min-width: 5rem; max-width: 22rem; overflow-wrap: anywhere; }

/* Worked example cards: long paths wrap instead of widening the page */
.hdc-example .ft-example__step { min-width: 0; overflow-wrap: anywhere; }

/* Clean-copy table in "How it works" */
.hdc-table-wrap { max-width: 100%; overflow-x: auto; }
.hdc-cleantable { min-width: 36rem; }
.hdc-cleantable caption { padding-bottom: var(--ft-space-2); color: var(--ft-ink-2); font-size: var(--ft-text-sm); text-align: left; }
.hdc-cleantable td, .hdc-cleantable th { font-size: var(--ft-text-sm); }

/* A fix line names the clean-copy button on screen and the page on paper, where the button isn't printed */
.hdc-print-only { display: none; }

@media print {
  .hdc-more, .hdc-reportbar, .hdc-clean, #hdc-placeholder, .hdc-screen-only { display: none !important; }
  .hdc-print-only { display: inline; }
  .hdc-finding, .hdc-filelink { break-inside: avoid; border-color: #999 !important; background: #fff !important; }
  .hdc-item__value { background: #fff !important; }
  .hdc-crop__box { box-shadow: 0 0 0 2px #000; }
}

/* Mobile form controls (16px to prevent iOS Safari zoom) and 44px primary buttons */
@media screen and (max-width: 640px), screen and (hover: none) and (pointer: coarse) {
  .ft-tool input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  .ft-tool select,
  .ft-tool textarea,
  .ft-tool .ft-input,
  .ft-tool .ft-select,
  .ft-tool .ft-textarea,
  .ft-tool .ft-inputgroup > .ft-select.ft-inputgroup__unit {
    font-size: max(16px, 1rem);
  }
  .ft-tool .ft-btn--primary {
    min-height: 44px;
  }
}

/* Prevent WebKit pre-wrap + text-wrap:pretty crash (requests-for-shared V-03) */
.ft-page .hdc-item__value { text-wrap-style: auto; }
