/* Motion: shared by the trading app and the docs. Tokens, type, the bar at the top, the tabs at the bottom, the footer. */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap; src: url("fonts/barlowcondensed600i.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/barlowcondensed700i.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibmplexmono400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibmplexmono500.woff2") format("woff2"); }

:root {
  --bg: #0e0d0b;
  --panel: #161512;
  --panel-2: #1d1b17;
  --panel-3: #25221d;
  --ink: #f5f1e8;
  --ink-dim: rgba(245, 241, 232, 0.66);
  --ink-faint: rgba(245, 241, 232, 0.42);
  --line: rgba(245, 241, 232, 0.09);
  --line-strong: rgba(245, 241, 232, 0.18);
  --long: #45e08a;
  --long-soft: rgba(69, 224, 138, 0.13);
  --short: #ff5a4f;
  --short-soft: rgba(255, 90, 79, 0.13);
  --flag: #f2c230;
  --flag-soft: rgba(242, 194, 48, 0.12);
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Roboto Mono", monospace;
  --r: 14px;
  --r-sm: 9px;
  --pad: 22px;                                  /* page gutter; shrinks on phones */
  --sl: env(safe-area-inset-left, 0px);         /* notches and rounded corners */
  --sr: env(safe-area-inset-right, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
  --tabs-h: 0px;                                /* height of the bottom tabs, 0 when they are not shown */
  --tradebar-h: 0px;                            /* height of the long and short bar, 0 when it is not shown */
}

* { box-sizing: border-box; }
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabs-h) + var(--tradebar-h) + var(--sb));
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
input { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 max(var(--pad), var(--sr)) 0 max(var(--pad), var(--sl)); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tk { text-transform: none; }                  /* $motion is always written in lower case, also inside capitals */
.up { color: var(--long); }
.down { color: var(--short); }
.dim { color: var(--ink-dim); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

/* the strip that says this is paper trading mode */
.strip { background: var(--flag); color: #1a1503; font-weight: 600; font-size: 13.5px; letter-spacing: 0.01em; padding-top: var(--st); }
/* coin day: for the hour before the first live market the strip is the loudest line on the page. It says what to do
   now, in the display face, and counts down on a clock that is dark on the yellow so that it is not read past. */
#strip-count { display: inline-flex; align-items: center; gap: 10px; margin-left: 14px; vertical-align: middle; white-space: nowrap; }
#strip-clock { display: inline-block; min-width: 5ch; padding: 2px 12px 3px; border-radius: 7px; background: #1a1503; color: var(--flag); font-family: var(--mono); font-weight: 500; font-size: 1.3em; line-height: 1.15; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; text-align: center; }
html.launching .strip { font-size: 17px; }
html.launching .strip-in { padding-top: 11px; padding-bottom: 11px; gap: 4px 20px; }
html.launching #strip-mode { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.62em; line-height: 1; letter-spacing: 0.012em; text-transform: uppercase; vertical-align: middle; }
html.launching .strip button { font-size: 13.5px; font-weight: 500; }
.strip-in { display: flex; gap: 6px 14px; align-items: center; justify-content: center; padding: 7px max(var(--pad), var(--sr)) 7px max(var(--pad), var(--sl)); flex-wrap: wrap; text-align: center; }
.strip button, .strip a { background: none; border: 0; padding: 0 6px; margin: -12px 0; min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* the bar at the top */
.nav { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(14, 13, 11, 0.93); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 62px; }
body > .nav:first-child { padding-top: var(--st); }     /* opened from a phone's home screen, the page starts under the status bar */
.nav-links { display: flex; gap: 24px; font-size: 15px; }
.nav-links a { color: var(--ink-dim); text-decoration: none; padding: 8px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a.tok-link { color: var(--flag); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.bal { font-family: var(--mono); font-size: 13.5px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; }
.bal b { font-weight: 500; }
.btn-ghost { background: var(--ink); color: #12110e; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14.5px; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; min-height: 38px; }

/* logo: a slanted tile and an italic word, drawn in type, no image */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: none; min-height: 44px; }
.mark { display: inline-grid; place-items: center; width: 31px; height: 27px; background: var(--ink); transform: skewX(-14deg); border-radius: 3px; }
.mark b { transform: skewX(14deg); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 26px; line-height: 1; color: #12110e; margin-top: -3px; }
.word { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 29px; line-height: 1; letter-spacing: 0.01em; }
.logo.small { transform: scale(0.7); transform-origin: left center; opacity: 0.6; min-height: 0; }

/* the tabs at the bottom, on phones and tablets held upright */
.tabs { display: none; }

.foot { margin: 46px 0 34px; display: flex; justify-content: space-between; align-items: center; color: var(--ink-faint); font-size: 13.5px; gap: 14px 22px; flex-wrap: wrap; }
/* the coin's contract address in the footer: readable, and it wraps inside a narrow phone */
#foot-mode.ca { color: var(--ink-dim); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; user-select: all; }
.foot-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.foot a { color: var(--ink-dim); text-decoration: none; padding: 6px 0; }
.foot a:hover { color: var(--ink); }

.toasts { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--tradebar-h) + var(--sb) + 18px); transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #12110e; padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); animation: rise 0.22s ease; }
.toast.flag { background: var(--flag); color: #1a1503; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- below 900: no room for a side column. Links move to tabs at the bottom. ---------- */
@media (max-width: 899px) {
  :root { --tabs-h: 54px; }
  html { scroll-padding-top: 12px; }
  .nav { position: static; }
  .nav-links { display: none; }
  .tabs {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--tabs-h) + var(--sb)); padding: 0 var(--sr) var(--sb) var(--sl);
    background: #0e0d0b;
    border-top: 1px solid var(--line-strong);
  }
  .tabs a {
    display: grid; place-items: center; text-decoration: none; color: var(--ink-faint); position: relative;
    font-family: var(--display); font-style: italic; font-weight: 600; font-size: 18px; text-transform: uppercase; letter-spacing: 0.04em;
    min-width: 0; white-space: nowrap;
  }
  .tabs a[aria-current="page"] { color: var(--ink); }
  .tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 3px; background: var(--ink); transform: skewX(-24deg); }
  .tabs a.tok-link { color: rgba(242, 194, 48, 0.7); }
  .tabs a.tok-link[aria-current="page"] { color: var(--flag); }
  .tabs a.tok-link[aria-current="page"]::before { background: var(--flag); }
}

/* ---------- phones ---------- */
@media (max-width: 599px) {
  :root { --pad: 14px; }
  .nav-in { gap: 10px; height: 56px; }
  .word { font-size: 24px; }
  .mark { width: 26px; height: 23px; }
  .mark b { font-size: 22px; margin-top: -2px; }
  .nav-right { gap: 8px; }
  .bal { padding: 7px 10px; font-size: 12.5px; }
  .bal .wide { display: none; }
  .btn-ghost { padding: 8px 13px; font-size: 13.5px; }
  .btn-ghost .wide { display: none; }
  .strip { font-size: 12.5px; }
  .strip .wide { display: none; }
  /* coin day on a phone: the words on a line of their own, the clock under them */
  html.launching .strip { font-size: 15px; }
  html.launching .strip-in { padding-top: 9px; padding-bottom: 8px; gap: 2px 14px; }
  html.launching #strip-mode { display: block; font-size: 1.6em; margin-bottom: 6px; }
  html.launching #strip-count { margin-left: 0; }
  .foot { margin: 34px 0 26px; }
}
@media (max-width: 339px) {
  :root { --pad: 10px; }
  html.launching #strip-mode { font-size: 1.42em; }
  .word { font-size: 21px; }
  .logo { gap: 7px; }
  .bal { padding: 6px 8px; font-size: 12px; }
  .btn-ghost { padding: 7px 10px; font-size: 13px; }
  .tabs a { font-size: 16px; letter-spacing: 0.02em; }
}

/* narrower than any phone: a phone whose browser is zoomed far in */
@media (max-width: 279px) {
  :root { --pad: 8px; }
  .nav-in { gap: 6px; }
  .nav-right { gap: 6px; }
  .bal { padding: 6px 6px; font-size: 11.5px; }
  .btn-ghost { padding: 7px 8px; }
  .tabs a { font-size: 14px; letter-spacing: 0; }
}

/* a phone held sideways is short: give the height back */
@media (max-height: 480px) and (orientation: landscape) and (max-width: 899px) {
  :root { --tabs-h: 50px; }
  .tabs a { font-size: 17px; }
  .strip-in { padding-top: 4px; padding-bottom: 4px; }
  .nav-in { height: 48px; }
}

/* fingers need bigger targets than a mouse does */
@media (pointer: coarse) {
  .nav-links a { padding: 12px 0; }
  .btn-ghost { min-height: 40px; }
  .foot a { padding: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
