/* LPPv2 styles */
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f5f7fa;
  color: #2c3e50;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
}

header h1 { margin: 0 0 4px; font-size: 1.7em; color: #0a7285; }
header .subtitle { margin: 0 0 20px; color: #64748b; }

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

.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
}
.search-bar input:focus { outline: 2px solid #0a7285; outline-offset: 1px; }
.search-bar button {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  background: #0a7285;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
}
.search-bar button:hover { background: #086b78; }
.search-bar button:disabled { background: #94a3b8; cursor: default; }

.intro-block { margin: 4px 0 20px; color: #475569; }
.intro-block h2 { font-size: 1.05em; color: #2c3e50; margin: 0 0 6px; }
.intro-block p { margin: 0; line-height: 1.55; font-size: 0.95em; }

.error-msg {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.loading { color: #64748b; margin: 24px 0; }

.family-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.family-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.family-tag {
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
  font-size: 0.85em;
  padding: 2px 10px;
  border-radius: 12px;
}
.family-head { flex-wrap: wrap; }
.family-head code { font-size: 1.05em; }
.origin-chip {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 0.85em;
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.verdict-banner {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.verdict-banner i { font-size: 1.1em; }
.verdict-banner .verdict-text { flex-basis: 100%; }

.verdict-notre { background: #f1f5f9; color: #334155; }
.verdict-re { background: #dcfce7; color: #14532d; }
.verdict-redefault { background: #fef3c7; color: #78350f; }
.verdict-equal { background: #e0e7ff; color: #312e81; }
.verdict-commodity { background: #fde8d7; color: #7c2d12; }
.verdict-inconclusive { background: #e2e8f0; color: #334155; }

.probe-table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.probe-table th, .probe-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
}
.probe-table th { color: #64748b; font-weight: 600; }
.probe-table .no-response { color: #94a3b8; font-style: italic; }

.help {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.help summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 600;
  color: #0a7285;
  list-style-position: inside;
}
.help summary:focus-visible { outline: 2px solid #0a7285; outline-offset: 1px; }
.help-body { padding: 0 16px 16px; }
.help-body h2 { font-size: 1.05em; color: #2c3e50; margin: 16px 0 8px; }
.help-body p { margin: 8px 0; line-height: 1.55; }

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin: 8px 0 16px;
}
.help-table th, .help-table td {
  text-align: left;
  vertical-align: top;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
}
.help-table th { color: #64748b; font-weight: 600; }

.verdict-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92em;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-re { background: #16a34a; }
.dot-cm { background: #2563eb; }
.dot-ft { background: #dc2626; }

.diagram-wrap { overflow-x: auto; margin: 12px 0 4px; }
.lpp-diagram {
  display: block;
  width: 100%;
  min-width: 660px;
  height: auto;
  font-family: inherit;
}
.lpp-diagram .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.diagram-note { color: #64748b; font-size: 0.85em; margin-top: 0; }

.diag-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.diag-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.85em;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.diag-tab:hover { border-color: #0a7285; }
.diag-tab.active { background: #0a7285; border-color: #0a7285; color: #fff; }
/* Reply badge on prefix-mode address tabs. */
.tab-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.tab-dot-ok { background: #16a34a; }
.tab-dot-none { background: #94a3b8; }
.diag-tab.active .tab-dot-none { background: #cbd5e1; }

.live-diagram {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

/* Prefix-mode summary line (how many responsive addresses were tested). */
.prefix-note {
  color: #334155;
  font-size: 0.9em;
  margin: 0 0 10px;
}

.diag-legend {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 4px 0 10px;
}
.diag-legend-expl { margin: 2px 0 10px; }
.diag-legend .linklike { display: block; margin: 8px 0 0 auto; }
.diag-legend-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.diag-legend-row { margin: 3px 0; }
.diag-legend .no-response { color: #94a3b8; font-style: italic; }

.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9em;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.85;
  margin-left: auto;
}
.linklike:hover { opacity: 1; }

@media (max-width: 560px) {
  .search-bar { flex-direction: column; }
  .search-bar button { width: 100%; }
}
