/*
 * Shared styles for the plain static pages served beside the app
 * (about.html, whats-new.html). They load without Angular or styles.css, so
 * the colours are defined here as tokens - once per theme, as styles.css does -
 * and the rules below use only the tokens.
 *
 * Theme: the device's preference, unless the planner's own theme switch
 * stored a choice; the inline script in each page copies that onto
 * <html data-theme>, which wins either way.
 */
:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --surface-bg: #ffffff;
  --text-color: #1e293b;
  --muted-text-color: #64748b;
  --border-color: #e2e8f0;
  /* The enlarged screenshot's backdrop: dark in both themes, as the screenshots are. */
  --lightbox-bg: #020617;
  --lightbox-text-color: #e2e8f0;
  --link-color: #2563eb;
  --accent-bg: #2563eb;
  --on-accent-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page-bg: #0f172a;
    --surface-bg: #1e293b;
    --text-color: #e2e8f0;
    --muted-text-color: #94a3b8;
    --border-color: #334155;
    --link-color: #93c5fd;
    --accent-bg: #3b82f6;
    --on-accent-color: #ffffff;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0f172a;
  --surface-bg: #1e293b;
  --text-color: #e2e8f0;
  --muted-text-color: #94a3b8;
  --border-color: #334155;
  --link-color: #93c5fd;
  --accent-bg: #3b82f6;
  --on-accent-color: #ffffff;
}

body {
  background: var(--page-bg);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 760px;
  padding: 32px 16px 48px;
}

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

.site-nav {
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
}

.site-nav-brand {
  align-items: center;
  color: var(--text-color);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  margin-right: auto;
  text-decoration: none;
}

.site-nav-brand img {
  height: 28px;
  width: 28px;
}

h1 {
  font-size: 1.9em;
  line-height: 1.2;
  margin: 0 0 0.3em;
}

h2 {
  border-bottom: 1px solid var(--border-color);
  font-size: 1.25em;
  margin-top: 1.8em;
  padding-bottom: 0.3em;
}

h3 {
  font-size: 1.05em;
  margin: 1.4em 0 0.3em;
}

.lede {
  font-size: 1.1em;
}

.muted,
.updated {
  color: var(--muted-text-color);
  font-size: 0.92em;
}

.cta {
  background: var(--accent-bg);
  border-radius: 6px;
  color: var(--on-accent-color);
  display: inline-block;
  font-weight: 600;
  padding: 8px 16px;
  text-decoration: none;
}

.feature {
  margin-bottom: 1em;
}

figure {
  margin: 1.2em 0;
}

figure img {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: zoom-in;
  display: block;
  height: auto;
  max-width: 100%;
}

/* A phone screenshot: at full column width it would be taller than the screen. */
figure.phone img {
  max-width: min(100%, 300px);
}

/* A screenshot enlarged over the page (about.html's script); any click or Esc closes it. */
.lightbox {
  background: var(--lightbox-bg);
  border: 0;
  box-sizing: border-box;
  color: var(--lightbox-text-color);
  cursor: zoom-out;
  height: 100%;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 48px 16px 16px;
  position: fixed;
  width: 100%;
}

.lightbox[open] {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox img {
  border-radius: 6px;
  max-height: calc(100% - 3em);
  max-width: 100%;
  object-fit: contain;
}

.lightbox-caption {
  font-size: 0.95em;
  margin: 0;
  text-align: center;
}

.lightbox-close {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 4px 10px;
  position: absolute;
  right: 8px;
  top: 4px;
}

html:has(.lightbox[open]) {
  overflow: hidden;
}

figcaption {
  color: var(--muted-text-color);
  font-size: 0.9em;
  margin-top: 6px;
}

.release {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1.2em 0;
  padding: 4px 16px 8px;
}

.release h2 {
  border-bottom: 0;
  margin-top: 0.6em;
}

.release ul {
  padding-left: 1.2em;
}

.release li {
  margin-bottom: 0.4em;
}

footer {
  border-top: 1px solid var(--border-color);
  color: var(--muted-text-color);
  font-size: 0.9em;
  margin-top: 3em;
  padding-top: 1em;
}
