/* Shared styles for the OpenWith content pages (OS pages, guides, alternatives).
   The landing page (index.html) keeps its own inline styles; keep the colors,
   header, and footer here in step with it. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-elevated: #1a1a1a;
  --text-primary: #fafafa;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #262626;

  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --max-width: 64rem;
  --content-width: 44rem;
  --border-radius: 8px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f5;
    --bg-elevated: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-muted: #8a8a8a;
    --border: #e5e5e5;
  }
}

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header (same as the landing page) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  font-weight: 600;
}

.site-brand:hover { color: var(--text-primary); text-decoration: none; }

.site-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
}

.site-nav-links a { color: var(--text-secondary); }
.site-nav-links a:hover { color: var(--text-primary); text-decoration: none; }

.site-nav-links .site-nav-cta {
  color: #fff;
  background: var(--accent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius);
  font-weight: 500;
}

.site-nav-links .site-nav-cta:hover { color: #fff; background: var(--accent-hover); }

@media (max-width: 560px) {
  .site-nav-links { gap: var(--space-4); }
  .site-nav-links a:not(.site-nav-cta):not(.keep-mobile) { display: none; }
}

/* Page content */
.page {
  flex: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-16);
}

.breadcrumbs {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

.page .breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-left: 0; margin-bottom: 0; }
.page .breadcrumbs li { margin-bottom: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: var(--space-2); }
.breadcrumbs a { color: var(--text-secondary); }

.page h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.page .lead {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.page h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-12) 0 var(--space-4);
}

.page h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
}

.page p, .page ul, .page ol { color: var(--text-secondary); margin-bottom: var(--space-4); }
.page ul, .page ol { padding-left: 1.5rem; }
.page li { margin-bottom: var(--space-2); }
.page strong { color: var(--text-primary); font-weight: 600; }

.page code {
  font-family: "SF Mono", "Fira Code", Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  word-break: break-all;
}

.page pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}

.page pre code { border: 0; padding: 0; background: none; word-break: normal; }

.page figure { margin: var(--space-8) 0; }

.page figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.page figcaption { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-2); text-align: center; }

/* Tables (alternatives page) */
.table-wrap { overflow-x: auto; margin-bottom: var(--space-6); }

.page table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.page th, .page td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.page th { color: var(--text-primary); font-weight: 600; }
.page td.yes { color: var(--text-primary); }

/* Download box */
.download-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-8);
  margin: var(--space-12) 0;
  text-align: center;
}

.download-box h2 { margin-top: 0; }
.download-box p { margin-bottom: var(--space-6); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--border-radius);
  font-size: var(--text-base);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover { color: #fff; text-decoration: none; box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4); }

.download-box .other-platforms {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.download-box .other-platforms a { color: var(--text-secondary); }

/* Related pages */
.related { border-top: 1px solid var(--border); margin-top: var(--space-12); padding-top: var(--space-6); }
.related h2 { margin-top: 0; font-size: var(--text-lg); }
.related ul { list-style: none; padding: 0; }

/* Guide list (guides index) */
.card-list { list-style: none; padding: 0; display: grid; gap: var(--space-4); }

.card-list a {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: var(--space-4) var(--space-6);
  color: var(--text-primary);
  font-weight: 600;
}

.card-list a:hover { border-color: var(--accent); text-decoration: none; }
.card-list a span { display: block; font-weight: 400; color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--space-1); }

/* Footer (same as the landing page) */
footer { border-top: 1px solid var(--border); background: var(--bg-secondary); }

.footer-sitemap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  font-size: var(--text-sm);
}

@media (max-width: 720px) { .footer-sitemap { grid-template-columns: repeat(2, 1fr); } }

.footer-sitemap h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.footer-sitemap ul { list-style: none; padding: 0; }
.footer-sitemap li { margin-bottom: var(--space-2); }
.footer-sitemap a { color: var(--text-muted); }
.footer-sitemap a:hover { color: var(--text-primary); text-decoration: none; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--text-primary); font-weight: 600; }
.footer-brand img { opacity: 0.8; }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text-primary); text-decoration: none; }
