styles.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. /* Flat and editorial: square corners, hairline rules, sentence-case headings,
  2. one oxblood accent. Matches getcodegraph.com.
  3. No tiny all-caps tracked-out labels anywhere — panel titles are real headings
  4. at a readable size, and the fine print under them is sentence case. */
  5. :root {
  6. --paper: #f7f6f2;
  7. --surface: #ffffff;
  8. --ink: #16150f;
  9. --secondary: #56534a;
  10. --muted: #807d74;
  11. --oxblood: #7a201a;
  12. --rule: #d8d5cb;
  13. --hairline: #e7e5de;
  14. }
  15. * {
  16. box-sizing: border-box;
  17. }
  18. body {
  19. margin: 0;
  20. padding: 24px;
  21. background: var(--paper);
  22. color: var(--ink);
  23. font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  24. font-size: 16px;
  25. line-height: 1.5;
  26. }
  27. .masthead {
  28. display: flex;
  29. align-items: flex-start;
  30. justify-content: space-between;
  31. gap: 24px;
  32. padding-bottom: 16px;
  33. border-bottom: 1px solid var(--rule);
  34. }
  35. h1 {
  36. margin: 0 0 4px;
  37. font-size: 22px;
  38. font-weight: 600;
  39. }
  40. h2 {
  41. margin: 0;
  42. font-size: 17px;
  43. font-weight: 600;
  44. }
  45. .subtitle {
  46. margin: 0;
  47. color: var(--secondary);
  48. }
  49. /* --- filter row --------------------------------------------------------- */
  50. .filters {
  51. display: flex;
  52. flex-wrap: wrap;
  53. align-items: center;
  54. gap: 12px 20px;
  55. padding: 16px 0;
  56. border-bottom: 1px solid var(--rule);
  57. }
  58. .filter-group {
  59. display: flex;
  60. align-items: center;
  61. gap: 8px;
  62. }
  63. .filter-end {
  64. margin-left: auto;
  65. }
  66. .custom-range label {
  67. color: var(--secondary);
  68. }
  69. .custom-range input {
  70. padding: 7px 10px;
  71. font: inherit;
  72. font-size: 15px;
  73. color: var(--ink);
  74. background: var(--surface);
  75. border: 1px solid var(--rule);
  76. border-radius: 0;
  77. }
  78. .custom-range input:focus-visible,
  79. button:focus-visible {
  80. outline: 2px solid var(--oxblood);
  81. outline-offset: 1px;
  82. }
  83. .filter-status {
  84. flex-basis: 100%;
  85. margin: 0;
  86. color: var(--muted);
  87. font-size: 14px;
  88. }
  89. .filter-status .dot {
  90. padding: 0 4px;
  91. }
  92. /* --- buttons ------------------------------------------------------------ */
  93. button {
  94. padding: 8px 14px;
  95. font: inherit;
  96. font-size: 15px;
  97. color: var(--paper);
  98. background: var(--oxblood);
  99. border: 1px solid var(--oxblood);
  100. border-radius: 0;
  101. cursor: pointer;
  102. }
  103. button.secondary,
  104. button.range {
  105. color: var(--ink);
  106. background: transparent;
  107. border-color: var(--rule);
  108. }
  109. button.secondary:hover,
  110. button.range:hover {
  111. border-color: var(--ink);
  112. }
  113. button.range.is-selected {
  114. color: var(--paper);
  115. background: var(--oxblood);
  116. border-color: var(--oxblood);
  117. }
  118. button.link {
  119. align-self: flex-start;
  120. margin-top: 12px;
  121. padding: 0;
  122. color: var(--oxblood);
  123. background: none;
  124. border: none;
  125. font-size: 14px;
  126. text-decoration: underline;
  127. text-underline-offset: 2px;
  128. }
  129. /* --- grid --------------------------------------------------------------- */
  130. .grid {
  131. display: grid;
  132. grid-template-columns: repeat(12, 1fr);
  133. gap: 16px;
  134. margin-top: 24px;
  135. }
  136. .span-3 { grid-column: span 3; }
  137. .span-4 { grid-column: span 4; }
  138. .span-6 { grid-column: span 6; }
  139. .span-8 { grid-column: span 8; }
  140. .span-12 { grid-column: span 12; }
  141. /* A laptop is the target; below that the columns just widen rather than
  142. pretending to be a phone layout. */
  143. @media (max-width: 1180px) {
  144. .span-3 { grid-column: span 6; }
  145. .span-4,
  146. .span-8 { grid-column: span 6; }
  147. }
  148. @media (max-width: 760px) {
  149. .span-3,
  150. .span-4,
  151. .span-6,
  152. .span-8 { grid-column: span 12; }
  153. }
  154. /* --- panels ------------------------------------------------------------- */
  155. .panel {
  156. display: flex;
  157. flex-direction: column;
  158. padding: 16px;
  159. background: var(--surface);
  160. border: 1px solid var(--rule);
  161. }
  162. .panel-head {
  163. display: flex;
  164. align-items: baseline;
  165. justify-content: space-between;
  166. gap: 12px;
  167. }
  168. .panel-figure {
  169. margin: 0;
  170. color: var(--secondary);
  171. font-size: 14px;
  172. white-space: nowrap;
  173. }
  174. .panel-note {
  175. margin: 6px 0 0;
  176. color: var(--muted);
  177. font-size: 13px;
  178. }
  179. .panel-body {
  180. flex: 1;
  181. margin-top: 12px;
  182. /* Refetch dims the previous render instead of tearing it down — no skeleton
  183. flash, no layout jump. */
  184. transition: opacity 120ms ease-out;
  185. }
  186. .panel[data-stale='true'] .panel-body {
  187. opacity: 0.55;
  188. }
  189. .panel-state {
  190. margin: 0;
  191. color: var(--muted);
  192. font-size: 14px;
  193. }
  194. .panel[data-state='ready'] .panel-state {
  195. display: none;
  196. }
  197. .panel[data-state='error'] .panel-state {
  198. color: var(--oxblood);
  199. }
  200. /* Until a panel has data there is nothing to show but its state line. */
  201. .panel:not([data-state='ready']) .chart-wrap,
  202. .panel:not([data-state='ready']) .stat,
  203. .panel:not([data-state='ready']) .funnel {
  204. display: none;
  205. }
  206. /* Height covers the plot AND the axis band, so a panel never grows its own
  207. little scrollbar. */
  208. .chart-wrap {
  209. position: relative;
  210. height: 232px;
  211. }
  212. /* --- stat tiles --------------------------------------------------------- */
  213. .stat-value {
  214. margin: 4px 0 0;
  215. font-size: 40px;
  216. font-weight: 600;
  217. line-height: 1.1;
  218. /* Proportional figures on purpose: tabular-nums makes a number like 121 look
  219. loose at display sizes. Tabular is for the table below. */
  220. }
  221. .stat-caption {
  222. margin: 6px 0 0;
  223. color: var(--muted);
  224. font-size: 14px;
  225. }
  226. /* --- funnel ------------------------------------------------------------- */
  227. .funnel-stage + .funnel-stage {
  228. margin-top: 16px;
  229. }
  230. .funnel-label {
  231. display: flex;
  232. justify-content: space-between;
  233. gap: 12px;
  234. color: var(--secondary);
  235. font-size: 14px;
  236. }
  237. .funnel-value {
  238. color: var(--ink);
  239. font-size: 18px;
  240. font-weight: 600;
  241. }
  242. .funnel-track {
  243. height: 10px;
  244. margin-top: 6px;
  245. background: var(--hairline);
  246. }
  247. .funnel-fill {
  248. height: 100%;
  249. background: var(--oxblood);
  250. }
  251. .funnel-summary {
  252. margin: 16px 0 0;
  253. color: var(--secondary);
  254. font-size: 14px;
  255. }
  256. /* --- table twins -------------------------------------------------------- */
  257. .table-wrap {
  258. margin-top: 12px;
  259. max-height: 260px;
  260. overflow-y: auto;
  261. }
  262. .table-wrap table {
  263. width: 100%;
  264. border-collapse: collapse;
  265. font-size: 14px;
  266. /* Columns of numbers that align vertically — the one place tabular figures
  267. are the right call. */
  268. font-variant-numeric: tabular-nums;
  269. }
  270. .table-wrap th,
  271. .table-wrap td {
  272. padding: 5px 8px 5px 0;
  273. text-align: left;
  274. border-bottom: 1px solid var(--hairline);
  275. }
  276. .table-wrap thead th {
  277. position: sticky;
  278. top: 0;
  279. background: var(--surface);
  280. color: var(--secondary);
  281. font-weight: 600;
  282. }
  283. .table-wrap tbody th {
  284. font-weight: 400;
  285. }
  286. .table-wrap td {
  287. color: var(--secondary);
  288. }