/* DXChrono Desktop Help - colours from logo (aurora, dark blue, teal, white) */
:root {
  --content-max: 900px;
  --bg-dark: #0A2B42;
  --bg-mid: #1A476D;
  --bg-panel: #0f3a52;
  --aurora-green: #00C29E;
  --aurora-teal: #009688;
  --aurora-lime: #00A896;
  --accent-outline: #69B3D3;
  --text-white: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.85);
  --text-dim: rgba(255, 255, 255, 0.7);
  --border-subtle: rgba(0, 0, 0, 0.25);
  --link: #00C29E;
  --link-hover: #69B3D3;
}

* {
  box-sizing: border-box;
}

/* WCAG: Skip link – visible on focus for keyboard/screen reader users */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--aurora-teal);
  color: var(--bg-dark);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  z-index: 100;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 3px solid var(--text-white);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  min-height: 100vh;
}

/* Top banner with aurora feel */
.help-header {
  background: linear-gradient(135deg, var(--bg-mid) 0%, var(--bg-dark) 50%, var(--bg-mid) 100%);
  border-bottom: 2px solid var(--aurora-teal);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  padding-left: max(2rem, calc((100vw - var(--content-max)) / 2));
  padding-right: max(2rem, calc((100vw - var(--content-max)) / 2));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.help-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg,
    rgba(0, 194, 158, 0.12) 0%,
    rgba(0, 150, 136, 0.06) 50%,
    transparent 100%);
  pointer-events: none;
}

.help-header-logo {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
}

.help-header-text {
  position: relative;
}

.help-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  position: relative;
}

.help-header p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
}

/* Nav */
.help-nav {
  background: var(--bg-panel);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  padding-left: max(2rem, calc((100vw - var(--content-max)) / 2));
  padding-right: max(2rem, calc((100vw - var(--content-max)) / 2));
  border-bottom: 1px solid var(--border-subtle);
}

.help-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.help-nav a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.help-nav a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.help-nav a.active {
  color: var(--aurora-lime);
  font-weight: 600;
}

.help-nav a:focus-visible,
.help-main a:focus-visible {
  outline: 3px solid var(--accent-outline);
  outline-offset: 2px;
}

/* Main content */
.help-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem;
}

.help-main h2 {
  color: var(--aurora-teal);
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 150, 136, 0.4);
}

.help-main h2:first-child {
  margin-top: 0;
}

.help-main h3 {
  color: var(--accent-outline);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.help-main h4 {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.help-main p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.help-main a {
  color: var(--link);
  text-decoration: none;
}

.help-main a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Keyboard shortcuts */
kbd {
  display: inline-block;
  padding: 0.2em 0.5em;
  font-family: inherit;
  font-size: 0.9em;
  background: var(--bg-panel);
  border: 1px solid var(--accent-outline);
  border-radius: 4px;
  color: var(--text-white);
  box-shadow: 0 1px 0 var(--border-subtle);
}

kbd:focus-visible {
  outline: 2px solid var(--accent-outline);
  outline-offset: 2px;
}

/* Tables */
.help-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--bg-panel);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.help-main th,
.help-main td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.help-main th {
  background: rgba(0, 150, 136, 0.2);
  color: var(--aurora-teal);
  font-weight: 600;
}

.help-main tr:last-child td {
  border-bottom: none;
}

.help-main tr:hover td {
  background: rgba(105, 179, 211, 0.08);
}

/* Lists */
.help-main ul, .help-main ol {
  color: var(--text-muted);
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.help-main li {
  margin-bottom: 0.35rem;
}

/* Cards / sections */
.help-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1rem 0;
}

.help-card h3 {
  margin-top: 0;
}

/* Footer */
.help-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--link);
}

/* Figures and screenshots */
.help-main figure {
  margin: 1.5rem 0;
}

.help-main figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.help-main figcaption {
  margin-top: 0.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Screenshot placeholder (when no image yet) */
.screenshot-placeholder {
  background: var(--bg-panel);
  border: 2px dashed var(--accent-outline);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  margin: 1rem 0;
}

.screenshot-placeholder strong {
  color: var(--aurora-teal);
}
