@font-face {
  font-family: Inter;
  src: url('/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #090c0d;
  --surface: #121719;
  --surface-hover: #1b2224;
  --line: #252d2f;
  --text: #f1f4f3;
  --body: #ccd3d0;
  --muted: #a1aca8;
  --green: #79eaa4;
  --radius: 12px;
  --header-height: 68px;
  --gutter: clamp(20px, 4vw, 56px);
  font: 400 16px/1.6 Inter, system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
  scroll-padding-block-start: calc(var(--header-height) + 20px);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
h1, h2, h3 { line-height: 1.19; font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--green); }
input, button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 20;
  inset: 8px auto auto 12px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--surface);
}

.site-wrap {
  width: min(100%, 1392px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: clamp(16px, 3vw, 48px);
}

.brand, .header-links, .header-links a {
  display: flex;
  flex: none;
  align-items: center;
}

.brand {
  min-height: 44px;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand:hover { color: var(--text); }
.brand img { flex: none; }
.brand-section {
  margin-inline-start: 6px;
  padding-inline-start: 15px;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 400;
  letter-spacing: 0;
}

.header-links {
  gap: 20px;
  margin-inline-start: auto;
  font-size: .86rem;
}

.header-links a { gap: 7px; min-height: 42px; text-decoration: none; }
.support-link { color: var(--muted); }
.cabinet-link { color: var(--text); font-weight: 600; }
.cabinet-link span { color: var(--green); }

.layout {
  display: grid;
  grid-template-columns: 204px minmax(0, 740px) minmax(135px, 1fr);
  align-items: start;
  column-gap: clamp(28px, 3.5vw, 56px);
  flex: 1;
}

.layout--hub { grid-template-columns: 204px minmax(0, 1fr); }

.sidebar, .toc {
  position: sticky;
  top: var(--header-height);
  max-height: calc(100dvh - var(--header-height));
  padding-block: 44px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar { padding-inline-end: 16px; border-inline-end: 1px solid var(--line); }
.sidebar ul, .mobile-index ul, .toc ul, .related ul, .quick-answers ul, .topic-group ul {
  list-style: none;
  padding: 0;
}

.section-nav p, .toc p {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
}

.section-nav p { margin: 20px 0 4px 10px; }

.section-nav a, .toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--body);
  font-size: .84rem;
  line-height: 1.3;
  text-decoration: none;
}

.section-nav a {
  padding: 6px 10px;
  border-radius: 6px;
}

.section-nav a:hover { background: var(--surface); color: var(--text); }
.section-nav a[aria-current='page'] { background: var(--surface-hover); color: var(--text); font-weight: 600; }
.toc { padding-block-start: 54px; }
.toc p { margin-block-end: 7px; }
.toc a { color: var(--muted); border-inline-start: 1px solid var(--line); padding: 6px 0 6px 13px; }
.toc a:hover { color: var(--green); border-color: var(--green); }
.mobile-index { display: none; }

/* Search is an enhancement; all topics and links are available without it. */
.search { position: relative; flex: 1; width: 100%; max-width: 396px; min-width: 0; }
.search input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 62px 8px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
}

.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--green); outline: none; }
.search-icon, .search-shortcut {
  position: absolute;
  inset-block-start: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
}

.search-icon { inset-inline-start: 14px; }
.search-shortcut {
  inset-inline-end: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 400 .72rem/1.35 Inter, system-ui, sans-serif;
  white-space: nowrap;
}

.search-results {
  position: absolute;
  z-index: 4;
  inset: calc(100% + 6px) 0 auto;
  max-height: min(420px, 50dvh);
  padding: 5px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #14191b;
  box-shadow: 0 6px 16px #0005, 0 16px 44px #0005;
}

