/* Docs prose styles */

/* Clear the sticky navbar when jumping to an anchored heading. */
.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  scroll-margin-top: 6rem;
  position: relative;
}

/* The # link each heading carries: hidden until the heading is hovered or the
   link itself is keyboard-focused. The strip spans the whole 1.5rem margin so
   the pointer never crosses a dead zone between heading and anchor, and the
   selectors carry .docs-content to outrank its generic link styling. */
.docs-content .heading-anchor {
  position: absolute;
  left: -1.5rem;
  width: 1.5rem;
  color: #94a3b8;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor,
.docs-content h4:hover .heading-anchor,
.docs-content .heading-anchor:focus-visible {
  opacity: 1;
}

.docs-content .heading-anchor:hover {
  color: #0f766e;
  text-decoration: none;
}

.docs-content h1 {
  font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 112.5;
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .docs-content h1 {
    font-size: 3rem;
    line-height: 3rem;
  }
}

.docs-content h2 {
  font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 112.5;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.docs-content h3 {
  font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 112.5;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.docs-content p {
  font-size: 1rem;
  line-height: 1.75rem;
  color: #475569;
  margin-bottom: 1rem;
}

.docs-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.docs-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.docs-content li {
  font-size: 1rem;
  line-height: 1.75rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.docs-content li > p {
  margin-bottom: 0.25rem;
}

.docs-content a {
  color: #0f766e;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content a.docs-cta {
  color: white;
  text-decoration: none;
}

.docs-content a.docs-cta:hover {
  text-decoration: none;
}

.docs-content code {
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #f1f5f9;
  color: #1e293b;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.docs-content .docs-code-block {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background-color: #0f172a;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  ring: 1px solid #1e293b;
  overflow: hidden;
}

.docs-content .docs-code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.docs-content .docs-code-block code {
  font-size: 0.875rem;
  line-height: 1.75rem;
  color: #cbd5e1;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
}

.docs-content th {
  text-align: left;
  font-weight: 600;
  color: #0f172a;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.docs-content td {
  padding: 0.5rem 0.75rem;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.docs-content hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2rem 0;
}

.docs-content blockquote {
  border-left: 3px solid #e2e8f0;
  padding-left: 1rem;
  margin-bottom: 1rem;
  color: #64748b;
}

/* Tabs */

.docs-tabs {
  margin-bottom: 1rem;
}

.docs-tabs-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.docs-tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.docs-tab:hover {
  color: #0f172a;
}

.docs-tab--active,
.docs-tab--active:hover {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

.docs-tabs-panels {
  display: grid;
}

.docs-tabs-panels > * {
  grid-area: 1 / 1;
  min-width: 0;
}

.docs-tabs-panel--hidden {
  visibility: hidden;
}

/* Rouge syntax highlighting - dark theme matching slate-900 blocks */

.docs-code-block .highlight .c,
.docs-code-block .highlight .c1,
.docs-code-block .highlight .cm,
.docs-code-block .highlight .cs { color: #64748b; font-style: italic; }

.docs-code-block .highlight .k,
.docs-code-block .highlight .kd,
.docs-code-block .highlight .kn,
.docs-code-block .highlight .kp,
.docs-code-block .highlight .kr,
.docs-code-block .highlight .kc { color: #c084fc; }

.docs-code-block .highlight .kt { color: #38bdf8; }

.docs-code-block .highlight .s,
.docs-code-block .highlight .s1,
.docs-code-block .highlight .s2,
.docs-code-block .highlight .sb,
.docs-code-block .highlight .sc,
.docs-code-block .highlight .sd,
.docs-code-block .highlight .sh { color: #4ade80; }

.docs-code-block .highlight .sr { color: #fb923c; }
.docs-code-block .highlight .si { color: #4ade80; }
.docs-code-block .highlight .sx { color: #4ade80; }
.docs-code-block .highlight .se { color: #fbbf24; }

.docs-code-block .highlight .na,
.docs-code-block .highlight .nb { color: #38bdf8; }

.docs-code-block .highlight .nc,
.docs-code-block .highlight .no { color: #fbbf24; }

.docs-code-block .highlight .nd { color: #38bdf8; }
.docs-code-block .highlight .ni { color: #cbd5e1; }
.docs-code-block .highlight .ne { color: #f87171; }

.docs-code-block .highlight .nf,
.docs-code-block .highlight .fm { color: #38bdf8; }

.docs-code-block .highlight .nl { color: #38bdf8; }
.docs-code-block .highlight .nn { color: #fbbf24; }

.docs-code-block .highlight .nt { color: #2dd4bf; }

.docs-code-block .highlight .nv,
.docs-code-block .highlight .vi,
.docs-code-block .highlight .vg,
.docs-code-block .highlight .vc { color: #f87171; }

.docs-code-block .highlight .o,
.docs-code-block .highlight .ow { color: #cbd5e1; }

.docs-code-block .highlight .p { color: #cbd5e1; }

.docs-code-block .highlight .m,
.docs-code-block .highlight .mi,
.docs-code-block .highlight .mf,
.docs-code-block .highlight .mh,
.docs-code-block .highlight .mo { color: #fb923c; }

.docs-code-block .highlight .ss { color: #2dd4bf; }

.docs-code-block .highlight .err { color: #f87171; }

.docs-code-block .highlight .gd { color: #f87171; }
.docs-code-block .highlight .gi { color: #4ade80; }

/* Device-frame screenshots */

.device-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin: 2.5rem 0;
  padding: 1rem 1rem 2rem;
  background: #f8fafc;
  border-radius: 20px;
  justify-content: center;
  align-items: stretch;
}

.device-row-header {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.device-row-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.device-row-toggle {
  display: inline-flex;
  background: #ffffff;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid #e2e8f0;
}

.device-row-toggle-btn {
  background: transparent;
  border: 0;
  padding: 0.3rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.device-row-toggle-btn--active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.device-row-toggle-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
  position: relative;
}

.device-row-toggle-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #f8fafc;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  z-index: 10;
}

.device-row-toggle-btn[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #0f172a;
  pointer-events: none;
  z-index: 10;
}

.device-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: stretch;
}

.device-note {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 360px;
  padding-top: 2rem;
  color: #475569;
}

.device-note p {
  font-family: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "wdth" 112.5;
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.device-note ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.device-note li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.device-note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #14b8a6;
}

.device {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-frame {
  --frame-padding: 8px;
  --frame-radius: 40px;
  --frame-image-radius: 32px;
  position: relative;
  padding: var(--frame-padding);
  background: #1d1d1f;
  border-radius: var(--frame-radius);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 36px -12px rgba(0, 0, 0, 0.28),
    0 8px 14px -8px rgba(0, 0, 0, 0.18);
  display: inline-block;
}

.device-frame img {
  display: block;
  width: auto;
  height: 420px;
  border-radius: var(--frame-image-radius);
}

/* Bezel size variants — pick one that matches how zoomed-in the cropped
   image is. Default bezel is 8px / 40px / 32px (full-screen scale).
   --bezel-md = ~1.5x zoom (e.g., 2/3 crop).
   --bezel-lg = ~3x zoom (e.g., 1/3 crop). */

.device-frame--bezel-md {
  --frame-padding: 14px;
  --frame-radius: 56px;
  --frame-image-radius: 42px;
}

.device-frame--bezel-lg {
  --frame-padding: 24px;
  --frame-radius: 80px;
  --frame-image-radius: 56px;
}

/* Cropped device frame — flat edge signals content extends beyond. */

.device-frame--cropped-bottom {
  padding-bottom: 0;
  border-radius: var(--frame-radius) var(--frame-radius) 0 0;
}

.device-frame--cropped-bottom img {
  border-radius: var(--frame-image-radius) var(--frame-image-radius) 0 0;
}

.device-frame--cropped-top {
  padding-top: 0;
  border-radius: 0 0 var(--frame-radius) var(--frame-radius);
}

.device-frame--cropped-top img {
  border-radius: 0 0 var(--frame-image-radius) var(--frame-image-radius);
}

/* Comparison row: two cropped devices side by side (e.g. closed vs. open).
   Shrink them and tighten the gap so both fit the docs content column
   (max-w-3xl / 768px); they wrap to stacked on narrow screens. */
.device-row--compare .device-group {
  gap: 1.5rem;
}

/* Match the smooth, generously-rounded iPhone corner of the callout frame
   (--callout-radius: 72px on a 360px crop) rather than the device frame's
   tighter 40px, which at this size read as a squared-off Android bezel. */
.device-row--compare .device-frame {
  --frame-padding: 12px;
  --frame-radius: 64px;
  --frame-image-radius: 52px;
}

.device-row--compare .device-frame img {
  height: 235px;
}

.device-android .device-frame {
  --frame-radius: 16px;
  --frame-image-radius: 8px;
}

.device-android .device-callout-frame {
  --callout-radius: 24px;
  --callout-image-radius: 16px;
}

.device figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

/* Generic region callout — SVG viewBox sets x,y,w,h in source pixel units */

.device-callout {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
}

.device-callout--bottom {
  align-self: flex-end;
}

.device-callout--top {
  align-self: flex-start;
}

.device-callout-frame {
  --callout-padding: 14px;
  --callout-radius: 72px;
  --callout-image-radius: 58px;
  background: #1d1d1f;
  padding: var(--callout-padding);
  display: inline-block;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.18);
}

.device-callout-frame svg {
  display: block;
  width: 360px;
  height: auto;
  background: #f2f2f7;
}

/* Bezel size variants. Default callout bezel is calibrated for ~1.5x zoom.
   --bezel-md is the default explicit name; --bezel-lg for ~3x zoom. */

.device-callout-frame--bezel-md {
  --callout-padding: 14px;
  --callout-radius: 72px;
  --callout-image-radius: 58px;
}

.device-callout-frame--bezel-lg {
  --callout-padding: 24px;
  --callout-radius: 96px;
  --callout-image-radius: 72px;
}

/* Anchor modifiers — use the modifier that matches which edge(s) of the
   source screenshot the cropped region touches. The frame mimics that part
   of the device: rounded only on the matching edges, no padding on the
   "open" edges where the crop continues into the screen interior. */

.device-callout-frame--bottom {
  padding-top: 0;
  border-radius: 0 0 var(--callout-radius) var(--callout-radius);
}

.device-callout-frame--bottom svg {
  border-radius: 0 0 var(--callout-image-radius) var(--callout-image-radius);
}

.device-callout-frame--top {
  padding-bottom: 0;
  border-radius: var(--callout-radius) var(--callout-radius) 0 0;
}

.device-callout-frame--top svg {
  border-radius: var(--callout-image-radius) var(--callout-image-radius) 0 0;
}

.device-callout-frame--left {
  padding-right: 0;
  border-radius: var(--callout-radius) 0 0 var(--callout-radius);
}

.device-callout-frame--left svg {
  border-radius: var(--callout-image-radius) 0 0 var(--callout-image-radius);
}

.device-callout-frame--right {
  padding-left: 0;
  border-radius: 0 var(--callout-radius) var(--callout-radius) 0;
}

.device-callout-frame--right svg {
  border-radius: 0 var(--callout-image-radius) var(--callout-image-radius) 0;
}

.device-callout-frame--bottom-right {
  padding-top: 0;
  padding-left: 0;
  border-radius: 0 0 var(--callout-radius) 0;
}

.device-callout-frame--bottom-right svg {
  border-radius: 0 0 var(--callout-image-radius) 0;
}

.device-callout-frame--bottom-left {
  padding-top: 0;
  padding-right: 0;
  border-radius: 0 0 0 var(--callout-radius);
}

.device-callout-frame--bottom-left svg {
  border-radius: 0 0 0 var(--callout-image-radius);
}

.device-callout-frame--top-right {
  padding-bottom: 0;
  padding-left: 0;
  border-radius: 0 var(--callout-radius) 0 0;
}

.device-callout-frame--top-right svg {
  border-radius: 0 var(--callout-image-radius) 0 0;
}

.device-callout-frame--top-left {
  padding-bottom: 0;
  padding-right: 0;
  border-radius: var(--callout-radius) 0 0 0;
}

.device-callout-frame--top-left svg {
  border-radius: var(--callout-image-radius) 0 0 0;
}

.device-callout figcaption {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

