/* ==========================================================================
   Baadal Help Centre
   Desktop layout is pixel-faithful to the design at >= 1024px; below that the
   sidebar becomes a drawer and the diagrams scroll horizontally.
   ========================================================================== */

:root {
  /* Ink */
  --ink:          #0F1424;
  --ink-body:     #4A5068;
  --ink-muted:    #5B6178;
  --ink-faint:    #8A90A6;
  --ink-nav:      #3A4160;

  /* Surfaces */
  --bg:           #F7F8FB;
  --surface:      #FFFFFF;
  --surface-sub:  #FBFCFE;
  --surface-hov:  #F2F4FA;
  --surface-sel:  #F7F9FF;

  /* Lines */
  --line:         #E2E5EE;
  --line-strong:  #D5D9E5;
  --line-mid:     #C3C8D6;
  --line-faint:   #F0F1F6;
  --line-sel:     #C9CFE8;

  /* Brand */
  --brand:        #2B35A0;
  --brand-dark:   #161E6E;
  --brand-tint:   #EEF0FB;
  --brand-sel:    #D9DEF7;

  /* Accents */
  --amber-ink:    #8A5A00;
  --amber-bg:     #FDF3E0;
  --amber-line:   #EBD9B4;
  --amber-soft:   #FDF9F0;
  --amber-text:   #4A4230;
  --grey-arrow:   #B8BECE;
  --avatar:       #DDE1F0;
  --led:          #3BA55D;

  --display: 'Bricolage Grotesque', 'Mukta', sans-serif;
  --body:    'Public Sans', 'Mukta', system-ui, sans-serif;
  --mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  --sidebar-w: 296px;
  --gutter: 44px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
::selection { background: var(--brand-sel); }
input { font-family: inherit; }
button { font-family: inherit; cursor: pointer; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 100;
  transform: translateY(-120%);
  background: var(--brand);
  color: #FFFFFF;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}
.skip-link:focus { transform: translateY(0); color: #FFFFFF; text-decoration: none; }

/* ── Shell ───────────────────────────────────────────────────────────────── */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  background: var(--bg);
}

.main { flex: 1; min-width: 0; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 20, 36, 0.4);
  border: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 24px 18px 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand__logo {
  width: 34px;
  height: 42px;
  flex: none;
  display: block;
  object-fit: contain;
}

.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand__tag {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  padding: 3px 7px;
}

.sidebar__close {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: 4px;
}

.sidebar__search {
  padding: 18px 24px 14px 24px;
  border-bottom: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  padding: 9px 11px;
}
.search:focus-within { border-color: var(--brand); }
.search__icon { flex: none; }

.search__input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
.search__input::-webkit-search-cancel-button { cursor: pointer; }

.sidebar__nav {
  flex: 1;
  overflow: auto;
  padding: 20px 16px 24px 16px;
}

.nav__all {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}
.nav__all:hover { background: var(--surface-hov); }

.nav__group { margin-bottom: 22px; }

.nav__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 8px 9px 8px;
}

.nav__items { display: flex; flex-direction: column; gap: 1px; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--ink-nav);
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}
.nav__item:hover { background: var(--surface-hov); }
.nav__item[aria-current='page'] {
  border-left-color: var(--brand);
  background: var(--surface-hov);
  color: var(--brand);
  font-weight: 600;
}

.sidebar__foot {
  padding: 18px 24px 22px 24px;
  border-top: 1px solid var(--line);
}

.sidebar__stuck {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.btn-whatsapp:hover {
  background: var(--brand);
  color: #FFFFFF;
  text-decoration: none;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  height: 60px;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar__menu {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 6px;
  flex: none;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-muted);
  min-width: 0;
}

.crumbs__home {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.crumbs__home:hover { color: var(--brand); }

.crumbs__sep { color: var(--line-mid); }

.crumbs__here {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.langs {
  display: flex;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.lang {
  border: 0;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink-muted);
}
.lang + .lang { border-left: 1px solid var(--line-strong); }
.lang--hi { font-family: 'Mukta', sans-serif; }
.lang[aria-pressed='true'] { background: var(--brand); color: #FFFFFF; }

.topbar__site {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}
.topbar__site:hover { color: var(--brand); text-decoration: none; }

/* ── Home ────────────────────────────────────────────────────────────────── */

.home {
  padding: 56px var(--gutter) 80px var(--gutter);
  max-width: 1020px;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--display);
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px 0;
  max-width: 16ch;
  text-wrap: pretty;
}

.hero__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-body);
  margin: 0 0 44px 0;
  max-width: 60ch;
  text-wrap: pretty;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--surface);
  border: 0;
  padding: 26px 24px 24px 24px;
  min-height: 186px;
}
.card:hover { background: var(--surface-sub); }

