/* Test case viewer on the Specifications & Test Cases page. Loaded after style.css and the demo's
   demo.css, so a case is drawn with the demo's own parts: the pane, the tabs, the position chip,
   the JSON colours. Only what is particular to a test case is defined here. */

/* demo.css has its own .sub; put the contact line back the way the rest of the site has it */
.contact .about.sub { margin: 28px 0 0; font-weight: 400; font-size: clamp(16px, 1.32vw, 19.5px); color: var(--dim); }

#cases { display: grid; gap: 20px; }
.tcase.pane { padding-bottom: 0; }
.tcase .pane-head h2 b { margin-left: 14px; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--ink); font-size: 13px; }

/* the name, the tags and the comment */
.tc-intro { padding: 28px 26px 26px; border-bottom: 1px solid var(--rule); }
.tc-intro h3 { font-weight: 500; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.03em; line-height: 1.05; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tc-tags span { font: 12px var(--mono); padding: 4px 11px; border: 1px solid var(--rule); border-radius: 99px; background: rgba(var(--bgc), .35); color: var(--ink); }
.tc-tags i { font-style: normal; margin-right: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tc-comment { margin-top: 18px; max-width: 48em; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; color: var(--dim); }

/* input on the left, the expected result on a faintly lit band on the right, as in the demo's result */
.tc-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.tc-given, .tc-expect { padding: 24px 26px 30px; }
.tc-given { border-right: 1px solid var(--rule); }
.tc-expect { background: rgba(var(--glow), .05); }
.tc-h { margin-bottom: 20px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tc-block + .tc-block { margin-top: 24px; }
.tc-block .lab { margin-bottom: 10px; }
.tc-none { font-size: 14.5px; color: var(--faint); }
.tc-ul { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--dim); }
.tc-ul + .tc-ul { margin-top: 6px; }
.tc-ul b { font-size: 19px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.tc-given .order { margin-top: 0; }

/* the rates fold away under their heading, like the sections of the demo's book */
.tc-rates summary { display: inline-flex; align-items: center; gap: 10px; padding: 3px 8px 3px 4px; margin-left: -4px; border-radius: 8px; list-style: none; cursor: pointer; font-weight: 500; font-size: 15px; color: var(--ink); transition: background .2s; }
.tc-rates summary::-webkit-details-marker { display: none; }
.tc-rates summary:hover { background: rgba(213, 225, 240, .08); }
.tc-rates summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tc-rates summary i { font-style: normal; font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 99px; background: rgba(var(--glow), .18); color: var(--accent); }
.tc-rates .caret { transform: rotate(-90deg); }
.tc-rates[open] .caret { transform: none; }
.tc-rates .kv { margin-top: 12px; }
.tc-rates .kv > div { padding: 9px 0; font-size: 14.5px; }

/* the expected figure, with the working under it */
.tc-fig { display: block; font: 500 22px var(--mono); font-variant-numeric: tabular-nums; }
.tc-math { margin-top: 16px; padding-left: 12px; border-left: 2px solid rgba(var(--glow), .6); font: 14px var(--mono); color: var(--dim); }

/* the JSON, as delivered */
.tc-json { padding: 0 26px 26px; }
.tc-json .json { max-height: 620px; white-space: pre-wrap; overflow-wrap: anywhere; } /* the long comment line wraps instead of scrolling sideways */

@media (max-width: 820px) {
  .tc-body { grid-template-columns: 1fr; }
  .tc-given { border-right: 0; border-bottom: 1px solid var(--rule); }
  .tc-intro, .tc-given, .tc-expect { padding-left: 18px; padding-right: 18px; }
  .tc-json { padding: 0 18px 22px; }
}
