/* Origin shared brand: tokens + components used by ø.co and Plugs. */
:root {
  --bg: #000104;
  --bg-2: #05070d;
  --ink: #f3ece0;
  --ink-2: #bcb5a9;
  --ink-3: #7d786f;
  --gold: #e8c47e;
  --gold-hi: #fbe3ae;
  --gold-lo: #a9803f;
  --line: rgba(232, 196, 126, 0.18);
  --line-2: rgba(243, 236, 224, 0.08);
  --yes: #9fd8a8;
  --no: #f1a08f;
  --blue: #9cc3ff;
  --r-lg: 22px;
  --r-md: 14px;
  --f-head: "Jost", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 900px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* icon tile */
.ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--gold); background: radial-gradient(120% 120% at 30% 20%, rgba(232,196,126,.16), rgba(232,196,126,.03)); border: 1px solid var(--line); }
.ico svg { width: 24px; height: 24px; }
.ico--lg { width: 64px; height: 64px; border-radius: 18px; }
.ico--lg svg { width: 34px; height: 34px; }
.ico--sm { width: 32px; height: 32px; border-radius: 10px; }
.ico--sm svg { width: 18px; height: 18px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 11.5px/1.4 var(--f-body); white-space: nowrap; }
.pill--live { color: var(--yes); background: rgba(159,216,168,.1); border: 1px solid rgba(159,216,168,.28); }
.pill--draft { color: var(--gold); background: rgba(232,196,126,.1); border: 1px solid var(--line); }
.pill--plan { color: var(--blue); background: rgba(156,195,255,.08); border: 1px solid rgba(156,195,255,.25); }
.pill--free { color: var(--ink-2); background: rgba(255,255,255,.04); border: 1px solid var(--line-2); }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.verified::after { content: "✓"; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); color: #1a1206; font-size: 9px; font-weight: 700; }


