:root {
  --width: 720px;
  --font-main: Verdana, sans-serif;
  --font-secondary: Verdana, sans-serif;
  --font-scale: 1em;
  --background-color: #f7f4ec;
  --heading-color: #202521;
  --text-color: #41433f;
  --link-color: #7f4438;
  --visited-color: #675b70;
  --code-background-color: #ece6da;
  --code-color: #2b302c;
  --blockquote-color: #4d504b;
  --muted-color: #77776f;
  --border-color: #a9a397;
  --chart-equity: #476978;
  --chart-copper: #a56a34;
  --chart-benchmark: #77776f;
  --chart-positive: #66785e;
  --selection-color: #e2d3bd;
  --signal-color: #ad3f32;
  color-scheme: light;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--font-scale);
  margin: auto;
  padding: 20px;
  max-width: var(--width);
  text-align: left;
  background-color: var(--background-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  color: var(--text-color);
}

::selection { background: var(--selection-color); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--heading-color);
}

a {
  color: var(--link-color);
  cursor: pointer;
  text-decoration: none;
}

a:hover { text-decoration: underline; }
nav a { margin-right: 8px; }
strong, b { color: var(--heading-color); }
button { margin: 0; cursor: pointer; }

time {
  font-family: monospace;
  font-style: normal;
  font-size: 15px;
}

main { line-height: 1.6; }
table { width: 100%; }
hr { border: 0; border-top: 1px dashed; }
img { max-width: 100%; }

code {
  font-family: monospace;
  padding: 2px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
}

blockquote {
  border-left: 1px solid #999;
  color: var(--code-color);
  padding-left: 20px;
  font-style: italic;
}

footer {
  padding: 25px 0;
  text-align: center;
}

.title:hover { text-decoration: none; }
.title h1 { font-size: 1.5em; }
.title h1::before {
  content: "༼ つ ◕_◕ ༽つ";
  margin-right: 0.35em;
  color: var(--link-color);
  font-family: var(--font-main);
  font-weight: 400;
}

.title h1::after {
  content: ".";
  color: var(--signal-color);
}
.inline { width: auto !important; }

.highlight, .code {
  padding: 1px 15px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
  margin-block-start: 1em;
  margin-block-end: 1em;
  overflow-x: auto;
}

.note {
  border: 1px dashed;
  padding: 10px 15px;
  font-size: 0.9em;
  border-radius: 10px 10px 10px 0;
  margin-bottom: 30px;
  position: relative;
}

ul.blog-posts {
  list-style-type: none;
  padding: unset;
}

ul.blog-posts li { display: flex; }
ul.blog-posts li span { flex: 0 0 130px; }
ul.blog-posts li a:visited { color: var(--visited-color); }

/* Risk Log data content; intentionally uses Bear's typography and rules. */
.analysis-figure {
  width: 100%;
  margin: 2em 0;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px dashed;
  border-bottom: 1px dashed;
}

.metric-row > div { padding: 10px 8px 10px 0; }
.metric-row span { display: block; color: var(--muted-color); font-size: 0.75em; }
.metric-row strong { font-family: monospace; }

.plot-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 4px;
  font-size: 0.8em;
}

.plot-heading span,
.analysis-figure figcaption { color: var(--muted-color); }
.plot-heading-secondary { margin-top: 38px; }
.plot-host { min-height: 340px; }
.plot-host-small { min-height: 220px; }
.plot-host > figure { margin: 0; }
.analysis-figure figcaption { margin-top: 16px; font-family: monospace; font-size: 0.75em; }

.observable-chart {
  width: 100%;
  min-height: 230px;
}

.observable-chart[data-chart="rolling"] { min-height: 410px; }
.observable-chart[data-chart="exposure"] { min-height: 350px; }
.observable-chart[data-chart="lead-lag"] { min-height: 375px; }
.observable-chart[data-chart="spread"] { min-height: 345px; }
.observable-chart[data-chart="tail"] { min-height: 245px; }
.observable-chart > figure { margin: 0; max-width: 100%; }
.observable-chart svg { display: block; max-width: 100%; height: auto; }
.chart-fallback { display: block; width: 100%; height: auto; }
.interactive-hint { white-space: nowrap; }
mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; }

.provisional { font-size: 0.9em; }
.tape-page h2 { margin-top: 2em; font-family: monospace; font-size: 1em; }

.tape-entry {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed;
}

.tape-meta { font-family: monospace; font-size: 0.85em; }
.tape-meta time, .tape-meta span { display: block; }
.tape-copy h3 { margin: 0 0 4px; font-size: 1em; }
.tape-copy p { margin: 0; }

@media (max-width: 620px) {
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plot-heading { display: block; }
  .plot-heading span { display: block; }
  .tape-entry { grid-template-columns: 1fr; }
  .tape-meta time, .tape-meta span { display: inline; }
  .tape-meta span::before { content: " · "; }
  .observable-chart[data-chart="rolling"] { min-height: 360px; }
  .interactive-hint { display: block; white-space: normal; }
}
