/*
 * Osvio Help Center theme — layered on Material for MkDocs.
 *
 * This is its own surface, neither the creator app nor a client gallery: it borrows the app's
 * stone palette, background (#f5f4f0) and type pairing (Cormorant Garamond headings, Manrope
 * body) so it reads as part of Osvio. Gold is kept to thin accents — marker numbers, link
 * underlines, hover borders — the app UI itself uses none.
 *
 * Contrast: every text colour below is >= 4.5:1 on its background in both schemes
 * (muted #57534e on #f5f4f0 = 6.9:1; gold #856532 on #f5f4f0 = 4.9:1; dark-scheme muted
 * #b3aaa0 on #0d0b09 = 8.9:1). Sizes are px/em on purpose: Material's html font-size is 125%,
 * so 1rem is 20px here.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  --osvio-ink: #1c1917;
  --osvio-ink-rgb: 28, 25, 23;
  --osvio-paper: #f5f4f0;
  --osvio-card: #ffffff;
  --osvio-line: #e7e5e4;
  --osvio-muted: #57534e;
  --osvio-gold: #856532;
  --osvio-gold-soft: rgba(133, 101, 50, 0.12);
  --osvio-radius: 14px;
  --osvio-radius-sm: 10px;
  --osvio-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --osvio-font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --md-text-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-md-color-scheme="slate"] {
  --osvio-ink: #f3ede4;
  --osvio-ink-rgb: 243, 237, 228;
  --osvio-paper: #0d0b09;
  --osvio-card: #171411;
  --osvio-line: #2d2824;
  --osvio-muted: #b3aaa0;
  --osvio-gold: #e0bb7a;
  --osvio-gold-soft: rgba(224, 187, 122, 0.14);
}

/* Map the tokens onto Material's own variables. */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--osvio-paper);
  --md-default-fg-color: var(--osvio-ink);
  --md-default-fg-color--light: var(--osvio-muted);
  --md-default-fg-color--lighter: rgba(var(--osvio-ink-rgb), 0.32);
  --md-default-fg-color--lightest: rgba(var(--osvio-ink-rgb), 0.08);
  --md-primary-fg-color: var(--osvio-paper);
  --md-primary-fg-color--light: var(--osvio-paper);
  --md-primary-fg-color--dark: var(--osvio-paper);
  --md-primary-bg-color: var(--osvio-ink);
  --md-primary-bg-color--light: var(--osvio-muted);
  --md-accent-fg-color: var(--osvio-gold);
  --md-accent-fg-color--transparent: var(--osvio-gold-soft);
  --md-typeset-color: var(--osvio-ink);
  --md-typeset-a-color: var(--osvio-ink);
  --md-code-bg-color: rgba(var(--osvio-ink-rgb), 0.06);
  --md-code-fg-color: var(--osvio-ink);
  --md-footer-bg-color: #1c1917;
  --md-footer-bg-color--dark: #141210;
  --md-footer-fg-color: #f3ede4;
  --md-footer-fg-color--light: rgba(243, 237, 228, 0.72);
  --md-footer-fg-color--lighter: rgba(243, 237, 228, 0.52);
}
[data-md-color-scheme="default"] { --md-typeset-mark-color: rgba(184, 145, 58, 0.35); }
[data-md-color-scheme="slate"] { --md-typeset-mark-color: rgba(224, 187, 122, 0.3); }

body { background: var(--osvio-paper); }

a:focus-visible,
label[role="button"]:focus-visible,
.md-header__button:focus-visible {
  outline: 2px solid var(--osvio-gold);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- header */
.md-header {
  border-bottom: 1px solid var(--osvio-line);
  box-shadow: none;
}
.md-header[data-md-state="shadow"] { box-shadow: 0 8px 22px -16px rgba(0, 0, 0, 0.45); }

.md-header__button.osvio-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0.2rem 0 0.4rem;
  padding: 0.2rem 0.4rem 0.2rem 0;
  color: var(--osvio-ink);
  text-decoration: none;
  opacity: 1;
}
.osvio-brand__mark { display: block; width: 26px; height: 26px; flex: none; }
.osvio-brand__mark--dark,
[data-md-color-scheme="slate"] .osvio-brand__mark--light { display: none; }
[data-md-color-scheme="slate"] .osvio-brand__mark--dark { display: block; }

