/* Text Editor Pro — support site stylesheet */

:root {
  --bg: #2D2D2D;
  --panel: #202020;
  --panel-2: #3B3B3B;
  --border: #3B3B3B;
  --text: #d6dbe3;
  --muted: #8b93a1;
  --link: #64A6FE;
  --blue: #3C7FF7;
  --key: #e5c07b;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar: styled like the editor's file list ---- */

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 0 24px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: block;
  padding: 4px 20px 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.75rem;
  letter-spacing: 0.2px;
}
.brand span { color: var(--blue); font-weight: 500; }

.sidebar nav a {
  display: block;
  padding: 7px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}
.sidebar nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel-2);
  border-left-color: var(--blue);
}

/* ---- Content ---- */

main {
  flex: 1;
  min-width: 0;
  padding: 44px 48px 72px;
}

.content {
  max-width: 840px;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 650;
}

h2 {
  font-size: 21px;
  margin: 40px 0 12px;
  font-weight: 600;
}

h3 {
  font-size: 17px;
  margin: 32px 0 10px;
  font-weight: 600;
}

p, li { max-width: 76ch; }
p { margin: 0 0 14px; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

ul, ol { padding-left: 24px; }
li { margin: 3px 0; }

/* ---- Tables ---- */

.table-wrap {
  overflow-x: auto;
  margin: 14px 0 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }

th {
  background: var(--panel);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:hover { background: var(--panel-2); }

/* first column in mono (filenames, params, shortcuts) */
.mono-first td:first-child {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--key);
  white-space: nowrap;
}

/* ---- Code ---- */

code, kbd {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
pre code { background: none; border: none; padding: 0; }

/* ---- Misc ---- */

.note {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--key);
  border-radius: 4px;
  padding: 10px 14px;
  margin: 16px 0;
  max-width: 76ch;
}

img.shot {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 10px 0 20px;
  display: block;
}

.cols-2 {
  columns: 2;
  column-gap: 40px;
}

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---- Mobile ---- */

@media (max-width: 820px) {
  body { display: block; }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 0 0;
  }
  .brand { padding: 0 16px 10px; }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px 10px;
    gap: 2px;
  }
  .sidebar nav a {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    padding: 6px 12px;
  }
  .sidebar nav a[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--link);
  }
  main { padding: 26px 18px 56px; }
  .cols-2 { columns: 1; }
}
