/* Option Trading University theme on top of Material for MkDocs.
   These colours are for the stand-alone course (mkdocs.yml). On apnatrader.com the site's
   theme replaces them: /_assets/learn-menu.css maps them onto /_assets/theme.css. */
:root, [data-md-color-scheme="default"] {
  --md-primary-fg-color: #2962ff;
  --md-primary-fg-color--light: #5b8cff;
  --md-primary-fg-color--dark: #1e53e5;
  --md-accent-fg-color: #1e53e5;
  --otu-green: #089981;
  --otu-red: #f23645;
  --otu-orange: #e65f00;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1e53e5;
  --md-primary-fg-color--light: #5b8cff;
  --md-primary-fg-color--dark: #163fb3;
  --md-accent-fg-color: #7aa2ff;
  --md-typeset-a-color: #7aa2ff;
}

/* comfortable reading for beginners */
.md-typeset { font-size: 0.92rem; line-height: 1.75; }
.md-typeset img { border: 1px solid var(--md-default-fg-color--lightest); border-radius: 8px; display: block; margin: 1.2em auto; }
.md-typeset table:not([class]) { font-size: 0.85rem; }
.md-typeset .admonition, .md-typeset details { font-size: 0.87rem; line-height: 1.65; }
/* left menu text a little bigger too */
.md-nav { font-size: 0.75rem; }

/* home page hero */
.otu-hero { display: flex; gap: 2.5rem; align-items: center; margin: 1rem 0 2rem; flex-wrap: wrap; }
.otu-hero-text { flex: 1 1 320px; }
.otu-hero-img { flex: 1 1 360px; }
.md-typeset .otu-hero h1 { color: var(--md-primary-fg-color); font-weight: 700; margin-bottom: 0.2em; font-size: 2.4em; line-height: 1.15; }
.otu-hero .otu-tagline { font-size: 1.35em; font-weight: 600; margin: 0 0 0.6em; line-height: 1.3; }
.otu-hero img { margin: 0; box-shadow: 0 12px 40px rgba(19, 23, 34, 0.12); border-radius: 12px; }

/* module cards */
.md-typeset .otu-modules > ul > li { display: flex; flex-direction: column; }
.md-typeset .otu-modules > ul > li > p { margin: 0.35em 0; }
.otu-num { font-size: 1.9em; font-weight: 700; color: var(--md-primary-fg-color); line-height: 1; }
.otu-level { float: right; font-size: 0.7rem; font-weight: 700; padding: 0.2em 0.8em; border-radius: 999px;
  background: var(--md-default-fg-color--lightest); color: var(--md-default-fg-color--light); }
.otu-level.beginner { background: color-mix(in srgb, var(--otu-green) 14%, transparent); color: var(--otu-green); }
.otu-level.intermediate { background: color-mix(in srgb, var(--otu-orange) 14%, transparent); color: var(--otu-orange); }
.otu-level.advanced { background: color-mix(in srgb, var(--otu-red) 13%, transparent); color: var(--otu-red); }
.otu-count { font-size: 0.75rem; color: var(--md-default-fg-color--light); }

/* chapter list on module pages */
.md-typeset .otu-chapters p { margin: 0; padding: 0.8em 0; border-bottom: 1px solid var(--md-default-fg-color--lightest); line-height: 1.6; }

/* stronger headings, easier to scan */
.md-typeset h1 { font-weight: 700; color: var(--md-default-fg-color); }
.md-typeset h2 { font-weight: 600; }
.md-typeset h3 { font-weight: 600; }

/* No table of contents anywhere: on mobile, Material still offers it inside the menu
   for the current page, so show the plain page link instead. */
.md-nav--primary label.md-nav__link[for="__toc"] { display: none; }
.md-nav--primary label.md-nav__link[for="__toc"] ~ a.md-nav__link { display: flex; }

/* use the full width of the browser window (Material's default limit is about 1220px) */
.md-grid { max-width: none; }
.md-main__inner, .md-header__inner, .md-tabs__list { padding-left: 1rem; padding-right: 1rem; }

/* images keep their natural size (charts are drawn for about 960px) so they stay sharp on wide screens */
.md-typeset img { max-width: min(100%, 1000px); }
.md-typeset .otu-hero img { max-width: 100%; }

/* the sticky "Modules" heading of the left menu needs a background, or scrolled items show through it */
.md-nav--primary > .md-nav__title { background-color: var(--md-default-bg-color); box-shadow: 0 0.4rem 0.4rem -0.3rem var(--md-default-bg-color); }

/* end-of-chapter quiz (see assets/quiz.js) */
.md-typeset .admonition.question .quiz-options { list-style: none; margin-left: 0; padding-left: 0; }
.md-typeset .admonition.question .quiz-option { list-style: none; margin: 0.45em 0; padding: 0.55em 0.9em; cursor: pointer;
  border: 1px solid var(--md-default-fg-color--lighter); border-radius: 6px; transition: background-color .15s, border-color .15s; }
.md-typeset .admonition.question:not(.quiz-done) .quiz-option:hover,
.md-typeset .admonition.question:not(.quiz-done) .quiz-option:focus { border-color: var(--md-primary-fg-color); background: rgba(41, 98, 255, 0.07); outline: none; }
.md-typeset .admonition.question.quiz-done .quiz-option { cursor: default; }
.md-typeset .admonition.question .quiz-right { border-color: var(--otu-green); background: color-mix(in srgb, var(--otu-green) 12%, transparent); font-weight: 600; }
.md-typeset .admonition.question .quiz-wrong { border-color: var(--otu-red); background: color-mix(in srgb, var(--otu-red) 10%, transparent); }
.md-typeset .admonition.question .quiz-right::after { content: "  ✓ Correct answer"; color: var(--otu-green); font-weight: 700; }
.md-typeset .admonition.question .quiz-wrong::after { content: "  ✗ Your answer"; color: var(--otu-red); font-weight: 700; }
.md-typeset .quiz-score { margin: 1.5em 0; padding: 1em 1.2em; border-radius: 8px; font-weight: 700; font-size: 1.05em;
  background: rgba(41, 98, 255, 0.08); display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.md-typeset .quiz-score .md-button { margin: 0; }
.md-typeset .admonition.question.quiz-incorrect { border-color: var(--otu-red); }
.md-typeset .admonition.question.quiz-incorrect > .admonition-title { background-color: rgba(242, 54, 69, 0.1); }

/* link to the same page in the other language (added by tools/mkdocs_hooks.py) */
.md-typeset .otu-lang { margin: 0 0 0.6em; text-align: right; }
.md-typeset .otu-lang a { display: inline-block; padding: 0.3em 0.9em; border: 1px solid var(--md-primary-fg-color);
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.md-typeset .otu-lang a:hover { background: var(--md-primary-fg-color); color: #fff; }
html[lang="hi"] .md-typeset .admonition.question .quiz-right::after { content: "  ✓ सही उत्तर"; }
html[lang="hi"] .md-typeset .admonition.question .quiz-wrong::after { content: "  ✗ आपका उत्तर"; }

/* chapter explainer videos (inserted by tools/mkdocs_hooks.py) */
.md-typeset .otu-video { margin: 1.4em 0 1.6em; max-width: 1000px; }
.md-typeset .otu-video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #070B18;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .35); }
.md-typeset .otu-video figcaption { margin: .6em 0 0; font-size: .82em; color: var(--md-default-fg-color--light); text-align: left; max-width: none; }
