/* Tangents site: the one stylesheet (SPEC §5). */

/* Colors from the app's color sets (SPEC §5.1). Contrast is checked there. */
:root {
  --background: #FFFFFF;
  --surface: #F2F2F7;
  --text: #1C1C1E;
  --secondary: #5C5C63;
  --accent: #0A6C7D;
  --warning: #B04A00;
  --rule: #E2E2E6;
  --course-teal: #0B5466;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --surface: #1C1C1E;
    --text: #F2F2F7;
    --secondary: #AEAEB5;
    --accent: #1F9DB0;
    --warning: #FFA64D;
    --rule: #2C2C30;
  }
}

/* Type and page (SPEC §5.2) */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  /* 17px at the default text size; rem so the browser's text size setting works */
  font: 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.5rem;
}

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

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

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

img {
  max-width: 100%;
  height: auto;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* Skip link: hidden until it has focus */
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--background);
}

.skip:focus {
  top: 0.5rem;
}

/* Header and footer */
.site-header,
.site-footer,
.column {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-header a {
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  color: var(--text);
  font-weight: 700;
}

.brand img,
.hero img {
  border-radius: 22.37%;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--secondary);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--secondary);
}

/* Content column */
.column {
  padding-top: 1.5rem;
}

/* Home hero: CourseTeal in both modes, full width (SPEC §5.1) */
.hero {
  background: var(--course-teal);
  color: #FFFFFF;
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-top: 1rem;
}

.hero p {
  margin: 0.25rem 0;
}

.hero .tagline {
  font-size: 1.25rem;
}

.hero .intro {
  max-width: 34rem;
  margin: 1rem auto 0;
}

.hero .soon {
  color: rgb(255 255 255 / 80%);
  margin-top: 1.5rem;
}

.hero a {
  color: #FFFFFF;
}

/* The line under a page's title (Support, Privacy Policy) */
.updated {
  margin-top: 0;
  color: var(--secondary);
}

/* Guide pages (SPEC §4.3) */
.crumb {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.app-path {
  margin-top: 0;
  color: var(--secondary);
}

/* The guide index: each page a card on the surface color */
.guide-list {
  list-style: none;
  padding: 0;
}

.guide-list li {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: 0.75rem;
  color: var(--secondary);
}

.guide-list a {
  font-weight: 700;
}

/* Screenshots (SPEC §7.1) */
figure {
  margin: 1.5rem 0;
  text-align: center;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.prev-next a[rel="next"] {
  margin-left: auto;
  text-align: right;
}

/* The app's own caveats */
.warning {
  color: var(--warning);
}
