/* Wyzer website: one stylesheet for every page. Colours follow the app (apps/mobile). */

:root {
  --bg: #f7f6f4;
  --surface: #ffffff;
  --text: #20201f;
  --muted: #5f5d5a;
  --border: #e6e2dd;
  --accent: #5829c7;
  --accent-soft: #eee8ff;
  --header-bg: linear-gradient(114.8deg, #42484b 0%, #383b3d 36.754%, #303538 70.68%);
  --mark-bg: linear-gradient(135deg, #6337d8 0%, #5128c9 32.527%, #4322b3 70.711%);
  --todo-bg: #fff1b8;
  --todo-text: #5c4600;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1f21;
    --surface: #26292b;
    --text: #eceae7;
    --muted: #a9a6a2;
    --border: #3a3e41;
    --accent: #b9a2ff;
    --accent-soft: #2f2648;
    --todo-bg: #4a3d00;
    --todo-text: #ffe58a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1d1f21;
  --surface: #26292b;
  --text: #eceae7;
  --muted: #a9a6a2;
  --border: #3a3e41;
  --accent: #b9a2ff;
  --accent-soft: #2f2648;
  --todo-bg: #4a3d00;
  --todo-text: #ffe58a;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  background: var(--header-bg);
  color: #fff;
}

.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  margin-right: auto;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mark-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mark svg {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: flex;
  gap: 4px 16px;
  flex-wrap: wrap;
  font-size: 15px;
}

.site-nav a {
  color: #eee8ff;
  text-decoration: none;
  padding: 6px 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
}

/* Content */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

h1 {
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 8px;
  scroll-margin-top: 16px;
}

h3 {
  font-size: 18px;
  margin: 24px 0 4px;
}

p,
ul,
ol {
  margin: 0 0 14px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

.updated {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
}

.callout {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 6px;
  margin: 24px 0;
  font-size: 16px;
}

.toc h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

/* Text still to be filled in before launch. Deliberately loud. */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* Home page */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

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

.card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--accent);
}

.card span {
  color: var(--muted);
  font-size: 15px;
}

/* Release notes */

.releases {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.release {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.release summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  border-radius: 14px;
}

.release summary::-webkit-details-marker {
  display: none;
}

/* Chevron: points right when closed, down when open. */
.release summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  align-self: center;
}

.release[open] summary::before {
  transform: translateY(-4px) rotate(45deg);
}

.release summary:hover .release-version {
  color: var(--accent);
}

.release-version {
  font-weight: 700;
  font-size: 18px;
}

.release-date {
  color: var(--muted);
  font-size: 15px;
}

.release-body {
  padding: 0 18px 4px;
  border-top: 1px solid var(--border);
}

.release-body h3 {
  font-size: 16px;
  margin: 16px 0 4px;
}

.release-body > p:first-child {
  margin-top: 14px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

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

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .toc {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
