/* Shared UI kit — single source for chrome pages + SERP (concatenated). */

.btn-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--r-pill);
  padding: 12px 18px;
  min-height: 44px;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-spring),
    transform var(--duration-fast) var(--ease-spring),
    filter var(--duration-base) var(--ease-out);

  &:active {
    transform: scale(0.97);
  }

  &:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    box-shadow: var(--focus-ring);
  }

  &:disabled {
    opacity: 0.7;
    cursor: wait;
  }
}

.btn-pill--primary {
  color: var(--bg);
  background: var(--blue);
  border-color: transparent;

  &:hover {
    filter: brightness(1.05);
    text-decoration: none;
  }
}

.btn-pill--secondary {
  color: var(--text);
  background: var(--bg);
  border-color: var(--border);
  box-shadow: var(--lift-1);

  &:hover {
    border-color: var(--border-strong);
    box-shadow: var(--lift-2);
    background: var(--surface0);
    text-decoration: none;
  }
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: min(100%, 28rem);
}

.status-block__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.status-block__detail {
  margin: 0;
  font-size: 1.05rem;
  color: var(--subtext);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.status-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.status-block__badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface0);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  margin: 0 0 16px;
  line-height: 1;
}

.doc-prose {
  max-width: none;
  display: block;
  width: 100%;
  color: var(--text);
  line-height: 28px;

  @media (max-width: 800px) {
    max-width: 100%;
  }

  strong {
    font-weight: 600;
  }

  em {
    font-style: italic;
  }

  h1,
  h2,
  h3 {
    line-height: 1.3;
  }

  /* .page-title (chrome) owns the hero h1; keep a fallback for bare h1s. */
  h1:not(.page-title) {
    font-size: 24px;
  }

  h2 {
    font-size: 17px;
    margin-top: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
  }

  .bigh2 {
    margin: 48px 0 16px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    letter-spacing: -0.02em;
    line-height: 32px;
    font-size: 24px;

    @media (max-width: 800px) {
      margin: 32px 0 12px;
      padding-top: 20px;
      font-size: 1.25rem;
      line-height: 1.3;
    }
  }

  h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 22px;
  }

  h1,
  h2,
  h3,
  b {
    color: var(--text);
  }

  a {
    color: var(--blue);
    text-decoration: underline;

    &:hover {
      text-decoration: none;
    }
  }

  code {
    background: var(--surface0);
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  pre {
    background: var(--surface0);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;

    code {
      background: none;
      padding: 0;
      font-size: 0.9em;
      position: relative;
    }
  }

  ul,
  ol {
    padding-left: 1.4em;
    margin: 0.75em 0;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
  }

  li {
    margin: 0.3em 0;
    margin-bottom: -1px;

    b {
      font-weight: 500;
    }
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.95em;
  }

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

  th {
    color: var(--text);
    font-weight: 600;
  }

  blockquote {
    border-left: 3px solid var(--blue);
    padding-left: 12px;
    margin: 1em 0;
    opacity: 0.9;
  }
}
