/* Standalone styles for the Writer Mode marketing placements. */
:where(.writer-promo-banner, .writer-promo-showcase) {
  --writer-promo-surface: #f7f6f0;
  --writer-promo-ink: #23251e;
  --writer-promo-muted: #55594c;
  --writer-promo-line: #dedfd4;
  --writer-promo-accent: #3f4e34;
  --writer-promo-button: #293525;
  --writer-promo-button-hover: #3b4936;
  --writer-promo-button-text: #fff;
  --writer-promo-frame: #e5e8df;
  color: var(--writer-promo-ink);
}

@media (prefers-color-scheme: dark) {
  :where(.writer-promo-banner, .writer-promo-showcase) {
    --writer-promo-surface: #232720;
    --writer-promo-ink: #f4f3e9;
    --writer-promo-muted: #d1d4c8;
    --writer-promo-line: #444b3e;
    --writer-promo-accent: #c8d9b6;
    --writer-promo-button: #dfebd5;
    --writer-promo-button-hover: #f3f8ee;
    --writer-promo-button-text: #242d20;
    --writer-promo-frame: #30372d;
  }
}

.body-dark .writer-promo-banner {
  --writer-promo-surface: #232720;
  --writer-promo-ink: #f4f3e9;
  --writer-promo-line: #444b3e;
  --writer-promo-accent: #c8d9b6;
}

.writer-promo-banner,
.writer-promo-offer,
.writer-promo-offer-active .writer-promo-evergreen {
  display: none;
}

.writer-promo-banner-active .writer-promo-banner {
  display: block;
  background: var(--writer-promo-surface);
  border-bottom: 1px solid var(--writer-promo-line);
  font: 0.875rem/1.45 var(--font-sans, system-ui, sans-serif);
}

.writer-promo-banner-inner {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-height: 46px;
  max-width: 1200px;
  margin-inline: auto;
  padding: 6px 56px;
  text-align: center;
}

.writer-promo-banner .writer-promo-banner-link {
  display: inline-block;
  padding-block: 4px;
  color: var(--writer-promo-ink);
  text-decoration: none;
}

.writer-promo-banner .writer-promo-banner-cta {
  display: inline-block;
  font-weight: 650;
  color: var(--writer-promo-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.writer-promo-banner-link:hover .writer-promo-banner-cta {
  text-decoration-thickness: 2px;
}

.writer-promo-dismiss {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--writer-promo-ink);
  cursor: pointer;
}

.writer-promo-dismiss:hover {
  background: var(--writer-promo-line);
}

.writer-promo-dismiss svg {
  width: 16px;
  height: 16px;
}

/* Keep the site's navigation at the viewport top once the announcement scrolls away. */
.writer-promo-banner-active .writer-promo-banner + .site-header {
  position: sticky;
  top: 0;
  margin-bottom: -72px;
}

/* The older Bootstrap pages already reserve space below their fixed navigation. */
.writer-promo-banner-active .writer-promo-nav-anchor {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 0;
}

.writer-promo-banner-active .writer-promo-nav-anchor > .fixed-top {
  position: absolute;
}

.writer-promo-showcase {
  padding: clamp(60px, 8vw, 112px) clamp(18px, 4.4vw, 60px);
}

.writer-promo-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(24px, 4.2vw, 58px);
  border: 1px solid var(--writer-promo-line);
  border-radius: 24px;
  background: var(--writer-promo-surface);
}

.writer-promo-showcase .writer-promo-eyebrow {
  margin-bottom: 16px;
  color: var(--writer-promo-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.writer-promo-showcase h2 {
  max-width: 15ch;
  font-size: clamp(2.25rem, 4.25vw, 3.75rem);
  line-height: 1.02;
  text-wrap: balance;
}

.writer-promo-showcase .writer-promo-description {
  max-width: 35ch;
  margin-top: 16px;
  color: var(--writer-promo-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.writer-promo-features {
  display: grid;
  gap: 8px;
  margin: 21px 0 24px;
  padding-inline-start: 1.1em;
  font-size: 0.875rem;
}

.writer-promo-features li::marker {
  color: var(--writer-promo-accent);
}

.writer-promo-showcase .writer-promo-action {
  min-height: 44px;
  scroll-margin-block: 88px 16px;
  gap: 8px;
  padding: 8px 17px;
  border-color: var(--writer-promo-button);
  background: var(--writer-promo-button);
  color: var(--writer-promo-button-text);
  font-size: 0.875rem;
  white-space: normal;
}

.writer-promo-showcase .writer-promo-action:hover {
  background: var(--writer-promo-button-hover);
}

.writer-promo-showcase .writer-promo-support,
.writer-promo-showcase .writer-promo-account {
  color: var(--writer-promo-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.writer-promo-support {
  margin-top: 12px;
}

.writer-promo-showcase .writer-promo-support p {
  margin-block: 0 0.3em;
  color: inherit;
}

.writer-promo-account {
  margin-top: 4px;
}

.writer-promo-offer-active .writer-promo-offer {
  display: revert;
}

.writer-promo-mark {
  width: 1.25rem;
  height: 1.25rem;
  margin-inline-end: 0.25em;
  vertical-align: middle;
}

.writer-promo-wordmark {
  display: block;
  width: 151px;
  max-width: 100%;
  height: auto;
  margin-block-end: 10px;
}

.writer-promo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.writer-promo-showcase .writer-promo-lifetime-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--writer-promo-accent);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.writer-promo-art {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  aspect-ratio: 5 / 4;
  padding: 7%;
  overflow: hidden;
  border: 1px solid var(--writer-promo-line);
  border-radius: 17px;
  background: var(--writer-promo-frame);
}

.writer-promo-art img {
  display: block;
  width: 100%;
  height: auto;
}

.writer-promo-art picture:first-child {
  position: absolute;
  inset: 0;
}

.writer-promo-art .writer-promo-lake {
  height: 100%;
  object-fit: cover;
}

.writer-promo-art .writer-promo-editor {
  position: relative;
  border: 1px solid var(--writer-promo-line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 25, 18, 0.25);
}

.writer-promo-footer-link {
  color: var(--color-text-secondary, inherit);
  font-size: 0.875rem;
  text-decoration: none;
}

.writer-promo-footer-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.writer-promo-new {
  display: inline-block;
  margin-inline-start: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eeefe6;
  color: #444c3d;
  font: 600 0.6875rem/1.45 var(--font-sans, system-ui, sans-serif);
  vertical-align: 1px;
}

.writer-promo-legacy-footer {
  margin: 12px auto 0;
  padding: 0 16px 16px;
  text-align: center;
  font-size: 0.875rem;
}

.writer-promo-legacy-footer .writer-promo-footer-link {
  color: #55594c;
}

.body-dark .writer-promo-legacy-footer .writer-promo-footer-link {
  color: #d1d4c8;
}

.writer-promo-banner :focus-visible,
.writer-promo-showcase .writer-promo-action:focus-visible,
.writer-promo-lifetime-link:focus-visible,
.writer-promo-footer-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.writer-promo-showcase .writer-promo-action:focus-visible {
  outline-color: var(--writer-promo-accent);
}

@media (max-width: 900px) {
  .writer-promo-banner-active .writer-promo-banner + .site-header {
    margin-bottom: -68px;
  }
}

@media (max-width: 760px) {
  .writer-promo-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .writer-promo-art {
    aspect-ratio: 4 / 3;
    padding: 6%;
  }
}

@media (max-width: 560px) {
  .writer-promo-banner-inner {
    justify-items: start;
    padding: 7px 54px 7px 16px;
    text-align: left;
  }
}
