/* AskIssuer — the FindDo template's hero pattern (a panel floating over a
   full-bleed header) with its photograph replaced by a gradient and its accent
   deepened away from the green that signals a verified result. */

:root {
  /* Navy, deliberately: in a verification tool green, amber and red carry
     meaning, so the brand colour stays out of those hues entirely. */
  --brand: #1b3a6b;
  --brand-dark: #132b50;
  --brand-deep: #0f1d35;

  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #f1f5f5;
  --line: #e2e8e8;
  --ink: #23303a;
  --ink-2: #5d6b74;
  --ink-3: #8d9aa2;

  --good: #12805f;
  --good-bg: #e2f6ef;
  --okish: #0e6a75;
  --okish-bg: #e2f3f5;
  --warn: #96610a;
  --warn-bg: #fdf1dc;
  --bad: #b32639;
  --bad-bg: #fceaec;
  --idle-bg: #eceff1;

  --shadow: 0 1px 2px rgba(16, 32, 32, .05), 0 10px 30px rgba(16, 32, 32, .07);
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#hero > .wrap { width: 100%; }
main { width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
a { color: var(--brand-dark); }

/* ---------------------------------------------------------------- masthead */

/* The bar and the footer stay light in both colour schemes — literal values
   rather than the themed variables, which invert. */
#masthead {
  background: #ffffff;
  border-bottom: 1px solid #e4eaea;
}
.masthead__inner { display: flex; align-items: center; height: 66px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #23303a;
}
/* The wordmark is set in a transitional serif — it should not look like the
   interface around it. "Ask" regular, "Issuer" bold: the emphasis belongs on
   who is being asked. */
.brand__name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1;
}
.brand__name strong { font-weight: 700; }

/* -------------------------------------------------------------------- hero */

/* A gradient rather than a photograph. Any image dark enough to keep white type
   legible was too dark to read as anything — it cost 250KB to look like murk. */
#hero {
  position: relative;
  padding: 62px 0 58px;
  background: linear-gradient(160deg, #1b3a6b 0%, #16294a 55%, #101d33 100%);
}

/* Left-aligned so the copy sits square with the form beneath it. */
.hero__copy { margin-bottom: 26px; max-width: 62ch; }
.hero__copy h1 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 33px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.hero__copy p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 17px;
  font-weight: 400;
}

/* The template's floating search bar, repurposed for uploading. */
.advance-search {
  display: flex;
  gap: 14px;
  background: #fff;
  padding: 18px;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.query { flex: 1 1 0; min-width: 0; }
.query--name { flex: 0 1 260px; }
.query--files { flex: 1 1 auto; }

.advance-search input[type=text] {
  width: 100%; height: 54px;
  padding: 0 14px;
  border: 1px solid #dfe5e5;
  border-radius: 3px;
  background: #fff;
  color: #23303a;
  font: inherit;
}
.advance-search input[type=text]:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-color: transparent;
}

.drop {
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 14px;
  border: 1.5px dashed #cbd6d6;
  border-radius: 3px;
  background: #fff;
  color: #5d6b74;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
}
.drop span { overflow: hidden; text-overflow: ellipsis; }
.drop:hover, .drop:focus-visible, .drop.is-over {
  border-color: var(--brand);
  color: var(--brand-dark);
  outline: none;
}
.drop.is-over { background: #f2f5fb; }
.ico-upload {
  flex: none; width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L8 8m4-4 4 4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L8 8m4-4 4 4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E");
}

.search-btn { flex: 0 0 150px; }
.search-btn > button {
  width: 100%; height: 54px;
  border: none; border-radius: 3px;
  background: var(--brand);
  color: #fff;
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.search-btn > button:hover:not(:disabled) { background: var(--brand-dark); }
.search-btn > button:disabled { opacity: .55; cursor: not-allowed; }

/* queued files, sitting under the panel on the hero */
.queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.queue li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: #fff;
  border-radius: 3px;
  color: var(--ink);
  font-size: 14px;
}
.queue .qname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .qsize { color: var(--ink-3); font-size: 12.5px; }
.queue button {
  border: 0; background: none; color: var(--ink-3);
  cursor: pointer; font-size: 19px; line-height: 1; padding: 0 2px;
}
.queue button:hover { color: var(--bad); }

.hero__actions { margin-top: 12px; text-align: right; }
.linkbtn {
  border: 0; background: none; padding: 0;
  color: var(--brand-dark); font: inherit; font-size: 13.5px;
  cursor: pointer; text-decoration: none;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn--light { color: rgba(255, 255, 255, .85); }

@media (max-width: 860px) {
  #hero { padding: 44px 0 40px; }
  .hero__copy h1 { font-size: 26px; }
  .hero__copy p { font-size: 16px; }
  .advance-search { flex-wrap: wrap; }
  .query--name, .query--files, .search-btn { flex: 1 1 100%; }
  /* Let the label wrap rather than truncate in a narrow column. */
  .drop { white-space: normal; height: auto; min-height: 54px; padding: 12px 14px; }
}

/* ----------------------------------------------------------------- results */

.results { margin: 44px 0 60px; }
.results__head {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.results__head h2 {
  margin: 0; font-size: 20px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em;
}
.tally { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

.pill {
  display: inline-block; padding: 4px 12px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--idle-bg); color: var(--ink-2);
}
.pill--good  { background: var(--good-bg);  color: var(--good); }
.pill--okish { background: var(--okish-bg); color: var(--okish); }
.pill--warn  { background: var(--warn-bg);  color: var(--warn); }
.pill--bad   { background: var(--bad-bg);   color: var(--bad); }

.btn {
  appearance: none; border: 0; border-radius: 0;
  padding: 11px 20px; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--brand); color: #fff; cursor: pointer;
}
.btn--ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-3); }

