phd-report / assets /css /content.css
gspin's picture
Rebuild from 41023a8
e3d5683 verified
Raw History Blame Contribute Delete
12.5 kB
/* Typography & components for article content loaded into #content.
Fragments only use these classes/tags — no inline styling needed. */
.content h1 {
display: none; /* the fragment's own <h1>, if present, is redundant with .page-head h1 */
}
.content h2 {
font-size: 20px;
margin: 36px 0 12px;
padding-top: 4px;
letter-spacing: -0.01em;
}
.content h3 {
font-size: 16px;
margin: 28px 0 10px;
}
.content p {
margin: 0 0 14px;
color: var(--text);
}
.content > *:first-child {
margin-top: 0;
}
.content ul,
.content ol {
margin: 0 0 14px;
padding-left: 22px;
}
.content li {
margin-bottom: 6px;
}
.content a {
color: var(--accent);
text-decoration: underline;
text-underline-offset: 2px;
}
.content strong {
font-weight: 600;
}
.content code {
font-family: var(--font-mono);
font-size: 0.88em;
background: var(--bg-sunken);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
}
.content pre {
background: var(--bg-sunken);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 14px 16px;
overflow-x: auto;
margin: 0 0 18px;
}
.content pre code {
background: none;
border: none;
padding: 0;
font-size: 13px;
line-height: 1.6;
}
.content blockquote {
margin: 0 0 18px;
padding: 2px 16px;
border-left: 3px solid var(--border-strong);
color: var(--text-muted);
}
.content hr {
border: none;
border-top: 1px solid var(--border);
margin: 32px 0;
}
.content img,
.content video {
max-width: 100%;
border-radius: var(--radius-md);
border: 1px solid var(--border);
}
.content figure {
margin: 0 0 18px;
}
.content figcaption {
font-size: 12.5px;
color: var(--text-muted);
margin-top: 8px;
text-align: center;
}
.content table {
width: 100%;
border-collapse: collapse;
margin: 0 0 20px;
font-size: 13.5px;
}
.content th,
.content td {
border: 1px solid var(--border);
padding: 8px 10px;
text-align: left;
}
.content th {
background: var(--bg-sunken);
font-weight: 600;
}
/* Callouts: <div class="callout note|tip|warning"> */
.content .callout {
display: flex;
gap: 10px;
padding: 14px 16px;
border: 1px solid var(--border);
border-left-width: 3px;
border-radius: var(--radius-md);
margin: 0 0 18px;
font-size: 13.5px;
}
.content .callout p:last-child {
margin-bottom: 0;
}
.content .callout.note {
border-left-color: var(--accent);
background: var(--accent-soft);
}
.content .callout.tip {
border-left-color: #16a34a;
background: rgba(22, 163, 74, 0.08);
}
.content .callout.warning {
border-left-color: #d97706;
background: rgba(217, 119, 6, 0.08);
}
/* KaTeX loaded lazily; ensure block math doesn't overflow */
.content .katex-display {
overflow-x: auto;
overflow-y: hidden;
}
/* Collapsible blocks: <details class="paper"><summary>…</summary>…</details> */
.content details {
border: 1px solid var(--border);
border-radius: var(--radius-md);
margin: 0 0 8px;
padding: 0 14px;
}
.content details > summary {
cursor: pointer;
padding: 10px 0;
font-weight: 600;
font-size: 14px;
}
.content details[open] > summary {
border-bottom: 1px solid var(--border);
margin-bottom: 12px;
}
.content details .meta {
font-size: 12.5px;
color: var(--text-muted);
font-weight: 400;
}
.content details > summary .meta {
display: block;
margin-top: 2px;
}
.content details table {
font-size: 12.5px;
}
.content h4 {
font-size: 14px;
margin: 22px 0 8px;
}
/* Figure thumbnails in tables: <a><img class="thumb"></a> */
.content img.thumb {
display: block;
width: 96px;
height: auto;
margin-bottom: 2px;
}
.content .thumb-cell {
display: inline-block;
vertical-align: top;
margin: 0 6px 6px 0;
}
/* Wide tables scroll horizontally: <div class="table-wrap"><table>…</table></div> */
.content .table-wrap {
overflow-x: auto;
margin: 0 0 20px;
}
.content .table-wrap table {
margin: 0;
font-size: 12.5px;
}
.content th.num,
.content td.num {
text-align: right;
white-space: nowrap;
}
/* Gold figures on the Queries page: a thumbnail over its id. */
.content figure.gold {
display: inline-block;
margin: 0 6px 6px 0;
vertical-align: top;
}
.content figure.gold img {
display: block;
width: 90px;
height: auto;
}
.content figure.gold figcaption {
margin-top: 4px;
font-size: 11px;
text-align: left;
}
/* Theoretical framework page: each framework's levels, one coloured row per kind of
information, and the framework × kind tables. */
.content table.levels td:first-child {
width: 34%;
font-weight: 600;
border-left: 3px solid var(--lvl, var(--border));
color: var(--lvl, var(--text));
}
.content table.levels td.off {
color: var(--text-faint);
font-style: italic;
}
.content table.levels tr.form { --lvl: var(--lvl-form); }
.content table.levels tr.generic { --lvl: var(--lvl-generic); }
.content table.levels tr.specific { --lvl: var(--lvl-specific); }
.content table.levels tr.abstract { --lvl: var(--lvl-abstract); }
.content table.levels tr.catalogue { --lvl: var(--lvl-catalogue); }
.content table.levels.defs td:first-child { width: 24%; }
.content table.levels td.def { width: 36%; color: var(--text-muted); }
.content table.levelmap th[colspan] {
text-align: center;
border-bottom: 1px solid var(--border);
}
.content table.levelmap tbody th { text-align: left; white-space: nowrap; }
.content table.levelmap.share td { font-variant-numeric: tabular-nums; }
.content table.levelmap td.off { color: var(--text-faint); }
/* An embedded slide deck, kept at 16:9. */
.content .slides-frame {
aspect-ratio: 16 / 9;
margin: 0 0 20px;
border: 1px solid var(--border);
}
.content .slides-frame iframe {
width: 100%;
height: 100%;
border: 0;
display: block;
}
/* Frameworks applied to the queries: the class beside the query words it labels. */
.content table.levelmap.queries {
font-size: 12.5px;
table-layout: fixed;
width: 100%;
min-width: 640px;
}
.content table.levelmap.queries td,
.content table.levelmap.queries th { overflow-wrap: anywhere; }
.content table.levelmap.queries col.fw { width: 15%; }
.content table.levelmap.queries td { vertical-align: top; }
.content table.levelmap .cls { display: block; color: var(--text-faint); font-size: 0.92em; }
.content details.query > summary { font-weight: 400; }
/* The pyramid applied: a gold figure's per-level table (models as columns) beside the image. */
.content .pyramid-figure {
display: grid;
grid-template-columns: minmax(0, 1fr) 260px;
gap: 20px;
align-items: start;
margin-bottom: 28px;
}
.content .pyramid-figure figure { margin: 0; position: sticky; top: 16px; }
.content .pyramid-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.content .pyramid-figure figcaption { margin-top: 6px; font-size: 11.5px; color: var(--text-muted); }
.content table.levels.pyramid { font-size: 12.5px; table-layout: fixed; width: 100%; }
.content table.levels.pyramid td { vertical-align: top; }
.content table.levels.pyramid col.lvl { width: 130px; }
.content table.levels.pyramid td:first-child { width: auto; font-size: 0.95em; }
.content table.levels.pyramid .basis,
.content table.levelmap.pyramid .alt { color: var(--text-faint); font-size: 0.9em; }
.content table.levels.pyramid .basis { display: block; margin-top: 2px; font-style: italic; }
@media (max-width: 760px) {
.content .pyramid-figure { grid-template-columns: 1fr; }
.content .pyramid-figure figure { position: static; order: -1; max-width: 320px; }
}
/* Dataset v1: a v0 crop beside the page image(s) that replace it. */
.content .pairing {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
gap: 16px;
align-items: end;
margin-bottom: 8px;
}
.content .pairing figure { margin: 0; }
.content .pairing img { display: block; width: 100%; height: auto; }
.content .pairing figcaption { font-size: 11.5px; text-align: left; }
.content p.caption-text { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
/* Pyramid against embeddings: the top images of each approach, gold outlined. */
.content table.retrieved { font-size: 12.5px; table-layout: fixed; width: 100%; }
.content table.retrieved col.how { width: 170px; }
.content table.retrieved col.rank { width: 64px; }
.content table.retrieved td { vertical-align: middle; }
.content table.retrieved .basis { display: block; color: var(--text-faint); font-size: 0.9em; }
.content .hits { display: flex; gap: 6px; flex-wrap: wrap; }
.content .hits figure { margin: 0; width: 84px; text-align: center; }
.content .hits img {
display: block; width: 84px; height: 84px; object-fit: contain;
background: var(--bg-raised); border: 1px solid var(--border);
}
.content .hits figure.gold img { border: 3px solid var(--accent); }
.content .hits figcaption { font-size: 10.5px; color: var(--text-faint); }
.content details > table, .content details .table-wrap { margin-top: 8px; }
@media (max-width: 760px) {
.content table.retrieved col.how { width: 110px; }
.content .hits figure, .content .hits img { width: 64px; }
.content .hits img { height: 64px; }
}
/* Interactive bar charts (space/viz.py): every score on one 0-1 axis. The
checkboxes above the plot toggle metrics and rows through :has() rules each
chart carries, scoped to its id. */
.viz-chart { margin: 1.25rem 0; font-family: var(--font-sans); }
.viz-chart .viz-gloss { margin: .9rem 0 0; display: grid; gap: .15rem; font-size: .8rem; color: var(--text-muted); }
.viz-chart .viz-gloss div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem; }
.viz-chart .viz-gloss dt { font-weight: 600; color: var(--text); }
.viz-chart .viz-gloss dd { margin: 0; }
.viz-chart figcaption { margin-top: .75rem; font-size: .85rem; color: var(--text-muted); text-align: left; }
.viz-chart .viz-controls { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; margin-bottom: .9rem; font-size: .8rem; }
.viz-chart fieldset { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15rem .9rem; border: 0; margin: 0; padding: 0; }
.viz-chart legend { float: left; color: var(--text-muted); padding: 0; margin-right: .2rem; font-weight: 600; }
.viz-chart .viz-controls label { display: flex; align-items: center; gap: .3rem; cursor: pointer; white-space: nowrap; }
.viz-chart .viz-controls input { margin: 0; }
.viz-chart .sw { display: inline-block; width: .8em; height: .8em; border-radius: 2px; background: var(--c); }
.viz-chart .viz-plot { min-width: 0; }
.viz-chart .viz-group { margin: .9rem 0 .2rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.viz-chart .viz-group:first-child { margin-top: 0; }
.viz-chart .viz-row { display: grid; grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr); gap: .75rem; align-items: center; padding: .35rem 0; border-top: 1px solid var(--border); }
.viz-chart .viz-label { font-size: .85rem; color: var(--text); text-align: right; }
.viz-chart .viz-bars, .viz-chart .viz-ticks { position: relative; margin-right: 2.6rem; }
.viz-chart .viz-bars { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; background: repeating-linear-gradient(to right, var(--border) 0 1px, transparent 1px 10%); border-right: 1px solid var(--border); }
.viz-chart .viz-bar { position: relative; height: 10px; }
.viz-chart .viz-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); min-width: 1px; background: var(--c); border-radius: 0 3px 3px 0; }
.viz-chart .viz-bar b { position: absolute; top: 50%; left: calc(var(--v) * 100% + 4px); transform: translateY(-50%); font-size: .7rem; font-weight: 400; color: var(--text-muted); line-height: 1; }
.viz-chart .viz-bar:hover i { outline: 1px solid var(--text); }
.viz-chart .viz-axis { display: grid; grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr); gap: .75rem; border-top: 1px solid var(--border); }
.viz-chart .viz-ticks { height: 1.2rem; font-size: .75rem; color: var(--text-muted); }
.viz-chart .viz-ticks span { position: absolute; transform: translateX(-50%); }
@media (max-width: 720px) {
.viz-chart .viz-controls { align-items: flex-start; }
.viz-chart fieldset { justify-content: flex-start; }
.viz-chart .viz-controls label { white-space: normal; overflow-wrap: anywhere; }
.viz-chart .viz-label { overflow-wrap: anywhere; font-size: .75rem; }
.viz-chart .viz-row, .viz-chart .viz-axis { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); }
.viz-chart .viz-ticks span:nth-child(even) { display: none; }
}