/* Solarized Dark palette — shared by all cheatsheets and the landing page.
   Page-specific rules live in each page's residual inline <style> block. */
:root {
  --base03:  #002b36; --base02: #073642; --base01: #586e75; --base00: #657b83;
  --base0:   #839496; --base1:  #93a1a1; --base2:  #eee8d5; --base3:  #fdf6e3;
  --yellow:  #b58900; --orange: #cb4b16; --red:    #dc322f; --magenta: #d33682;
  --violet:  #6c71c4; --blue:   #268bd2; --cyan:   #2aa198; --green:  #859900;
  --mono: "JetBrainsMono Nerd Font", "JetBrainsMono", "Menlo", "Consolas", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--base03); color: var(--base1); font-family: var(--sans);
  line-height: 1.55; font-size: 14.5px; padding: 0 clamp(1rem, 4vw, 3rem) 4rem;
  overflow-x: hidden; }
/* Plain header (used on the index page) */
header { border-bottom: 1px solid var(--base02); padding: 2.2rem 0 1.2rem; margin-bottom: 1.6rem; }
header h1 { margin: 0 0 .35rem; font-size: 1.8rem; color: var(--base3); font-weight: 600; letter-spacing: -.01em; }
header .sub { color: var(--base0); font-size: .95rem; }
header .sub code { color: var(--cyan); }

/* ─── Hero band ───────────────────────────────────────────────────────────────────
   Used on the three cheatsheet pages. Image is full-bleed (breaks the body
   padding via 100vw), masked to fade into the page background on all four
   edges. The page title overlays the upper-left on a soft vignette. */
.hero-band { position: relative; width: 100vw; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw; margin-bottom: 1.6rem;
  padding: 0; overflow: hidden;
  background: var(--base03);
  isolation: isolate; }
.hero-band .hero-img { position: absolute; inset: 0; z-index: 0; display: block; }
.hero-band .hero-img img { width: 100%; height: 100%; object-fit: cover;
  object-position: center top; display: block;
  /* Fade out toward bottom AND sides so the screenshot dissolves into the page */
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 38%, rgba(0,0,0,.55) 72%, transparent 100%),
    linear-gradient(to right,  transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, #000 0%, #000 38%, rgba(0,0,0,.55) 72%, transparent 100%),
    linear-gradient(to right,  transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-composite: intersect; }
/* Vignette behind the title for legibility, scoped to upper-left */
.hero-band::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(0,43,54,.85), rgba(0,43,54,0) 70%),
    linear-gradient(to bottom, rgba(0,43,54,.55) 0%, rgba(0,43,54,0) 40%); }
.hero-band .hero-inner { position: relative; z-index: 2;
  padding: 2.4rem clamp(1rem, 4vw, 3rem) 11rem;
  min-height: clamp(360px, 38vw, 560px);
  display: flex; flex-direction: column; justify-content: flex-start; }
.hero-band h1 { margin: 0 0 .55rem; font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: var(--base3); font-weight: 600; letter-spacing: -.015em;
  text-shadow: 0 1px 22px rgba(0,21,28,.85), 0 1px 2px rgba(0,21,28,.9); }
.hero-band h1 .accent { color: var(--blue); font-weight: 400; }
.hero-band .sub { color: var(--yellow); font-size: .98rem; max-width: 70ch;
  text-shadow: 0 1px 14px rgba(0,21,28,.95), 0 1px 2px rgba(0,21,28,.9); }
.hero-band .sub code { color: var(--cyan); background: rgba(7,54,66,.7); }
.hero-band .sub .warn { color: var(--orange); }
/* Variant: zoom on the middle of the screenshot (used on the tmux page so
   the hand-rolled status bar / pane content is the focal point) */
.hero-band--zoom-bottom .hero-img img { object-position: center center;
  transform: scale(1.6); transform-origin: center center; }
/* "view full screenshot" affordance, anchored bottom-right of the band */
.hero-band .hero-cta { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: 1.4rem;
  z-index: 2; font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--base1); background: rgba(0,43,54,.7); border: 1px solid #0a4655;
  padding: .35em .7em; border-radius: 3px; text-decoration: none;
  backdrop-filter: blur(2px); }
