/* Abra help site. System fonts, light and dark themes, print-friendly. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --fg: #1b1f24;
  --muted: #5a6470;
  --border: #dde2e8;
  --link: #1f5fbf;
  --accent: #1f5fbf;
  --new-bg: #e3f4e8;
  --new-fg: #17663a;
  --soon-bg: #fdf1dc;
  --soon-fg: #8a5300;
  --code-bg: #eef1f5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171b;
    --bg-soft: #1c2026;
    --fg: #e6e9ed;
    --muted: #9aa4b0;
    --border: #2f353d;
    --link: #8ab4ff;
    --accent: #8ab4ff;
    --new-bg: #173d27;
    --new-fg: #9fe0b5;
    --soon-bg: #45330f;
    --soon-fg: #f5cf86;
    --code-bg: #252a31;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171b;
  --bg-soft: #1c2026;
  --fg: #e6e9ed;
  --muted: #9aa4b0;
  --border: #2f353d;
  --link: #8ab4ff;
  --accent: #8ab4ff;
  --new-bg: #173d27;
  --new-fg: #9fe0b5;
  --soon-bg: #45330f;
  --soon-fg: #f5cf86;
  --code-bg: #252a31;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--fg); text-decoration: none; white-space: nowrap; }
.search { position: relative; flex: 1; max-width: 26rem; margin-left: auto; }
.search input {
  width: 100%; padding: .45rem .7rem; font: inherit; font-size: .95rem;
  color: var(--fg); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 6px;
}
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: .25rem; list-style: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15); max-height: 70vh; overflow-y: auto;
}
.search-results a { display: block; padding: .4rem .6rem; border-radius: 4px; text-decoration: none; color: var(--fg); }
.search-results a span { display: block; font-size: .8rem; color: var(--muted); }
.search-results a:hover, .search-results a.active { background: var(--bg-soft); }
.search-results .none { padding: .4rem .6rem; color: var(--muted); }
.menu-btn, .theme-btn {
  font: inherit; font-size: .95rem; color: var(--fg); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 6px; padding: .4rem .7rem; cursor: pointer;
}
.menu-btn { display: none; }

/* Layout */
.shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); max-width: 76rem; margin: 0 auto; }
.sidebar {
  position: sticky; top: 3.4rem; align-self: start;
  max-height: calc(100vh - 3.4rem); overflow-y: auto;
  padding: 1.25rem 1rem 2rem; border-right: 1px solid var(--border);
  font-size: .93rem;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; padding: .3rem .6rem; border-radius: 5px; color: var(--fg); text-decoration: none; }
.sidebar li a:hover { background: var(--bg-soft); }
.sidebar li.active > a { background: var(--bg-soft); font-weight: 600; color: var(--accent); }
.sidebar .nav-featured > a { font-weight: 600; }
.sidebar .toc { margin: .15rem 0 .4rem .7rem; border-left: 2px solid var(--border); }
.sidebar .toc a { font-size: .87rem; color: var(--muted); padding: .2rem .6rem; }
.content { padding: 1.5rem 2.25rem 3rem; min-width: 0; max-width: 50rem; }

/* Typography */
h1 { font-size: 2rem; line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 .6rem; padding-top: .4rem; border-top: 1px solid var(--border); }
h3 { font-size: 1.12rem; margin: 1.6rem 0 .4rem; }
h1 + h2, .note + h2, h1 + .note + h2 { border-top: 0; }
h2, h3 { position: relative; }
.anchor { position: absolute; left: -1.1em; padding-right: .3em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.lead { font-size: 1.1rem; color: var(--muted); }
ul, ol { padding-left: 1.4rem; }
li { margin: .25rem 0; }
li > ul, li > ol { margin: .25rem 0; }
code { background: var(--code-bg); padding: .1em .3em; border-radius: 4px; }
.note { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: .6rem .9rem; border-radius: 0 6px 6px 0; font-size: .95rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .5rem .7rem; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Badges */
.badge {
  display: inline-block; vertical-align: .1em;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
  padding: 0 .5em; border-radius: 999px; white-space: nowrap;
}
.badge-new { background: var(--new-bg); color: var(--new-fg); }
.badge-soon { background: var(--soon-bg); color: var(--soon-fg); cursor: help; }
h2 .badge, h3 .badge { margin-left: .35rem; font-size: .7rem; }

/* Home */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.path { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; background: var(--bg-soft); }
.path h2 { border: 0; margin: 0 0 .5rem; padding: 0; font-size: 1.25rem; }
.path ul { margin: 0; }
.topics { list-style: none; padding: 0; }
.topics li { margin: .55rem 0; }
.topics a { font-weight: 600; }
.topics span { display: block; color: var(--muted); font-size: .92rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; counter-reset: none; }
.timeline li { margin: 0; display: flex; flex-direction: column; gap: .4rem; border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 8px; padding: .7rem .8rem; background: var(--bg-soft); }
.timeline .step { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: var(--bg); font-weight: 700; font-size: .85rem; }
.timeline strong { display: block; }
.timeline .when { display: block; font-size: .85rem; font-weight: 600; color: var(--accent); }
.timeline p { margin: .3rem 0 0; font-size: .88rem; color: var(--muted); }

/* What's new */
.counts { color: var(--muted); }
.features { list-style: none; padding: 0; }
.feature { border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; margin: .7rem 0; }
.feature h4 { margin: 0 0 .25rem; font-size: 1.05rem; }
.area-title { margin: 1.4rem 0 .2rem; font-size: 1.1rem; }
.feature p { margin: .2rem 0; }
.feature .more { font-size: .92rem; }
.released, .aud { font-size: .78rem; color: var(--muted); font-weight: 400; margin-left: .4rem; }
.empty { color: var(--muted); font-style: italic; }

/* Pager and footer */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.pager a { text-decoration: none; display: flex; flex-direction: column; max-width: 48%; }
.pager a span { font-size: .8rem; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; text-align: center; padding: 1rem; }

/* Tablet and phone */
@media (max-width: 960px) {
  .timeline { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
}
@media (max-width: 800px) {
  .js .menu-btn { display: inline-block; }
  .shell { display: block; }
  .js .sidebar { display: none; }
  .js.nav-open .sidebar { display: block; }
  .sidebar {
    position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border);
    padding: .75rem 1rem 1rem; background: var(--bg-soft);
  }
  .content { padding: 1rem 16px 2.5rem; }
  h1 { font-size: 1.6rem; }
  .anchor { display: none; }
  .topbar { flex-wrap: wrap; padding: .5rem 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand { margin-right: auto; }
  .timeline { grid-template-columns: 1fr; }
  .timeline li { flex-direction: row; align-items: flex-start; gap: .7rem; border-top-width: 1px; border-left: 4px solid var(--accent); }
  .timeline .step { flex: none; }
}

/* Print */
@media print {
  :root { --bg: #fff; --fg: #000; --muted: #333; --link: #000; --border: #bbb; --bg-soft: #fff; }
  .topbar, .sidebar, .pager, .footer, .skip, .anchor, .search-results { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  body { font-size: 11pt; }
  a { text-decoration: none; }
  .content a[href^="/"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  h2, h3 { break-after: avoid; }
  tr, .feature, .timeline li { break-inside: avoid; }
  .badge { border: 1px solid #555; background: none; color: #000; }
  .badge-soon::after { content: " — being rolled out"; font-weight: 400; }
  .table-wrap { overflow: visible; border: 0; }
  .timeline { grid-template-columns: repeat(5, 1fr); }
}
