/* PaneShift website.
   Layout: product pages are full-width bands with a centered 72rem column; docs pages are a
   sticky left index beside a 44rem reading column. Graphite and pane blue come from the app
   icon; "marked red" is Total Commander's selection color, used only for marked-file motifs. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sunken: #eceef2;
  --ink: #1d2027;
  --muted: #5b6272;
  --line: #d9dde4;
  --accent: #2c66d6;
  --accent-ink: #ffffff;
  --accent-soft: #e3ecfb;
  --marked: #d23b3b;
  --key-face: #ffffff;
  --key-edge: #c3c8d2;
  --code-bg: #eef0f4;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 10px;
  --wide: 72rem;
  --read: 44rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1014;
    --surface: #17191f;
    --sunken: #1d2027;
    --ink: #e6e8ed;
    --muted: #9aa1b0;
    --line: #2b2f38;
    --accent: #5b8ff2;
    --accent-ink: #0b1220;
    --accent-soft: #1a2640;
    --marked: #f06464;
    --key-face: #23262e;
    --key-edge: #3a3f4a;
    --code-bg: #1d2027;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1014;
  --surface: #17191f;
  --sunken: #1d2027;
  --ink: #e6e8ed;
  --muted: #9aa1b0;
  --line: #2b2f38;
  --accent: #5b8ff2;
  --accent-ink: #0b1220;
  --accent-soft: #1a2640;
  --marked: #f06464;
  --key-face: #23262e;
  --key-edge: #3a3f4a;
  --code-bg: #1d2027;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 0.4rem; }
p { margin: 0 0 1rem; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
.eyebrow {
  font: 600 0.78rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

/* Keycaps: the subject's own vocabulary. */
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  font-size: 0.82em;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  background: var(--key-face);
  border: 1px solid var(--key-edge);
  border-bottom-width: 2px;
  border-radius: 5px;
  white-space: nowrap;
}

/* Header */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding-block: 0.7rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font: 800 1.15rem/1 var(--font-display); }
.brand svg { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* Bands and columns */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.wrap { max-width: var(--wide); margin: 0 auto; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }

/* Buttons */
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:hover { text-decoration: none; filter: brightness(1.05); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .meta { font: 500 0.85rem/1.4 var(--font-mono); color: var(--muted); margin-top: 1.25rem; }

/* Screenshots sit in a plain macOS-like frame. */
.shot {
  margin: 2.5rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 60px -28px rgb(20 30 60 / 0.35);
}
.shot img { width: 100%; }
.shot.placeholder {
  aspect-ratio: 3 / 2;
  max-width: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 500 0.9rem var(--font-mono);
  background: repeating-linear-gradient(135deg, var(--sunken) 0 12px, var(--surface) 12px 24px);
}
figure { margin: 0; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; }

/* The function key bar: the hero's footer, like the bottom of a TC window. */
.fkeys {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}
.fkeys a {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.fkeys a:hover { border-color: var(--accent); }
.fkeys b { font: 700 0.8rem/1.2 var(--font-mono); color: var(--accent); }
.fkeys span { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .fkeys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Key translation table */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 0.75rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
/* Keys and codes stay on one line; sentences (error messages, feature lists) wrap. */
td:first-child:has(> kbd:first-child, > code:first-child) { white-space: nowrap; }
tbody tr:hover { background: var(--sunken); }

/* Feature rows */
.features { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); margin-top: 2.5rem; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-child(even) .text { order: 2; }
.feature .shot { margin: 0; }
.feature ul { padding-left: 1.1rem; margin: 0.5rem 0 0; color: var(--muted); }
.feature li { margin: 0.25rem 0; }
@media (max-width: 820px) {
  .feature, .feature:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-child(even) .text { order: 0; }
}

/* Grid of small items */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.75rem 2rem; margin-top: 2rem; }
.grid h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.grid p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Editions */
.editions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.edition { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; min-width: 0; }
.edition.recommended { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.edition h3 { margin-top: 0; }
.edition ul { padding-left: 1.1rem; margin: 0.75rem 0 0; }
.edition li { margin: 0.3rem 0; }
@media (max-width: 720px) { .editions { grid-template-columns: minmax(0, 1fr); } }
.tag { display: inline-block; font: 600 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.35em 0.6em; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* Marked-file motif in the switcher section */
.listing { font: 0.9rem/1.9 var(--font-mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; overflow-x: auto; }
.listing div { display: flex; justify-content: space-between; gap: 2rem; white-space: nowrap; }
.listing .m { color: var(--marked); font-weight: 600; }
.listing .c { background: var(--sunken); margin-inline: -1rem; padding-inline: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding-block: 2rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-footer .wrap { display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer .legal { flex-basis: 100%; margin: 0; font-size: 0.8rem; }

/* Docs */
.docs {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  padding-block: 2.5rem 4rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.docs-nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.5rem); align-self: start; max-height: calc(100vh - 6rem); overflow-y: auto; font-size: 0.93rem; }
.docs-nav p { font: 600 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1.4rem 0 0.5rem; }
.docs-nav p:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav a { display: block; padding: 0.28rem 0.6rem; margin-left: -0.6rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.docs-nav a:hover { background: var(--sunken); }
.docs-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.doc { max-width: var(--read); min-width: 0; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2.75rem; padding-top: 0.25rem; }
.doc h2 a.anchor, .doc h3 a.anchor { color: var(--line); text-decoration: none; margin-left: 0.4rem; font-weight: 400; }
.doc h2:hover a.anchor, .doc h3:hover a.anchor { color: var(--muted); }
.doc h2 .release-date { font-size: 0.95rem; font-weight: 400; color: var(--muted); margin-left: 0.5rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin: 0.3rem 0; }
.doc .lede { font-size: 1.1rem; }
.doc .shot { margin: 1.5rem 0; }
.note, .tc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  background: var(--surface);
  font-size: 0.95rem;
}
.note > :last-child, .tc > :last-child { margin-bottom: 0; }
.note strong:first-child, .tc strong:first-child { display: block; font: 600 0.75rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.tc { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.tc strong:first-child { color: var(--accent); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager a { text-decoration: none; display: flex; flex-direction: column; font-weight: 600; }
.pager a span { font: 500 0.75rem/1.4 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pager a.next { text-align: right; margin-left: auto; }
.toc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.toc-cards a { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.toc-cards a:hover { border-color: var(--accent); }
.toc-cards b { display: block; margin-bottom: 0.2rem; }
.toc-cards span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; background: var(--surface); }
  .docs-nav details > summary { cursor: pointer; font-weight: 600; }
}
.docs-nav details > summary { list-style: none; }
.docs-nav details > summary::-webkit-details-marker { display: none; }
@media (min-width: 861px) { .docs-nav details > summary { display: none; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Definition lists: term on its own line, description indented under it. */
.doc dl { margin: 0 0 1.25rem; display: grid; gap: 0.15rem 0; }
.doc dt { margin-top: 0.75rem; }
.doc dt:first-child { margin-top: 0; }
.doc dd { margin: 0 0 0 1.25rem; color: var(--muted); }
.muted { color: var(--muted); }
