/* ===========================================================================
   Adobe Launch Documentation Tool — MetricByte Consulting
   Inherits the site palette from css/styles.css and only adds what the tool
   needs. No colour is hard-coded that the site already defines.
   =========================================================================== */

.ldt {
  --ldt-ok:      #1a3a2a;   /* accent green  */
  --ldt-high:    #a3341f;
  --ldt-medium:  #b06a1f;
  --ldt-low:     #b89a3e;   /* gold          */
  --ldt-info:    #6b6860;   /* muted         */
  --ldt-band:    #ede9e1;   /* paper-dark    */
  --ldt-line:    #e0dbd0;   /* mid           */
  --ldt-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- input panel ---------- */
.ldt-panel {
  background: var(--white);
  border: 1px solid var(--ldt-line);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 28px;
}
.ldt-panel h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 6px; }
.ldt-hint { color: var(--muted); font-size: .92rem; margin: 0 0 18px; line-height: 1.6; }
.ldt-hint code, .ldt code { font-family: var(--ldt-mono); font-size: .86em; background: var(--ldt-band); padding: 1px 5px; border-radius: 3px; }

.ldt-label {
  display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}
.ldt textarea, .ldt input[type=text], .ldt input[type=email] {
  width: 100%; font-family: var(--ldt-mono); font-size: .86rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--ldt-line); border-radius: 3px;
  padding: 12px 14px; line-height: 1.55; resize: vertical;
}
.ldt input[type=text], .ldt input[type=email] { font-family: var(--sans); font-size: .95rem; }
.ldt textarea { min-height: 108px; }
.ldt textarea:focus, .ldt input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

.ldt-drop {
  border: 1.5px dashed var(--ldt-line); border-radius: 3px; padding: 18px; text-align: center;
  color: var(--muted); font-size: .88rem; margin-top: 12px; cursor: pointer;
  background: var(--paper); transition: border-color .12s, background .12s;
}
.ldt-drop:hover { border-color: var(--accent); }
.ldt-drop.is-over { border-color: var(--accent); background: var(--ldt-band); color: var(--ink); }

.ldt-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 20px; }

.ldt-adv { margin-top: 18px; border-top: 1px solid var(--ldt-line); padding-top: 14px; }
.ldt-adv summary { cursor: pointer; font-size: .86rem; color: var(--muted); font-weight: 600; list-style: none; }
.ldt-adv summary::-webkit-details-marker { display: none; }
.ldt-adv summary::before { content: "▸ "; }
.ldt-adv[open] summary::before { content: "▾ "; }
.ldt-adv .ldt-adv-body { padding: 16px 0 2px; display: grid; gap: 16px; }
.ldt-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.ldt-check input { margin-top: 4px; flex: none; }
.ldt-check span span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

/* ---------- status ---------- */
.ldt-status {
  margin-top: 18px; font-size: .92rem; padding: 14px 16px; border-radius: 3px;
  border: 1px solid var(--ldt-line); background: var(--paper); color: var(--muted); display: none;
  line-height: 1.6;
}
.ldt-status.is-shown { display: block; }
.ldt-status.is-error { border-left: 3px solid var(--ldt-high); color: var(--ink); }
.ldt-status.is-ok { border-left: 3px solid var(--accent); color: var(--ink); }
.ldt-status ol { margin: 10px 0 0 20px; padding: 0; }
.ldt-status li { margin: 4px 0; }
.ldt-diag {
  font-family: var(--ldt-mono); font-size: .78rem; background: var(--white);
  border: 1px solid var(--ldt-line); border-radius: 3px; padding: 12px;
  margin-top: 12px; white-space: pre-wrap; max-height: 200px; overflow: auto;
}