/* code */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line-2); scrollbar-width: none; }
.tab { flex: none; border: 0; background: none; cursor: pointer; padding: 9px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.code { position: relative; }
.code pre { margin: 0; padding: 16px; max-height: 440px; overflow: auto; background: rgba(0,0,0,.5); border: 1px solid var(--line-2); border-radius: var(--r-md); font: 12.5px/1.65 var(--f-mono); color: #e6dfd2; }
.tabs + .code pre { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.tok-k { color: #e8c47e; } .tok-t { color: var(--blue); } .tok-c { color: #6f6a62; font-style: italic; } .tok-s { color: #b7dba0; } .tok-n { color: #f0b48a; }

/* definition rows */
.rows { margin: 0; display: grid; grid-template-columns: minmax(96px, auto) 1fr; border-top: 1px solid var(--line-2); }
.rows dt, .rows dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.rows dt { color: var(--ink-3); padding-right: 14px; }
.rows dd { font-family: var(--f-mono); font-size: 12.75px; overflow-wrap: anywhere; }

/* search field (shared look) */
.sf { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 16px; border-radius: 999px; background: rgba(12,16,28,.72); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.sf:focus-within { border-color: rgba(232,196,126,.55); box-shadow: 0 0 0 4px rgba(232,196,126,.1); }
.sf input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 400 16px/1.2 var(--f-body); padding: 9px 0; }
.sf input::placeholder { color: var(--ink-3); }


/* tabs: underline only, no focus box on click */
.tab:focus { outline: none; }
.tab:focus-visible { outline: none; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* ── Built on Origin badge showcase ────────────────── */
@property --bsweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.bs {
  position: relative; padding: 22px; border-radius: 22px;
  border: 1px solid transparent;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(232,196,126,.10), transparent 55%) padding-box,
    linear-gradient(160deg, rgba(14,17,28,.97), rgba(4,6,11,.97)) padding-box,
    conic-gradient(from var(--bsweep), rgba(232,196,126,.08) 0deg, rgba(251,227,174,.9) 45deg, rgba(232,196,126,.08) 100deg, rgba(232,196,126,.08) 360deg) border-box;
  box-shadow: 0 30px 80px -40px rgba(232,196,126,.55);
  animation: bsweep 8s linear infinite;
}
@keyframes bsweep { to { --bsweep: 360deg; } }
@media (prefers-reduced-motion: reduce) { .bs { animation: none; } }
.bs__head { display: flex; gap: 16px; align-items: flex-start; }
.bs__ring { flex: none; position: relative; width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 22px rgba(232,196,126,.5), inset 0 0 12px rgba(232,196,126,.25); margin-top: 2px; }
.bs__ring::after { content: ""; position: absolute; left: 50%; top: 50%; width: 72px; height: 2.5px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold-hi) 35%, #fff 60%, transparent); transform: translate(-50%, -50%) rotate(-38deg); }
.bs__k { margin: 0 0 4px; font: 500 11.5px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.bs__t { margin: 0 0 6px; font: 300 clamp(24px, 6vw, 32px)/1.15 var(--f-head); color: var(--ink); }
.bs__p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

.bs__stage { position: relative; margin: 20px 0 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #0a0c14; min-height: 190px; transition: background .25s; }
.bs__stage[data-theme="light"] { background: #f6f3ec; border-color: rgba(0,0,0,.08); }
.bs__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); }
.bs__stage[data-theme="light"] .bs__bar { background: rgba(0,0,0,.035); border-bottom-color: rgba(0,0,0,.06); }
.bs__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.bs__stage[data-theme="light"] .bs__bar i { background: rgba(0,0,0,.15); }
.bs__bar span { margin-left: 10px; padding: 3px 12px; border-radius: 999px; font: 11.5px var(--f-mono); color: var(--ink-3); background: rgba(255,255,255,.05); }
.bs__stage[data-theme="light"] .bs__bar span { color: #6b665c; background: rgba(0,0,0,.05); }
.bs__page { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 9px; }
.bs__line { height: 9px; width: 78%; border-radius: 5px; background: rgba(255,255,255,.07); }
.bs__line--h { height: 14px; width: 46%; background: rgba(232,196,126,.22); }
.bs__line--s { width: 58%; }
.bs__stage[data-theme="light"] .bs__line { background: rgba(0,0,0,.07); }
.bs__stage[data-theme="light"] .bs__line--h { background: rgba(138,100,32,.25); }
.bs__inline { margin-top: 10px; min-height: 34px; }
.bs__float { position: absolute; right: 12px; bottom: 12px; }

.bs__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bs__seg { display: inline-flex; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line-2); }
.bs__seg button { border: 0; background: none; cursor: pointer; padding: 7px 12px; border-radius: 5px; font-size: 13px; color: var(--ink-3); }
.bs__seg button[aria-checked="true"] { background: rgba(232,196,126,.16); color: var(--gold-hi); }
.bs__seg button:focus { outline: none; }
.bs__seg button:focus-visible { box-shadow: 0 0 0 2px var(--gold); }

.bs__code { border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.5); overflow: hidden; }
.bs__fmt { padding: 8px 8px 0; }
.bs__fmt .bs__seg { background: transparent; border: 0; padding: 0; }
.bs__code pre { margin: 0; padding: 12px 16px 16px; overflow-x: auto; font: 12.5px/1.65 var(--f-mono); color: #e6dfd2; }
.bs__copy { width: 100%; margin-top: 14px; padding: 14px 18px; font-size: 16px; }
.bs--compact { padding: 18px; }
.bs--compact .bs__stage { min-height: 160px; }

/* ══ Buttons: one system everywhere (iOS-style, Origin gold) ══════════
   .btn            filled gold, black text (primary)
   .btn--tint      soft gold fill, gold text (secondary)      alias: .btn--ghost
   .btn--gray      quiet gray fill, gold text (tertiary)
   .btn--pill      capsule shape        .btn--sm / .btn--lg / .btn--block
   .icon-btn       round icon button    .icon-btn--fill = gold
   No shadows, no movement: a soft color shift on hover, a dim on press. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; cursor: pointer;
  font: 600 15px/1 var(--f-body); letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  color: #000; background: #e8c47e; box-shadow: none;
  transition: background-color .15s ease, opacity .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: #000; background: #f1d196; }
.btn:active { opacity: .72; }
.btn:focus-visible { outline: 2px solid #fbe3ae; outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--tint, .btn--ghost { color: #fbe3ae; background: rgba(232,196,126,.15); }
.btn--tint:hover, .btn--ghost:hover { color: #fbe3ae; background: rgba(232,196,126,.24); }
.btn--gray { color: #fbe3ae; background: rgba(255,255,255,.08); }
.btn--gray:hover { color: #fbe3ae; background: rgba(255,255,255,.13); }
.btn--pill { border-radius: 999px; }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16.5px; border-radius: 14px; }
.btn--sm.btn--pill, .btn--lg.btn--pill { border-radius: 999px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fbe3ae; background: rgba(255,255,255,.08);
  transition: background-color .15s ease, opacity .12s ease; -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: rgba(255,255,255,.13); }
.icon-btn:active { opacity: .72; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn--fill { color: #000; background: #e8c47e; }
.icon-btn--fill:hover { background: #f1d196; }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn--sm svg { width: 17px; height: 17px; }

/* the search arrow is a round filled icon button */
.sf__go { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #e8c47e; transition: background-color .15s ease, opacity .12s ease; }
.sf__go:hover { background: #f1d196; }
.sf__go:active { opacity: .72; }
.sf__go svg { width: 18px; height: 18px; fill: none; stroke: #000; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* copy buttons on code blocks: small gray capsule */
.copy { position: absolute; top: 8px; right: 8px; min-height: 28px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer; font: 600 12px/1 var(--f-body); color: #fbe3ae; background: rgba(255,255,255,.1); transition: background-color .15s ease, opacity .12s ease; }
.copy:hover { background: rgba(255,255,255,.16); }
.copy:active { opacity: .72; }