.card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--brand-tint);
  color: var(--brand);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
}

.card__title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
}

.card__summary {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;
  text-wrap: pretty;
}

.card__meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.faq__title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 64px 0 20px 0;
}

.faq {
  border: 1px solid var(--line);
  background: var(--surface);
}

.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 0; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 17px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.faq__q:hover { background: var(--surface-sub); }

.faq__sign {
  flex: none;
  color: var(--brand);
  font-size: 19px;
  line-height: 1;
}

.faq__a {
  padding: 0 22px 20px 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-body);
  max-width: 74ch;
  text-wrap: pretty;
}

/* ── Search results ──────────────────────────────────────────────────────── */

.results {
  padding: 48px var(--gutter) 80px var(--gutter);
  max-width: 820px;
}

.results__title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px 0;
}

.results__line {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 28px 0;
}

.results__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.result {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 0;
  padding: 20px 22px;
}
.result:hover { background: var(--surface-sub); }

.result__title {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.result__summary {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.results__empty {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-body);
}

/* ── Article ─────────────────────────────────────────────────────────────── */

.article {
  padding: 48px var(--gutter) 80px var(--gutter);
  max-width: 840px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 10px;
}
.badge--where { color: var(--brand); background: var(--brand-tint); }
.badge--mins  { color: var(--ink-muted); border: 1px solid var(--line); }
.badge--admin { color: var(--amber-ink); background: var(--amber-bg); }

.article__title {
  font-family: var(--display);
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-wrap: pretty;
}

.article__summary {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-body);
  margin: 0 0 36px 0;
  max-width: 62ch;
  text-wrap: pretty;
}

/* "What you will see" panel */

.screen {
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 40px;
}

/* Device availability tabs */

.platform-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.platform-tabs::-webkit-scrollbar { display: none; }

.platform-tab {
  flex: none;
  min-width: 104px;
  padding: 12px 18px 11px;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.platform-tab:hover {
  background: var(--surface-hov);
  color: var(--ink);
}

.platform-tab.is-active {
  position: relative;
  margin-bottom: -1px;
  padding-bottom: 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--brand);
}

.platform-tab.is-active::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--brand);
}

.screen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sub);
}

.screen__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.screen__note { font-size: 11px; color: var(--ink-faint); }

.screen__body { padding: 26px 24px; }

.screen__scroll { overflow-x: auto; }

.shot { margin-top: 22px; border-top: 1px dashed var(--line-strong); padding-top: 20px; }

.screen__body > .shot:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.shot__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 11px;
}

.shot__frame { height: 250px; }

/* Steps */

.steps {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: flex;
  gap: 20px;
  background: var(--surface);
  padding: 24px 26px;
}

.step__n {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--brand);
  color: #FFFFFF;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}

.step__body { flex: 1; min-width: 0; }

.step__title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2px 0 8px 0;
  color: var(--ink);
}

.step__text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-body);
  margin: 0;
  max-width: 64ch;
  text-wrap: pretty;
}

.step__images {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.step__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.step__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-sub);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
}

.step__link:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
  text-decoration: none;
}

.step__image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  background: var(--surface-sub);
}

.step__code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  padding: 10px 12px;
}

.step__code code {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  overflow: auto;
}

.copy {
  flex: none;
  border: 1px solid var(--line-mid);
  background: var(--surface);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 10px;
}
.copy:hover { border-color: var(--brand); }

.step__tip {
  margin-top: 14px;
  border-left: 2px solid var(--brand);
  background: var(--surface-sel);
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-nav);
  max-width: 64ch;
}

.warn {
  margin-top: 28px;
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  padding: 18px 20px;
}

.warn__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 7px;
}

