/*
 * c12o app/memo base stylesheet — on-brand defaults for standalone HTML.
 * Pair with tokens.css:
 *   <link rel="stylesheet" href="/_shared/tokens.css">
 *   <link rel="stylesheet" href="/_shared/app-base.css">
 * Follows OS light/dark automatically (add class="light"/"dark" on <html> to pin).
 */

* {
	box-sizing: border-box;
}

html {
	color-scheme: light dark;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	line-height: 1.75;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: calc(var(--space) * 8) calc(var(--space) * 3) calc(var(--space) * 12);
}

h1,
h2,
h3,
h4 {
	line-height: 1.3;
	font-weight: 700;
	margin: 2.2em 0 0.7em;
}

h1 {
	font-size: 2rem;
	margin-top: 0;
}
h2 {
	font-size: 1.5rem;
	padding-bottom: 0.3em;
	border-bottom: 1px dashed var(--line);
}
h3 {
	font-size: 1.2rem;
}

p,
ul,
ol,
blockquote,
table {
	margin: 0 0 1.2em;
}

a {
	color: var(--primary);
	text-decoration: underline dashed;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}
a:hover {
	text-decoration-style: solid;
}

code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--primary-weak);
	color: var(--text);
	padding: 0.15em 0.4em;
	border-radius: var(--radius-sm);
}

pre {
	background: var(--code-bg);
	color: var(--code-fg);
	font-family: var(--font-mono);
	padding: calc(var(--space) * 2.5);
	border-radius: var(--radius-sm);
	overflow-x: auto;
	line-height: 1.6;
}
pre code {
	background: none;
	color: inherit;
	padding: 0;
}

blockquote {
	border-left: 3px solid var(--primary);
	margin-left: 0;
	padding: 0.2em 0 0.2em 1.2em;
	color: var(--text-muted);
}

table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95em;
}
th,
td {
	border: 1px solid var(--line);
	padding: 0.5em 0.8em;
	text-align: left;
}
th {
	background: var(--surface-2);
	font-weight: 700;
}

hr {
	border: none;
	border-top: 1px dashed var(--line);
	margin: 2.5em 0;
}

img,
svg,
canvas {
	max-width: 100%;
	height: auto;
}

/* Card wrapper for charts/figures — gives any embedded viz an on-brand frame. */
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: calc(var(--space) * 3);
	box-shadow: var(--shadow);
	margin: 0 0 1.5em;
}

.figure-caption {
	color: var(--text-muted);
	font-size: 0.85em;
	margin-top: 0.6em;
	text-align: center;
}

/* Small footer credit, matches blog tone. */
.doc-footer {
	margin-top: calc(var(--space) * 8);
	padding-top: calc(var(--space) * 3);
	border-top: 1px dashed var(--line);
	color: var(--text-muted);
	font-size: 0.85em;
}
