@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=DM+Sans:wght@400;500;600&family=Hind+Siliguri:wght@400;500;600&display=swap');
:root { --o: #0d6efd; --od: #0b5ed7; --osoft: #eaf2ff; --ink: #111827; --mut: #6b7280; --line: #e5e7eb; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'DM Sans', 'Hind Siliguri', system-ui, sans-serif; color: var(--ink); background: #fafafa; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Manrope', 'Hind Siliguri', sans-serif; letter-spacing: -.02em; margin: 0; }
a { color: var(--od); text-decoration: none; }
.dh-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.dh-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.dh-bar { max-width: 1100px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.dh-burger { width: 38px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafb; color: #374151; display: grid; place-items: center; cursor: pointer; }
.dh-logo img { max-height: 32px; width: auto; display: block; }
.dh-bar .dh-btn { margin-left: auto; }
.dh-menu { display: none; border-top: 1px solid var(--line); background: #fff; padding: 8px 16px 12px; }
.dh-menu.open { display: block; animation: dh-in .2s ease both; }
.dh-menu a { display: block; padding: 11px 6px; color: #374151; font-weight: 500; border-bottom: 1px solid #f3f4f6; }
.dh-menu a:hover { color: var(--od); }
@media (min-width: 900px) { .dh-burger { display: none; } .dh-menu { display: flex !important; position: absolute; left: 50%; top: 0; transform: translateX(-50%); height: 64px; border: 0; padding: 0; background: transparent; gap: 4px; align-items: center; } .dh-menu a { border: 0; padding: 8px 12px; border-radius: 8px; } .dh-menu a:hover { background: var(--osoft); } .dh-logo { margin-right: auto; } }

.dh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background-color .15s, border-color .15s, transform .12s; }
.dh-btn:active { transform: scale(.97); }
.dh-btn-fill { background: var(--o); border-color: var(--od); color: #fff; } .dh-btn-fill:hover { background: var(--od); color: #fff; }
.dh-btn-line { background: #fff; border-color: #d1d5db; color: var(--ink); } .dh-btn-line:hover { border-color: var(--o); color: var(--od); background: #f0f6ff; }
.dh-btn-lg { height: 46px; font-size: 16px; }

.dh-hero { padding: 48px 0 40px; text-align: center; animation: dh-in .6s ease both; }
.dh-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #9ec5fe; background: var(--osoft); color: var(--od); font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 6px; }
.dh-hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.1; font-weight: 800; margin: 22px auto 14px; max-width: 14em; }
.dh-hero p { color: var(--mut); font-size: 17px; line-height: 1.65; max-width: 36em; margin: 0 auto 24px; }
.dh-actions { display: grid; gap: 10px; max-width: 560px; margin: 0 auto 22px; }
@media (min-width: 640px) { .dh-actions { display: flex; justify-content: center; max-width: none; } }
.dh-actions-left { justify-content: flex-start; margin: 14px 0 0; display: flex; flex-wrap: wrap; }
.dh-search { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 0 14px; height: 46px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafb; color: #9ca3af; }
.dh-search:focus-within { border-color: var(--o); background: #fff; }
.dh-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); outline: 0; min-width: 0; }

.dh-strip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dh-strip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding-top: 24px; padding-bottom: 24px; text-align: center; }
@media (min-width: 800px) { .dh-strip-grid { grid-template-columns: repeat(4, 1fr); } }
.dh-strip-grid b { display: block; font-family: 'Manrope', sans-serif; font-size: 17px; margin-bottom: 4px; }
.dh-strip-grid span { color: var(--mut); font-size: 14.5px; }

.dh-cats { padding: 44px 0 56px; }
.dh-cats h2 { font-size: 26px; font-weight: 800; }
.dh-sub { color: var(--mut); margin: 6px 0 22px; font-size: 16px; }
.dh-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .dh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .dh-grid { grid-template-columns: repeat(3, 1fr); } }
.dh-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; animation: dh-up .5s ease both; }
.dh-card:nth-child(2) { animation-delay: .05s; } .dh-card:nth-child(3) { animation-delay: .1s; } .dh-card:nth-child(4) { animation-delay: .15s; } .dh-card:nth-child(5) { animation-delay: .2s; } .dh-card:nth-child(6) { animation-delay: .25s; }
.dh-card:hover { border-color: #9ec5fe; transform: translateY(-3px); }
.dh-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dh-ico { width: 40px; height: 38px; border-radius: 8px; background: #f3f4f6; border: 1px solid var(--line); color: var(--o); display: grid; place-items: center; }
.dh-tag { font-size: 13px; font-weight: 600; color: var(--od); background: var(--osoft); border: 1px solid #cfe2ff; border-radius: 6px; padding: 3px 10px; }
.dh-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.dh-card p { color: var(--mut); line-height: 1.6; margin: 0 0 18px; flex: 1; font-size: 15px; }
.dh-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; padding-top: 14px; border-top: 1px solid #f3f4f6; }
.dh-link svg { transition: transform .2s; } .dh-card:hover .dh-link svg { transform: translateX(4px); }
.dh-none { text-align: center; color: var(--mut); padding: 24px 0; }
.dh-help { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.dh-help h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.dh-help p { margin: 0; color: var(--mut); line-height: 1.6; }

.dh-footer { background: #fff; border-top: 1px solid var(--line); padding: 22px 0; text-align: center; color: var(--mut); }
.dh-footer p { margin: 0 0 10px; }
.dh-flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.dh-flinks a { color: #4b5563; font-size: 14.5px; } .dh-flinks a:hover { color: var(--od); }
@keyframes dh-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dh-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
#ui-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: #0d6efd; transform-origin: left; transform: scaleX(0); z-index: 100; pointer-events: none; }
#ui-top { position: fixed; right: 16px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #9ec5fe; background: #fff; color: #0b5ed7; display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .25s, transform .25s; }
#ui-top.show { opacity: 1; transform: none; pointer-events: auto; }


/* =========================================================
   Docs inner pages (API reference)
   ========================================================= */
.dd-side-btn { display: grid; }
.dd-body .docs-wrapper { display: block; }
.dd-body .docs-sidebar { position: fixed; left: 0; top: 64px; bottom: 0; width: min(290px, 84vw); background: #fff; border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; transform: translateX(-102%); transition: transform .25s ease; }
.dd-body.dd-open .docs-sidebar { transform: none; }
.dd-body.dd-open::after { content: ''; position: fixed; inset: 64px 0 0 0; background: rgba(17,24,39,.4); z-index: 30; }
.dd-body .docs-nav ul { list-style: none; margin: 0; padding: 12px; display: block; }
.dd-body .docs-nav .nav-link { display: block; padding: 8px 12px; border-radius: 8px; color: #4b5563; font-size: 14.5px; transition: background-color .15s, color .15s; }
.dd-body .docs-nav .nav-link:hover { background: #f0f6ff; color: var(--od); }
.dd-body .docs-nav .nav-link.active { background: var(--osoft); color: var(--od); font-weight: 600; }
.dd-body .docs-nav .section-title .nav-link { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #111827; margin-top: 10px; }
.dd-body .theme-icon-holder { width: 26px; height: 26px; border-radius: 7px; background: var(--osoft); color: var(--o); display: grid; place-items: center; font-size: 12px; margin: 0 !important; }
.dd-body .top-search-box { padding: 12px 12px 0 !important; }
.dd-body .search-form { position: relative; }
.dd-body .search-input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 38px 0 12px; font: inherit; background: #f9fafb; outline: 0; }
.dd-body .search-input:focus { border-color: var(--o); background: #fff; }
.dd-body .search-btn { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; background: transparent; color: #9ca3af; cursor: pointer; }
.dd-body .docs-content { padding: 18px 14px 40px; }
.dd-body .docs-content .container { max-width: 880px; margin: 0 auto; }
.dd-body .docs-article { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; scroll-margin-top: 80px; }
.dd-body .docs-heading { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.dd-body .docs-time { display: block; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 400; color: #9ca3af; margin-top: 4px; }
.dd-body .docs-intro p, .dd-body .docs-section p { color: #4b5563; line-height: 1.7; margin: 0 0 12px; }
.dd-body .docs-section { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); scroll-margin-top: 80px; }
.dd-body .section-heading { font-size: 19px; font-weight: 800; margin: 0 0 10px; }
.dd-body h2[xss] { font-size: 15px; font-weight: 700; margin: 16px 0 6px; font-family: 'DM Sans', sans-serif; letter-spacing: 0; }
.dd-body p[xss] { position: relative; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 44px 10px 12px; color: #111827 !important; word-break: break-all; }
.dd-copy { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; color: #6b7280; cursor: pointer; display: grid; place-items: center; }
.dd-copy:hover { border-color: var(--o); color: var(--od); }
.dd-body .text-info { color: var(--od) !important; font-weight: 500; }
.dd-body .text-warning { color: #b45309 !important; }
.dd-body .table-responsive { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.dd-body .table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.dd-body .table th { text-align: left; background: #f9fafb; color: #6b7280; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dd-body .table td { padding: 11px 14px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: top; }
.dd-body .table tr:last-child td { border-bottom: 0; }
.dd-body .table td:first-child { font-family: ui-monospace, Menlo, monospace; color: #111827; font-weight: 600; }
.dd-body .btn.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--o); border: 1px solid var(--od); color: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 600; margin: 4px 0; }
.dd-body .btn.btn-primary:hover { background: var(--od); }
.dd-body .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .dd-body .row { grid-template-columns: 1fr 1fr; } }
.dd-body .list { list-style: none; padding: 0; margin: 0; }
.dd-body .list li { padding: 5px 0; color: #4b5563; }
.dd-body .docs-content pre { background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; font-size: 13px; }
.dd-body .docs-content code { background: #f3f4f6; padding: 1px 6px; border-radius: 5px; }
.dd-body .dd-top-menu { display: none; }
.dd-body .dh-bar { gap: 10px; }
@media (min-width: 1000px) {
  .dd-body .docs-wrapper { display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }
  .dd-body .docs-sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); transform: none; z-index: 1; }
  .dd-body.dd-open::after { display: none; }
  .dd-body .dd-side-btn { display: none; }
  .dd-body .docs-content { padding: 26px 24px 50px; }
}
@media (max-width: 899px) { .dd-body .dd-top-menu { display: grid; } }

/* v8 smaller + ring button */
.dh-bar { height: 56px; } .dh-logo img { max-height: 28px; }
.dd-body .docs-sidebar, .dd-body.dd-open::after { top: 56px; } .dd-body.dd-open::after { inset: 56px 0 0 0; }
.dh-hero { padding: 32px 0 26px; } .dh-hero h1 { font-size: clamp(25px, 6.5vw, 40px); } .dh-hero p { font-size: 15px; }
.dh-btn-lg { height: 42px; font-size: 14.5px; } .dh-btn { height: 34px; font-size: 13.5px; }
.dh-search { height: 42px; }
.dh-cats { padding: 30px 0 40px; } .dh-cats h2 { font-size: 22px; } .dh-card { padding: 16px; } .dh-card h3 { font-size: 16.5px; } .dh-card p { font-size: 14px; }
.dh-strip-grid b { font-size: 15px; } .dh-strip-grid span { font-size: 13.5px; }
#ui-progress { display: none !important; }
#ui-top { position: fixed; right: 14px; bottom: 16px; width: 44px; height: 44px; padding: 0; border: 0 !important; border-radius: 50%; background: #fff !important; color: #0b5ed7; display: grid; place-items: center; cursor: pointer; z-index: 900; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
#ui-top.show { opacity: 1; transform: none; pointer-events: auto; }
#ui-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#ui-top .ring-bg { fill: #fff; stroke: #cfe2ff; stroke-width: 3; }
#ui-top .ring-fg { fill: none; stroke: #0d6efd; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .1s linear; }
#ui-top .arrow { position: relative; stroke: #0b5ed7; }
.dd-body .docs-heading { font-size: 20px; } .dd-body .section-heading { font-size: 16.5px; }