.cards { display: grid; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card[data-tone=good]  { border-left-color: var(--good); }
.card[data-tone=okish] { border-left-color: var(--okish); }
.card[data-tone=warn]  { border-left-color: var(--warn); }
.card[data-tone=bad]   { border-left-color: var(--bad); }

.card__head { display: flex; align-items: flex-start; gap: 12px; }
.card__id { flex: 1; min-width: 0; }
.card__name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.card__sub { display: block; color: var(--ink-3); font-size: 12.5px; }
.card__blurb { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }

.card__fields { margin: 14px 0 0; display: grid; gap: 6px; }
.card__fields > div {
  display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 14px;
}
.card__fields dt { color: var(--ink-3); }
.card__fields dd { margin: 0; overflow-wrap: anywhere; }

.card__detail { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.card__foot { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }

/* document vs issuer record */
.compare {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  font-size: 13.5px;
}
.compare__head, .compare__row {
  display: grid;
  grid-template-columns: 118px 1fr 1fr;
  gap: 12px;
  padding: 8px 12px;
  align-items: start;
}
.compare__head {
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.compare__row { border-bottom: 1px solid var(--line); }
.compare__row:last-child { border-bottom: 0; }
.compare__row span { overflow-wrap: anywhere; }
.compare__field { color: var(--ink-3); }
.compare__row--match   { background: var(--good-bg); }
.compare__row--differs { background: var(--bad-bg); color: var(--bad); }
.compare__row--differs .compare__field { color: inherit; }
.compare__row--unknown { color: var(--ink-3); }
.compare__row--match .compare__field::after   { content: ' ✓'; color: var(--good); }
.compare__row--differs .compare__field::after { content: ' ✕'; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.step {
  font-size: 13.5px; color: var(--ink-2);
  padding-left: 22px; position: relative;
}
.step::before {
  content: '·'; position: absolute; left: 4px; top: -1px;
  font-weight: 700; font-size: 15px;
}
.step--ok::before   { content: '✓'; color: var(--good); font-size: 13px; }
.step--fail::before { content: '✕'; color: var(--bad);  font-size: 13px; }
.step--warn::before { content: '!'; color: var(--warn); }
.step--info::before { content: 'i'; color: var(--ink-3); font-style: italic; }
.step strong { color: var(--ink); font-weight: 600; }

.flags { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.flag {
  font-size: 13.5px; padding: 9px 12px;
  background: var(--surface-2); color: var(--ink-2);
}
.flag--alert { background: var(--bad-bg);  color: var(--bad); }
.flag--warn  { background: var(--warn-bg); color: var(--warn); }

/* -------------------------------------------------------------------- foot */

#foot {
  border-top: 1px solid #e4eaea;
  background: #f7faf9;
  padding: 18px 0 22px;
  color: #5d6b74;
  font-size: 13.5px;
}
#foot p { margin: 0; }
#foot a { color: var(--brand-dark); }

/* ------------------------------------------------------------------ report */

.report { max-width: 900px; margin: 0 auto; padding: 32px 20px 80px; }
.rhead h1 {
  font-size: 26px; margin: 0 0 18px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em;
}
.rmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 22px; }
.rmeta dt { color: var(--ink-3); font-size: 12.5px; }
.rmeta dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.rtally { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.rcard {
  background: var(--surface); border: 1px solid var(--line);
  padding: 18px 20px; margin-bottom: 12px;
}
.rcard__top { display: flex; gap: 12px; align-items: center; }
.rcard__top h2 { margin: 0; font-size: 15.5px; flex: 1; overflow-wrap: anywhere; }
.rblurb { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }
.rfields { margin: 14px 0 0; display: grid; gap: 5px; }
.rfields > div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 14px; }
.rfields dt { color: var(--ink-3); }
.rfields dd { margin: 0; overflow-wrap: anywhere; }
.rsteps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 5px; }
.rflags { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.rfoot { margin-top: 28px; color: var(--ink-2); font-size: 13.5px; }

@media (max-width: 620px) {
  .card__fields > div, .rfields > div { grid-template-columns: 1fr; gap: 0; }
  .card__fields dt, .rfields dt { font-size: 12.5px; }
  .compare__head { display: none; }
  .compare__row { grid-template-columns: 1fr; gap: 2px; }
  .compare__row span:nth-child(2)::before { content: 'certificate: '; color: var(--ink-3); }
  .compare__row span:nth-child(3)::before { content: 'issuer: '; color: var(--ink-3); }
}
