/* One stylesheet for every page. No web fonts, no remote resources (D6, S-4). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1b1b1b;
  --muted: #4a4a4a;
  --link: #0a4fbf;
  --link-visited: #5b2a9e;
  --rule: #d0d0d0;
  --panel: #f4f4f2;
  --banner-bg: #fff4d6;
  --banner-fg: #3d2e00;
  --banner-rule: #b08900;
  --code-bg: #eeeeec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #e8e8e8;
    --muted: #b8b8b8;
    --link: #8ab4f8;
    --link-visited: #c9a7f5;
    --rule: #3a3a3a;
    --panel: #1d1d1d;
    --banner-bg: #3a2f0b;
    --banner-fg: #fbe9b7;
    --banner-rule: #d9a91a;
    --code-bg: #262626;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Long URLs shown as link text (e.g. myaccount.google.com/connections)
     overflowed 320px phones; let them break (QA capture, 2026-11-01). */
  overflow-wrap: break-word;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: var(--bg);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

header,
main,
footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

header .site-name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--fg);
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
}

main {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 1.25rem 0 1rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.banner {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--banner-bg);
  color: var(--banner-fg);
  border-left: 4px solid var(--banner-rule);
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel {
  background: var(--panel);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin: 0 0 1rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.5rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
}

thead th {
  background: var(--panel);
}

/* Narrow phones (all policy tables since 2026-11-01; the privacy and
   admin tables scrolled sideways at 375 px): a .table-stack table shows one card per row, each cell
   labelled from its data-label, so host names are not split mid-word in a
   narrow column (QA capture at 320 px, 2026-11-01). The header row stays
   in the accessibility tree, visually hidden. */
@media (max-width: 30rem) {
  .table-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-stack,
  .table-stack caption,
  .table-stack tbody,
  .table-stack tr,
  .table-stack th[scope="row"],
  .table-stack td {
    display: block;
  }

  .table-stack tr {
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.4rem 0;
    margin: 0 0 0.75rem;
  }

  .table-stack td,
  .table-stack th[scope="row"] {
    border: 0;
    padding: 0.15rem 0.75rem;
  }

  .table-stack th[scope="row"] { background: none; }

  .table-stack td[data-label]:not(:first-child)::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--muted);
  }
}

footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

/* 44px-tall tap targets for the site name, the site nav and the footer
   links (brief §5; QA capture 2026-11-01 found 18-21px on phones). The
   rows sit 44px apart, so targets never overlap. */
header .site-name,
header nav a,
nav.panel a,
footer a,
a.home-link {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}
header nav ul,
nav.panel ul,
footer ul { row-gap: 0; }
