/* Trading Winner theme: navy + market green, geometric headlines. */

:root {
  --tw-brand-900: #0a1a2f;
  --tw-brand-700: #12355b;
  --tw-brand-500: #2f7de1;
  --tw-brand-100: #e4eefb;
  --tw-accent: #19c37d;
  --tw-heading-font: "Space Grotesk", "Inter", system-ui, sans-serif;
  --tw-radius: 14px;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--tw-brand-700);
  --md-primary-fg-color--light: var(--tw-brand-500);
  --md-primary-fg-color--dark: var(--tw-brand-900);
  --md-accent-fg-color: #0e8f5a;
  --md-typeset-a-color: var(--tw-brand-700);
  --tw-surface: #ffffff;
  --tw-surface-alt: #f4f7fb;
  --tw-border: #dde5ef;
  --tw-muted: #5a6779;
  --tw-chip-bg: var(--tw-brand-100);
  --tw-chip-fg: var(--tw-brand-900);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #6aa9ff;
  --md-primary-fg-color--light: #9cc5ff;
  --md-primary-fg-color--dark: var(--tw-brand-700);
  --md-accent-fg-color: var(--tw-accent);
  --md-typeset-a-color: #6aa9ff;
  --tw-surface: #141c28;
  --tw-surface-alt: #0f1620;
  --tw-border: #263447;
  --tw-muted: #9aabc2;
  --tw-chip-bg: #1b2c45;
  --tw-chip-fg: #c6dcfb;
}

/* Typography */

.md-typeset {
  font-size: 0.85rem;
  line-height: 1.75;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.tw-hero__title,
.tw-card__title,
.md-header__title {
  font-family: var(--tw-heading-font);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  color: var(--md-default-fg-color);
  text-wrap: balance;
}

.md-typeset h2 {
  font-size: 1.45rem;
  margin-top: 2em;
}

.md-typeset h3 {
  font-size: 1.15rem;
}

.md-typeset blockquote {
  border-left: 4px solid var(--tw-accent);
  color: var(--md-default-fg-color);
  font-family: var(--tw-heading-font);
  font-size: 1.05em;
  font-style: normal;
  padding: 0.2em 1.2em;
}

.md-typeset img {
  border-radius: var(--tw-radius);
}

/* Post pages: comfortable reading width */

.md-content--post .md-content__inner {
  max-width: 44rem;
}

/* Hero */

.tw-hero {
  background:
    radial-gradient(60rem 24rem at 85% -20%, rgba(25, 195, 125, 0.25), transparent 60%),
    linear-gradient(135deg, var(--tw-brand-900), var(--tw-brand-700) 60%, var(--tw-brand-500));
  color: #fff;
}

.tw-hero__inner {
  padding: 3.2rem 1.2rem 3.6rem;
}

.tw-hero__eyebrow {
  color: var(--tw-accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

.tw-hero__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
}

.tw-hero__title em {
  color: var(--tw-accent);
}

.tw-hero__lead {
  font-size: 1rem;
  margin: 1.2rem 0 1.6rem;
  max-width: 32rem;
  opacity: 0.9;
}

.tw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.tw-button {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: background-color 0.15s, transform 0.15s;
}

.tw-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.tw-button--primary {
  background: var(--tw-accent);
  border-color: var(--tw-accent);
  color: #04281a;
}

.tw-button--primary:hover {
  background: #3ddc97;
}

/* Post cards */

.tw-listing__title,
.tw-listing__header h1 {
  font-family: var(--tw-heading-font);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0.4rem 0 1.2rem;
}

.tw-cards {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
}

.tw-card {
  min-width: 0;
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.tw-card:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 14px 30px -18px rgba(6, 61, 44, 0.55);
  transform: translateY(-3px);
}

/* The newest post on the home page spans the full row. */
@media screen and (min-width: 60em) {
  .tw-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .tw-cards > .tw-card:first-child {
    flex-direction: row;
    grid-column: 1 / -1;
  }

  .tw-cards > .tw-card:first-child .tw-card__media {
    aspect-ratio: auto;
    flex: 0 0 45%;
    min-height: 16rem;
  }

  .tw-cards > .tw-card:first-child .tw-card__body {
    padding: 1.6rem 2rem;
  }

  .tw-cards > .tw-card:first-child .tw-card__title {
    font-size: 1.7rem;
  }
}

.tw-card__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--tw-brand-900), var(--tw-brand-500));
  display: block;
  overflow: hidden;
}

.tw-card__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tw-card__placeholder {
  align-items: flex-end;
  background: radial-gradient(14rem 8rem at 100% 0, rgba(242, 182, 50, 0.4), transparent 70%);
  color: #fff;
  display: flex;
  font-family: var(--tw-heading-font);
  font-size: 1.2rem;
  font-style: normal;
  height: 100%;
  padding: 1rem 1.2rem;
}

.tw-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 1.2rem 1.1rem;
}

