/* Shared styles for the Snaglite user manual pages. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --link: #0969da;
  --border: #d0d7de;
  --panel: #f6f8fa;
  --warn: #9a6700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --text: #e6edf3;
    --muted: #9da7b3;
    --link: #58a6ff;
    --border: #30363d;
    --panel: #161b22;
    --warn: #d29922;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.container.wide {
  max-width: 1100px;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.35rem;
  margin-top: 40px;
}

h3 {
  font-size: 1.05rem;
  margin-top: 0;
}

p {
  margin: 0 0 16px;
}

ul, ol {
  margin: 0 0 16px 24px;
  padding: 0;
}

li {
  margin: 0 0 8px;
}

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

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* Breadcrumb trail back to the homepage and manual. */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-weight: 600;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs span {
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: none;
  font-weight: 600;
}

.intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 760px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0 32px;
}

.panel > :last-child {
  margin-bottom: 0;
}

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

.callout {
  border-left: 4px solid var(--link);
  padding: 12px 14px;
  margin: 16px 0;
  background: var(--panel);
  border-radius: 8px;
}

.callout.warning {
  border-left-color: var(--warn);
}

.callout > :last-child {
  margin-bottom: 0;
}

.example {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0 24px;
}

.example-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 0.97rem;
}

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

th {
  background: var(--panel);
  font-weight: 600;
}

/* Two-column text and screenshot layout. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
  margin: 8px 0 24px;
}

.split > div > :last-child {
  margin-bottom: 0;
}

/* Screenshot thumbnails open the full image when tapped. */
.shot {
  margin: 0;
  text-align: center;
}

.shot a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}

.shot.page img {
  border-radius: 6px;
  max-width: 100%;
}

/* Device screenshots already carry an Apple device frame (made with frames-cli), so they
   drop the plain border and get a soft shadow that follows the frame's outline.
   Report pages and exported images (.page, .plain without a device) keep the border. */
.shot:not(.page):not(.plain) a,
.shot.ipad a,
.duo-pair .shot a {
  max-width: 260px;
  margin: 0 auto;
}

.shot:not(.page):not(.plain) img,
.shot.ipad img,
.duo-pair .shot img {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
}

.tip-card .shot:not(.page):not(.plain) a {
  max-width: 220px;
}

.shot a:hover img {
  transform: scale(1.02);
}

.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.shots-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

.shots-row .shot {
  width: 180px;
  flex: 0 0 180px;
}

.shots-row.pages .shot {
  width: 260px;
  flex: 0 0 260px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tip-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.tip-card .shot img {
  max-width: 220px;
}

.tip-card .shot {
  margin-top: 12px;
}

.next-link {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.new-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--link);
  color: var(--link);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* Home page. */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
}

.hero-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.brand-card {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.brand-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.store-link {
  margin: 20px 0 28px;
}

.store-link a {
  display: inline-block;
  text-decoration: none;
}

.store-link img {
  display: block;
  height: 54px;
  width: auto;
  border-radius: 12px;
}

.store-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.contents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.contents a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.contents a span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.contents a:hover {
  border-color: var(--link);
  color: var(--link);
}

.footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }

  .tips-grid,
  .contents {
    grid-template-columns: 1fr;
  }

  .shots-row .shot {
    width: 150px;
    flex-basis: 150px;
  }

  table {
    display: block;
    overflow-x: auto;
    font-size: 0.9rem;
  }

  th, td {
    padding: 8px;
  }
}

@media (max-width: 700px) {
  .hero {
    flex-direction: column;
  }

  .brand-card {
    width: 96px;
    height: 96px;
  }

  h1 {
    font-size: 1.8rem;
  }
}

/* iPad screenshots: landscape, in a slim tablet bezel without a Dynamic Island. */
.shot.ipad {
  margin: 8px 0 28px;
}

.shot.ipad a,
.shot.ipad img {
  max-width: 760px;
}

/* iPhone Duo: folded (outer screen) beside unfolded (inner screen). */
.duo-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  margin: 8px 0 28px;
}

.duo-pair .shot {
  margin: 0;
}

.duo-pair .duo-folded {
  flex: 0 0 30%;
}

.duo-pair .duo-open {
  flex: 0 1 62%;
}

.duo-pair .shot a,
.duo-pair .shot img {
  max-width: 100%;
}

@media (max-width: 800px) {
  .duo-pair {
    gap: 12px;
  }
}
