/* Archydes help wiki. Follows the system appearance (screenshots switch with it). */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e2e4e8;
  --accent: #2a6fdb;
  --accent-soft: #e8f0fd;
  --note: #2a6fdb;
  --tip: #1f8a4c;
  --warning: #c26a00;
  --pro: #7a4cd9;
  --code-bg: #f0f1f4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --bg-soft: #242426;
    --text: #f2f2f4;
    --muted: #a1a1a8;
    --line: #38383c;
    --accent: #5b9bff;
    --accent-soft: #23314a;
    --note: #5b9bff;
    --tip: #45c27a;
    --warning: #f0a040;
    --pro: #a98bff;
    --code-bg: #2c2c30;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input {
  width: 100%; padding: 8px 12px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 70vh; overflow: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
#results li a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); }
#results li a:hover, #results li a.active { background: var(--accent-soft); text-decoration: none; }
#results strong { display: block; }
#results span { display: block; font-size: 13px; color: var(--muted); }
#results mark { background: none; color: var(--accent); font-weight: 600; }
#results .empty { padding: 8px 10px; color: var(--muted); }
.language select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}

/* layout */
.layout {
  display: grid; grid-template-columns: 240px minmax(0, 760px) 200px; gap: 48px;
  justify-content: center; padding: 32px 24px 64px;
}
.nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 15px; }
.nav summary { display: none; }
.nav-section { margin: 20px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.nav-section:first-of-type { margin-top: 0; }
.nav ul { margin: 0; padding: 0; list-style: none; }
.nav li a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--text); }
.nav li a:hover { background: var(--bg-soft); text-decoration: none; }
.nav li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc { position: sticky; top: 84px; align-self: start; font-size: 13px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--muted); }
.toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 3px 0 3px 12px; color: var(--muted); }
.toc li.level3 a { padding-left: 24px; }
.toc li a:hover { color: var(--accent); text-decoration: none; }

/* article */
main { min-width: 0; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent); }
h1 { margin: 4px 0 8px; font-size: 34px; line-height: 1.2; letter-spacing: -.01em; }
.lead { margin: 0 0 28px; font-size: 19px; color: var(--muted); }
h2 { margin: 40px 0 12px; padding-top: 8px; font-size: 24px; line-height: 1.3; }
h3 { margin: 28px 0 8px; font-size: 19px; }
h4 { margin: 20px 0 6px; font-size: 16px; }
.anchor { margin-left: 8px; color: var(--line); font-weight: 400; opacity: 0; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: 1; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 4px 0 0; }
code { font: .9em var(--mono); background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
pre { overflow: auto; padding: 14px 16px; background: var(--code-bg); border-radius: 8px; }
pre code { padding: 0; background: none; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 0 .4em; font: .88em var(--font); text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
}
picture img, main img { display: block; max-width: 100%; height: auto; margin: 20px 0; border-radius: var(--radius); box-shadow: var(--shadow); }
blockquote { margin: 0 0 14px; padding: 2px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.callout { margin: 20px 0; padding: 12px 16px; border-radius: 8px; border-left: 4px solid var(--note); background: var(--bg-soft); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px; font-weight: 600; color: var(--note); }
.callout.tip { border-color: var(--tip); } .callout.tip .callout-title { color: var(--tip); }
.callout.warning { border-color: var(--warning); } .callout.warning .callout-title { color: var(--warning); }
.callout.pro { border-color: var(--pro); } .callout.pro .callout-title { color: var(--pro); }
.callout.untranslated { border-color: var(--muted); color: var(--muted); }
/* YouTrack form, embedded with its light theme: on a light card in dark mode too */
.form { margin: 24px 0; padding: 20px; background: #ffffff; color: #1d1d1f; border: 1px solid var(--line); border-radius: var(--radius); }
.form-link a { display: inline-block; padding: 8px 16px; border-radius: 8px; background: var(--accent); color: #ffffff; font-weight: 600; }
.table { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--bg-soft); }

.pager { display: flex; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager a span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }

/* home */
.home h1 { font-size: 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.card h2 { margin: 0 0 8px; padding: 0; font-size: 18px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li a { display: block; padding: 8px 0; color: var(--text); border-top: 1px solid var(--line); }
.card li:first-child a { border-top: 0; }
.card li a:hover { text-decoration: none; }
.card li a:hover strong { color: var(--accent); }
.card li span { display: block; font-size: 14px; color: var(--muted); }

.bottom { padding: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }

/* narrower screens */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .brand span { font-size: 15px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .language { margin-left: auto; }
  .layout { display: block; padding: 16px 16px 48px; }
  .nav { position: static; max-height: none; margin-bottom: 24px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
  .nav summary { display: list-item; cursor: pointer; font-weight: 600; }
  .nav[open] summary { margin-bottom: 8px; }
  h1 { font-size: 28px; }
  .lead { font-size: 17px; }
  .pager { flex-direction: column; }
}
