1189 lines
27 KiB
SCSS
1189 lines
27 KiB
SCSS
// mantra · book-grade reader typography
|
|
// Fraunces (variable) body + IBM Plex Sans (labels) + IBM Plex Mono (non-Latin)
|
|
// Pergament-ink light · deep-ink dark · 62ch measure
|
|
// Headings H2 as margin-labels on wide, inline-before on mobile
|
|
|
|
// --- Fonts (self-hosted) ---------------------------------------------
|
|
|
|
@font-face {
|
|
font-family: "Fraunces";
|
|
src: url("/fonts/fraunces-variable.woff2") format("woff2-variations");
|
|
font-weight: 100 900;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: "Fraunces";
|
|
src: url("/fonts/fraunces-italic-variable.woff2") format("woff2-variations");
|
|
font-weight: 100 900;
|
|
font-style: italic;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: "IBM Plex Sans";
|
|
src: url("/fonts/plex-sans-variable.woff2") format("woff2-variations");
|
|
font-weight: 100 900;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
@font-face {
|
|
font-family: "IBM Plex Mono";
|
|
src: url("/fonts/plex-mono-variable.woff2") format("woff2");
|
|
font-weight: 400;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
|
|
// --- Color tokens ----------------------------------------------------
|
|
|
|
:root {
|
|
// Pergament (light)
|
|
--mantra-bg: #fdfbf5;
|
|
--mantra-fg: #1c1917;
|
|
--mantra-muted: #78716c;
|
|
--mantra-faint: #d6d3d0;
|
|
--mantra-accent: #5e4b3a;
|
|
--mantra-hairline: rgba(28, 25, 23, 0.08);
|
|
|
|
--mantra-measure: 62ch;
|
|
--mantra-serif: "Fraunces", Georgia, "Times New Roman", serif;
|
|
--mantra-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
|
|
--mantra-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--mantra-bg: #0f1012;
|
|
--mantra-fg: #e7e3dd;
|
|
--mantra-muted: #8a857d;
|
|
--mantra-faint: #2a2826;
|
|
--mantra-accent: #c9b999;
|
|
--mantra-hairline: rgba(231, 227, 221, 0.10);
|
|
}
|
|
}
|
|
|
|
// --- Reset + base ----------------------------------------------------
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
::selection {
|
|
background: var(--mantra-accent);
|
|
color: var(--mantra-bg);
|
|
}
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--mantra-bg);
|
|
color: var(--mantra-fg);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--mantra-serif);
|
|
font-size: 19px;
|
|
line-height: 1.68;
|
|
letter-spacing: 0.002em;
|
|
// Variable-axis tuning: a warmer serif without eccentricity
|
|
font-variation-settings: "opsz" 18, "SOFT" 30, "WONK" 0, "wght" 400;
|
|
font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "onum" 1;
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
border-bottom: 1px solid var(--mantra-hairline);
|
|
transition: border-color 0.2s, color 0.2s;
|
|
}
|
|
a:hover { border-bottom-color: var(--mantra-accent); color: var(--mantra-accent); }
|
|
|
|
main {
|
|
max-width: var(--mantra-measure);
|
|
margin: 0 auto;
|
|
padding: 6rem 1.5rem 8rem;
|
|
}
|
|
@media (max-width: 640px) {
|
|
main { padding: 3rem 1.25rem 5rem; }
|
|
body { font-size: 18px; line-height: 1.65; }
|
|
}
|
|
|
|
// --- Landing --------------------------------------------------------
|
|
|
|
.landing {
|
|
max-width: 74ch;
|
|
}
|
|
|
|
.landing-head { margin-bottom: 5rem; }
|
|
|
|
.landing-title {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0, "wght" 320;
|
|
font-size: clamp(3.5rem, 8.5vw, 5.5rem);
|
|
font-weight: 320;
|
|
line-height: 0.98;
|
|
letter-spacing: -0.025em;
|
|
margin: 0;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
.landing-subtitle {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 400;
|
|
font-size: 0.78rem;
|
|
color: var(--mantra-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.22em;
|
|
margin: 1.5rem 0 3.5rem;
|
|
}
|
|
|
|
.landing-question {
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0, "wght" 380;
|
|
font-size: clamp(1.25rem, 2.4vw, 1.5rem);
|
|
line-height: 1.4;
|
|
color: var(--mantra-fg);
|
|
margin: 0 0 4.5rem;
|
|
max-width: 32ch;
|
|
padding-left: 1.4rem;
|
|
border-left: 2px solid var(--mantra-accent);
|
|
}
|
|
|
|
.landing-section-label {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 500;
|
|
font-size: 0.72rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.28em;
|
|
color: var(--mantra-muted);
|
|
margin: 0 0 1.5rem;
|
|
}
|
|
|
|
.landing-artifacts {
|
|
margin-bottom: 6rem;
|
|
}
|
|
|
|
.artifacts-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1.25rem;
|
|
}
|
|
@media (max-width: 760px) {
|
|
.artifacts-list { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
.artifact-line a {
|
|
display: block;
|
|
border-bottom: none;
|
|
line-height: 1.45;
|
|
padding: 1.25rem 1.4rem;
|
|
border: 1px solid var(--mantra-hairline);
|
|
border-radius: 6px;
|
|
background: color-mix(in srgb, var(--mantra-bg) 60%, transparent);
|
|
transition: border-color 0.18s, transform 0.18s, background 0.18s;
|
|
}
|
|
.artifact-line a:hover {
|
|
border-color: var(--mantra-accent);
|
|
transform: translateY(-1px);
|
|
}
|
|
.artifact-title {
|
|
display: block;
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0, "wght" 480;
|
|
font-size: 1.25rem;
|
|
color: var(--mantra-fg);
|
|
letter-spacing: -0.005em;
|
|
}
|
|
.artifact-sep { display: none; }
|
|
.artifact-subtitle {
|
|
display: block;
|
|
margin-top: 0.4rem;
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
color: var(--mantra-muted);
|
|
font-size: 0.9rem;
|
|
line-height: 1.4;
|
|
}
|
|
.artifact-line a:hover .artifact-title { color: var(--mantra-accent); }
|
|
|
|
.landing-cycle {
|
|
margin-bottom: 5rem;
|
|
padding-top: 2.5rem;
|
|
border-top: 1px solid var(--mantra-hairline);
|
|
|
|
&:first-of-type { border-top: none; padding-top: 0; }
|
|
}
|
|
|
|
.landing-cycle-head {
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
gap: 1.8rem;
|
|
align-items: start;
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.landing-cycle-number {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0, "wght" 250;
|
|
font-size: clamp(3.5rem, 6vw, 5rem);
|
|
line-height: 0.9;
|
|
letter-spacing: -0.04em;
|
|
color: var(--mantra-faint);
|
|
font-feature-settings: "onum" 1, "tnum" 0;
|
|
}
|
|
|
|
.landing-cycle-headings {
|
|
padding-top: 0.4rem;
|
|
}
|
|
|
|
.landing-cycle-title {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0, "wght" 400;
|
|
font-size: clamp(1.6rem, 3vw, 2.1rem);
|
|
line-height: 1.1;
|
|
letter-spacing: -0.01em;
|
|
margin: 0;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
.landing-cycle-subtitle {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 400;
|
|
font-size: 0.72rem;
|
|
color: var(--mantra-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.2em;
|
|
margin: 0.5rem 0 0;
|
|
}
|
|
|
|
.landing-cycle-question {
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-variation-settings: "opsz" 32, "SOFT" 50, "WONK" 0, "wght" 400;
|
|
font-size: clamp(1rem, 1.8vw, 1.15rem);
|
|
line-height: 1.45;
|
|
color: var(--mantra-muted);
|
|
margin: 1rem 0 0;
|
|
max-width: 42ch;
|
|
}
|
|
|
|
@media (max-width: 560px) {
|
|
.landing-cycle-head {
|
|
grid-template-columns: 1fr;
|
|
gap: 0.8rem;
|
|
}
|
|
}
|
|
|
|
.landing-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 3.5rem;
|
|
}
|
|
@media (max-width: 760px) {
|
|
.landing-grid { grid-template-columns: 1fr; gap: 3rem; }
|
|
}
|
|
|
|
.landing-col-label {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 500;
|
|
font-size: 0.72rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.28em;
|
|
color: var(--mantra-muted);
|
|
margin: 0 0 1.75rem;
|
|
}
|
|
|
|
.works-list, .themes-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.work-line {
|
|
a {
|
|
display: block;
|
|
border-bottom: none;
|
|
line-height: 1.35;
|
|
}
|
|
a:hover { color: var(--mantra-fg); }
|
|
a:hover .work-author { color: var(--mantra-accent); }
|
|
}
|
|
.work-author {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 18, "SOFT" 30, "WONK" 0, "wght" 500;
|
|
color: var(--mantra-fg);
|
|
}
|
|
.work-sep { color: var(--mantra-faint); }
|
|
.work-title {
|
|
font-style: italic;
|
|
color: var(--mantra-muted);
|
|
}
|
|
.work-claim {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 0, "wght" 380;
|
|
font-size: 0.88rem;
|
|
color: var(--mantra-muted);
|
|
line-height: 1.5;
|
|
margin-top: 0.3rem;
|
|
}
|
|
|
|
.theme-line a {
|
|
display: block;
|
|
border-bottom: none;
|
|
}
|
|
.theme-title {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 18, "SOFT" 30, "WONK" 0, "wght" 500;
|
|
}
|
|
.theme-count {
|
|
font-family: var(--mantra-sans);
|
|
color: var(--mantra-muted);
|
|
font-size: 0.82rem;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
// --- Source page ----------------------------------------------------
|
|
|
|
.source-breadcrumb {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 450;
|
|
font-size: 0.72rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.22em;
|
|
color: var(--mantra-muted);
|
|
margin-bottom: 3rem;
|
|
.sep { margin: 0 0.5em; color: var(--mantra-faint); }
|
|
a { color: var(--mantra-muted); border-bottom: none; }
|
|
a:hover { color: var(--mantra-fg); }
|
|
}
|
|
|
|
// --- Source hero (title page, shown before body) --------------------
|
|
|
|
.source-hero {
|
|
margin: 4.5rem 0 5rem;
|
|
max-width: var(--mantra-measure);
|
|
}
|
|
|
|
.source-hero-eyebrow {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 500;
|
|
font-size: 0.72rem;
|
|
letter-spacing: 0.22em;
|
|
text-transform: uppercase;
|
|
color: var(--mantra-muted);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.source-hero-title {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0, "wght" 360;
|
|
font-size: clamp(2.3rem, 5.5vw, 3.6rem);
|
|
line-height: 1.03;
|
|
letter-spacing: -0.018em;
|
|
margin: 0 0 2.2rem;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
.source-hero-claim {
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0, "wght" 400;
|
|
font-size: clamp(1.15rem, 2.2vw, 1.35rem);
|
|
line-height: 1.5;
|
|
color: var(--mantra-fg);
|
|
margin: 0 0 2rem;
|
|
padding-left: 1.4rem;
|
|
border-left: 2px solid var(--mantra-accent);
|
|
max-width: 54ch;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 5;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.source-hero-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 0.5rem;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.78rem;
|
|
color: var(--mantra-muted);
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.source-hero-confidence {
|
|
font-variation-settings: "wght" 500;
|
|
|
|
&[data-level="high"] { color: var(--mantra-accent); }
|
|
&[data-level="medium"] { color: var(--mantra-muted); }
|
|
&[data-level="low"] { color: var(--mantra-faint); }
|
|
}
|
|
|
|
.source-hero-sep { color: var(--mantra-faint); }
|
|
|
|
.source-hero-tags {
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.72rem;
|
|
color: var(--mantra-faint);
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.source-hero-rule {
|
|
height: 1px;
|
|
background: var(--mantra-hairline);
|
|
width: 6rem;
|
|
margin-top: 2.5rem;
|
|
}
|
|
|
|
// --- Source body ----------------------------------------------------
|
|
|
|
.source-body {
|
|
// Positioning anchor for H2 margin-labels below.
|
|
position: relative;
|
|
|
|
// The first H1 is duplicated in the hero; hide here to avoid
|
|
// repeating the author/title at the top of the body.
|
|
> h1:first-child { display: none; }
|
|
|
|
// H1 is the work title
|
|
h1 {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 96, "SOFT" 50, "WONK" 0, "wght" 380;
|
|
font-size: clamp(2rem, 5vw, 2.75rem);
|
|
line-height: 1.1;
|
|
letter-spacing: -0.012em;
|
|
margin: 0 0 2.5rem;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
// H2 as margin-label on wide screens (pulled into left margin)
|
|
h2 {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 500;
|
|
font-size: 0.72rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.24em;
|
|
color: var(--mantra-muted);
|
|
font-weight: 500;
|
|
margin: 3.5rem 0 1.25rem;
|
|
position: relative;
|
|
}
|
|
@media (min-width: 1100px) {
|
|
h2 {
|
|
position: absolute;
|
|
// Pull the label into the left gutter, outside the article box.
|
|
// 16ch for the label + 2.5rem breathing room before the text
|
|
// column (which starts at the article's padding-left, i.e. 0).
|
|
left: calc(-16ch - 2.5rem);
|
|
margin: 0;
|
|
padding-top: 0.5rem;
|
|
width: 16ch;
|
|
text-align: right;
|
|
}
|
|
// Insert spacing where H2 would have been inline
|
|
h2 + * { margin-top: 3rem; }
|
|
}
|
|
|
|
h3 {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 24, "SOFT" 40, "WONK" 0, "wght" 520;
|
|
font-size: 1.12rem;
|
|
letter-spacing: -0.005em;
|
|
margin: 2.2rem 0 0.8rem;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 1.35rem;
|
|
hyphens: auto;
|
|
-webkit-hyphens: auto;
|
|
}
|
|
|
|
em, i {
|
|
font-style: italic;
|
|
font-variation-settings: "opsz" 18, "SOFT" 40, "WONK" 0, "wght" 400;
|
|
}
|
|
strong, b {
|
|
font-variation-settings: "opsz" 18, "SOFT" 30, "WONK" 0, "wght" 600;
|
|
}
|
|
|
|
a {
|
|
border-bottom: 1px solid var(--mantra-muted);
|
|
}
|
|
a:hover { border-bottom-color: var(--mantra-accent); }
|
|
|
|
blockquote {
|
|
border-left: 2px solid var(--mantra-accent);
|
|
margin: 2rem 0 2rem -0.5rem;
|
|
padding: 0.3rem 0 0.3rem 1.5rem;
|
|
font-style: italic;
|
|
font-variation-settings: "opsz" 17, "SOFT" 50, "WONK" 0, "wght" 400;
|
|
color: var(--mantra-fg);
|
|
font-size: 0.98rem;
|
|
p { margin-bottom: 0.6rem; &:last-child { margin-bottom: 0; } }
|
|
}
|
|
|
|
code {
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.85em;
|
|
background: var(--mantra-faint);
|
|
padding: 0.1rem 0.35rem;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
pre {
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.82rem;
|
|
background: var(--mantra-faint);
|
|
padding: 1rem 1.25rem;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
margin: 1.75rem 0;
|
|
line-height: 1.5;
|
|
code { background: none; padding: 0; font-size: inherit; }
|
|
}
|
|
|
|
ul, ol {
|
|
margin: 0 0 1.35rem;
|
|
padding-left: 1.5rem;
|
|
}
|
|
li { margin: 0.3rem 0; }
|
|
|
|
hr {
|
|
border: none;
|
|
border-top: 1px solid var(--mantra-hairline);
|
|
margin: 3rem auto;
|
|
width: 12ch;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.9rem;
|
|
margin: 1.5rem 0;
|
|
th, td {
|
|
padding: 0.5rem 0.8rem;
|
|
border-bottom: 1px solid var(--mantra-hairline);
|
|
text-align: left;
|
|
vertical-align: top;
|
|
}
|
|
th {
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 500;
|
|
font-size: 0.75rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.15em;
|
|
color: var(--mantra-muted);
|
|
}
|
|
}
|
|
|
|
// Paragraph click-target + margin dot (M.3 margin-layer).
|
|
// - Empty paragraphs: faint dot appears only on hover (affordance).
|
|
// - Annotated paragraphs (.has-notes): dot is always visible in the
|
|
// accent colour, so readers see at a glance where the marginalia is.
|
|
p[data-para-id] {
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
@media (min-width: 900px) {
|
|
p[data-para-id]::before {
|
|
content: "";
|
|
position: absolute;
|
|
left: -1.25rem;
|
|
top: 0.75em;
|
|
width: 5px;
|
|
height: 5px;
|
|
border-radius: 50%;
|
|
background: var(--mantra-faint);
|
|
opacity: 0;
|
|
transition: opacity 0.2s, background 0.2s, transform 0.2s;
|
|
}
|
|
p[data-para-id]:hover::before {
|
|
opacity: 1;
|
|
background: var(--mantra-muted);
|
|
}
|
|
p[data-para-id].has-notes::before {
|
|
opacity: 1;
|
|
background: var(--mantra-accent);
|
|
}
|
|
p[data-para-id].has-notes:hover::before {
|
|
transform: scale(1.3);
|
|
}
|
|
}
|
|
}
|
|
|
|
.source-foot {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto 1fr;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-top: 5rem;
|
|
padding-top: 2rem;
|
|
border-top: 1px solid var(--mantra-hairline);
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.78rem;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
color: var(--mantra-muted);
|
|
|
|
a { border-bottom: none; color: var(--mantra-muted); }
|
|
a:hover { color: var(--mantra-fg); }
|
|
|
|
.nav-prev { justify-self: start; }
|
|
.nav-home { justify-self: center; }
|
|
.nav-next { justify-self: end; }
|
|
}
|
|
|
|
// --- Theme page -----------------------------------------------------
|
|
|
|
.theme-h1 {
|
|
font-family: var(--mantra-serif);
|
|
font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0, "wght" 380;
|
|
font-size: clamp(2rem, 4.5vw, 2.75rem);
|
|
line-height: 1.1;
|
|
letter-spacing: -0.01em;
|
|
margin: 0 0 2rem;
|
|
color: var(--mantra-fg);
|
|
}
|
|
|
|
.theme-desc {
|
|
margin-bottom: 3rem;
|
|
p { color: var(--mantra-fg); margin-bottom: 1.2rem; }
|
|
}
|
|
|
|
.theme-contributing { margin-top: 3rem; }
|
|
|
|
// --- Misc -----------------------------------------------------------
|
|
|
|
// --- Language toggle (top-right) ---
|
|
.lang-toggle {
|
|
position: fixed;
|
|
top: 1.25rem;
|
|
right: 1.5rem;
|
|
z-index: 10;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
font-family: var(--mantra-sans);
|
|
font-variation-settings: "wght" 450;
|
|
font-size: 0.78rem;
|
|
letter-spacing: 0.1em;
|
|
|
|
a {
|
|
color: var(--mantra-faint);
|
|
text-decoration: none;
|
|
border-bottom: none;
|
|
padding: 0.1rem 0.1rem;
|
|
transition: color 0.15s;
|
|
}
|
|
a:hover { color: var(--mantra-fg); }
|
|
a.lang-active {
|
|
color: var(--mantra-fg);
|
|
font-variation-settings: "wght" 600;
|
|
}
|
|
.lang-dot {
|
|
color: var(--mantra-faint);
|
|
}
|
|
}
|
|
@media (max-width: 640px) {
|
|
.lang-toggle { top: 1rem; right: 1rem; font-size: 0.72rem; }
|
|
}
|
|
|
|
.err {
|
|
color: #b45309;
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.88rem;
|
|
}
|
|
.not-found { padding: 2rem 0; }
|
|
.back-link {
|
|
color: var(--mantra-muted);
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.85rem;
|
|
border-bottom: none;
|
|
}
|
|
|
|
// --- Inspector (v0.3 persistent right panel) ------------------------
|
|
|
|
// Reader frame: article centered in remaining space, inspector fixed right.
|
|
// On wide screens we reserve the inspector's width via padding-right on
|
|
// the frame — this keeps `main { margin: 0 auto }` genuinely centered
|
|
// in the visible reading area instead of being pushed sideways.
|
|
.reader-frame {
|
|
position: relative;
|
|
transition: padding-right 0.2s;
|
|
}
|
|
|
|
@media (min-width: 1180px) {
|
|
.reader-frame { padding-right: 400px; }
|
|
}
|
|
|
|
.inspector {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 380px;
|
|
background: var(--mantra-bg);
|
|
border-left: 1px solid var(--mantra-hairline);
|
|
z-index: 15;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.92rem;
|
|
color: var(--mantra-fg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
@media (max-width: 1180px) {
|
|
.inspector {
|
|
position: fixed;
|
|
top: auto;
|
|
right: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 100vw;
|
|
max-height: 55vh;
|
|
border-left: none;
|
|
border-top: 1px solid var(--mantra-hairline);
|
|
box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
|
|
}
|
|
}
|
|
|
|
.inspector-head {
|
|
padding: 0.9rem 1.1rem 0.7rem;
|
|
border-bottom: 1px solid var(--mantra-hairline);
|
|
text-align: center;
|
|
}
|
|
|
|
.inspector-tabs {
|
|
display: inline-flex;
|
|
gap: 0.2rem;
|
|
|
|
.tab {
|
|
background: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.8rem;
|
|
font-variation-settings: "wght" 450;
|
|
letter-spacing: 0.08em;
|
|
text-transform: lowercase;
|
|
color: var(--mantra-muted);
|
|
padding: 0.3rem 0.9rem;
|
|
border-radius: 14px;
|
|
transition: color 0.15s, background 0.15s;
|
|
|
|
&:hover { color: var(--mantra-fg); }
|
|
&.tab-active {
|
|
color: var(--mantra-bg);
|
|
background: var(--mantra-accent);
|
|
font-variation-settings: "wght" 600;
|
|
}
|
|
}
|
|
}
|
|
|
|
.inspector-anchor {
|
|
padding: 0.7rem 1.1rem;
|
|
border-bottom: 1px solid var(--mantra-hairline);
|
|
min-height: 3.2rem;
|
|
}
|
|
|
|
.inspector-hint {
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-size: 0.85rem;
|
|
color: var(--mantra-faint);
|
|
margin: 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.inspector-anchor-chip {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 0.4rem;
|
|
position: relative;
|
|
}
|
|
|
|
.inspector-excerpt {
|
|
flex: 1;
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-size: 0.86rem;
|
|
line-height: 1.5;
|
|
color: var(--mantra-muted);
|
|
max-height: 5.5em;
|
|
overflow: hidden;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
padding-left: 0.6rem;
|
|
border-left: 2px solid var(--mantra-hairline);
|
|
|
|
&.is-selection {
|
|
border-left-color: var(--mantra-accent);
|
|
color: var(--mantra-fg);
|
|
}
|
|
}
|
|
|
|
.inspector-anchor-clear {
|
|
background: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--mantra-faint);
|
|
font-family: var(--mantra-serif);
|
|
font-size: 1.1rem;
|
|
line-height: 1;
|
|
padding: 0 0.25rem;
|
|
transition: color 0.15s;
|
|
&:hover { color: var(--mantra-fg); }
|
|
}
|
|
|
|
.inspector-form {
|
|
padding: 0.9rem 1.1rem 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.6rem;
|
|
border-bottom: 1px solid var(--mantra-hairline);
|
|
}
|
|
|
|
.inspector-input {
|
|
width: 100%;
|
|
resize: vertical;
|
|
min-height: 4.5rem;
|
|
background: var(--mantra-bg);
|
|
color: var(--mantra-fg);
|
|
border: 1px solid var(--mantra-hairline);
|
|
border-radius: 4px;
|
|
padding: 0.55rem 0.7rem;
|
|
font-family: var(--mantra-serif);
|
|
font-size: 0.95rem;
|
|
line-height: 1.45;
|
|
transition: border-color 0.15s;
|
|
&:focus {
|
|
outline: none;
|
|
border-color: var(--mantra-accent);
|
|
}
|
|
}
|
|
|
|
.inspector-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.8rem;
|
|
}
|
|
|
|
.inspector-author {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.35rem;
|
|
flex: 1;
|
|
min-width: 0;
|
|
|
|
.inspector-author-label {
|
|
font-size: 0.72rem;
|
|
color: var(--mantra-muted);
|
|
letter-spacing: 0.06em;
|
|
text-transform: lowercase;
|
|
font-variation-settings: "wght" 500;
|
|
}
|
|
.inspector-author-input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px dashed var(--mantra-faint);
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.82rem;
|
|
color: var(--mantra-fg);
|
|
padding: 0.1rem 0 0.15rem;
|
|
outline: none;
|
|
transition: border-color 0.15s;
|
|
&:focus { border-bottom-color: var(--mantra-accent); }
|
|
&::placeholder { color: var(--mantra-faint); }
|
|
}
|
|
}
|
|
|
|
.inspector-submit {
|
|
background: var(--mantra-accent);
|
|
color: var(--mantra-bg);
|
|
border: none;
|
|
border-radius: 14px;
|
|
padding: 0.45rem 1.1rem;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.82rem;
|
|
font-variation-settings: "wght" 600;
|
|
letter-spacing: 0.06em;
|
|
text-transform: lowercase;
|
|
cursor: pointer;
|
|
transition: opacity 0.15s, transform 0.12s;
|
|
|
|
&:hover:not(:disabled) { transform: translateY(-1px); }
|
|
&:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
.inspector-error {
|
|
color: #b45309;
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.78rem;
|
|
margin: 0;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.inspector-entries {
|
|
flex: 1 1 auto;
|
|
overflow-y: auto;
|
|
padding: 0.7rem 1.1rem 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.9rem;
|
|
}
|
|
|
|
.inspector-entries-label {
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.68rem;
|
|
letter-spacing: 0.14em;
|
|
text-transform: uppercase;
|
|
color: var(--mantra-muted);
|
|
margin-bottom: 0.2rem;
|
|
&:empty { display: none; }
|
|
}
|
|
|
|
// --- Selection popover (floating over selected text) ----------------
|
|
|
|
.selpop {
|
|
position: fixed;
|
|
transform: translate(-50%, -100%);
|
|
z-index: 30;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0;
|
|
background: var(--mantra-fg);
|
|
color: var(--mantra-bg);
|
|
border-radius: 18px;
|
|
padding: 0.2rem 0.3rem;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.78rem;
|
|
animation: selpop-in 0.12s ease-out;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
@keyframes selpop-in {
|
|
from { opacity: 0; transform: translate(-50%, -95%); }
|
|
to { opacity: 1; transform: translate(-50%, -100%); }
|
|
}
|
|
|
|
.selpop::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: -5px;
|
|
transform: translateX(-50%) rotate(45deg);
|
|
width: 10px;
|
|
height: 10px;
|
|
background: var(--mantra-fg);
|
|
}
|
|
|
|
.selpop-btn {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--mantra-bg);
|
|
cursor: pointer;
|
|
padding: 0.35rem 0.7rem;
|
|
border-radius: 14px;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.78rem;
|
|
font-variation-settings: "wght" 500;
|
|
letter-spacing: 0.04em;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.3rem;
|
|
transition: background 0.12s;
|
|
|
|
&:hover { background: rgba(255, 255, 255, 0.1); }
|
|
}
|
|
|
|
.selpop-ask {
|
|
color: var(--mantra-bg);
|
|
font-variation-settings: "wght" 600;
|
|
}
|
|
|
|
.selpop-ico {
|
|
color: var(--mantra-accent);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.selpop-sep {
|
|
width: 1px;
|
|
height: 16px;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
margin: 0 0.15rem;
|
|
}
|
|
|
|
.selpop-close {
|
|
padding: 0.35rem 0.55rem;
|
|
font-size: 1rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
.margin-empty {
|
|
color: var(--mantra-muted);
|
|
font-style: italic;
|
|
font-family: var(--mantra-serif);
|
|
font-size: 0.9rem;
|
|
margin: 1.2rem 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.note-card {
|
|
border-left: 2px solid var(--mantra-hairline);
|
|
padding: 0.1rem 0 0.1rem 0.8rem;
|
|
|
|
&.note-card-ask { border-left-color: var(--mantra-accent); }
|
|
|
|
.note-card-meta {
|
|
font-size: 0.72rem;
|
|
letter-spacing: 0.08em;
|
|
color: var(--mantra-muted);
|
|
margin-bottom: 0.3rem;
|
|
font-variation-settings: "wght" 500;
|
|
}
|
|
.note-q {
|
|
font-family: var(--mantra-serif);
|
|
font-style: italic;
|
|
font-size: 0.94rem;
|
|
line-height: 1.5;
|
|
margin: 0 0 0.5rem;
|
|
color: var(--mantra-fg);
|
|
}
|
|
.note-a {
|
|
font-family: var(--mantra-serif);
|
|
font-size: 0.94rem;
|
|
line-height: 1.55;
|
|
margin: 0;
|
|
color: var(--mantra-fg);
|
|
white-space: pre-wrap;
|
|
}
|
|
}
|
|
|
|
.margin-drawer-form {
|
|
padding: 0.9rem 1.1rem 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.6rem;
|
|
}
|
|
|
|
.margin-drawer-input {
|
|
width: 100%;
|
|
resize: vertical;
|
|
min-height: 4.5rem;
|
|
background: var(--mantra-bg);
|
|
color: var(--mantra-fg);
|
|
border: 1px solid var(--mantra-hairline);
|
|
border-radius: 4px;
|
|
padding: 0.55rem 0.7rem;
|
|
font-family: var(--mantra-serif);
|
|
font-size: 0.95rem;
|
|
line-height: 1.45;
|
|
transition: border-color 0.15s;
|
|
&:focus {
|
|
outline: none;
|
|
border-color: var(--mantra-accent);
|
|
}
|
|
}
|
|
|
|
.margin-drawer-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.8rem;
|
|
}
|
|
|
|
.margin-drawer-author {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.35rem;
|
|
flex: 1;
|
|
min-width: 0;
|
|
|
|
.margin-drawer-author-label {
|
|
font-size: 0.72rem;
|
|
color: var(--mantra-muted);
|
|
letter-spacing: 0.06em;
|
|
text-transform: lowercase;
|
|
font-variation-settings: "wght" 500;
|
|
}
|
|
.margin-drawer-author-input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px dashed var(--mantra-faint);
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.82rem;
|
|
color: var(--mantra-fg);
|
|
padding: 0.1rem 0 0.15rem;
|
|
outline: none;
|
|
transition: border-color 0.15s;
|
|
&:focus { border-bottom-color: var(--mantra-accent); }
|
|
&::placeholder { color: var(--mantra-faint); }
|
|
}
|
|
}
|
|
|
|
.margin-drawer-submit {
|
|
background: var(--mantra-accent);
|
|
color: var(--mantra-bg);
|
|
border: none;
|
|
border-radius: 14px;
|
|
padding: 0.45rem 1.1rem;
|
|
font-family: var(--mantra-sans);
|
|
font-size: 0.82rem;
|
|
font-variation-settings: "wght" 600;
|
|
letter-spacing: 0.06em;
|
|
text-transform: lowercase;
|
|
cursor: pointer;
|
|
transition: opacity 0.15s, transform 0.12s;
|
|
|
|
&:hover:not(:disabled) { transform: translateY(-1px); }
|
|
&:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
.margin-drawer-error {
|
|
color: #b45309;
|
|
font-family: var(--mantra-mono);
|
|
font-size: 0.78rem;
|
|
margin: 0;
|
|
word-break: break-word;
|
|
}
|
|
|
|
// Mobile: drawer becomes a bottom sheet
|
|
@media (max-width: 720px) {
|
|
.margin-drawer {
|
|
top: auto;
|
|
right: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 100vw;
|
|
max-height: 75vh;
|
|
border-left: none;
|
|
border-top: 1px solid var(--mantra-hairline);
|
|
box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
|
|
animation: drawer-up 0.22s ease-out;
|
|
}
|
|
@keyframes drawer-up {
|
|
from { transform: translateY(16px); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
}
|