.warn__text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--amber-text);
  margin: 0;
  max-width: 70ch;
  text-wrap: pretty;
}

.video {
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.video__head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.video__body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 190px;
  background: var(--bg);
}

.video__embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border: 1px solid var(--line-mid);
  background: var(--surface);
  color: var(--brand);
  font-size: 15px;
}

.video__text {
  font-size: 13px;
  color: var(--ink-faint);
  max-width: 30ch;
  line-height: 1.5;
}

/* Article footer: rating + next */

.endbar {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rate { display: flex; align-items: center; gap: 14px; }

.rate__q { font-size: 15px; font-weight: 600; color: var(--ink); }

.rate__btns { display: flex; gap: 8px; }

.rate__btn {
  border: 1px solid var(--line-mid);
  background: var(--surface);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.rate__btn:hover { border-color: var(--brand); color: var(--brand); }

.rate__done {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-body);
  max-width: 52ch;
}
.rate__tick { color: var(--brand); font-weight: 700; }

.next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #FFFFFF;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.next:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 26px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__copy { font-size: 12.5px; color: var(--ink-faint); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12.5px;
}

.noscript {
  padding: 40px var(--gutter);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-body);
}

/* ==========================================================================
   Diagrams
   ========================================================================== */

/* Numbered badge, shared by every diagram */
.dg-num {
  position: absolute;
  top: -10px;
  left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}
.dg-num--wide { width: auto; padding: 0 6px; white-space: nowrap; }
.dg-num--sm   { width: 20px; height: 20px; font-size: 10px; }
.dg-num--tl   { top: -9px; left: -11px; }
.dg-num--tr   { top: -8px; left: auto; right: -9px; }
.dg-num--gutter { top: 6px; left: -28px; }
.dg-num--left   { top: 1px; left: -30px; }

/* Setup: device → app → web */

.dg-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  min-width: 620px;
  padding: 12px 0 0 12px;
}

.dg-node {
  border: 1px solid var(--line-strong);
  background: var(--surface-sub);
  padding: 18px 16px;
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.dg-node__title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.dg-node__text  { font-size: 11.5px; line-height: 1.45; color: var(--ink-muted); }

.dg-arrow { color: var(--grey-arrow); font-size: 18px; }

.dg-device {
  width: 56px; height: 34px;
  border: 2px solid var(--brand);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 8px;
}
.dg-device__led { width: 7px; height: 7px; background: var(--led); border-radius: 50%; }
.dg-device__bar { width: 26px; height: 3px; background: var(--line-strong); }

.dg-phone {
  width: 26px; height: 44px;
  border: 2px solid var(--brand);
  background: var(--surface);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}
.dg-phone span { width: 10px; height: 2px; background: var(--line-strong); }

.dg-screen {
  width: 60px; height: 42px;
  border: 2px solid var(--brand);
  background: var(--surface);
}
.dg-screen div { height: 10px; border-bottom: 2px solid var(--brand); background: var(--brand-tint); }

/* Window chrome shared by the Accounts diagrams */

.dg-win {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  min-width: 560px;
}

.dg-win__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-hov);
}

.dg-win__title { font-size: 12px; font-weight: 600; color: var(--ink); }

.dg-win__body { display: flex; min-height: 172px; }

.dg-avatar-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink-muted);
}
.dg-avatar-slot .dg-num { top: -9px; left: auto; right: -9px; }

.dg-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--avatar);
  flex: none;
}
.dg-avatar--sm { width: 17px; height: 17px; }
.dg-avatar--brand { width: 18px; height: 18px; background: var(--brand); }

.dg-side {
  width: 132px;
  flex: none;
  border-right: 1px solid var(--line);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-muted);
  position: relative;
}
.dg-side--wide { width: 158px; }

.dg-side__item { padding: 5px 8px; }
.dg-side__item.is-on { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.dg-side__item.is-faint { color: var(--ink-faint); }
.dg-side__item.is-add { color: var(--brand); border: 1px dashed var(--brand); }
.dg-side__item.has-badge { position: relative; }

/* Accounts table */

.dg-table {
  flex: 1;
  padding: 12px 14px 12px 34px;
  min-width: 0;
}

.dg-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr 0.7fr;
  gap: 8px;
  align-items: center;
}

