/* Decision Clock: the plain-language layer, the glossary tooltips, the record timeline and the views.
   Reads the site's design tokens (assets/style.css loads first). */

.plain {
  max-width: var(--measure);
  font-size: var(--fs-lg);
  line-height: 1.6;
}

.lead {
  color: var(--c-text-muted);
}

.plain-first {
  margin: var(--sp-4) 0 var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
}

/* Status badge: always names the system (federal ESA) before the status */
.status-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  font-weight: 600;
}

.status-system {
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}

.status-listed,
.status-badge-inline.status-listed {
  border-color: var(--c-brand);
  background: var(--c-brand-soft);
}

.status-pending,
.status-badge-inline.status-pending {
  border-color: var(--c-caution-border);
  background: var(--c-caution-bg);
}

.status-badge-inline {
  padding: 0 var(--sp-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.next-date {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-md);
}

.next-date-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}

.next-date time {
  font-weight: 700;
}

/* Glossary tooltips: shown on hover and on focus (a tap focuses), no JavaScript */
.gloss {
  position: relative;
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.gloss:focus {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.gloss-tip {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 20;
  display: none;
  width: max-content;
  max-width: min(22rem, 80vw);
  margin-top: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  box-shadow: var(--shadow-2);
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}

.gloss:hover .gloss-tip,
.gloss:focus .gloss-tip,
.gloss:focus-within .gloss-tip {
  display: block;
}

/* Home: three questions */
.question {
  margin: var(--sp-6) 0;
}

.clock-search input {
  width: 100%;
  max-width: 32rem;
  min-height: var(--tap);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
}

.answer-cards {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-3) 0;
}

.headline-list,
.view-list,
.petition-list,
.doc-list {
  padding-left: var(--sp-5);
}

.headline-list li,
.view-list li {
  margin: var(--sp-2) 0;
}

.headline-date {
  font-weight: 600;
  margin-right: var(--sp-2);
}

/* The record fold and its timeline */
.record {
  margin: var(--sp-6) 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}

.record > summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.clock-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-3) 0;
  font-size: var(--fs-sm);
}

.clock-table caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: var(--sp-2);
}

.clock-table th,
.clock-table td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}

.tl-date + .tl-date {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--c-border);
}

.tl-date time {
  display: block;
  font-weight: 700;
}

.tl-prelim {
  display: block;
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  font-style: italic;
  color: var(--c-text-muted);
}

.tl-none {
  color: var(--c-text-muted);
}

.link-note {
  color: var(--c-text-muted);
  font-style: italic;
}

.cite {
  white-space: nowrap;
  font-size: var(--fs-xs);
}

/* How to comment in five minutes */
.howto {
  padding: var(--sp-4);
  border-left: 4px solid var(--c-brand);
  background: var(--c-surface-2);
  border-radius: var(--r-sm);
}

.howto-title {
  margin-top: 0;
}

.howto-steps li {
  margin: var(--sp-2) 0;
}

.id-list dt {
  font-weight: 700;
  margin-top: var(--sp-3);
}

.id-list dd {
  margin-left: 0;
  overflow-wrap: anywhere;
}

.walkthrough h2 {
  font-size: var(--fs-xl);
}

.glossary-list dt {
  font-weight: 700;
  margin-top: var(--sp-3);
}

.footer-corrections {
  font-size: var(--fs-sm);
}

.notice-callout {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-caution-border);
  border-radius: var(--r-sm);
  background: var(--c-caution-bg);
  color: var(--c-caution);
}