/* ---------- scorecard ---------- */
.ldt-scorecard {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center;
  background: var(--accent); color: var(--white);
  border-radius: 4px; padding: 30px 32px; margin-bottom: 26px;
}
.ldt-score-num { font-family: var(--serif); font-size: 4.4rem; line-height: 1; }
.ldt-score-grade { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.ldt-score-side h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 8px; color: var(--white); }
.ldt-score-side p { margin: 0; font-size: .95rem; line-height: 1.65; opacity: .85; }
.ldt-score-tally { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.ldt-score-tally b { font-size: 1.5rem; font-weight: 500; display: block; font-family: var(--serif); }
.ldt-score-tally span { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; opacity: .75; }

/* ---------- stat strip ---------- */
.ldt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--ldt-line); border: 1px solid var(--ldt-line); border-radius: 4px; overflow: hidden; margin-bottom: 26px; }
.ldt-stat { background: var(--white); padding: 18px 20px; }
.ldt-stat b { display: block; font-family: var(--serif); font-size: 1.85rem; line-height: 1.1; }
.ldt-stat span { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- findings ---------- */
.ldt-findings { list-style: none; margin: 0; padding: 0; }
.ldt-findings li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--ldt-line); }
.ldt-findings li:last-child { border-bottom: 0; }
.ldt-findings strong { font-weight: 600; }
.ldt-findings .ldt-meta { color: var(--muted); font-size: .84rem; margin-top: 3px; font-family: var(--ldt-mono); word-break: break-word; }
.ldt-findings .ldt-why { color: var(--muted); font-size: .9rem; margin-top: 5px; line-height: 1.6; }
.ldt-sev {
  display: inline-block; flex: none; min-width: 62px; text-align: center;
  padding: 3px 9px; border-radius: 2px; font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--white);
}
.ldt-sev.High { background: var(--ldt-high); }
.ldt-sev.Medium { background: var(--ldt-medium); }
.ldt-sev.Low { background: var(--ldt-low); color: var(--ink); }
.ldt-sev.Info { background: var(--ldt-info); }
.ldt-count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---------- download / gate ---------- */
.ldt-gate {
  background: var(--ldt-band); border: 1px solid var(--ldt-line); border-radius: 4px;
  padding: 28px 30px; margin-top: 26px;
}
.ldt-gate h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 8px; }
.ldt-gate p { color: var(--muted); font-size: .95rem; line-height: 1.65; margin: 0 0 20px; }
.ldt-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; }
.ldt-form .ldt-field-wide { grid-column: 1 / -1; }
.ldt-form label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ldt-form .ldt-consent { grid-column: 1 / -1; font-size: .84rem; color: var(--muted); line-height: 1.6; }
.ldt-hp { position: absolute; left: -9999px; }

.ldt-unlocked { display: none; }
.ldt-unlocked.is-shown { display: block; }
.ldt-gate.is-done { display: none; }

/* ---------- sheet preview ---------- */
.ldt-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--ldt-line); margin-top: 26px; }
.ldt-tab {
  border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--muted);
  padding: 8px 13px; font: inherit; font-size: .84rem; cursor: pointer; border-radius: 3px 3px 0 0;
}
.ldt-tab:hover { color: var(--ink); background: var(--ldt-band); }
.ldt-tab.is-active { background: var(--white); border-color: var(--ldt-line); color: var(--ink); font-weight: 600; margin-bottom: -1px; }
.ldt-tab i { font-style: normal; color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.ldt-sheet { border: 1px solid var(--ldt-line); border-top: 0; background: var(--white); overflow: auto; max-height: 520px; }
.ldt-grid { border-collapse: collapse; font-size: .82rem; width: 100%; }
.ldt-grid th {
  position: sticky; top: 0; z-index: 1; background: var(--accent); color: var(--white);
  text-align: left; padding: 9px 11px; font-weight: 600; white-space: nowrap; font-size: .78rem;
}
.ldt-grid td { padding: 7px 11px; border-bottom: 1px solid var(--ldt-line); vertical-align: top; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldt-grid td.ldt-wrap { max-width: 420px; padding: 6px 11px; white-space: normal; }
.ldt-grid td.ldt-wrap .ldt-clamp {
  white-space: pre-wrap; font-family: var(--ldt-mono); font-size: .76rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-height: 72px;
}
.ldt-grid tr:nth-child(even) td { background: var(--paper); }
.ldt-grid td.ldt-bool { font-weight: 700; font-size: .74rem; letter-spacing: .03em; }
.ldt-grid td.ldt-yes { color: var(--accent); }
.ldt-grid td.ldt-no { color: var(--muted); font-weight: 400; }
.ldt-more { padding: 12px; color: var(--muted); font-size: .84rem; background: var(--white); }

.ldt-privacy { font-size: .84rem; color: var(--muted); line-height: 1.7; margin-top: 26px; }

@media (max-width: 720px) {
  .ldt-scorecard { grid-template-columns: 1fr; gap: 18px; text-align: left; padding: 24px; }
  .ldt-form { grid-template-columns: 1fr; }
  .ldt-panel, .ldt-gate { padding: 22px; }
}