.search-results a, .search-results p { display: block; padding: 10px 12px; }
.search-results a { border-radius: 6px; font-size: .92rem; text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible {
  outline-offset: -2px;
  background: var(--surface-hover);
  color: var(--text);
}

.search-results small { display: block; margin-top: 2px; color: var(--muted); font-size: .79rem; }
.search-results p { color: var(--muted); font-size: .9rem; }

/* Help center index */
.hub-intro { padding-block: clamp(36px, 5.8vw, 72px) 36px; }
.hub-intro h1 { font-size: clamp(2.16rem, 4.4vw, 3.42rem); letter-spacing: -.054em; }
.lead { margin-block-start: 14px; color: var(--muted); font-size: 1.07rem; line-height: 1.62; }
.hub-intro .search { max-width: 585px; margin-block-start: 26px; }
.hub-intro .search input { min-height: 52px; font-size: 1rem; }

.hub-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4vw, 48px);
}

.start-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 135px);
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 30px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.overline { color: var(--green); font-size: .77rem; font-weight: 600; }
.start-guide h2 { margin-block: 9px 10px; font-size: clamp(1.3rem, 2.4vw, 1.85rem); letter-spacing: -.035em; }
.start-guide p:not(.overline) { max-width: 29ch; color: var(--muted); font-size: .9rem; }
.start-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-block-start: 14px;
  padding-inline: 12px;
  border-radius: 6px;
  background: #eaf3ed;
  color: #14231b;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, scale 140ms ease;
}

.start-link:hover { background: #c4f4d4; color: #14231b; }
.start-link:active { scale: .96; }
.start-preview {
  width: 100%;
  max-height: 215px;
  border-radius: 8px;
  outline: 1px solid #ffffff1a;
  object-fit: cover;
  object-position: center 30%;
}

.quick-answers { align-self: center; }
.quick-answers h2 { margin-block-end: 10px; font-size: 1rem; }
.quick-answers a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  font-size: .9rem;
  text-decoration: none;
}

.quick-answers a:hover, .topic-link:hover { color: var(--green); }
.quick-answers a span, .link-arrow { color: var(--muted); }
.quick-answers a:hover span, .topic-link:hover .link-arrow { color: var(--green); }
.hub-topics { margin-block: 46px 64px; }
.hub-topics > h2 { font-size: 1.5rem; letter-spacing: -.028em; }
.topic-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 38px); margin-block-start: 23px; }
.topic-group h3 { padding-block-end: 10px; color: var(--muted); font-size: .82rem; }
.topic-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 9px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}

.topic-link small { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; font-weight: 400; line-height: 1.45; }

/* Articles */
.guide { padding-block: 40px 64px; }
.article-header { margin-block-end: 26px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block-end: 16px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { display: flex; align-items: center; min-height: 40px; text-decoration: none; }
.guide h1 { font-size: clamp(2.1rem, 4.4vw, 3.15rem); letter-spacing: -.052em; }
.guide .lead { max-width: 58ch; }
.guide-body { font-size: 1rem; color: var(--body); }
.article-section {
  padding-block: 29px 32px;
  border-top: 1px solid var(--line);
  overflow-wrap: break-word;
}

.article-section h2 {
  margin-block-end: 12px;
  color: var(--text);
  font-size: clamp(1.3rem, 2.5vw, 1.64rem);
  letter-spacing: -.028em;
}

.article-section :is(p, ol, ul) { max-width: 67ch; }
.article-section :is(p, ol, ul) + :is(p, ol, ul) { margin-block-start: 12px; }
.article-section :is(ol, ul) { padding-inline-start: 1.35em; }
.article-section li + li { margin-block-start: 7px; }
.article-section p a, .article-section li a, .related a { color: var(--green); text-decoration-color: #79eaa470; }
.article-section p a:hover, .article-section li a:hover, .related a:hover { text-decoration-color: currentColor; }
.ui-path { color: var(--muted); font-size: .83rem; line-height: 1.55; }
.illustrated { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 34%); gap: clamp(18px, 3.5vw, 38px); align-items: start; }
.shot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 550px; margin-block-start: 22px; }
.shot { width: 100%; max-width: 275px; }
.shot a { position: relative; display: block; border-radius: 11px; cursor: zoom-in; }
.shot img {
  width: 100%;
  border-radius: inherit;
  outline: 1px solid #ffffff1a;
  box-shadow: 0 2px 6px #0005, 0 8px 24px #0004;
  background: var(--surface);
}

.shot a::after {
  content: '';
  position: absolute;
  inset: auto 8px 8px auto;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #111719e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%23eff4f1' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-6 6M10 20H4v-6m0 6 6-6'/%3E%3C/svg%3E") center no-repeat;
  border: 1px solid #ffffff24;
}

