/* Personal Workspace Connector — shared stylesheet
   No JS, no webfonts, no third-party requests: the pages Google needs to reach
   must stay publicly readable with nothing blocking them. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-inset: #eceef1;
  --fg: #16181d;
  --fg-muted: #5b6270;
  --fg-faint: #8a92a0;
  --rule: #e2e5ea;
  --accent: #1f5fd1;
  --accent-soft: #eaf0fc;
  --warn-bg: #fff8e6;
  --warn-rule: #e8c96a;

  --measure: 44rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --bg-soft: #171a20;
    --bg-inset: #1e222a;
    --fg: #e6e8ec;
    --fg-muted: #a0a8b6;
    --fg-faint: #767e8c;
    --rule: #272c35;
    --accent: #7ba6f5;
    --accent-soft: #19212f;
    --warn-bg: #241f12;
    --warn-rule: #6b5a24;
  }
}

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

html { -webkit-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: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav a[aria-current="page"] { font-weight: 600; }

.nav .sep {
  color: var(--fg-faint);
  user-select: none;
}

/* ---------- page body ---------- */

main { padding: 3rem 0 2rem; }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin: 0 0 0.5rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin: 0 0 2rem;
}

.updated {
  font-size: 0.85rem;
  color: var(--fg-faint);
  margin: 0 0 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.012em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

p { margin: 0 0 1rem; }

a { color: var(--accent); }

ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 600; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--bg-inset);
  padding: 0.12em 0.38em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

/* ---------- callouts ---------- */

.note,
.warn {
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-left-color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.warn {
  border-left-color: var(--warn-rule);
  background: var(--warn-bg);
}

.note > :last-child,
.warn > :last-child { margin-bottom: 0; }

/* ---------- scope table ---------- */

/* Fixed layout with explicit column widths: with `auto` the service names
   claimed most of the row and squeezed the scope strings until they broke
   mid-token (`userinfo.em` / `ail`), which is exactly the column a reader
   checks a consent screen against. */
.scopes {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.9rem;
}

.scopes th,
.scopes td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.scopes th:last-child,
.scopes td:last-child { padding-right: 0; }

.scopes th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
  font-weight: 600;
  border-bottom-color: var(--fg-faint);
}

.scopes col.c-service { width: 21%; }
.scopes col.c-scopes  { width: 43%; }
.scopes col.c-purpose { width: 36%; }

.scopes code {
  background: none;
  padding: 0;
  /* break only if a single scope genuinely exceeds the column */
  overflow-wrap: break-word;
}

/* Three columns stop working well below ~40rem: the service names get about
   70px and shred. Stack each row into service / scopes / purpose instead —
   the three read distinctly enough that the header row isn't needed. */
@media (max-width: 40rem) {
  .scopes,
  .scopes thead,
  .scopes tbody,
  .scopes tr,
  .scopes th,
  .scopes td {
    display: block;
    width: auto;
  }

  .scopes thead { display: none; }

  .scopes tr {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .scopes td {
    border: 0;
    padding: 0 0 0.4rem;
  }

  .scopes td:first-child { font-weight: 600; }
  .scopes td:nth-child(2) { color: var(--fg-muted); }
  .scopes td:last-child { padding-bottom: 0; }
}

/* ---------- key/value facts ---------- */

.facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.facts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
  font-size: 0.95rem;
}

.facts .k {
  flex: 0 0 11rem;
  color: var(--fg-muted);
}

.facts .v { flex: 1 1 14rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.site-footer .wrap {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.site-footer p { margin: 0 0 0.5rem; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--accent); }

.disclaimer {
  color: var(--fg-faint);
  font-size: 0.8rem;
  margin-top: 1rem;
}

@media (max-width: 34rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  main { padding-top: 2.25rem; }
  .facts .k { flex-basis: 100%; font-size: 0.8rem; }
}
