/* Mimesis docs — Furo theme refinements
 *
 * Fonts:
 *   body  → Source Sans 3 (highly readable for prose/docs)
 *   code  → Fira Code (as used by many modern developer docs)
 */

@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap");

:root {
  --mimesis-radius: 10px;
  --mimesis-code-radius: 12px;
}

/* Keep visited links on-brand (avoid default purple); no underlines */
a:link,
a:visited,
a:hover,
a:active,
a.reference:link,
a.reference:visited,
a.reference:hover,
a.reference:active,
a.muted-link:link,
a.muted-link:visited,
a.muted-link:hover {
  color: var(--color-brand-content);
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

a:hover,
a:visited:hover,
a.reference:hover,
a.reference:visited:hover,
a.muted-link:hover {
  color: var(--color-brand-primary);
}

article {
  max-width: 52rem;
}

p,
li {
  line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.015em;
  font-weight: 650;
}

/* Inline + block code */
code.literal,
span.pre {
  font-family: "Fira Code", ui-monospace, monospace !important;
  font-size: 0.88em;
  font-variant-ligatures: contextual;
  border-radius: 5px;
  padding: 0.12em 0.38em;
}

div[class*="highlight-"] {
  border-radius: var(--mimesis-code-radius);
  overflow: hidden;
}

div.highlight {
  border-radius: var(--mimesis-code-radius);
  border: 1px solid var(--color-background-border);
}

div.highlight pre {
  font-family: "Fira Code", ui-monospace, monospace !important;
  padding: 1.15rem 1.3rem;
  line-height: 1.55;
  font-size: 0.86rem;
  font-variant-ligatures: contextual;
}

/* API signatures */
dl.py {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-background-border);
  border-radius: var(--mimesis-radius);
  background: var(--color-background-secondary);
}

dl.py > dt {
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 0.92em;
  font-weight: 500;
}

dl.py > dd {
  margin-top: 0.75rem;
}

dl.py.class > dt,
dl.py.function > dt,
dl.py.method > dt,
dl.py.exception > dt {
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--color-background-border);
}

.admonition {
  border-radius: var(--mimesis-radius);
}

table.docutils {
  border-radius: var(--mimesis-radius);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

table.docutils th {
  font-weight: 600;
  background: var(--color-background-secondary);
}

table.docutils td,
table.docutils th {
  padding: 0.65rem 0.85rem;
}

/* Sidebar extras */
.sidebar-useful-links {
  margin: 1rem 0.85rem 1.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-sidebar-search-border);
}

.sidebar-useful-links h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-foreground-secondary);
  margin: 0 0 0.55rem;
}

.sidebar-useful-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-useful-links li {
  margin: 0.2rem 0;
}

.sidebar-useful-links a {
  display: block;
  padding: 0.32rem 0.5rem;
  border-radius: 6px;
  color: var(--color-foreground-secondary);
  text-decoration: none;
  font-size: 0.92em;
}

.sidebar-useful-links a:hover {
  color: var(--color-brand-content);
  background: var(--color-sidebar-item-background--hover);
}

.sidebar-brand img,
.sidebar-logo {
  max-width: 70%;
  height: auto;
}

button.copybtn {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

div.highlight:hover button.copybtn,
button.copybtn:focus {
  opacity: 1;
}

dt:target,
span.highlighted {
  background: var(--color-highlight-on-target);
  border-radius: 4px;
}
