/*
 * The web app's look. The colours, the type and the radii are the phone app's
 * own (mobile/src/theme.ts): quiet graphite surfaces, Geist, one amber for
 * where a person's alert happened, and the whistle's green for Whistle itself.
 * Every gap and fixed height is a step on the 4px grid.
 *
 * Motion is the phone app's too (`motion` in mobile/src/theme.ts): one curve
 * for whatever moves into its place and two durations. The chart's line is
 * drawn in by the page itself (chart.tsx). Everything that moves is on show
 * before it moves and after, so a motion that never runs hides nothing.
 */
@font-face {
  font-family: 'Geist';
  src: url('/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #141415;
  --card: #19191b;
  --raised: #232325;
  --hair: rgba(237, 237, 237, 0.08);
  --hover: rgba(237, 237, 237, 0.035);
  --ring: rgba(237, 237, 237, 0.6);
  --text: #ededed;
  --second: #a1a1a6;
  --muted: #85858b;
  --accent: #d28e05;
  --pos: #4cc38a;
  --neg: #e5484d;
  --ai: #1eb482;
  --ai-light: #5fe0b1;
  /* The field in the rail: its ground before it is first painted, and the two tones words take on it. */
  --field-ground: #04140e;
  --on-field: #f2fbf6;
  --on-field-quiet: #a6dcc5;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --row: 40px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* A touch answered, and something leaving. */
  --press: 140ms;
  /* Something arriving, opening or going from one place to another. */
  --shift: 280ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body,
#root {
  height: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 14px/20px var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
  font-weight: 400;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.pos {
  color: var(--pos);
}
.neg {
  color: var(--neg);
}
.ic {
  flex: none;
  display: block;
}

/* --- The shell: a sidebar, the list, and a stock open beside it --- */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  overflow: hidden;
}
.app.open {
  grid-template-columns: 224px minmax(0, 1fr) clamp(400px, 36%, 488px);
}
.side {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--hair);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
/*
  The rail is the field: the moving ground of fine emerald lines that the
  store's film and the website stand on, painted on a canvas behind the rail's
  entries (ground.tsx). Its words take the field's own two tones. A screen too
  narrow for a rail has a bar across its top, and that stays plain.
*/
.railField {
  display: none;
}
@media (min-width: 901px) {
  .side {
    isolation: isolate;
    background: var(--field-ground);
  }
  .railField {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  .side .navAt {
    background: rgba(170, 240, 208, 0.12);
  }
  .side .nav,
  .side .nav .n,
  .side .who {
    color: var(--on-field-quiet);
  }
  .side .nav:hover {
    color: var(--on-field);
    background: rgba(170, 240, 208, 0.07);
  }
  .side .nav[aria-current='page'],
  .side .nav[aria-current='page']:hover {
    color: var(--on-field);
    background: none;
  }
  .side .nav[aria-current='page'] .n {
    color: var(--on-field);
  }
}
.brand {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
/* A place kept for the logo: an empty box of the size the logo has there. */
.markPlace {
  flex: none;
  width: 76px;
  height: 76px;
}
.markPlace.stage {
  width: 112px;
  height: 112px;
}
/*
 * The logo: the app's own whistle. It floats over the page and is moved to the place kept for it, which the
 * page works out. Where it stands here is the rail's place, so it is there before anything has run. Going
 * from one place to another it travels; keeping to a place as the window changes it does not.
 */
.logo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 76px;
  height: 76px;
  transform-origin: 0 0;
  transform: translate(74px, 12px);
  pointer-events: none;
}
.logo.travels {
  transition: transform 420ms var(--ease);
}
.logo svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* The surface under the current entry. One piece, which slides to the entry gone to. */
.navAt {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 8px;
  background: var(--raised);
  pointer-events: none;
}
.navAt.travels {
  transition: transform var(--shift) var(--ease);
}
.nav {
  position: relative;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--second);
  font-weight: 500;
  transition:
    background-color var(--press) var(--ease),
    color var(--press) var(--ease);
}
.nav:hover {
  color: var(--text);
  background: var(--hover);
}
.nav[aria-current='page'],
.nav[aria-current='page']:hover {
  color: var(--text);
  background: none;
}
.nav .n {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.nav[aria-current='page'] .n {
  color: var(--second);
}
.sideFoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.who {
  padding: 0 10px 4px 36px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
/* With little room beside an open stock, a row says what its alert says and leaves the alert's name to the panel. */
@container (max-width: 520px) {
  .tbl .an {
    display: none;
  }
}
.panel {
  border-left: 1px solid var(--hair);
  background: var(--card);
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: slide var(--shift) var(--ease);
}
@keyframes slide {
  from {
    transform: translateX(16px);
  }
}
.app.leaving .panel {
  animation: leave 160ms var(--ease) forwards;
}
@keyframes leave {
  to {
    transform: translateX(16px);
    opacity: 0;
  }
}
/* The list the person is on. It rises into place as it is gone to. */
.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: rise var(--shift) var(--ease);
}
/*
 * It only moves. Fading a whole list in as well left its text soft in Chrome once the fade was over, for as
 * long as the list stood: the drawing kept for the fade was never made again. A move leaves nothing behind.
 */
@keyframes rise {
  from {
    transform: translateY(6px);
  }
}
/* On a first visit the page is read from its top, so it scrolls as one. */
.main.first {
  overflow-y: auto;
}
.main.first .view {
  flex: none;
}
.main.first .scroll {
  overflow: visible;
}

/* --- Buttons and fields --- */
.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    background-color var(--press) var(--ease),
    opacity var(--press) var(--ease),
    transform var(--press) var(--ease);
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--text);
  color: var(--page);
}
.btn.primary:hover:not(:disabled) {
  background: #ffffff;
}
.btn.quiet {
  background: var(--raised);
  color: var(--text);
}
.btn.quiet:hover:not(:disabled) {
  background: #2b2b2e;
}
.btn.danger {
  background: var(--neg);
  color: var(--page);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn.small {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 6px;
  gap: 6px;
}
/* A key of the keyboard that does what the control beside it does. */
.key {
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(237, 237, 237, 0.14);
  font: 500 11px/20px var(--mono);
  color: var(--muted);
  text-align: center;
}
.box:focus-within .key,
.box input:not(:placeholder-shown) ~ .key {
  display: none;
}
@media (hover: none), (max-width: 900px) {
  .key {
    display: none;
  }
}
.link {
  color: var(--second);
  font-weight: 500;
  font-size: 13px;
  border-radius: 4px;
  transition: color var(--press) var(--ease);
}
.link:hover {
  color: var(--text);
}
.field {
  height: 32px;
  padding: 0 10px;
  background: var(--page);
  border: 1px solid var(--hair);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  min-width: 0;
}
.field:focus,
.find input:focus {
  outline: none;
  border-color: rgba(237, 237, 237, 0.28);
}
.seg {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--page);
  border: 1px solid var(--hair);
  border-radius: 10px;
}
.seg button {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--second);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition:
    background-color var(--press) var(--ease),
    color var(--press) var(--ease);
}
.seg button:hover {
  color: var(--text);
}
.seg button[aria-pressed='true'],
.seg button[aria-expanded='true'] {
  background: var(--raised);
  color: var(--text);
}
.seg .n {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* --- The box an alert is written in --- */
.composer {
  padding: 16px 24px;
  border-bottom: 1px solid var(--hair);
}
.composerHead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.composerHead label {
  font-weight: 500;
}
.composerHead span {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 5px 5px 14px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 12px;
  transition: border-color var(--press) var(--ease);
}
.box:focus-within {
  border-color: rgba(237, 237, 237, 0.28);
}
.box input {
  flex: 1;
  min-width: 0;
  height: 36px;
  background: none;
  border: 0;
  outline: none;
  font-size: 15px;
  caret-color: var(--accent);
}
.box input::placeholder,
.find input::placeholder {
  color: var(--muted);
}
/* While the AI reads, the box's edge is lit in the whistle's green and a band of light sweeps along it. */
.box.reading {
  border-color: rgba(30, 180, 130, 0.5);
}
.box.reading::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ai-light), transparent) 0 0 / 40% 100% no-repeat;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: sweep 900ms linear infinite;
}
@keyframes sweep {
  from {
    background-position: -70% 0;
  }
  to {
    background-position: 170% 0;
  }
}
/* A first visit: the whistle large over the box, and what Whistle is for. */
.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0 24px;
}
.start h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  text-align: center;
  text-wrap: balance;
}
/* Help with the words: whole examples, and the parts an alert is built from. */
.help {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.helpTop {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.clash {
  color: var(--second);
  font-size: 13px;
}
.choices {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  margin: 0 -10px;
  animation: rise var(--shift) var(--ease);
}
.choice {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: background-color var(--press) var(--ease);
}
.choice:hover:not(:disabled) {
  background: var(--hover);
}
.choice:disabled {
  cursor: default;
  opacity: 0.5;
}
.choice .ct {
  flex: none;
  width: 148px;
  font-weight: 500;
  white-space: nowrap;
}
.choice .cd {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.choice[aria-pressed='true'] .cd {
  color: var(--second);
}
.said {
  margin-top: 10px;
  font-size: 13px;
  color: var(--second);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.seen {
  color: var(--second);
  font-size: 13px;
  margin-bottom: 4px;
}

/* What the AI read, looked over before it is kept. */
.check {
  margin-top: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkRead {
  font-size: 15px;
  line-height: 22px;
}
.ai {
  color: var(--ai-light);
  margin-right: 8px;
  font-size: 13px;
  font-weight: 500;
}
.checkRow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
}
.checkRow.top {
  align-items: flex-start;
}
.checkRow.top .checkLabel {
  line-height: 28px;
}
.checkLabel {
  width: 48px;
  flex: none;
  color: var(--muted);
  font-size: 13px;
}
.checkSaid {
  color: var(--second);
  font-size: 13px;
}
.checkRow .field {
  width: 260px;
}
.picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pick {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--second);
  box-shadow: inset 0 0 0 1px var(--hair);
  transition:
    background-color var(--press) var(--ease),
    color var(--press) var(--ease);
}
.pick:hover {
  color: var(--text);
}
.pick[aria-pressed='true'] {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(237, 237, 237, 0.2);
}
.checkNote {
  color: var(--second);
  font-size: 13px;
}
.checkFoot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkFoot .checkSaid {
  margin-right: auto;
}

/* --- Tables --- */
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 8px;
  min-height: 56px;
}
.head h2 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
}
.head .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.headLine {
  color: var(--muted);
  font-size: 13px;
  margin-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.headEnd {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.find {
  position: relative;
  color: var(--muted);
  display: block;
}
.find .ic {
  position: absolute;
  left: 10px;
  top: 8px;
}
.find input {
  width: 200px;
  height: 32px;
  padding: 0 10px 0 34px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.find.wide input {
  width: 100%;
}
.app.open .find:not(.wide) input {
  width: 150px;
}
.scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--page);
  height: 32px;
  padding: 0 12px;
  text-align: left;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
/* A heading that puts the list in order of its column. Its arrow has its room kept, so nothing moves when it comes. */
.sort {
  height: 24px;
  margin: 0 -6px;
  padding: 0 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  color: inherit;
  transition: color var(--press) var(--ease);
}
.num .sort {
  flex-direction: row-reverse;
}
.sort:hover,
th[aria-sort='ascending'] .sort,
th[aria-sort='descending'] .sort {
  color: var(--text);
}
.sort .arrow {
  opacity: 0;
  transition: opacity var(--press) var(--ease);
}
.sort:hover .arrow {
  opacity: 0.5;
}
.sort .arrow.on {
  opacity: 1;
}
.tbl td {
  height: var(--row);
  padding: 0 12px;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.tbl th:first-child,
.tbl td:first-child {
  padding-left: 24px;
}
.tbl th:last-child,
.tbl td:last-child {
  padding-right: 24px;
}
.tbl .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.tbl th.num {
  font-family: var(--sans);
  font-size: 12px;
}
.tbl .fit {
  width: 1%;
  max-width: none;
}
.tbl .right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tbl tbody tr {
  cursor: pointer;
  transition: background-color var(--press) var(--ease);
}
.tbl tbody tr:hover {
  background: var(--hover);
}
.tbl tbody tr[aria-selected='true'] {
  background: var(--raised);
}
.tbl tbody tr:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}
.tbl tbody tr.plain {
  cursor: default;
}
.tbl tbody tr.plain:hover {
  background: none;
}
.tk {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  display: inline-block;
  min-width: 52px;
}
.nm {
  color: var(--second);
}
.an {
  color: var(--second);
  margin-right: 10px;
}
.st {
  font-weight: 500;
}
.st.q {
  font-weight: 400;
  color: var(--muted);
}
.none {
  color: var(--muted);
}
.when {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* What Whistle has told and the person has not read yet. */
tr.new .when,
tr.new .an,
tr.new .nm {
  color: var(--text);
}
tr.new .tk,
tr.new .an {
  font-weight: 500;
}
/* A bar where a figure will be, while it is on its way. It breathes, to say that something is coming. */
.bar {
  display: inline-block;
  height: 10px;
  border-radius: 3px;
  background: rgba(237, 237, 237, 0.1);
  vertical-align: middle;
  animation: breathe 1200ms ease-in-out infinite alternate;
}
@keyframes breathe {
  to {
    opacity: 0.45;
  }
}
/* A figure that changed says which way it went, then goes back to its own colour. */
.went.up {
  animation: wentUp 1400ms ease-in;
}
.went.down {
  animation: wentDown 1400ms ease-in;
}
@keyframes wentUp {
  from {
    color: var(--pos);
  }
}
@keyframes wentDown {
  from {
    color: var(--neg);
  }
}
.btn.again {
  min-width: 108px;
}
.empty {
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}
.foot {
  padding: 12px 24px;
  color: var(--muted);
  font-size: 13px;
}
.foot.flush {
  padding: 8px 0 0;
}
.ask {
  display: inline-flex;
  gap: 6px;
}

/* Finding a stock to add. */
.add {
  padding: 4px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--hair);
}
.addNote {
  color: var(--muted);
  font-size: 13px;
}
.found {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.found li {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}
.found .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- A stock, open beside the list --- */
.record {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* The name and the graph stay where they are while the lists under them scroll. */
.recFixed {
  flex: none;
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--hair);
}
.recLists {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* With little height the graph would leave the lists no room, so the panel scrolls as one. */
@media (max-height: 760px), (max-width: 900px) {
  .record {
    overflow: auto;
  }
  .recFixed {
    border-bottom: 0;
    padding-bottom: 4px;
  }
  .recLists {
    flex: none;
    overflow: visible;
  }
}
.recTop {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.recName {
  min-width: 0;
}
.recName .tk {
  color: var(--muted);
  min-width: 0;
  display: block;
  line-height: 16px;
}
.recName h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recPrice {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.recPrice .p {
  font-family: var(--mono);
  font-size: 20px;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
  display: block;
}
.recPrice .d {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
  display: block;
}
.graph {
  position: relative;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--page);
  padding: 10px 4px 8px 12px;
}
.graphTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-right: 4px;
}
.readout {
  height: 32px;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--second);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.readout b {
  font-weight: 500;
  color: var(--text);
  margin-left: 10px;
}
.chart {
  height: 232px;
  touch-action: pan-y;
}
.chart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.chart text {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart .grid {
  stroke: rgba(237, 237, 237, 0.07);
  stroke-width: 1;
}
/* Where the line will be, while prices are on their way. */
.chart .level {
  stroke: rgba(237, 237, 237, 0.14);
  stroke-width: 1.5;
  stroke-linecap: round;
  animation: breathe 1200ms ease-in-out infinite alternate;
}
.chart .price {
  fill: none;
  stroke: var(--text);
  stroke-opacity: 0.86;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
/* Where the signal bought or happened, and where it sold. */
.chart .mark.filled {
  fill: var(--accent);
  stroke: var(--page);
  stroke-width: 2;
}
.chart .mark.open {
  fill: var(--page);
  stroke: var(--accent);
  stroke-width: 2;
}
.chart .now {
  fill: var(--text);
}
.chart .cursor {
  stroke: rgba(237, 237, 237, 0.28);
  stroke-width: 1;
}
.chart .cursorDot {
  fill: var(--page);
  stroke: var(--text);
  stroke-width: 1.5;
}
.now {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
  padding: 6px 8px 0 0;
  font-size: 13px;
  color: var(--second);
}
p.now i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
p.now i.open {
  background: var(--page);
  border: 2px solid var(--accent);
}
p.now i.gap {
  margin-left: 8px;
}
p.now b {
  font-weight: 500;
  color: var(--text);
}
p.now .st {
  margin-left: auto;
  padding-left: 12px;
}
/* It has the room of its two lines kept, so the card is one height whatever it says and while it waits. */
.evidence {
  min-height: 42px;
  padding: 2px 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.sub h3 {
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}
.sub .tbl {
  width: calc(100% + 16px);
  margin: 0 -8px;
}
.sub .tbl td,
.sub .tbl td:first-child,
.sub .tbl td:last-child {
  padding: 0 8px;
  height: 36px;
}
.bell {
  height: 26px;
  padding: 0 8px 0 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px rgba(237, 237, 237, 0.12);
}
.bell[aria-pressed='false'] {
  color: var(--muted);
  background: none;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.bell[aria-pressed='false']:hover:not(:disabled) {
  color: var(--text);
}
.bell:disabled {
  opacity: 0.45;
  cursor: default;
}
.hint {
  color: var(--second);
  font-size: 13px;
}
.recFoot {
  padding-top: 4px;
}

/* --- Account --- */
.account {
  padding: 24px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
}
.account h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.account h3 {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}
.account p {
  color: var(--second);
  max-width: 56ch;
}
.account .btn {
  margin-top: 12px;
}
.legal {
  margin-top: 8px;
  display: flex;
  gap: 16px;
}
.remark {
  margin-top: 8px;
  font-size: 13px;
}

/* --- What Whistle told the person while the page was open --- */
.note {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--raised);
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(237, 237, 237, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.5);
  animation: rise var(--shift) var(--ease);
}
.noteOpen {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  border-radius: 6px;
}
.noteTop {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.noteSub {
  color: var(--second);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- A narrow window: the sidebar becomes a bar, and an open stock takes the page --- */
@media (max-width: 900px) {
  .app,
  .app.open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .side {
    background: none;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    overflow-x: auto;
  }
  .brand {
    height: 40px;
    margin: 0 4px 0 0;
  }
  .markPlace.rail {
    width: 44px;
    height: 44px;
  }
  .markPlace.stage {
    width: 88px;
    height: 88px;
  }
  .logo {
    transform: translate(12px, 6px) scale(0.58);
  }
  .start {
    padding: 4px 0 16px;
  }
  .start h1 {
    font-size: 20px;
    line-height: 28px;
  }
  /* With one narrow column a choice is two lines, its sentence whole under its name. */
  .choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .choice {
    position: relative;
    height: auto;
    padding: 8px 36px 8px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .choice .ct {
    width: auto;
  }
  .choice .cd {
    flex: none;
    white-space: normal;
  }
  .choice .ic {
    position: absolute;
    right: 10px;
    top: 11px;
  }
  .note {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
  .sideFoot {
    margin: 0 0 0 auto;
  }
  .who,
  .nav .ic {
    display: none;
  }
  .app.open .main {
    display: none;
  }
  .panel {
    border-left: 0;
  }
  .composer,
  .head,
  .recFixed,
  .recLists,
  .account {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .tbl th:first-child,
  .tbl td:first-child {
    padding-left: 16px;
  }
  .tbl th:last-child,
  .tbl td:last-child {
    padding-right: 16px;
  }
  .composerHead span,
  .headLine {
    display: none;
  }
  .find input {
    width: 132px;
  }
}
/* On a phone the box is two rows: the words have its whole width, and its two buttons share the row under them. */
@media (max-width: 600px) {
  .box {
    flex-wrap: wrap;
    padding: 5px;
  }
  .box input {
    flex: 1 1 100%;
    padding: 0 9px;
  }
  .box .btn {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
