/* 9to5investing.com: shared styles. Plain CSS, no build step. */

:root {
  --red: #E52534;
  --red-dark: #C11D2B;
  --ink: #0B0B0D;
  --ink-2: #141418;
  --white: #FFFFFF;
  --text: #DCDCE2;
  --text-muted: #B4B4BE;
  --line: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --wrap: 1120px;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--gutter); top: 12px; z-index: 10; background: var(--white); color: var(--ink); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand img { width: 112px; }
.header-link { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.header-link:hover { color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  width: 100%; min-height: 56px; padding: 0 28px;
  border-radius: 999px; font-size: 1.125rem; font-weight: 700; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 1em; height: 1em; flex: none; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: #E8E8EE; }
.text-link { font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.eyebrow .dot { color: var(--red); padding: 0 0.3em; }
h1 { margin: 0 0 18px; font-size: clamp(2.25rem, 7vw, 3.75rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.accent { color: var(--red); }
.lede { margin: 0 0 28px; max-width: 34em; font-size: 1.1875rem; color: var(--text); }

/* ---------- Video card ---------- */
.video-card {
  display: block; overflow: hidden; text-decoration: none;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.video-card:hover { border-color: var(--red); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.video-card:hover .thumb img { transform: scale(1.03); }
.play {
  position: absolute; inset: 0; margin: auto; display: grid; place-items: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--red); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.play svg { width: 26px; height: 26px; margin-left: 4px; fill: var(--white); }
.video-body { display: block; padding: 16px 20px 20px; }
.video-label { display: block; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.video-title { display: block; font-size: 1.1875rem; font-weight: 700; line-height: 1.35; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { margin: 0 0 12px; font-size: clamp(1.625rem, 4vw, 2.25rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
.section-intro { margin: 0 0 32px; max-width: 40em; color: var(--text-muted); }

.topic-grid { display: grid; gap: 16px; }
.topic { padding: 24px; background: var(--ink-2); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); }
.topic h3 { margin: 0 0 8px; font-size: 1.25rem; }
.topic p { margin: 0; color: var(--text); }

.show-work p { margin: 0 0 14px; max-width: 36em; font-size: 1.125rem; color: var(--text); }
.show-work p:last-child { margin-bottom: 0; }

/* ---------- Email signup (hidden until a provider is set up) ---------- */
.signup-box { padding: 28px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Closing call to action ---------- */
.cta-band { padding: 56px 0; text-align: center; background: var(--red); }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0 auto 24px; max-width: 30em; font-size: 1.125rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 40px; font-size: 0.9rem; color: var(--text-muted); }
.site-footer p { margin: 0 0 8px; max-width: 50em; }
.site-footer a { color: var(--white); text-underline-offset: 3px; }

/* ---------- Text pages (disclaimer, 404, companion pages) ---------- */
.prose { max-width: 46em; padding-top: 48px; padding-bottom: 64px; }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); }
.prose h2 { margin-top: 44px; font-size: 1.5rem; }
.prose p, .prose li { color: var(--text); }
.prose a:not(.btn):not(.video-card) { color: var(--white); text-decoration-color: var(--red); text-underline-offset: 3px; }
.meta { margin: 0 0 28px; font-size: 0.95rem; color: var(--text-muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 28px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.975rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); background: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.steps li { margin-bottom: 10px; }
.sources li { margin-bottom: 10px; }
.sources .note { display: block; font-size: 0.925rem; color: var(--text-muted); }
.callout { padding: 16px 20px; background: var(--ink-2); border-left: 3px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 520px) {
  .btn { width: auto; }
}
@media (min-width: 760px) {
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .hero { padding: 80px 0 88px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .brand img { width: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