.hero-band .hero-cta:hover { color: var(--cyan); border-color: var(--cyan); text-decoration: none; }
.hero-band .hero-cta::before { content: "↗ "; color: var(--blue); }
.hero-band .hero-cta:hover::before { color: var(--cyan); }
nav.toc { margin: 1rem 0 1.6rem; padding: .65rem .9rem; background: var(--base02); border-radius: 6px; font-size: .9rem; color: var(--base0); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--cyan); text-decoration: underline; }
a code { color: var(--blue); }
a:hover code { color: var(--cyan); }
nav.toc a { margin-right: 1.1rem; white-space: nowrap; }
h2 { color: var(--base2); border-left: 3px solid var(--blue); padding-left: .6rem; margin: 2.2rem 0 .9rem; font-size: 1.25rem; font-weight: 600; }
h2 .accent { color: var(--blue); font-weight: 400; font-size: .85em; margin-left: .4rem; }
h3 { color: var(--base2); margin: 1.4rem 0 .55rem; font-size: 1.02rem; font-weight: 600; }
p { margin: .55rem 0; }
code, kbd, .k { font-family: var(--mono); font-size: .88em; }
code { background: var(--base02); color: var(--cyan); padding: .08em .35em; border-radius: 3px; }
kbd, .k { display: inline-block; background: var(--base02); color: var(--yellow); border: 1px solid #0a4655;
  border-bottom-width: 2px; border-radius: 4px; padding: .05em .42em; font-size: .82em; line-height: 1.4; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1rem; }
.card { background: var(--base02); border: 1px solid #0a4655; border-radius: 8px; padding: .9rem 1rem 1rem; display: flex; flex-direction: column; color: inherit; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease; }
.card > .shot { margin-top: auto; }
.card:hover { text-decoration: none;
  transform: translateY(-3px);
  background: #0a3a47;
  box-shadow: 0 8px 22px rgba(0,21,28,.55), 0 0 0 1px rgba(38,139,210,.18); }
.card:hover h3 { color: var(--base3); }
.card h3 { margin-top: 0; color: var(--base2); border-bottom: 1px dashed #0a4655; padding-bottom: .35rem; }
.card h3 .pill { background: var(--base03); color: var(--blue); font-size: .68em; font-weight: 500;
  padding: .15em .5em; border-radius: 3px; margin-left: .5em; vertical-align: middle; letter-spacing: .03em; }
.shot { display: block; line-height: 0; border-radius: 6px; overflow: hidden; margin-bottom: .8rem; }
.shot img { width: 100%; height: auto; display: block; }
table { width: 100%; border-collapse: collapse; margin: .25rem 0; }
td { padding: .25rem .35rem; vertical-align: top; border-bottom: 1px solid #073642; }
tr:last-child td { border-bottom: 0; }
td.key { width: 38%; white-space: nowrap; }
td.desc { color: var(--base1); }
.muted { color: var(--base0); }
.note { color: var(--base0); font-size: .88em; font-style: italic; }
.warn { color: var(--orange); }
ul.compact { margin: .35rem 0 .25rem; padding-left: 1.2rem; }
ul.compact li { margin: .15rem 0; }
pre { background: var(--base02); border: 1px solid #0a4655; border-radius: 6px; padding: .7rem .9rem;
  overflow-x: auto; color: var(--base1); font-family: var(--mono); font-size: .85em; line-height: 1.5; }
pre .c   { color: var(--base01); font-style: italic; }
pre .cmd { color: var(--green); }
pre .arg { color: var(--yellow); }
pre .kw  { color: var(--blue); }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--base02); color: var(--base01); font-size: .85em; }
@media print {
  body { background: white; color: #222; padding: 1rem; font-size: 11px; }
  .card { background: #fafafa; border-color: #ccc; break-inside: avoid; }
  h2 { color: #111; border-color: #888; } h3, header h1 { color: #111; }
  kbd, .k { background: #eee; color: #b58900; border-color: #bbb; }
  code { background: #f3f3f3; color: #2aa198; }
  nav.toc { display: none; } a { color: #268bd2 !important; }
  pre { background: #f6f6f6; color: #222; }
  .shot, .hero-band { display: none; }
}
