/* Perfo Bot website. One file, system fonts, light and dark. */

:root {
  color-scheme: light dark;
  --bg: #fbfbf8;
  --surface: #f1f1ec;
  --text: #1b1b18;
  --muted: #4f4f49;
  --line: #d9d9d1;
  --accent: #1d5c47;
  --accent-text: #ffffff;
  --mark-bg: #ffe58a;
  --mark-text: #1b1b18;
  --note-bg: #fff4d6;
  --note-line: #b88a00;
  --focus: #1a5fb4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1f1f1d;
    --text: #ecebe6;
    --muted: #b7b6ae;
    --line: #3a3a36;
    --accent: #7ccfae;
    --accent-text: #0f2a20;
    --mark-bg: #5c4800;
    --mark-text: #fff3c4;
    --note-bg: #2b2412;
    --note-line: #d9a91f;
    --focus: #8ab4f8;
  }
}

*,
*::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, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

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

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

.brand img {
  width: 1.5rem;
  height: 1.5rem;
}

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

/* Content */

main {
  padding: 2.5rem 0 3rem;
}

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

h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
}

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

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

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

li {
  margin-bottom: 0.4rem;
}

dt {
  font-weight: 700;
  margin-top: 1rem;
}

dd {
  margin: 0.25rem 0 0;
}

.lead {
  font-size: 1.2rem;
  color: var(--text);
}

.muted,
.updated {
  color: var(--muted);
}

.updated {
  font-size: 0.95rem;
}

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-line);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.panel h2 {
  margin-top: 0.25rem;
}

.points {
  list-style: none;
  padding: 0;
}

.points li {
  border-top: 1px solid var(--line);
  padding: 1rem 0 0.5rem;
  margin: 0;
}

.points h3 {
  margin: 0 0 0.35rem;
}

.points p {
  margin: 0 0 0.5rem;
}

/* Placeholders still to be decided: easy to spot on review. */
mark.ph {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0 0.2em;
  border-radius: 3px;
  font-weight: 600;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.95rem;
}

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

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

.site-footer li {
  margin: 0;
}

.site-footer a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

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

/* Last in the file: boxes have no trailing gap. */
.note > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}

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

  main {
    padding-top: 1.75rem;
  }
}
