/* The widgets other websites embed (/embed/<type>, src/embed.js). A page of its own, not the site's shell: system
   fonts only, nothing from another host. Two palettes, the site's default (Midnight Cyan) in light and dark, copied
   from the top of app.css: keep them in step. data-theme on <html> picks one; without it (theme=auto) the reader's
   device decides. The page is transparent with a subtle border, so it sits on any site. */
:root{--panel:#e8f0fc;--ink:#071630;--muted:#4f5f7c;--line:#d6e1f2;--line2:#c5ccd6;--brass:#006fbf;--on-accent:#ffffff;--idle:#9fa7b4;--up:#007a52;--down:#d0213f;--bg:#f5f9ff;color-scheme:light}
:root[data-theme=dark]{--panel:#0d1424;--ink:#e6f1ff;--muted:#7d8ba6;--line:#1a2440;--line2:#32373f;--brass:#00d1ff;--on-accent:#05080f;--idle:#565c65;--up:#00e08a;--down:#ff4d6d;--bg:#05080f;color-scheme:dark}
@media (prefers-color-scheme:dark){
  :root:not([data-theme]){--panel:#0d1424;--ink:#e6f1ff;--muted:#7d8ba6;--line:#1a2440;--line2:#32373f;--brass:#00d1ff;--on-accent:#05080f;--idle:#565c65;--up:#00e08a;--down:#ff4d6d;--bg:#05080f;color-scheme:dark}
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;background:transparent;height:100%}
body{color:var(--ink);font:400 14px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-text-size-adjust:100%}
a{color:inherit;text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px;border-radius:4px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.num{font-variant-numeric:tabular-nums}
.up{color:var(--up)}
.down{color:var(--down)}
.sym{color:var(--muted);font-weight:500;font-size:.85em}
p{margin:0}
/* The frame of every widget: as tall as the frame it is in, the credit line at the foot. */
/* The credit line never shrinks: when the frame is smaller than the widget, the figures above it are cut, never the
   credit. */
.w{display:flex;flex-direction:column;gap:6px;height:100%;min-height:0;padding:10px 12px;border:1px solid var(--line2);border-radius:8px;overflow:hidden}
.w>*{min-height:0;flex-shrink:1;overflow:hidden}
.w>.credit{flex:none;overflow:visible}
/* Headings and the parts inside a widget keep their height; only whole blocks are cut. */
.w>.w-h,.pw>*,.fg>*,.cv>*,.hx>*{flex:none}
.w-h{margin:0;font-size:1rem;font-weight:650;line-height:1.25}
.w-h a{text-decoration:none}
.w-h a:hover{text-decoration:underline}
.w-when{font-size:.75rem;color:var(--muted)}
.credit{margin-top:auto;padding-top:4px;font-size:.75rem;color:var(--muted)}
.credit a{color:var(--ink);font-weight:600}
.w-none{justify-content:center}

/* price */
.pw{display:flex;flex-direction:column;gap:4px;min-width:0}
.pw-h{margin:0;font-size:1rem;font-weight:650;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw-h a{text-decoration:none}
.pw-h a:hover{text-decoration:underline}
.pw-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.pw-p{font-size:clamp(1.2rem,7vw,1.75rem);font-weight:700;line-height:1.15;min-width:0;overflow-wrap:anywhere}
.pw-u{display:block;font-size:.75rem;font-weight:500;color:var(--muted)}
.pw-sp{flex:none;color:var(--brass);line-height:0}
.pw-sp .up{color:var(--up)}
.pw-sp .down{color:var(--down)}
.pw-c{font-size:.875rem;color:var(--muted)}
.pw-c .num{font-weight:650}
.spark{display:inline-block}
.spark polyline{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
@media (max-width:280px){.pw-sp{display:none}}

/* ticker: one row that the reader can scroll sideways; embed.js makes it move by itself when it is wider than the
   frame, unless the reader's device asks for less motion. It pauses while a pointer or the keyboard is on it. */
.w>.tk{flex:none;overflow-x:auto;scrollbar-width:thin;margin:0 -2px}
.tk-row{display:flex;flex-wrap:nowrap;gap:22px;width:max-content;list-style:none;margin:0;padding:4px 2px}
.tk-i{white-space:nowrap;font-size:.9375rem}
.tk-i a{text-decoration:none}
.tk-i a:hover{text-decoration:underline}
.tk-i .num{margin-left:4px}
.tk-t{font-size:.6875rem;color:var(--muted);border:1px solid var(--line2);border-radius:4px;padding:0 4px;margin-left:4px;vertical-align:1px}
.w>.tk.run{overflow:hidden}
/* Padding rather than a gap while it runs, so that the second copy starts exactly half way along. */
.tk.run .tk-row{gap:0}
.tk.run .tk-i{padding-right:22px}
.tk.run .tk-row{animation:tk var(--tk-s,40s) linear infinite}
.tk.run:hover .tk-row,.tk.run:focus-within .tk-row{animation-play-state:paused}
@keyframes tk{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.w>.tk.run{overflow-x:auto}.tk.run .tk-row{animation:none}}

/* the largest coins */
.ct{width:100%;border-collapse:collapse;font-size:.875rem}
.ct th,.ct td{padding:7px 4px;border-bottom:1px solid var(--line);text-align:left;font-weight:400;white-space:nowrap}
.ct thead th{font-size:.75rem;color:var(--muted);font-weight:600;padding-top:2px}
.ct .num{text-align:right}
.ct tbody th{font-weight:600;overflow:hidden;text-overflow:ellipsis;max-width:0;width:100%}
.ct tbody th a{text-decoration:none}
.ct tbody th a:hover{text-decoration:underline}
.ct-r{color:var(--muted);width:2.2em}
/* Narrow: the symbol in place of the name, and no rank. */
@media (max-width:300px){.ct-nm,.ct-r,.ct thead th:first-child{display:none}.ct tbody th .sym{color:var(--ink);font-size:1em;font-weight:600}}

/* converter */
.cv{display:flex;flex-direction:column;gap:6px}
.cv label{font-size:.75rem;color:var(--muted)}
.cv-row{display:flex;gap:6px}
.cv input{flex:1;min-width:0;font:inherit;font-size:1rem;color:var(--ink);background:var(--bg);border:1px solid var(--line2);border-radius:6px;padding:.4em .6em}
.cv-go{font:inherit;font-weight:600;color:var(--ink);background:none;border:1px solid var(--line2);border-radius:6px;padding:.4em .8em;cursor:pointer}
.cv-go:hover{border-color:var(--ink)}
.cv-out{font-size:1.0625rem;overflow-wrap:anywhere}
.cv-out b{font-weight:700}
.cv-more{font-size:.8125rem;font-weight:600}

/* stock exchange hours */
.hx-st{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:.9375rem}
.hx-b{display:inline-block;font-size:.8125rem;font-weight:650;padding:1px 8px;border-radius:4px;border:1px solid var(--line2);color:var(--muted)}
.hx-b.open{color:var(--up);border-color:var(--up)}
.hx-b.lunch{color:var(--brass);border-color:var(--brass)}
.hx-b.hol{color:var(--down);border-color:var(--down)}
.hx-at{font-size:.875rem}
.hx-t{border-collapse:collapse;font-size:.8125rem;width:100%}
.hx-t th,.hx-t td{text-align:left;padding:3px 0;border-top:1px solid var(--line);font-weight:400}
.hx-t th{color:var(--muted);padding-right:10px}
.hx-t td{text-align:right}
.hx-l{list-style:none;margin:0;padding:0}
.hx-l li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 10px;padding:6px 0;border-top:1px solid var(--line);font-size:.875rem}
.hx-l li a{font-weight:600;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hx-l li a:hover{text-decoration:underline}
.hx-l .hx-b{justify-self:end}
.hx-c{grid-column:1/-1;font-size:.75rem;color:var(--muted)}

/* Crypto Fear & Greed Index (the gauge as on /crypto/fear-and-greed) */
.fg{display:flex;flex-direction:column;gap:6px}
.fg-now{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px}
.fg-v{font-size:2.25rem;font-weight:700;line-height:1.1}
.fg-of{color:var(--muted)}
.fg-l{font-size:1.0625rem;font-weight:650}
.fg-track{position:relative;height:10px;border-radius:5px;background:linear-gradient(90deg,var(--down),var(--idle),var(--up))}
.fg-mark{position:absolute;top:-4px;width:4px;height:18px;margin-left:-2px;border-radius:2px;background:var(--ink)}
.fg-ends{display:flex;justify-content:space-between;font-size:.6875rem;color:var(--muted);margin-top:2px}
.w-src{font-size:.75rem;color:var(--muted)}
