/* MyDroid docs. Same tokens as the website's assets/css/style.css: light only, one blue accent. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafbfd;
  --white: #ffffff;
  --ink: #1b1f2a;
  --slate: #5a6272;
  --mist: #eef1f6;
  --rule: #dce1eb;
  --blue: #2f5bea;
  --blue-deep: #2448c4;
  --sky: #e8eeff;
  --sky-soft: #f3f6ff;
  --green: #17915a;
  --amber: #a15c07;
  --night: #121726;
  --night-text: #c9d1e3;
  --sans: "Schibsted Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --r-s: 6px;
  --r: 16px;
  --side: 272px;
  --lift: 0 24px 48px -28px rgba(27, 31, 42, .35);
  --out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-deep); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--sky); color: var(--blue-deep); padding: 0.1em 0.35em; border-radius: var(--r-s); overflow-wrap: anywhere; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: var(--r-s); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; }
.brand span { color: var(--slate); font-weight: 500; }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); color: var(--ink); font: 500 0.875rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn.primary:hover { background: var(--blue-deep); color: var(--white); }
.btn kbd { font-size: 0.75rem; color: var(--slate); }
.search-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn { display: none; }
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
/* Hamburger lines fold into an X while the sidebar is open, as on the website. */
.menu-btn path { transform-origin: 12px 12px; transition: transform .2s, opacity .15s; }
.menu-btn[aria-expanded="true"] path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] path:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Layout */
.layout { display: flex; }
.side { position: sticky; top: 64px; width: var(--side); flex: none; height: calc(100vh - 64px); overflow-y: auto; padding: 20px 12px 40px; border-right: 1px solid var(--rule); background: var(--white); }
.side .sec { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; padding: 6px 10px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.side .sec:hover { background: var(--mist); }
.side .ic { width: 28px; height: 28px; padding: 6px; flex: none; border-radius: var(--r-s); background: var(--mist); color: var(--slate); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side .sec.on { font-weight: 600; }
.side .sec.on .ic { background: var(--blue); color: var(--white); }
.side .sec[aria-current] { background: var(--sky); color: var(--blue-deep); }
/* Pages of the open section hang off a rail lined up under its icon. */
.side .pages { margin: 4px 0 12px 23px; padding-left: 0; border-left: 1px solid var(--rule); }
.side .pages a { display: block; margin-left: -1px; padding: 6px 12px 6px 18px; border-left: 2px solid transparent; color: var(--slate); text-decoration: none; font-size: 0.9375rem; line-height: 1.4; }
.side .pages a:hover { color: var(--ink); }
.side .pages a[aria-current] { color: var(--blue-deep); font-weight: 600; border-left-color: var(--blue); }
main { flex: 1; min-width: 0; display: flex; gap: 48px; padding: 40px 48px 80px; }
.doc { flex: 1; min-width: 0; max-width: 760px; }
.toc { position: sticky; top: 104px; align-self: flex-start; width: 200px; border-left: 1px solid var(--rule); flex: none; font-size: 0.875rem; }
.toc strong { display: block; margin-bottom: 10px; padding-left: 14px; font-size: 0.8125rem; color: var(--ink); font-weight: 600; }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--slate); text-decoration: none; line-height: 1.45; transition: color .15s var(--out), border-color .15s var(--out); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--blue-deep); border-left-color: var(--blue); font-weight: 500; }

