/*
 * Ariyes Connect public pages. System fonts only; no external resources.
 * Contrast (WCAG 2.2 AA needs 4.5:1 for text; computed with the WCAG relative-luminance formula):
 *   light: text #1a1c1e on #ffffff 17.09:1; muted #4f555c 7.54:1; links #1d3b8b 10.24:1
 *          (on the #f4f6f8 surface: text 15.78:1, links 9.45:1)
 *   dark:  text #e8eaed on #121417 15.31:1; muted #b6bcc4 9.65:1; links #9db8ff 9.43:1
 *          (on the #1b1e22 surface: text 13.88:1)
 *   draft banner: #ffffff on #8f1d1d 8.89:1
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1a1c1e;
  --muted: #4f555c;
  --link: #1d3b8b;
  --border: #d5d9de;
  --surface: #f4f6f8;
  --focus: #1d3b8b;
  --banner-bg: #8f1d1d;
  --banner-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --text: #e8eaed;
    --muted: #b6bcc4;
    --link: #9db8ff;
    --border: #3a3f46;
    --surface: #1b1e22;
    --focus: #9db8ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    'Noto Sans',
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

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

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

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
}

.draft-banner {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--banner-bg);
  color: var(--banner-text);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

.site-header,
.content,
.site-footer {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.content {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

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

h1 {
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.75rem;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.25rem;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

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

th {
  background: var(--surface);
}

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

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a[aria-current='page'] {
  font-weight: 700;
  text-decoration: none;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.625rem;
  }
}