.shot a:hover img { outline-color: #ffffff50; }
.shot--crop img { aspect-ratio: 4 / 7; object-fit: cover; object-position: top; }
.shot figcaption { margin-block-start: 8px; color: var(--muted); font-size: .79rem; line-height: 1.5; }

.walkthrough { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 4vw, 40px); }
.walkthrough-step { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 20px; }
.walkthrough-step .shot a { text-decoration: none; }
.walkthrough-step .shot a::after { display: none; }
.shot-action { display: block; margin-block-start: 8px; color: var(--muted); font-size: .79rem; }
.shot a:hover .shot-action { color: var(--green); }
.walkthrough-note { max-width: 67ch; margin-block: 0 24px; }

@media (max-width: 620px) {
  .walkthrough { display: block; }
  .walkthrough-step { grid-template-rows: auto auto; }
  .walkthrough-step .shot { margin-inline: auto; }
}

.plan-table { width: 100%; margin-block: 16px; border-collapse: collapse; font-size: .91rem; line-height: 1.4; }
.plan-table :is(th, td) { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.plan-table :is(th, td):first-child { padding-inline-start: 0; }
.plan-table th { font-weight: 600; }
.plan-table thead th { color: var(--text); }
.plan-table td:last-child { color: var(--text); }

.related { padding-block-start: 22px; border-top: 1px solid var(--line); }
.related p { margin-block-end: 3px; color: var(--muted); font-size: .82rem; }
.related ul { display: flex; flex-wrap: wrap; gap: 0 22px; }
.related a { display: inline-flex; align-items: center; min-height: 40px; }

/* Screenshot viewer */
html:has(.image-dialog[open]) { overflow: hidden; }
.image-dialog {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 50px 16px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.image-dialog[open] { display: grid; place-items: center; }
.image-dialog::backdrop { background: #07090af0; }
.image-dialog img { max-height: calc(100dvh - 66px); width: auto; max-width: 100%; border-radius: 10px; outline: 1px solid #ffffff1a; }
.image-dialog button {
  position: absolute;
  inset: 4px 12px auto auto;
  min-height: 42px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  cursor: pointer;
}

.image-dialog button:hover { background: var(--surface-hover); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; padding-block: 10px; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 186px minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .hub-feature { grid-template-columns: 1fr; }
  .start-guide { grid-template-columns: minmax(0, 1fr) minmax(96px, 135px); }
  .topic-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { scroll-padding-block-start: 18px; }
  .site-header { position: relative; }
  .topbar { flex-wrap: wrap; min-height: 0; gap: 8px 14px; padding-block: 8px; }
  .topbar .search { order: 1; max-width: none; flex-basis: 100%; }
  .layout { display: block; }
  .sidebar { display: none; }
  .mobile-index { display: block; border-bottom: 1px solid var(--line); }
  .mobile-index summary { min-height: 44px; padding-block: 10px; color: var(--body); font-size: .87rem; cursor: pointer; }
  .mobile-index summary::marker { color: var(--muted); }
  .mobile-index .section-nav { padding-block-end: 14px; }
  .guide { padding-block-start: 18px; }
}

@media (max-width: 520px) {
  .brand-section, .header-links .support-link, .search-shortcut { display: none; }
  .search input { padding-inline-end: 14px; font-size: 1rem; }
  .hub-intro { padding-block: 34px 25px; }
  .start-guide { grid-template-columns: 1fr; }
  .start-preview { display: none; }
  .hub-topics { margin-block: 34px 44px; }
  .topic-groups { grid-template-columns: 1fr; gap: 24px; }
  .article-header { margin-block-end: 23px; }
  .illustrated { grid-template-columns: minmax(0, 1fr); }
  .illustrated .shot { margin-inline: auto; }
  .shot-pair { gap: 12px; }
  .shot a::after { inset: auto 5px 5px auto; width: 27px; height: 27px; }
  .plan-table { font-size: .84rem; }
}

@media (pointer: coarse) {
  .search-shortcut { display: none; }
  .search input { padding-inline-end: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .start-link { transition: none; }
}
