/* FileHashIntel.
 *
 * Palette: five colours from CGA and nothing else. White page, black
 * text, blue for anything you can act on, two greys for structure.
 *
 * Typographic rule: anything a manifest wrote is monospaced, anything the
 * interface says is not, so a reader can always tell recorded data from
 * our commentary. */

:root {
  --white: #ffffff;
  --black: #000000;
  --blue: #0000aa;
  --grey: #aaaaaa;
  --dim: #555555;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono",
          Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--blue); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

code, .digest-value, .version, .release, input[type="search"] {
  font-family: var(--mono);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- search */

.search { position: relative; width: 100%; }

.search input[type="search"] {
  width: 100%;
  padding: 12px 48px 12px 20px;
  font-size: 0.95rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 999px;
  appearance: none;
}

.search input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.search input[type="search"]::placeholder {
  color: var(--dim);
  font-family: var(--sans);
}

.search input[type="search"]:focus {
  border-color: var(--blue);
  outline: none;
}

.search button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ------------------------------------------------------------ landing */

.landing {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  min-height: 70vh;
  padding: 40px 16px;
}

/* min-width:0 lets the grid item shrink below its content width, so a
   64-character digest can be ellipsised instead of forcing the page wide.
   width caps it at the search field's size on desktop. */
.landing > * {
  width: min(36rem, 100%);
  min-width: 0;
}

.wordmark-big { justify-self: center; }

.wordmark-big, .wordmark {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
}

.wordmark-big { margin: 0; font-size: clamp(1.6rem, 6vw, 2.4rem); }

.wordmark-big::before,
.wordmark::before { content: "#"; color: var(--blue); }

/* Suggested hashes under the search field. Truncated with an ellipsis so
   three 64-character digests never wrap or widen the column. */
.samples {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.samples li { margin: 4px 0; }

.samples a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.samples code { font-size: 0.85rem; }

/* ------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 62rem;
  margin: 0 auto;
  padding: 16px;
  border-bottom: 1px solid var(--grey);
}

.wordmark { flex: 0 0 auto; font-size: 1rem; text-decoration: none; }

.topbar .search { max-width: 42rem; }

/* --------------------------------------------------------------- page */

.page { max-width: 62rem; margin: 0 auto; padding: 24px 16px 64px; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.digest-value {
  margin: 0;
  font-size: clamp(1rem, 3.4vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.digest-value span { margin-right: 0.55em; }

.tally, .notice { margin: 12px 0 0; color: var(--dim); font-size: 0.9rem; }

.tally strong { color: var(--black); font-variant-numeric: tabular-nums; }

.copy {
  margin-left: 8px;
  padding: 2px 8px;
  font: inherit;
  font-size: 0.75rem;
  color: var(--blue);
  background: none;
  border: 1px solid var(--grey);
  border-radius: 999px;
  cursor: pointer;
}

/* ------------------------------------------------------------ results */

.groups { margin: 24px 0 0; padding: 0; list-style: none; }

.group { padding: 20px 0; border-top: 1px solid var(--grey); }

.file {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fields {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 8px 16px;
  margin: 0;
}

.fields dt {
  padding-top: 0.15em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.fields dd { margin: 0; overflow-wrap: anywhere; }

.fields code { font-size: 0.88rem; }

.version, .release { font-size: 0.8rem; color: var(--dim); }

.unknown { color: var(--dim); font-style: italic; }

.updates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.updates li {
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.message {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- mobile */

@media (max-width: 40rem) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .topbar .search { flex: 1 1 100%; }
  .fields { grid-template-columns: 1fr; gap: 0; }
  .fields dt { margin-top: 12px; }
}
