/*
 * Hand-written styles for everything added after the port: the tool page
 * template (lead, privacy line, guide, related tools), the guides section, and
 * small shared pieces tools can use (stat tiles, status pills, result panels).
 *
 * Every class is prefixed `omni-` so nothing here can collide with the Rehub
 * and Bootstrap rules the port copied in. Linked before _theme-inline.css,
 * which must stay last.
 */

:root {
  --omni-accent: #42a4c7;
  --omni-accent-dark: #2b7f9e;
  --omni-ink: #1d2730;
  --omni-muted: #5f6b76;
  --omni-line: #dfe5ea;
  --omni-soft: #f5f8fa;
  --omni-ok: #1e8e4e;
  --omni-ok-bg: #e7f6ed;
  --omni-warn: #9a6200;
  --omni-warn-bg: #fff4dc;
  --omni-bad: #b3261e;
  --omni-bad-bg: #fdecea;
  --omni-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------------------------------------------------------------- */
/* Tool page template                                                */
/* ---------------------------------------------------------------- */

.omni-lead {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--omni-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.omni-tool {
  margin-bottom: 8px;
}

.omni-privacy {
  margin: 18px auto 0;
  text-align: center;
  color: var(--omni-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.omni-privacy i {
  color: var(--omni-accent);
  margin-right: 4px;
}

/* The written guide under each tool, and the body of each /guides article. */
.omni-guide {
  max-width: 820px;
  margin: 56px auto 48px;
  color: var(--omni-ink);
  font-size: 17px;
  line-height: 1.75;
}

.omni-guide h2 {
  font-size: 28px;
  line-height: 1.25;
  margin: 44px 0 14px;
}

.omni-guide h2:first-child {
  margin-top: 0;
}

.omni-guide h3 {
  font-size: 21px;
  line-height: 1.3;
  margin: 30px 0 10px;
}

.omni-guide p,
.omni-guide ul,
.omni-guide ol {
  margin: 0 0 16px;
}

.omni-guide li {
  margin-bottom: 6px;
}

.omni-guide code {
  font-family: var(--omni-mono);
  font-size: 0.88em;
  background: var(--omni-soft);
  border: 1px solid var(--omni-line);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-word;
}

.omni-guide pre {
  font-family: var(--omni-mono);
  font-size: 14px;
  line-height: 1.55;
  background: #f3f6f8;
  border: 1px solid var(--omni-line);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
  white-space: pre;
}

.omni-guide pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.omni-table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
}

.omni-guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.omni-guide th,
.omni-guide td {
  border: 1px solid var(--omni-line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.omni-guide th {
  background: var(--omni-soft);
  font-weight: 600;
}

.omni-callout {
  border-left: 4px solid var(--omni-accent);
  background: var(--omni-soft);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 0 0 20px;
}

.omni-callout p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- */
/* Cards: related tools, the /all directory, guide listings          */
/* ---------------------------------------------------------------- */

.omni-related {
  max-width: 1000px;
  margin: 48px auto 24px;
}

.omni-related h4 {
  text-align: center;
  margin-bottom: 18px;
}

.omni-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

a.omni-card,
.omni-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--omni-line);
  border-radius: 10px;
  background: #fff;
  color: var(--omni-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.omni-card:hover {
  border-color: var(--omni-accent);
  box-shadow: 0 4px 14px rgba(20, 60, 80, 0.08);
  transform: translateY(-1px);
}

.omni-card__title {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.omni-card__text {
  color: var(--omni-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.omni-card__meta {
  color: var(--omni-accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.omni-directory {
  max-width: 1100px;
  margin: 0 auto;
}

.omni-directory h2,
.omni-directory h3 {
  font-size: 22px;
  margin: 34px 0 14px;
}

.omni-section {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 0 15px;
}

.omni-section > h2 {
  text-align: center;
  font-size: 30px;
  margin: 0 0 8px;
}

.omni-section > .omni-section__sub {
  text-align: center;
  color: var(--omni-muted);
  margin: 0 auto 26px;
  max-width: 700px;
}

.omni-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.omni-pillars > div {
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--omni-soft);
}

.omni-pillars h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.omni-pillars p {
  margin: 0;
  color: var(--omni-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- */
/* Shared tool UI                                                    */
/* ---------------------------------------------------------------- */

/* A row of big-number stat tiles. */
.omni-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.omni-stat {
  border: 1px solid var(--omni-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.omni-stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--omni-ink);
  font-variant-numeric: tabular-nums;
}

.omni-stat__label {
  display: block;
  font-size: 0.8rem;
  color: var(--omni-muted);
  line-height: 1.3;
}

/* Status pills: pass / warning / fail / neutral. */
.omni-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.omni-pill--ok { color: var(--omni-ok); background: var(--omni-ok-bg); }
.omni-pill--warn { color: var(--omni-warn); background: var(--omni-warn-bg); }
.omni-pill--bad { color: var(--omni-bad); background: var(--omni-bad-bg); }
.omni-pill--info { color: var(--omni-accent-dark); background: #e6f3f8; }

/* A bordered result block. */
.omni-panel {
  border: 1px solid var(--omni-line);
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
  margin: 16px 0;
}

.omni-panel h3,
.omni-panel h4 {
  margin-top: 0;
}

.omni-mono {
  font-family: var(--omni-mono);
  font-size: 0.9rem;
  word-break: break-all;
}

.omni-error {
  color: var(--omni-bad);
  background: var(--omni-bad-bg);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0;
}

.omni-note {
  color: var(--omni-muted);
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- */
/* Guides                                                            */
/* ---------------------------------------------------------------- */

.omni-article-meta {
  text-align: center;
  color: var(--omni-muted);
  font-size: 0.9rem;
  margin: -18px 0 30px;
}

.omni-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--omni-accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 28px 0;
  background: #f1f9fc;
}

.omni-cta p {
  margin: 0 !important;
}