/* The wordmark, as drawn by resources/js/Components/Brand/Logo.jsx: a dotless ı with the star as its dot. */
.osvio-wordmark {
  font-family: var(--osvio-font-display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--osvio-ink);
  white-space: nowrap;
}
.osvio-i { position: relative; display: inline-block; line-height: 1; }
.osvio-i svg {
  position: absolute;
  top: 0.07em;
  left: 50%;
  width: 0.22em;
  height: 0.22em;
  margin-left: -0.11em;
  overflow: visible;
}
.osvio-i path { fill: #856532; }
[data-md-color-scheme="slate"] .osvio-i svg { filter: drop-shadow(0 0 0.06em #ffe3bf); }
[data-md-color-scheme="slate"] .osvio-i path { fill: #ffe3bf; }

.osvio-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.15rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: var(--osvio-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.osvio-header-link:hover { background: var(--osvio-gold-soft); color: var(--osvio-ink); }
.osvio-header-link--support,
.osvio-header-link--lang { border: 1px solid var(--osvio-line); }
.osvio-header-link__icon { display: none; }

.md-search__form {
  background: var(--osvio-card);
  border: 1px solid var(--osvio-line);
  box-shadow: none;
}
.md-search__input { color: var(--osvio-ink); }
.md-search__input::placeholder { color: var(--osvio-muted); }
.md-search__icon { color: var(--osvio-muted); }
.md-search-result mark { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 59.9844em) {
  /* Phone / tablet: menu button first, then the brand; the page title and the text links give way to an icon. */
  .md-header__inner > label[for="__drawer"] { order: -1; }
  .md-header__title { display: none; }
  .md-header__button.osvio-brand { margin-right: auto; }
  .osvio-header-link--app { display: none; }
  .osvio-header-link--support,
  .osvio-header-link--lang { padding: 0; border: 0; }
  .osvio-header-link__text { display: none; }
  .osvio-header-link__icon { display: block; padding: 0.4rem; }
}

/* ---------------------------------------------------------------- typography */
.md-typeset { line-height: 1.7; }
.md-typeset h1,
.md-typeset h2 {
  font-family: var(--osvio-font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--osvio-ink);
  font-variant-numeric: lining-nums; /* Cormorant's default figures are old-style */
}
.md-typeset h1 { font-size: 2.6em; line-height: 1.08; margin: 0 0 0.4em; }
.md-typeset h2 { font-size: 1.9em; line-height: 1.15; margin: 1.8em 0 0.5em; }
.md-typeset h3 { font-size: 1.1em; font-weight: 700; margin: 1.7em 0 0.5em; color: var(--osvio-ink); }
.md-typeset h4 { font-weight: 700; color: var(--osvio-ink); }

.osvio-lead { margin: -0.1em 0 1.6em; max-width: 44em; color: var(--osvio-muted); font-size: 1.15em; line-height: 1.6; }

.md-typeset a:not(.headerlink) {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--osvio-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
.md-typeset a:not(.headerlink):hover { color: var(--osvio-gold); }

/* Numbered steps are the backbone of the how-to articles: make the numbers easy to follow. */
.md-typeset ol > li::marker { color: var(--osvio-gold); font-weight: 700; }
.md-typeset ol > li { padding-left: 0.2em; }
.md-typeset li > p:first-child { margin-top: 0.3em; }

.md-typeset img { border-radius: var(--osvio-radius-sm); border: 1px solid var(--osvio-line); }
.md-typeset .headerlink { color: var(--osvio-muted); }
.md-typeset kbd { border-radius: 6px; }

.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--osvio-radius-sm);
  box-shadow: none;
  background: var(--osvio-card);
  font-size: 0.95em;
}

/* Note / info boxes take the brand accent; tip, warning and danger keep their meaning colours. */
.md-typeset .admonition:is(.note, .info),
.md-typeset details:is(.note, .info) { border-color: var(--osvio-gold); }
.md-typeset :is(.note, .info) > :is(.admonition-title, summary) { background-color: var(--osvio-gold-soft); }
.md-typeset :is(.note, .info) > :is(.admonition-title, summary)::before { background-color: var(--osvio-gold); }

.md-nav__link--active,
.md-nav__item .md-nav__link--active { color: var(--osvio-gold); font-weight: 700; }
.md-nav__link:is(:hover, :focus) { color: var(--osvio-gold); }
.md-path { color: var(--osvio-muted); }

/* ---------------------------------------------------------------- article chrome */
/* Material styles lists as `ul:not([hidden])`, so our list resets need the same weight to win. */
.md-typeset ul.osvio-badges:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; margin: -0.2em 0 1.2em; padding: 0; list-style: none; }
.md-typeset ul.osvio-badges:not([hidden]) > li:not([hidden]) { margin: 0; }
.osvio-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid var(--osvio-line);
  border-radius: 999px;
  background: var(--osvio-card);
  color: var(--osvio-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.osvio-badge--plan::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--osvio-gold); }
.osvio-badge--client { border-color: transparent; background: var(--osvio-gold-soft); color: var(--osvio-ink); }

.osvio-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 0 1.5em;
  padding: 12px 16px;
  border: 1px solid var(--osvio-line);
  border-radius: var(--osvio-radius-sm);
  background: var(--osvio-gold-soft);
  font-size: 0.95em;
  line-height: 1.5;
}
.osvio-notice strong {
  color: var(--osvio-ink);
  font-size: 0.8em;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.osvio-pill {
  display: inline-block;
  padding: 1px 9px;
  border: 1px solid var(--osvio-line);
  border-radius: 999px;
  color: var(--osvio-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.osvio-pill--soon { border-color: transparent; background: var(--osvio-gold-soft); color: var(--osvio-ink); }

.md-typeset .osvio-section-title--small { margin-top: 2.2em; font-size: 1.5em; }

/* Linked article rows (related articles, category lists, popular / recent on the home page). */
.md-typeset ul.osvio-links:not([hidden]) { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.md-typeset ul.osvio-links:not([hidden]) > li:not([hidden]) { margin: 0; }
.md-typeset .osvio-link a {
  display: block;
  height: 100%;
  padding: 14px 18px;
  border: 1px solid var(--osvio-line);
  border-radius: var(--osvio-radius-sm);
  background: var(--osvio-card);
  color: var(--osvio-ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.md-typeset .osvio-link a:hover { border-color: var(--osvio-gold); color: var(--osvio-ink); }
.osvio-link__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; }
.osvio-link__desc { display: block; margin-top: 2px; color: var(--osvio-muted); font-size: 0.9em; line-height: 1.5; font-weight: 400; }
.osvio-link__meta { display: block; margin-top: 6px; color: var(--osvio-muted); font-size: 12px; font-weight: 500; }

/* ---------------------------------------------------------------- home */
.osvio-hero {
  padding: clamp(36px, 7vw, 88px) 0 clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--osvio-line);
  background:
    radial-gradient(60% 130% at 88% -20%, rgba(184, 145, 58, 0.22), transparent 62%),
    var(--osvio-paper);
}
.osvio-hero__inner { position: relative; padding: 0 0.8rem; }
/* Decorative brand mark in the otherwise empty right half of the hero (wide screens only). */
.osvio-hero__inner::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.8rem;
  width: 340px;
  height: 340px;
  transform: translateY(-50%);
  background: url("../brand/osvio-mark-light.svg") center / contain no-repeat;
  pointer-events: none;
}
[data-md-color-scheme="slate"] .osvio-hero__inner::after { background-image: url("../brand/osvio-mark-dark.svg"); }
@media (max-width: 72em) { .osvio-hero__inner::after { display: none; } }
.osvio-hero__title {
  margin: 0 0 0.25em;
  font-family: var(--osvio-font-display);
  font-weight: 500;
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--osvio-ink);
}
.osvio-hero__subtitle { max-width: 34em; margin: 0 0 28px; color: var(--osvio-muted); font-size: 18px; line-height: 1.55; }

.osvio-hero__search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 660px;
  height: 58px;
  padding: 0 14px 0 18px;
  border: 1px solid var(--osvio-line);
  border-radius: var(--osvio-radius);
  background: var(--osvio-card);
  box-shadow: 0 14px 34px -24px rgba(var(--osvio-ink-rgb), 0.55);
  color: var(--osvio-muted);
  cursor: text;
  transition: border-color 0.15s ease;
}
.osvio-hero__search:hover { border-color: var(--osvio-gold); }
.osvio-hero__search svg { flex: none; width: 22px; height: 22px; fill: currentColor; }
.osvio-hero__search-text { flex: 1; font-size: 16px; }
.osvio-hero__search-hint {
  padding: 2px 9px;
  border: 1px solid var(--osvio-line);
  border-radius: 6px;
  color: var(--osvio-muted);
  font-size: 12px;
  font-family: var(--osvio-font-body);
}
@media (max-width: 59.9844em) { .osvio-hero__search-hint { display: none; } }

.osvio-hero__ask { margin: 30px 0 10px; color: var(--osvio-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.osvio-audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 660px; }
@media (max-width: 40em) { .osvio-audience { grid-template-columns: 1fr; } }
.osvio-audience__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--osvio-line);
  border-radius: var(--osvio-radius);
  background: var(--osvio-card);
  color: var(--osvio-ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.osvio-audience__card:first-child { border-color: var(--osvio-ink); background: var(--osvio-ink); color: var(--osvio-paper); }
.osvio-audience__card:hover { border-color: var(--osvio-gold); }
.osvio-audience__card:first-child:hover { color: var(--osvio-paper); }
.osvio-audience__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; }
.osvio-audience__text strong { font-size: 16px; }
.osvio-audience__card svg { flex: none; width: 20px; height: 20px; fill: currentColor; }

.osvio-home-section { margin: 0 0 48px; }
.md-content__inner > .osvio-home-section:first-child { margin-top: 40px; }
.md-typeset .osvio-home-section .osvio-section-title { margin: 0 0 18px; }
.md-typeset .osvio-home-section ul.osvio-links:not([hidden]) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.md-typeset ul.osvio-cards:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-typeset ul.osvio-cards:not([hidden]) > li:not([hidden]) { margin: 0; }
.md-typeset .osvio-card a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--osvio-line);
  border-radius: var(--osvio-radius);
  background: var(--osvio-card);
  color: var(--osvio-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.md-typeset .osvio-card a:hover {
  border-color: var(--osvio-gold);
  box-shadow: 0 14px 30px -22px rgba(var(--osvio-ink-rgb), 0.6);
  color: var(--osvio-ink);
  transform: translateY(-2px);
}
.osvio-card__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 50%; background: var(--osvio-gold-soft); color: var(--osvio-gold); }
.osvio-card__icon svg { width: 22px; height: 22px; fill: currentColor; }
.osvio-card__title { font-family: var(--osvio-font-display); font-size: 1.7em; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
.osvio-card__desc { color: var(--osvio-muted); font-size: 0.92em; line-height: 1.55; font-weight: 400; }
.osvio-card__count { margin-top: auto; padding-top: 10px; color: var(--osvio-muted); font-size: 12px; font-weight: 600; }

/* ---------------------------------------------------------------- support band + buttons */
.osvio-support { padding: 28px 0.8rem 44px; }
.osvio-support__card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 30px 34px;
  border-radius: 20px;
  background: #1c1917;
  color: #f3ede4;
}
[data-md-color-scheme="slate"] .osvio-support__card { border: 1px solid var(--osvio-line); background: var(--osvio-card); }
.osvio-support h2 { margin: 0 0 6px; font-family: var(--osvio-font-display); font-weight: 500; font-size: 32px; line-height: 1.1; color: #f3ede4; }
.osvio-support p { max-width: 36em; margin: 0; color: #cfc6bb; font-size: 15px; line-height: 1.55; }

.md-typeset a.osvio-button,
a.osvio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--osvio-radius-sm);
  background: var(--osvio-ink);
  color: var(--osvio-paper);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.md-typeset a.osvio-button:hover,
a.osvio-button:hover { background: var(--osvio-gold); color: var(--osvio-paper); }
.md-typeset a.osvio-button--light,
a.osvio-button--light { background: #f3ede4; color: #1c1917; }
.md-typeset a.osvio-button--light:hover,
a.osvio-button--light:hover { background: #ffffff; color: #1c1917; }

.osvio-404 { padding: 12px 0 32px; }
.osvio-404 .osvio-hero__search { margin: 24px 0 28px; }

@media (prefers-reduced-motion: reduce) {
  .md-typeset .osvio-card a,
  .osvio-hero__search,
  .osvio-audience__card { transition: none; }
  .md-typeset .osvio-card a:hover { transform: none; }
}