.tw-card__meta {
  color: var(--tw-muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.tw-card__title {
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.tw-card__title a {
  color: var(--md-default-fg-color);
}

.tw-card__title a:hover {
  color: var(--md-primary-fg-color);
}

.tw-card__excerpt {
  color: var(--tw-muted);
  display: -webkit-box;
  font-size: 0.75rem;
  line-height: 1.6;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* The excerpt is the top of the post; show only its text. */
.tw-card__excerpt h1,
.tw-card__excerpt h2,
.tw-card__excerpt h3,
.tw-card__excerpt img,
.tw-card__excerpt .headerlink {
  display: none;
}

.tw-card__excerpt p {
  margin: 0;
}

.tw-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: auto 0 0;
  padding-top: 0.9rem;
}

/* Chips: categories, tags, topics page */

.tw-chips,
.tw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tw-tags {
  border-top: 1px solid var(--tw-border);
  margin-top: 2.4rem;
  padding-top: 1.2rem;
}

.md-typeset .tw-chip,
.tw-chip {
  background: var(--tw-chip-bg);
  border-radius: 999px;
  color: var(--tw-chip-fg);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.md-typeset .tw-chip:hover,
.tw-chip:hover {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color, #fff);
}

.tw-chip span {
  opacity: 0.6;
}

.md-typeset .tw-chip--small,
.tw-chip--small {
  font-size: 0.62rem;
  padding: 0.18rem 0.6rem;
}

/* Pagination */

.md-pagination {
  margin-top: 2rem;
}

/* Header: the site name is a link home, like the logo */

.md-header__title .tw-header__home {
  color: inherit;
  display: block;
}

/* Categories page: featured post per category */

.tw-features {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.tw-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tw-feature .tw-card {
  flex: 1;
}

.md-typeset .tw-feature__title {
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.md-typeset .tw-feature__title a,
.md-typeset .tw-card__title a {
  color: var(--md-default-fg-color);
  text-decoration: none;
}

.md-typeset .tw-feature__title a:hover,
.md-typeset .tw-card__title a:hover {
  color: var(--md-primary-fg-color);
}

.tw-feature__title span {
  color: var(--tw-muted);
  font-family: var(--md-text-font-family);
  font-size: 0.7rem;
  font-weight: 400;
  margin-left: 0.3rem;
  white-space: nowrap;
}

.md-typeset .tw-card__title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.md-typeset .tw-card__media img {
  border-radius: 0;
}

/* No repository link, so drop its reserved slot and let search sit at the right edge. */
.md-header__source {
  display: none;
}

/* Tables: the broker lists and holiday calendars */

.md-typeset table:not([class]) {
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  font-size: 0.75rem;
}

.md-typeset table:not([class]) th {
  background: var(--tw-surface-alt);
  font-weight: 600;
}

/* Archived comments from the WordPress site (read-only) */

.tw-comments {
  display: grid;
  gap: 0.8rem;
}

.md-typeset .tw-comments__note {
  color: var(--tw-muted);
  font-size: 0.72rem;
  margin: 0;
}

.tw-comment {
  background: var(--tw-surface-alt);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.8rem 1rem;
}

.tw-comment--reply {
  margin-left: 1.4rem;
}

.tw-comment--author {
  border-left: 4px solid var(--tw-accent);
}

.md-typeset .tw-comment__meta {
  font-size: 0.72rem;
  margin: 0 0 0.4rem;
}

.tw-comment__meta time {
  color: var(--tw-muted);
  margin-left: 0.4rem;
}

.tw-comment__body {
  font-size: 0.78rem;
  line-height: 1.65;
}

.md-typeset .tw-comment__body p {
  margin: 0 0 0.6em;
}

.md-typeset .tw-comment__body p:last-child {
  margin-bottom: 0;
}

/* Profit calculator */

.tw-calc {
  background: var(--tw-surface-alt);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius);
  display: grid;
  gap: 0.9rem;
  max-width: 30rem;
  padding: 1.2rem;
}

.tw-calc label {
  display: grid;
  font-size: 0.75rem;
  font-weight: 500;
  gap: 0.3rem;
}

.tw-calc input {
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: 8px;
  color: var(--md-default-fg-color);
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0.5rem 0.7rem;
}

.tw-calc input:focus-visible {
  border-color: var(--md-primary-fg-color);
  outline: 2px solid var(--md-primary-fg-color);
  outline-offset: 1px;
}

.tw-calc button {
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  justify-self: start;
}

.tw-calc__result td:not(:first-child),
.tw-calc__result th:not(:first-child) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Buttons used inside page content (the hero sits on a dark background) */

.tw-hero__title em {
  font-style: normal;
}

.md-typeset .tw-button {
  border-color: var(--tw-border);
  display: inline-block;
  text-decoration: none;
  color: var(--md-default-fg-color);
}

.md-typeset .tw-button--primary,
.md-typeset .tw-button--primary:hover {
  border-color: var(--tw-accent);
  color: #04281a;
}