.dg-row--head {
  position: relative;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.dg-row--new {
  position: relative;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-mid);
  background: var(--surface-sel);
}

.dg-cell {
  height: 19px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.dg-cell--focus { border-color: var(--brand); }

.dg-row--data {
  padding: 9px 0;
  font-size: 11.5px;
  color: var(--ink-body);
}
.dg-row--data.has-rule { border-bottom: 1px solid var(--line-faint); }

/* Group members */

.dg-members {
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
  position: relative;
}

.dg-members__head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.dg-members__list { display: flex; flex-direction: column; gap: 9px; }

.dg-member {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--ink-body);
}

.dg-member__role { margin-left: auto; font-size: 10.5px; color: var(--ink-faint); }

.dg-member--add {
  position: relative;
  color: var(--brand);
  border: 1px dashed var(--line-mid);
  padding: 7px 9px;
  margin-top: 4px;
}

/* Share panels */

.dg-split {
  display: flex;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  min-height: 206px;
  min-width: 560px;
}

.dg-files { flex: 1; min-width: 0; padding: 12px 14px; }

.dg-files__head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 11px;
}

.dg-files__list { display: flex; flex-direction: column; gap: 1px; }

.dg-file {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  font-size: 12px;
  color: var(--ink-body);
}
.dg-file.is-on {
  position: relative;
  color: var(--ink);
  background: var(--surface-sel);
  border: 1px solid var(--line-sel);
}

.dg-file__icon { width: 14px; height: 12px; background: var(--line-mid); flex: none; }
.dg-file__icon.is-brand { background: var(--brand); }
.dg-file__name { font-weight: 600; }

.dg-share-btn {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: 12px;
}

.dg-note {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: var(--surface-sub);
  padding: 11px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.dg-panel {
  width: 232px;
  flex: none;
  border-left: 1px solid var(--line-strong);
  background: var(--surface-sub);
  padding: 13px 14px;
  position: relative;
}
.dg-panel--wide { width: 246px; }

.dg-panel__title { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }

.dg-input {
  position: relative;
  border: 1px solid var(--brand);
  background: var(--surface);
  padding: 7px 9px;
  font-size: 11.5px;
  color: var(--ink);
  margin-bottom: 9px;
}
.dg-caret { color: var(--grey-arrow); }

.dg-suggest {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 9px;
  font-size: 11.5px;
  color: var(--ink-body);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dg-suggest-list {
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink-body);
}

.dg-suggest-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
}
.dg-suggest-row + .dg-suggest-row { border-top: 1px solid var(--line); }
.dg-suggest-row.is-on { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.dg-suggest-row__meta { margin-left: auto; font-size: 10px; font-weight: 400; color: var(--ink-muted); }

.dg-group-icon {
  width: 17px; height: 17px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 9px;
  flex: none;
}

.dg-perms {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-body);
}
.dg-perms .dg-num--tl { top: 2px; }
.dg-perms--plain { margin-top: 13px; }

.dg-perm { display: flex; align-items: center; gap: 8px; }

.dg-box { width: 12px; height: 12px; border: 1px solid var(--line-mid); flex: none; }
.dg-box.is-on { border-color: var(--brand); background: var(--brand); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 0 12px 40px rgba(15, 20, 36, 0.18);
  }
  .sidebar__close { display: block; }
  .topbar__menu { display: flex; }
  .brand__tag { display: none; }
}

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

@media (max-width: 767px) {
  :root { --gutter: 24px; }

  .topbar { gap: 12px; }
  .topbar__site { display: none; }
  .crumbs { font-size: 12px; }

  .home { padding-top: 40px; }
  .hero__title { font-size: 34px; max-width: none; }
  .hero__sub { font-size: 16px; margin-bottom: 32px; }
  .cards { grid-template-columns: 1fr; }
  .faq__title { font-size: 22px; margin-top: 48px; }

  .article__title { font-size: 30px; }
  .article__summary { font-size: 16px; }

  .screen__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .screen__body { padding: 20px 16px; }

  .step { flex-direction: column; gap: 12px; padding: 20px 18px; }
  .step__text { font-size: 15px; }

  .endbar { flex-direction: column; align-items: stretch; }
  .next { justify-content: center; }

  .footer { flex-direction: column; align-items: flex-start; }
}