/* Page content */
.crumbs { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 0.875rem; }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--blue-deep); }
.crumbs a:last-child { color: var(--blue-deep); font-weight: 500; }
.crumbs svg { width: 14px; height: 14px; fill: none; stroke: var(--slate); opacity: .5; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.doc h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; }
.doc .lead { margin: 0 0 32px; font-size: 1.125rem; color: var(--slate); max-width: 64ch; }
.doc h2 { margin: 48px 0 12px; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.anchor { margin-left: 8px; color: var(--slate); text-decoration: none; font-weight: 500; opacity: 0; transition: opacity .15s; }
h2:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--blue); }
.doc h3 { margin: 28px 0 8px; font-size: 1.125rem; letter-spacing: -0.01em; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; max-width: 70ch; }
.doc li { margin: 4px 0; }
.code { position: relative; margin: 0 0 20px; }
.copy { position: absolute; top: 10px; right: 10px; height: 28px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--night-text); font: 500 0.75rem var(--sans); cursor: pointer; opacity: 0; transition: opacity .15s var(--out), background-color .15s var(--out); }
.code:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@media (hover: none) { .copy { opacity: 1; } }
.doc pre { margin: 0; padding: 16px 72px 16px 18px; background: var(--night); color: var(--night-text); border-radius: var(--r-s); overflow-x: auto; font-size: 0.875rem; line-height: 1.6; }
.doc pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.table { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--white); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.doc th, .doc td { padding: 11px 16px; border-bottom: 1px solid var(--mist); text-align: left; vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font-size: 0.8125rem; font-weight: 600; color: var(--slate); background: var(--paper); border-bottom-color: var(--rule); }
.doc td:first-child { font-weight: 500; min-width: 140px; }
.doc kbd { padding: 1px 6px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: var(--r-s); background: var(--white); font-size: 0.8125rem; }
.ui { font-weight: 600; }
.note { margin: 0 0 20px; padding: 14px 16px; border-left: 3px solid var(--blue); background: var(--sky-soft); border-radius: 0 var(--r-s) var(--r-s) 0; max-width: 70ch; }
.note.warn { border-left-color: var(--amber); background: #fff7ea; }
.note strong:first-child { display: block; margin-bottom: 2px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 0 0 14px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: var(--blue-deep); font-weight: 700; font-size: 0.8125rem; display: grid; place-items: center; }
.shot-img { display: block; max-width: 100%; height: auto; margin: 0 0 20px; border: 1px solid var(--rule); border-radius: var(--r-s); }
.shot-phone { max-width: 320px; }
.shot { margin: 0 0 20px; padding: 28px; border: 1px dashed var(--rule); border-radius: var(--r); color: var(--slate); text-align: center; font-size: 0.875rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--rule); }
.pager a { display: block; padding: 16px 20px; border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 600; background: var(--white); box-shadow: 0 0 0 1px var(--rule); transition: box-shadow .15s var(--out); }
.pager a:hover { box-shadow: 0 0 0 1px var(--blue), var(--lift); }
.pager small { display: block; margin-bottom: 2px; color: var(--slate); font-weight: 400; font-size: 0.8125rem; }
.pager .prev small::before { content: "\2190  "; }
.pager .next small::after { content: "  \2192"; }
.pager .next { grid-column: 2; text-align: right; }

/* Footer: one quiet line under the content. */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--slate); }
.pager + .foot { border-top: 0; padding-top: 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--slate); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Search dialog: pinned near the top so it does not jump as results change. */
dialog.search { width: min(640px, calc(100vw - 32px)); max-height: min(560px, 76vh); margin: 12vh auto auto; padding: 0; border: 0; border-radius: var(--r); box-shadow: 0 0 0 1px var(--rule), 0 32px 64px -24px rgba(18, 23, 38, .4); overflow: hidden; }
dialog.search[open] { display: flex; flex-direction: column; }
dialog.search::backdrop { background: rgba(18, 23, 38, .35); }
.search .q { flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--rule); color: var(--slate); }
.search .q svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: 400 1.0625rem var(--sans); color: var(--ink); outline: none; }
.search kbd { padding: 1px 7px; border: 1px solid var(--rule); border-radius: var(--r-s); background: var(--white); font-size: 0.75rem; color: var(--slate); }
.search ul { flex: 1; list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search li a { display: block; padding: 10px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; line-height: 1.4; }
.search li[aria-selected="true"] a { background: var(--sky); }
.search .t { display: block; font-weight: 600; }
.search .p { display: block; margin-top: 1px; font-size: 0.8125rem; color: var(--slate); }
.search .s { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--slate); }
.search mark { background: none; color: var(--blue-deep); font-weight: 600; }
.search .empty { padding: 20px 12px; color: var(--slate); }
.search .empty strong { color: var(--ink); }
.search .group { padding: 8px 12px 4px; font-size: 0.8125rem; font-weight: 600; color: var(--slate); }
.search .keys { flex: none; display: flex; gap: 20px; padding: 10px 20px; border-top: 1px solid var(--rule); background: var(--paper); font-size: 0.8125rem; color: var(--slate); }
.search .keys kbd { margin-right: 3px; }
@media (max-width: 560px), (hover: none) { .search .keys, .search .q kbd { display: none; } }
@media (max-width: 560px) { dialog.search { margin-top: 16px; max-height: calc(100dvh - 32px); } }

