*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  font: 13px/1.38 var(--font-text);
  letter-spacing: -.003em;
  color: var(--color-label);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  transition: grid-template-columns .25s ease;
}

:root[data-sidebar="hidden"] body {
  grid-template-columns: 0 1fr;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: default;
}

svg {
  flex: none;
}

[hidden] {
  display: none !important;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.spacer {
  flex: 1;
}

.muted {
  color: var(--color-label-secondary);
}

.mono {
  font-family: var(--font-mono);
}

.plain-button {
  height: var(--control-height);
  padding: 0 9px;
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--color-label);
}

.plain-button:hover {
  background: var(--color-hover);
}

.plain-button.is-active {
  color: var(--color-accent);
}

.popup-chevron {
  width: 8px;
  height: 12px;
  margin-left: 1px;
  fill: none;
  stroke: var(--color-label-secondary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engine-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.engine-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--engine-color, var(--color-engine-default));
}

.hardware-tag {
  font: 12px var(--font-mono);
  color: var(--color-label-secondary);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-label-secondary);
}

.status-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-label-quaternary);
}

.status-tag.is-pass::before {
  background: var(--color-status-pass);
}

.status-tag.is-noisy::before {
  background: var(--color-status-noisy);
}

.status-tag.is-fail::before {
  background: var(--color-negative);
}

.status-tag.is-not_run::before,
.status-tag.is-unsupported::before,
.status-tag.is-no_fit::before,
.status-tag.is-no_data::before {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--color-label-tertiary);
}

.is-positive {
  color: var(--color-positive);
}

.is-negative {
  color: var(--color-negative);
}

/* phones and iPads in portrait: one column; the page never scrolls sideways or out from under its toolbar */
@media (max-width: 899px) {
  body,
  :root[data-sidebar] body {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    overscroll-behavior: none;
    font-size: 15px;
  }

  .content {
    height: 100vh;
    height: 100dvh;
  }

  /* a finger needs more than a pointer: plain buttons grow to 44 points, as Apple asks */
  .plain-button {
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
  }
}

/* phones: a sideways swipe never moves the page. The page is locked to the screen's width, and a table that
   reaches its end stops hard instead of bouncing or handing the swipe on to the page. */
@media (max-width: 899px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
  }
  .table-container,
  .platform-scroll,
  .filter-list,
  .store-list,
  .term-body {
    overscroll-behavior: none;
  }
}
@media (max-width: 899px) {
  .content,
  .content > * { max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
  .content .table-container,
  .content .platform-scroll { overflow-x: auto; }
}
/* phones: the same hard stop at the top and the bottom of every page and table, no bounce */
@media (max-width: 899px) {
  .content,
  .content > *,
  .method,
  .platform,
  .platform-scroll,
  .table-container,
  .sidebar,
  .sidebar-nav { overscroll-behavior: none; }
}

/* a quiet line at the foot of the window, centered, that pie is open source */
.site-credit {
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
  margin: 0;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--color-label-tertiary);
  white-space: nowrap;
  pointer-events: none;
}
.site-credit span { color: #ff375f; }
