/* Pederson Business Solutions: one stylesheet for the whole site. */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f5;
  --surface: #ffffff;
  --text: #1a1f1d;
  --text-muted: #4b5551;
  --border: #d6dcd9;
  --accent: #146c4c;
  --accent-hover: #0f553b;
  --accent-text: #ffffff;
  --link: #0e6143;
  --code-bg: #eef1f0;
  --mark: #a86414;
  --focus: #146c4c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614;
    --bg-soft: #18201d;
    --surface: #1b2420;
    --text: #e6ebe8;
    --text-muted: #a9b4af;
    --border: #2f3b36;
    --accent: #5cc59a;
    --accent-hover: #7ed4b0;
    --accent-text: #0b1a13;
    --link: #74d1a8;
    --code-bg: #222c28;
    --mark: #e2a65e;
    --focus: #7ed4b0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111614;
  --bg-soft: #18201d;
  --surface: #1b2420;
  --text: #e6ebe8;
  --text-muted: #a9b4af;
  --border: #2f3b36;
  --accent: #5cc59a;
  --accent-hover: #7ed4b0;
  --accent-text: #0b1a13;
  --link: #74d1a8;
  --code-bg: #222c28;
  --mark: #e2a65e;
  --focus: #7ed4b0;
  color-scheme: dark;
}

*,
*::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: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

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

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

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

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

.narrow {
  max-width: 46rem;
}

/* Header */

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

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

.brand {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

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

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  display: inline-block;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.theme-toggle {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  min-height: 2.25rem;
}

.theme-toggle:hover {
  border-color: var(--text-muted);
}

/* Main content */

main {
  padding: 2rem 0 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

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

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.1875rem;
}

p,
ul,
ol,
table,
pre,
figure {
  margin: 0 0 1rem;
}

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

.lead {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 44rem;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.9375rem;
}

code,
kbd,
pre {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

code,
kbd {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  line-height: 1.45;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.96875rem;
}

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

th {
  background: var(--bg-soft);
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.price {
  font-weight: 600;
}

/* Cards and grids */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.product-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: start;
  margin: 1.5rem 0;
}

.product-card h2 {
  margin-top: 0;
}

.product-card .actions {
  margin-bottom: 0.5rem;
}

.product-card img {
  border-radius: 12px;
}

.points {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.points li {
  margin: 0;
}

.points h2,
.points h3 {
  margin-top: 0;
  font-size: 1.125rem;
}

.points p {
  margin: 0;
}

.hero {
  padding-bottom: 0.5rem;
}

.band {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem 1.25rem 0.75rem;
  margin: 2.5rem 0 1rem;
}

.band h2 {
  margin-top: 1rem;
}

/* Screenshots */

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

figure {
  margin: 0;
}

figure img {
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
}

figcaption {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.article-shot {
  margin: 1.5rem 0;
}

/* Table of contents */

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

/* Support address with copy button */

.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.email-line a {
  font-weight: 600;
}

.copy-btn {
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  min-height: 2rem;
}

.copy-btn:hover {
  border-color: var(--text-muted);
}

.note {
  border-left: 4px solid var(--mark);
  background: var(--bg-soft);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border-radius: 0 6px 6px 0;
}

.note p:last-child {
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
}

.related {
  padding-left: 1.25rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: 1.5rem 0;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

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

/* Wider screens */

@media (min-width: 40rem) {
  h1 {
    font-size: 2.375rem;
  }

  .points {
    grid-template-columns: repeat(3, 1fr);
  }

  .shots {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    grid-template-columns: 96px 1fr;
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

[hidden] {
  display: none !important;
}

.copy-status {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.spaced {
  margin-top: 1.5rem;
}

/* Long paths and commands in inline code must wrap on narrow screens. */
code {
  overflow-wrap: anywhere;
}

pre code {
  overflow-wrap: normal;
}

.product-card > div,
.points > li,
.shots > figure {
  min-width: 0;
}

/* Phone header: brand and theme toggle on the first line, navigation below. */
.site-nav {
  order: 3;
  flex-basis: 100%;
}

@media (min-width: 40rem) {
  .site-nav {
    order: 0;
    flex-basis: auto;
  }
}

/* Product card: icon above the text on phones, beside it on wider screens. */
.product-card {
  grid-template-columns: 1fr;
}

.product-card img {
  width: 64px;
  height: 64px;
}

@media (min-width: 40rem) {
  .product-card {
    grid-template-columns: 96px 1fr;
  }

  .product-card img {
    width: 96px;
    height: 96px;
  }
}
