/* linux.software / u-boot.software: the status sites' own rules (the same
 * file in both repos). The frame, the bars, the tables' base look and the
 * theme are css/lc-kit.css (vendored by tools/lc-ui-kit/sync.py; never edit
 * it here). Colours are the kit's tokens, so both themes follow it. */

.st-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 24px 16px 40px;
  font-size: 15px;
  line-height: 1.55;
}

.st-main h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

/* The board on a Features page: the visible title (the page's own h1 is
   for screen readers, so the page has one before and without the data). */
.st-main h2.st-title {
  margin: 0 0 8px;
  font-size: 24px;
}

/* Features: one line on where the trees differ, and a switch to see only
   those rows. */
.st-summary {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-dim);
}
.st-summary strong { color: var(--text); }
.st-toggle {
  margin-left: 8px;
  padding: 3px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--accent);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.st-toggle[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.st-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A row the trees disagree on: an accent bar before its name. */
.st-features tr.st-diff th[scope="row"] { box-shadow: inset 3px 0 0 var(--accent); }
.st-features tr.st-diff { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.st-only-diff tr.st-same { display: none; }

/* The board's defconfig under each tree's name. */
.st-file {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.st-main h2 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.st-lede {
  margin: 0 0 20px;
  max-width: 46rem;
  color: var(--text-dim);
}

/* ---- the state mark: drawn in CSS, so no font has to have the glyph ---- */
.st-dot {
  display: inline-block;
  box-sizing: border-box;
  width: 0.7em;
  height: 0.7em;
  border: 0.13em solid currentColor;
  border-radius: 50%;
  vertical-align: 0;
}
.st-dot.st-yes { background: currentColor; }
.st-dot.st-partial { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.st-dot.st-none {
  width: 0.9em;
  height: 2px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  vertical-align: 0.25em;
}

/* ---- tables ---- */
.st-table th,
.st-table td { vertical-align: middle; }
.st-table thead th:not(:first-child),
.st-table td { text-align: center; }
.st-table thead a { color: var(--accent); font-weight: 600; }
.st-table thead small {
  display: block;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

td.st { font-size: 17px; }
td.st a { display: inline-block; padding: 2px 6px; color: inherit; }
td.st-yes,
td.st-partial { color: var(--c-eth); }
td.st-no,
td.st-none { color: var(--text-dim); }
.st-txt,
.st-some {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
}

/* Kernels / Versions: a reference table of words, read left to right. */
.st-info thead th:not(:first-child),
.st-info td,
.st-info th { text-align: left; vertical-align: top; }
.st-info td:last-child { min-width: 18rem; }

/* Boards: one row a board, grouped by SoC vendor. */
.st-boards { min-width: 34rem; }
.st-boards thead th:not(:first-child),
.st-boards td { width: 9rem; }
.st-vendor th {
  padding-top: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
}
.st-board { display: flex; align-items: center; gap: 12px; text-align: left; }
.st-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.st-name { display: block; font-weight: 700; color: var(--accent); }
.st-code { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.st-variants { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 400; }
.st-variants > * { padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); }
.st-boards tfoot th,
.st-boards tfoot td { font-size: 12px; color: var(--text-dim); font-weight: 500; white-space: nowrap; border-bottom: 0; }

/* Features: a header row per group, its features indented beneath. */
.st-features { min-width: 34rem; }
.st-features th[scope="row"] { text-align: left; font-weight: 500; }
.st-features th.st-feat { padding-left: 22px; }
.st-group-row > :not(.st-absent) {
  padding-top: 16px;
  border-bottom-color: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
}
td.st-absent {
  vertical-align: top;
  padding-top: 16px;
  white-space: normal;
  max-width: 8rem;
}

.st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  padding: 0;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--text-dim);
}
.st-legend .st-dot { margin-right: 6px; }
.st-legend .st-yes,
.st-legend .st-partial { color: var(--c-eth); }

.st-foot { margin: 8px 0 0; font-size: 13px; color: var(--text-dim); }
.st-details { margin-top: 14px; font-size: 14px; }
.st-details summary { cursor: pointer; color: var(--text-dim); }
.st-blocks { font-size: 14px; padding-left: 18px; }
.st-blocks ul { padding-left: 18px; margin: 2px 0 8px; color: var(--text-dim); }
.st-node { color: var(--text-dim); }
.st-guides { list-style: none; padding: 0; font-size: 14px; }
.st-guides li { margin: 6px 0; }

/* Portrait phone: marks only, every tree without sideways scrolling. The
   words stay for screen readers; the legend explains the marks. */
@media (orientation: portrait) and (max-width: 767px) {
  .st-main { padding: 16px 10px 32px; }
  .st-boards,
  .st-features { min-width: 0; }
  .st-table th,
  .st-table td { padding: 8px 4px; }
  .st-table thead th:not(:first-child) { font-size: 11px; }
  .st-boards thead th:not(:first-child),
  .st-boards td { width: auto; }
  .st-table thead small,
  .st-thumb,
  .st-file,
  td.st .st-txt { display: none; }
  td.st-absent .st-txt { display: block; }

  /* Kernels / Versions: one card a tree, each value under its label. */
  .st-info thead { display: none; }
  .st-info,
  .st-info tbody,
  .st-info tr,
  .st-info th,
  .st-info td { display: block; width: auto; min-width: 0; }
  .st-info tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .st-info th,
  .st-info td { padding: 2px 0; border: 0; }
  .st-info th { font-size: 16px; }
  .st-info td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .st-info td:last-child { min-width: 0; }
}
