/* 55-idea.css - the Idea page. The drawings are made by 35-idea.js from the outlines and use
   the shared pe- classes for ink, outline and hairline. Class prefix: idea-. */

/* The page's name. A capital I stands further from its left edge than the P of Strak, so it
   hangs a little more: its stem then meets the edge that the labels and drawings below keep. */
.idea-word { margin-left: -0.078em; }

/* A drawing cell: the label on top, the drawing right under it, the sentence at the bottom.
   Drawings in two cells side by side then start at one height, so their baselines meet
   across the seam. */
.idea-cell { justify-content: flex-start; }
.idea-cell > .pl-meta { margin-top: auto; max-width: 40em; text-wrap: pretty; }

/* A cell that takes the whole row when the grid has two columns: the paired drawings stack
   there instead of shrinking. */
.idea-row { --pl-two: 2; }

/* Parts of the drawings that the shared classes do not cover: text (also on ink), a square
   line end, the end of a handle, and a hairline drawn in paper across ink. */
.pe-diagram[data-idea] text { font-size: 11px; }
.pe-diagram[data-idea] text.idea-on-ink { fill: var(--bg); }
.idea-square { stroke-linecap: square; }
.idea-dot { fill: var(--text-secondary); }
.idea-paper { fill: none; stroke: var(--bg); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* One skeleton: the Sans as a flat shape under the outline of another style. */
.idea-bone { fill: var(--control-fill); }

/* Four styles: each row is set in the style it names. The name stands as a row heading, the
   sentence wraps, the number of weights keeps the right edge. */
.idea-styles tr { font-family: var(--pe-spec); }
.idea-styles th[scope="row"] {
  padding: 9px 0; border-top: 1px solid var(--divider);
  font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.idea-styles th + td { padding-left: 16px; }
.idea-styles td { text-wrap: pretty; }
.idea-styles td.pe-num { color: var(--text-secondary); }
.idea-styles .idea-absent td:not(.pe-num), .idea-styles .idea-absent th { font-family: var(--pe-sans); }
/* The sentence over the table is the Serif at its own job: reading. The table settles at the
   bottom of the cell, as a specimen does on the home page. */
.idea-read { max-width: 31em; }
.idea-cell > .idea-styles { margin-top: auto; }
/* The four n's stand right under the lines that draw them. */
.idea-code .pe-diagram { margin-top: 4px; }

/* The recipe. The cell is the frame, so the code block drops its own stroke and inset and the
   code starts on the label's edge. It is set as the code on the About page is: 13px on 1.55.
   Its longest line has 47 characters. Where the block is too narrow for that line the type
   steps down to 12px, and where it still does not fit the line wraps and hangs eight
   characters in, so nothing has to be scrolled sideways. The block is the container and
   carries the code's face and size, so the ch in the query is one character of the code.
   The About page links to this cell; called into view it stands under the bar. */
.idea-code { scroll-margin-top: var(--pl-bar); }
.idea-code .rs-code-block {
  border: 0; background: transparent;
  container-type: inline-size; font-family: var(--pe-mono); font-size: 13px;
}
.idea-code .rs-code-block-pre { padding: 0; font-size: 13px; line-height: 1.55; }
.idea-code .rs-code-block-line { min-height: 1.55em; padding-left: 8ch; text-indent: -8ch; }
@container (max-width: 47.5ch) { .idea-code .rs-code-block-pre { font-size: 12px; } }

/* The name. Weight carries the point: the two words that explain are light, the name is bold. */
.idea-name { font-weight: 300; }
.idea-name b { font-weight: 700; }
.idea-name + .pl-meta { max-width: 40em; text-wrap: pretty; }

@media (max-width: 640px) {
  .pe-diagram[data-idea] text { font-size: 12px; }
  .idea-code { scroll-margin-top: var(--pl-bar-phone); }
}
