Spaces:
Running
Running
File size: 15,495 Bytes
ee446e8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 | /* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Reports page β styles
The page measures one session and lists the candidates a filter selected,
so it is a controls strip, a funnel and a table. The funnel and the table
are the page's own components; everything else reuses common.css
(control-panel, .btn, .input-field, .filter-textarea, .stock-row).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
/* ββ Controls strip ββββββββββββββββββββββββββββββββββββββββββββββββββ
The scanner puts its filter textarea directly in .control-panel__main so
the textarea, the help button and Run share one baseline. Nesting the
textarea in a .input-group (a column) put the help button on its own row
under the label and left the Run button floating beside a two-row-tall
group, so the strip is laid out here instead. Only dimensions and
placement are set: the panel, the fields and the buttons are common.css's. */
.reports-controls {
display: grid;
grid-template-columns: 1fr auto;
grid-template-areas:
"filter filter"
"session run"
"plan plan";
gap: var(--space-sm) var(--space-sm);
align-items: center;
}
.reports-controls__filterwrap {
grid-area: filter;
min-width: 0;
}
/* The label and the help link share one row above the filter, so the help is
named where the reader is looking rather than floating beside the box. */
.reports-controls__filterhead {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--space-sm);
margin-bottom: var(--space-xs);
}
.reports-controls__filterhead .reports-controls__label {
margin-bottom: 0;
}
.reports-controls__help {
color: var(--accent);
font-size: var(--font-xs);
text-decoration: underline;
text-underline-offset: var(--radius-sm);
}
.reports-controls__help:hover {
color: var(--text);
}
.reports-controls__filter {
width: 100%;
min-width: 0;
}
.reports-controls__session {
grid-area: session;
justify-self: start;
}
/* The date field is a fixed-format control: stretched to the grid's 1fr track
it became a 1100px input around a 10-character date. */
.reports-controls__session .input-field {
width: auto;
}
.reports-controls__run {
grid-area: run;
justify-self: end;
white-space: nowrap;
}
/* The trade, below the filter strip. It is a second row of the same grid
rather than its own panel: the entry expression is the same language as the
filter above it, and putting the two in one column says so before anyone
reads a label. Entry takes the wide track because it is the one field
holding an expression rather than a number. */
.reports-controls__plan {
grid-area: plan;
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(4, minmax(72px, 1fr));
gap: var(--space-sm);
align-items: end;
padding-top: var(--space-sm);
border-top: 1px solid var(--border);
}
/* The four exits are one group, so the units in their labels read as a set.
It takes the full plan row; the break-even box sits on the row below it. */
.reports-controls__exits {
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(4, minmax(72px, 1fr));
gap: var(--space-sm);
align-items: end;
}
/* Entry and the trigger take a row each: both hold an expression rather than
a number, and both are the two halves of one sentence -- what the order
rests on, and which bars are allowed to fill it. */
.reports-controls__field--wide {
grid-column: 1 / -1;
}
.reports-controls__field {
display: flex;
flex-direction: column;
min-width: 0;
}
.reports-controls__field .input-field {
width: 100%;
font-family: var(--font-mono);
font-size: var(--font-xs);
}
/* The label sits above the field, as it does for the filter and the date. */
.reports-controls__field .reports-controls__label {
margin-bottom: var(--space-xs);
}
/* Its own row under the exits, so it can never run past the card's edge. */
.reports-controls__be {
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: var(--space-xs);
font-size: var(--font-xs);
color: var(--text-muted);
cursor: pointer;
}
/* The label sits above the field, so it is a caption on the grid rather than
a flex child of it: as a grid item it cannot stretch the field's height. */
.reports-controls__label {
display: block;
font-size: var(--font-xs);
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
margin-bottom: var(--space-xs);
}
.reports-controls__session-field {
display: block;
}
/* On a phone the two-column grid puts a 44px textarea and a 34px date input
in the same column, which is narrower than either wants. Stacked full width
is the layout the scanner falls back to at the same tier. */
@media (width <= 480px) {
/* The "Filter syntax" link is a 15px-tall text button; the audit's 28px touch
floor, on the shared filter help (backtest screener and reports). */
.reports-controls__help {
display: inline-flex;
align-items: center;
min-height: var(--touch-floor);
}
.reports-controls {
grid-template-columns: 1fr;
grid-template-areas:
"filter"
"session"
"run"
"plan";
}
.reports-controls__session,
.reports-controls__run {
justify-self: stretch;
}
.reports-controls__plan,
.reports-controls__exits {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
/* ββ Funnel ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Four counts that fall as the study narrows. A number alone does not say
"46 of 46"; each step carries its share of the filter's universe as a
bar, so the drop-off is read without doing the division. */
.reports-funnel {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: var(--space-sm);
margin-bottom: var(--space-md);
}
.reports-funnel__step {
/* Surface from .surface (common.css); the rule owns the cell's padding. */
padding: var(--space-sm) var(--space-md);
min-width: 0;
}
.reports-funnel__value {
font-size: var(--font-lg);
font-weight: 700;
color: var(--text);
line-height: 1.2;
font-variant-numeric: tabular-nums;
}
.reports-funnel__label {
font-size: var(--font-xs);
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
margin-top: var(--space-2xs);
}
/* The track is always drawn, even at 100%: a bar that appears only when a
step loses names makes the first step look like the exception. */
.reports-funnel__track {
height: var(--space-xs);
margin-top: var(--space-sm);
background: var(--bg);
border-radius: var(--radius-sm);
overflow: hidden;
}
.reports-funnel__fill {
display: block;
height: 100%;
background: var(--accent);
border-radius: var(--radius-sm);
}
@media (width <= 768px) {
.reports-funnel {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
/* ββ Provenance line ββββββββββββββββββββββββββββββββββββββββββββββββββ
The filter that produced the numbers, and the rules they were measured
under, in one dimmed line under the funnel. It is the audit trail: without
it the table below is a list of prices with no stated origin. */
.reports-provenance {
font-size: var(--font-sm);
color: var(--text-muted);
margin-bottom: var(--space-md);
line-height: 1.5;
}
.reports-provenance__filter {
font-family: var(--font-mono);
font-size: var(--font-xs);
color: var(--text);
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 1px var(--space-xs);
overflow-wrap: anywhere;
}
/* ββ Candidates table ββββββββββββββββββββββββββββββββββββββββββββββββ
Rows, not cards: a session measures dozens of names and the comparison
between them is the point, so every row is one line of aligned numbers
with the intraday path as a trailing sparkline. The track list is a custom
property so the header and the rows cannot drift apart β the same
arrangement the scanner's list uses. */
.reports-table {
--reports-cols: 64px 76px 58px minmax(170px, 1.4fr) 58px 72px minmax(130px, 1fr) auto;
}
/* The legs of one position. Each is its own span so the label and the share
can be coloured by what the leg was -- a target, a stop, or the end of the
session -- which is the difference between "half the position was taken at
TP1 and the rest gave it back" and a single red number. */
.reports-table__exits {
display: flex;
align-items: baseline;
gap: var(--space-xs);
min-width: 0;
overflow: hidden;
white-space: nowrap;
}
.reports-table__leg {
font-variant-numeric: tabular-nums;
overflow: hidden;
text-overflow: ellipsis;
}
.reports-table__leg--target {
color: var(--positive);
}
.reports-table__leg--stop {
color: var(--negative);
}
.reports-table__leg--end {
color: var(--text-muted);
}
.reports-table__leg-sep {
color: var(--text-dim);
flex-shrink: 0;
}
.reports-table__head {
display: grid;
grid-template-columns: var(--reports-cols);
gap: var(--space-sm);
align-items: center;
padding: 0 var(--space-sm) var(--space-xs);
font-size: var(--font-xs);
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
border-bottom: 1px solid var(--border);
margin-bottom: var(--space-xs);
}
.reports-table__row {
display: grid;
grid-template-columns: var(--reports-cols);
gap: var(--space-sm);
align-items: center;
padding: var(--space-sm);
font-size: var(--font-sm);
border-bottom: 1px solid var(--border);
transition: background var(--transition-fast);
}
.reports-table__row:hover {
background: var(--bg-elevated);
}
.reports-table__row:last-child {
border-bottom: none;
}
/* Tabular figures in every numeric cell: the columns are read vertically,
and proportional digits make 11.0 and 8.0 different widths in the same
place, so the eye has to re-anchor on each row. */
.reports-table__num {
text-align: right;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
/* The hand-off to the two surfaces that answer a different question about
this same ticker. Sits last and takes only the width its labels need, so
the measured columns keep their tracks. */
.reports-table__next {
display: flex;
gap: var(--space-sm);
white-space: nowrap;
}
.reports-table__next a {
color: var(--text-muted);
text-decoration: none;
font-size: var(--font-xs);
}
.reports-table__next a:hover {
color: var(--accent);
text-decoration: underline;
}
.reports-table__symbol {
font-weight: 600;
color: var(--text);
white-space: nowrap;
}
.reports-table__pnl {
font-weight: 700;
}
.reports-table__pnl--positive {
color: var(--positive);
}
.reports-table__pnl--negative {
color: var(--negative);
}
.reports-table__reason {
color: var(--text-muted);
font-size: var(--font-xs);
text-transform: uppercase;
letter-spacing: 0.04em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.reports-table__chart {
min-width: 0;
line-height: 0;
}
/* A fixed 44px band, not the viewBox's own aspect: the column is the
flexible one, so letting the 320x90 viewBox scale proportionally made each
row 213px tall on a 1400px screen and the table stopped being a table. The
SVG stretches to fill (see preserveAspectRatio in the markup) and its
strokes opt out of the transform, so it reads as a sparkline at any width. */
.reports-table__chart svg {
display: block;
width: 100%;
height: var(--touch-min);
}
/* Below the tablet cut the seven columns overflow a phone, and the two that
carry the trade's shape β when it filled and how it closed β are the ones
a reader on a phone can least afford to lose to a scrollbar. The sparkline
goes instead: the numbers are the record, the path is the illustration. */
@media (width <= 768px) {
.reports-table {
--reports-cols: 56px 68px minmax(120px, 1fr) 68px 68px;
}
.reports-table__head > :nth-child(3),
.reports-table__row > :nth-child(3),
.reports-table__head > :nth-child(5),
.reports-table__row > :nth-child(5),
.reports-table__chart,
.reports-table__next {
display: none;
}
}
/* A phone leaves 358px of content width (390 less the wrapper's 16px each
side). The four surviving tracks and their three 8px gaps have to fit inside
it, so they are sized to the widest value each column actually holds:
"$310.60" for a price and "-1.0%" for a P&L, with the exits cell taking
what is left. At the tablet sizes the same tracks measured 36px past the
viewport. */
@media (width <= 480px) {
.reports-table {
--reports-cols: 52px 62px minmax(96px, 1fr) 58px;
}
}
/* ββ Legend βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The path draws three levels that are otherwise unlabelled lines. The
legend is one row under the funnel, so it is read once rather than
decoded per row. */
.reports-legend {
display: flex;
flex-wrap: wrap;
gap: var(--space-sm) var(--space-md);
font-size: var(--font-xs);
color: var(--text-muted);
margin-bottom: var(--space-md);
}
.reports-legend__item {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.reports-legend__swatch {
width: 14px;
height: 0;
border-top-width: var(--radius-sm);
border-top-style: dashed;
flex-shrink: 0;
}
.reports-legend__swatch--target {
border-top-color: var(--positive);
}
.reports-legend__swatch--level {
border-top-color: var(--warning);
}
.reports-legend__swatch--stop {
border-top-color: var(--negative);
}
/* The trade is the one part of the path that carries the outcome: the bars
from the fill to the exit are drawn in the trade's own colour and everything
around them in the neutral tone, so a stop reads as "the line turned red
here and never came back". The swatch is both colours, because the legend
is written once for a column where some rows won and some did not. */
.reports-legend__swatch--trade {
height: 3px;
border-top: 0;
background: linear-gradient(90deg, var(--negative), var(--positive));
}
/* The two polylines are the path itself, not levels: one weight for the
premarket, a heavier one for the session, which is where the fill and the
exit happened. */
.reports-legend__swatch--premarket {
border-top: var(--radius-sm) solid var(--text-dim);
}
.reports-legend__swatch--session {
border-top: var(--radius-sm) solid var(--text);
}
/* The fill and the exit are vertical rules on the path, so their swatches
stand on end rather than lying down. */
.reports-legend__swatch--fill,
.reports-legend__swatch--exit {
width: 0;
height: var(--space-sm-plus);
border-top: 0;
border-left: var(--radius-sm) dashed;
}
.reports-legend__swatch--fill {
border-left-color: var(--warning);
}
.reports-legend__swatch--exit {
border-left-color: var(--positive);
}
|