/* Docs home */
.home { max-width: 1080px; margin: 0 auto; padding: 56px 24px 80px; }
.home h1 { margin: 0 0 12px; font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -0.03em; line-height: 1.05; }
.home > p { margin: 0 0 28px; font-size: 1.125rem; color: var(--slate); max-width: 60ch; }
.find { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 600px; height: 52px; margin-bottom: 48px; padding: 0 16px 0 20px; border: 0; border-radius: 999px; background: var(--white); box-shadow: 0 0 0 1px var(--rule); color: var(--slate); font: 400 1rem var(--sans); cursor: text; text-align: left; transition: box-shadow .15s var(--out); }
.find:hover { box-shadow: 0 0 0 1px var(--blue); }
.find svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.find span { flex: 1; }
.find kbd { padding: 2px 8px; border: 1px solid var(--rule); border-radius: var(--r-s); font-size: 0.75rem; color: var(--slate); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: 24px; border-radius: var(--r); background: var(--white); color: var(--ink); text-decoration: none; box-shadow: 0 0 0 1px var(--rule); transition: box-shadow .15s var(--out); }
.card:hover { box-shadow: 0 0 0 1px var(--blue), var(--lift); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
/* Same icon tile as the website's feature list. */
.card .ic { width: 40px; height: 40px; padding: 9px; flex: none; border-radius: var(--r-s); background: var(--white); color: var(--blue); box-shadow: 0 0 0 1px var(--rule) inset; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card h2 { margin: 0; font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.25; }
.tag { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--sky); color: var(--blue-deep); font: 600 0.75rem/1.6 var(--sans); white-space: nowrap; }
.card p { margin: 0 0 20px; color: var(--slate); font-size: 0.9375rem; line-height: 1.6; }
/* Pinned to the bottom so the footers line up across a row. */
.more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding-top: 16px; border-top: 1px solid var(--mist); color: var(--blue-deep); font-size: 0.875rem; font-weight: 600; }
.more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s var(--out); }
.card:hover .more svg { transform: translateX(3px); }
@media (max-width: 560px) { .find kbd { display: none; } .find { margin-bottom: 36px; } }

@media (max-width: 1100px) { .toc { display: none; } }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .top { padding: 0 16px; }
  .top-links .wide, .btn kbd, .search-btn .lbl { display: none; }
  /* Logo centred: menu on the left, search icon on the right. */
  .top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .menu-btn { grid-column: 1; justify-self: start; }
  .brand { grid-column: 2; }
  .top-links { grid-column: 3; justify-self: end; margin-left: 0; }
  .search-btn, .menu-btn { width: 36px; padding: 0; justify-content: center; }
  .search-btn svg { width: 18px; height: 18px; }
  .side { position: fixed; z-index: 25; left: 0; top: 64px; transform: translateX(-100%); transition: transform .2s var(--out); box-shadow: var(--lift); }
  .side.open { transform: none; }
  main { padding: 28px 16px 64px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .side, .menu-btn path, .find, .card, .more svg, .toc a, .anchor, .copy, .pager a { transition: none; } .card:hover .more svg { transform: none; } }
