/* Hash generator page. Builds on pw.css, the shared free-tool layout. */
.ht .pw-card { grid-template-columns: minmax(0, 1fr); }
.ht-mode { display: inline-flex; margin: 0 0 1rem; padding: 3px; border: 1px solid var(--ln); border-radius: 6px; background: var(--off); }
.ht-mode legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ht-mode label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.125rem; border-radius: 4px; color: var(--n); font-weight: 600; cursor: pointer; }
.ht-mode input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ht-mode label:has(input:checked) { background: var(--n); color: #fff; }
.ht-mode label:has(input:focus-visible) { outline: 3px solid var(--m); outline-offset: 2px; }
.ht-drop { position: relative; display: grid; place-items: center; gap: .25rem; min-height: 170px; padding: 1.25rem; border: 2px dashed #8089a5; border-radius: 6px; background: var(--off); text-align: center; cursor: pointer; transition: background-color .15s ease-out, border-color .15s ease-out; }
.ht-drop:hover, .ht-drop.is-over { border-color: var(--n); background: #e8fbf5; }
.ht-drop:focus-within { outline: 3px solid var(--m); outline-offset: 2px; }
.ht-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ht-drop[hidden] { display: none; }
.ht-drop svg { width: 34px; height: 34px; color: var(--n); }
.ht-drop strong { color: var(--n); font-size: 1.125rem; }
.ht-drop span { color: var(--mut); font-size: .9375rem; }
.ht-file { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .875rem 1rem; border: 1px solid var(--ln); border-left: 4px solid var(--m); border-radius: 4px; }
.ht-file[hidden] { display: none; }
.ht-file-t { flex: 1 1 12rem; min-width: 0; }
.ht-file-t strong { display: block; color: var(--n); overflow-wrap: anywhere; }
.ht-file-t span { color: var(--mut); font-size: .875rem; }
.ht-btn { min-height: 40px; padding: 0 .875rem; border: 1px solid var(--n); border-radius: 4px; background: #fff; color: var(--n); font: 600 .875rem/1 "DM Sans", system-ui, sans-serif; cursor: pointer; }
.ht-btn:hover { background: var(--n); color: #fff; }
.ht-btn:focus-visible { outline: 3px solid var(--m); outline-offset: 2px; }
.ht-btn[hidden] { display: none; }
.ht-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .75rem; font-size: .9375rem; }
.ht-progress[hidden] { display: none; }
.ht-progress progress { flex: 1 1 10rem; height: 10px; accent-color: var(--n); }
.pw .ht-text { display: block; width: 100%; min-height: 170px; padding: .75rem .875rem; border: 2px solid var(--n); border-radius: 4px; color: var(--ink); font: 400 1rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; box-sizing: border-box; }
.pw .ht-text:focus { outline: 3px solid var(--m); outline-offset: 1px; }
.ht-compare { margin-top: 1.25rem; }
.pw .ht-expected { display: block; width: 100%; min-height: 52px; padding: .625rem .875rem; border: 2px solid var(--n); border-radius: 4px; color: var(--ink); font: 400 .9375rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; box-sizing: border-box; }
.pw .ht-expected:focus { outline: 3px solid var(--m); outline-offset: 1px; }
.ht-verdict { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: .25rem .75rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--ln); border-left-width: 5px; border-radius: 4px; }
.ht-verdict[hidden] { display: none; }
.ht-verdict svg { display: none; width: 26px; height: 26px; grid-row: span 2; }
.pw .ht-v-title { margin: 0; color: var(--n); font: 700 1.25rem/1.2 "Source Serif 4", Georgia, serif; }
.ht-v-body { grid-column: 2; margin: 0; font-size: .9375rem; line-height: 1.45; }
.ht-verdict[data-kind="yes"] { border-left-color: #0a7559; background: #e8fbf5; }
.ht-verdict[data-kind="yes"] .i-yes { display: block; color: #0a7559; }
.ht-verdict[data-kind="no"] { border-left-color: #b3261e; background: #fdeeed; }
.ht-verdict[data-kind="no"] .i-no { display: block; color: #b3261e; }
.ht-verdict[data-kind="warn"] { border-left-color: #8a5a00; background: #fff6e0; }
.ht-verdict[data-kind="warn"] .i-warn { display: block; color: #8a5a00; }
.ht-verdict[data-kind="info"] .i-info { display: block; color: var(--n); }
.ht-empty { margin: 0 0 .75rem; color: var(--mut); font-size: .9375rem; }
.ht-empty[hidden] { display: none; }
.pw .ht-rows { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.pw .ht-row { margin: 0; padding: .75rem .875rem; border: 1px solid var(--ln); border-radius: 4px; background: #fff; }
.ht-row.is-match { border: 2px solid #0a7559; }
.ht-row.is-miss { border: 2px solid #b3261e; }
.ht-row-h { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; margin-bottom: .375rem; }
.ht-row-h strong { color: var(--n); }
.ht-badge { padding: .0625rem .4375rem; border-radius: 3px; background: #e8fbf5; color: #07503e; font-size: .75rem; font-weight: 700; }
.ht-badge--old { background: #fff6e0; color: #6b4600; }
.ht-row-h .ht-btn { margin-left: auto; min-height: 36px; padding: 0 .75rem; font-size: .8125rem; }
.ht-val { display: block; color: var(--ink); font: 400 .875rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.ht-val.is-empty { color: var(--mut); }
.ht-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.g .ht-table { min-width: 0; }
.ht-table caption { padding: 0 0 .625rem; color: var(--mut); font-size: .875rem; text-align: left; }
.ht-table th, .ht-table td { padding: .75rem; border-bottom: 1px solid var(--ln); text-align: left; vertical-align: top; }
.ht-table thead th { background: var(--n); color: #fff; font-size: .875rem; }
.ht-table tbody th { color: var(--n); white-space: nowrap; }
.pw code { padding: .0625rem .3125rem; border-radius: 3px; background: var(--off); font: 400 .9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
@media (max-width: 639.98px) {
  .ht-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ht-table, .ht-table tbody, .ht-table tr, .ht-table td, .ht-table tbody th, .ht-table caption { display: block; width: 100%; box-sizing: border-box; }
  .ht-table tr { padding: .75rem 0; border-top: 1px solid var(--ln); }
  .ht-table td, .ht-table tbody th { padding: .1875rem 0; border: 0; white-space: normal; }
  .ht-table td[data-l]::before { content: attr(data-l) ": "; color: var(--n); font-weight: 700; }
}
@media (min-width: 960px) { .ht .pw-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .ht-drop { transition: none; } }
.pw.ht .pw-hero h1 { max-width: 22ch; }
